• 0 Posts
  • 243 Comments
Joined 3 years ago
cake
Cake day: June 9th, 2023

help-circle




  • Apple proposed something a few years ago, when governments were making similar threats, that attempted to strike a middle ground. The idea was that upon uploading an image to iCloud Photos, a on-device scan would be run on that image and an encrypted report generated to be sent up along with the photo. There was differential privacy involved, the report would also sometimes be generated for entirely normal photos, so seeing a report didn’t necessarily indicate anything, and they had set it up such that the server would only be able to decrypt the reports if it had a sufficiently large number of photos that had been actually found to be CSAM by the local scan, so there would have to be many false positives to incorrectly get flagged.

    It was incredibly controversial, and they ended up not doing it after all. In my opinion, it’s probably the lightest touch and most responsible way to do something like this, and obviously they always pick the most worthy cause for invading privacy… but I still viscerally dislike the idea that my computer would have code designed to try to get me sent to prison under certain circumstances (not that I’d ever be triggering that code with anything but a false positive of course). Somehow it’s worse than just saying “in the cloud you have no privacy, your photos aren’t encrypted on our servers, and if you upload CSAM we’ll drop a train on you.”


  • For about $2000, I picked up a Mac Studio with 96 gigs of RAM, which is effectively all VRAM thanks to Apple’s architecture. It doesn’t have the raw number-crunching power of the big GPUs but with all that space, you don’t need to worry much about the size of the model until they start getting really big, so it’s pretty easy and flexible.

    I’m able to do basically everything that others are doing with AI, entirely locally. It generates text and writes code (it’s no Opus, but probably on par with the best of a year and a half ago), images, videos, songs, all that stuff (those last few are garbage but it’s basically the same level garbage that the cloud models are making). And I have total privacy, will never get a surprise price hike or lose access to a model I like, and know exactly how many bottles of water I’m using to cool it (zero).

    It’s not heroin, it’s weed. There will be a market for it, but, like, you can also just make it yourself. 90% of what people want will just get done on device. I can’t see any way this turns into a trillion dollar industry.







  • It’s very different. You have to come at problems in a very different way because the tools at your disposal are not what you’re used to.

    The language itself is quite elegant and simple, if you strip it down to its essence it’s basically “when you see A on the left side of the equals sign, replace it with B on the right side of the equals sign” repeated until your program has either errored out or been boiled down to a single value. The type checker ensures that the replacement will be legal no matter what’s happening at runtime, and can really help with getting things lined up just right because it’s very thorough.

    The simplicity also leads to complexity, though, for a few reasons. The solution to any problem is usually generalizable, since there’s such a small surface area to the language itself and the type system allows for very abstract declarations of what a thing does, which leads to very beautiful solutions that are also so general and reusable that it can take work to figure out “okay, so this thing composes one function that is traveling recursively down the list of pairs, applying this function to the first item, and that’s composed into this other function that is pulling them apart into separate lists…” whereas if it had been written the “dumb” way it’d be more like “oh, we’re breaking these items into two lists and tweaking the first item as we go,” unnecessarily tied to the one particular scenario and totally unusable anywhere else in your code, but also more readable and concrete. There’s an entire vocabulary of functions that do abstract things that you have to learn to make sense of what’s going on sometimes.

    Related to that is monads, which are such a common pattern in Haskell that the language has special notation for them; they’re an incredibly powerful tool for putting values in a context and/or creating an environment where background details can be handled out of sight, but they’re also so generalizable that they span from the simplest monad that basically just captures “this thing might not actually exist” all the way to the IO monad which, in a way, represents the entire universe, or at least your entire computer. Learning Haskell means wrapping your mind around them, which isn’t impossible, they’re actually quite simple, basically just 2 functions that need to follow a few rules, but it takes a few examples and explainers to really get it.

    Generally I think any programmer benefits from at least trying out something like Haskell, even if you never become an expert or use it day-to-day, it’ll give you a new angle to think from and could spark thoughts you never would have had before.


  • I think Haskell would be a good choice. It’s mature, used for real things (amongst a particular crowd, at least) and it’s emphatic about being purely functional. Even when it is forced to enable other styles like imperative, it’s done in a way that’s syntactic sugar for a pure version (do notation being a great example of this, it’s really just a chain of lambdas). You can do functional style programming in a lot of languages now, but they’ll also let you mix and match other styles, which can make it easy to “cheat.” Haskell will teach you functional programming and that’s it.

    Also, since it sounds like you’re familiar with Rust, it uses a lot of ideas from Haskell. Rust enums are a clone of Haskell’s algebraic data types, patterns are almost exactly the same, traits are typeclasses right down to the fact that the compiler can derive some common ones automatically, Rust strongly encourages immutability while Haskell basically requires it, and in both languages you’re only allowed to break the rules if you start using things with the word unsafe in them. My experience learning Rust was “oh, C and Haskell had a baby named Rust, cool!” The big difference is that in Rust, you’re programming from inside a C-style computer with RAM, while in Haskell you’re programming in a mathematical void and the computer is tidily packed away in a box labeled IO.

    A fun guide for learning Haskell is here: https://learnyouahaskell.github.io/





  • No, a lot of information about elections is actually public. Who you vote for is very secret, but your name, address, and the fact that you did or did not vote is often either public or available on request. This is important because if it was just a totally secret thing, there’s not much stopping a corrupt election official from dumping as many fake ballots into the total as they like or filling out ballots for people that didn’t show up.


  • A minimal but powerful language can feel like magic. Like, literally. The whole appeal of magic in stories is that you can step out of the normal rules and do something that defies belief, and who hasn’t fantasized about that in real life?

    If the language you’re using has a lot of magic built into it, things that the language can do but you can’t do, you feel mundane, like the language is letting you look at the cool things it can do, but doesn’t let you do them yourself. A more minimal language, where the important things are in the library, means that the language designers haven’t kept that stuff to themselves. They built the language such that that power is available to everyone. If the language gives its standard library authors the power to do things beautifully and elegantly without special treatment, then your library is getting those benefits too.

    It’s also a sign of good design, because just saying “well, this thing magically works differently” tends to be a shortcut, a hack, an indication that something isn’t right and couldn’t be fixed nicely.


  • Most people don’t need a file to be in two places at once, it’s more confusing than convenient. And if they do want two of a file at all, they almost certainly want them to be separate copies so that the original stays unmodified when they edit the second one. Anyone who really wants a hard link is probably comfortable with the command line, or should get comfortable.

    The Mac actually kind of gets the best of both worlds, APFS can clone a file such that they aren’t hard links but still share the same blocks of data on disk, so the second file takes up no more space, and it’s only when a block gets edited that it diverges from the other one and takes up more space, while the unmodified blocks remain shared. It happens when copy-pasting or duplicating a file in the Finder as well as with cp on the command line. I’m sure other modern file systems have this as well.