• 1 Post
  • 23 Comments
Joined 1 year ago
cake
Cake day: July 24th, 2023

help-circle
  • performance

    Like raw runtime performance, if I write the code in python, it’s ~ 100x slower than in Rust. You often get away with dumber stuff in Rust as the compiler is able to optimize it well. With python you would have to write your native bindings either in Rust/C or C++. So why not straight use Rust (as the other choices aren’t sa(f/n)e at this point anymore).

    Afaik you can just go to definition in literally any language, typing or no.

    No you can’t, at least not in the same way that a static type-system allows. As dynamically-typed programs are evaluated on runtime, so you often don’t know at the time while coding what is run. In untyped/dynamically typed languages you often use heuristics to jump into stuff, which is just less precise.

    There’s more to this, but I think you get what I mean, when you programmed more intensively with static generics in Rust (compared to something similar in say javascript or python without types), IDE experience is just more precise and correct (and more fun).


  • Nah it’s also a language matter. People complain about Rusts complexity, meanwhile I complain about everything else in other languages, and am faster than in any other language, not necessarily because writing code is faster, but because I am able to just focus on writing code. I cannot tell that about other languages, because e.g. the packaging system is bad, or configuring an environment, or debugging stuff which a strong type-system would have caught already. Also IDE experience I think is the one thing that keeps me away from dynamic languages. Rust analyzer is so much better than anything else I’ve tried, and it keeps getting better (e.g. recently it was added to show whether a trait is object safe or not, and why it is not).

    Another thing that is often missed when comparing static with dynamic languages is just performance, python heavily relies on stuff written in a system language, as soon as a hot-loop is written in python, things get bad


  • I haven’t, but everytime I try python I want to quit it so quickly because of the messed up packaging system and more importantly IDE experience (and I don’t think unless you are extremely disciplined with type annotations, that you’re getting even close to rust-analyzers performance). I enjoy just exploring dependencies with go to definition, and the trust I can have in the type system.

    I’m swearing everyday in my job about typescript, which is just javascript with leaky and unnecessary complex type annotations. So yeah I even consider typescript bad (and I doubt that python is better with type-checking).






  • I mean I can just take a job in the states, they pay quite a bit more there compared to Europe, and it can be even more targeted in the area of my interest (low-level stuff in Rust which pays even better than what I can find here)… Locally the jobs are pretty limited (at least those that interest me)… Everyone wants Java/C# or JS devs here (all languages I’ll try to avoid, and I suspect it has to do with maintaining old (tech-debt) code-bases which I try to avoid even more)… But I’m quite happy with my team currently and just have rant about JS everyday, but at least don’t have to maintain tech-debt (at least not something that I haven’t produced myself^^)… And I get great food for free… Hmm trade-offs.







  • This! I feel it myself, my ADHD was much better when I stayed in a relatively natural setting with only little technology. for a few weeks (I did some programming there though, and boy was I focused in complex problems without medication etc. had one of my best coding sessions there I think). I’m pretty sure that a lot of ADHD but also other psychiatric issues like autism or social anxiety etc. that is diagnosed these days is because of all this unhealthy environment we have created. Or in other words, our modern technology promotes psychiatric issues such as ADHD, autism, social anxiety etc.




  • Rust has exactly the same problems with depreciation as many Frameworks rely on experimental features which are subject to change.

    Rust has actually quite a good record with depreciation and backwards-compatibilty etc. They are changing the language in non-backwards compatible way over editions, but the changes are mostly very manageable.

    But to not end up being another C++ (syntax-wise it’s a disaster IMHO), a few non-backwards-compatible changes every few years are the way to go, when it’s manageable.


  • Learning curve is steep in the beginning, I agree (I wouldn’t argue painful though, maybe if you have to unlearn bad practices, like interior mutability though etc.).

    But I think it pays off after some time. I’m now faster in Rust than in C# with similar experience, and the quality of the code is definitely higher as well (which can be credited to the strict kinda opinionated design of Rust IMO).

    It composes really well, better than most (non-functional) popular languages. I think this is probably the Sell for Rust, as it additionally works remarkably well over the entire stack (kernel -> frontend) (in each abstraction level might be better/easier to use languages to be fair though).



  • I’m not speaking for Rust level performance. I’m using Rust nowadays, because it’s generally doing a lot right, that other popular languages struggle with IMO.

    Think about error handling. I think even Java is better here than C#. I think it’s quite a mistake, not being required to add all possible exception types that a function can throw to the function signature.

    Then the next thing, I really hate about almost every popular language is implicit null. To be really safe, you have to check every (non-primitive) variable for null before using it, otherwise you have a potential NullPointerException.

    Then take pattern matching, this is a baked in feature of Rust from the beginning and it does this really well (exhaustive matching etc.). There’s “basic” pattern matching in C#, but it just doesn’t really feel right in the language, and is not even close in capability compared to Rusts.

    All of this (and more) makes Rust the less error-prone language, which I can say with confidence after long experience with both of these languages (both > 5 years).

    I’m honestly not sure why exactly C# was chosen for most of the games, but it’s probably because it’s relatively good to embed, is relatively strong-typed, while being somewhat performant (compared to something like python or other scripting languages).