These are chat archives for rust-lang/rust

4th
Aug 2017
Joonas Koivunen
@koivunej
Aug 04 2017 06:18
@BbalajiSg_twitter i think that are we web yet is a good starting point to get a sense of the landscape. there are also related rust roadmap issues to this topic, at least rust-lang/rust-roadmap#10
Michal 'vorner' Vaner
@vorner
Aug 04 2017 07:12
Hello. I want to experiment a bit with the source code of the std and of the compiler. However, running ./x.py build takes like an hour or so, therefore using that for the usual edit-compile-run cycle is just out of question. Is there an usual workflow how people do that? Or, even better, some kind of hacking rustc for dummies document?
demoneyes
@demoneyes
Aug 04 2017 08:09
Hi guys, I'm a rust noob, just trying to wrap my head around lifetimes o_0
would anyone be able to tell my why im getting an error here?
pretty please
demoneyes
@demoneyes
Aug 04 2017 08:20
all good, got some help, thanks
rust book didn't mention coersion
yep, you had to bind 'a to 'b as well :D
so fn lifetime_checker<'a: 'b, 'b>(x:&'a str, y:&'b str) -> &'b str{
but you already found your own answer
lifetimes it's all about let the compiler know how long will live any reference
if you return a reference, he doesn't know until when that reference lives, so that's why you connect them to other parameters
the problem in this case was that if you were returning an 'a lifetime which doesn't means nothing at the end of the function
demoneyes
@demoneyes
Aug 04 2017 08:26
thank you @Shaddy finding it very interesting to get into :)
Yavuz Günay
@yvz5
Aug 04 2017 09:47
hi, I was wondering if there are any database drivers for sybase sql anywhere ?
toidiu
@toidiu
Aug 04 2017 14:33
@Shaddy appreciate the explanation
Michal 'vorner' Vaner
@vorner
Aug 04 2017 16:03
Does anyone know if there's an actual reason for the schism between https://www.rust-lang.org/en-US/documentation.html and https://doc.rust-lang.org/, or if it's a leftover from something?
Denis Lisov
@tanriol
Aug 04 2017 17:19
https://doc.rust-lang.org is the title page of the Rust documentation package (the same that can be installed locally with rustup component add rust-docs) for stable channel
The other page is a bigger overview with links to other channels (beta and nightly) and more external resources.
Michal 'vorner' Vaner
@vorner
Aug 04 2017 17:36
I see. So, everything linked on the doc.rust-lang.org can be installed locally. That's cool :-)
Denis Lisov
@tanriol
Aug 04 2017 17:38
Almost everything (no docs.rs, obviously, and not Rust Learning collection)
Michal 'vorner' Vaner
@vorner
Aug 04 2017 17:39
Yes, but these can be generated locally from the dependencies.
I'm a bit confused about the „Last updated“ field on crates.io. For example, this crate is mine and it wasn't updated 2 days ago, the latest update is from April: https://crates.io/crates/tokio-jsonrpc. Is it computed from other things besides version uploaded there?
Igor
@target-san
Aug 04 2017 22:18
Can anyone please recommend some code snippet or article where a container which manually manages memory under the hood is implemented with only stable compiler features? The ones in std use a ton of unstables and compiler magic.
Sherab Giovannini
@Shaddy
Aug 04 2017 22:19
is Rustonomicon against that :D?
Igor
@target-san
Aug 04 2017 22:21
AFAIK it only describes tight corners around unsafe things. I'm looking more for a "canon" implementation sample.
Igor
@target-san
Aug 04 2017 22:21
Thanks, forgot about that.
Sherab Giovannini
@Shaddy
Aug 04 2017 22:21
it has a simple implementation of std vector, I know its not the most advanced one but, its a good example