• 0 Posts
  • 266 Comments
Joined 2 years ago
cake
Cake day: June 25th, 2023

help-circle

  • Both java and go seem excessively complex at runtime for fundamental system utilities, featuring garbage collection. Rust, on the other hand, keeps the complexity in the compiler and source, keeping the runtime code simpler. And of course it’s doing that while trying to make it easier to manage memory and harder to make mistakes, without forcing extra runtime logic on you.



  • I think most of the work is in the fact that there often isn’t an “equivalent call”, and it can be quite a lot of code to make it work. One funny thing is the whole esync-fsync-ntsync issue, where synchronization is done differently on Linux and on windows, and translating it was a big performance hit, and difficult to do accurately. If I understood correctly, esync, fsync and ntsync were a series of kernel patches implementing additional synchronization code in the kernel, with ntsync actually replicating the windows style.




  • Framework let you swap everything

    I think there’s still a pretty big asterisk on that, because laptop parts are generally not built to be swappable… So I don’t think you can swap the CPU without the rest of the mainboard, and some parts like the CPU cooler are probably tied to the specific variant of mainboard and need to be swapped together if you want to switch CPUs.

    They do let you swap out parts that are reasonably swappable, so it’s pretty much a guarantee you’ll be able to upgrade storage and memory, and even where you can’t swap to different parts they make sure you can replace broken parts more granularly, so it still seems like a good deal.




  • Now it seems every tutorial I see is really just clicking around in a gui. Very little actual typing of code, which is the part I actually find cool and interesting.

    Not sure where you’re seeing “just clicking around in a gui”, but if you like computer games, there’s some fun gameplay you can have while coding. Some of those very much contributed to my experience.

    BitBurner is a free idle incremental programming game, where you write scripts to hack things to make money to begin with, progressing onto both progressively more complex mechanics (how about automating a manufacturing corporation with a script?) and utility scripts to automate things you’ve been doing manually.

    If you like Minecraft, there’s fun to be had with ComputerCraft, scripting things in Lua. With some add-ons (Plethora IIRC) you can access chest inventories via cable and transfer items between them, and set up your own fully automated storage system with recursive autocrafting, as just one example.

    Or how about modding games - if there’s a Unity game you enjoy that doesn’t use IL2CPP, like Risk of Rain 2, it’s very moddable using C# and interacting with Unity APIs, and for advanced stuff modifying the underlying IL that C# compiles to. Quite a lot you can learn, and if you stick to pure code mods to begin with, not that hard to get started - though code mod means nothing like new items, new enemies, new characters, buildings etc. since adding models/textures/sounds tends to be more involved.







  • I, for one, value even this mundane history of low importance, and appreciate knowyourmeme for documenting the origin, development and variations of memes.

    It’s a shame peoples’ creations and ideas are stolen with no credit under the excuse of memes just being like that, but that’s not a fight I could win, so trying to document that information seems like the best we can do.


  • The issue with Lua’s and/or in this context is that they don’t work if false or nil are valid values. In a and b or c, if b = false, the result is always c.

    I also love null-related operators like ?? and ?. for this, since they explicitly check for null, letting you handle any non-null values for optional/default values. The syntax can get a bit cursed, like maybeNull?.maybeMethod?.(args) in JS, but I still prefer that to writing out multiple field accesses in an if condition… And arguably the code is only less readable if you aren’t acclimated to it.

    All that said I do really appreciate Lua’s simplicity, as a language that provides tooling to create the features you want instead of building them into the language, though I wish it had some conventional regex instead of its own patterns.



  • That actually sounds like a fun SCP - a word that doesn’t seem to contain a letter, but when testing for the presence of that letter using an algorithm that exclusively checks for that presence, it reports the letter is indeed present. Any attempt to check where in the word the letter is, or to get a list of all letters in that word, spuriously fail. Containment could be fun, probably involving amnestics and widespread societal influence, I also wonder if they could create an algorithm for checking letter presence that can be performed by hand without leaking any other information to the person performing it, reproducing the anomaly without computers.