Live data from Hacker News

Dave Herman’s contributions to Rust

brson.github.io

141–150 of 174 posts

Re: Dave Herman’s contributions to Rust

#141

Earlier quoted context omitted.

Under the current framework, you cannot get wealthy off of salary. If you working a wage, then you are a corporate slave most of the time.

I don't know what your definition of corporate slave is, but you can certainly become wealthy off a salary. Just limiting to software engineering (there's other lucrative fields out there) you can easily make a six-figure income remotely. This gives you the freedom to live somewhere with very low cost of living. It's not hard to build wealth this way. You could debate that getting the necessary skills to get a job li…

> This gives you the freedom to live somewhere with very low cost of living. It's not hard to build wealth this way.

This is quite contradictory and proves my point.

Re: Dave Herman’s contributions to Rust

#143

> Hiring Yehuda Katz to design Cargo I did not realize this; that explains why cargo is so similar to ruby bundler (which Katz also wrote).

He also worked on Yarn. Yehuda Katz has probably the most experience of anyone on dependency management

I haven't heard much from him lately not sure what he's up to.

I'd love to see an interview with him on his experiences with dependency management. What did he learn? What things in earlier attempts did he change in later attempts (from bundler to cargo to yarn)? What does he think he got rightest? What mistakes does he think he made? What mistakes does he think other people are still making? What features of a language or platform faciliate or challenge good dependency management? etc etc etc.

In general, I think there isn't much "learning from prior art" in our field that crosses language/platform boundaries. Katz being personally driving the implementing popular dependency management solutions on three different langauges/platforms was one way to actually learn from cross-language experience! I think in dependency management in particular, there are still a lot of lessons people are learning on their own not realizing another language/platform already learned some painful lessons on it... or maybe differences in langauges/platform mean some things aren't transferable...

Re: Dave Herman’s contributions to Rust

#144

Having written Racket code myself I was surprised when I saw that Rust had Hygenic macros. I've never learned how to use macros effectively, but once I've gotten more comfortable in Rust I'd like to give it a good shot. Given Dave's background with Racket and Macros, this feels like a worthwhile endeavor. On a side note there are a lot of cool language oriented programming stuff that Racket does through it's macro sy…

I was super-surprised when I used rust macros (specifically macro rules) about how lispy it was.

There was an aha-moment when I realised that it was token based and not AST based like some other macro systems I've worked with in some other languages.

Case in point is how to express varargs in macro rules which is expressed roughly like a comma followed by an expression repeated n times. Super nice.

Re: Dave Herman’s contributions to Rust

#145
post #39

Earlier quoted context omitted.

Let is definitely confusing given that JS has let and const (with let being mutable)

But that is cross-language, which is not ideal but not an internal problem if you work in one code base. (O)Caml also has `let` and is quite a bit older than JS.

C# uses “var” to mean “infer the type”, nothing to do with mutability or not.

“Let” feels like some in-joke, coming from a math via lisp heritage of “let k be any number...” to distinguish it in English from the surrounding writing. I have to guess that in early lisp (= k 5) would be an error as k isn’t defined and (k 5) errors because k isn’t a function and (let (k 5)) comes out of need for a binding function and why not “let”.

In c-like languages “k=5” is an established binding that both programmers and compilers can deal with. What does “let k=5;” add to Rust over “k=5;” ?

Re: Dave Herman’s contributions to Rust

#146
post #93
post #76

Earlier quoted context omitted.

First let me say: I like Rust. I'm a fan. But... it did make some early decisions that are going to be hard to shake off, most notably around build times. This [1] is well worth a read. [1]: https://pingcap.com/blog/rust-compilation-model-calamity

I'm so torn about macros. They are awesome but they make compile-time arbitrarily bad. The D compiler is roughly as fast as the Go one. However, D has macros though and that makes it very slow to compile sometimes. The alternative to macros are code generators. Works fine for bigger stuff like a parser generator but not for smaller stuff like a regex.

> The D compiler is roughly as fast as the Go one...

Not according to this benchmark:

https://github.com/nordlow/compiler-benchmark

dmd performed around 1.5x to 4x faster than go.

Re: Dave Herman’s contributions to Rust

#147
post #76

Earlier quoted context omitted.

First let me say: I like Rust. I'm a fan. But... it did make some early decisions that are going to be hard to shake off, most notably around build times. This [1] is well worth a read. [1]: https://pingcap.com/blog/rust-compilation-model-calamity

Yeah, the build times. How does a normal Rust developers development environment look like? Do you have to rebuild after each change if you want to try out the change itself, after you've written tests and so on? How is the REPL experience if there is one? My only experience with Rust so far has been trying to learn it by writing applications in it and also use 3rd party CLIs, but quickly loosing interest because the…

> How does a normal Rust developers development environment look like?

In my experience, you write some code, the rust analyzer (which is easily embedded in an IDE like VSCode or IntelliJ - which has its own "analyzer" I think) gives you immediate feedback, so you know immediately if things compile or not (there are a few edge cases the analyzer might miss, so when you actually run "rustc" something doesn't compile, but it's pretty rare)... you then write a little test , and Rust has many ways of letting you do that (unit tests right into the same file as the code being tested, integration tests which let you use the code as if from another crate, and even doctests, which are like unit tests but embedded in the documentation of your code)... running the tests is a matter of pressing a button and waiting a few seconds (compilation + test runtime) normally, unless you change dependencies between runs as that requires downloading/compiling your code AND the dependencies, which can be very slow (dozens of seconds)... which is the same problem as with a fresh build, which will almost certainly run in the minutes because of the necessary local compilation of all dependencies... but the experience is not very different from something like Java or Kotlin IMO (but definitely a slower cycle than Go, for example).

Re: Dave Herman’s contributions to Rust

#148
post #108

Earlier quoted context omitted.

It's better to evaluate at compile time, if possible, rather than runtime. The biggest issue with macros is code bloat, but every serious general purpose language should have them.

I think a problem is that programmers have little intuition about about the evaluation time of macros. It's possible that Zig's approach helps here -- since the metalanguage is just the language, you can take some of your intuition about performance along to compile time. And the macro language is not weirdly restricted, so you can write something you're more used to, with similar idioms. In the limit this is clear:…

Macros and compile-time function evaluation are different and fill different roles. Macros define new syntax, while compile-time function evaluation evaluates expressions written using the existing syntax. The corresponding Rust feature for the latter is not macros, but rather "const fn".

Re: Dave Herman’s contributions to Rust

#149

The OP mentions in passing that Brendan Eich "was solidly on team Rust" prior to leaving Mozilla, but adds no further details to that intriguing statement. Wouldn't that make Eich the Most Unrecognized Contributor? I don't think his name would be on any commit repo, after all.

>I don't think his name would be on any commit repo, after all.

Not only his name is on the Rust commit repo, he's also in the list of top 10 commiters the article features as an early Rust development example (although for just 6 commits or so).

Re: Dave Herman’s contributions to Rust

#150
post #47

> A little appreciated fact: Rust was largely built by students, and many of them interned at Mozilla. The article doesn't mention it but this is of course a very good long term strategy. Things students learn during their formative years at university will bear fruit once they enter the work force. How many of those students are now at or about to enter important positions in the industry? Do you think Java could ha…

The converse is also true: students are relatively less fettered by today's "best practices", less constrained by non-academical pursuits, and thus would be more capable of dreaming up a better paradigm for the future.
Post reply on HN