Live data from Hacker News

I Hope Rust Does Not Oxidize Everything

gavinhoward.com

141–150 of 195 posts

Re: I Hope Rust Does Not Oxidize Everything

#141

I just cloned the Starship repo and cargo --release built it and it took six minutes and 30 seconds (which did feel interminable). The author says it takes him 15 minutes "for building just the main.rs", 10 minutes for "lib.rs" and an unspecified time for "everything else". My CPU is from 2012 . What on earth is he doing this on, a TI-83? Or am I missing some intricacy of whatever Gentoo is doing that would inherentl…

Rust doesn't play quite as nicely with Gentoo's packaging system as C/C++, but yes, that seems excessively long.

Then again, I'm fairly sure I have starship installed via `cargo install`, not via portage (Gentoo's packaging system).

I'm a Rust and Gentoo lover :D

Re: I Hope Rust Does Not Oxidize Everything

#142

Earlier quoted context omitted.

As far as I know Gleam is the only strongly typed language on BEAM, which is important to me since I don't like dynamically typed languages. But of course Elixir gets optional types now.

Is that the only difference?

It can also compile to JavaScript (instead of the BEAM) so you can use the same language for backend and frontend work.

Re: I Hope Rust Does Not Oxidize Everything

#143
This argument is always so divided into very thoroughly mine-protected trenches it’s insane.

The anti-rust crowd treat the language like it has more boilerplate than JavaScript and that it’s the most complex language out there while offering no benefits, which just isn’t true. It’s a great language with a lot of features that are huge advantages over C/C++.

The rust evangelists treat it like it’s the second coming and that you’re literally killing babies if you aren’t letting the language enforce its paradigms on you. The forced safety the language offers is a great feature in 2024, but it is not a be all end all thing - there are plenty places where it just isn’t necessary and creates more work for the programmer. The argument is also usually “everything should be rust” but the moment you point out a use case where its advantages don’t matter, they say “well the rewrites only need to happen for ” - that then means everything doesn’t need to be rust, no?

Like most things, the correct path is somewhere in the middle. I personally don’t like Rust’s syntax, generics, not being object oriented, etc - but that’s just my opinion and is no more valid or invalid than the next. At the end of the day, use the language you like most and are comfortable with, as long as you understand the benefits and drawbacks of each.

- Signed, a Kotlin evangelist

Re: I Hope Rust Does Not Oxidize Everything

#144
post #132

>the syntax. It’s ugly. [...] I would prefer something that is less sigil-heavy. That's also one of my gripes with Rust. Very sigil heavy makes it hard to google syntax elements. What's the name of the `|` glyph? Especially challenging if you know the name of the glyphs in your language but not in necessarily in english. Double challenging for glyphs with several accepted names But in the end, I'm big enough to reali…

This might be useful https://doc.rust-lang.org/reference/tokens.html#punctuation

That doesn't seem to explain 'lifetimes or turbo::, though.

Re: I Hope Rust Does Not Oxidize Everything

#145

Rust is certainly not the last word in systems programming languages, but it's an huge leap forward from C and C++. To be honest, it's a sad reflection of our industry that it's taken this long to get basic safety + ML circa 1975 language features into this niche. If things had turned out a little bit different we could all have been using OCaml for the past few decades.

People reject OCaml for these use cases due to the GC, but I wonder if this actually matters in practice. The optimizations that can be applied to ML languages (see MLTon for example) are very advanced and the ability to do multi core with ease (I know this is more recent to OCaml) can be a big performance unlock that is very hard to get right in C.

The GC does matter.

Most applications are completely fine with having a garbage collector, but they are not fine with having multiple garbage collectors! Mixing multiple garbage collected languages is a recipe for complex bugs. At a minimum, reference cycles across the languages will result in memory leaks.

Thus every garbage collected language tends to grow its own ecosystem of libraries, with the whole world having to be re-implemented in that language. The only exception are the C/C++/Rust libraries, as these can be used (through C FFI interface) by almost every other language. This is precisely because these languages do not introduce their own heavy-weight runtime (especially: no GC), allowing them to be combined with another language's runtime.

Thus widely used libraries must be written in one of the non-GC languages, even if 100% of the applications using them are fine with having a garage collector.

Re: I Hope Rust Does Not Oxidize Everything

#146

The post doesn't seem to mention certain parts of the community, which is basically my main issue with Rust. You can't even mention that bootstrapping the compiler is a process that's way too convoluted, because you get buried to oblivion ("why would you need that"). Thankfully there are some already, though incomplete because (I'm guessing) Rust being mostly defined as "whatever rustc outputs" doesn't help reduce th…

> The post doesn't seem to mention certain parts of the community, which is basically my main issue with Rust.

Mine too, but my post implied it, and it was already too ranty.

Re: I Hope Rust Does Not Oxidize Everything

#147
post #36

I'll bite: What specific parts of rust syntax do people find so ugly? I keep hearing this from decent chunks of people who don't write rust, but the language doesn't seem that far off C to me. It's certainly no haskell.

Here's my litmus test: read the source aloud. Over the phone to a person who doesn't see your screen, if needed. Did you have an obvious, understandable, and simple pronunciation for everything, that wasn't just reading ASCII characters one by one?

Now pretend the other person is a smart and experienced programmer, but has never heard of Rust. How would they write down what you just told them, without any idea of Rust's syntax? That's the non-ugly version of Rust.

Re: I Hope Rust Does Not Oxidize Everything

#148

Maybe that will sound banal to some but C would be so much more enjoyable to me if it had a "cargo" system and no implicit imports.

That's the problem with C. It cannot have a sane cargo like system. The language is not built for writing libraries. There is a reason why everyone keeps reinventing the wheel when it comes to datastructures in C. Where is STL for C?

you could use the Zig build system as your C build system. See https://zig.news/kristoff/make-zig-your-c-c-build-system-28g...

Re: I Hope Rust Does Not Oxidize Everything

#149

The author seems very anxious because Rust is getting traction and they don't like Rust. They're afraid that one day Rust will become a "monoculture" and everything will be written in it. I like Rust, but I consider this very, very unlikely. Rust has actually brought more choice to the programming language scenario. If we're talking about monoculture, let's talk about C/C++. For decades this was the only viable optio…

IMO there was only a brief period of monoculture, and only if you consider C & C++ to be part of the same culture, which is a stretch. It started in the mid-80s when people stopped writing programs in Pascal and/or assembly, and stopped in the mid-90s when Java & Perl started to get used extensively.

I was talking about a monoculture specifically in the systems programming area. Java, Perl, PhP, Python, Ruby, JavaScript, C#, Go, these got popular but they use garbage collection and have limitations for systems programming. C and C++ were the only options for a long while.

Re: I Hope Rust Does Not Oxidize Everything

#150

@gavinhoward Just FYI, a couple of links in the article are broken: * The "incomplete list" of C UB currently points to the Rust spec vision * The link labelled "unreasonable programming language" currently points to the Gentoo Wikipedia page * The "Starship" link points to the House Wiki page on Vicodin

Ack! That is what I get for writing a post quickly while drunk on sleep fatigue late at night.

And the rantiness comes as a side effect of that.

Fixed, Thank you!

Post reply on HN