Sign in

raganwald.com

@raganwald.functional.cafe.ap.brid.gy
23 followers 2 following 140 posts

Reg "raganwald" Braithwaite's account for discussing functional programming and shamelessly plugging essays about programming. Follows are NOT endorsements. This […] 🌉 bridged from ⁂ functional.cafe/@raganwald, follow @ap.brid.gy to interact

PostsRepliesMedia
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 5h
Why do I write? Two reasons! First, writing is thinking: “You think you know when you can learn, are more sure when you can write, even more when you can teach, but certain when you can program.”—Alan J. Perlis Second, reading feedback like this warms my soul […]
functional.cafe
Original post on functional.cafe
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 03/10/2026
AI is now writing reviews of my decades-old writing. But who is this for? If AI is going to do all the coding, which human needs to worry about things like "some of this code monkey-patches global classes?" Who, precisely, wants AI directing them towards resources for writing code without AI […]
functional.cafe
Original post on functional.cafe
111
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 02/10/2026
RE: social.bau-ha.us/@raganwald/1173721… My author is immoderate in his personal judgments, but he is not wrong on the facts.
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 01/10/2026
“What every hipster should know about functional programming,” from @bodil: www.youtube.com/watch?v=mS11v99ZyJc
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 30/09/2026
A naïve first working predecessor for the applicative Church numerals in concatenative combinators:
export const times = b;
export const plus = construction([ [cons, b], cons, s ]);
export const exponent = i;

export const succ = construction([ [z1], plus ]);
export const pred = construction([
  // initialization
  [[z0], [z0]],
  // [[__], [Zn]] => [Zn], [++Zn]
  [i, nip, dup, [succ], cons],
  // dig the quoted parameter up: [C] [B] [A] => [B] [A] [C]
  dig,
  // apply it, counting up: [z0], [z0] => [z0], [z1] => [z1], [z2] => [z2], [z3], ...
  i,
  // discard the rightmost quoted number, revealing the quoted predecessor
  zap,
  // apply it
  i
]);

test("pred", () => {
  expect((rewrite([[[]], [unit], [z0], pred]))).toEqual(rewrite([[[]], [unit], z0]));
  expect((rewrite([[[]], [unit], [z1], pred]))).toEqual(rewrite([[[]], [unit], z0]));
  expect((rewrite([[[]], [unit], [z2], pred]))).toEqual(rewrite([[[]], [unit], z1]));
  expect((rewrite([[[]], [unit], [z3], pred]))).toEqual(rewrite([[[]], [unit], z2]));
  expect((rewrite([[[]], [unit], [z4], pred]))).toEqual(rewrite([[[]], [unit], z3]));
});
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 29/09/2026
RE: toot.wales/@Chantalouette/117354977… “Raganwald’s heart grew three sizes that day.”
toot.wales
002
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 29/09/2026
CoffeeScript Ristretto is a short book about a programming language that is intentionally small. It was inspired by "The Little Lisper" and "SICP," books that could not be written about Java, JavaScript, or TypeScript. raganwald.com/assets/books/coffeesc…
A book cover. At the top are the words: CoffeeScript Ristretto. Below on the left is a chrome coffee implement with a handle and wood accents. Below on the right, in a thought bubble, are the words: brought to you by Reg "Raganwald" Braithwaite.
042
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 19/09/2026
Practical Use Cases of the K-combinator (Kestrel) in JavaScript: Real-World Examples and Implementation www.xjavascript.com/blog/practical-…
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 18/09/2026
As delightfully shown in Raymond Smullyan’s classic “To Mock a Mockingbird,” if a combinatorial forest has both a starling and a kestrel, it also has every other combinatorial bird: archive.org/details/tomockmockingbi… And as go […] [Original post on functional.cafe]
// [C] [B] [A] s == [[C] B] [C] A
export const s = combinator((C: Quotation, B: Quotation, A: Quotation) => [ [C, ...B], C, ...A ]);
export const starling = s;

//     [B] [A] k == A
export const k = combinator((B: Quotation, A: Quotation) => [ ...A ]);
export const kestrel = k;
201
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 18/09/2026
This is, of course, a game in the same game theory family as “The Prisoner’s Dilemma.” North American roads are the board for an n-player “Arms Race.” archive.org/details/prisonersdilemm…
011
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 18/09/2026
JSJ Book Club: “JavaScript Allongé with Reginald Braithwaite,” 2013-08-09 My how the time has flown! ⌚️🪽 topenddevs.com/podcasts/javascript-…
topenddevs.com
070 JSJ Book Club: JavaScript Allongé with Reginald Braithwaite · Top End Devs
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 16/09/2026
Church numerals in concatenative combinators have begun to manifest themselves.
test("zn", () => {
  expect(z0([ [z0], [z1] ])).toEqual([ z0 ]);
  expect(z1([ [z0], [z1] ])).toEqual([ [ z0 ], z1 ]);
  expect(z2([ [z0], [z1] ])).toEqual([ [ [ z0 ], z1 ], z1 ]);
  expect(z3([ [z0], [z1] ])).toEqual([ [ [ [ z0 ], z1 ], z1 ], z1 ]);
  expect(z4([ [z0], [z1] ])).toEqual([ [ [ [ [ z0 ], z1 ], z1 ], z1 ], z1 ]);
  expect(z5([ [z0], [z1] ])).toEqual([ [ [ [ [ [ z0 ], z1 ], z1 ], z1 ], z1 ], z1 ]);
  expect(z6([ [z0], [z1] ])).toEqual([ [ [ [ [ [ [ z0 ], z1 ], z1 ], z1 ], z1 ], z1 ], z1 ]);
  expect(z7([ [z0], [z1] ])).toEqual([ [ [ [ [ [ [ [ z0 ], z1 ], z1 ], z1 ], z1 ], z1 ], z1 ], z1 ]);
  expect(z8([ [z0], [z1] ])).toEqual([ [ [ [ [ [ [ [ [ z0 ], z1 ], z1 ], z1 ], z1 ], z1 ], z1 ], z1 ], z1 ]);
  expect(z9([ [z0], [z1] ])).toEqual([ [ [ [ [ [ [ [ [ [ z0 ], z1 ], z1 ], z1 ], z1 ], z1 ], z1 ], z1 ], z1 ], z1 ]);
});
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 16/09/2026
“Selection functions and lenses,” from @julesh julesh.com/posts/2021-03-30-selecti…
julesh.com
Jules Hedges - Selection functions and lenses
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 14/09/2026
The inner implementation of a base concatenative combinator, `cons`:
//     [B] [A] cons == [[B] A]
export const cons = combinator((B: Parameter, A: Parameter) => {
  if (!isProgram(A)) return Fail;
  if (!isProgram(B)) return Fail;
  if (A.length === 0) return Fail;
  if (B.length === 0) return Fail;

  return [ [B, ...A] ];
});
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 11/09/2026
Three articles about Concatenative Combinators from Remo Dentato: dev.to/rdentato/series/28789
dev.to
Concatenative Combinators Series' Articles
View Concatenative Combinators Series' Articles on DEV Community
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 09/09/2026
A single-combinator base for concatenative combinators: dev.to/rdentato/a-very-minimal-base…
dev.to
A very minimal base for Concatenative Combinators
Introduction In a previous article I described an abstraction algorithm for Concatenative...
000
Reposted by raganwald.com
Reginald @raganwald.social.bau-ha.us.ap.brid.gy · 09/09/2026
janet-lang.org 🎩 @plexus
A woman with shoulder-length brown hair, blouse with light blue diamond figures, and purple apron as seen from mid-torso up.
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 08/09/2026
Tony Hoare, as usually quoted: “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies. “The first method is far more difficult.” The […]
functional.cafe
Original post on functional.cafe
007
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 08/09/2026
Exactly this: Function colours are all about the scope of dependency. jerf.org/iri/post/2026/func_args_ar…
jerf.org
Why Function Arguments Are Not Function Colors - iRi
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 07/09/2026
“This article describes a new theory of combinators, similar in many ways to the theory of Combinatory Logic pioneered by Haskell Curry and others in the 1930s... “The inspiration for this theory came from the programming language Joy, designed by Manfred von Thun... “In fact, the theory here […]
functional.cafe
Original post on functional.cafe
122
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 03/09/2026
“The string is a stark data structure and everywhere it is passed there is much duplication of process. It is a perfect vehicle for hiding information.” —Epigrams in Programming by Dr. Alan J. Perlis (1982) www.cs.yale.edu/homes/perlis-alan/q…
120
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 14/08/2026
“In this post, I want to swoon about macros, explain what "homoiconic" actually means, demonstrate their ubiquity in Elisp, depict their beauty on a detour through Hofstadter's strange loops and Escher's prints, and finally show off some tooling (macroexpand, emacs-lisp-macroexpand, macrostep) […]
functional.cafe
Original post on functional.cafe
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 07/08/2026
Piet is a graphical esolang where some programs look like Mondrian paintings. Naturally, someone has decided to make a quine in Piet, solving two nerdy problems at once. www.youtube.com/watch?v=GwMtzhjCzyc
100
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 04/08/2026
(), pronounced "parens", is a daughter of Iota in which source code consists entirely of '(' and ')'. It is a subset of Balanced Parentheses which encodes Iota programs. esolangs.org/wiki/()
esolangs.org
Esolang, the esoteric programming languages wiki
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 04/08/2026
(()), also known as Empty Nest, is a string re-writing scheme designed to use only properly nested parenthesis, and to be completely impossible to read. The syntax is very simple. Every program consists of a list of productions, with the last item being the data. The interpreter iterates […]
functional.cafe
Original post on functional.cafe
000
Reposted by raganwald.com
Reginald @raganwald.social.bau-ha.us.ap.brid.gy · 28/07/2026
An essay of mine from 2013: "When FP? And when OOP?" raganwald.com/2013/04/08/functional… The underlying idea was that FP and OOP make different kinds of changes easy versus hard. Thus, every application had a little of column A and a little of column B, and what went in […]
social.bau-ha.us
Original post on social.bau-ha.us
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 23/07/2026
“The design of a Joy interpreter written in Joy:” hypercubed.github.io/joy/html/jp-jo… If you have a certain type of brain, you've just been deeply nerd-sniped. Sorry-not-sorry.
hypercubed.github.io
A Joy interpreter written in Joy
000
Reposted by raganwald.com
Reginald @raganwald.social.bau-ha.us.ap.brid.gy · 20/07/2026
> When I talked about my personal blog, I just called it a blog. There was never a situation where “content” would have conveyed a richer meaning. My website visitors aren’t “traffic”; they’re readers. They don’t “generate engagement”; they send me comments […] [Original post on social.bau-ha.us]
004
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 14/07/2026
(), pronounced "parens", is a programming language in which source code consists entirely of '(' and ')'. esolangs.org/wiki/()
esolangs.org
Esolang, the esoteric programming languages wiki
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 14/07/2026
P′′ (P double prime) is a primitive computer programming language created by Corrado Böhm in 1964 to describe a family of Turing machines. P′′ is formally defined as a set of words on the four-instruction alphabet { R, λ, (, ) } as follows: R and λ are words in P′′; If q₁ and q₂ are words in […]
functional.cafe
Original post on functional.cafe
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 08/07/2026
Atomic Programs of Joy by Manfred von Thun “Joy is a functional programming language based on the composition of functions taking one stack as argument and yielding one stack as value. Stacks can contain values of simple types such as truth values, characters and integers, and values of […]
functional.cafe
Original post on functional.cafe
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 08/07/2026
Exploring Regular Expressions and Finite-State Recognizers… By implementing constructive proofs in code. Part I: raganwald.com/2019/09/21/regular-ex… Part II: raganwald.com/2019/12/17/regular-ex…
A visual depiction of the "Shunting Yard" algorithm converting an infix expression into a postfix expression that can be evaluated with a stack.
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 28/06/2026
The MUMPS '76 Primer github.com/rochus-keller/MUMPS/blob… Anecdote: I was once the web banking tech lead for a US bank with 3-4 million clients. Yes there was Java. Yes there was Oracle. Yes there was MiddleWare. And yes there was XML. Very J2EE. But buried […]
functional.cafe
Original post on functional.cafe
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 28/06/2026
I'm busy with Balanced Parentheses, but just as APL was opinionated about using characters that weren't available on every English language keyboard, is there an esolang the depends upon Susan Kare's “Cairo” font from 1984?
A grid of "dingbats" from Apple Computer’s “Cairo” font that shipped with Macintosh in 1984. Cairo was designed by Susan Kare, the artist who also designed the original Macintosh OS’ iconography.
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 25/06/2026
More algorithm fun using Balanced Parentheses as the McGuffin! williamdue.github.io/blog/parallel-…
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 17/06/2026
This space devoted to selling you on reading this book... Has no content. raymondsmullyan.com/books/to-mock-a…
raymondsmullyan.com
To Mock a Mockingbird and Other Logic Puzzles | The Raymond Smullyan Society
To Mock a Mockingbird and Other Logic Puzzles
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 17/06/2026
RE: mas.to/@deprogrammaticaipsum/116766… One Saturday a generation ago—2002-11-09—Paul Graham ran a one-day conference for fans of "Lightweight Languages" at MIT. There was a morning keynote, a bunch of presentations, lunch, and afternoon keynote, more presentations, and […]
functional.cafe
Original post on functional.cafe
001
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 16/06/2026
"This esolang of yours, I presume you brought your favourite JavaScript features over?" Well, I dunno about ✌🏽favourite✌🏽, but yeah, its lists can and often do have holes in them.
### the list interpretation of balanced parentheses

Chaining cons cells together by the `cdr` pointer creates a list. For example, this is a list of five holes —`()()()()()`—diagrammed to show the links:

```mermaid
graph LR
	EmptyPair@{ shape: dbl-circ, label: "()" }
	Five(["()()()()()"]) --> Four(["()()()()"])
	Four --> Three(["()()()"])
	Three --> Two(["()()"])
	Two --> EmptyPair
```
We don't call it a list of empty pairs. The pairs we write in text notation are containers, and if the pairs contain empty, than we say this is a list of five holes. 

A list of five empty pairs looks like this:

```mermaid
graph TD
	EmptyPair@{ shape: dbl-circ, label: "()" }
	Five(["(())(())(())(())(())"]) --o EmptyPair
	Five --> Four(["(())(())(())(())"])
	Four --o EmptyPair
	Four --> Three(["(())(())(())"])
	Three --o EmptyPair
	Three --> Two(["(())(())"])
	Two --o EmptyPair
	Two --> One(["(())"])
	One --o EmptyPair
```
050
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 13/06/2026
No good can come of slouching towards an esolang with cons cell semantics and lots of idiotic silly parentheses that aren't actual S-expressions.
### the cons cell interpretation of balanced parentheses

An empty pair of parentheses is a cons cell with both its `car` and `cdr` pointing to the empty string (`ε`). The `car` pointer terminates in a circle, the `cdr` pointer terminates in an arrow.

```mermaid
graph LR
	A(["()"]) -- car --o E:::transparent@{ shape: circ, label: "ε" }
	A -- cdr --> E
	classDef transparent stroke:#ffffff, fill: #ffffff
```

Either or both can point to another cons cell:

```mermaid
graph LR
	B(["(())"]) -- car --o A
	B(["(())"]) -- cdr --> E
	A(["()"]) -- car --o E:::transparent@{ shape: circ, label: "ε" }
	A -- cdr --> E
	classDef transparent stroke:#ffffff, fill: #ffffff
```
```mermaid
graph LR
	C(["()()"]) -- car --o E
	C(["()()"]) -- cdr --> A
	A(["()"]) -- car --o E:::transparent@{ shape: circ, label: "ε" }
	A -- cdr --> E
	classDef transparent stroke:#ffffff, fill: #ffffff
```
```mermaid
graph LR
	D(["(())()"]) -- car --o A
	D(["(())()"]) -- cdr --> A
	A(["()"]) -- car --o E:::transparent@{ shape: circ, label: "ε" }
	A -- cdr --> E
	classDef transparent stroke:#ffffff, fill: #ffffff
```
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 12/06/2026
After several difficult and challenging minutes of intensive linkmaxxing, I'm excited to announce that I have shipped a YouTube playlist collecting those of my programming-related presentations that have been generously made available on that platform by good people who gave me an opportunity to […]
functional.cafe
Original post on functional.cafe
000
Reposted by raganwald.com
Reginald @raganwald.social.bau-ha.us.ap.brid.gy · 10/06/2026
Pretty much the coolest thing you can do with Lisp is write a Lisp. It’s not just possible, it's *encouraged*. The fact that Claude expressly prohibits us from using Claude to build a Claude while they brag about using Claude to build Claude? I’m against this with every fibre of my soul. It’s […]
social.bau-ha.us
Original post on social.bau-ha.us
123
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 10/06/2026
“A design pattern that doesn’t change the way you think about programming isn’t worth internalizing” (after Dr. Alan Perlis) Example: The Command Pattern, aka “First-Class Commands.” If we think, “Oh, that’s just how to implement undo, but who cares, web development is about moving fast and […]
functional.cafe
Original post on functional.cafe
010
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 09/06/2026
TFW the least authoritative person you know is cited as a source by AI.
Search Assist

OOP (Object-Oriented Programming) is often humorously referred to as POO
(Programming Out Of Order) in some discussions, highlighting the idea that it can be misapplied or overused. This playful term suggests that while OOP is a valuableprogramming paradigm, it can sometimes lead to unnecessary complexity in code.

Wikipedia raganwald.com

Auto-generated based on listed sources. May contain inaccuracies. Was this helpful?
110
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 26/05/2026
TreeRegex is a superset of Regex that works with a serialized format for tree-structured text such as programming languages.In addition to introducing special parentheses for marking the structure in the serialized form, there are additional elements in the TreeRegex for matching trees and […]
functional.cafe
Original post on functional.cafe
010
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 24/05/2026
Balanced Parentheses as a McGuffin for the coding pattern "Make the solution isomorphic to the problem definition.” raganwald.com/2018/10/17/recursive-…
raganwald.com
Pattern Matching and Recursion
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 23/05/2026
Working on a new essay, and had an r/im14andthisisdeep "insight:" The XY Problem is loosely related to Hamming Questions in that both describe an attempt to get at the root problem to be solved.
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 20/03/2026
RE: social.bau-ha.us/@raganwald/1162619… My author is at it again.
000
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 17/03/2026
"Code should be written to be verified, and only incidentally to be executed" Proposition: Code written in functional languages is both intrinsically and extrinsically more verifiable. Intrinsically because of idempotency. Extrinsically because social forces happen to have resulted in code […]
functional.cafe
Original post on functional.cafe
010
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 11/03/2026
A fresh result in the pursuit of finding something interesting about "balanced parentheses." Having already sorted out how to generate every finite balanced parentheses string, we now can parse a string and determine if it is balanced with recursion […]
functional.cafe
Original post on functional.cafe
000
Reposted by raganwald.com
raganwald.com @raganwald.functional.cafe.ap.brid.gy · 24/10/2025
One of the finest things ever written abut the state of computing... And an excellent shaggy dog story: “The Emperor's Old Clothes,” Dr. Tony Hoare's 1980 Turing Award lecture. pascal.hansotten.com/uploads/hoare/…
001