Kristin's Avatar

Kristin

@wiredaemon.bsky.social

Formal Methods, Programming languages, Specifications. discord: wiredaemon she / her πŸ³οΈβ€βš§οΈ

161 Followers  |  86 Following  |  319 Posts  |  Joined: 30.07.2023  |  2.1616

Latest posts by wiredaemon.bsky.social on Bluesky

Error message that says "German operating systems do not support this program"

Error message that says "German operating systems do not support this program"

14.05.2025 19:18 β€” πŸ‘ 7    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

there's the stereotype of the u-haul lesbian. i'm proposing the extension of this concept to the shipping-container lesbian.

11.05.2025 18:03 β€” πŸ‘ 9    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

me: does thing
others: you gonna do thing?
me: i don't think so

me: here's update on thing
others: so you really wanna do thing, huh?
me: I really don't want to do thing
others: but you'll keep working on it?
me: ... yes

09.05.2025 23:32 β€” πŸ‘ 7    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

T makes you Gnome, E makes you Plasma

04.05.2025 12:18 β€” πŸ‘ 24    πŸ” 1    πŸ’¬ 8    πŸ“Œ 0

Oh god, it very well could be.

But in general I find certain languages go the "well, the signature of the funciton actually just implies some properties on the given types so i'm gonna generate a proof obligation and if something goes wrong i'll lowkey just spit that at you", which is annoying

19.04.2025 17:54 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Error: couldn't solve this auto generated equation πŸ˜”πŸ˜”πŸ˜”

19.04.2025 15:54 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

it is!

18.04.2025 23:00 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

my airfryer fills me with joy and chicken nuggets

18.04.2025 22:58 β€” πŸ‘ 12    πŸ” 1    πŸ’¬ 0    πŸ“Œ 0

"Sorry for being so pedantic about bread earlier" is probably the most german thing i've ever said holy shit

17.04.2025 22:50 β€” πŸ‘ 18    πŸ” 2    πŸ’¬ 0    πŸ“Œ 0

Based and chewing gum pilled 😌

17.04.2025 22:25 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

being away from the internet for a few days feels pretty good

but now i'm like "what did i miss? :D"

15.04.2025 13:38 β€” πŸ‘ 6    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

they really are

14.04.2025 17:14 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I'm a sucker for contrast

30.03.2025 18:51 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

It was the end of March. Spring was just beginning. The words war and peace got thrown around a lot by all the people on TV, but the sound of their words got blown across the sky with that first spring breeze. All we thought about was clothes on sale, release dates of new games, and the beginning of

30.03.2025 16:31 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

friend: "how does that work??"

me, waving with my hands: "it's all, uh, you know, it's not just anything, it's code!

it seems like my oratory skills from teaching at uni haven't degraded one bit.

(it was about how i'm generating code with and without lisp macros)

28.03.2025 10:30 β€” πŸ‘ 7    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

any noticable changes from that?

28.03.2025 10:23 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

the infusion pump actually sounds nice 😌

27.03.2025 08:55 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

whatever could this be inspired by πŸ€”

26.03.2025 16:11 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

So I think the problem he identifies isn't completely baseless, but it's a way more narrow problem than he makes out to be and the jab against typed languages isn't that justified imho.

I like the solution and direction he proposes, although most of that is also applicable outside of clojure imho.

26.03.2025 13:14 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

when it comes to having partial information and you may want "not quite legal state" because you're still gathering data and you cannot construct the final thing just yet.

On the one hand, yeah, that's pretty handy. On the other hand, sounds like a symptom of bad design if that happens to you

26.03.2025 13:14 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

And declaring a bunch of members as Maybe absolutely runs the risk of making them representable. And the solution he proposes is also applicable to typed languages: split it up. make it smaller. don't demand information you don't need.

the only thing where i'm just ... completely Β―\_(ツ)_/Β― is

26.03.2025 13:14 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

The point where Maybe can become tedious, is if you use it in the definition of other datatypes. When you bake the optionality into other data. I actually agree with rich here!

But, i would argue that's bad style anyway in any language. Because you want to make illegal states unrepresentable.

26.03.2025 13:14 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

and that's fine! e.g. when you want to find something that may not be there!

and if you have functions that require a Maybe as a parameter, you don't have to! you can just write (like rich suggests) normal functions and if they need to deal with optionality, you can lift them. fmap is real.

26.03.2025 13:14 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

In Haskell, it's clear that it's part of Maybe, and only Maybe. So in my opinion, Rich has a point here. Because now we have given the absence of a value a type. and through that we need a value to represent that absence. in that sense, you never really don't have a value now.

26.03.2025 13:14 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I would agree they are ill-suited to express optionality of types. I.e. don't define addition like `+ :: (Either Int Double) -> (Either Int Double) -> (Either Int Double)`. But (good) haskell doesn't do that, you just use typeclasses

Maybe is blurry because what's conceptually the type of Nothing?

26.03.2025 13:14 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

The problem Hickey seems to have with Either and Maybe seems to be that they aren't supertypes of their constituent types or default constructible from them. From that he (i think wrongly) concludes that they are thus ill-suited to express optionality in general.

I think there is something here tho

26.03.2025 13:14 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

or, if you don't want typeinference to go too rampant, make it really small:

class Foo a where foo :: a -> String
instance Foo Person where foo p = name p
instance Foo (Maybe Person) where foo (Just p) = name p ; foo Nothing = ""

or, just create a different function.

26.03.2025 13:14 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

And if you want the non-breaking behavior, it's solvable via Typeclasses:

class Optional a b where opt :: b -> Maybe a
instance Optional a a where opt = Just
instance Optional a (Maybe a) where opt = id
foo :: (Optional Person a) => a -> String
foo o = case opt o of Just p -> name p ; Nothing -> ""

26.03.2025 13:14 β€” πŸ‘ 4    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

That is, you cannot *just* write a function taking fundamentally different values. Functions must do the exact same operations on values of whatever type. So a function checking for Nothing *must* be different from one that doesn't. This is a much more nuanced thing to take issue with in my opinion.

26.03.2025 13:14 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I think Either and Maybe are *fine*. Both as a descriptor for what they are and mostly how they're used.

I agree it's unfortunate that relaxing requirements leads to breakage of user code. I don't think that's a symptom of Maybe though. In my opinion it's due to parametricity, which haskell obeys.

26.03.2025 13:14 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 2    πŸ“Œ 0

@wiredaemon is following 18 prominent accounts