3 ms·
For those of you who don't know anything about J, it's a modern dialect of APL; an extremely concise functional programming language based on function concatena
by silentbicycle 16y ago
For those of you who don't know anything about J, it's a modern dialect of APL; an extremely concise functional programming language based on function concatenation and vector operation. The APL languages are very interesting, but have historically been proprietary and somewhat insular.
* http://jsoftware.com/ http://jsoftware.com/
* http://en.wikipedia.org/wiki/J_%28programming_language%29 http://en.wikipedia.org/wiki/J_%28programming_language%29
* A good intro - _J for C Programmers_ (http://www.jsoftware.com/help/jforc/contents.htm http://www.jsoftware.com/help/jforc/contents.htm)
* A more casual intro - "Mind if I do a J?" (http://jeffzellner.com/miidaj/ http://jeffzellner.com/miidaj/)
- gruseom 16y agoThanks. I'm glad you keep on top of this stuff for us. Interesting to see the name Iverson in the OP; is Eric Ken's son?
- sofuture 16y agoI believe so, yes.
- limmeau 16y agoI glanced over the J for C table of contents to find out where J keeps anything like product and sum types, but I found no promising headlines. Is that just J's way of saying "if it's not a matrix, don't use J", or am I missing something fundamental here?
- silentbicycle 16y agoBox/open are the primitives you want. Box wraps other values (possibly with different types or sizes) in one array, kind of like a C struct. Open extracts sub-elements. Box: http://www.jsoftware.com/help/dictionary/d010.htm http://www.jsoftware.com/help/dictionary/d010.htm Open: http://www.jsoftware.com/help/dictionary/d020.htm http://www.jsoftware.com/help/dictionary/d020.htm
- ableal 16y ago> _J for C Programmers_ (http://www.jsoftware.com/help/jforc/contents.htm http://www.jsoftware.com/help/jforc/contents.htm) Thanks. For those who prefer PDFs, that book and more material are available at http://www.jsoftware.com/jwiki/Books http://www.jsoftware.com/jwiki/Books . (Had to dig around a bit, because, in spite of the original URL, the book was not listed in the help page.) Question: I have a vague memory of seeing a web page named something like "A Garden of ..." with neat examples, either for J or K. However, my search-fu is failing me.
- silentbicycle 16y agoSomething like http://www.jsoftware.com/jwiki/Essays http://www.jsoftware.com/jwiki/Essays ?
- ableal 16y agoYes, that's probably it, thank you. (There's a couple of brain cells in the back muttering that the page was less dense and tan colored, but I told them to shut up ;-) Now let's sell tickets to some cage fights, for instance http://www.jsoftware.com/jwiki/Essays/Sudoku http://www.jsoftware.com/jwiki/Essays/Sudoku versus http://norvig.com/sudoku.html http://norvig.com/sudoku.html P.S. The credit at the bottom of the J Sudoku piece led me here: http://www.vector.org.uk/ http://www.vector.org.uk/ . Seems an interesting place to visit. It even features articles headed "APL is not for programmers" (quote: "At this point the average programmer turns off, drops out, gets his coat and leaves the building, heading for mom and the kids. We, on the other hand, will continue.")
- beagle3 16y agoIf you want cage fights, you should also include the lean contender: http://nsl.com/k/sudoku/aw3.k http://nsl.com/k/sudoku/aw3.k (I'll copy it here, because it's short enough for that: p,:3/:_(p:9\:!81)%3 s:{*(,x)(,/{@[x;y;:;]'&21=x[&|/p[;y]=p]?!10}')/&~x}
- gtani 16y agoVery cool, I should look into this. IBM APL2 was one of the first languages I spewed out lots of code in (the others being awk, C, scheme and some proprietary database langauges, ). The APL workspaces I worked on were some of the largest in existence, according to IBM consultants we had on-site (tens of thousands of lines of code, if I remember correctly). Whew.