• 1 Post
  • 322 Comments
Joined 2 years ago
cake
Cake day: June 15th, 2023

help-circle


  • It’s mostly about throwing ACID at the problem, sqlite just happens to be battle-tested to a ludicrous degree, it’s light enough to not be unconscionable overhead in simple situations (unless you’re on embedded), and performant enough to also deal with nastier situations so I prefer it over some random K/V store with the same guarantees. It’s also a widely-used and stable data format which might come in handy.

    That said, if you want to go lightweight do consider good, ole, POSIX filesystem guarantees, in particular that mv is atomic (as long as you stay on the same filesystem but that’s easy to ensure by mv’ing within a directory). That’s not durable on its own, you’ll need to fsync for that, and consistency and integrity is up to your code.





  • I’m not even Christian what would I care about depictions or inspiration being “problematically Pagan”.

    What I can say is that it’s unlikely that much of the parallels (like the Osiris thing) existed before Rome became Christian as over in staunchly monotheist Palestine people wouldn’t have taken inspiration like that, while turning multiple gods into one sounds quite reasonable for a people going from polytheism to monotheism.

    For modern Christian, I think, the question is “How much did the Romans change”. That is, how different was early, pre-Roman, Christianity to what’s now considered authoritative, like the Bible, which wasn’t brought down from a mountain by Jesus.


  • Sol Invictus, in particular it’s also where the halo in depictions comes from… which isn’t really “other sun gods”, it’s in particular the Roman sun god. Misremembered the resurrection part, that’s Osiris who isn’t a sun god and the Horus parallels have been shown to be bunk, aside from getting nursed by Mary depictions being inspired by Horus getting nursed by Isis.



  • Yep the birth of Christ just coincidentally coincides with the end of Brumalia, which of course noone noticed when the emperor suddenly insisted everyone become Christian and had the bible written by committee. And it’s of course a coincidence that that was (back in the day) exactly the winter solstice. And it’s also just a coincidence that Jesus’ life story has quite some parallels to that of earlier sun gods from the general area.

    Most current Christmas traditions are more Germanic in nature, though, e.g. the Christmas tree. While in the current form a quite recent invention, decorating the house with evergreen stuff was common through the ages – branches, wreaths, not whole-ass trees. The needles btw are fine smudging material don’t just sweep them away.



  • I try not to and if I have to I’d use string interpolation. I’m not even sure whether you’re pulling my leg right know, I literally don’t remember whether they have a string append operator.

    Like 99.999% of the sh I ever wrote was in Makefiles and short wrapper scripts which could just as well be aliases. No argument handling past $@, no nothing the language is just too fickle for me to bother dealing with. The likes of zsh are make-up on a pig, I think I had a quick run-in with fish but never really got the hang. Nushell is different, it’s actually bold enough in its changes to get rid of all the crufty nonsense.


  • So can any TLD holder. The rules for .org might change to disallow individuals. .com might outlaw non-profits. .net might get restricted to ISPs. There is a small, but existent, chance that all the oxygen molecules in the room I’m in are going to decide that they’ll huddle up in some corner, leaving me to suffocate. I refuse to worry about it.

    If you want to be paranoid like that you can send the rust foundation some money and tell them to spend it on the .rust and .ferris gTLDs.


  • Unlikely, and even more unlikely to not be able to be worked around by a local rust user group.

    Like, the .eu restriction to only give out domains to individuals and companies within the EEA is more about having a domestic contact than anything else, EURid doesn’t care who actually uses the domain just that it has European legal representation.


  • Pre- and post-increment are only really useful when you’re doing C-style looping and there’s a good reason we don’t do that in Rust.

    I actually honestly can’t recall ever making an off by one error in Rust, I’m sure when implementing specific data structures or when doing pointer manipulation it’s still a possibility but you can write a gazillion lines of code without ever running risk of that particular annoyance. Also while C folks may have an argument regarding operator semantics, C++ folks don’t they’re doing unspeakable things to <<.

    Also, FWIW Haskell uses ++ to append lists and therefore also strings. It’s not like it’s an odd-ball usage of the symbols, that’d be .. which I vaguely remember some language using. Would cause a whole new class of confusion regarding 'a'..'z' vs. "a".."z". Not to mention that "aa".."zz" actually makes sense as a range all that’s missing is &str: Step. Probably not a good idea to have built-in because do we mean printable ASCII? Whole unicode range? Just the alphabet? Not an issue when you’re doing it to single chars but strings get ambiguous fast. Does Rust even guarantee stuff about Char ordering C certainly doesn’t really do that, short of I think 0..9 being contiguous.


  • Rust has impl Add<&str> for String and impl AddAssign<&str> for String. Both append as expected.

    I wouldn’t go so far and say “as expected”: “Addition” implies that we’re dealing with a ring, that there’s also multiplication, and that really doesn’t make sense for strings (unless you indeed consider them numbers). It’s why Haskell’s Monoid typeclass comes with the function mappend, not madd.

    In Rust’s defence though std::ops traits aren’t meant to carry any semantics they’re about syntax: It’s called Add because it’s +, not because it means something. I do think it would’ve been worth it to introduce ++ for general appending (also vectors, sets, maps, etc), though, to keep things clean. Also ++= for the mutating case.


  • Saint Helena is in no way comparable because it’s not disputed territory. Back when Mauritius became independent the British carved out some islands for their continued colonial use, breaking (back then brand new) international law.

    Saint Helena has no such connection to another country and it was uninhabited before the Dutch settled. The Brits later conquered it but even if the Dutch want it back it’d keep its autonomous territory status and therefore its own TLD, the Dutch have plenty of those.




  • That makes complete sense. Ranges implement fmt::Debug, .. is a range, in particular the full range (all values) ..= isn’t because the upper bound is missing but ..=.. ranges from the beginning to the… full range. Which doesn’t make sense semantically but you can debug print it so add a couple more nested calls and you get a punch card.

    I totally didn’t need the Rust playground to figure that out.

    EDIT: Oh, glossed over that: .. is only the full range if standing alone, it’s also an infix operator which is why you can add as many as you want (be careful with whitespace, though). .. .. .. .. .. .. .. .. .. .. is a valid Rust expression.