An Implementation of J – Incunabulum (2008)
jsoftware.com
jsoftware.com
The original code is worth investigating if you're into CS archeology. J is as interesting of a language as Lisp and I was amazed by the tiny implementation. However, the original code is buggy and will crash on slightly malformed input.
I find the story behind incunabula really fascinating. Also, for what it's worth, incunabulum / incunabula sounds quite odd in Italian (it resembles some dirty words), and the few times it got mentioned here and there, most people don't know what it means and assume the worst.
[0]:http://www.jsoftware.com/pipermail/chat/2020-March/008507.ht...
I'm getting this when trying to run it:
$ cc main.c
... lots of warnings ...
$ ./a.out
1
1
2*2
Segmentation fault (core dumped)It worked fine for me when I was careful to stay within what it actually supported, bearing in mind it’s a fast and rough implementation not something for production use.
Edit: thanks very much to commenters below for showing how wrong I was to assume the above :)
If you'd like some examples of traditionally literate array programming, you can see:
- tangentstorm's J streams: https://www.twitch.tv/tangentstorm
- tangentstorm's J repositories: https://github.com/tangentstorm?tab=repositories&q=&type=&la...
- Dyalog's APL repositories: https://github.com/orgs/Dyalog/repositories?q=&type=&languag...
A usual result of using array languages is a want to have that same terseness in other languages. Array languages usually deviate from the style and aesthetic of general programming languages. It may be jarring to look at, but as with anything, a little experience with using them can go a long way with understanding why many people work with something so "unreadable".