Rust dev, I enjoy reading and playing games, I also usually like to spend time with friends.

You can reach me on mastodon @sukhmel@mastodon.online or telegram @sukhmel@tg

  • 0 Posts
  • 164 Comments
Joined 1 year ago
cake
Cake day: July 3rd, 2023

help-circle

  • To be fair, I disagree with all the points author makes, except for performance which is important but may be less important than code clarity in different cases. I am surprised that exceptions perform that well, and I am surprised the author said that compared C++ exceptions to Rust results, but actually did the right thing and compared C++ exceptions with C++ expected first. I thought it was going to be one of those “let’s compare assembly to lisp”





  • you never know what code your function or library calls that can produce an exception

    As far as I remember, there were several attempts at introducing exceptions into type system, and all have failed to a various degree. C++ abandoned the idea completely, Java has a half-assed exception signature where you can always throw an unexpected exception if it’s runtime exception, mist likely there were other cases, too.

    So yeah, exception as part of explicit function signature is a vast improvement, I completely agree







  • It’s the number of the signal sent, 9 is for SIGKILL. You can send various signals with kill, and depending on how application was made it may react on all signals with dying, or meaningfully process most of them. Afaik, SIGKILL can’t be processed by the app, and it always means just that: “die already”.

    Checked in Wikipedia, that’s about right but there are more details I left out, mostly because didn’t know about them, too: POSIX signals






  • So, you’ve got no issues with “g” being sometimes kinda “h”, “j” being same kind of “h” always, “h” not being a sound a all, “d” sounding like “th”, and “z” sounding like “th” but another “th”, not the one for “d”. Oh, and “c” sounding either like “k” or like the latter “th”

    I know some people that claim that everyone should use Latin alphabet, because you then know what things sound like, but that is the most bullshit take I ever heard. I guess that knowing how to write letters helps, but it looks like every other language pronounces those letters different, and English makes extra effort to pronounce different even the same things




  • I see now, that you were misunderstood in some parts.

    even if I got reported a really weird bug related to UB, I should (I am not experienced enough to make a claim) be able to know it’s UB since the game’s gonna crash when I try to recreate the bug in Debug.

    This may be problematic for several reasons: it may be hard to reproduce, the more complicated the state, the harder; bug may rely on some race condition that may be much rarer in Debug because of speed difference; UB is notorious for causing things that should (seemingly) never happen, like returning from infinite loops, proving false statements true, and such, so it may be hard to understand what at all happened and why.

    Regarding optimisations, it might still be better to try to profile the code (I will be honest, I don’t do that until the moment when I can’t go further without optimisation, and I haven’t reached that with Rust) and see what are the real hot spots that require optimisations. I hope that someday you will be able to upgrade your machine, and hope that your game will be a good example of something that really runs anywhere