APL and J

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

APL and J

Postby ejohnso9 on Sat Feb 10, 2018 6:07 am

I am very, very new to APL - just trying to learn the language.

I am hesitant to even ask this question at all here, but here goes...

The core questions are sort of:
What's good or bad about J vs. APL? (This can be answered in the context of language design itself, and also implementation systems.) Have most APLers tried J before? Never saw any reason to try it? Like it? Don't like it? Why?

It is my sincere desire not to touch off any language or flame wars, but I am trying to understand the place of each language in the world, what's the same and what's different, whether certain features and/or system facilities in one language or the other are better, or it's all more a matter of opinion?

It seems like APL's special character set can be sort of a double-edged sword. Seem like a fair assessment?

Was there any significant move of APL programmers to J as J systems first became available, or did APL programmers mostly stay put? Is J sort of a "toy" language compared to Dyalog APL, or is it equally capable of building real, industrial strength applications? Anybody here use both languages regularly?

The ASCII based character set usage of J vs. APL's special characters is probably the most obvious difference. I guess J array indexing is 0-indexed whereas APL is 1-indexed. I imagine that could be rather annoying if you were very used to one way or another.

I am too green in both languages to have any real opinions of my own, yet and I expect there are a lot of other differences both big and small that I am ignorant of. If people want to about some of those differences, I would be glad to hear it.

So, opinions are fine - I'm not trying to establish any facts here, just trying to learn about the two systems, and what people think and feel. (Feel free to talk about K, Kx, Q, Kona, APLX, A, A++, Matlab, Mathematica, whatever other array-based languages you think are worth talking about.)

I'm also interested in history of APL systems. Have people here always been Dyalog users? Used IBM implementations? Other company's implementations? Any features from old systems that you had in the past the you really miss? Any stories about difficulties (past or present) dealing with APL special symbols (like printing, seeing source code outside of proprietary environments, etc)?

Anybody tried to get a company to use APL where they weren't previously using it or even aware of it? What sort of training issues did you face? Did the company ultimately adopt it? Reject it? Love to hear stories about where APL is being used in companies with other software development going on in other languages and how systems interact, are accepted or rejected, etc.

So... I hope this is considered "on topic" and is posted in the appropriate place. I'm just looking for friendly chat on the broad subject of APL and computer languages, not language bashing. Think of it as an opportunity for old hands to be an ambassador for APL newbies. ;)

Thanks! ;)
Posts: 4
Joined: Fri Aug 04, 2017 12:41 am

Re: APL and J

Postby woody on Sat Feb 10, 2018 3:11 pm

In the beginning, there was APL.
And, it was good.

History here: https://en.wikipedia.org/wiki/APL_(programming_language)

The "special" APL Symbols were a big controversy in the 1980's.

Those APLers who learned the symbols on the keyboard became APL GURUS ... able to write APL code "by touch". The power of APL was in the interactive workspace that could be used to stop, debug, ad hoc, restart and test programs and variables in real-time.

Those companies that embraced APL developed some excellent business applications and solved data integration problems.

IBM (APL2), STSC (APL2000), IP Sharp (SharpAPL), and Dyalog (DyalogAPL) were all "in the game" (along with MicroAPL and a handful of other versions of APL).

Then came NESTED data arrays which extended the language further.

Then came the Personal Computer (Windows OS) and the Mac (iOS).

Then came J (and K) as alternatives to using the APL characters.

Then came UNICODE which unified hundreds of "special Human Character sets including APL". UNICODE allows these special APL characters to be accepted and incorporated into all that we do today.

APL "code" can be freely copied and pasted into email ... with UNICODE character set ... and shared globally. And APL can be stored in Unicode databases, and in MAC and Windows standard OS text files using UNICODE.

Over the past 15 years, DyalogAPL has continued to grow and mature.

DyalogAPL is the "winner" of "the APL Game".


Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
User avatar
Posts: 107
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: APL and J

Postby ArrayMac227 on Sat Feb 10, 2018 3:46 pm

A lot of good questions here. I can see the questions branching into multiple threads. Posting this in comp.lang.apl, either directly or via Google Groups may bring out more than Dyalog-biased answers. IMO, there needs to be a future for APL beyond Dyalog.

If I can get permission from the author, I would like to post these questions on a (f?)AQ page on my on website.
Posts: 47
Joined: Sat Sep 12, 2015 1:40 pm

Re: APL and J

Postby Bob Armstrong on Sun Feb 11, 2018 6:27 pm

There's also now CoSy open to the chip in Forth .
I just uploaded a s" Hello World " demo https://youtu.be/f3pZ55k5z8w aimed mainly at the https://www.facebook.com/groups/PROGRAMMINGFORTH/ .

It's evolved from K , open on GitHub and is the alternative to C based APLs . Still a number of things to flesh out and lock down ( branch and enhance your own on GitHub ) , but it will be around as long as I am .

Oh , and if you like Yoda noun noun verb language , that's Forth .
User avatar
Bob Armstrong
Posts: 11
Joined: Wed Dec 23, 2009 8:41 pm
Location: 39.038681° -105.079070° 2500m

Re: APL and J

Postby ejohnso9 on Sun Feb 11, 2018 6:46 pm

Hmmm, seems there were some problems with the forums yesterday. I had typed a big reply, but it seems to have gotten lost... :(

ArrayMac227:" You are welcome to do whatever you want with my post. All I ask is that my name not be attached to anything I didn't say - beyond that, as far as I am concerned, it's public domain.
Where is your website and FAQ?

So, I think what Woody is saying about Unicode is largely true. I was surprised when I cut some APL code and just pasted it into Vim that characters actually displayed as expected. But how would I type new content in Vim? Anybody know of packages for Vim? Note that, even above the composition window for this forum we have two rows of buttons for special character generation. I can't type "`r" and get '⍴' here. CTRI-I and CTRL-R don't do anything here, so I think this idea that special characters are still sometimes a big pain is not totally antiquated? (Special keyboards could probably be a thread on it's own. Do most APLers actually have a special keyboard? Are they pretty much a thing of the past?
Seems unneeded within the Dyalog environment? Anybody want to talk about special keyboards?)

Still hoping to hear some discussion regarding J? "I never saw any reason to try it" is a perfectly valid opinion. I haven't really tried to get into other places, like APL language newsgroups. I was thinking this was about as representative of current APL users as I was likely to find, but maybe people know other places where they gather or discuss APL issues? Is there much discussion about APL on StackOverflow? (I haven't really gone digging.)

Anyway, hope everyone is having a nice weekend. I am (very slowly) trying to work my way through Legrand's book. ;) Nice to have such resources!

Posts: 4
Joined: Fri Aug 04, 2017 12:41 am

Re: APL and J

Postby Vince|Dyalog on Mon Feb 12, 2018 1:41 pm

Hi ej,

On MS Windows, I run vim in a cygwin shell and also use gvim 7.4.

I use the command line switch -U to specify my vimrc file:
-U myvimrc

myvimrc contains these lines:
set guifont=APL385_Unicode:h14:cANSI
set encoding=utf-8

Then, I use our Unicode IME to type APL characters into vim.

I can also type APL characters into this composition window with our Unicode IME: ⍺⍳○*⍴⌹⍙⍠⍪


Posts: 302
Joined: Wed Oct 01, 2008 9:39 am

Re: APL and J

Postby Vince|Dyalog on Mon Feb 12, 2018 2:06 pm

Hi ej,

You can specify whether you want array indices to begin with 0 or 1 by setting the index origin (⎕io) to be 0 or 1.



With Dyalog for MS Windows, You can set the default in a clear workspace by changing the ⎕IO field in Options->Configure->Session.

With Dyalog for raspberry Pi, Mac OS, Linux, that will be controlled by an environment variable named DEFAULT_IO.


Posts: 302
Joined: Wed Oct 01, 2008 9:39 am

Re: APL and J

Postby alexeyv on Mon Feb 19, 2018 10:27 am

About the "input method" of the APL characters.
With Dyalog APL you can just use supplied IME and have a APL layout on Windows, or use toolbar to enter the character in both Dyalog Windows IDE and RIDE.

With Dyalog RIDE you can also enter characters even without layout or toolbar just by prefixing with `, like `r will generate ⍴ etc.

For OSX or Linux you can use some APL keyboard layout and just switch to APL characters. For example as a Dvorak user on Mac I've designed my APL layout with Ukelele application.

If you are GNU APL user on Linux/Mac you can use it with GNU Emacs and enter characters with the Super-key prefix (you would have to bind it to some key with Emacs configuration). Also with GNU APL Emacs mode you can have a popup keyboard (accessible with C-c C-k) where you can just click on a symbol to enter it, like with Toolbar in Dyalog RIDE.

So actually I would say it is not a problem to enter APL characters.
Posts: 54
Joined: Tue Nov 17, 2015 4:18 pm

Re: APL and J

Postby JohnS|Dyalog on Mon Feb 19, 2018 12:18 pm

... as a Dvorak user on Mac I've designed my APL layout with Ukelele application.

Hi Alexey. I'd be interested in seeing your Dvorak layout for APL characters.
See: https://dfns.dyalog.com/n_dvorak.htm

Re: APL and J

Postby ray on Mon Feb 19, 2018 6:52 pm

The problem is learning where the APL characters are to be found on the keyboard.

The "Language bar" is a great help in entering a character, but selecting a character with a mouse (although the pop-up states which key strokes will produce it) does NOT "teach your fingers" which keys to press.

As someone who learnt APL many years ago on an IBM mainframe, I would say the problem to enter APL characters for newcomers is actually harder now than then, at least I was lucky and had a keyboard with key-caps that showed the APL glyphs.

You can now get APL keyboards form Dyalog, but not a lot of use when using a laptop.

Dyalog (and other APL vendors), used to supply key-cap transfers that one could put on your keyboard. As an APL consultant, I once spent a whole week sticking APL glyphs on a new batch of (AJ?) terminals, and I never want to do that again!

One can of course go to the complete opposite, and get a keyboard with totally blank key-caps (V Cool). I think JohnS once had one on his Amazon wish list!
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
Posts: 149
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest