Live data from Hacker News

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

scottlocklin.wordpress.com

21–30 of 37 posts

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

#21
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.

FTA: > "Reading his source will make you a better person, even if you don’t understand what is going on."

LOL. Sure, go ahead and stare at all these classes and files with single letter (and single number) names. It will make you a better PERSON.

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

#23
post #11
post #7

Earlier quoted context omitted.

http://www.google.com/search?sourceid=navclient&gfns=1&#... Not entirely sure I understand the problem here.

Not entirely sure I understand what happens here.

It's an I'm Feeling Lucky query, accompanied by a bit of snark.

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

#24
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.

There's a discussion on that — https://github.com/kevinlawler/kona/wiki/Coding-Guidelines

"The unusual appearance is a side effect of writing C as concisely as possible. There are great benefits to writing code in this way. Someone familiar with the style can read and comprehend the code much faster than they could with traditional code. Brevity creates a discipline that reduces bugs. Some of the benefits will not be apparent until you try it. Some of the downsides of the style are inaccessibility and a steep learning curve."

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

#25

I found the codemonk series on J very entertaining as well: http://drj11.wordpress.com/category/j/ Does anyone on the board use J / K daily? What for?

I used Q (the 'friendly' version of K) heavily in my previous job. It was in a high frequency team at an investment bank. All of our tick data was stored in kdb databases. I was in research at the time. You could load the data into whatever your research environment was (R or Matlab for most people) but it was much faster to boot up a Q session and work with everything in-memory, 'closer to the metal'. To that end I wrote

* An order-book builder (which takes quote data and builds it into a data structure suitable for doing research). As I remember, it was one call to 'scan' with a very complicated scanning function.

* An event analysis tool, to let you ask questions like "what's the average response of this asset when event X happens". Used for anything from testing your trading strategies (how does this asset perform when I put a trade on) to news impact (how does this asset react around US employment data).

* Lots and lots of plotting functions. Q actually has some really nice in-built visualization tools (as long as you only want to visualize time series...)

And a bunch of other stuff I've now forgotten about. It's a fun language. I miss it a bit now I do all my work in Matlab.

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

#26
Ah, I love (at least the idea) of the APL languages. My go-to programming syntax mindbender is this video of programming Conway's Game of Life in APL:

http://www.youtube.com/watch?v=a9xAKttWgP4

J is like that but without the special keyboard. I haven't played around with J much, but I know that whenever I've finished a Project Euler problem and checked the forum afterwards for other solutions, the J folks have reduced my 100 line solution to one or two lines...

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

#27
post #6

Dear language creators Stop creating non-googlable language names R already is trouble enough, at least C is more known but still confusing

Given that this language predates the founding of Google by almost a decade I think we can forgive them for not thinking about how "googlable" the name is.

Yeah. Google, on the other hand, has absolutely no excuse at all for using such an ungooglable mess of a name as "Go". It is embarrassing.

When people have to call it "Golang" just to differentiate it from the verb, then you know something is wrong.

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

#28
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.

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 :)

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

#29
post #28
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.

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.

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

#30
It's just mathematical notation. Why is that insane?

What is computing at its most basic level but maths?

If you can handle working with symbols, more power to you. If you can't, move on. It's like calling mathematicians insane because you cannot understand the symbols they use.

I'm never sure if the conditioning of programmers toward certain styles has been good or bad for computing overall. It's troubling when this conditioning causes us to reject what is obviously excellent and useful work. (_if_ we learn how to make use of it)

Post reply on HN