« first day (1097 days earlier)      last day (1550 days later) » 

2:06 PM
]calendar 1752
 
@JeffZeitlin
                               1752
      January                February                March
Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa   Su Mo Tu We Th Fr Sa
          1  2  3  4                      1    1  2  3  4  5  6  7
 5  6  7  8  9 10 11    2  3  4  5  6  7  8    8  9 10 11 12 13 14
12 13 14 15 16 17 18    9 10 11 12 13 14 15   15 16 17 18 19 20 21
19 20 21 22 23 24 25   16 17 18 19 20 21 22   22 23 24 25 26 27 28
26 27 28 29 30 31      23 24 25 26 27 28 29   29 30 31

       April                   May                    June
 
 
1 hour later…
3:16 PM
]calendar 100000000000000
 
@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
 
I think I found when the universe ends
 
3:29 PM
I thought the universe was supposed to end on Long Count date 13.0.0.0.0
 
⎕←⎕SE.(cal 100000000000000⊣⎕FR←1287)
 
@Adám
                               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
                   1          1  2  3  4  5             1  2  3  4
 2  3  4  5  6  7  8    6  7  8  9 10 11 12    5  6  7  8  9 10 11
 9 10 11 12 13 14 15   13 14 15 16 17 18 19   12 13 14 15 16 17 18
16 17 18 19 20 21 22   20 21 22 23 24 25 26   19 20 21 22 23 24 25
23 24 25 26 27 28 29   27 28 29               26 27 28 29 30 31
 
3:48 PM
I'm impressed by the fact that it handles the special case of 1752 in the UK and possessions!
@Adám - Is it reasonably straightforward to call operating system functions from Dyalog?
 
@JeffZeitlin Oh, not only that: The underlying functions allows a left argument to specify the Julian-to-Gregorian switchover date!
@JeffZeitlin Yes. You can either shell out with ⎕CMD/⎕SH or associate function in shared libraries with ⎕NA.
 
@Adám - It's the ⎕NA type of call that I was thinking of, for example to manipulate COM objects in Windows, like the TTS engine.
That, and .NET calls.
 
4:06 PM
@JeffZeitlin .NET is directly accessible from the language. Just do e.g. ⎕USING←'' ⋄ System.DateTime.Now
 
@Adám - Consider the following PowerShell code. How would I do the equivalent in Dyalog?

Add-Type -AssemblyName System.Speech
$voice = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer
$voice.SelectVoice("Microsoft Zira Desktop")
$fc = ((Invoke-WebRequest https://api.ef.gy/fortune).content) # see https://ef.gy/fortuned
$fc
$voice.Speak($fc)
(The Invoke-WebRequest part would be nice, but not essential; I'm just looking at the "make it talk" bit.
)
 
@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⍬
 
/me is reading Dyalog for Microsoft Windows .NET Interface Guide. It looks like it may be pretty straightforward to get APL to speak...
 
4:52 PM
YAY! Gots it!
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?
 
@JeffZeitlin isn't that the proper .NET behavior?
 
5:31 PM
I don't know if that's defined for .NET per se; I do know that both VBS and PowerShell do not force case-sensitivity.
 
@JeffZeitlin ah, in C# case sensitivity is required. (i don't know much about .NET other than C# being similar to java)
 
5:49 PM
@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.
 
@JeffZeitlin Can you give me examples of popular languages where assigning a value to a makes A have a value?
Wikipedia mentions "ABAP, Ada, most BASICs, Fortran, SQL and Pascal"
 
@JeffZeitlin huh, until i heard about PS & VBS here, i knew pretty much no languages that aren't 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.
 
5:58 PM
Don't get me wrong, I agree with you, but I think we can explain these with programming being done exclusively in upercase when they became popular.
 
Not really, with Pascal; I'll concede the point for BASIC, FORTRAN, and COBOL.
 
Of course, if a UX user named John receives a letter in the post addressed to "JOHN", he returns it as "addressee unknown at address"…
 
Whereas I look at my mail and mentally do 'case-smashing'... :)
 
—Why didn't you buy milk? I told you to buy milk! — They didn't have any. — The store had no milk‽ — No, only MILK.
 
«snrch!»
Ooo, love the interrobang! :)
@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.
 
6:09 PM
"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.
 
I never considered APL to be a scripting language...
... although by present standards, I suppose it does fit into that niche.
 
 
2 hours later…
8:15 PM
@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.)
 
yes!
@JeffZeitlin If you can add System.Management.Automation.Dll and run some PowerShell code.. ;)
 
@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.
 
8:31 PM
@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.
 
@Adám Ok, I see, thanks! (What other scalar types are there, except 'character' and 'number'?)
 
@TessellatingHeckler null (⎕NULL), objects, and object representations ("⎕ORs").
Though, with objects, it becomes a bit unclear what a type is. Does an instance of class A have the same type as an instance of class B?
 
Aha! Found it! Lesson 12, the hack is 819⌶⎕A.
 
@JeffZeitlin (819⌶) ?
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.
but, English only for a pre-unicode world
 
⎕C does proper Unicode folding and mapping. If there's customer demand for it, we may even extend it to full folding/mapping in the future.
 
8:37 PM
@Adám ok, null isn't on tryapl
going to have to install Dyalog on this server one day
 
@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)
 
@TessellatingHeckler It'd be pretty useless there. If you need a "full" Dyalog APL online, I can give away a secret project we're working on…
 
∇SECRETPROJECT[⎕]∇
 
@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.
 
I wonder if that was the idiom/command to list a tradfn in early APLs because it looked kinda like a window onto the function...
 
8:44 PM
@JeffZeitlin It was. is a stylised console.
 
@Adám Oh it would be fine, it's a Windows machine I RDP to, it's not functioning as a server
 
@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.
 
@Adám That sure looks tidy. And it has my favourite feature which Dyalog desktop doesn't - I can delete lines from it!
 
@TessellatingHeckler You mean permanently delete lines from the session log?
 
@Adám that makes it sound like I'm trying to fraudulently misrepresent some legal auditing issue for an engineering lab, lol.
 
8:55 PM
@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.
 
I can't really describe it well in text, but shift+up arrow, remove the two lines of value error and try again, works on that web page.
@Adám Log>New is just as bad. Does ctrl+delete work in Dyalog desktop?
I'll try it in a minute
 
@TessellatingHeckler Why is Log>New bad? Ctrl+Delete works in the Windows IDE.
 
@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
 
9:10 PM
@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 FWIW, I'm with you.
 
@Adám that (edit and not-execute) would also be quite nice, I agree
 
@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?
 
9:31 PM
@Adám I wouldn't know about that; why would that be nice?
 
@TessellatingHeckler That'd allow you to programmatically modify what you see, real-time.
 
ah .. I'm not being contrary deliberately, but why would that be nice?
the log is a record of interactive use, as I understand it
maybe to load a demo workspace with log, could that be a thing?
 
@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.
 
 
2 hours later…
11:26 PM
CMQ: If you were to implement an APL derivative from scratch, which primitive(s) would you implement first for testing purposes?
 
11:36 PM
@Bubbler -/
 

« first day (1097 days earlier)      last day (1550 days later) »