• 0 Posts
  • 549 Comments
Joined 3 years ago
cake
Cake day: June 21st, 2023

help-circle
  • made me realize do we still need documentation of how a software work when a AI can easily explain it?

    I’ll respond for the sake of argument, but to put it bluntly: there are no stupid questions, just questions phrased stupidly.

    Documentation comes in many formats. There’s prose documentation split into articles and chapters, there’s video documentation, inline documentation for code, tutorials, training, and so on. Most things are documented several ways. This is because people learn things differently from each other.

    To remove documentation entirely and rely on only LLMs to document removes all of the ways that people might learn and narrows it down to only one form of documentation. Even if we ignore how fallible LLMs can be, having documentation in only a single format limits learning only to those who learn effectively through that format.


    In other words, relying only on LLMs for documentation discards all of the millenia of teaching strategies learned throughout the course of human history and puts it in the hands of a stochastic magic box that is incapable of recreating those strategies.





  • Is there actually any good evidence of that?

    Did you skip the first sentence or something?

    The survey shows a strong correlation between those who dislike AI and those who have negative emotions (exhausted, disillisioned, etc).

    You could argue the survey isn’t good evidence if you want, but what you quoted was a conclusion made from the survey data.

    Regardless, it’s pretty obvious that a polarizing topic would have a negative effect on many people’s mental health, and few things are more polarizing right now than AI.


  • The survey shows a strong correlation between those who dislike AI and those who have negative emotions (exhausted, disillisioned, etc). It’s making many people’s mental health worse.

    Outside of tech, AI is being used by doctors (including therapists) and often being fed patient data. Is this supposed to make mental health better? It doesn’t seem to be for most people, at least. But I’m sure the doctors claim it helps with their jobs.

    There are also services and apps that claim to be for mental health that rely entirely on LLMs. These have been around for years now, actually. I remember one of them turning into a sexting roleplay app at some point though because the LLM would completely unprompted lean into sexual roleplay lol.




  • I agree, on the past I had a proposal that the OS should have a device level API to provide this information, in this case apps and (the browser as an APP) would be able to consume this information from the device. And it’s up to the device manufacturer (or the OS installed) to add a age system.

    This, to some extent, already exists as law in the US. In some jurisdictions, the OS must soon request the age from the user and provide it to some applications. It’s not verification though, or at least it’s not required to be.

    Linux users could simply add a simple form with “I was born 01-01-1900” and everything would continue the same.

    This started a whole war over systemd even adding a field for it (not a form). If they added a required form, it would probably start WW3.

    But on the MicroSlop, Gargle and iPear worlds, they would be able to validate once and keep the information on the device.

    No thanks. I’m not validating, so I’d be picking up the next Motorola phone with GrapheneOS on it instead.

    Edit: to elaborate more, because the phone manufacturer is a third party and most likely sells or otherwise makes available that data to other third parties. It’s also a form of deanonymization through an untrusted party.


  • Their docs page just flat out doesn’t work on mobile, but based on the high level descriptions of the packages, these look like something I’d install on a project without asking and write in the AGENTS.md that it’s forbidden from using the more popular libraries in favor of those. (Our DS people, in general, can’t and won’t write code for shit, so it’s the only way to get them to use a new library.)



  • fearless_simd takes unsafe out of SIMD.

    No matter what level of abstraction you’re after, be it autovectorization and multiversioning, or portable SIMD, or safe access to raw intrinsics and nothing more, fearless_simd has you covered!

    Just adding some context. Seems like the v1 announcement, which is cool. It looks like a really useful crate, and I’m sure I’ve used it transitively at least once (based on the download count), though not directly yet.


  • Steve doesn’t really elaborate on the drawbacks to the features he listed, just kinda says he doesn’t like them. I’ll do some of that here:

    • Function overloading: overload resolution adds a ton of complexity to the language for a feature with API-friendly workarounds (use different names, builders, etc).
    • Default/optional arguments: can be confusing when the default value is initialized. For example, in Python, default values are static and reused across calls, meaning you can technically have def foo(a=[]), append to a on each call, and use that data on future calls to foo since the same list is provided as a default each time. In C#, default values are compiled into the caller’s code, meaning if the caller’s code was developed for an older version of a library and you use it with an updated version that has a new default, the caller will still use the old default. And so on, languages all handle defaults differently.
    • Named parameters: the article covers some of the biggest issues. There’s also the issue that API designers may not want their parameter names to be part of the API (consider the function is generated by a macro or build script, for example). Also, named parameters imply to new Rust devs that the parameters can be reordered, and it’s odd to have them without optional arguments as well. Then there’s the issue of code inspection (via macro or tool) if you can reorder parameters since you can only inspect source tokens, not query semantic information, so if parameters are reordered then it can become difficult to know which value goes to which parameter from the macro/tool.
    • Varargs: to be honest, I don’t really have a drawback for this in mind beyond them just being a fair bit complicated to implement. The C# params Foo[] args equivalent wouldn’t be very useful, but varargs with variadic types would be powerful, just I assume very difficult to implement (for example fn foo<...Ts>(blahs: Ts...) or something, where Ts is a variadic tuple). In any case, that’s a feature many libraries would take advantage of (axum, bevy, etc).


  • But how should any process know the variable of my script?

    Processes can touch any directory they have access to. There can be any number of reasons that a process might do this, from antivirus software (which somehow exists on Linux) to search software leaving index files everywhere to something that just for some reason modifies random directories. My point was that Bash can’t guarantee that none of this ever happens, though rm -rf "$TEMPDIR" would get around that and delete the directory anyway (and any lingering contents).

    Since you only seem to be worried about accidentally deleting the wrong directory due to mistakes while presumably debugging, this isn’t really as relevant as I was suspecting it was. For something more robust though, I’d normally recommend a recursive delete without following any links (in case something links to files you don’t want to delete, like ~ or something).


  • So I don’t see how a subprocess should be able to do that.

    I’m referring to any process being able to do that, subprocess or not. If you know that no process on the system can interfere with your directory in any way, then you can be confident that nothing else will touch it.

    Because what if I make mistakes in my own script and reassign $TEMPDIR by accident in a loop, instead reading from it. So at the time of execution of rm -rf, there is a chance that $TEMPDIR could potentially point to a different directory in example.

    Create another variable for use in the script, and only use $TEMPDIR for creating and deleting the directory then. As long as you are certain you don’t reassign it, then you know the value won’t change, and you can use a second variable to ensure you don’t do that by accident.


  • With Bash, you’ll only ever get “good enough” solutions. Even with your current setup, it’s susceptible to a race condition where another process adds to the TEMPDIR directory some other way during the script, and potentially even recreates tests after you delete it and before you remove the parent directory.

    Usually with Bash, the most readable solution is the best. I’d recommend a simple test for $TEMPDIR existing before a simple rm -rf "$TEMPDIR".

    However, I am very, very afraid of doing rm -rf in context of variables, in case the variable happens to become empty due to user error (or later changes in script).

    In this case, just test for this? Test that the variable is not empty and that the directory exists, then rm -rf the directory. No need to overcomplicate it.



  • Tailwind class soup is something I see often in LLM-generated code. For some reason, every starter template in existence decided to include Tailwind, and then the coworker generating this code (who doesn’t have frontend experience at all) just rolls with whatever the LLM shits out.

    I believe there’s a proper way to use Tailwind, but I can’t be bothered to read the docs for it. It makes far more sense to me to either use plain CSS or, if I’m using a component library, then whatever that library comes with for its theming system.

    Also, this whole article basically boils down to “use a proper theming system”, which it even admits can be as simple as some CSS classes with standardized names.