@Adám I have some breaking news: Morten wrote me saying you were interested in working with me but not because I was particularly smart, only because I knew how to code
@Adám just to let you know that in the 2020's competition website it looks like I already submitted all the problems; probably because of some cookie or cache:
Yes. Also, I entered my email and hit "Register". I already received my single use pwd but the website is still showing the "Please wait" circular progress bar :)
is it possible in any way that the server thinks its still displaying that "please wait" msg and me closing that tab and opening a new one confused everyone?
Question re: javascript, peripherally related to APL: Assume that I have a variable defined as a string, which may or may not have blanks, tabs, newlines, etc., embedded it it, but the source defining it doesn't appear to have any explicit 'escapes' like \n in it. What I want to do is take that variable, and be able to write it out to a file on disk, then read it back into the program and assign what I've read back to the variable, and have the variable be identical before and after.
How can I do this?
(APL connection: I want to be able to save the disk images from norbert's 5110 emulator and load them back; this will let me "change diskettes" and preserve any APL workspaces I create with that emulator!)
@Adám - Not even - the question is pure javascript code; basically, I ultimately want to put a pair of buttons on the HTML page for each emulated diskette, marked SAVE and LOAD, and when I click SAVE, it saves the current state of the specified emulated diskette as a file on disk, and when I click LOAD, it reads the file from disk and puts it into the js variable that "is" the emulated diskette.
I just need to know how to do the js to guarantee that the round trip leave the variable contents identical.
If I had a real 5110, I could )SAVE libnum WS, take out the disk, and put it away, then the next day, put the disk back in. I want to effectively do that with the emulated diskettes.
The code does appear to be single-byte and all textual, at first glance.
One thing I noticed is that, if the input is a vector, they don't also require you to handle a scalar as if it was a 1-element vector. I remember in previous years having to always ravel the input
@Adám it's not only APL - the JS tab allows entering arbitrary preprocessing JS, currently allowing for JS, Java & C too (and of course, just plain text)
on my TODO list are J, k (though for those i don't have any reference color schemes), light & black themes (though currently the colors are hard-coded in the parsers of the languages), something for fancy REPL display; feature requests welcome
@Adám is there any reference on how APL parses expressions? Or an APL grammar somewhere? I'm struggling with deriving the grammar on my own and I could really use some hints
@Adám editing highlighed text would require something more fancy than a single textarea (especially as the JS can do arbitrary changes to the generated text)
@RGS this could be helpful, it's pretty much equivalent for APL
Regarding the console interface of Dyalog on Linux. As I already use the super key for other purposes I disabled the keyboard shortcuts. Is there a prefix I can use to input the characters? I know in ride I can use backtick for that purpose. How do I configure the console interface to behave similarly?
@PuercoPop I don't think there's an easy way to get backtick input in the terminal, however, you can fairly easily switch shifting key from Super to something else, e.g. AltGr (right-side Alt).
(changing grp:win_switch to grp:switch to use AltGr; getting the console Dyalog to recognize backticks would require that happening in the interpreter itself, unlike this)
@PuercoPop hm, i'm kind of in a similar situation, with AltGr being used for Latvian. The best solution I could find was to just to manually switch between the Latvian layout and US+APL (setxkbmap -layout lv -variant '' -option -option 'compose:rwin,ctrl:nocaps and setxkbmap -layout lv,dapl -variant '' -option -option 'compose:rwin,grp:switch,ctrl:nocaps'). the keyboard management of linux wasn't made for this..
@dzaima actually, now that i kind of maybe understand the layout files i could maybe make a singular APL layout so I could just have the 2 natively switchable (also that witches rwin to compose which is not what you'd want but trivially removable)
@ngn I use right ctrl as a control, I use emacs. Although I think I could remap my model01 to use both control keys as ctrl and fn+ctrl to right control
@Adám mostly that I have to switch windows to switch from editing to trying things out in the repl. Once I know the code works I'm copying and pasting them to a file using Emacs. Other than that it has been a great using it so far tbh.
D: it interprets)ed /path/file as relative not absolute. Damn windows (or the multifunctionality of )ed, or whatever)..
)ed //path/file works though. Still don't see any way to counteract the popup though (RIDE doesn't have the "Save this response for all files with ".___" extension" option)
@VladimirSotirov thanks for the tip - in the end i found this video made trains much clearer youtube.com/watch?v=A2LqqBosvY0 . i still don't feel super comfortable with them but managed to convert one of my answers which made me happy!