3 ms·
I have some thin (read: incomplete) notes that hint at how math-oriented the J verbs are: http://wycd.net/notes/jlang/jlang.pdf http://wycd.net/notes/jlang/jlan
by wyc 12y ago
I have some thin (read: incomplete) notes that hint at how math-oriented the J verbs are:
http://wycd.net/notes/jlang/jlang.pdf http://wycd.net/notes/jlang/jlang.pdf
Among my favorite parts of the language is the sole set of vocabulary[0] that you have to learn to be proficient in J. It's daunting at first, but after this "alphabet" is internalized, you can understand most code. Just as our integral symbols save us from writing out "Integral()", J's operators are shorthand for fundamental computational functions. For example, here's a very naive kNN implementation in J, without pulling in any "jlearn" external libraries or anything:
https://github.com/wyc/snippets/blob/master/j/knn.ijs https://github.com/wyc/snippets/blob/master/j/knn.ijs
One of the stated purposes of J is the clear expression of algorithms. How are you supposed to clearly do that with layers upon layers of abstractions? The language excels at matrix and statistical operations on sets of homogeneous data. Many financial institutions deploy J's close sister, K (also a descendant of APL) coupled with KDB[1].
Does it have potential for use on "Big Data"? Maybe. It's not SMP, but the interpreter is rather light, so it can be spun up in multiple processes. Cutting up the data correctly is still a problem. I would also not use J to write a webapp; CRUD isn't its strong point.
Some more examples of J:
https://github.com/wyc/snippets/blob/master/j/jtalk/examples.txt https://github.com/wyc/snippets/blob/master/j/jtalk/examples...
Come hang out at #jsoftware on freenode to find people much more knowledgeable than me. :P
[0] http://www.jsoftware.com/help/dictionary/vocabul.htm http://www.jsoftware.com/help/dictionary/vocabul.htm
[1] not the kernel debugger, but the time-series K database: http://kx.com/kdb-plus.php http://kx.com/kdb-plus.php
- agumonkey 12y agoIt recently came to my mind that Math, J, lisp, ml are just anti-marketing artefacts. But on the intellectual/UX they're on point. When you have a good abstractions, and very consistent and orthogonal ones, appearance becomes almost irrelevant. They help you think and that's what matters.
- scottlocklin 12y agoFWIIW, the Jd database is pretty good (which works much like kdb+). It's not designed to work on distributed systems (kdb+ can do this), but it wouldn't be too difficult to make it do this. I recently wrote a discrete wavelet transform algorithm in J. It took 4 lines. I could probably have done it in 1. Granted it took me a while to write these 4 lines, but it's pretty cool being able to take the whole thing in at a glance. While I was at it, I wrote my own query system for a much larger than memory dataset; that part only took a few minutes. One of the great things about J: it teaches you to appreciate the matrix subsystems of things like R. You can do a lot of J in R if you stay away from data.frames. Oh yeah, while the IDE is pretty nice, I use it in emacs. Some resources: Minimal J for beginners: http://www.jsoftware.com/jwiki/DevonMcCormick/MinimalBeginningJ http://www.jsoftware.com/jwiki/DevonMcCormick/MinimalBeginni... A more wordy vocabulary for beginners: http://www.jsoftware.com/jwiki/NuVoc http://www.jsoftware.com/jwiki/NuVoc