Live data from Hacker News

Rust is mostly safety

graydon2.dreamwidth.org

81–90 of 474 posts

Re: Rust is mostly safety

#81
post #72

> Modula-3, Eiffel, Sather Nice to see these languages on Rust's team radar, specially Sather. Just shows how you guys have researched prior work, congratulations.

It is funny he doesn't mention OCaml (because of his work with it). Yes OCaml has a GC but from what I recall it has a rather low overhead GC (in terms of latency. I need to find source but I remember it being impressive compared to others). I believe there was some attempts to incorporate some real time libraries but it was a long time ago.

Depending on what you define as system programming OCaml also has the whole bare metal Mirage OS [1] thing as well.

And of course OCaml is a pretty darn safe language (albeit its threading/concurrency libraries are fragmented so the safety is more type safety than concurrency).

[1]: https://mirage.io/

Re: Rust is mostly safety

#82
post #32

Earlier quoted context omitted.

> Currently Rust is about Go's age but nowhere close in usage. Citation? I see a lot of people talking about both, but not very many public projects in either. Rust at least has a "killer app" on the way in the form of Servo, whereas I haven't heard of any user-facing programs in Go.

FWIW, Go and Rust are 16 and 43, respectively on the TIOBE index: http://www.tiobe.com/tiobe-index/ A Github search turned up 2,658 Go repositories with more than 100 stars: https://github.com/search?l=go&q=stars%3A%3E100&type=Reposit... compared to 348 Rust repositories: https://github.com/search?l=rust&q=stars%3A%3E100&type=Repos... Notably, Docker has more stars than Go itself. Edit: you may also be interested in…

It's also worth noting that you're a bit less likely to see rust users because the kind of software that wants rust instead of golang tends to be the kind that gets written by a large company with deep pockets and a preference for closed source repositories.

Re: Rust is mostly safety

#83

The issue with safety is that nothing is really safe. Once you have some level of safety in your programming language, you realize that there are still a lot of other sources of hazard (hardware errors, programming logic errors etc.) So I guess, it would be better to say that Rust is about decreasing unsafetyness or whatever the correct word for that is. edit: since I see posts about Go, this is evidently another app…

Yes! Rust adds a way to manage it, in a two-tier system. There is `unsafe` marked code blocks and code without. The trusted code base has to be in the part marked `unsafe`.

It's simple (only the two tiers), but it is another tool for abstraction and managing complexity.

Re: Rust is mostly safety

#84
post #57
post #20

The original Rust author make great points about safety. I think this new thrust on marketing emerges from Rust Roadmap 2017 which puts Rust usage in industry as one of the major goal. Currently Rust is about Go's age but nowhere close in usage. As the roadmap says "Production use measures our design success; it's the ultimate reality check." I agree with that.

> Currently Rust is about Go's age but nowhere close in usage. Rust was released in 2015, it's merely one and a half years old, while Go was released in March 2012. If you count the inception period of Rust (pre-1.0) you should also count Ken Thompson's and Rob Pike's work at plan9, which doesn't make more sense … Fun fact: Go's first commit is 44 years old [1] ;) [1] https://github.com/golang/go/commit/7d7c6a97f815e…

It is not my intention to show Rust in bad light. I roughly mean to say both languages have put about 6-7 years of engineering effort by now but usage differs by an order of magnitude or so.

I agree that they had very different priorities in beginning and it changes with time. My goal was to merely point out core rust people in Mozilla and elsewhere now recognize that industry usage is an area of high importance in coming months/years in contrast to purely technical concerns of past.

Re: Rust is mostly safety

#85
post #47
post #42

Earlier quoted context omitted.

Even once is one time too many.

You didn't answer my question :)

I did so answer your question, you just don't like my answer.

If you expect me to go look at every single thing that they changed, I'm not doing that. This isn't a pissing contest.

Re: Rust is mostly safety

#86
post #65

Earlier quoted context omitted.

> Most people use stable Rust. However, many popular or important libraries like Serde or Rocket require the use of nightly. I recall the article a very short while ago on the front page that noted how Rust has effectively diverged into two languages, stable and nightly.

Serde does not require nightly, though it is nicer to use on nightly. That's the "will be stable as of the next stable release for Rust" I alluded to above. Rocket just came out; I think it's an extremely interesting library, but https://crates.io/crates/rocket shows that it's been downloaded 618 times. It hasn't exactly taken the world by storm yet. I think it shows great potential though! But it's not a good case o…

Over the last year of intermittently dossing around with Rust I encountered the need to use nightly regularly, with various crates refusing to compile (and usually I stopped my experimentation there as my barrier to entry was anything harder than pacman -S rust cargo). Yet I did not know until just now that Serde is moving off a dependency on nightly and it is encouraging that this is a trend with similar libraries; I stand corrected.

Re: Rust is mostly safety

#87

Earlier quoted context omitted.

Right. Go and Rust have completely different development models, so that wouldn't make any sense. To recap, in Rust, to make additions to the language: 1. Small additions mean make a PR. 2. Big additions mean make an RFC, then a PR if accepted. 3. These PRs go behind a feature flag that lets us track the feature, and only allows it on nightly. 4. People who desire the new feature try it out. (This is what you refer t…

Any idea when custom allocator will become stable? That's the only thing holding us to nightly.

I literally had a conversation about this yesterday. We need someone to champion the work. If that's you, we should get in touch.

Re: Rust is mostly safety

#88
post #81
post #72

> Modula-3, Eiffel, Sather Nice to see these languages on Rust's team radar, specially Sather. Just shows how you guys have researched prior work, congratulations.

It is funny he doesn't mention OCaml (because of his work with it). Yes OCaml has a GC but from what I recall it has a rather low overhead GC (in terms of latency. I need to find source but I remember it being impressive compared to others). I believe there was some attempts to incorporate some real time libraries but it was a long time ago. Depending on what you define as system programming OCaml also has the whole…

Yeah, Caml Light (OCaml's predecessor) was my introduction to ML family of languages.

All the languages on my snippet also have GC, but are less known than OCaml, maybe hence why he omitted it.

Re: Rust is mostly safety

#89
post #42

Earlier quoted context omitted.

Even once is one time too many.

No programming language, even C or C++ or Java, lives up to that standard.

ANSI Common LISP lives up to that standard. POSIX AWK lives up to that standard. C's versioning lives up to that standard. ksh93 lives up to that standard. All of those are backward compatible, and can churn through older versions of their own syntax with no problem.

But that's not the point, and you know it: the point is you guys were hacking like crazy, without any engineering. That's why the syntax of Rust is insane, and why the language is incredibly complex, and expressions ugly, even for the simplest of things.

And while we're at it: is there a formal specification for Rust, that would say, allow me to implement my own, standards-compliant compiler?

Re: Rust is mostly safety

#90
post #5

> countless lives lost I have no doubt that people have had their lives ruined, or even died, as the result of flaws in system programming, but is anyone actually tracking this? Is it "countless?"

No. Nobody is counting. That's why the OP said countless. "What have you done? That vase was priceless!" "Oh good, I was afraid it was expensive."

While that's a funny definition of the word, technically speaking the word "countless" does mean "too many to count".
Post reply on HN