News for hackers. Stuff that matters.
Re:A look at the J language: the fine line between genius an... by VMG on Wednesday September 19, 2012 @09:11AM (#4543336)
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.

Re:A look at the J language: the fine line between genius an... by stiff on Wednesday September 19, 2012 @09:33AM (#4543436)
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.
Re:A look at the J language: the fine line between genius an... by mhd on Wednesday September 19, 2012 @06:26PM (#4545881)
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 an... by BMarkmann on Wednesday September 19, 2012 @09:42AM (#4543467)
Kona is actually an implementation of k (not sure if he's planning to support q, which is k's successor), a cousin of J.

K was originally written by http://en.wikipedia.org/wiki/Arthur_Whitney_(computer_scient..., and having seen some of his C code, this looks like a very similar style. Take a look here: http://www.nsl.com/papers/origins.htm

edit: included link to a better source example

Re:A look at the J language: the fine line between genius an... by andreypopp on Wednesday September 19, 2012 @12:03PM (#4544132)
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 an... by gruseom on Wednesday September 19, 2012 @02:04PM (#4544701)
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 an... by argv_empty on Wednesday September 19, 2012 @02:26PM (#4544813)
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 an... by jasonwatkinspdx on Thursday September 20, 2012 @12:26AM (#4546942)
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 an... by eru on Wednesday September 19, 2012 @09:29AM (#4543415)
It's concise, at least.
Re:A look at the J language: the fine line between genius an... by unreal37 on Wednesday September 19, 2012 @10:46AM (#4543771)
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.