Chris Penner

Chris Penner

@chrispenner.ca

FP and Programming languages nerd Building the Unison Language & Unison Share 📍Victoria BC 🇨🇦 https://chrispenner.ca

557 followers609 following263 posts

Another @unison-lang.org feature I think every language should have in some capacity: Streams! Unison's effect system makes them even more useful since you can interleave effects into your streams. A Stream or Coroutine abstraction is so useful as a way for libraries to consume or provide data.

Obviously many other languages have a take on this, but in Haskell for example there are many different and incompatible kinds. Optimizing for specific use-cases is nice, but I think having a shared foundational and compatible interface wins out in this case.

In Unison it's great because producers use the Stream effect, and you can upgrade it to a Coroutine by just adding the `Ask` effect, they compose!

No other language lets me write straight-line code like this. The `prompt` line saves saves the current continuation in a database, then sends a prompt to the user's browser to select a slot. When selected, `prompt` returns the in-memory @unison-lang.org object which corresponds to the chosen slot.

It doesn't look like much, and that's kinda the point. That single line saves the full workflow seamlessly to a DB, it can be re-hydrated and continue running like nothing happened whenever the response is received whether in a second or a week.

I don't have to serialize some state machine, the code itself and the real Unison values are serialized for me by the language itself. Pretty cool 😎

Happy to announce Unison Computing is branching out into consulting! iIf you'd like a hand with your project you'd be hard-pressed to find a better team to help, drop us a line 😎

Chris Penner reposted

📰 UCM 1.1.0 is out! * `dependents` can search by variant, not just type or ability name * New built-ins for Argon2id hashing * VS Code actions: Edit Definition & Open on Share * MCP tool: `share-project-info` * Faster bytes ops & improved run command

github.comRelease release/1.1.0 · unisonweb/unisonWhat's Changed Features: The dependents command now work on constructors and ability requests. (#6115) Support for "Edit Definition" and "Open on Share" in the Unison Language VS Code extension v1...

I made this tool for managing workshop sessions in tmux and I've used it *hundreds of times* per day every day for 6 years now without any hiccups; if you're looking for a good way to manage your terminal sessions maybe this is it. github.com/ChrisPenner/...

github.comGitHub - ChrisPenner/session-sauce: Shell plugin for managing tmux sessionsShell plugin for managing tmux sessions. Contribute to ChrisPenner/session-sauce development by creating an account on GitHub.

I'm learning that the model for the fully-formed shape wasn't too bad, but splitting it up into individually printable parts for assembly is much trickier 🤷‍♂️

It's absolutely bonkers how much of modern society is still dependent on staying on hold for 2 hours on an unreliable connection when at any moment your thumb could slip or you could drop the call and there's just no way to get that call back except to wait another 2 hours 😑 #WestJet

In any active software project new bugs are always being introduced. Bugs that are important or easy to fix are typically prioritized. This means that as the project ages, the pool of bugs inevitably becomes a majority of the 'difficult to fix' or 'low-priority' variety 😢

Want to try a radically innovative programming language? Unison is ready! Unison is approachable, user-friendly, and has a great community of friendly folks :) On top of that it has mind-bending features like serializable function closures and built-in distributed programming tools!

Chris Penner reposted

Chris Penner reposted

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 :|

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

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.

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 👇

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 😆)

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)`

Chris Penner reposted

✨ 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.

Chris Penner reposted

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!

It may in fact be a VeryBadIdea™ but I'm extremely tempted to duct tape my soldering iron to my 3D printer and use it to wood-burn the grid lines on the Go board I'm building...

Programming languages really need a way to expose functions as "you can import this within this project and tests, but it's not public to other libraries"; somewhere in-between fully public and fully private.