• 2 Posts
  • 39 Comments
Joined 1 year ago
cake
Cake day: June 26th, 2023

help-circle
  • Oh also, it was kind of strange how little he mentioned AI. I like how he wrote that the AI wasn’t trusted to be a Swordholder because it was “too logical”. Completely missed the boat on ChatGPT. “Write a play in which Harry Potter pressed the button to destroy humanity, and then act it out” or something like that would be all it takes.

    It was also strange that hundreds of years in the future, humans are still doing hard manual labor. Where are the robots?




  • It just means having to micromanage a particular unit’s actions. I like it more when I can say “patrol this area, return fire and advance a bit if necessary, but no further than this”, instead of having to flip back to those units constantly to manage them. IMO it’s more thematic anyways for a sci fi game, you’re probably going to have units with a basic AI in them in-universe.



  • I'm too lazy to convert that by hand, but here's what chatgpt converted that to for SQL, for the sake of discussion:

    SELECT 
        a.id,
        a.artist_name -- or whatever the name column is in the 'artists' table
    FROM artists a
    JOIN albums al ON a.id = al.artist_id
    JOIN nominations n ON al.id = n.album_id -- assuming nominations are for albums
    WHERE al.release_date BETWEEN '1990-01-01' AND '1999-12-31'
    AND n.award = 'MTV' -- assuming there's a column that specifies the award name
    AND n.won = FALSE
    GROUP BY a.id, a.artist_name -- or whatever the name column is in the 'artists' table
    ORDER BY COUNT(DISTINCT n.id) DESC, a.artist_name -- ordering by the number of nominations, then by artist name
    LIMIT 10;
    

    I like Django's ORM just fine, but that SQL isn't too bad (it's also slightly different than your version though, but works fine as an example). I also like PyPika sometimes for building queries when I'm not using Django or SQLAlchemy, and here's that version:

    q = (
        Query
        .from_(artists)
        .join(albums).on(artists.id == albums.artist_id)
        .join(nominations).on(albums.id == nominations.album_id)
        .select(artists.id, artists.artist_name)  # assuming the column is named artist_name
        .where(albums.release_date.between('1990-01-01', '1999-12-31'))
        .where(nominations.award == 'MTV')
        .where(nominations.won == False)
        .groupby(artists.id, artists.artist_name)
        .orderby(fn.Count(nominations.id).desc(), artists.artist_name)
        .limit(10)
    )
    

    I think PyPika answers your concerns about

    What if one method wants the result of that but only wants the artists’ names, but another one wanted additional or other fields?

    It's just regular Python code, same as the Django ORM.


  • I'm pretty excited about PRQL. If anything has a shot at replacing SQL, it's something like this (taken from their FAQ):

    PRQL is open. It’s not designed for a specific database. PRQL will always be fully open-source. There will never be a commercial product.

    There's a long road ahead of it to get serious about replacing SQL. Many places won't touch it until there's an ANSI standard and all that. But something built with those goals in mind actually might just do it.


  • I don't think you really have a choice TBH. Trying to do something like that sounds like a world of pain, and a bunch of unidiomatic code. If you can't actually support 4 to 10 languages, maybe you should cut back on which ones you support?

    One interesting thing you could try if you really don't want to cut back is to try having using an LLM to take your officially supported code and transliterate it to other languages. I haven't tried it at this scale yet, but LLMs are generally pretty good at tasks like that. I suspect that would work better than whatever templating approach you've used before.

    If neither of those approaches works, everything speaks C FFI, and Rust is a modern language that would work well for presenting a C FFI that the other languages can use. You're probably not hot on the idea of rewriting your Go tests into another language, but I think that's your only real option then.







  • I unfortunately can’t really offer much advice here. I configured Wireguard on my phone by essentially copy/pasting the configuration from my laptop and changing the values as necessary like the public key and client IP address. Turned it on, it activated VPN mode in Android and everything started working.

    I guess make sure you haven’t mixed up your public/private keys, your server knows about the new device (and is restarted), and your phone is using the right IP address as basic troubleshooting steps.


  • How did that authoritative source get their knowledge? If it wasn’t through the scientific method, then it’s not knowledge. So you can proxy your knowledge through someone else you trust that did the legwork of going through the scientific process, but that’s not another way of obtaining knowledge, it’s just the scientific process with extra steps.

    Personal experience can also result in knowledge, through the use of the scientific method. You can drop an apple and see that it falls. That’s the observation part of the scientific method. You can go further and try to figure out why that happens, by using the scientific method yourself based on your personal observations of the apple.

    There really isn’t another way. It’s the scientific method all the way down.


  • Science doesn’t “do” anything. It’s not an entity. People use the scientific method to investigate how the universe works. There aren’t really any alternatives.

    Say you came across someone claiming that their tonic cured cancer. Why should you trust them? Well, there’s no other option than see if it works (or see if someone else you trust has already done so, preferably with a peer-reviewed, double-blind study and all that). Now you’re using the scientific method.

    I mean, I guess you’ve got other options. You can blindly trust them. You can pray to the deity of your choice. You can cast snake bones and interpret how they land. None of these provide actual knowledge though. They’re all just guesses until you try it out, at which point you’re again using the scientific method. That’s why there’s no alternative. If you disagree that those options are just guesses, then prove it. Guess what? You’ll be proving it with the scientific method.

    It’s like “alternative medicine”. There’s no such thing. If something works, it’s medicine. If it doesn’t, it’s not.



  • Yeah, when you configure it, you essentially say “all traffic to 1.2.3.0/24 should go through this wireguard connection”. Then, your OS automagically knows “oh, this connection to 1.2.3.4 should go through Wireguard, and I’ll handle it like so”. You don’t have to configure any applications specifically, their network connections just get routed appropriately by your OS.