Friday, November 20, 2026

Listack v0.4.1

I finally made an update to my pet programming language, Listack. This was a relatively minor change to the implementation code that makes writing and reading Listack code much easier. That most of the point of Listack, by the way. I think stack-based, concatenative languages are cool. But I admit they’re hard to read, because, like German, the verbs at the end of the sentence are. 😁

The hardest part of almost anything is shedding preconceived notions. I’ve been tinkering with this, off and on, for the last three years. It just occurred to me to swap the syntax for infix and postfix forms, so that the standard (postfix) didn’t need any markers. With the earlier addition of callable form and one-word comments, the language is noticeably easier to read and write now.

Previous: 1 2 .+
Current: 1 2 +

Here are a few ways to do the same thing:
1 2 + 3 *
1 .+ 2 .* 3
+: 1 2 3 *
*(+(1, 2) 3)
1 2 3 \+ dip *

Listack is polymorphic!
`A inc —> `B
1 inc —> 2
1 2 + —> 3
”Hello, “ .+ “there!” —> “Hello, there!”

Single word comments help, too:
#if {dup 0 >}
#then {print println: " is positive!"}
#else {print println: " is not positive!"}
if

Check it out on Github (which really sucks now): Listack

No comments:

Post a Comment

I reserve the right to remove egregiously profane or abusive comments, spam, and anything else that really annoys me. Feel free to agree or disagree, but let's keep this reasonably civil.