Live data from Hacker News

A look at the J language: the fine line between genius and insanity

scottlocklin.wordpress.com

31–37 of 37 posts

Re: A look at the J language: the fine line between genius and insanity

#31
post #5

A relevant question on the Quantitative Finance StackExchange as to whether J/JDB can be used as an effective replacement for Q/KDB+ can be read here: http://quant.stackexchange.com/questions/1870/can-the-j-lang...

From what I understand, J has a lot of problems with efficient implementation because array ranks (multi-dimensional arrays) influence how operations are carried out (http://jsoftware.com/help/learning/07.htm), and the ranks are not known in advance. [ranks also have horribly complicated semantics: http://www.jsoftware.com/papers/rank1.htm]

K doesn't have this problem because it only has vectors.

Re: A look at the J language: the fine line between genius and insanity

#32
"The problem is the price is not right for me at this stage."

Well, I'm pretty sure Whitney's enlightened path to k went through LISP, so maybe the author will get there one day. And LUSH seems a pretty nice choice of LISP's to work with - extendable, but not too big out of the box.

Re: A look at the J language: the fine line between genius and insanity

#35
post #17
post #12

FTA: > The C source code for this is intensely beautiful, and very concise. Go look at it! Which links to https://github.com/kevinlawler/kona This has to be a joke - just pick a random file and tell me what is beautiful about that. LoseThos looks saner than this code.

They are just writing the C interpreter in a style that reassembles the target language as much as it is possible, I guess you would have to understand some K to better understand what they are up to in the C code.

It brought up memories of the original Bourne shell source code which used a plethora of CPP magic to make the code look more Algol-ish, and thus similar to its final product.

Re: A look at the J language: the fine line between genius and insanity

#36
post #28

Earlier quoted context omitted.

This has to be a joke Everyone has this reaction when first exposed to this class of languages and their implementations - everyone. You're unfamiliar with the style, and you're confusing that with it being ugly/unreadable/dumb. I assure you it's anything but. Now let's page silentbicycle and get him to explain :)

You're unfamiliar with the style, and you're confusing that with it being ugly/unreadable/dumb. I can't speak for GP, but I promise you I've spent plenty of time reading code with single-letter identifiers. If I'm going to have to actually understand some code, I'd much prefer descriptive names.

While I personally dislike this style of c, you should know that j/k/apl style languages are focused around a very small number of operators. In this sense they are a mathematical notation (and in fact, APL was designed as a rationalized mathematical notation first, programming language later).

So the single character identifiers are not intended as something application specific, or mutable values. They are like +, *, %.

That said, I still think it's better to stick to the conventions of the implementation language when writing an interpreter, rather than attempt to contort it half way to your target language. If you want a self hosted implementation, just write a compiler.

Re: A look at the J language: the fine line between genius and insanity

#37
post #33
post #8

On a related note, have a look at the one page prototype interpreter by Arthur Whitney that later became J, a true work of art: http://www.jsoftware.com/jwiki/Essays/Incunabulum

Like art is also isn't terribly practical.

That page of code is a known classic that gave rise to two brilliant language implementations (J and K). It is highly practical. It's just unfamiliar.
Post reply on HN