@Dennis, if it's not too much hassle, I'd do it similar to this. If it is, I'll just remove the first line or first few characters to get the actual json. It's up to you my preference is the former.
The issue is that the page relies on that response, and synchronous XMLHttpRequests are problematic. Having a stand-alone language list in JSON would be nice though. I'd rather have two separate versions.
Not necessarily. I could make languages.js a script that adds the needed bits and pieces to the JSON file. I would have to move cmp outsides languages, but that's no biggie.
@Dennis If you mean that you can generate it from a single source, then yes, it's a good solution. The main thing would be never edit the generated stuff manually.
@Dennis Thank you I have a look, don't forget to push all these to git when convenient
@Dennis, question, if I want to write a transpiler, should it output the transpiled source to the stderr and the actual result to stdout, or should it not output the actual result at all?
@Dennis, I can't get the rewrite url right for adding .html. I'm sooner or later I will, but since you already have it, I thought may be you could share?
@Dennis Clearly, TIO is helping people learn stuff, no? ANyway, do you want me to get you an explicit permission for a 64-bit Unicode 15.0? (16.0 will have 5.5 new primitives!)
@Adám Dennis Mitchell is Dennis the Menace. My last name isn't really Mitchell. You can reach me at dennis@tryitonline.net. That's not the address of my Dyalog license though.
@Dennis could you add Stacked to TIO? It's a "practical" language. You can run code with node stacked.js path/to/file, or node stacked.js -e "program". You can run node stacked.js -t to see if everything works out. You shouldn't get any errors if everything works as it is supposed to. (Another note: there are two stacked.js's; the one you should use is the one not in src/.)
Also, not all programs that work in the online interpreter are guaranteed to work with the offline interpreter.
Yes. Say I want to execute ⍞←'Hello, ',⍞ to greet a user by their name. How do I supply the code ⍞←'Hello, ',⍞ to the dyalog executable? If I pass the file name, it says it's not a workspace.
@Dennis Store ⍞←'Hello, ',⍞ in a file, and pipe from that file to the exe. However, I'm not sure what where the prompt gets input from. ⍞← goes to STDERR btw, use ⎕← for STDOUT.
Seems like input also comes from STDIN. Piping echo -e "⎕←'Hello, ',⍞\nDennis" works as intended. It's going to be hard to interleave code and input though...
They are programs/scripts (not necessarily functions). Typing ∇progname into the session switches to tradfn definition mode. All lines after that are lines in the program/script. Finally, an un-quoted ∇ switches back into regular REPL mode.
Catch: the text after the initial ∇ tells APL explicitly what will follow.
Oh, so much better then. Actually, they are circled letters, but APL385 Unicode paints them like underscored to look like the good old typewriter overstrike days.
There are a few more trick you can put in if you want. YOu have such a thing as settings, right?
ngn apl has ⎕IO, but it is not changeable. When I golf, I sometimes use ⎕IO←0, and sometimes ⎕IO←1. Being that both are common defaults, I can save a couple of bytes. (CG is all about finding loopholes, right?)
Regarding naming of the wrapper: YOu should probably use the obscure name and shadow it. If, for some reason, I call my function TIO, I won't be able to call it from the footer, as it is shadowed.
Also, you should not wrap if the code begins (and ends) with a ∇, as this indicates that the user supplied his own wrapper.
Valid solution to http://codegolf.stackexchange.com/questions/59299/math-in-manhattan: `R←X(f M)Y` `⍎(5|⌊f 2)⊃'X×M⍣(X≠1)⍎⊃b'(b⎕R(Y⍴'&')⊢a)'10⊥X Y'(('(.*)',b←⍕Y)⎕R'\1'⊢a←⍕X)`
But this would fail with the current design. However, if you detect the `∇`, and do not add the wrapper, then it should work: `∇R←X(f M)Y` `⍎(5|⌊f 2)⊃'X×M⍣(X≠1)⍎⊃b'(b⎕R(Y⍴'&')⊢a)'10⊥X Y'(('(.*)',b←⍕Y)⎕R'\1'⊢a←⍕X)∇`
All this strangeness comes from APL having 50 years of backwards compatibility. Most code from '67 can be run on my Dyalog version 16.0 without any modification.
There was no STDIN/STDOUT/STDERR... Only a IBM mainframe listening to a Synchronous Transmit-Receive protocol on a 40 kbit/s half duplex line... Ah, the good old days!