Alice ✨
banner
welltypedwit.ch
Alice ✨
@welltypedwit.ch
When the limestone of imperative programming has worn away, the granite of functional programming will be revealed underneath -Simon Peyton Jones

https://welltypedwit.ch
Reposted by Alice ✨
This post has been sitting around in my drafts since March... I hope it has its intended effect

bernsteinbear.com/blog/compile...
A catalog of side effects
Optimizing compilers like to keep track of each IR instruction’s effects. An instruction’s effects vary wildly from having no effects at all, to writing a specific variable, to completely unknown (wri...
bernsteinbear.com
November 11, 2025 at 7:01 PM
i should stop writing lean because it's going to make me want to implement its infoview for vega and that would take so much effort....
November 11, 2025 at 11:00 AM
what do you think this lean code outputs?

def f(x y : Nat): Nat := x
def g : (y x : Nat) -> Nat := f

#eval f (x := 1) (y := 2)
#eval g (x := 1) (y := 2)
#eval (f : (y x : Nat) -> Nat) (x := 1) (y := 2)
November 10, 2025 at 11:54 PM
i wish arrows were real
November 10, 2025 at 5:38 PM
would you agree with the following statement: "every tree on at least two vertices contains at least two leaves"
November 9, 2025 at 12:05 PM
i wonder if noone replied to this because they don't know the anwer or because noone knows how parallel works ^^
can you spot the issue in this code?

let graphs = withStrategy (parBuffer whatever rseq) $ filter expensiveCondition (generateLotsOfGraphs ())
November 7, 2025 at 4:57 PM
can you spot the issue in this code?

let graphs = withStrategy (parBuffer whatever rseq) $ filter expensiveCondition (generateLotsOfGraphs ())
November 6, 2025 at 11:07 PM
i feel like 60% of the benefit of using a functional programming language is just having ubiquitous good persistent data structures (or at least usable ones, depending on the language ^^).
there's really no reason imperative languages couldn't have that either (rust gets a pass i guess)
November 6, 2025 at 6:57 PM
haskell is just so nice to write
November 6, 2025 at 6:02 PM
Reposted by Alice ✨
good points by graydon hoare on fil-c

graydon2.dreamwidth.org/320265.html
November 6, 2025 at 12:23 PM
is there a reason why higher rank trait bounds (i.e. rust's QuantifiedConstraints) can only range over lifetimes, not types?

i get it for regular higher rank arguments that need to be passed at runtime somehow, but trait bounds are monomorphized away anyway, aren't they?
November 4, 2025 at 11:00 AM
Reposted by Alice ✨
This is not a drill: GHC (the #Haskell compiler) now runs in your browser. See the announcement (and please report any bugs) here: discourse.haskell.org/t/ghc-now-ru...
Ghc now runs in your browser
ghc itself can now run purely client-side in the browser, here’s a haskell playground demo. terms and conditions apply, and i’ll write up more detailed explanation some time later, but i thought this ...
discourse.haskell.org
October 25, 2025 at 7:28 PM
lexa is pretty cool
October 25, 2025 at 2:11 PM
i feel like PL authors don't know what the word "subset" means
October 23, 2025 at 9:13 PM
Reposted by Alice ✨
October 23, 2025 at 2:43 AM
oops
October 22, 2025 at 7:48 PM
i hate sccs (no, they're actually really cool but this is like the fifth time i got this panic omg)
October 22, 2025 at 7:18 PM
reading english articles about the nazis is so strange because all the gross nazi euphemism's you're not supposed to use are just everywhere
October 22, 2025 at 1:09 PM
this thread made me realize that I'm such an idiot and I should absolutely be doing this in vega to solve monomorphizability constraints.
oh yeah, ghc would default that to Any (which is called ZonkAny or something now for.. reasons) but rust could also just default it to (something equivalent to) () couldn't it? because if it stays as an unconstrained, unbound unification variable, that means nothing ever needs the concrete type
October 21, 2025 at 11:11 PM
it's so nice talking to people who know what they're talking about
October 21, 2025 at 7:27 PM
omg i hate error recovery. this is so subtle
October 21, 2025 at 12:17 PM
<insert bell curve meme>

- polymorphism means subtyping
- polymorphism and subtyping are different things
- polymorphism means subtyping
October 21, 2025 at 11:43 AM
what did she mean by this
October 21, 2025 at 11:34 AM
while I'm asking about rust things: why does ! (the type) exist? is it for error messages? like, panic could also have been typed (ignoring that it's a macro for a second)

fn panic<T>(message: &str) -> T

(which would be more consistent with how Result works anyway)
October 21, 2025 at 10:39 AM