• 15 Posts
  • 1.62K Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle


  • Ephera@lemmy.mltoRust Programming@lemmy.mlLearning Rust
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 hours ago

    Yeah, it’s a bit of a stretch goal. 🙃

    When I learn a new language, I like to implement the Sieve of Erastothenes (which is a simple algorithm for finding prime numbers), and I had done so with Rust. Two years or so later, I looked back at that code and thought, damn, that looks like a Java dev wrote it.

    Then I realized the most idiomatic way of implementing that would be an iterator. This was actually an interesting challenge, because typically Sieve of Erastothenes uses an upper bound, which I didn’t want to have.
    But yeah, it was also just wild to me, how much different the iterator code looked (and in many ways, how much better it was). It was just really cool to see, how much I had progressed in those two years.





  • Not quite in the spirit of this post, but I managed to complete Dungeon Crawl Stone Soup for the first time this year. It’s been my favorite game for a few years now, but it’s a roguelike and doesn’t allow for many mistakes, so lots of starting over.

    That is also the complete list of games I completed this year. I started replaying Thomas Was Alone, but somehow the platforming passages were a lot more frustrating to me, so haven’t finished it…







  • I mean, he announced it as:

    I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu) for 386(486) AT clones. This has been brewing since April, and is starting to get ready.
    […]
    It is NOT protable (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that’s all I have :-(.

    So, yeah, he wasn’t exactly claiming he’d revolutionize the world…




  • It’s ‘minified’, in case you’re not familiar with that. Basically, many webpages come with such obscene amounts of JavaScript, that it genuinely impacts how quickly the webpage downloads. And then replacing such amenities as whitespace or readable variable names with just 1 space or 1 letter, where possible, genuinely improves on that.



  • Ephera@lemmy.mltolinuxmemes@lemmy.worldLinux and Chill
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 days ago

    I would not throw Rust and C together in this.
    Rust is low-level in terms of being usable for kernel and embedded development (due to not needing a runtime), but it’s rather high-level in terms of the syntax offering lots of abstraction from the weirdness of the hardware.

    Some of that not-needing-a-runtime does bleed into the syntax, but in my opinion, it’s still higher level from a syntax perspective than Bash et al, because it brings in many functional aspects.

    I guess, I’m also just bothered by you saying, you don’t ‘need’ Rust for writing CLIs, when it’s my favorite language for this.
    To some degree, I do just find it ridiculous to launch a whole runtime when the user just wants the --help, but the argument parsing in Rust is also just really nice: https://rust-cli.github.io/book/tutorial/cli-args.html#parsing-cli-arguments-with-clap



  • Ephera@lemmy.mltolinuxmemes@lemmy.worldLinux and Chill
    link
    fedilink
    English
    arrow-up
    25
    arrow-down
    1
    ·
    3 days ago

    Did he actually say that he likes it? My impression was that it’s not his comfort zone, but he recognizes that for the vast majority of young programmers, C is not their comfort zone. And so, if they don’t hop on this Rust train, the Linux kernel is going to look like a COBOL project in a not too distant future. It does not happen very often that a programming language capable of implementing kernels gains wide-spread adoption.