Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> what would you say about the J language's notation if the authors one day decided to change all the symbols to non-ASCII characters?

That's a very interesting question. I think the only possible answer has to be that this would return the language to what I am going to label as the right path. It would be wonderful.

APL is the only programming language in history to attempt to develop a notation for computing. Iverson actually invented it to help describe the inner workings of the IBM mainframe processors. Any hardware engineer who has ever read a databook for, say, an Intel (and other) processors has run into APL-inspired notation that made it into the language of explaining how processor instructions work. It's a remarkable piece of CS history.

> besides the symbols being converted to ASCII characters, APL and J are generally the same

Let's call it "notation" rather than "symbols". The distinction I make is the difference between a language and just a set of glyphs that not entirely related to each other.

You might want to read Iverson's original paper on notation. It makes a very strong argument. Coming from the man who created APL, this is powerful. It also --at least to me-- tells me that his detour into J had to be motivated by business pressures. There is no way a man makes such an effort and defends a notion with such dedication for three decades only to throw it out for something that isn't objectively better.

I don't think we can find a paper from Ken Iverson that says something like "I abandoned three decades of promoting a new notation for computing and created J because this is better". You will find statements that hint at the issues with hardware of the era and the problems this created in popularizing APL.

Here's my lame attempt to further explore the difference. I don't know Korean at all. I just used Google translate and this is what I got for "hello from earth":

지구에서 안녕

I count seven characters, including the space.

Let's create J-korean because we are in the 80's and it is difficult to display Korean characters.

지 This looks like a "T" and an "L": So "TL".

구 This looks like a number "7" with a line across it: "7-"

에 This looks like an "o" with two "L"'s, one with a pre-dash: "O-LL"

서 This looks like an "A" with a dashed-"L": "A-L"

안 This looks like an "o" with a dashed-"L" and another "L": "OLL-"

녕 This looks like an "L" with two dashes and an "O": "L--O"

Space remains a space.

Here's that phrase in J-korean:

TL7-O-LLA-L OLL-L--O

It's a mess. You can't tell where something starts and ends.

OK, let's add a separator character then: "|"

TL|7-|O-LL|A-L| |OLL-|L--O|

Better? Well, just in case we can do better, let's make the space a separator. Two spaces in a row denote a single space:

TL 7- O-LL A-L OLL- L--O

We have now transliterated Korean characters into an ASCII printable and readable combination of characters.

Isn't this an abomination?

We destroyed the Korean language purely because computers in the 80's could not display the characters. We have now trifurcated the history of the language. Which fork will people adopt? Which will they abandon? Will all books be re-written in the new transliterated form?

Which of the above encodings (real Korean and the two transliterations) conveys, communicates and allows one to think in Korean with the least effort and the greatest degree of expressive freedom?

If I, not knowing one bit of Korean, expressed a strong opinion about J-korean being better because it doesn't use "funny symbols" I would not be treated kindly (and rightly so).

I don't know if this clarifies how I see the difference between APL and J. Had we stayed with APL's notation, evolved and enriched it over the last few decades we would have had an amazing tool for, well, thought and the expression of computational solutions to problems. No telling where it would have led. Instead Iverson took a path driven by the limitations of the hardware available at the time and managed to effectively kill both languages.

I happen to believe that the future of AI requires a specialized notation. I can't put my finger on what this means at this time. This might be a worthwhile pursuit at a future time, if I ever retire (I can't even think about what that means...I love what I do).

Here's Iverson's paper on notation. It is well worth reading. It really goes into the advantages of notation to a far greater level of detail than is possible on HN comments:

https://www.eecg.utoronto.ca/~jzhu/csc326/readings/iverson.p...



> I happen to believe that the future of AI requires a specialized notation. I can't put my finger on what this means at this time. This might be a worthwhile pursuit at a future time, if I ever retire (I can't even think about what that means...I love what I do).

I also share this opinion and I might know what you mean. A lot of breakthroughs in physics are due to new notation – e.g. Maxwell's equations, Einstein notation, etc. Or to be precise, it is easier to think new thought in notation/language that is suited for it.

Current machine learning is a 90:10 blend of empirical stuff followed by delayed theory. A language for theory-based ML is math with paper and pencil. However language for empirical experiments are PyTorch, Tensorflow, JAX, DEX, Julia, Swift, R, etc. Former is "dead" historical language, latter are notations for differentiable computational graphs that can be run on modern HW accelerators. If you look at what have those programming languages in common is that they were all influenced by APL. And funny enough, machine learning is the best use case for APL, but practically non-existent. APL should be reborn as differentiable tensor-oriented notation. That would be wild – prototyping new ML architectures at the speed of thought.

Anyway, another angle for APL + ML is an alternative interface – write APL with pencil on paper that understands your handwriting and evaluates your APL scribbles. [0] I committed myself to provide a BQN [1] with such interface and see where it leads.

Ideally, the best outcome would be the combination of both approaches.

[0] https://www.youtube.com/watch?v=0W7pPww6Z-4 [1] https://mlochbaum.github.io/BQN/


Thank you for the discussion. I am now convinced but unfortunately, I cannot confidently say that I deeply understand.

I've taken a shot at the linked paper but will require more readings to fully grasp what it's saying. However, between what I understood of the paper and the example that you provided, it makes sense that J would be considered an abomination of APL.

Hopefully, after reading the paper a few more times and maybe even trying out APL, I'll have a better understanding. Thanks again for your time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: