APL Glyph Typing Tutor

I’m wondering if there is an online resource which lets one practice JUST the glyphs. Something like a typing tutor which shows you the glyph and then you type it in using your modifier key (`2 for ¯ (high minus) or `[ for ← (left arrow)

I don’t care if it doesn’t tell me what it actually does, I find it so frustrating to have to mouse up to the symbol to see what the key combo is everytime I’m trying to type up a simple expression. It breaks the flow.

If I had the coding chops, I’d code a simple version up like:

Show glyph.

Input by user. If correct, flash green , else flash red and show the correct key combo. pressing h shows the short help for that glyph.

2 Likes

Anki can do this - Would love a deck!

Specifically I notice this deck does this for vscode shortcuts, something like this for apl glyphs would be great!: Interactive VScode (MacOS) shortcuts - AnkiWeb

2 Likes

Thanks! i didn’t know Anki could do that! I think I’m gonna try to put something together! :smiley:

2 Likes

Please share when you do!

1 Like

Will definitely do! it actually uses JS, but I think I can figure it out.

BTW, there’s Learn shortcuts for any app | ShortcutFoo but it’s $8/month to create a personalized deck! wow!

You may not need javascript - I did some searching yesterday and I believe there is a way to do it without javascript. Several of the results were saying something similar to https://www.reddit.com/r/Anki/comments/2gdukp/how_to_enable_typing_in_answers_on_anki/

I haven’t tried it so not sure if it works though.

Thanks for the link @Ezno ! it actually seems to work! I need to figure out how to create a deck with that basic card type and then I think we should have a practice deck soon. I’m going to look through your code, I think you have some basic templates there IIRC.

Thanks again!

1 Like

This is just bizarre! I have spent the last hour or so searching the internets for a simple table of glyphs on one side and their key-combos on the other side, because that is the first thing a beginner needs to learn so they can comfortably type even simple expressions; but I haven’t found ANY . There are a multitudes of combinations of these things where each page goes into tedious detail about every single glyph and its usage, but not a single place where this info is present in its simplest form. So I have to drage the mouse to each symbol on Dyalog APL editor, note down each symbol and it’s key combo, then enter it by hand into spreadsheet to export it to Anki.

Ironically, I could’ve done just that and would’ve probably been done, but this just feels wrong! How can a language that is based on complicated symbols that no one knows anything about and that uses special char sequences to display those in its editor NOT have a simple table that maps exactly that?

I’m sure I’m missing something here. I even tried looking at the tryapl.org source and it refers to symbols in assert.h and ngn_lb but it would take more time to regex that stuff out than to just manually type it in.

In the meantime I’m just going to type this information in by hand to use as source for the Anki deck.

2 Likes

@mike.moloch here’s an image you can use - faster than mousing over the toolbar!
image

I keep a printout of this on my desk.

3 Likes

Perhaps this table could be shared somewhere public, like the apl-study website? Could be very helpful!

2 Likes

Yes I intend to make an Anki Deck and a quick table and hopefully can post a link to it in the pinned article in this group.

2 Likes

That printout does not seem to match the hotkeys for all of them. For example is backtick-T for me, but the keyboard image indicates differently. I also see for me is backtick-O, but the image seems to indicate that symbol is backtick-W.

Does it differ based on operating system or something?

This is one of the reasons for my confusion, but I’m going to use this in conjunction with the Dyalog Editor’s bindings and will give that precedence over this one. TryAPL.org and the RIDE seem to have similar (same?) keybindings.

1 Like

I tried every number, letter, and punctuation on my keyboard with both tick, and shifttick in front in RIDE to get a full list of all symbols and the hotkeys.

Here’s code to get a dictionary of all the mappings unique to dyalog on the RIDE editor on Mac. Glyphs not unique to dyalog that use normal keyboard such as + glyph are not included in this.

tick = "`⋄1¨2¯3<4≤5=6≥7>8≠9∨0∧-×=÷q?w⍵e∊r⍴t~y↑u↓i⍳o○p*[←]→\⊢a⍺s⌈d⌊f_g∇h∆j∘k'l⎕;⍎'⍕z⊂x⊃c∩v∪b⊥n⊤m|,⍝.⍀/⌿"
shifttick='''~⌺!⌶@⍫#⍒$⍋%⌽^⍉&⊖*⍟(⍱)⍲_!+⌹Q W E⍷R T⍨Y U I⍸O⍥P⍣{⍞}⍬|⊣A S D F G H J⍤K⌸L⌷:≡"≢Z⊆X C V B N M <⍪>⍙?⍠'''
assert (len(tick)%2 == 0) and (len(tick)==len(shifttick))

_sym = shifttick + tick 

full_dict ={f"`{_sym[i*2]}":_sym[i*2+1] for i in range(int(len(_sym)/2)) if _sym[i*2+1] != ' '}
3 Likes

Ah OK - that image is one I grabbed from an image search, and I see actually it’s microapl, not dyalog. I guess I found a different one for the one I printed a while ago.

Hi @Ezno I think you’re much closer to just auto generating the deck and a table by now, but here is the anki package I made by manually checking the key combos against the dialog and just entering it in the text editor. I hadn’t seen your file as of yet so I ended up hand building it. All the same here’s the gist for those who want to experiment with it.

Looks great! I’m not planning on doing anything more beyond the code snippet above. I was just curious about the keys not matching the keyboard image!

I put the output of my code snippet above in a csv to try and load it. But there are several things that don’t look quite right in the deck (such as the symbol). Maybe the html helps with that. Also setting it up to where you actually type in the answer would drastically improve the experience. I don’t think I am going to work on these as I got a lot of work stuff I have to catch up on (since I’ve been neglecting it thanks to APL and anki :sweat_smile: ).

2 Likes

No worries! I might steal your code to use as base for something like an anki deck generator, so, thanks for sharing. I think it would be really cool for Dyalog folks to have an option in their IDE to just generate a deck of Anki cards with the base glyph combo, so when the key bindings change, the decks change too.

But I also understand that these things are in a way trivial and only of interest to absolute beginners like myself :sweat_smile: Most people just go past these very quickly, straight into writing super awesome compact code…

1 Like

Steal away! You’re more than welcome to copy any or all of it that’s helpful :slight_smile:

1 Like

Keyboard layout images (actually text, so easy to machine parse) are available in the dfns workspace:

  • Online: dfns.dyalog.com/n_keyboards.htm
  • From within APL: 'notes.keyboards'⎕CY'dfns' creates a variable keyboards with the above content as a character vector.
4 Likes