PhD in programming languages. PL, FP, SAT solvers, Philosophy, and most importantly, dungeons and dragons. all views and claims are my own. (he/him)

Joined July 2009
doyougnu retweeted
Replying to @joomy
This is a very hazardous false equivalence, and it gets trotted out every six months or so. There's an important difference between the items in those two sets. If I tell you, that say, this code only cares that some type argument is a Monoid, you know how to reason about it and come away with laws you can use to check if your code is correct without having to go down to the case-by-case instantiation of that code at every possible type. That doesn't happen if I tell you it is a Strategy. What are the laws of a Strategy? The Gang of Four sure as hell never told us any. So now I have to read the code anyways, and still reason through every possible instantiation of the types. I've gained nothing except additional onboarding time, and some vocabulary for smells and feelings. Now it did give us, for the time, a vocabulary that was better than what we had in the imperative world. It gave us a canonical reference chapter for each golden idea, complete with a smorgasbord of options to pick and choose between judiciously written so as to not offend anybody that their precious variant on the idea wouldn't fit the mold. But, ultimately, the GoF patterns hold for a narrow range of languages. And patterns are really about expressing thoughts your language is bad at letting you properly encode as a library. They more or less acknowledge that in the book itself. They are by definition code that some poor schmuck is stuck writing variants on over and over. But I can write a 'Monoid' and package it up and never rewrite that code again. Most consumers of it need never care too much about the details. You can know it is safe to foldMap with (at least for finite cases) as long as you trust the implementation to be correct to the claim of being a Monoid. Now, we do have _plenty_ of "real" design patterns in functional programming! * encouraging `higher-kinded` data to avoid having lots of copies of near identical structure * "boring" haskell so you don't have to teach so many new tricks and more of the language works * some folks like to newtype all sorts of things rather than rely on them being stringly typed. * all the machinery we use to manage masking for exceptions is right on the cusp of being a design pattern. I say that because we _do_ get to reuse the implementation that was written by God and/or @simonmar back at the dawn of time, but knowing when and why to use the mask idiom takes about the effort of reading one of the GoF chapters. * I gave a bigger laundry list here last time the oop design patterns vs. functional programming thing came up: xitter.cf/kmett/status/181610002… *tl;dr* FP isn't free of design patterns, but typeclasses aren't design patterns.
Replying to @welltypedwitch
There are a number of design patterns in FP. We push folks to 'higher-kinded data', or 'boring haskell' depending on your camp. We abuse generics to idiomatically lift code over sums and products, we use template haskell to generate whole libraries dynamically, or in agda folks play with w-types, we often encourage folks to drown things in newtypes rather than stringly type everything, using reflection to lift terms to types so you can configure stuff once and forall, monad-transformer-based effects vs. other effect systems, there's idiomatic behaviors for things like bracketing and masking that occur over and over and don't make any sense until you've seen 3-4 variants on the theme or you've thought super hard, there are various patterns for supplying lenses to big composite environments, idiomatically lifting things into json or other serialization formats, patterns and best practices for how to define new data types and ensure good coverage of classes, or new classes and ensure good coverage of data types, cultural information about when and how to orphan instances, using monoids to smash together partial configurations, applying unification to everything in sight, what it even means to tie the knot, various tricks for using ubiquitous laziness like rep-min, etc. I mean, for fuck's sake, @PTOOP called Applicative "Idiom" to start with, so of course we have our own idioms! ;) In general, I do think that design patterns are mostly a way to compensate for lacking abstractions in your language. IME, the smugness, justified or not, comes in part because most of the idioms that the Gang Of Four in particular identified for OOP in particular are to work around shortcomings that aren't particularly short on the FP side, and the things for which we do fall back on design pattern behavior, aren't recognized as such, because, well, they just weren't named by Gamma et al. And of course they weren't! Those folks focused on a narrow class of idioms that apply primarily to languages descended from a sort of C/C++/Java/Smalltalk-ish culture, mostly for building enterprisey applications, so it isn't surprising that they'd lack a vocabulary to talk about issues that by and large weren't their issues.
7
17
4
151
13,035
FUNARCH 2025 call for lightning talks is up! Come give a 5-10 minute presentation about your hexagonal architecture, or the system that you've architected in a functional language, or your experience using FP in the large! conf.researchr.org/home/icfp…
1
1
118
Today is the day! Make sure you don't miss today’s deadline to submit to The Third ACM SIGPLAN Workshop on Functional Software Architecture - FP in the Large! conf.researchr.org/home/icfp… #FUNARCH2025
2
2
151
doyougnu retweeted
Only a single week to go until the deadline on Monday, June 16th: Send us your paper on FP in the large - to the SIGPLAN Workshop on Functional Software Architecture! Happy Writing! conf.researchr.org/home/icfp…
3
2
169
Only a little more than a month before the deadline on Mon. June 16: Send us your paper on FP in the large - to the SIGPLAN Workshop on Functional Software Architecture! Happy Writing! conf.researchr.org/home/icfp… #FUNARCH2025
4
3
353
Website & CfP online for the Erlang Workshop, co-located with ICFP 2025 in Singapore. Submit your paper by 6th June! We look forward to bringing together scholars and practitioners working on Erlang, Elixir, BEAM, functional programming, and concurrency! conf.researchr.org/home/icfp…
6
7
825
The Call for Papers for #FUNARCH2025 is open - deadline is June 16th. Send us research papers, experience reports, architectural pearls, or submit to the open category! conf.researchr.org/home/icfp… functional-architecture.org/…
1
7
1
3
1,465
doyougnu retweeted
We've extended the deadline for FUNRARCH 2024 to June 12th. Know something about what makes functional programming work in the large? Write it up! functional-architecture.org/…
1
11
11
2,318
just too good to pass up, even on @elonmusk's @trashfuturepod
"How would you explain the concept of eigenvectors to a child?" asks @JayDeep_1729. A few years ago I tried to do something like that – to explain eigenvectors intuitively, in five minutes, with no pictures, just words. youtube.com/watch?v=AXk12z-N…
1
194
At long last my article Variational satisfiability solving: efficiently solving lots of related SAT problems (link.springer.com/article/10…) has been published in Empirical Software Engineering! This is the most refined version of the VSAT work outside of my thesis!
1
1
3
Many thanks to @PaulMBittner instrumented the final touches and pushed the manuscript through and to @EricWalkingshaw and @ThomasThuem for all their hard work and support over the last 2 years! Congrats guys!
2
Data-Codata Symmetry and its Interaction with Evaluation Order arxiv.org/pdf/2211.13004.pdf
6
34
Hey, if you know any people who have lost their jobs recently that you think might be a good fit at Jane Street, please DM me! Personal recommendations from people I know can cut through a lot of noise.
5
26
4
123
Idris 2 version 0.6.0 has been released. For more details, see idris-lang.org/idris-2-versi… Enjoy!
3
29
2
108
The Haskell Error Index is a new community-driven source of documentation for error messages and warnings from Haskell tooling, inspired by Rust's error index and PHP's documentation site. If you can use Git and write Markdown, then you can contribute! discourse.haskell.org/t/anno…
dvorak, cold turkey day 2. I've memorized the layout and now type at 10 words per minute. Had to change my emacs and xmonad keybindings. It's a strange experience but so many words are so pleasant to type in dvorak that I already know that I'll never go back qwerty.
1
4
dvorak, cold turkey day 5. I type at ~28 words per minute. Still nowhere near the 100+ I had with qwerty but its fast enough to have a normal workday. Even tho I'm slow Its obvious to me that dvorak is vastly better than qwerty.
1
One of the largest adjustments has been changing my expectations of what typing feels like. Once I got over 20 wpm I realized that I expected my hands to move a lot when typing, but with dvorak my hands move _way_ less. Idk how much, but it feels like an order of magnitude.