• 4 Posts
  • 62 Comments
Joined 2 years ago
cake
Cake day: June 16th, 2023

help-circle
  • OneCardboardBox@lemmy.sdf.orgtoLinux@lemmy.mlPlug-and-play development environment
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    3 months ago

    I set up a very straightforward Godot dev environment yesterday using toolbox which is built on top of rootless Podman.

    • Create a new fedora toolbox
    • Enter toolbox
    • Install DotNet dependencies, git, etc with dnf
    • Install Godot binary from release page
    • Turns out there were other dependencies I needed
    • Godot wanted a few Wayland libs on the container, so I installed Weston (maybe overkill)
    • Godot wanted libxrandr so I added that too
    • Godot just works ™

    The nice thing about toolbox is that it uses my native host Wayland compositor. So whatever I have running in the toolbox can be interacted normally through sway (my host WM).

    You can either distribute a container image with your given toolbox configured, or just document the setup steps.


  • Eh, maybe. Back during feudalism, emancipation of serfs was also considered theft from the nobles who owned the land (and thus the serfs who worked it).

    Sometimes governments implemented programs to reimburse the nobles for losing “their” serfs, and sometimes not. Now that we’re a couple centuries removed from that drama, we generally accept that the destruction of feudalism was a good thing, regardless of whether it was theft.




  • I think a simple approach would be:

    • read a chunk of the response into a char array of known size
    • iterate through the buffer, looking for the CRLF characters that signify the end of the header section
    • copy the header into a dynamically-allocated char array
    • if you didn’t get to the CRLF characters that signify the end of the header section, read more data from the socket into the known-size char array
    • if it takes multiple read operations to get through the header section, then each read you can allocate a longer header string, copy your old data to it, and then append the next chunk
    • when you hit the CRLF, or if read indicates no more data is waiting in the socket (eg connection terminated early) then you can throw a null character at the end of your string and that’s the headers

    This is a somewhat naive implementation. Instead of reallocating and copying the header string array for each read, a linked-list data structure could hold the chunks of buffered data. Then at the end you combine them into a string that’s exactly the right size.










  • The problem with chromebooks is that the base specs are pretty shit. A lot of them have 4 GiB of RAM and maybe 16GiB of disk if you’re lucky.

    They were designed to be thin clients to connect students to the internet, and little else. Maybe they could be hacked into something useful, but I don’t think it’ll ever make a good PC. They were always destined for the landfill.

    Meanwhile, the best thinkpads were quality machines back when they came out. IMO, that’s why they’re still so versatile today. Free software can’t fix bad fundamentals.


  • is it dishonorable to find loopholes in the rules of the honor culture

    Dueling culture in 18th and 19th century Europe was commonly organized around concepts of “gentlemanly honor”. Even back then, people recognized the need for loopholes.

    Consider the case of two friends who got drunk at a tavern, each one declaring how much they loved the other. Eventually, one friend goes overboard “I love you more than you know!” to which the response is “But that cannot be, for my love of you is infinite!”. Soon this becomes an argument over who loves the other more, and eventually they have to settle their friendship like gentlemen: With swords at dawn. If they’re smart and sober up in time, their seconds will work out a solution before the fight, but there are cases recorded where the friends kill each other because honor trumps love.

    There were also loopholes which worked to favor the person that society already deemed more “honorable” (wealthy, connected, liked, etc). It was generally accepted that a gentleman of certain standing could honorably refuse another’s challenge to duel if their social stations were different. Think a “new money” banker’s son challenging a minor nobleman over a loan that’s due. It simply wouldn’t look good to have some commoner slaying an aristocrat, even if said aristocrat was an asshole.



  • Not sure what motherboard you have: Most consumer boards only support “FakeRAID”, which requires a kernel driver to actually function. Good luck finding a vendor who wrote a driver for Linux.

    I’d definitely recommend software RAID instead, as you’ll have better support. I like btrfs, so I’d recommend you set up your new drives to use a btrfs RAID configuration. mdadm is another option, if you really like ext4.