7 ms·
For anyone excited about this project: The repo does not contain a compiler yet. It's just an intention to build one.
by mark_and_sweep 4y ago
For anyone excited about this project: The repo does not contain a compiler yet. It's just an intention to build one.
- discardable_dan 4y agoI really hope they don't follow the rustc 'OO' style of defining passes as traits. Pattern matching gives incredible tools for compiler pass writing, and the ideology of Rust compilers is ripe for being brought into the fold of OCAML-style compiler patterns.
- samwillis 4y agoAnd submitting a post to HN with the format “{something popular} rewritten in Rust” is always going to go straight to the top, even is they haven’t completed it yet, or maybe never will. The interesting thing here is really the reaction from the HN community, not the incomplete implementation. Having said that, this is a brilliant project.
- pjmlp 4y agoTo be fair, anyone that has been long enough in HN has seen the same with Ruby, CoffeScript, Erlang, Haskell, OCaml, Closure,... Eventually it pans out and gets replaced by something else.
- samwillis 4y agoQuite right, HN in incredibly susceptible to “fashionable” tech. Now that Zig has a significant VC backed flagship project, I suspect Zig will be the new Rust to HN. I would also add that rewriting something that exists in a new language is both a brilliant way to learn that language but also, if the language is still evolving, feed back improvements to the language itself.
- OtomotO 4y ago> Now that Zig has a significant VC backed flagship project What did I miss this time? Would you please elaborate?!
- wip_limit 4y agoProbably, https://oven.sh/ https://oven.sh/ ? (They have raised $7m from KP for https://bun.sh/ https://bun.sh/)
- IshKebab 4y agoI dunno, Zig feels like a big step forward from C, but also a step back from Rust. I'm not sure the people who have already moved from C++ to Rust will want to go back to debugging segfaults.
- brabel 4y agoWhile you're right about Zig being a step back from Rust, a lot of people are not willing to make the large step to go from C to Rust (maybe from C++, the step is much smaller, but Zig is in the C league, not C++). I think it will be successful despite that, because we've seen this happen before in other ecosystems... e.g. Scala was a large step away from Java, while Kotlin is a much smaller one, and in a way, you could also describe it as a step back from Scala. Yet, despite being younger, Kotlin has already surpassed Scala according to some rankings and has some major projects already (maybe more than Scala) investing heavily on it, like Android and Gradle. Perhaps, another example is Elm... much simpler than Haskell or PureScript, but it seems to be by far the most popular functional language on the frontend. Finally, I've written some Zig and definitely didn't feel like I have to debug a lot of segfaults... the tools to avoid that problem are already pretty good (the debug memory allocator is almost as strict as the Rust borrow checker and will keep you on check!) and even having little experience manually managing memory, I was able to get stuff done quite easily (unlike with C which I do find extremely dangerous on my own hands).
- pjmlp 4y agoFor me, Zig is Modula-2 with C syntax, and some cool metaprogramming capabilities, much better than C will ever be, but I expect something better than what a 1978 systems programming language was offering in regards to safety (or NEWP from 1961 for that matter). I guess in the end should be happier that more Zig and less C gets written.
- zozbot234 4y agoRust is a lot simpler than C++ or Scala. It has some upfront complexity wrt. C or Zig, but that pays off when dealing with larger programs, where avoiding subtle bugs becomes much harder.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- math-dev 4y agoSounds like a misleading headline then…”rewritten” implies it has been done :(
- lsllc 4y agoYes, most of the .rs files in https://github.com/pintariching/rustle/blob/main/src/compiler/parse/ https://github.com/pintariching/rustle/blob/main/src/compile... are empty. I was looking as I've been using the nom [0] parser combinator create to build an experimental compiler and I'm curious to see how other Rust compiler projects are doing parsing. [0] https://github.com/Geal/nom https://github.com/Geal/nom