Chris Penner
@chrispenner.ca
500 followers 590 following 230 posts
FP and Programming languages nerd Building the Unison Language & Unison Share 📍Victoria BC 🇨🇦 https://chrispenner.ca
Posts Media Videos Starter Packs
lol, and when I implemented my own public wrapper over it, and implemented `publicJWKFromPrivateJWK` the AI auto-complete confidently returned the private JWK as-is, asserting that the library "takes care of it for you" which AFAICT is NOT the case... the next generation of app security is cooked.
Even the #Haskell `jose` library doesn't have a separate type for public vs private JWKs, even a phantom type would do the trick.

TBH this is just as bad as how generated certs are named key and key.pub;

If you tab-complete you'll get the private one every time and there's no `.private` as a hint
I'd really like to speak with whoever thought it was a good idea for the public and private JWK's to be represented by the same type, have the same name, with just a few missing parameters...

Ah yes, the presence or absence of this "d" parameter could tank my entire company... seems safe to me :|
At the moment I use STM as my lowest-level primitive; then leave it up to the STM implementors to use the mutexes haha.

STM has all the channels, queues and vars you need to do any form of actors or CSP you like :)
Having a 3D printer at home is such a life-hack. Just printed some custom french-cleats to hang a giant 7ft long painting and it made it 10x easier.
My current thoughts: go down the list and use the first approach that you can fit your problem into:

* Pipeline processing
* CSP
* Actors (a half dozen or fewer, statically defined)
* STM
* Mutexes (only ever use these if you're implementing STM 😆)
I've spent hours over the last months writing a post about how mutexes suck and everyone should use STM instead; but have come to the realization that even STM is more complex than necessary.

What's your decision-making process when building a concurrent and/or parallel system?

See mine below 👇
Reposted by Chris Penner
I wrote about AI and programming.

About the identity challenges we are facing as programmers and the potential erasure of craft.

There's a fun little easter egg in the header as well :)

hojberg.xyz/the-programm...
The Programmer Identity Crisis ❈ Simon Højberg ❈ Principal Frontend Engineer
On AI, Creativity, and Craft
hojberg.xyz
P.s. try clicking the HAL9000 in the header;
IMO we shouldn't be trying so hard to solve "the expression problem"; We should make it easy to update existing functions when types change, but it shouldn't always "silently work" with the new type; oftentimes existing functionality needs a human to look over it when there are changes!
What do folks out there do for error handling in concurrent tasks in #Haskell?

For now I've settled on having an error `TMVar`, then use a `ki` structured concurrency scope which forks all my jobs and ends in an `(Right <$> awaitAll) <|> (Left <$> readTMVar errVar)`
Huh, TIL that `Text.lines != Text.splitOn "\n"` when the string ends in a newline.
Reposted by Chris Penner
You can now spin up Unison Cloud clusters on your own infrastructure!

✅ Build elastic distributed systems and services in vastly less code
✅ Fast, typed RPC
✅ Deployments in seconds
✅ Free to get started

youtu.be/0sZqI1XoGLY
Unison Cloud on your infrastructure
YouTube video by Unison Language
youtu.be
Stay tuned and you won't be disappointed, Arrows and Category classes are next!
Oh whoops, lol that’s an important “not”!
Reposted by Chris Penner
Interesting article by @chrispenner.ca about why monads aren't the solution to everything, and a functor I've never crossed paths with called selective applicatives.

Still absorbing it, but great read as always. Check it out if that's your thing.

chrispenner.ca/posts/expres...
Monads are too powerful: The Expressiveness Spectrum
Monads are a useful tool, but what costs do we pay for their expressive power?
chrispenner.ca
Haha, I told my friend you couldn’t write an echo server, he said sure you can; you just enumerate every string one-by-one… good way to get your LOC up…
New blog post!

#Haskell is built on a foundation of Monads, but are they really the optimal way to sequence effects or should we keep looking for something better?

What's the big deal with Applicatives and Selective Applicatives?

Read on!

chrispenner.ca/posts/expres...
Monads are too powerful: The Expressiveness Spectrum
Monads are a useful tool, but what costs do we pay for their expressive power?
chrispenner.ca
Reposted by Chris Penner
✨ The new dependents view shows everywhere a definition is used, broken down by category, as a separate card in Unison Share and the Unison Desktop app.

Your codebase is a bidirectional graph! You should be able to walk it as such.
I'm pretty stoked on how well WASM seems to be working for languages that target it (not that there aren't difficulties there).

Even more stoked for these updates!