Basile Henry's Avatar

Basile Henry

@basilehenry.bsky.social

I like making games, learning about type theory and hacking on hardware. I'm also passionate about food and coffee! β˜• he/him

19 Followers  |  38 Following  |  29 Posts  |  Joined: 04.12.2024  |  2.5698

Latest posts by basilehenry.bsky.social on Bluesky

So maybe we should be vibe coding in C to be consistent in our use of UB throughout the abstractions πŸ˜…

08.02.2026 21:47 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Probably a rhetorical "what" πŸ€”

It basically says that `[a]` is equivalent to a function `Int -> a`.

It's effectively the indexing function. If you want to set a value in the "array", you create a new function that checks if the input is the index you're setting and use the old function otherwise.

19.01.2026 18:19 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Home

Lots of GADTs when writing Clash Haskell 😭

clash-lang.org

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

"Linux in the Kernel" πŸ‘€ How dare they! πŸ˜…

10.12.2025 08:25 β€” πŸ‘ 9    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

That is a pretty bad error message πŸ˜… I assumed the Generic instance was a given and was already reaching for orphan instances to explain the lack of import
bsky.app/profile/basi...

09.12.2025 13:52 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Maybe you're also supposed to derive Generic for that type in the shame module (so it's not an orphan instance), and that would force you to add the import πŸ€”

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

Ouch 😬 That would make sense to me for TemplateHaskell generated code, but for this type of instance deriving/default impl it feels like the extension should manage its own imports πŸ˜…

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

M1 not in scope is weird πŸ€” missing a language extension?

08.12.2025 21:44 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I don't know how much AI they ended up using, but watching some of their dev talks a while ago they had some really impressive procedural generation using advanced ML techniques (i.e. AI), it really didn't strike me (at that time) like the plagiarism machine you hear about in more recent game dev πŸ€·β€β™‚οΈ

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

Nice example! 😊

24.11.2025 16:30 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I mean yeah theoretically πŸ˜… It's a practical approach, and I'm struggling to find ways to exploit it to create a function that would do radically different things for different types πŸ€”
There might be some tricks where you detect the type using broken `==` for NaN, but that's also the case in Haskell

24.11.2025 15:49 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I think it might depend if you have "magic" (no constraints) type classes Γ  la Elm for things like `==`, `+`, or `>=` πŸ€”

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

That's probably the most reliable method (especially since the source path could be generated from nix)!
I guess I'm not trusting my AI enough to do the run build step for me yet πŸ˜…

18.11.2025 15:22 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

That's much better! 😊 What's the workflow like? Does it get the hash locally?

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

It'd be impressive if AI could guess the hashes πŸ˜…

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

Maybe the lock file could keep the previous version info πŸ€” Then for this specific issue, I don't think you need a full compilation of the previous version, only a way to track the impls back to the previous version (if they exist)

21.10.2025 11:21 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

It feels like the type of issue that could be fixed automatically (annotate using the impl pre-upgrade) πŸ€”

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

How else would you know that the bread is Not a a Number πŸ˜…

27.05.2025 10:19 β€” πŸ‘ 3    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

O(n^2) for a naive compiler, O(1) for a decent compiler even with non-const n. With that inner loop's body, a good compiler could rewrite the snippet:
total = n*n
Although this assumes `n` is positive and has to consider `total`'s overflow semantics, which may not be reasonable in some languages πŸ˜…

19.05.2025 06:27 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Now we need a language where escaping a newline character is an alternative way to input the 'n' character 😈

17.05.2025 20:26 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Wordle 1,421 3/6

⬜⬜🟩🟨🟨
⬜⬜⬜🟩🟨
🟩🟩🟩🟩🟩

Got lucky with my 2 starting words 😊

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

Maybe you're supposed to do a Copenhagen style left turn πŸ€”

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

I think it's mostly cursed πŸ˜…
NamedFieldPuns is the more practical option in my opinion

20.03.2025 07:24 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Make invalid states representable!

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

Thanks for the blog post! It is difficult to find nuance nowadays, so your insight and knowledge is both welcome and valuable 😊

08.02.2025 16:17 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Does GHC actually care about the location of the file? Isn't it a restriction of cabal that they need to match?

06.01.2025 18:48 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Often modern vinyls come with a code to download the mp3s, so if you buy the vinyl first you don't need to buy the mp3s πŸ˜„

25.12.2024 21:08 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

For that kind of money you could get a $55,000 wedding every single day for 30 years πŸ˜…

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

Is that to avoid orphan rule related issues? πŸ€”
What's the solution then to avoid competing interface function definitions that are in scope? Or worse, different definitions available in different scopes that a value moves between (e.g HashSet and different hash functions)?

22.12.2024 13:40 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

@basilehenry is following 20 prominent accounts