Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)EP
Posts
28
Comments
2,583
Joined
5 yr. ago

  • I work as a software engineer and honestly, it's ridiculous how often I'm asked to or tempted to violate the laws of physics.

    There's classics like measuring how long it takes to send a network packet from one device to another – you can't, because the two devices might have wildly different understandings of what time it currently is. The only way to get an accurate measurement is by measuring how long it takes to send it there + back (a.k.a. the round-trip time).
    And then you divide that by 2 and pretend there's no asymmetry in transmission speed, nor delay between the other device receiving it and sending it back. 👍

    In our previous project, we were recording audio chunks of one second each and then feeding it into a detector. At some point, we got asked, if we could reduce the delay until the user gets feedback from the detector. Also, we can't make the detector detect things more often, because it might make more mistakes. Alright, I guess, I'll just break up the time continuum then and give the user feedback before it has finished recording. 👍

    And now in our current project, we're supposed to send network packages across the globe and also we basically can't have any latency. Yeah, so there's this thing called the speed of light/causality at about 300000 km/s. Halfway around the globe is about 20000 km. That leaves us with 66.7 ms of latency, at its theoretical minimum. Guess I'll just quickly invent a way to create worm holes, no problem. 👍

  • Well, Mint is still one of the top recommendations for new users. It gets support for the newest hardware at a bit of a delay, so if you wanted to follow suit with your new gaming PC, it might not be as great of a choice for that for now, but for your laptop, that's what I'd recommend, if you're not looking to experiment.

  • It is, yeah, but you can also use it to host a static webpage: https://codeberg.page/
    Personally, I use it together with mdBook, so I write my texts in Markdown and then get a webpage with search and such. There's lots of "static site generators" out there which do something similar.

    It's a little tech-y for what you're hoping to do, but you could make use of the code tooling for collaboration. People could open issues, if they just want to make a suggestion, or they could create a pull request with a concrete change.

  • This is a very mild violation, but I like to play these puzzles: https://www.chiark.greenend.org.uk/~sgtatham/puzzles/
    ...except that I create a custom difficulty level which is quite a step below the easiest difficulty and then I almost rather speedrun the puzzles.

    The Rectangles puzzle at 5x5 size has been my crack for the past months and I'm at about 13 seconds now (using my phone as input).

    I mean, it's very casual speedrunning. No one cares about my time, so I actually never timed myself before just now. But yeah, I just like the different challenge of thinking fast rather than complex.

  • Are other auto code documentation tools better? I always figure, it's mostly a matter of leaving out the details to make it understandable. And that's kind of a hard thing to find heuristics for.

  • I was gonna say that I have to sometimes refer to it as "RJ45” port, because we actually also work with differently shaped Ethernet ports. Then I decided to look up, if that's specifically the name of the plug or of the port as well.

    And Wikipedia is immediately like, oh yeah, the scrubs refer to it as "RJ45", when it was really named after the "RJ45S" standard. But that standard actually describes a specific, obsolete wiring configuration of what's really an 8P8C connector.

    Never change, Wikipedia. 🙃

  • Personal pet theory that may also play into it: Trans people are also often in information security roles. Potentially, because when you have to hide your real identity, you start to get good at it.
    And Rust also has various security benefits, especially when compared to C, but also when compared to garbage-collected languages (race conditions are largely prevented).

  • Ah, right, because of google.com and google.co.uk and such. The search engines I use, don't have the money for so many domain names, so it's just a UI selection. 🫠
    With the address bar rework, you could register both of them as a search engine and then simply select the other one to change language/region.

    Copying the URL could be problematic, yeah. I don't have the update yet, so I wouldn't know, if it's something real simple like just right-clicking the address bar. If you really do need it, then it should still be possible to browse to the search engine's webpage directly and issue your query via the search box on the webpage.

  • There's always been a tendency of folks reading programmer humor to be beginners rather than seasoned devs. I think, there's just more of those in general, as there's lots of fields where entry-level coding skills are good enough...

  • Yeah, I doubt WebAssembly when executed in a browser will become multi-threaded anytime soon, since JavaScript is single-threaded just as well. If you need multiple threads, you need to use web workers. Haven't done anything with those yet, but I'd assume them to be usable from WebAssembly as well, since the whole JavaScript API seems to be accessible.

    Well, and in Rust, I'm pretty sure the runtime that's typically used for async stuff (tokio) will produce a compile error, if you try to enable the "multi-thread" feature flag on the WebAssembly target.
    But yeah, might be more of a problem with other languages.

  • Well, part of the problem is that web apps themselves are kind of alien on the web. The web is generally document-based. Web apps take the document format and try to turn it into something it's not.
    There's a way to not do the JavaScript, but it doesn't fix things being document-based and it can be argued that it makes other things worse in some respects.

    I'm talking about WebAssembly. Basically, you can write your web app in HTML+CSS+Rust and then the Rust part is compiled to WebAssembly, which then takes the role that JavaScript would normally take. It does not have to be Rust, lots of languages can be compiled to WebAssembly, but Rust has the most mature ecosystem for that, as far as I'm aware.

    In principle, it is also possible to use WebAssembly to render directly to a pixel buffer, but that's really rather heavyweight and not terribly responsive, so not generally done, unless you implement a game¹ or similar.
    Alright, so back to the document mangling approach. There's various frameworks available for Rust. I've used Leptos so far. There's also Dioxus and Yew and probably others.

    Advantages:

    • Don't have to write JS.
    • Can write Rust. Rust has some concepts that mesh really well with frontend dev, like the Result and Option types for error handling, which you can pass directly to your rendering stack and it can show either the data or the error (or nothing).
    • Can use the same language in backend and frontend and therefore also get compile-time checks that the two work together.

    Disadvantages:

    • The ecosystem is young. You will find barely a fraction of the component libraries as you can find for JS.
    • Rust also has concepts which don't mesh well with frontend dev, like the whole memory management concept. Those frameworks bypass that or make use of it in clever ways, but things can be a bit peculiar or overly complex at times.
    • WebAssembly is sent to the browser in one big blob, because it's a compiled program. This means you get somewhat of a loading time when first loading the web app. There's ways to mitigate that with "hydration" strategies, but yeah, still a thing.
    • While JS is often minimized/uglified and therefore not readable anyways, WebAssembly makes that even more of a reality, because it is essentially assembly code that's sent to the browser. It does still call the same APIs under the hood as JS does, so content blocking shouldn't be affected, but yeah, can't try to understand the code itself. This can also make debugging during development somewhat more painful.
    • Well, and it's also yet another web standard that browsers have to support. It doesn't make browsers simpler in the sense that suckless would like.

    I've listed a lot of disadvantages, so just to point out that, yes, to me, the advantages are absolutely worth it. But I can totally understand, if others see that differently.

    ¹) See, for example, Bevy and this UI example in particular.