@SamThompson
1E14
January February March
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
11 11 11 11 11 11 11 13 13 13 13 13 13 13 14 14 14 14 14 14 14
11 11 11 11 11 11 11 13 13 13 13 13 13 13 14 14 14 14 14 14 14
11 11 27 27 27 13 13 29 29 29 14 14 30 30 30
April May June
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
15 15 15 15 15 15 15 1 1 1 1 1 1 1 2 2 2 2 2 2 2
@JeffZeitlin The language includes built-in OLEClient and OLEServer objects. E.g. after executing 'EX'⎕WC'OLEClient' 'Excel.Application' you can add one more sheet with EX.Sheets.Add⍬
One of the important things to remember is that to pass an APL character vector to a System.String, enclosing it (⊂) is mandatory.
⎕USING←'System.Speech.Synthesis,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\wpf\system.speech.dll' voice←⎕NEW SpeechSynthesizer voice.SelectVoice ⊂'Microsoft Zira Desktop' voice.Speak ⊂'Hello from A P L'
@Adám - It looks like the names of methods and properties are case-sensitive; can that be put on the list to fix in the next version?
@dzaima - That may be because of C#, not because of .NET - and I find it surprising in any case as I think that would make it the only language that imposes case-sensitivity.
@JeffZeitlin I don't think that can change, as APL (imho unfortunately, but like most programming languages) is case sensitive with regards to names of items.
@Adám - Well, I can live with that if I have to, though I'd dispute most languages being case-sensitive. Yes, most languages with a C heritage tend toward case-sensitivity, but it's really a mixed bag even there, and languages with heritages that don't include C tend not to be case-sensitive.
We can start with BASIC and PowerShell, move on to Pascal and FORTRAN ... well, popular starts getting hairy, and yeah, I was looking at that same Wiki article.
But I've also been writing code since the Apple II was a New And Wonderful Thing, and case-sensitivity has been the exception, not the rule.
@dzaima - If you're a C# programmer, you might find that you like PowerShell - I've heard it described as "C#Script", with a similar relationship between PS and C# as between VB and VBScript.
"i don't know much about .NET other than C# being similar to java" :p ; i generally don't like scripting (≈not statically typed as far as i care) languages, APL is a very weird exception.
@JeffZeitlin PowerShell, now there's my kind of language! The case insensitivity is by far the most human-friendly decision that makes me like it. In variable names, cmdlet/function names and in string comparison.
@Adám Curious, because in NARS2000 ⎕A is the uppercase English alphabet, and ⎕a is the lowercase one, and I keep trying to bring that over to Dyalog only to find they both resolve to the uppercase alphabet.
@TessellatingHeckler - And, even better, you can tell the string comparisons to do it with case-sensitivity if you need to. (-eq → -ceq, -lt → -clt, etc.)
@TessellatingHeckler - I seem to remember in one of the bookmarked lessons that ⎕A was discussed, and Adám provided a bit of a hack to obtain the lowercase alphabet.
@TessellatingHeckler Yeah, NARS2000 and APLX break their own rules for ⎕a. I agree that it is a bit messy that user-defined names are case sensitive while system stuff (quad names, system commands, user commands) are insensitive. I think of case as formatting, like bold. But whatever, it is what it is. 18.0 will have better handling of case issues with ⎕C.
oh yeah, that does feel like a .. hack. I like the NARS2000 elegance of (⎕A,⎕a)[(⎕a,⎕A)⍳'abc']`patterns, just varying the pairs makes upper to lower, lower to upper, always tolower, always to upper.
@Adám - That depends in part on your object model. In Pascal, "primitive" user types are considered the same if they're both mapped to the same built-in type - that is, TYPE FOO=INTEGER; BAR=INTEGER; will have FOO and BAR considered to be the same type for the purposes of assignment, calculation, etc.
(I'm not sure whether that carries over into objects in e.g., FreePascal or ObjectPascal)
@JeffZeitlin That doesn't really matter in APL. You can still compare, concatenate, merge etc. The only time the type matters is if you avail yourself of the prototype or fill system.
@TessellatingHeckler This, but it comes with a big warning that it can change/disappear/move at any time. I'll be happy to answer questions on how to use it as it is now, though .
It has some features that are hard to discover like access-keys b/g/w and h. And Shift+Esc clears the current line.
@TessellatingHeckler Have you tried Ctrl+Delete? The first time you try it, it will warn you, but you can check the box saying it is OK for the future.
like, open a new window there and type ⍳5 and get some numbers, then r0=2|⍳5 whoops there's a value error because I mistyped rho, now press Ctrl+A to select everything, press delete to clear it, press enter
wham, screen full of error message returns. NO YOU CAN'T DELETE THE ERROR, YOU MUST FACE YOUR ERRORS.
@TessellatingHeckler While Ctrl+A doesn't work, you can just select the lines you want to remove and press Ctrl+Delete. To remove everything, do Log>New (to which you can bind a key-combo) or simply Ctrl+Home,Ctrl+Shift+End,Ctrl+Delete.
@Adám Log>New is bad because it clears the entire screen. I want to be able to keep the good lines at the top of the screen where I can look at them, and in the middle of the screen experiment with things where I can remove mistakes
the J desktop JQT does it, acts like a scratchpad where all the text in the window is editable all the time
@TessellatingHeckler Right, got it. Just use Ctrl+Delete (assuming you're on Windows). If it doesn't work, you can assign a key combo to it at Options>Configure>Keyboard Shortcuts>Available shortcuts>Code>DK
@TessellatingHeckler Well, you can delete. But you can't change stuff and not have it execute on next Enter. That's something I want.
Maybe there's hope for this in 18.0 though. It has (right now, at least) a "going-to-be-executed" marker in the left column:
So I just want a key-combo to "turn the marker off", i.e. don't revert the line to its old state, just leave as if it was always like that.
@Adám Ctrl+Delete does close enough to what I hoped for! Brilliant. This is the kind of thing I'm not sure if it's my "workflow" and serious people would say "just use a proper editor" or if nobody else has seen how low overhead it is to be able to explore in a single window without having to be stuck with a single mistake ruining the entire screen in an unfixable way. PythonWin used to allow editing, J does, Python IDLE doesn't, PowerShell doesn't.
Incidentally, the Windows Terminal (Preview) app seems to forcibly disable the Dyalog IME and not allow it for input.
@TessellatingHeckler Heh, the reason it works in the webpage, is that the session is nothing but a bog-standard html <textarea>
@TessellatingHeckler In fact, wouldn't it be nice if I not only could WindowGet the current session log with myLog←⎕SE⎕WG'Log' but also could WindowSet it with ⎕SE⎕WS'Log'modLog?
@TessellatingHeckler You can already do that. It'd just be a tool in the toolbox, so you could, e.g. press a button and save your last statement(s) to a text file, etc. Or insert something you needed to play around with.