Live data from Hacker News

Four years with Rust

words.steveklabnik.com

61–70 of 199 posts

Re: Four years with Rust

#61
post #33
post #29

Earlier quoted context omitted.

Odd. It was indicated in that thread that "We've banned this serial troll, of course, but the immune response from the community was particularly healthy here." I guess they got un-banned?

They certainly didn't get unbanned! And btw I vaguely recall other accounts being silly around a similar derangement-point, so perhaps this is a serial troll, which is one of the few cases where we just ban accounts immediately. The comment might have gotten unkilled because of a bug that I might have introduced yesterday. Looking into it now. Edit: yep, it turns out I introduced a bug, with the dismaying but hilario…

He's still posting, so not banned? Or that because of the bug you're referring to? https://news.ycombinator.com/threads?id=cyphreak

Re: Four years with Rust

#62
post #20

Earlier quoted context omitted.

What kind of application s would Rust be an appropriate for? What languages is it largely meant to replace/improve on.

Rust is intended for applications where you need speed, concurrency, and safety/correctness. In some senses, "use Rust where you would use C or C++" makes sense, but we're also seeing a lot of usage from programmers who have rejected C or C++ for various reasons. One angle that we've been focusing a lot on lately is productivity. Think about some feature of Rust that provides safety, like out borrow checker, which en…

Dream time, Microsoft gets to sponsor Rust on their stack and VS integration, and we can move on from C# + C++/CX to C# + Rust. :)

Re: Four years with Rust

#63

I would appreciate if anyone can share your dev setup for Rust. I tried Rust and Racer long time ago and it's not a pleasant experience.

VS Code with RLS is amazing. Still a work-in-progress, but some stuff works and it's only going to get better. I'm mostly just used to sublime and vim with minimal tooling so it doesn't matter as much for me. But I'll probably eventually write a plugin for RLS for sublime.

> VS Code with RLS is amazing.

The only reason I have to install it.

Re: Four years with Rust

#64
I really like the premise of Rust. Keep at it. For my purposes, it's still a bit too immature. Last time I looked at the big 7 things, most were still not done.

https://mail.mozilla.org/pipermail/rust-dev/2014-June/010139...

The RustDT plugin for Eclipse makes the edit/save/compile/flag errors loop a lot tighter for me as a beginner. The autocomplete seems incomplete though and there's no hover docs or ctrl-click through to source that I remember.

I look forward to the day I can replace JS with Rust. It would be nice to have a quick way to start doing Rust in the browser. I tried installing emscripten to give it a go, but the version in Ubuntu's deb repo was too old. I don't remember why, but building it from source didn't work out.

I also got a bit lost trying to get boilerplate together for that purpose. Something like maven archetypes would be really great for Rust... Project templates that get you started with a working hello world for whatever you're trying to do.

Just some suggestions. I basically like where Rust is going.

Re: Four years with Rust

#65
post #62

Earlier quoted context omitted.

Rust is intended for applications where you need speed, concurrency, and safety/correctness. In some senses, "use Rust where you would use C or C++" makes sense, but we're also seeing a lot of usage from programmers who have rejected C or C++ for various reasons. One angle that we've been focusing a lot on lately is productivity. Think about some feature of Rust that provides safety, like out borrow checker, which en…

Dream time, Microsoft gets to sponsor Rust on their stack and VS integration, and we can move on from C# + C++/CX to C# + Rust. :)

I did see this go by a while back: https://github.com/Microsoft/BashOnWindows/issues/258#issuec...

So someone over there is paying some degree of attention, at least :)

Re: Four years with Rust

#66
post #60

Earlier quoted context omitted.

> Rc is common in the Rust ecosystem I'm really surprised you think that's the case. Most rust codebases I've worked with use Rc very sparingly, if at all. If a codebase does use Rc there's usually one central thing that is Rc'd, with everything else using regular memory management. I have noticed that beginners coming from GCd languages often tend to structure their code in such a way that paints them into a corner…

> I'm not really sure how to teach idiomatic Rust though. Learners should read and write lots of Rust. That's a great way to learn what is idiomatic. There will be early missteps, but thankfully the language makes it more comfortable when you do things the right way.

Yeah, my advice in general is to pick a few rust codebases and start hacking on them.

But I would love to figure out how to teach this in a way that doesn't involve random codebases. Some folks learn by doing (I do!), but others fare better with tutorials.

Re: Four years with Rust

#67
post #13

Earlier quoted context omitted.

> Just my 2p for others learning: for me, Rc::RefCell was what I was missing, even after I thought I was up to speed. I started (and then stopped) learning Rust a few months ago (before their docs rewrite) and the borrow checker and concepts weren't explain in a way that I could understand. Programs wouldn't work at all, and when I read about Rc::RefCell I was scared because I wasn't sure how much garbage collection…

To be clear, Rust has no garbage collector, and unless you type "unsafe", it's safe. RefCell will panic when something goes wrong. I should take this opportunity to mention that the book has been stagnating because I (along with Carol Nichols || Goulding) have been re-writing it out of tree: https://doc.rust-lang.org/stable/book/ The ownership/borrow checker stuff has been completely re-done. The existing book chapte…

That's great to hear. That's definitely an area that has made me slow down on learning Rust. Will definitely be checking out the new book once it's ready.

Re: Four years with Rust

#68
post #64

I really like the premise of Rust. Keep at it. For my purposes, it's still a bit too immature. Last time I looked at the big 7 things, most were still not done. https://mail.mozilla.org/pipermail/rust-dev/2014-June/010139... The RustDT plugin for Eclipse makes the edit/save/compile/flag errors loop a lot tighter for me as a beginner. The autocomplete seems incomplete though and there's no hover docs or ctrl-click thr…

A quick summary of where these are at:

Internationalization / Localization / Unicode (ICU): yup, no real progress. Needs some domain experts to drive it.

Date/Time : chrono is the most popular.

HTTP: hyper has been good for a few years now, tokio will make it async soon.

Crypto: there's lots of interesting work in this space, see ring and rustls.

SQL: Diesel is the gold standard here.

So, some progress! You're absolutely right that growing the crates ecosystem is vital; we've doubled our numbers in the last year, but there's always more to do.

> project templates

https://github.com/rust-lang/cargo/pull/3004

Re: Four years with Rust

#69
post #62

Earlier quoted context omitted.

Rust is intended for applications where you need speed, concurrency, and safety/correctness. In some senses, "use Rust where you would use C or C++" makes sense, but we're also seeing a lot of usage from programmers who have rejected C or C++ for various reasons. One angle that we've been focusing a lot on lately is productivity. Think about some feature of Rust that provides safety, like out borrow checker, which en…

Dream time, Microsoft gets to sponsor Rust on their stack and VS integration, and we can move on from C# + C++/CX to C# + Rust. :)

Have you tried VSCode with the Rust(racer,rustfmt) + lldb integration? I've been pretty impressed with it so far.

FWIW C# Rust integration is really straightforward. You can actually pass delegates as C fn pointers and then treat them as a closures in Rust. Much less painful that I initially thought.

Re: Four years with Rust

#70
post #18

Earlier quoted context omitted.

We do have https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Ais... It is unclear if there ever will be a Rust 2.0. Even those that want it agree that unless it's incredibly easy to upgrade to from Rust 1.x, it's a non-starter.

There is also the possibility that a Rust 2.0 could fragment the community much like with Python2.7 Python3.x, which would be "undesirable" at best.

I wish the notion of Rust 2.0 was definitively buried to remove the fear of Rust doing its own Python 3.
Post reply on HN