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

help-circle

  • Oh sweet baby Jesus. That is some astonishing code for validating the title and body of a PR.

          - name: Create PR message file
            run: |
              mkdir -p /tmp
              cat > /tmp/pr-message.txt << 'EOF'
              ${{ github.event.pull_request.title }}
              
              ${{ github.event.pull_request.body }}
              EOF
    

    Put a single-line EOF in your pull request body, follow it up with a completely arbitrary set of Bash commands, whatever you damn well like, put all the environment variables with the repository secrets into a webhook request and send them off somewhere, make sure you terminate it with another cat > /dev/null << 'EOF' to match the other EOF. Now you can compromise the entire project by raising a pull request.




  • The ability to do some basic calculations is what was missing in CSS from the start, IMHO. You don’t want paragraph text to be too narrow or too wide as it would become unreadable, so a rule like “at least 20 ems, and then whichever is smaller of 100% or 80 ems centered on the page”. But that required either really convoluted layout and rules, or just to work it out with JS after the page is loaded.

    Would have been even better if we’d got Donald Knuth involved in the early CSS efforts, with some LaTeX-like attention to the details. There’s no reason that computers can’t render beautiful text, but it’s rare for one person to be an expert typesetter and an expert programmer.



  • The ‘traditional’ way of storing a database is on a mainframe or supercomputer, where all the information is stored in tables with the information all uniquely stored, frequently containing id references to other tables. For instance, an ‘orders’ table would have a customer id in it, and the ‘customer’ table would have their name and address. The programming language for databases like that is SQL - PostGres and Oracle are examples. That model gives you a lot of advantages - the data is always consistent, changes are either made completely or not at all - but every query has to go through one machine, so performance can suck, and you waste a lot of time ‘joining’ tables together for certain kinds of query.

    If you’re storing eg. a blog with comments on it, that model doesn’t make sense. Each page has a varied selection of comments, comment will have a username and maybe their icon, which will rarely change, but will need to be evaluated by the database every time. It would make more sense to output the pre-rendered page as a JSON blob, and you could have a hundred machines with a few pages each to share the load. Updating people’s icons and adding new comments would need to be done by telling each machine to make a certain update if they’ve a copy of that page; you’d ‘eventually’ be consistent, but if you don’t care about that then you get a very scalable robust solution quite cheaply. Examples of such ‘NoSQL’ databases are MongoDB, Hadoop and DocumentDB.

    Linux foundation have looked at DocumentDB’s license and said ‘yes, free enough for us’, so they’ll adopt it.








  • Ritardando = slowing down, it’s a tempo notation.

    pp = pianissimo (very soft), mf = mezzoforte (medium strong). One of my old conductors would say “it’s not about volume, it’s about feeling”, so intensity is a good word, although it often refers to volume. One of the main jobs of the conductor is making sure the music is interpreted in a way that fits the venue; pianissimo can be quite loud (but ‘soft’) in a big auditorium.

    Die doesn’t mean anything - at least, not too me as a violinist. Might just be a percussion instruction to let the sound die away, rather than muffling it.


  • I have a Tuxedo Pulse 14 gen 3 as my personal laptop, was looking for something with a bit more display resolution than my old 1080p machine, but did not like the price of 4K laptops.

    It has been superb for over a year now. Came with Tuxedo’s own Linux, which looked pretty but wasn’t for me. Installed Arch on it, has been rock solid. Is a great machine for coding on, makes a great job of running Dwarf Fortress and less stressful 3D games - Crusader Kings 3 and Disco Elysium run great, for instance. Battery life impressive too.

    Been quite robust, too - heard complaints that the lid can get a bit loose but mine’s fine. All the rubber feet have come off the bottom, but that’s probably because I use mine on my lap. They prefer that you install their own fan control app rather than eg. just providing drivers so that you can set it up in CoolerControl, but it works fine.

    All in all, good machine. Better than the ThinkBook that it replaced, and those are fine laptops.



  • addie@feddit.uktoGaming@lemmy.worldFuckin nuisance
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 months ago

    I dunno how common a use case that would be. I’ve a laptop that makes a great job of Dwarf Fortress but gets a bit hot and choppy when doing 3D, and a gaming desktop for ‘everything else’. I certainly don’t want those settings synchronised. My friends with Steam Decks like the cloud saves but need to set lower settings than their ‘main computers’. Strikes me as unusual to have multiple machines with roughly equal capability, unless you’re an internet cafe from the 90’s and have multiplayer Doom set up.



  • You are not joking. Comparing a $2000 Purism Liberty with eg. a $200 HMD Fusion. The Fusion has somewhat better screen and battery; much better processor and camera. More RAM, the option of more storage, has NFC. It’s also designed to be easy-to-maintain, but is somewhat thinner and lighter despite having a larger screen area. Are ‘made in USA’ and ‘open-source drivers’ worth paying 10x as much for a noticeably worse phone? (It’s not really ‘made in USA’ either - it’s a mix of US, Chinese and Indian parts assembled in the USA.)

    I think that the people who believe a US-made iPhone will also cost $2k are kidding themselves - economy of scale and all that, but it must be substantially more.


  • Yeah, mine was similar. Had some old Win95 machines from work that were getting thrown away; scavenged as much RAM as possible into one case and left Red Hat Linux downloading overnight on the company modem. Needed two boxes of floppy disks for the installer, and I joined up a 60 MB and an 80MB hard drive using LVM to create the installation drive. It was a surprisingly functional machine - much better at networking than it was as a Win95 computer - but yeah, those days are long gone.