Why APL Special Characters Are A Bad Idea

Writing and using Classes in Dyalog APL
Post Reply
Erik.Friis
Posts: 66
Joined: Mon Apr 04, 2011 3:16 pm

Why APL Special Characters Are A Bad Idea

Post by Erik.Friis »

I have extensive APL experience since 1983 and I still can't figure out how to type APL special characters in this forum :( I've installed the IME whatever that is and the APL fonts and I have a keyboard icon in my tray. I love the APL characters like you all do, but even with Unicode it's still a PITA! I can't type them on my iPhone for example in an SMS. I have a paper in the works on a well thought out ASCII multigraph system that takes aesthetics and de facto standards into account (please Dyalog read it before putting APL characters in APL# - I feel the APL symbols have never allowed APL to be embraced by the broader community. Can someone please tell me how to type APL characters in these posts without spending half a day of my time doing research which I cannot invest at this point. It's always been a struggle to type, display, and print special symbols and keyboard technology is still too far away from ever being able to even show someone what they are typing! Sorry for the rant - just a bit frustrated!!
User avatar
Morten|Dyalog
Posts: 460
Joined: Tue Sep 09, 2008 3:52 pm

Re: Why APL Special Characters Are A Bad Idea

Post by Morten|Dyalog »

Erik,

Sorry to hear you are frustrated!

If you have installed the IME, you should be able to select it from the system tray and use it to type APL characters into the Forum using the same keystrokes that you would use in APL. Can you describe the problems that you are having in getting this to work?

Version 13.0 (which was released on Friday for Windows) has a throughly revised IME, which is now based on translate tables which use Unicode Code Point numbers, and only specify the location of the symbols that you want to ADD to your operating system keyboard (i.e. APL symbols) This makes it much easier to support multiple lannguages (in fact, we don't have to DO anything at all unless people in a country are used to a different layout of APL symbols).

The new IME also adds support for overstrikes (using a pop-up window if you like) and a configurable "ignore next keystroke" key, so you can instruct it that the next keystroke (like Ctrl+S to save your document) should be passed through to the underlying application without being converted into an APL symbol. This works so well that I now run Windows with the v13.0 Dyalog IME as the default keyboard, and no longer turn it on and off (this only works if you are using a Unicode Interpreter, unfortunately - Classic cannot use the IME and we have no intentions of doing further work to make Classic better in these areas.

<advertisement>Users of Classic please take note: It is time to start thinking about moving to Unicode! It is probably a lot easier to convert than you think, many large applications have been converted. Come to Dyalog'11 in Boston, October 2-5, for a workshop on Unicode conversion!</advertisement>

I promise I will read your paper on the keyword scheme (again), but as I think you already know, I feel that the APL symbols are an integral part of APL being a "Tool of Thought" for many people. I don't think that digrapghs or trigraphs go far enough - if we want to attract a MUCH broader community we probably need to use full names for primitives, like "RESHAPE". This can already be trivially achieved using expressions like (RESHAPE←⍴), but nobody seems to care enough to do it systematically - so I wonder how helpful it would be. One possible reason being that it is very useful that APL primitives look very different from user-defined functions, this enhances readability of APL code significantly, in my opinion.

A digraph system may make typing and printing a bit easier (but these problems really ARE pretty much sorted now unless you want to write code on your iPhone). However, my gut feeling is that the digraphs will still have a "symbolic" feel, which I think is the REAL problem wrt "broader acceptance". So I don't believe that people who get "put off" by APL symbols will find digraphs sufficiently different for it to be worthwhile having two different ways to write APL - which has HUGE drawbacks with respect to APL being a language for communication between humans.
User avatar
Phil Last
Posts: 628
Joined: Thu Jun 18, 2009 6:29 pm
Location: Wessex

Re: Why APL Special Characters Are A Bad Idea

Post by Phil Last »

Hello Erik
What's this paper to which Morten refers? Has it been posted here?
User avatar
Dick Bowman
Posts: 235
Joined: Thu Jun 18, 2009 4:55 pm
Contact:

Re: Why APL Special Characters Are A Bad Idea

Post by Dick Bowman »

Just to add my farthingsworth...

In a world which is full of Arabic/Chinese/Japanese/Korean/Indian native texts I find it embarrassing that we seem to make such a big deal out of APL characters - it really ought to have been a trivial issue done and dusted years ago. We make trouble for ourselves - and add fuel to the "we hate APL" elements of the computing world.

Personally I greatly value the English-independence of the APL character set.

And I'll back up Morten's observations - just checked out using the latest (well V13-beta) IME and here are some of our favourites...

⍺ ⍵ + - × ÷

I think good strides have been taken with the latest IME (the above wasn't possible - at least for me - a few weeks ago). I shall try to eschew Dyalog Ctrl and Dyalog AltGr and see how I get on...

And I think my Unicode conversion went somewhat along the lines "maybe I should try this - OK it works" - was not a big deal at all.
Visit http://apl.dickbowman.com to read more from Dick Bowman
Erik.Friis
Posts: 66
Joined: Mon Apr 04, 2011 3:16 pm

Re: Why APL Special Characters Are A Bad Idea

Post by Erik.Friis »

@Morten: My post was symptomatic of my frustration with the special symbols in general as far as typing and printing them and not aimed at Dyalog per se - for 30 years I've been fumbling with ctrl & alt shifts hunting for characters like depth, squad, and zilde :) My new Lenovo laptop has a fn key where my other keyboards have a ctrl key so I need to retrain my mind to type on that thing. I love the APL special symbols and like to program with them, but most people will avoid them and this has hurt the most amazing computer language out there considerably - I know this is a hard realization for any APL fan to admit to themselves.

Many mainstream languages use multigraphs including our friends C++ and Java and no one complains about them. The thesis of my paper is that there are many aestetically pleasing combinations that are just as visual as APL special symbols (after all does rho really mean anything?). J & K are interesting languages but many feel that there was not enough thought put into the aestetics of the multigraphs -- I'm not that familiar with K, but I do find the multigraphs in J unpleasant to look at. Some primitives should just be keywords as they are ubiquitous: sin, cos, tan, log, ln, etc., but I don't think a keyword like Reshape will fly and I would not like to read or write code like this.

@Phil: It's a paper that I have in the works that I hope to publish at a future conference. If you send an email to efriis@sprintmail.com, I'll forward you or anyone else a rough draft for commentary or feedback. Morten and I have discussed some of the ideas in the paper a few times when we have seen each other here in the US.
Post Reply