« first day (1611 days earlier)      last day (1343 days later) » 

05:48
@adam Maybe I have to change kernel.py file for Dyalog/Jupyter so that I can output vl-file with a proper mime.
@kimmolinna If you can get it to work, please PR our kernel.
@Adám I will.
06:12
@Adám ]html is not working at the moment.
 
4 hours later…
10:13
@kimmolinna Which version of APL on what platform are you using Kimmo ? In particular are you running on macOS Big Sur ?
@AndyS I'm running DyalogAPL version 18 on Windows 10. But I just solved the problem. I added a couple lines to kernel.py-file and I'm able to use :vega-lite tag and after that I can add directly vega-lite json to JupyterLab notebook and I will get an embedded graphics nicely to notebook page.
@kimmolinna Excellent ! Was worried that you had hit the change on macOS Big Sur where we've had to disable the HTMLRenderer by default - instructions on reenabling can be found in $DYALOG/mapl
And I don't use renderer at all.
vlmatch = re.match('^\\s*:vega-lite',lines[0].lower())
...
elif vlmatch:
self.out_vl(lines[1:])
lines = []
...
def out_vl(self, s):
_content = {
'data': {
'application/vnd.vegalite.v4+json': eval(" ".join(s))
},
'metadata':{},
'transient':{}
}
self.send_response(self.iopub_socket, 'display_data', _content)

The biggest problem was to realize that I have to evaluate string to get dict. ;)
 
3 hours later…
13:49
May I use this for APLcart? (This entails relinquishing all rights to the code.) — Adám 7 hours ago
@Bubbler, since you came up with this code and got the train solution before I did, just wanted to make sure you're okay with it too ^
14:49
@hyper-neutrino Totally no problem :)
Got it.
how do I prevent zeroes from disappearing? ⎕←0 0 0 0 1 2 3 0 0 0 0
@hyper-neutrino 0 0 0 0 1 2 3 0 0 0 0
huh. it works here but not when i try it in tryAPL
⋄ 0 0 0 0 1 2 3 0 0 0 0
15:01
@hyper-neutrino 0 0 0 0 1 2 3 0 0 0 0
ok then ¯\_(ツ)_/¯ when I type 0 0 0 0 1 2 3 0 0 0 0 into tryapl.org I get 0 1 2 3 0 0 0 0
@hyper-neutrino screenshot?
...can't reproduce it anymore after a reload
i am so confused
you may have scrolled a bit to the right
i am stupid
you are correct
i didn't realize cuz the code was aligned to the left of the window, lol
lol
yeah that was really dumb :p
15:03
@hyper-neutrino takes one to know one :)
:)
Would it be a good idea to scroll the window to the far left whenever we print a result?
RGS
RGS
@Adám I'll do that.
@hyper-neutrino I see now how you can easily end up in that situation. I'll fix this.
RGS
RGS
@Adám Doesn't that make it look like the bot is officially a part of tryapl?
15:12
@RGS Can't it be?
RGS
RGS
@Adám Didn't say it couldn't, but I didn't write it with the explicit intent of making it official in any sense
It is something we've talked about internally at Dyalog for a long time.
twitter.com/tryapl is suspended. Not sure if that means you can grab it.
RGS
RGS
@Adám the intent to have a bot like that?
tryapl is taken, so I can't use it
tryaplbot?
@RGS Sure.
@RGS Yes.
Is there a discord server anywhere we'd like a bot for (unless one already exists)?
15:18
@RGS Maybe try_apl?
I made one in my free time the other day for my friend's private server for fun
RGS
RGS
@hyper-neutrino I have a server (unrelated to Dyalog) where an APL bot would be cool
If that's what you mean
try_apl is free
that place already has BQNbot, which can probably be extended with a command
Not sure what's best, try_apl or tryaplbot. I'm not much of a twit.
RGS
RGS
15:22
I like tryaplbot better
I think so too, and it makes it clearer that it is a bot.
RGS
RGS
Is the logo on the GH repo?
@RGS You can grab it off the bot's profile, but it is also in the TryAPL repo,
RGS
RGS
I looked at the repo and for some reason didn't find that image.
you can use this link to invite the bot to a (discord) server - should work
it just matches any codeblocks starting with ⎕← / ⋄ like the SE bot - I can make it use !apl if wanted
15:35
It is definitely time for apl.wiki/TryAPL
CMC: Implement monadic × without using any primitives.
RGS
RGS
@hyper-neutrino !apl would look really cool, but I won't push for it if I'm alone
the exact functionality?
no addition or subtraction i suppose
wait how do you do things without primitives - am I misunderstanding what a primitive is
@Razetime … you only have to handle 16 bit ints.
probably something like ⎕DR should be used which can check for signed and unsigned
15:41
@hyper-neutrino Tricky, eh?
@Razetime No no, no system functions either.
oh well
Full disclosure, at the time of posting, I didn't have a solution yet.
Now I do. My best so far is 20 bytes.
@hyper-neutrino For this problem, primitives are all built-in functions and operators:
+-×÷⌈⌊*⍟|!○~∨∧⍱⍲<≤=≥>≠.@≡≢⍴,⍪⍳↑↓?⍒⍋⍉⌽⊖∊⊥⊤⍎⍕⌹⊂⊃∪∩⍷⌷∘/⌿\⍀¨⍣⍨⌶⊆⍥⊣⊢⍠⍤⌸⌺ plus all system functions (those that begin with ).
huh. okay
i've only ever used primitives so... this'll be interesting :P
Oh, you also only have to handle a scalar argument.
What you have left to work with are literals and all symbols for syntax.
RGS
RGS
CMP: wouldn't it make sense if the (twitter) bot did not reply with an image when results are a single line and fit within the tweet?
15:56
How are multiple consecutive spaces handled in a tweet?
Point of consideration: The image contains a properly rendered edition of the stated APL expression.
RGS
RGS
they are preserved
@Adám Meaning...? The image has the nice font and all?
Yes.
RGS
RGS
True...
 
3 hours later…
18:49
@Adám so not floats?
@rak1507 No, only integers from -2*15 until ¯1+2*15
interesting
my original thought was trying to cause different errors and use :: but I'm not sure how that could be possible without using primitives
Hint: I am relying on errors, but without primitives.
{0::¯1⋄0 1...1[⍵]} with lots of 1s
does bracket indexing count as a primitive?
I didn't list it above, so I guess it's allowed, only you'd certainly not win the code golf with that huge solution.
For reference, my 20-byter uses no parens or square brackets, and the only braces are for the entire function; no inner nested dfns.
18:55
ok, I give up
oh so you don't need to handle complex nums?
... that makes significantly more sense
so it's just a sign function
Yes.
lol. alright. that seems a lot less impossible then :D
I doubt it can be done for floats and complex.
the problem is i don't even know how to code in APL without primitives :P i barely know how to use the primitives themselves even
19:00
I was hoping negative indexing would give a domain error and positive indexing would give an index error, but they're both index errors
i also don't actually know how to do error guards
error code::thing returned in case of error
ah, okay
0 is any error
 
2 hours later…
20:58
In order to vizualize the order of train evaluation and arity, I tried using {0::⎕←'monadic' ⋄ ⍺←÷0 ⋄ ⎕←'dyadic'} repeated a bunch (with modifications to each to indicate which function was being called) to print out each one. Is there a better way to do this than raising an intentional error and using an error guard to catch it?
(this worked, but I'm wondering if there's a better / shorter way)
@hyper-neutrino I just use the tree or box display options
no clue how to use those / what those are :p
RGS
RGS
@hyper-neutrino ]box on -trains=tree
^ or ]box on -trains=box
RGS
RGS
21:03
I personally use -trains=box, but it really is a matter of personal preference
@rak1507 why of course, the classical train example
lmao
I just wanted something fairly large so spammed some symbols
ah - thanks
RGS
RGS
with -trains=tree
      ⍋⍒⊖⍟⍱⍒⍋⍉⍒⍱⌽⍉⍒⊖⍋
┌─┼───┐
⍋ ⍒ ┌─┼───┐
    ⊖ ⍟ ┌─┼───┐
        ⍱ ⍒ ┌─┼───┐
            ⍋ ⍉ ┌─┼───┐
                ⍒ ⍱ ┌─┼───┐
                    ⌽ ⍉ ┌─┼─┐
                        ⍒ ⊖ ⍋
is there a way to do this on TIO :p
RGS
RGS
Except the vertical lines are connected.
21:05
also this doesn't work on tryapl either - i should probably download apl at some point lol
oh right
damn
RGS
RGS
It works
But you have to 1) enable salt by hand and 2) run the user commands in the "input" text area
oh it goes in the input?
oh. okay
that's tio, not tryapl
well i asked for a way to do it on TIO initially
RGS
RGS
21:08
(not sure if the "header" on the tio link was collapsed or not, but that's where I have the code to enable salt)
oh lol
so you did, I can't read
22:02
@Adám I can get 25, same no parens or brackets, one set of braces. Can't seem to get it down to the 20.
RGS
RGS
But what the heck is there left? :P
No parens and no brackets, no primitives, it's not like there's much left to work with :P

« first day (1611 days earlier)      last day (1343 days later) »