Version 16 new primatives

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 !

Version 16 new primatives

Postby jmosk on Thu Aug 10, 2017 6:24 pm

How does one define the glyphs for some of the new version 16 primitives? They don't seem to appear in the version 16 language bar.

•monadic ⍸ (where function) – returns indices of 1s in right argument
•dyadic ⍸ (interval index function) – left argument defines interval boundaries; return interval each item of right argument is found in
•monadic ⊆ (nest function) – make a nested array
•dyadic ⊆ (partition function) – as APL2 Partition regardless of current ⎕ML setting
•dyadic @ (at operator) – functional merge operator: [argument] (modifier @ selector) array
•dyadic ⌺ (stencil operator) – apply stencil function to windows of specified size. Useful for image manipulation, neural networks and many other applications.
Posts: 27
Joined: Thu Jul 18, 2013 5:15 am

Re: Version 16 new primatives

Postby Jay|Dyalog on Fri Aug 11, 2017 8:35 am

The new glyphs should already be in the version 16 language bar. Can you tell us what platform you're using? Are you perhaps using a standalone RIDE to connect to a version 16 interpreter -- and if so, what version of RIDE are you using?
Posts: 13
Joined: Mon Aug 09, 2010 10:45 am

Re: Version 16 new primatives

Postby AndyS|Dyalog on Fri Aug 11, 2017 8:40 am

From your other posting today I believe that you are using the Classic edition of Dyalog APL.

The short answer is: these _glyphs_ (excluding @) cannot be used in Classic editions, so they do not appear on the language bar.

The Classic edition of Dyalog is based on ⎕AV, and therefore can only support a maximum of 256 characters. Once you factor in font support and similar, there is no more space in the Classic interpreter for these (and some other) new glyphs .. so we have not added them to the language bar.

To enter them, you must use ⎕Uxxxx where
⎕U2286 ⊆ Nest: Enclose Underscore
⎕U2338 ⌸ Key: Quad Equals
⎕U233a ⌺ Stencil: Quad Diamond
⎕U2360 ⍠ Variant: Quad Colon (you can also use ⎕OPT)
⎕U2364 ⍤ Rank: Jot Diaresis
⎕U2378 ⍸ Where: Iota Underscore

If you use these in the code of simple functions then when the workspace is loaded into a Unicode interpreter they will be converted to the appropriate glyph - and vice versa when going the other was. If the ⎕Uxxxx or glyph appears in a comment, a variable or a scripted object they won't .. and the code will fail.

If it's possible, I would recommend that you migrate to the Unicode edition of Dyalog APL .. unless we reused existing glyphs, the table detailed above will only get larger.

As an aside, I've just noticed that the newer glyphs don't appear in the language bar that appears when you're writing a post here in the forums - we will fix that. And to round this off, we only update the language bar on TryAPL when the underlying APL supports them .. and we're still working on moving TryAPL to 16.0 ..
User avatar
Posts: 161
Joined: Tue May 12, 2009 6:06 pm

Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest