𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍

       🅸 🅰🅼 🆃🅷🅴 🅻🅰🆆. 
 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍 𝖋𝖊𝖆𝖙𝖍𝖊𝖗𝖘𝖙𝖔𝖓𝖊𝖍𝖆𝖚𝖌𝖍 

Ceterum Lemmi necessitates reactiones

  • 4 Posts
  • 897 Comments
Joined 3 years ago
cake
Cake day: August 26th, 2022

help-circle






  • If that’s the only error mechanism, sure. Exceptions in most languages tend to be relatively expensive, though, and most have a cheaper idiomatic way of returning error codes; you’d want to use those if they’re available, right?

    Does Rust use exceptions a lot? I don’t know. V has panic and catch, but you almost never see them. Idiomatic is Option (?) and Return (!) values, which I thought V borrowed from Rust. Go does the (val, error) tuple-ish return thing, and while it too has catchable panics, they’re discouraged in favor of (error) return values.

    Depends on the language. “Higher level” is a pretty broad field!






  • My recommendation is to put all of the variables in an environment file, and use systemd’s EnvironmentFile (in [Service] to point to it.

    One of my backup service files (I back up to disks and cloud) looks like this:

    [Unit]
    Description=Backup to MyUsbDrive
    Requires=media-MyUsbDrive.mount
    After=media-MyUsbDrive.mount
    
    [Service]
    EnvironmentFile=/etc/backup/environment
    Type=simple
    ExecStart=/usr/bin/restic backup --tag=prefailure-2 --files-from ${FILES} --exclude-file ${EXCLUDES} --one-file-system
    
    [Install]
    WantedBy=multi-user.timer
    

    FILES is a file containing files and directories to be backed up, and is defined in the environment file; so is EXCLUDES, but you could simply point restic at the directory you want to back up instead.

    My environment file looks essentially like

    RESTIC_REPOSITORY=/mnt/MyUsbDrive/backup
    RESTIC_PASSWORD=blahblahblah
    KEEP_DAILY=7
    KEEP_MONTHLY=3
    KEEP_YEARLY=2
    EXCLUDES=/etc/backup/excludes
    FILES=/etc/backup/files
    

    If you’re having trouble, start by looking at how you’re passing in the password, and whether it’s quoted properly. It’s been a couple of years since I had this issue, but at one point I know I had spaces in a passphrase and had quoted the variable, and the quotes were getting passed in verbatim.

    My VPS backups are more complex and get their passwords from a keystore, but for my desktop I keep it simple.





  • Yeah, for me it’s more that just “produces correct output.” I don’t expect to see 5 pages of sequential if-statements (which, ironically, is pretty close to LLM’s internal designs), but also no unnessesary nested loops. “Correct” means producing the right results, but also not having O(n²) (or worse) when it’s avoidable.

    The thing that puts me off most, though, is how it usually expands code for clarified requirements in the worst possible way. Like, you start with simple specs and make consecutive clarifications, and the code gets worse. And if you ask it to refactor it to be cleaner, it’ll often refactor the Code to look better, but it’ll no longer produce the correct output.

    Several times I’ve asked it for code in a language where I don’t know the libraries well, and it’ll give me code using functions that don’t exist. And when I point out they don’t exist, I get an apology and sometimes a different function call that also doesn’t exist.

    It’s really wack how people are using this in their jobs.




  • I mean, you’re not wrong. I don’t think it’s as simple, and again it’s because of AIPAC. Money greatly influences elections in the US, and AIPAC has a bunch of it, while the anti-genocide group coughed up relatively none. Politicians are going to be scared of AIPAC threatening to throw all their money into their opponent’s war chests. It’s a kind of “hate the game, not the player” situation, except that I don’t really believe that slogan: politicians should have stronger ethics. But when it comes down to brass tacks, and you believe that you’re going to sacrifice a seat to Republicans by digging in your heels on Gaza because a well-funded special interest group is going to side with your opponent, it’s not a black and white decision.

    It should be. It should be more simple, but it won’t be as long as money plays such an outsized role in politics.