#plt

2026-01-22
How easy it is to construct an APL or K-like programming language

(by Mohammed Jamal Alrujayi)

This was an amazing article I found on the orange site published just last week. He notes that although APL and K are of the Harvard school of languages, while Lisp is of the MIT school, they are fundamentally related in their minimalism and in how the languages are structured around a single data type: Lists for Lisp, and vectors/matrices for APL. The two schools of thought were unified in the K programming language by Arthur Whitney:

On kparc.com (his personal website) he listed K’s lineage simply as “lisp and apl,” linking to Iverson’s Turing paper and Perlis’s lyrical programming.

I didn’t know much about Iverson’s family of languages (#APL, J, #BQN, K, and so on), but seeing it embedded in just a few lines of code in a high-level language like #Python suddenly makes it so much easier to understand. The syntactic keywords are basically composed of either infix operators of mapping operators, the data (constants or variables) are like leaves of the syntax tree. So all you need are three lambdas: “atom” checks if it’s argument is a number, monad serves as apply or map depending on the type of it’s arguments and abstracts it into a lambda, and “dyad” constructs an infix operator abstracted into a curried lambda. You only need those three rules!

atom = lambda x: isinstance(x, (int, float, str))
monad = lambda f: lambda x: f(x) if atom(x) else list(map(monad(f), x))
dyad = lambda f: (lambda x, y: f(x, y) if atom(x) and atom(y)
  else list(map(lambda yi: dyad(f)(x, yi), y)) if atom(x)
  else list(map(lambda xi: dyad(f)(xi, y), x)) if atom(y)
  else list(map(lambda xi, yi: dyad(f)(xi, yi), x, y)))

Now I definitely want to try this as Scheme macros!

#tech #software #Lisp #APL #KProgrammingLanguage #JProgrammingLanguage #ProgrammingLanguages #PLT

Lobsterslobsters
2026-01-20

Crane is a new extraction system from Rocq to C++ lobste.rs/s/cvqjov ++
github.com/bloomberg/crane

Lobsterslobsters
2026-01-20

How would software look if hardware had stopped improving long ago? lobste.rs/s/wlxuty

Lobsterslobsters
2026-01-20
Lobsterslobsters
2026-01-19
2026-01-19

Autovectorization seems like a cool way to write cross platform SIMD code. But does anyone know of solutions to the insight issue? If I were to write a function which relies on autovectorization, wouldn't I literally have to 1) compile with every compiler + compiler settings + CPU arch + platform I wanna support, 2) disassemble all resulting binaries, 3) read analyze the assembly code to verify that it's vectorized how I expect, and 4) repeat for every change?

#programming #simd #compilers #plt

2026-01-18

RE: fantastic.earth/@abnv/11590540

“I finally finished my Implementing Co series of posts. It took me only four years and nine months.”

few technical writers share @abnv ’s clarity. i wish he’d write a book. go enjoy the last chapter of his fantasy language, #plt nerds. ❤️

2026-01-17

kip: A programming language based on grammatical cases of Turkish

fed.brid.gy/r/https://github.c

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst