Tiny Great Languages: Languages in under 75 lines of code (blog series + GitHub) (zserge.com)
from armchair_progamer@programming.dev to programming_languages@programming.dev on 18 Sep 2024 20:11
https://programming.dev/post/19561981

GitHub (source code for all languages), also linked above.

The GitHub says “50 lines of code” but the largest example is 74 lines excluding whitespace and comments.

#programming_languages

threaded - newest

FizzyOrange@programming.dev on 18 Sep 2024 21:34 collapse

Very cool. To be honest most of these languages (except maybe Lisp and BASIC) are pretty awful. I can’t imagine writing anything in them. Especially K. That’s got to result from some form of brain damage…

It’s only 7 bytes of code. !10 returns a list of numbers 0 to 9. 1+!10 adds 1 to each of them resulting in a list [1, 2, …, 10]. Finally /1+!10 applies * verb with scan adverb and returns 123…*10 which is a factorial of 10.

But it processes arrays of numbers in such an elegant way what no other language can compete with it (well, maybe numpy).

Uhm yeah or maybe MATLAB? I mean I mainly like MATLAB because of its unbeatable plotting abilities, but even MATLAB can do prod(1:10). I am very happy to spend 3 extra bytes on that readability improvement!