HN user

razetime

121 karma
Posts10
Comments26
View on HN

Let's change the first line:

One misconception is that languages like J are in the same caliber as less practical languages (esoteric languages like brainf*k) that use symbols more than words. The assumption is that these are mostly for recreational programming.

Making some crude assumptions here, I believe you've already invested a lot of time into studying python, or some other well known language. Understanding python or C gives you an idea of hundreds of other languages because they use similar keywords and structures to represent their code. English also helps a great deal in understanding these languages.

Now, looking at this, giving a language like APL or J a chance means that you have to spend time learning their kind of notation. If you spend your time looking at APL without making an effort to understand it, then you cannot be surprised that it looks like regex to you.

Well, yes, there's other languages like Julia, MATLAB and such if you want familiar, approachable syntax for array programming. Nial (https://nial-array-language.org/), which is inspired by APL, mostly uses words instead of symbols, which you may find more intuitive.

In K, terseness is part of the package, and it is considered good, because you can see the innards of your code at a glance, there's lesser text to change if you mess up, so on, so forth. Some time investment in the language may or may not help with this.

Jd 4 years ago

J isn't really made to be pretty. It's made to be terse and simple to read once given enough learning effort, and it's made to be a consistent keyboard typable notation.

Hello, one of the maintainers of the wiki here. The major changes are generally divided into:

K2-K4

K5-K6

K7-K9

From my knowledge. Each group has the same general primitives and syntax, and major changes happen between those eras. Since K's design allows removal and addition of features, this is very hard to document. This, combined with Arthur Whitney's rocky relationship with documentation makes most sources of changes anecdotal. Most changes to primitives have been documented in the wiki's primitive pages. I'll have to summarize them in the history pages.

K4 has good docs, and K6 has a well-written manual on oK's repository. The rest are a fill-in-the-blanks game which have to be fished from archive pages and a lot of trial and error. K9, the latest one is still undergoing changes, but there are ongoing efforts to make tutorials in kparc/kcc and estradajke/k9-simples on github.

There are many, many array programmers who choose to write in a literate style. Popular code examples written for toy challenges often tend to be smart one liners whose algorithms cannot be easily put in multiple lines, so they may look unreadable for people unfamiliar with the languages. A terse compact code style often works well with the language's design.

If you'd like some examples of traditionally literate array programming, you can see:

- tangentstorm's J streams: https://www.twitch.tv/tangentstorm

- tangentstorm's J repositories: https://github.com/tangentstorm?tab=repositories&q=&type=&la...

- Dyalog's APL repositories: https://github.com/orgs/Dyalog/repositories?q=&type=&languag...

Some array programmers inspired by Arthur Whitney write code like this. I wouldn't call it an abomination per se, it's a specific style meant for a specific person. They find that way of writing C to be nice. It's somewhat popular among people who implement K-like array languages.

A usual result of using array languages is a want to have that same terseness in other languages. Array languages usually deviate from the style and aesthetic of general programming languages. It may be jarring to look at, but as with anything, a little experience with using them can go a long way with understanding why many people work with something so "unreadable".

Stages of Denial 5 years ago

It's all up to preference, really. It took me a while to get around my muscle memory from general imperative programming by the time I started using languages like K competently. Getting that motivation is definitely hard.

Stages of Denial 5 years ago

Iverson wanted consistent symbols and rules for math notation. So it's math first, then programming language next. Makes it extremely strong with describing algorithms, but gets a bit complicated for programming.

Learning APL 5 years ago

APL's ASCII based relation, J is opensource(GPL, I think). [BQN](https://mlochbaum.github.io/BQN/) is a newer rationalized entry which is completely FOSS.

K is another array language which has a proprietary implementation. Tcl is a relatively popular proprietary language.

Try APL 5 years ago

I doubt there is one. I know of Dyalog's backend and web service frameworks, but I don't think there has been a use of APL's notation for HTML/CSS/JS programming.