Live data from Hacker News

Rust 0.5 released

mail.mozilla.org

21–30 of 54 posts

Re: Rust 0.5 released

#21
post #5

I've really become quite a Rust fanboy, although I haven't written tons of code in it. IMO, it's considerably more accessible than Haskell or a ML-family. I'm not precisely sure why, but it seems to "make sense" in a very straightforward way. Some of it I think is lessons-learned from older languages, some of it might be the syntax, some of it just might be mental fit. Certainly - and this is a huge deal - I could re…

> I've really become quite a Rust fanboy, although I haven't written tons of code in it. As someone who's been meaning to try it out for a while, I have a couple of questions for you. First, how did you get started? I found the tutorial decent, but after reading through it, I didn't feel like I could quite jump in and start writing code. By contrast, I never actually read the Go spec/tutorials; I did a brief run thro…

Not the person you replied to, but I can give some idea...

>First, how did you get started?

I always find a project I kinda want to do, and apply the language to it, not the other way around. In my case, I need to read JVM .class files [1]

>Second, how did you come to understand the memory model?

The compiler is really strict and won't let you do certain things without explicitly stating (copying, changing pointer types, etc). Basically you have to ask yourself what you're doing w/ the data, then apply the box you want.

>Finally, how do you find the libraries in different areas?

Cargo is all there is [2]. Obviously the ecosystem is thin right now, but it's really easy to wrap C libs. As for what's easiest, not exactly sure, it's a pretty general purpose language, but pretty low level.

[1] - https://github.com/cretz/patina [2] - https://github.com/mozilla/cargo-central

Re: Rust 0.5 released

#22
post #5

I've really become quite a Rust fanboy, although I haven't written tons of code in it. IMO, it's considerably more accessible than Haskell or a ML-family. I'm not precisely sure why, but it seems to "make sense" in a very straightforward way. Some of it I think is lessons-learned from older languages, some of it might be the syntax, some of it just might be mental fit. Certainly - and this is a huge deal - I could re…

> I've really become quite a Rust fanboy, although I haven't written tons of code in it. As someone who's been meaning to try it out for a while, I have a couple of questions for you. First, how did you get started? I found the tutorial decent, but after reading through it, I didn't feel like I could quite jump in and start writing code. By contrast, I never actually read the Go spec/tutorials; I did a brief run thro…

RE: the memory model, I wrote a blog post on it because I had the same trouble. Folks seem to have found it pretty helpful!

http://tomlee.co/2012/12/managed-and-owned-boxes-in-the-rust...

Re: Rust 0.5 released

#24
post #20

How is rust compared to Go?

I love both. If you are writing a production app today, I would strongly recommend Go. However, if you want to write an app that you want to take over the world with in a year or so, I would strongly recommend coding it in Rust. Go is a beautifully minimal language and very easy to learn. Rust isn't quite as productive, but it won't be too foreign for most coders either — unlike the Erlangs and Haskells of this world…

great summary :) You're absolutely right about the stdlibs, Go has a great library, which you quickly start missing when you're using Rust which otherwise is a great language. I'm looking forward to what I think is the next stage for Rust, the stdlibs.

Re: Rust 0.5 released

#25

Where can I find binaries for 32-bit Ubuntu 12.10? Or a VM image? Will the Windows binary work in Wine?

A volunteer usually comes along with PPAs within a week or so, though with the new buildbot it might be feasible to have official nightly binaries built for every platform.

The Windows builds are very finicky, I'd be quite surprised if they worked under Wine.

Re: Rust 0.5 released

#26
post #20

How is rust compared to Go?

I love both. If you are writing a production app today, I would strongly recommend Go. However, if you want to write an app that you want to take over the world with in a year or so, I would strongly recommend coding it in Rust. Go is a beautifully minimal language and very easy to learn. Rust isn't quite as productive, but it won't be too foreign for most coders either — unlike the Erlangs and Haskells of this world…

Go has a great standard library in terms of breadth. The quality of the standard library varies between packages though.

I wouldn't say they're higher quality than comparable Scala/Java libraries, but I guess that's subjective.

Still love Go though, but really looking forward to a production ready Rust.

Re: Rust 0.5 released

#27
post #13

How is rust compared to Go?

Rust and Go may be superficially similar, but they are night and day semantically. They're also aimed at different niches and have wildly different goals. So though it may be tempting to compare the two, it's not an especially productive exercise. :) This town is more than big enough for the two of them.

It seems to me that any answer that stated specifically what those different niches and wildly different goals actually were would be a more productive exercise.

If there's room for more than one of them in this town, in which part of town would each reside?

Re: Rust 0.5 released

#28
I'm a little rusty but I did read the 0.4 docs before and gave the language a try, I'll dive into 0.5 again this weekend, I am a little confused by something however. What's going on with strings? When I last looked, a lot of the string operations worked with a specific pointer sigil[1]. If I'm using managed boxes, and the methods take and return unique boxes, is it because I'm using the wrong sigil for the job or should I expect to be able to use managed strings?

Is this just me misunderstanding the memory model or is this something that just hasn't been straightened our yet? I'm pretty confused about this in particular, as I thought I understood the point of the different sigils pretty well, but the way the library is written makes me wonder. This applies to things other than strings I guess, but strings seem like a good example.

[1]: https://github.com/mozilla/rust/blob/master/src/libcore/str....

Re: Rust 0.5 released

#29
post #5

I've really become quite a Rust fanboy, although I haven't written tons of code in it. IMO, it's considerably more accessible than Haskell or a ML-family. I'm not precisely sure why, but it seems to "make sense" in a very straightforward way. Some of it I think is lessons-learned from older languages, some of it might be the syntax, some of it just might be mental fit. Certainly - and this is a huge deal - I could re…

> I've really become quite a Rust fanboy, although I haven't written tons of code in it. As someone who's been meaning to try it out for a while, I have a couple of questions for you. First, how did you get started? I found the tutorial decent, but after reading through it, I didn't feel like I could quite jump in and start writing code. By contrast, I never actually read the Go spec/tutorials; I did a brief run thro…

I'm very curious about better ways to explain not just Rust pointers, but also other features that contribute to Rust's unique feel, like inherited mutability and linear types. These things are all interrelated and there are some emerging best practices, but they are still unfolding as the language evolves and people gain experience with it.

I'd recommend reading Tom Lee's post (linked previously) on the subject of pointers.

On the subject of libraries, there is a lot of work yet. The plan has been to get the language stabilized then start focusing on libraries and tooling.

The core and standard libraries are not very consistent, either in style or quality. The I/O modules (both file and network) are particularly problematic at the moment, so even a simple networking application will be difficult. Some folks have had success though by writing their own bindings to BSD sockets, ZeroMQ, mongrel, etc. (bindings for which are in cargo).

Outside of core and standard there have been a lot of graphics- and math-oriented libraries. Multimedia, particularly games, seems to be a very promising domain for Rust. There are a number of useful libraries that are not in cargo because cargo is not yet powerful enough to deal with their build requirements.

Some of the easiest, and potentially most useful, code to write when getting started are re-implementations of popular libraries, protocols, etc. in Rust. For example, I really wanted to implement mustache templates in Rust but somebody beat me to it.

Where 2012 was the year of stabilizing the language, 2013 will be for cleaning up and redesigning the libraries, and hopefully making all the tooling more usable and featureful.

Re: Rust 0.5 released

#30

Where can I find binaries for 32-bit Ubuntu 12.10? Or a VM image? Will the Windows binary work in Wine?

You can grab 64-bit linux binaries compiled on Debian from http://mcpherrin.ca/code/mozilla/rust-0.5-binary.tar.bz2

I don't know if that's helpful for you. I'll look into packaging stuff too.

Post reply on HN