These are chat archives for rust-lang/rust

22nd
Sep 2016
Matheus Magalhães de Alcantara
@demhydraz
Sep 22 2016 12:36
Haskell is better than Erlang, just sayan'.
CodeTortoise
@CodeTortoise
Sep 22 2016 12:40
Wow. Gitter needs an official Haskell... and Erlang/BEAM room
Aditya Kurniawan
@akurniawan
Sep 22 2016 12:40
hi all, happy to be here. just curious about this language (haven’t touched it yet for now), for what use case is usually this language would be the most powerful in?
CodeTortoise
@CodeTortoise
Sep 22 2016 12:40
Because Rust is a baby and needs our attention.
Wherever C++ frustrates you.
And where you feel C could use more abstraction.
Matheus Magalhães de Alcantara
@demhydraz
Sep 22 2016 12:44
And wherever you feel something higher-level isn't appropriate
Aditya Kurniawan
@akurniawan
Sep 22 2016 12:46
So it's something in the middle of c and c++?
Manish Goregaokar
@Manishearth
Sep 22 2016 12:47
It's roughly at the level of C++
but safer
you can use it as you would use C, too
Aditya Kurniawan
@akurniawan
Sep 22 2016 12:47
Safer in the term of memory management like pointer and such?
Manish Goregaokar
@Manishearth
Sep 22 2016 12:47
yes
Aditya Kurniawan
@akurniawan
Sep 22 2016 12:50
Ah nice! How about the package management? Like in go we can easily grab a library simply by putting github url in the "header", can we do the same?
Manish Goregaokar
@Manishearth
Sep 22 2016 12:50
yes
well
you put it in a Cargo.toml file, but yes
Rust's package management story is much better than Go's
Aditya Kurniawan
@akurniawan
Sep 22 2016 12:56
ah I see, does it also handle the package dependency? like for example in java usually this problem a bit annoying where two libraries need another library but in different version
Manish Goregaokar
@Manishearth
Sep 22 2016 12:56
yes
Markus Siemens
@msiemens
Sep 22 2016 13:28
I'm running into weird problems with traits/lifetimes (see https://play.rust-lang.org/?gist=39f4e90583b639c9fa18da24b227bba0&version=stable&backtrace=0). Does anyone know how to handle situations like these?
Joe Green
@GreenJoey
Sep 22 2016 13:34
I really wana learn Rust by the official docs goes 10 feet above my head...Can anyone suggest me where can I learn it easily??? PS:I know C just in case
Jonas Platte
@jplatte
Sep 22 2016 13:36
@GreenJoey You mean the book? I'm not aware of any widespread alternative introduction material, maybe you could just ask about your concrete problems with it here?
Joe Green
@GreenJoey
Sep 22 2016 13:41
@jplatte yup the book is too much complicated for and easy alterntive???
CodeTortoise
@CodeTortoise
Sep 22 2016 13:42
There is a book in works, being written by Jim Blandy. Maybe wait for that?
Joe Green
@GreenJoey
Sep 22 2016 13:43
@CodeTortoise Name please??
Ian Henry
@eeyun
Sep 22 2016 13:45
you could also try http://rustbyexample.com/ which think is different content than the rust book? Also if youre looking for some simple exercises to get a feel for the ins and outs of things codingame.com supports rust!
Manish Goregaokar
@Manishearth
Sep 22 2016 13:45
yeah, RBE is different
Ian Henry
@eeyun
Sep 22 2016 13:45
:+1:
Joe Green
@GreenJoey
Sep 22 2016 13:46
thanks @eeyun
Ian Henry
@eeyun
Sep 22 2016 13:46
for sure!
CodeTortoise
@CodeTortoise
Sep 22 2016 15:01
Programming Rust by Jim Blandy and Jason Orendorrf
It is an early release on Safari Books. Dont know when it will be finished.
Also there seems to be no way to address people directly on the Android Gitter app, sorry Joe.
Jonathan Turner
@jonathandturner
Sep 22 2016 15:23
there's also the new Rust book that we're currently working on: http://rust-lang.github.io/book/
Ian Henry
@eeyun
Sep 22 2016 15:23
cc @GreenJoey ^
mhsjlw
@mhsjlw
Sep 22 2016 21:43
@demhydraz nah nah, Erlang scales way, way better. Haskell is meant to just be functional or something like that, who cares. Erlang is meant to actually have use cases
:D
anyway, this isn't the place to discuss it
CodeTortoise
@CodeTortoise
Sep 22 2016 22:30
@mhsjlw I have been searching on here, there is not proper place to discuss functional languages. Or, there are rooms for Erlang and Haskell, but they are in Russian
Shall I create a new community for Haskell? Anyone going to beat me to it???
mhsjlw
@mhsjlw
Sep 22 2016 22:31
i'd recommend just using irc for the language
CodeTortoise
@CodeTortoise
Sep 22 2016 22:32
Hm. Fine. I do.
Oh. that makes sense. There is no official Haskell github repository.
Gitter is not slack
Anywho. Anyone see a future where I can completely abandon C++ and C for systems programming?
mhsjlw
@mhsjlw
Sep 22 2016 22:35
yes
CodeTortoise
@CodeTortoise
Sep 22 2016 22:36
Because lifetime is basically telling some occupant of section of memory when to die.
mhsjlw
@mhsjlw
Sep 22 2016 22:38
i still feel as though i'm better off writing my network programming servers in Elixir rather than rust
CodeTortoise
@CodeTortoise
Sep 22 2016 22:40
Yeah. Aren't most network environments running on a VM anyways?
Can elixir be run on a bare machine?
Hm. I wonder if eventually all languages will support inlining other languages... Like most do with C
Or some kind of generic, modular ffi
LeonineKing1199
@LeonineKing1199
Sep 22 2016 22:45

Anywho. Anyone see a future where I can completely abandon C++ and C for systems programming?

Probably never C.

C is such a simple language that building a compiler for it will always be easy
CodeTortoise
@CodeTortoise
Sep 22 2016 22:46
Or like, embed VMs, called from Cargo, and feed it files.erl
Rust can be the ultimate scripting language
Yeah. Aren't you required to build a C compiler to graduate with a CS degree, or something?
LeonineKing1199
@LeonineKing1199
Sep 22 2016 22:47
Hmm... What defines a language as a "script"?

Yeah. Aren't you required to build a C compiler to graduate with a CS degree, or something?

I have no idea. That sound intense though O_o

CodeTortoise
@CodeTortoise
Sep 22 2016 22:48
Oh, the ability to compose different programs together.
Like, with bash scripting, you can combine various unix programs.
LeonineKing1199
@LeonineKing1199
Sep 22 2016 22:48
I've always though of scripts as something non-compiled.
CodeTortoise
@CodeTortoise
Sep 22 2016 22:48
@LeonineKing1199 I was being somewhat facetious about building a C compiler.
Right... what I said sort of doesn't make sense.
LeonineKing1199
@LeonineKing1199
Sep 22 2016 22:49
I think C will always be sort of dominant in areas like embedded programming.
Places where there isn't really an OS and you have your own assembly and instructions and stuff like that.
Making a C compiler is significantly easier than making a compiler for any other langauge.
Or so I assume :P
CodeTortoise
@CodeTortoise
Sep 22 2016 22:50
I thinks so. I think it competes with Forth and Lisp for "trivial" compiler programming.
Honestly, I think the future of programming will be secretly consumed by Wolfram.
AI designed DSLs, personalized for each user.
LeonineKing1199
@LeonineKing1199
Sep 22 2016 22:52
That'd be kind of cool.
I think we're limited by hardware, tbh.
The hardware fundamentally controls what we can and can't do and that bleeds all the way up into the abstractions we're allowed to create.
CodeTortoise
@CodeTortoise
Sep 22 2016 22:53
Yeah, that is the funny thing about us system programming aspirants, we like things to be invented on our machine. Clouds man... whose computer is it really?
I think the real future is when we can create assembly-performant code written on something like Scratch.
The most exciting thing about Rust is that yeah, it isn't so dumb to try writing your own OS.
LeonineKing1199
@LeonineKing1199
Sep 22 2016 22:58
You mean like writing a kernel in Rust?
CodeTortoise
@CodeTortoise
Sep 22 2016 22:58
YEs
LeonineKing1199
@LeonineKing1199
Sep 22 2016 22:58
I also just googled Scratch, is that a child's programming language lol?
CodeTortoise
@CodeTortoise
Sep 22 2016 22:58
Yups/
LeonineKing1199
@LeonineKing1199
Sep 22 2016 22:58
Ha
That would be pretty sweet.
CodeTortoise
@CodeTortoise
Sep 22 2016 22:59
Erector set programming
LeonineKing1199
@LeonineKing1199
Sep 22 2016 22:59
I actually know nothing of systems programming so I can't really comment about Rust's aptitude for it.
To me, computers are magical electrical machines.
I was literally just reading about hardware interrupt handlers the other day :P
CodeTortoise
@CodeTortoise
Sep 22 2016 23:00
Basically. It's magic that this stuff is even possible. Makes you forgive your reality a little bit.
One day I will actually finish that course.
LeonineKing1199
@LeonineKing1199
Sep 22 2016 23:01
One thing I'm curious about now with Rust is, how do the compile times compare to C++?
With C++, heavy usage of templates really, really, really slows down compilation.
Has anyone here made any large-ish projects that make heavy use of generics?
CodeTortoise
@CodeTortoise
Sep 22 2016 23:02
Oh, compile times in C++ is half the reason using C++ is dipping your toes in lava.
C++ parses each program like, hundreds of times.
Dave Hylands
@dhylands
Sep 22 2016 23:03
Pffft - I remember several hour compile times when I started
LeonineKing1199
@LeonineKing1199
Sep 22 2016 23:03
That's fine with me just so long as the code output is correct XD

Pffft - I remember several hour compile times when I started

For specificity, in Rust?

CodeTortoise
@CodeTortoise
Sep 22 2016 23:03
Yeah, and that is why D will win.
Fast compile times.
Dave Hylands
@dhylands
Sep 22 2016 23:03
No - this was back in the early 80's
Running on a then fast Burroughs Mini Computer (4 MHz IIRC)
You actually checked all your changes very carefully before submitting to compile again :)
LeonineKing1199
@LeonineKing1199
Sep 22 2016 23:05
Ha ha ha

Yeah, and that is why D will win.

I've seen some good things about D

D has the pure keyword and is the only other language with generics that match C++.
CodeTortoise
@CodeTortoise
Sep 22 2016 23:06
@dhylands That is intense. I'd hate to be the naive graduate student who wasted hundreds of dollars on a computing time because of a single error.
Wait, wasn't that most of the programmer?
D is amazing. If Rust didn't pop up into my life, I would actually be studying it.
The problem with D, and also the best thing about D, is that it doesn't have committee to ruin things for it.
LeonineKing1199
@LeonineKing1199
Sep 22 2016 23:08

The problem with D, and also the best thing about D, is that it doesn't have committee to ruin things for it.

Now that's interesting.

CodeTortoise
@CodeTortoise
Sep 22 2016 23:08
It has a community, which is unfortunately very small, much more compared to Rust I think.
LeonineKing1199
@LeonineKing1199
Sep 22 2016 23:09
I'm curious why D never took off...
It seems way less popular than anything else
CodeTortoise
@CodeTortoise
Sep 22 2016 23:10
No idea.
Tomas CaseyWilcox
@tomascw
Sep 22 2016 23:11
@LeonineKing1199 I think it has to do with backend for DMD is only source available but not open source. That's just my guess.
Till Höppner
@tilpner
Sep 22 2016 23:11
The Phobos/Tango split early on didn't help.
Kevin K.
@kbknapp
Sep 22 2016 23:11
Maybe a GC, and the Tango/Phobos confusion
CodeTortoise
@CodeTortoise
Sep 22 2016 23:11
It must be that '10x' bias. If it isn't drastically changing your life, it isn't worth it. Legacy problems with old coders.
Bad marketing?
LeonineKing1199
@LeonineKing1199
Sep 22 2016 23:12
I know GC turns off a lot of the C++ veterans so they probably didn't gain much ground there.
CodeTortoise
@CodeTortoise
Sep 22 2016 23:12
Eh, the landing pages of all programming languages seem to have homogenized./
LeonineKing1199
@LeonineKing1199
Sep 22 2016 23:12
How so?
CodeTortoise
@CodeTortoise
Sep 22 2016 23:13
Download button + Runnable code snippet + Twitter
LeonineKing1199
@LeonineKing1199
Sep 22 2016 23:13
You mean they all say "modular" and "elegant" now?
CodeTortoise
@CodeTortoise
Sep 22 2016 23:13
Yeps
Nevermind. Twitter is not really a constant.