3 ms·
It would be very interesting to see some code in CL, which would allow to run embedded J. Not a Lisp equivalent - since notation is important - but straight J.
by avmich 12y ago
It would be very interesting to see some code in CL, which would allow to run embedded J. Not a Lisp equivalent - since notation is important - but straight J.
- frou_dh 12y agoIn that case why not pipe in & out of a J interpreter child process?
- dragonwriter 12y ago> It would be very interesting to see some code in CL, which would allow to run embedded J. Not exactly CL, but it seems like a natural fit for Racket.
- sedachv 12y agoThe closest thing is Redick (https://code.google.com/p/redick/ https://code.google.com/p/redick/), but that's still just S-exp syntax. It wouldn't be hard to write a readtable to parse J syntax.
- kd0amg 12y agoJ's notation is a bit problematic for anything that has completely separate phases for translation and execution. An identifier may stand for a noun (array), verb (first-order function), adverb (unary second-order function), or conjunction (binary second-order function). Which one it stands for affects how the line containing it should be parsed but is not really known until run time. Historically, implementations of APL family languages have generally gone back and forth between reading a line, executing it, reading another line, etc.
- beagle3 12y agoTrue, but K doesn't have this problem - the parsing is entirely lexical, like Lisp (and unlike J, C and C++)
- malisper 12y agoSeems possible. You would need to write a j->cl compiler, but once you have that, the rest is trivial.