Live data from Hacker News

Considering Rust [video]

youtube.com

31–40 of 46 posts

Re: Considering Rust [video]

#31

Can somebody please explain why Rust has so much buzz right now compared to scala? Scala is a strongly typed, very-well vetted, functional programming language in the JVM. It pretty much has everything going for it. It's even adopted by twitter.

I am big on Rust, and I enjoyed using Scala at work in the past. Scala has a more elaborated type system, and everything is heap-allocated so some stuff is easier. On the other hand... JVM is often a PITA, and debugging blowing up memory issues was common. Compilation was slow (even slower than Rust), code was sometimes slow, and emphasis on OOP has made a lot of code I had to work with overly complicated and very much a typical OOP spaghetti garbage. Null pointers are still a problem (though much less than Java). Compiler is not as helpful as rustc one, though IntelliJ integration was more mature. Lack of macros encouraged code generation which was a PITA. Collections were messed up. Tooling wasn't half as nice.

The list of complains grew big, but again: all in all, I think Scala was quite fine to work with.

Re: Considering Rust [video]

#32
post #5

Even as a fan of Rust I've become exhausted by these posts. Surely everyone on here must at this point know what Rust is and roughly why people use it?

I think Rust fans here at HN appreciate some ammunition when convincing other people that Rust is great!

Re: Considering Rust [video]

#33
post #2

I've been getting into Rust lately and really enjoying it so far. Coming from JavaScript, It can feel a bit verbose at times and I'm still trying to get an intuitive grasp of ownership but it feels like a really small cost compared to say C/C++. A nice bonus is that it has very good support for WebAssembly/Node.js which makes it easy to start using Rust for some JavaScript modules without having to re-write the whole…

I felt the same, coming from JavaScript and Python. Then I realised "verbosity" is actually "the language demanding you be crystal clear about what you're asking and that every code path is covered." I just can't go back. Typescript gives me most of this. But Python feels just awful to me now. It's like an entire kind of cognitive load is being eliminated from my day.

I’ve had some luck with Mypy, but it’s still very bolted-on. Even getting the type checker to find dependencies installed on your system is nontrivial. But this sort of tedium is just par for the course with Python.

Re: Considering Rust [video]

#34
post #3

> Jon Gjengset > The Rust programming language has become a serious contender in the space of "systems" programming languages, and has recently been adopted by many of the tech giants for "serious" projects. In response to this, more companies are now considering whether they too should add Rust to their tech stack. This talk hopes to help you make that decision. We go through how the language compares to many curren…

Jon has been working on a reasonably large Rust project called Noria[1], "a new streaming data-flow system designed to act as a fast storage backend for read-heavy web applications".

I found his Rust live coding sessions on YouTube[2] to be an enjoyable introduction to Rust.

[1] https://github.com/mit-pdos/noria

[2] https://www.youtube.com/channel/UC_iD0xppBwwsrM9DegC5cQQ

Re: Considering Rust [video]

#35
post #25
post #12

Earlier quoted context omitted.

Not widely accepted in industry, but widely accepted (or at least known) among HN readers

Which is a very small percentage of people in tech. In my network Rust is still very new to unknown in some tech companies. I will say Go is more the language that emerged.

Yes but we're not talking about the prevalence of these in general, just on HN

Re: Considering Rust [video]

#36
I've just "incompleted" my first Rust project: a Minecraft server. I gave up due to the protocol, not Rust. I finally learned the damn thing after spouting its hypothetical advantages all over the internet. My overall conclusion was correct, but the reasoning incorrect. The borrow checker is an amazing pair programmer, but that's not the primary reason I'm having genuine fun.

Rust is a systems language that is a pleasure to build. This "how to build on Mac/Windows/OSX" is a non-issue and should be a non-issue. Solving how to build something is an utter waste of time and is complete bullshit.

Please, for the sanity of the rest of us, stop using C build systems. They are just unbelievably terrible; people have tried and tried, but you can only do so much with a fundamentally flawed bad idea.

Re: Considering Rust [video]

#37
post #7

I'm 20 minutes in and he's spending a lot of time talking about how Rust gets correctness right. Are there any anecdotal stories about how Rust programs have fewer errors? Facebook, for example, rewrote Messenger with ReasonML: https://reasonml.github.io/blog/2017/09/08/messenger-50-reas... And it had a lot fewer bugs: "Messenger used to receive bugs reports on a daily basis; since the introduction of Reason, there h…

I take about 1-2 hours to hash out some major changes to C# code. It breaks for asinine reasons (of my own fault) 7 or 8 times after I try it out. I just wrapped up my learning Rust project. Day 1 was spent with about 7 hours of coding, some unit tests, first run it worked with no stupid errors. All refactorings except one (I messed up mutability, logic error) went without a hitch after running it.

It's wholesome development, if there were such a thing. I feel good and proud of the code I write in it.

[1]: https://github.com/jcdickinson/racemus

Re: Considering Rust [video]

#38
post #36

I've just "incompleted" my first Rust project: a Minecraft server. I gave up due to the protocol, not Rust. I finally learned the damn thing after spouting its hypothetical advantages all over the internet. My overall conclusion was correct, but the reasoning incorrect. The borrow checker is an amazing pair programmer, but that's not the primary reason I'm having genuine fun. Rust is a systems language that is a plea…

Couldn't agree more. I often have to install programs from sounce, and dynamic linking, header files/include paths, etc. make the C build system extremely unreliable. It's often more of a trial and error process ("which library is it going to be missing next") than a methodical one. I've spent countless hours hunting down why libfoo.so isn't loading correctly, or why some random function is undefined at the compile stage.

Re: Considering Rust [video]

#39

Can somebody please explain why Rust has so much buzz right now compared to scala? Scala is a strongly typed, very-well vetted, functional programming language in the JVM. It pretty much has everything going for it. It's even adopted by twitter.

I felt slight nausea and unexplainable deep irritation at reading this.

Scala is a disgusting mess compared to Rust in just about every way I can think of. Please for the love of everything good, consider at least Kotlin.

Re: Considering Rust [video]

#40
Rust is interesting, so I decided to include it in a 3 language prototyping project. I wanted to experience how it is to code for these languages, compared to the outcome. The project was dead simple, read 2 files concurrently and match lines by id's. Data was a bit unstructured, some lines would go unmatched, some would be duplicates, and report on that while deallocating memory for processing large filesizes.

Ruby: Quick fun building the classes and methods. A bit trial and error on dynamic errors. Processing was 40x slower than golang implementation though, so felt a bit discouraging after the fact. But was fun language to prototype OO in! Nice for quick'n dirty projects.

Golang: I didn't find need for OO or interfaces, so simplified for processing code mostly. The language helped in this regard, as it is quite imperative-driven. Golang was the fastest language to develop in, and showed Ruby version to be a bit over-engineered.

Rust: Never coded in Rust before, I searched SO for most relevant code examples and patched it up from several examples. I didn't go into the deeper end of things or optimize anything, but instead spent 90% of the time writing naive processing code while battling the compiler. If I'd been proficient, perhaps no battle, but this required the longest dev time and processing was noticably slower than Go, though not by a factor.

From this short anecdotal experience: Ruby for quick'n dirty fun or OO modelling. Golang for prototyping and initial versions. Rust for where you know you need safe parallellism and special optimizations. Right tool for the job!

Post reply on HN