3 ms·
5) It looks you could easily implement APL as a DSL within an existing language with an extensible parser. Racket, for instance. I'm working on something along
by kd0amg 12y ago
5) It looks you could easily implement APL as a DSL within an existing language with an extensible parser. Racket, for instance.
I'm working on something along these lines, but not planning on keeping the APL/J-like syntax (the many meanings of juxtaposition makes parsing a line depend on the run time values attached to names). You can get more of the core idea of APL out of prop:procedure than out of extensible parsing.
- michaelfeathers 12y agoI've been doing something similar as a gem to add J commands to Ruby: https://github.com/michaelfeathers/jop https://github.com/michaelfeathers/jop The fluent interface is likely to win because I don't want to implement hook and fork.
- kd0amg 12y agoAre dyads only done by putting the other operand in the string of J code? Or is there a nice way to apply a dyad to two Ruby arrays? (I wasn't sure from the Readme if this is already there or your second point in "future directions," and I'm pretty new to Ruby)
- michaelfeathers 12y agoNo real nice way. I'm not sure where I am going to go with this, I could use a string interpolation but I'm hesitating.