[-] FizzyOrange@programming.dev 3 points 1 month ago

Yes! On a tablet with a Bluetooth keyboard. Should I not want to for some reason?

[-] FizzyOrange@programming.dev 3 points 1 month ago

Yeah it's definitely a vast improvement on previous attempts (Poetry et al).

I dunno if it can be called solved until it's officially sanctioned and installed by default though, and I don't see that happening for a very long time.

[-] FizzyOrange@programming.dev 3 points 2 months ago
  1. If your alternative is C++ then it removes the enormous burden of manually tracking lifetimes and doing manual memory management. C++ does have RAII which helps with that enormously but even then there are a gazillion footguns that Rust just doesn't have - especially with the newer stuff like rvalue references, std::move, coroutines etc. It also saves you from C++'s dreaded undefined behaviour which is everywhere.

  2. It has a very strong (and nicely designed) type system which gives an "if it compiles it works" kind of feel, similar to FP languages like Haskell (so they say anyway; I've not used it enough to know). The borrow checker strongly pushes you to write code in a style that somehow leads to less buggy code. More compiler errors, but much less debugging and fixing bugs.

  3. The libraries and APIs are generally very well designed and nice to use. If you've ever used Dart or Go think how nice the standard library is compared to JavaScript or PHP. It took C++ like 2 decades to get string::starts_with but Rust started with it (and much more!).

  4. Fast by default.

  5. Modern tooling. No project setup hassle.

  6. It's a value based language, not reference based. References are explicit unlike JavaScript, Java, C#, etc. This is much nicer and makes things like e.g. copying values a lot easier. JavaScript's answer for ages was "serialise to JSON and back" which is crazy.

Downsides:

  1. Slow compilation sometimes. I'd say it's on par with C++ these days.

  2. Async Rust is kind of a mess. They shipped an MVP and it's still kind of hard to use and has unexpected footguns, which is a shame because sync Rust avoids footguns so well. Avoid async Rust if you can. Unfortunately sometimes you can't.

  3. Interop with C++ is somewhat painful because Rust doesn't have move constructors.

Great language overall. Probably the best at the moment.

[-] FizzyOrange@programming.dev 3 points 2 months ago

That's a lot easily than learning the C to the same level and they "force" everyone to learn C.

[-] FizzyOrange@programming.dev 3 points 2 months ago

Presumably you could just buy that paper size? They're pretty similar sizes; printers all support both sizes. I've never had an issue printing a US Letter sized PDF (which I assume I have done).

Kind of weird that you guys stick to US Letter when switching would be zero effort. I guess to be fair there aren't really any practical benefits either.

[-] FizzyOrange@programming.dev 3 points 3 months ago

Those sensors are pure trash. Use SHT-75 or SHT-85 if you actually care about getting a real value. More expensive though.

[-] FizzyOrange@programming.dev 3 points 4 months ago

I think it will take much longer than that. There is so much legacy C++ code. Maybe 10-15 years.

[-] FizzyOrange@programming.dev 3 points 4 months ago

no need for flatpack/appimage/snap ect

No matter how large their repo is you're always going to find some software they haven't packaged. Trying to convince the entire world to use your repo isn't scalable.

[-] FizzyOrange@programming.dev 3 points 4 months ago

That's not at all the conclusion you should draw. xz was linked into systemd but that was just a convenient target. Once xz was compromised it could have targeted literally anything that loaded it. Your only real defence would have been not to install it at all.

[-] FizzyOrange@programming.dev 3 points 4 months ago

There's two things:

Deno: this is a replacement for Node and NPM and prettier and some other tools. So one aspect is that it's a more modern Node, using standard web APIs instead of Node specific stuff. And the other aspect is it is more streamlined modern tooling - no node_modules, no complicated build steps, built in Typescript support, etc. In fact you can use a single file as a script, similar to Python.. but unlike Python you can use third party dependencies, which makes it fantastic for stuff like CI scripts, etc. where you might have suffered with Bash or Python before.

Fresh: this is just a web framework targeting Deno. Honestly I haven't used it much but I really like what I've seen so far. I always found React to be confusing and overkill for most sites, which should really be rendered server side, but also I really like the way you can compose components with JSX/TSX in a real language with full type checking. Fresh gives you both!

[-] FizzyOrange@programming.dev 3 points 6 months ago* (last edited 6 months ago)

You're still limited by lambda expressions though. And in general the language is still statement based, not expression based. You can't do a = if foo then x else y type things (except for the one-off and backwards x if foo else y; they were so close!).

[-] FizzyOrange@programming.dev 3 points 7 months ago

Yeah I have to second UnfortunateShort. Benchmarking papers are on average very bad, often because they're trying to push a particular idea or product and are very biased, or because they're like "my first benchmark" and done by people who don't know what they're doing.

A classic one that gets referenced a lot is "Energy Efficiency Across Programming Languages" I which the authors seriously benchmarked programs from the very heavily gamed Computer Language Benchmarks Game, and concluded among other things that JavaScript is much more energy efficient than Typescript.

The only realistic way to benchmark different languages is to take implementations that weren't written to be fast in a benchmark. For example Rosetta Code, or maybe leetcode.com solutions.

Or to do it yourself. But that requires you to be experienced in many languages.

Difficult for obvious reasons.

view more: ‹ prev next ›

FizzyOrange

joined 1 year ago