Live data from Hacker News

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

scottlocklin.wordpress.com

21–30 of 70 posts

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

#21

Someone who was _very competent_ with J gave a demo of it at one of the Recurse Center (ne Hackruiter) _Brain Dump_ meetups back in the day and broke the crowd's collective brain. It might as well have been Brainfuck to all of us, but the proof was in the ... STDOUT. I believe they were demonstrating the standard factorial, map/reduce, etc. sorts of solutions you'd expect, but I remember being shocked by the small am…

There's a very elegant Haskell quicksort implementation that misses out on performance because it's not in-place. It's frequently used as a demonstration. The performant version looks as bad as C.

I'd be more interested in a J/K demonstration that plays to the language's strengths. How about live-commentating e-sports?

* Player gets first blood. Commentator executes search query in J across DB. *

"We've seen $PLAYER_NAME contribute to 65% of first blood situations across their last 10 matches."

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

#25
J seems like a language I should learn using flash cards. Make a flash card for each character, for each operation, and just learn all the operators, and then I will know J.

Any truth to this?

I suppose it might be like telling someone, "you know conditionals and loops, now you know how to program!"

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

#26
post #16

Earlier quoted context omitted.

> Here's a video that really illustrates the power of this paradigm: https://www.youtube.com/watch?v=a9xAKttWgP4 Amazing game of life code!

The first time I watched the video my response was that he was literally doing magic or that it was some sort of joke. Over time the video has become more approachable and I have a pretty good idea of what is going on. However, if I was asked to approach game of life in APL myself then I think I would still be pretty lost.

A Sudoku Solver in APL

https://www.youtube.com/watch?v=DmT80OseAGs

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

#27

Earlier quoted context omitted.

I struggled a lot too. I think the main issue is the problem domain in which these languages excel at. I like compilers, systems programming, distributed systems... but math? statistics? I'm admittedly terrible at that and find it really uninteresting. It doesn't help that most literature on J tries to teach its language concepts showing you how to solve math problems. I have no need for a fancy calculator. For what…

My general belief is that these languages would be far more useful as embedded languages; occasionally there is a need for the core of some complicated system to take advantage of their power, but the same design that makes them good at math makes them horrible for writing APIs or database access.

They work better than databases for accessing databases - nsl.com has examples like tables.k , a reasonably efficient in memory ordered-and-mostly-relational database in all of 14 lines of K.

And a variety of spreadsheets, from 2 to 100 lines.

They were sort-of-ok for API access, but Shakti’s FFI is actually incredibly straightforward - comparable to writing a C extern definition only much terser (‘cause it’s Arthur...)

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

#28
post #9

I've learned a bunch of different languages[1], but J (and its friends APL and K) has been both the one that I don't feel I have the patience to learn AND the one that I feel like I might fall in love with if I actually learned it. The incomprehensible programs just seem to hint that there is some sort of maximal information density where every keystroke provides maximal productivity. There's also something artistica…

I struggled a lot too. I think the main issue is the problem domain in which these languages excel at. I like compilers, systems programming, distributed systems... but math? statistics? I'm admittedly terrible at that and find it really uninteresting. It doesn't help that most literature on J tries to teach its language concepts showing you how to solve math problems. I have no need for a fancy calculator. For what…

Actually, it seems that compilers is a domain that APL can potentially excel at.. https://github.com/Co-dfns/Co-dfns

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

#29
post #9

I've learned a bunch of different languages[1], but J (and its friends APL and K) has been both the one that I don't feel I have the patience to learn AND the one that I feel like I might fall in love with if I actually learned it. The incomprehensible programs just seem to hint that there is some sort of maximal information density where every keystroke provides maximal productivity. There's also something artistica…

[deleted]

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

#30

Someone who was _very competent_ with J gave a demo of it at one of the Recurse Center (ne Hackruiter) _Brain Dump_ meetups back in the day and broke the crowd's collective brain. It might as well have been Brainfuck to all of us, but the proof was in the ... STDOUT. I believe they were demonstrating the standard factorial, map/reduce, etc. sorts of solutions you'd expect, but I remember being shocked by the small am…

K is often shorter and simpler than J for these kinds of things, although J’a much richer vocabulary pays off if the problem domain lends itself to J’s immense built in vocabulary.
Post reply on HN