« first day (1807 days earlier)      last day (1144 days later) » 
07:00 - 18:0018:00 - 00:00

07:22
@KamilaSzewczyk cool stuff
07:46
@MasterQuiz I'm not sure if this is praise or a feature request.
 
2 hours later…
09:39
@Adám I have been using with some satisfaction JupyterLab under Anaconda with the Dyalog kernel and with @Adám's JS toolbar with the APL keyboard. This solution offers a more pleasant UI experience than RIDE, though it misses debug functions.
@Adám, there is a small typo in the APL Cart entry: "adjancent"
If anyone were looking for "adjacent", would not find the entry.
@milia at least one person who can admire it :P
@AlexB Fixed.
@KamilaSzewczyk first admiration, then understanding :P
09:49
@KamilaSzewczyk Ooh, ]Plot actually being useful.
wait, there's a plot dfn in Dyalog ?
Not dfn, a user command.
oh nice :D
@KamilaSzewczyk fabulous!
@KamilaSzewczyk can you plot the graph of the taylor approx and the graph of some function points calculated from the internal function implementation?
09:50
@AlexB Again, it'd be nice to hear what we could improve in RIDE to make it a more pleasant UI.
like 2 curves on the same plot
idk if i can do it with ]plot
but i'll try it later today
cool :>
although it's 10:51am i just woke up.
@Adám I made several posts in Github already and you commented on them. I will make more...
09:52
@KamilaSzewczyk ahh, the academic life...I'm jealous
hahahaha
yeah, waking up late is fun :)
it's even more fun when you come back home early.
2 lines on a single plot: ]plot (⍳4)(2×⍳4)(3×⍳4)
are you sure? I see 3 lines here.
@Adám ...and it plots even in JupyterLab! :-O
"Could not load bridge interface functions. (Error 0x00000000: "libhostfxr.so: cannot open shared object file: No such file or directory")", but I'll ignore it
@Adám by the way, can we relabel the axes?
speaking of the X axis.
09:55
@KamilaSzewczyk That's just a side effect of checking if .NET is available. We've silenced that in the newest version.
oh, i see.
@Adám This would make a nice quality of life change to RIDE: github.com/Dyalog/ride/issues/615
(IMHO)
doesn't seem too hard to implement too
@KamilaSzewczyk No, ]plot is very bare bones. It is just a cover for a tiny subset of SharpPlot using defaults for everything but the chart type. You can look at the source for ]plot to see how it does it, and use that to learn using the full SharpPlot. (There are also other ways to learn SharpPlot, of course.)
09:58
Why sad?
@Adám Any chance of interfacing with Matplotlib or similar?
What kind of API does that have?
matplotlib is python
@Adám that there is no easy way of doing nontrivial plots in APL
@Adám if there's a ready-made way to interface with Python, perhaps it would not be so difficult, except for mapping the Python arguments into something sensible in APL.
@KamilaSzewczyk SharpPlot really isn't that hard to use.
might it be
sharpplot has an apl cultivation lesson and a proper docs site
cool!
If this works, it would be very useful: "If the numpy library is available, numpy matrices will be automatically converted to APL matrices."
As a user, imo matplotlib doesn't score highly for 'intuitive use'...
10:04
@xpqz Agree, in part because it has 2 interfaces, one is mode-based and one is more functional-oriented. However, lots of people use it.
@AlexB Did you watch @RGS's presentation on pynapl? dyalog.tv/Dyalog21/?v=gOUFXBUMv_A
@xpqz not yet. I will. Thanks for sharing!
@AlexB In fact, using pynapl+matplotlib in a Dyalog jupy notebook would be a powerful demo.
Heh, Python calling APL calling Python.
Yeah.
10:11
@KamilaSzewczyk Feel free too improve ]plot, adding additional customisation features. (If you don't have V2.03, then I can give it to you.)
(I hope to put ]plot and all other user commands on GitHub soon, making it easier to collaborate on them.)
@xpqz I just realized that the APL kernel for JupyterLab does not seem to support the debugger. That would be a great improvement.
But how would that work? The debugger needs to show a function definition.
@Adám I don't know enough about APL, RIDE or JupyterLab to be able to answer your question. All I notice is that the Python kernel offers the debug option (from which I can inspect values of vars, manage breakpoints, etc.), whereas with the APL kernel the debug icon is grayed out.
(in other kernels)
Given that the prevalent workflow in APL (AFAIK) has significant emphasis in the think-and-explore phase, JupyterLab would be even a better IDE than RIDE. Of course there are many RIDE users who still need to be supported, but being able to leverage Jupyter work could free up some resources for Dyalog to focus on the language, the interpreter, the compiler, etc.
10:24
You'd need a translation layer between the ride protocol and the jupyter debugging protocol: jupyter-client.readthedocs.io/en/latest/…
I hope I am not stepping on anyone's toes...
@xpqz Wow, that's amazing. Yeah, we should definitely support that. I find that the interactive debugging is key in APL's dev UX. Can you log an issue against the kernel to support that? (We should also start promoting Lab instead of Notebook.)
Don't get me wrong, I am a total nOOb in APL but I can see that it can use some leverage of mainstream technology.
@AlexB RIDE isn't legacy. It is a quite new system, and is essential to have an interface to remote interpreters in the cloud and on headless servers like AIX.
@Adám I see. As I said, I am new here and I totally respect the many people who got APL to this point.
10:27
@Adám tbo, as RIDE already has a protocol for all of this, it certainly seems to me that it should be doable in the dyalog kernel. Similarly, the editor debugger extensions for VS Code etc.
So supporting (here: developing) the Jupyter Kernel doesn't free up any resources, only adds more to our workload. But don't get me wrong: I still think we should do it.
@Adám ha ha ha You are right. I should know better. I will remove my marketing hat now.
@xpqz Yeah, I've head of that. Are there issues against the VSC extensions for them to use the debugger?
@Adám I think I can do my recent CMC in APL
Gil has a proof of concept implementation. It needs a bit of polish, and he said it highlighted some weaknesses in the ride protocol when used as an integration tool for m ore general tools.
10:29
@AlexB Thanks. One of our main (imho) issues (but also sort of a strength) at Dyalog is our tiny development team.
@Fmbalbuena OK, but can you do the task I gave you when you asked for one?
@Adám which? (non-transcript)
@Adám I can imagine
@Fmbalbuena You cannot access the transcript?
@Adám sorry, which?
The room has a full transcript feature.
10:31
@Fmbalbuena you can search the transcript for keywords or past conversations.
@Fmbalbuena What about it?
15 hours ago, by Adám
@Fmbalbuena Write a function that, given a numeric list, adds 2 to every element of the list except the first one. E.g. F 3 1 4 1 53 3 6 3 7
You found it!
seems easy to me
10:33
Let's see what you come up with.
I can imagine multiple approaches.
⋄{1↓⍵}3 1 4 1 5
@Fmbalbuena 1 4 1 5
⋄{2+1↓⍵}3 1 4 1 5
@Fmbalbuena 3 6 3 7
⋄{(⊃⍵),2+1↓⍵}3 1 4 1 5
10:35
@Fmbalbuena 3 3 6 3 7
Very nice.
@Adám done
You don't need to ping me when I'm actively chatting.
⋄{(⊃⍵)2+1↓⍵}3 1 4 1 5
@Fmbalbuena (1 trailing line)
LENGTH ERROR: Mismatched left and right argument shapes
      {(⊃⍵)2+1↓⍵}3 1 4 1 5

␄
10:36
I will do my CMC
@Fmbalbuena Here, the left argument to + is (⊃⍵)2
⋄{(⊃⍵)2}3 1 4 1 5
@Fmbalbuena 3 2
@Adám nice, the jupyterlab debugger protocol IS microsoft's DAP: microsoft.github.io/debug-adapter-protocol
Two birds, one stone.
I wonder if the interpreter secretly already knows this language for speaking with VS.
10:45
@Adám ⎕←{(⍵,0 0)+0 0,⍵}3 1 4 1 5
@Fmbalbuena 3 1 7 2 9 1 5
That works
another challenge related to my CMC
... why?
@Adám Can you make a challenge related to my challenge?
10:48
AH, much better. I really appreciate fully formed sentences.
how to return in dels
@Fmbalbuena Write a function that takes a number n and returns an n-by-n matrix with Pascal's triangle left-aligned, and padded with zeros.
@Fmbalbuena Like this:
∇ returnVar←FunctionName argument
  … code …
  returnVar←…
∇
∇F
f←1
:While 1
⎕←f
f←{(⍵,0 0)+0 0,⍵}f
:EndWhile
∇
F
@Fmbalbuena There's actually a :Repeat:EndRepeat so you don't need :While 1
An you don't need that inner dfn either: Just use f instead of
But more importantly, you first line should read ∇F;f unless you're doing code golf. Otherwise f will leak out.
10:54
@xpqz Super!
How to golf This
Depends on how far we can stray from the original. Something like this?
@Adám Here's Gil's vs-code debugger implementation: github.com/tiamatica/vscode-apl-debug
@Fmbalbuena Just remove the then.
@xpqz Looks a bit neglected. Does it work, at least?
11:03
@Adám I discovered something useful with "" Try it online!
Yes, that's a common use. I told you they were useful!
@Adám I don't know; I dabbled briefly, but it uses too much of the js toolchains I don't have installed, so I abandoned play.
Gil is stretched thin, I think.
11:19
@Adám Can you rewrite This but 10 bytes and APL lang?
Maybe. Interesting idea. But certainly not right now.
@Adám Ok, Can you make a website?
You mean one that has these challenges, except for being in APL (and changing the byte count)?
You could probably do so yourself too.
@Fmbalbuena I don't see any license there, so we'd have to ask for permission.
11:32
APL blog post
@Adám I wrote the explanation for my code
12:11
@KamilaSzewczyk Super!
@KamilaSzewczyk Perhaps you could make the code at the beginning copiable as text. Right now it's just an image.
oh - i'll embed the full source at the end of the post
thought it's not required since it's given later on in the post
@KamilaSzewczyk Hey @Adám, this should be linked somewhere in the Wiki.
i have a lot of APL blog posts
@KamilaSzewczyk Sure, but the first impact is that the code at the top of the page looks intriguing but it cannot be copied.
hmm, it's meant to just be a cover photo...
i can't really style it with css
https://palaiologos.rocks/posts/taylor-apl/ - taylor series
https://palaiologos.rocks/posts/asmbf-ski-p1/ - register allocator in APL
https://palaiologos.rocks/posts/matrix-rearrangements/ - a weird matrix problem
https://palaiologos.rocks/posts/nonalphanumeric-c/ - a compiler written in APL
https://palaiologos.rocks/posts/dx-rewrite/ - a (from retrospective - slightly poor) domain extension library for APL
it's all just fun curiosities related to APL.
12:15
i'm really proud of the matrix rearrangements blog post
because i feel like it's a bit of idiomatic APL code i wrote correctly
@KamilaSzewczyk Can you give me an example of arguments for that f?
12:47
do you want a big test case list or just a singular example?
Just one small one I can use to verify that potential code changes don't break things.
one second
      3 f 5 3⍴5 1 1 0 3 4 1 4 3 4 0 0 0 0 0
9
the example given in the blog post
My bad.
↑∘.,/↓(⍺↑⍋)⍤1⊢⍉
↑∘.,/(⍺↑⍋)¨,⌿
@KamilaSzewczyk Flatter:
 f←{
     m←⌈/⍵⋄k←∨⌿0≠⍵⋄v←+/m-⍨+/⍵
     q←↑,↑∘.,/(⍺↑⍋)¨,⌿⍵-⍨⍺/⍪m
     p←q⌿⍨⍺≠≢∘∪⍤1⊢q⋄0=≢p:v
     v+⌊/+/k/m[p]-1 2 2⍉⍵[p;]
 }
Notice the lack of looping on the last line.
13:07
oh, that's a really cool one
Maybe that transformation would make a good blog post on its own. Flattening your code: A practical example
@Adám Are these ¯1 2 four or three bits?
@MasterQuiz Can you elaborate on this question? I don't understand what you're asking.
@Adám this code looks quite cool to me for some reason
it's just the visual appeal
@Adám The challenge requires a number of bits, and I was wondering how many bits were ¯1 2
13:17
Bytes?
@Adám Yes, I'm not an expert ahahah
1 byte = 8 bits, but for this set of problems, it makes more sense to count in characters.
And ¯1 2, are four characters, right?
Yes: ⎕←≢'¯1 2'
@Adám 4
13:41
Is this right ⋄1,⍨⌊/⍬ ⍝ [inf, 1]?
@MasterQuiz 1.797693135E308 1
@MasterQuiz Yes, but for golfing purposes ⌊/¨⍬1 is shorter.
13:52
@KamilaSzewczyk Impressive!
@Adám i re-read it again and i think i understand it
it's really cool
The last line, you mean?
Just plain high-rank computing.
14:20
I just got bitten by the ⎕IO problem... :-(
I was testing @KamilaSzewczyk's code as modified by @Adám and I got RANK ERROR a few times, till I realized that I had ⎕IO←0
It happens to us all.
@KamilaSzewczyk amazing blog posts !
Kind of Kamila's fault for not localising ⎕IO ;-)
@milia thanks :)
@Fmbalbuena I guess task failed successfully
@Fmbalbuena t.ly/uxji
14:36
Well, I can report that running python via pynapl inside a Dyalog notebook works a treat.
@AlexB @Adám ^^
Yay.
It loads matplotlib and friends fine. However, not sure how to get it to actually display.
@xpqz Did you try ]html?
horrible idea: use sympy through pynapl and implement symbolic computation in apl
@Adám No; how? Normally you'd use a %matplotlib magic, but I don't think the dyalog kernel does magics.
14:39
@MasterQuiz s11←0,⍨∘⊂⍣2,0
@xpqz Generate the required html, then do ]html myhtml
Under Jupyter, ]html is kernel magic, not a ucmd.
@Adám are there changes to aplwiki.com/wiki/Nib I need to make to integrate it well into the wiki? like how do/should I add it to aplwiki.com/wiki/Template:APL_dialects ?
Same with ]dinput
@Adám There should be another 0
So wrong, it's right! Love it. Now, run @RGS APL-Python in here.
@Wezl-acautionarytale Looks good. Change "download" to [url instructions] and wrap "documentation" in [url CodeBerg]. Add the | in `[[user:Wezl|], and maybe a list of primitives? Go ahead and add it to the APL dialects' Derivatives section.
"variadic functions" should be [[ambivalent function]]s
14:44
I'm still working on the list of primitives :)
thank you
You should also remove "new" as that will eventually become false.
Maybe add some body text explaining motivation and comparing to other, more known, array languages.
now that i think about it, i'd really like to see some math papers rewritten with APL
Maybe talk with my colleague Karta about it?
You should be able to guess his email address.
Well, look at that.
Cheating, but still.
I sense a blog post coming up.
14:50
@xpqz maybe make a APLmatplotlib?
@Adám I think there's one awaiting publication already? But yes, this is fun.
Richard has been on vacation.
Today I'm back to work. Even if I'm still not completely converted to APL-ism, I didn't miss Typescript a single bit.
(I might never be, actually. Even if I appreciate a ton of things APL, I think Haskell is still a better balance of verbosity. Of course, that may change...)
15:20
@Adám More a praise. I don't know how many other people find it useful, to add it as a feature
You mean ship my library with the product? It isn't hard to download and install.
Yay!
@xpqz, it's not cheating. The point is to be able to plot with flexibility of output from APL in Jupyter. I think this is very, very promising.
For me it's just a hobby, but scientists using APL for work would be thrilled, I think.
@Adám This is why I've said that it was a praise.
In which folder should I install Py'N'APL?
@AlexB In order for it to be seamless, we'd need a little bit of support from the kernel, like how it's done in Julia: github.com/JuliaPy/PyPlot.jl/blob/master/src/PyPlot.jl
@AlexB The cheating bit was that I hard-coded the image name reference in a markdown cell.
@MasterQuiz It doesnt' really matter, as long as you can reference it. If you want to use it in jupyter, it needs to be 'below' the folder that jupyter thinks is root.
@xpqz Of course, but you showed that it's possible. From what I guess, it is not a ton of coding that's required. Sadly I cannot offer more concrete help, because I am tied up with time and my line of work is elsewhere. But I enjoy spending time in this forum and I hope that someone might find the time to develop the support code.
15:29
@xpqz If I want to just do ]load Py, without writing down the whole path?
@MasterQuiz What's the problem with using the whole path? In fact, it would be good practice to do so. This way the modules can be in separate directories...
@MasterQuiz Not sure you'd want to do that, to be honest. The pynapl folder contains a lot of stuff, and you'd need to root your session right in the midst of that in order for that to work, as far as I can see (disclaimer, literally only looked at pynapl for the first time half hour ago).
You can see what @RGS does towards the tail end of his video.
@MasterQuiz I mean change the tasks
Oh, that's what you mean. You're asking us to come up with 50 small array generation tasks.
15:45
fun idea, sort of like kolmogorov complexity challenges
@Fmbalbuena A classic one for you: make 0 0⍴0 in 3
@xpqz They don't know enough.
that one is hard even for experts
Actually, for anything in 3, brute-forcing is very viable.
⎕←+⌸⍬
15:55
@xpqz Response looks like a 0-by-0 matrix.
@Adám true
@xpqz Deja Vu
:)
16:48
@user8544778 Hi avx. If you want to participate here, please email [email protected]
CMC: Evaluate SK calculus
⊂⍬
a solution?
@Richard No, that's an enclosed empty vector.
There are no 2s, I believe. But loads of 3s.
Until recently, I wanted an additional primitive for {⍺ ⍵} or {↑⍺ ⍵} — I wasn't quite sure which one. BQN adds both.
Just as I had sent that wish off to our CTO, I recanted, and now I think I have a better idea. And that primitive would allow 0 0⍴0 in 2.
No, wait it wouldn't.
16:56
:)
` {⍺ ⍵}` as a primitive would be nice for tacit
Yeah, but my newest idea is better, I think. At least for extending current APL.
We have plenty of unused monadic functions.
Monadic < and > as analogues to and but increasing/decreasing rank instead of depth.
<Y would be ↑,⊂Y aka (1,⍴Y)⍴Y
>Y would be ,[⍳2]Y
@Richard It's a good challenge to really improve your depth of understanding. Just short of 40 length 3 solutions.
Ooo that's interesting
Thanks. I'll skip the spoilers and try to make as many as possible
17:00
Now you can write ⍪⍥⊂ for {⍺ ⍵} and ⍪⍥< for {↑⍺ ⍵}
The array model still confuses me, the semantics surrounding scalars, and nesting/boxing are hard.
@Adám I like this.
Only downside I can see is that it'd fit better with ⎕ML←3.
is there a way currently that allows me to execute a function at specified depth?
No, it is at the top of my wish list.
sad
i'd have a great way of building an AST if it was a thing
17:03
It is definitely planned. f⍥k
You can quite easily define it.
'Depth'⎕CY'dfns' :-)
It isn't an ideal implementation, though.
yes i noticed
I have an equivalent of shape but for depth
3 3 2 1
17:05
I'll stick to my ¨¨¨ :P
so 3 3 2 1 (fancy operation) 0 would yield this:
┌─────────┬─┐
│┌─────┬─┐│0│
││┌───┐│0││ │
│││0 0││ ││ │
││└───┘│ ││ │
│└─────┴─┘│ │
└─────────┴─┘
SKI calculus in relatively idiomatic APL sounds like a very difficult problem
@KamilaSzewczyk So you'd take a flat list, and force each element that deep?
yeah, pretty much
And only use vectors inside vectors, I presume.
a somewhat poor tree
yes
17:09
The monadic form is a fun problem.
@hyper-neutrino Can you give chat.stackexchange.com/users/536445/user8544778 access?
@Adám this looks like elaborate censorship
Nothing like the union of f and enclosed k
Or the train which computes the enclosed intersection of the union and the base-representation.
17:20
If f is a function, it could be f under enclose applied to K, and still be valid
@FawnLocke Where under is given the name U?
I think the above train is the best.
Yes, it's a shame under isn't in Dyalog.
All the more reason to add it :)
@Adám A task to output a list with just 5 bytes for me?
17:26
@Fmbalbuena ¯1 ¯1 ¯2 ¯2 ¯3 ¯3
@Adám ⋄2/-⍳3
@Fmbalbuena ¯1 ¯1 ¯2 ¯2 ¯3 ¯3
Very nice.
Another?
Specifically 5 bytes?
17:29
yes except
I have a nice one, but it is only 4.
@Adám Ok
1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 in 4 bytes
⋄⍳5/⍳5
@Fmbalbuena
LIMIT ERROR: Rank of resultant array would exceed maximum permitted
      ⍳5/⍳5
      ∧
17:30
hmmm
i need dupe
⋄/⍨⍳5
@Fmbalbuena 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
Correct?
⋄ ⍸⍳5
@FawnLocke 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
@Fmbalbuena That's what I had in mind, being that you've not learned this extension of yet.
17:32
is /⍨?
No, but close.
is {(,⍵)/,⍳⍴⍵}
(with some restrictions: The argument has to be positive integers only)
@Adám (Flatten w) Replicate Flatten Range Shape w?
Not Length, Shape.
@Adám I know, but please Len = Shape
Nope. Not in APL.
17:36
Why? Monadic is Shape, but i want to call Len/Length
is Length (we tend to call it Tally)
ok
@Adám 7 bytes task?
1 2 3 3 2 1
@xpqz ah, that gave me an idea: ↑⍸0 for 0 0 ⍴0
@Richard Yep! That's a nice one.
17:40
@Adám idk, A hint?
@Fmbalbuena Start by generating half of the numbers, then think how you can use that to add the other half.
@Adám I don't know how to reverse
half understand it myself :) But makes you think.
@Fmbalbuena I'm pretty sure you've learned that function.
which?
⋄3↑3 2 1
17:43
@Fmbalbuena 3 2 1
@Adám which function?
@Adám help me
No need to ping me twice. have some patience instead. If I don't answer you immediately, then it is probably because I'm doing something valuable. In this case, I was giving food for my son.
@Adám ok
You could hunt through the language bar, or use APLcart: aplcart.info?q=reverse
@Adám When i find aplcart, You asked me.
17:47
What?
@Adám i haven't learned monadic
Oh, well, it reverses lists.
ok, another task?
Solve this one first, using your newly acquired function!
@Adám help me to golf ⋄(⍳3),⌽⍳3
17:52
@Fmbalbuena 1 2 3 3 2 1
Here's a hint: Try to identify two parts of that expression that are identical.
⋄{⍵,⌽⍵}⍳3
@Fmbalbuena 1 2 3 3 2 1
@Adám help i can't use
I didn't ask you to.
But is very simple, it takes a function on its left and swaps its arguments.
17:55
@Adám another hint?
Give a name to the repeated part.
⋄f,⌽f←⍳3
@Fmbalbuena 1 2 3 3 2 1
Very good.
07:00 - 18:0018:00 - 00:00

« first day (1807 days earlier)      last day (1144 days later) »