2

something I wrote in JavaScript built on top of the exact same API as has been reproduced in rust by a library now

rewrote it in rust but 1/5th the features cuz lazy

has three times the bugs as the original version... like... before my bug fixing

is it rust. is rust the problem

Comments
  • 4
    JS-heads are a funny bunch.

    Every time that someone says something bad about JS, they are quick to point out that the tool is never the problem and the dev is to blame.

    But when they write something in a language that they are less familiar with than JS and it’s buggy, then suddenly the language is to blame.
  • 2
    Well, never underestimate the work that you did before. Rewrites are always underestimated.
  • 2
    @Lensflare An equivalent of 'It must be the hardware issue.' I've heard so many times before.

    /* It almost never was. */
  • 1
    @Lensflare js is easy to use so I don't understand what problems there is to be had to begin with
  • 1
    @Lensflare a lot of things seem to be buggy in rust

    I broke tui for no reason

    reqwest just hangs all the time and I worked really hard to solve that one for months

    in JavaScript things weren't buggy though. there was just data you shoved in the wrong location because you forgot something but that was pretty mild

    idk what to do with these other things
  • 1
    @jestdotty another funny thing that JS-heads do is assume that when someone complains about JS, it must be because they don’t understand it or/and it‘s too hard for them.

    "Problems" in JS are never about complexity or the lack of understanding.

    I have pointed this out so many times now and I don’t want to compile a list of what is wrong with JS again.
  • 1
    @Lensflare I don't see how JavaScript could be too hard

    at any rate. rust rust rust
  • 1
    Objectively speaking, yes. Rust is the problem. The very same problem it's trying to solve. Solving a problem with a worse problem is the Rust way. Unlike e.g. Python, which tries to solve a single problem with several smaller problems, Rust solves several medium problems with a single humongous one. Then tells you to rewrite your codebase anyway, preferably using a different architectural paradigm, because the current one isn't memory-safe when run in a loop for eleven thousand years.
  • 0
    @cprn can't even run rust code a few thousand times without some unexpected thing happening, sigh
  • 2
    You can't port something 1:1 from JS to Rust, that won't work well

    I think the major problem is that you are way too deep in the object oriented mindset. Trying to code like that in Rust leads to pain and tears

    (as for reqwest hanging, im still pretty sure it's your liberal use of Arc<Mutex<>> which deadlocks your program, so don't use that!)
  • 1
    @cprn You have literally zero clue what you are talking about

    Rust solves a GIGANTIC problem which is low level systems programming without memory unsafety and UB

    That's an insane goal to have and Rust miraculously did it
  • 1
    @12bitfloat WHAT MINDSET IS RUST
  • 0
    @jestdotty Hard to put into words

    But essentially try to make your logic into a tree starting in your main function instead of having a decentralized graph of objects which act independently

    More like the C-ish mindset instead of Java-ish mindset

    Of course that's easy to say but hard for me to give you specific tips
  • 1
    @12bitfloat ok I concluded that in a blog post once in JavaScript / all languages really

    looked like it but yeah

    easier said than done. to be fair it was just a random intuitive thought and I never really practiced it. sign

    bevy makes rust so easy... too spoiled rn playing with a roguelike instead 😒
  • 1
    @jestdotty Bevy is great. Can also become pretty complex though!
  • 1
    @12bitfloat say you, would you be interested in a time waste called screeps. if you are I would wanna see what you come up with 👀

    I built basically an everything web app for work over 3 years. all the features of an operating system, decentralized and applied to multiple different machines like a system administrator, and allowed you basic operating system access to these machines among a bunch of proprietary software and etc. everything was extensively unit tested and it was my baby and amazing

    then I played screeps and I learned a fuckton about JavaScript I never knew. so I view screeps as a very good training course to rip one's own hair out about their ideas, expertise, etc. like a challenge arena where if you wanna learn something well, well there you go

    sooo 😏

    everything I seen so far on GitHub (screeps, rust) has been a disaster in my eyes 😩
  • 0
    @12bitfloat like making a menu that's both controlled by keyboard and mouse... ffs
  • 1
    @jestdotty Never heard of screeps, i will check it out
  • 1
    @12bitfloat I can recommend Screeps as well.

    You can also use Kotlin (transpiling to JS).
    It works pretty well.

    @jestdotty Kotlin is probably more convenient than rust.
  • 1
    @Lensflare rust btw gets compiled to wasm, then in JavaScript you just call that

    but all my previously JavaScript solutions just kept making me ragequit whoops
Add Comment