@Adám Hi Adám, thanks for welcoming me. I was curious about APL. I read some random posts in the past about people talking wonders of the language. This time I decided to play with the language. The array-oriented paradigm and the symbols it uses are what captivated me. I'm reading "Learning APL with APLX" and I must say am hooked. Oh, and recently I discovered The Array Cast podcast :)
@Razetime There isn't actually a huge difference between APLX and the version of Dyalog APL used in Mastering Dyalog APL. mastering.dyalog.com is a WIP to update that.
@Adám the TryAPL part of the bot seems to be working (still need to do more testing to make sure it's stable and decide how I want to interface with Discord/IRC) \o/
@hyper-neutrino I said something wrong the other day when I described the desired behaviour. I think I said it should execute "the rest" i.e. after ⎕← but it should actually include the ⎕←
@Adám okay. so basically, find all `⎕←...` and all `⋄ ...`, remove the ⋄s from the start of the latter type, join all of them on ⋄, and then run the statement?
i'm trying to think of a concise way to represent that... i notice a pattern but idk how to define it well yet. i'll need to keep thinking about that case in particulra
Okay so assuming I've done everything correctly - in a normal message, all code sections starting with either ⎕← or ⋄ will be joined by ⋄ and run, and in a multiline fixed-font message, all lines starting with ⎕← or ⋄ will be run. If the output is blank or one line, it will reply in-line; otherwise, it will use a multi-line message and just ping you normally at the end. I have no special casing for message that would be too long for one message yet.
As for the "too long" issue: If a response has only one line, but that line is longer than 500 chars (including added backticks and escapes) you can simply switch to multiline.
@Adám is there good software that lets me type APL symbols on my keyboard that you could recommend? or like an appropriate layout to use a compose key with or smth. the LB bookmarklet is very nice so i don't really necessarily need it if there isn't a good option
@hyper-neutrino Depends which one of my layouts you choose. user was talking about my AltGr layout. If you use my backtick layout, you'll have to type backtick,space to get a backtick, which is a bit annoying for markdown.
If the "whitespace issues" means things that look blank, then the answer is : I don't consider them. I just evaluate things and print the result. If the result is invisible, then that's your problem :P
@Adám I would like to render vega-lite output with Jupyterlab/Notebook but I don't know is there anyway to define a proper mime type for vega-lite string.from Dyalog Kennel. Do you have any hints?
Jupyterlab can render pictures and some formats automatically. When I produce svg with Dyalog Kernel I can see it nicely at least with 3500 I-beam but I don't have tooltips for boxplot. Maybe I try to do it via html.
@rak1507 That's true. And I can open it by double clicking file but I'd like to embed a grraph to notebook.
@Adám Yes It can, but in some cases it produces quite much unnecessary lines. ;) I render a svg with vl2svg (vega-lite tool) but as I mentioned earlier It won't show tooltips for example for boxplot. If I try to use 3500⌶ with vega-lite json file Jupyterlab Notebook doesn't recognize the correct mime which is application/vnd.vegalite.v3+json" because I don't have a way to define it.
I interpreted rak's question as "why don't you return the original result, why do you return the 'rendered' result?" and then I didn't understand your reply.
What is a cleaner way to handle these function strings Both expressions use the functions i c p with an ⍺⍺ variation of processing the result so since the trains ⍺ all use functions i c p I pass them in as strings to be evaluated in the context of the dfn but this is all kinds of hackish
@nathanrogers Dyalog APL is not a functional programming language unfortunately - although maybe you could get some hack working by passing namespaces containing operators? I dunno. In any case: dfns.dyalog.com/n_hyperators.htm
Wish there were some way to turn functions with two arguments (applied like in Haskell) into dyadic functions, functions with four arguments into operators, etc. and vice versa
Everything in ⎕SE is either loaded from a binary blob .dse file (a Dyalog session file) or from text files. TIO has been set up to not load those things autmatically.
@user There's nothing inherently preventing it, however, nobody has implemented a syntax for it.
@Adám yea, I was testing whether or not it paid attention to quotes (yes it does, yay!) and whether or not it somehow parses that (it doesn't, but that's expected and not useful, so it's fine)