Live data from Hacker News

Rust 0.3 released

github.com

31–40 of 57 posts

Re: Rust 0.3 released

#32

Two of the newest programming languages that I think have potential are Io and Rust. Io is a mash up of languages with speed similar to lua and has a list like syntax of lisp. I wonder if anyone can explain why they have not tried to incorporate some of lisp's syntax as it is more efficient for linked lists I think. And I thought part of the reason for Rust's development was for very fast/efficient concurrency that i…

I enjoyed playing with IO a lot years ago, not sure I'd define it "newest" since it's around 10 years old now

Re: Rust 0.3 released

#33
post #16

What are Mozilla's plans for integrating rust into Firefox? Is this a mostly theoretical constraint or is there a plan to have this implemented?

Rust is being used to implement an experimental new browser engine with a focus on concurrency in order to better take advantage of highly-parallel and power-limited hardware. It's known as Servo,[1] and it's still strictly in research mode; there are no concrete plans to integrate anything into Firefox as of yet. Even if there were, Rust itself won't be at 1.0 until sometime next year, and it would be quite a while…

Still can't build it (llvm fails somewhere) but reading the source code is interesting, very concise.

Re: Rust 0.3 released

#34

Rust is the most promising up-and-coming programming language, in my opinion. Finally a programming language with decent syntax that does RAII, and understands the need to restrict garbage collection! Thanks!

Why not D?

Re: Rust 0.3 released

#35
post #34

Rust is the most promising up-and-coming programming language, in my opinion. Finally a programming language with decent syntax that does RAII, and understands the need to restrict garbage collection! Thanks!

Why not D?

Because, faced with the fact that C++ makes an octopus by nailing extra legs onto a dog, D decided the right thing to do was to staple-gun them onto a cheetah instead.

D, at the end of the day, is C++ with cleaner syntax. Yes, you've gotten rid of headers and some of the syntactic ambiguities, but things that were mutable are still mutable, templates are still templates, hard-to-solve threading problems are just as hard to solve, etc. Indeed, I'd argue this is one of the reasons why C++ coders generally like D: it's the same damn thing with the most painful dumbth removed.

Rust, on the other hand, focuses on having different semantics from C++, in order to make certain problems much easier to solve. The big one is immutability, which makes code easier to reason about, and vastly simplifies multithreaded code compared to its D or C++ counterparts. But there are other major semantic differences, such as region pointers, the lack of nulls, and more, that really solve the semantic issues that crop up in C++ programs.

I know people who like D, and are highly productive in it, but Rust is solving a very different problem in a very different way.

Re: Rust 0.3 released

#36
post #31

Has Mozilla given up on Typestate? I see no mention of it in the release notes.

(Note: not a Rust dev, I just hang out in the IRC channel)

Typestate's still there for the time being, but it may not be for much longer. The problem is that it's not being used anywhere in the compiler, so it's not getting exercised nor is it providing any constructive design feedback. Last year there was an attempt to begin using typestate throughout the compiler and standard library, but it proved so clunky to use in practice that nobody had any patience to deal with it. So now there are two camps among the developers: those who consider the (quite large) subsystem to be a useless maintenance albatross, and those who would still like the idea of typestate but who acknowledge that it's not usable in its current form. Rust's BDFL appears to be slowly migrating from the latter camp to the former, so typestate may not be around for much longer.

Either way, making the whole thing work would require more effort than anyone has time for at the moment. Of course, this doesn't mean that it can't be removed now and then reintroduced in some future version of Rust.

Actually, wait, I remember asking Graydon (the Rust lead) about this. I was saving this for the 0.3 release discussion, so now's the perfect time:

  me:      so what were the reasons that nobody ever used typestate? was it just too cumbersome?
  graydon: combination of incomplete and wound up not often able to benefit from much code-path-distance between site of check and site of constraint-enforcement.
  graydon: I'm still unconvinced that could not be overcome
  graydon: but the result is that using it has effectively caused all callers to do checks just before they call, which isn't much of a win
  me:      graydon: was typestate the whole reason you started rust in the first place? I'd be really interested to read a retrospective :)
  graydon: no, I started rust because I was sick of hacking in C++ and wanted something with a saner compilation model, grammar, safety properties, concurrency properties ...
  graydon: I'd used lots of other languages and kept not being able to use them in an industrial setting, because they failed to be similar-enough to C++ in important ways, usually.
  graydon: typestate was just a property that hermes had that I liked because it looked like a way to statically optimize DBC, which I like in languages that have it
  graydon: (sather, eiffel, some of the C# derivatives)
  graydon: I tend to program over-defensively when left to my own devices. make copies of every datum to be local. make everything const. run a lot of internal consistency self-checks. etc. etc.
  graydon: (the one habit I hadn't picked up yet, which I'm still trying to, is adequate unit testing and fuzzing ... sigh)
  me:      graydon: so are you confident yet that even if someone was forcing you to write rust, you would't be sick of it? :)
  graydon: my experiences writing rust so far have been pretty positive. it has a number of the parts I like in other languages. the grammar is simpler, the compilation model is better, it's AOT and static, it has algebraic types, clear integer types, is eager and reasonably fast, doesn't force OO style...
  graydon: and crucially: doesn't need to allocate / GC like crazy, so can close that residual gap on inner loops without having to hit the FFI
  graydon: there are still odd bits we need to whittle down
  graydon: oh also the safe references are lovely. and getting better.

Re: Rust 0.3 released

#37

What problem does rust solve other languages (D, SML, OCaml, C++11, Objective C, vala, go etc.) did not -- apart from helping with the NIH syndrome? Does Mozilla actually use a language that still is a moving target with respect to its language specification for some substantial work (or what is the real-world status of that upcoming rendering engine which seems to be the reason why rust was called into life)?

They are working on a browser called "servo". It is still early in development.

Vs OCaml it has a threading model. Vs D memory safety, less kitchen sink. Vs C++ cleaner, better type system, memory safety. Vs Objective C memory safety, cleaner. Vs vala I don't know anything about vala. Vs go Here is their list of problems with Go from their website: Shared mutable state. Global GC. Null pointers. No RAII or destructors. No type-parametric user code.

Re: Rust 0.3 released

#38
post #29

Earlier quoted context omitted.

I'm more interested in an alternative to write desktop apps in, rather than small one off scripts. I'm interested in this from a vision point of view. What are going to be your first "written-using-Rust" apps ? Firefox is gargantuan, so it cant be your first. Ergo, the question about platform toolkit compatibility. If you build that one first, you will start spawning an ecosystem almost instantly... if you want. Mono…

>What are going to be your first "written-using-Rust" apps ? Rust compiler is written in rust, so that would be the first "written-using-Rust" app. Additionally afaik the work on rust-based web-browser (engine) has began, so that would be second (major) project for rust.

I have been working on a web framework stack: http://github.com/erickt/mre

Re: Rust 0.3 released

#40

Two of the newest programming languages that I think have potential are Io and Rust. Io is a mash up of languages with speed similar to lua and has a list like syntax of lisp. I wonder if anyone can explain why they have not tried to incorporate some of lisp's syntax as it is more efficient for linked lists I think. And I thought part of the reason for Rust's development was for very fast/efficient concurrency that i…

>>Io is a mash up of languages with speed similar to lua...

Please provide some examples that show Io speed similar to Lua.

Post reply on HN