4 ms·
So basically "use it as a language for combinators", right? But combinator languages are pretty hard to read no matter what one does, don't they?
by dottedmag 4y ago
So basically "use it as a language for combinators", right?
But combinator languages are pretty hard to read no matter what one does, don't they?
- kragen 4y agono forth is ruthlessly imperative c: x = a[n-1]; n += y * x; plot(x, y, n); forth: : foo n @ 1- a @ x ! ; \ ‡ : bar y @ x @ * n +! ; : baz x @ y @ n @ plot ; : quux foo bar baz ; naming each line of code allows you to do things like bar n ? to see what n is after you bar in exchange for the somewhat rebarbative syntax and lack of typing you get turing-complete macros (with full compiler access, without the pitfalls of string-replacement macros) and an interactive repl that fits into almost the smallest microcontrollers because you have total freedom to redefine the syntax you can construct whatever dsl you prefer it is nothing like combinatory logic except that you can occasionally write a point-free function ______ ‡ this assumes a is defined as something like this : array create cells allot does> swap cells + ; 20 array a so that 3 a computes an &a[3] suitable for @ and !, etc.