« first day (2417 days earlier)      last day (230 days later) » 

3:47 AM
@PaulMansour It is due to a "dangling reference", i.e. keeping a structure of refs alive, only because they are in use, so garbage collector tries to clean up all the time. I have a fix for this in 19.0.
 
 
7 hours later…
11:08 AM
@Adám So the chart wizard is unusable in 18.2? And if I want to use it I should use 18.0 or wait for 19.0? I can deal with that, but any reason that kind of fix doesn't come out in a patch?
Was this a known bug?
 
By pure coincidence I had need of generating charts today as well. Is there some bona fide Dyalog way of doing this procedurally so the CLI can have fun too?
 
Yes, SharpPlot
@PaulMansour I'll see what I can do. it isn't ChartWizard that has changed, but tweaking stuff in SALT.
 
It's not a big deal, don't waste time on it. My interest is largely using SharpPlot directly, and I was exploring the Wizard to that end. I can do that in 17 or 18.
 
SharpPlot. Gotcha. That's the keyword I was missing. Cheers.
 
I would be curious to know, however, if there is any automated testing for the Chart Wizard. I assume the whole thing is written in APL using ⎕WC.
 
11:20 AM
No, there isn't. Yes, it is all ⎕WC. We have been considering a re-write in a cross-platform tech, but more likely is deprecating (not removing) SharpPlot in favour of some modern 3rd party library.
 
Interesting. We have ignored charting for a very long time, and are just know looking into heavy use of SharpPlot. After some research, other third party libraries look difficult to use, JavaScript dependent, and SharpPlot looks very good in comparison.
 
Agreed.
 
11:41 AM
@PaulMansour You have 19.0, no?
 
@Adám Oh, yes I do. I think there is a new beta out, but I haven't downloaded it.
 
 
3 hours later…
3:00 PM
Welcome to APL Quest 2021-4! Today's quest is Square Peg, Round Hole:
> Write a function that:
• takes a right argument which is an array of positive numbers representing circle diameters
• returns a numeric array of the same shape as the right argument representing the difference between the areas of the circles and the areas of the largest squares that can be inscribed within each circle
So here, the actual challenge, besides for finding the formula, is moving parts around to simplify/shorten/impress/whatever… :-)
 
(¯.5+○÷4)××⍨
 
OK, we start out strong here.
 
I liked the symmetry of (○2*⍨÷∘2)-2÷⍨*∘2
 
Yes, that makes it easier to see what's actually going on.
This one is pretty clean too: {(2*⍨⍵÷2)ׯ2+○1}
Not sure really what to add here.
I wonder if there'll be a difference in precision.
There definitely will be a (minor) difference in representing the contant parts as a formula vs a pre-computed value.
@Finn Fun fact: Back in 2020, when we were writing up this problem, I had that exact solution, character for character, including omitting 0 in ¯.5
How do y'all like (○-+⍨)4÷⍨×⍨?
Ooh here's a challenge: Do it with neither parens nor assignments.
 
@Adám That is funny indeed! For clarity I prefered (¯0.5+○÷4)×*∘2 but decided to do some more code-golfing…
 
3:16 PM
{⍵×⍵×0.5-⍨○÷4}
×⍨ׯ.5+4÷⍨∘○1⍨
(I didn't intend to post that so soon, but my baby pressed Enter.)
Shall we call it a (short) day then?
 
One character shorter: ×⍨×4÷⍨¯2+∘○1⍨
 
Of course. Nice!
 
Shaving off another character with an ugly hack: ×⍨×4÷⍨¯2+○⍤≡
 
@rabbitgrowth Fails on a scalar, though that case isn't being tested.
 
Oh, you're right.
 
3:23 PM
Sorry, I am abroad and was mistaken about the time.
 
Turns out it was testing a scalar, but only 0, which happened to work.
I've added a non-zero scalar test case.
 
I do not have a different approach or solution
 
Nah, there isn't much room for variation here.
OK, see you next week for 2021-5: Rect-ify!
 
Thanks @Adám!
 
Thank you for coming.
 
3:29 PM
Thanks everyone!
 
Hello.
 
Hello there. Interested in APL?
 
I use Python...
But seems like an interesting language.
 
Definitely very different from Python.
 
I am looking to learn my first compiled language.
For two reasons.
1. Python is very slow so I cannot make more complicated stuff it in, it's also very high level so making low level stuff is impossible
2. Need to get skilled with more complicated languages
Is APL the right language for these goals?
 
3:32 PM
APL and its descendants are usually interpreted, but things like apl.wiki/Co-dfns exist.
 
Hmm.
 
APL is probably not the right choice for low-level stuff, unless just modelling it.
However, you can definitely make complicated stuff in it. Performance can at times be better than hand-crafted C.
Not sure what the benefit of a complicated language would be, but APL is surely very different from all mainstream languages. APL code can look like advanced mathematical formulas.
 
Oh okay.
It doesn't seem like the right language for me then.
 
Unless you want to know what ⊃∘⊃({-⍺+.×⍨(+\-+/)@(∘.=⍨⍳∘≢)⍵×∘.≤⍨⍳≢⍵}/≢⍴⊂) means…
 
Okay... that's super complicated.
I am going to make Sandwich much better then this.
 
3:52 PM
Hi there! I also came from Python.
Btw, I found it mildly interesting how my high-school-math instinct was to "simplify" (d/2)² into d²/4, but in APL 2*⍨d÷2 is just as simple as 4÷⍨d*2.
 
@The_AH whilst C looks like the sort of thing might want to learn first, Rodrigo recently did a talk about how learning APL influenced his python
Trying to find link
 
I am not good at maths.
 
Can't find the talk, but here blog post instead mathspp.com/blog/what-learning-apl-taught-me-about-python
 
Okay.
That blog post seems interesting.
 

« first day (2417 days earlier)      last day (230 days later) »