4 ms·
J is awesome. GPL'd J is even better! Some of us are trying to organize our efforts here: https://github.com/openj/core https://github.com/openj/core We don't
by sofuture 16y ago
J is awesome. GPL'd J is even better!
Some of us are trying to organize our efforts here: https://github.com/openj/core https://github.com/openj/core
We don't intend on mucking with the code much at this point, just patching together a better build system, etc.
- jameskilton 16y agoI think I'm more amazed at the C code. Is that obfuscated or a decompiled dump? Or is that how the core of J is really written?
- sofuture 16y agoHah! That is how the code is really written. It's... a unique style, shared amongst the APL languages. I'm pretty sure there are about two people that can read and write that fluently: Roger Hui and Arthur Whitney.
- swah 16y agoBtw, is this related in anyway to Arthur?
- jfager 16y agoAs a wholly unaffiliated, self-selected, and entirely unofficial spokesperson, I'm happy to bestow this lifetime achievement award on behalf of the IOCCC.
- narrator 16y agoPeople who like APL do not often code with readability as their number 1 priority. In fact, to code in APL one must have an outright disdain for the idea that someone else could easily understand their code.
- gnosis 16y agoWith that kind of attitude, they might enjoy programming in Brainfuck or Malbolge even more.
- silentbicycle 16y agoNo, we just have a different idea of what's readable. APL was created to have a mathematical notation that made problem solving easier. Don't believe me? See Iverson's Turing Award lecture,"Notation as a Tool of Thought" (http://www.jsoftware.com/papers/tot.htm http://www.jsoftware.com/papers/tot.htm). "I did pure mathematics in school, but later I was a teaching assistant for a graduate course in computer algorithms. I could see that the professor was getting killed by the notation. He was trying to express the idea of different kinds of matrix inner products, saying if you have a directed graph and you're looking at connections, then you write this triple nested loop in Fortran or Algol. It took him an hour to express it. What he really wanted to show was that for a connected graph it was an or-dot-and. If it's a graph of pipe capacities, then maybe it's a plus-dot-min. If he'd had APL or K as a notation, he could have covered that in a few seconds or maybe a minute, but because of the notation he couldn't do it." - "A Conversation with Arthur Whitney" (http://queue.acm.org/detail.cfm?id=1531242 http://queue.acm.org/detail.cfm?id=1531242)
- gchpaco 16y agoAPL is actually not inherently so bad, because at least the operators have some vague relationship to what they're doing and are all distinct. I can't read J at all because in attempting to embed the APL operator space in ASCII they went in for multiple token operators that can be modified (so =, =., and =: are all different, and actually quite different IIRC). A better way of doing this is Fortress, which tries to use mathematical notation when possible but doesn't try to compress it as small as possible.
- robinhouston 16y agoIt looks as though Kevin Lawler can hold his own in that style, too. https://github.com/kevinlawler/kona/blob/master/k.c https://github.com/kevinlawler/kona/blob/master/k.c
- Locke1689 16y agoThat is one of the most frustratingly idiotic things I have ever seen. Any incentive I had to try this language is now gone and I want to erase the memory of its construction from my mind.
- sofuture 16y agoHow could you look at an APL-family language and then be totally outraged that the implementation took quite a bit stylistically from the language itself?
- billswift 16y agoConventional C style is there to improve its readability and maintainability. Applying APL style to C code is sort of like trying to use Russian grammar with English vocabulary, you might be able to puzzle out the meaning, but it is a stupid waste of time.
- silentbicycle 16y agoActually, given that a substantial part of the codebase involves looping simple operators over vectors, it makes sense to use macros to make the looping implicit. Code like this needs to be read more slowly than usual, because unlike much C code, the information level isn't low enough that you can read it lines at a time. Math papers have all these weird sigma symbols and stuff, too; you can't read just them as fast as you would read "for (i=0; i<N; i++) {" for the millionth time. Likewise, rather than writing "for (i=0; i<N; i++) {" yet again, K just calls that ' and moves on. In the source, there's a macro called DO, which is used extensively. DO(N, Blk) -> for(i=0, int _n=N; i<_n; i++) { Blk } . The APLs are about having a notation that doesn't constantly get in the way of thinking about your actual problem.
- Locke1689 16y agoIn practical implementations we call this code write-only. It's funny that you bring up mathematical notation because mathematical notation is completely optimized for write-only. Mathematics is so obsessed with one letter variable names that they had to gather letters from other alphabets to continue their opaque tradition.
- kragen 16y agoThat's how it's really written. Take a look at the source of A+ sometime.
- gmartres 16y agoThanks for that! I've been trying to use the libraries found at http://www.jsoftware.com/trac/base/browser/trunk http://www.jsoftware.com/trac/base/browser/trunk (svn co http://www.jsoftware.com/svn/base/trunk/ http://www.jsoftware.com/svn/base/trunk/), but I can't seem to be able to load anything: % jconsole |file name error | 0!:0 y load 'packages/misc/fndisplay.ijs' |value error: load | load'packages/misc/fndisplay.ijs' (I tried with absolute paths too) Any idea what I might be missing? And do you know the license of the libraries?