4 ms·
For those of you who like this stuff, the "J Incunabulum" will probably be really interesting. It's an early draft of a J interpreter, written in J-styled C. h
by silentbicycle 17y ago
For those of you who like this stuff, the "J Incunabulum" will probably be really interesting. It's an early draft of a J interpreter, written in J-styled C.
http://www.jsoftware.com/jwiki/Essays/Incunabulum http://www.jsoftware.com/jwiki/Essays/Incunabulum
Also, unlike Brainfuck, unlambda, lolcode, malborge, etc., J and related languages are used for real work. They're just really dense, like regular expressions for vector/matrix math.
- DannoHung 17y agoWhat you really have to love is the complete lack of comments.
- silentbicycle 17y agoIt's a one-page draft of an interpreter for a subset of a language, by one of the main designers involved with it, written to the initial designer. It's written in C, but idiomatically written as closely to the language as possible. Having comments would be pretty strange, honestly. There's an unpacked and commented version of it here, FWIW: http://www.kuro5hin.org/comments/2002/8/30/175531/763/1#1 http://www.kuro5hin.org/comments/2002/8/30/175531/763/1#1
- DannoHung 17y agoYeah, except he does the same thing in every language, even in written english. I'm not criticizing it anyway. His K is very clean... usually. edit: I do wish he'd be a little less terse in the code for interfacing with other C code. Just as a favor to us normal humans.
- silentbicycle 17y agoAgreed. I think it's atrocious C style, it just makes sense for people who write J natively to style the C that way in a context where it will be understood.
- coliveira 17y agoThis is a really interesting piece of code. The style of C programming looks unreadable for the uninitiated, but is in fact very close to what in do in mathematics. I will try to play with this style myself (not for working code, of course).
- deleted 17y ago[deleted]
- jcw 17y agoThat's some interesting code, but would be more interesting if it worked. Segfaulted. K is also fun, but considerably less fun to toy around with now that GUI functionality was taken out of the standard lib.
- silentbicycle 17y agoIt's very old, pre-K&R C. It segfaults for me, too, in ga. It got me interested in the language, but rather than trying to rewrite it, I decided to go through "J For C Programmers" (http://www.jsoftware.com/help/jforc/contents.htm http://www.jsoftware.com/help/jforc/contents.htm) on my lunch breaks. The APL language family has several interesting ideas, the fanatically terse syntax is just the first one everybody notices.
- arakyd 17y agoConsiderably less fun to toy around with now that the only way to get a non completely crippled version is to pay megabucks (or work at a company that develops in it). If I'm wrong, please please clue me in...
- blasdel 17y agoThe 'J-styled C' reminds me of how the original Bourne shell was written with ALGOL syntax in C using cpp macros, and implements a language with ALGOL-flavored syntax.