« first day (1892 days earlier)      last day (746 days later) » 

12:55 AM
anyone know of any good video tutorials on using the Dyalog UI covering basics like loading a workspace, configuring APL settings, how to use the debugger, etc.
 
@gwa000 Not yet, but we're about to launch a series covering exactly that.
 
adam, don't want to pin you down but are we talking a few days, weeks, months? if it is too far off i'll start reading some documentation although my goal was to hopefully watch some videos late at night.
 
 
6 hours later…
att
7:11 AM
Is there way when displaying multidimensional arrays to alternate the directions of axes
 
@att what do you mean by that?
 
att
so for example `2 2 2⍴0` might be
```
0 0 0 0
0 0 0 0
```
 
@att just transpose the array before displaying it
 
att
only the last axis goes horizontally, from what I've seen
 
oh. if you want multiple axis horizontaily, you'll need to do something more fancy
 
att
7:14 AM
ah, ok then
 
then there's the question of whether 2 2 2⍴⍳8 prints to
1 2  3 4
5 6  7 8
or
1 2  5 6
3 4  7 8
 
 
2 hours later…
9:13 AM
definitely months before a substantial series, but have a preview of some drafts. If you have feedback it's appreciated. 5 minute vids is the goal: https://youtu.be/sSfspfApNNg
https://youtu.be/TEz0b7mHQbM
https://youtu.be/-sz-MFAAUOU
https://youtu.be/stIo5mNLgWA
 
 
3 hours later…
12:13 PM
@RikedyP thanks! Very usefull, watching them now
 
12:26 PM
 
@Adám What on earth lol
oh i understand
i like it
 
1:21 PM
@Adám nice! Will there also be a new keyboard supporting this?
 
2:05 PM
@Richard Already rolled out, in fact: Hold the ⊞Win button and tap .
 
p.s. I'm ready for the quest or did I miss something?
 
@Adám - /me snrchs with the effort to not laugh out loud, after carefully noting the date
 
@Richard 15:00 UTC.
 
ah :) Daylight Savingtime started here last sunday...
 
why do people still follow day light savings
 
2:11 PM
Like the rest of Western Europe ... ;)
 
it literally makes no sense
 
@Richard Not Iceland.
 
Also an Island
@PyGamer0 Some fierce debates about this as you probably know. For the same reason nothing will change
 
> fierce debates
i dont know
 
The EU had a proposal in 2018 to cancel de DST. Debates started in every country. With the new chairman, which changes every year or so, being Portugal, it is off the agenda again. Original reason was saving energy by shifting the clock, so most of the active part of the day is in daylight.
On the other hand people claim it is bad for their biorithm and have a jetleg after the shift.
Maybe just like the ⎕IO←0 discussion :)
 
2:38 PM
@Adám Is 🌜🤔🌛 in 18.4.1 equivalent to {⍵}?
 
yeah
 
@Fmbalbuena Yes. The entire table is:
📢!
🌳#
🐣&
✍'
🤱(
🎅)
🤯*
🧮+
😍,
🥖-
🔴.
🌿/
💂:
👉<
🙂=
👈>
🎲?
🌍@
🔎[
🤰\
🔍]
🌜{
📏|
🌛}
🙅~
🍑¨
🥶¯
🧭×
🪓÷
🏃‍
🏴‍
🏁←
👍↑
🥅→
👎↓
😳∇
📜∊
🤐∘
🐜∧
🛶∨
🙏∩
🦄∪
😠≠
😊≡
😡≢
☝≤
👆≥
🔒⊂
🔓⊃
🔏⊆
🤣⊖
⏩⊢
🔙⊣
🔡⊤
🔢⊥
🚧⋄
📈⌈
📉⌊
🚀⌶
👇⌷
🔑⌸
🐇⌹
📝⌺
🙃⌽
🧬⌿
🌱⍀
🎶⍉
🛫⍋
🛬⍒
💾⍕
💭⍝
📩⍞
🌴⍟
🔧⍠
😬⍣
😮⍤
😱⍥
😵⍨
🥰⍪
😶⍬
⛵⍱
🚫⍲
📚⍳
📐⍴
🤔⍵
👀⍸
🥺⍺
📤⎕
🥧○
 
nice
except for few, i like it
🧮😵🌿🙃1 5 3 8 2 3 4 🥶5 🥶1
@Adám what is today's quest?
 
Love the readability of 🎲
 
2:55 PM
Having 💭 denote a comment would be awesome
 
Thought and would be 😕 and 😘
 
Welcome to the APL Quest! Today's quest is It Is a Moving Experience:
> Write a dfn which produces n month moving averages for a year’s worth of data.
 
+⌿÷⊣
 
My solutions:
APL 18.2: {⍺÷⍨⍺+/⍵}
APL 18.4.1: 🌜🥺🪓😵🥺🧮🌿🤔🌛
ngn/k: {(+/'x':y)%x}
 
I started with {⍺÷⍨⍺+/⍵} and was pleased to discover that it could be simplified into +/÷⊣ :)
 
3:00 PM
Yup, that is indeed very nice.
 
Is it better conceptually to write +⌿÷⊣ even if I'm sure the argument is a vector?
 
huh no one posted an 18.4.1 solution yet, seeing as its the future of Dyalog APL :P
i tried making a bqn solution, failed
 
@rabbitgrowth Either is fine, but maybe one day you'll copy your snippet to a higher-rank context.
Nobody thought to do (+/÷≢)¨,/?
What happens if you ask for n>12?
 
@Adám i though about it last week
 
@Ioanna Hi there. You're clearly interested in mathematics. Maybe in APL too?
 
3:06 PM
Hi! Yes, I am definitely interested in APL
Just hard to find the time to learn more, but here I am now :)
 
Cool. We're just in the middle of discussing this problem.
 
Thanks for the link - taking a look
 
@Adám length error?
 
hm perhaps I should try to understand the solutions mentioned above
 
@xpqz Right. Now, what do you think should happen?
 
3:08 PM
@xpqz but not for n=13
 
Exactly.
For 13, we get an empty vector of averages, essentially saying that there are no length-13 sub-vectors.
I'd argue that for n>13, that should be the answer too. How might we implement this?
 
This is why I argue that windowed-reduction should be changed.
 
conditional statement? Can;t figure out something else
 
@Richard How about clamping the left argument to the maximum allowable value?
 
@Adám What a waste of time to learn all.
 
3:14 PM
@Fmbalbuena wdym?
 
@Adám I don't want to change because this is waste of time to learn...
 
Check the date (and minor version number).
 
@Adám ... okay, this helps me?
 
@Richard OK, so how would it look with a conditional?
 
@Adám Oh, thanks
 
3:17 PM
⍺<≢⍵:⍬
 
{(13⌊⍺)÷⍨(13⌊⍺)+/⍵}
yuck
 
(⊣⌊⍴⍤⊢)(+⌿÷⊣)⊢ seems to work, but I feel like there's a better way to do this
 
@xpqz Hold on, if (13⌊⍺)+/⍵ gives an empty vector, who cares what you divide it by?
@rabbitgrowth You could swap arguments on the middle tine: ⊢(+⌿÷⊣)⍨⊣⌊≢⍤⊢ or even ⊢(+⌿⍨÷⊢)⊣⌊≢⍤⊢ but this uses 12 instead of 13, which isn't right; the result will be the overall average instead of the empty vector.
 
{⍺>≢⍵:⍬ ⋄ ⍺÷⍨⍺+/⍵}
 
That's quite readable.
 
3:21 PM
I was just about to say the same.
 
Ah yes, should have used
 
1+≢ in fact.
There's a silly way of making that a tiny bit shorter.
 
Are you swapping the arguments just to avoid the parens?
 
Me personally? Yeah. That's my style.
 
yes I am
any other ways to cope with n=14?
 
3:25 PM
Than the clamping with ?
 
yes
 
You could catch the error.
 
0::⍬
 
how does that work? You had some video's about that but didn;t watch them yet
 
Better would be {5::⍬ ⋄ ⍺÷⍨⍺+/⍵}
 
3:27 PM
is 5 the error code for ' Range Error' ?
 
:: takes error numbers on the left (0 for all errors, 5 for only length errors) and a return expression on the right. The expression is evaluated and returned if any such error happens subsequently.
 
      ⎕em 5
LENGTH ERROR
 
Sometimes, I wish there was an "Adverse" operator, which applies/returns its right operand if the left operand errors.
 
why is n=13 returning ⍬ en n=14 the length error? What is special about 13?
 
13=1+12
 
3:28 PM
yes and 14=1+1+12
 
exactly the type of videos i was asking about.

thanks!
 
@Richard Yeah, this is what Brian meant. He'd like any too-large left argument to give the empty result.
 
ok
 
I'm staring at the function bar in RIDE trying to figure out what that silly way is
 
just for fun, is there an other way to implement n+/⍵ e.g. with outer product?
 
3:32 PM
@rabbitgrowth My idea is for replacing 1+≢⍤⊢ in ⊣÷⍨⊢+⌿⍨⊣⌊1+≢⍤⊢
@Richard You could use Stencil, but it gets awkward. @xpqz spoke about this at APL Seeds '22.
 
@Adám ah missed that.
 
Soon available on catch-up
 
thx
 
_Adverse_←{⍺←⊢ ⋄ 0::⍺(⍵⍵⊣⊢)⍵ ⋄ ⍺ ⍺⍺ ⍵}
(+/÷⊣)_Adverse_⍬
⍺(⍵⍵⊣⊢)⍵ is a trick to allow both function and array right-operands. In our case, it could be just ⍵⍵
 
maybe something like this can be used for windowing: (¯1+⍳5) ∘.+ ⍳5
1 2 3 4 5
2 3 4 5 6
3 4 5 6 7
4 5 6 7 8
5 6 7 8 9
 
3:36 PM
@BojanPetrović Ah, yes, you could index with that.
 
yes was tryinbg something like that
nice!
 
However, it goes too far. You need to compute how many sub-vectors you'll need.
 
Ah, is it ≢⍤,?
 
Indeed!
 
@RikedyP will there also be a separate set of videos using the new emojis adam referenced in 18.4.1? and we'll need a whole new set of manuals, etc. :>)
 
3:40 PM
That was fun to figure out.
 
I'm still having fun trying to understand the several proposed solutions (total noob)
 
{×(⍳⍺),(⍺-⍨≢⍵)/0}
for masking
 
And then rotating that?
 
yes maybe. Still thinking :)
 
@Richard {(≢⍵)↑⍺/1}
 
3:44 PM
ah :)
 
Fun alternative: {1/⍨⍺,⍺-≢⍵}
(You can also use \ instead of /)
 
@Ioanna The clearest one is probably {⍺>≢⍵:⍬ ⋄ ⍺÷⍨⍺+/⍵}.
 
thanks for the tip @xpqz
 
@xpqz Agreed, but how would you adopt it to allow higher-rank right-arguments?
 
+⌿
 
3:47 PM
What Brian said
 
That's not enough. is wrong.
E.g. for 7 and ⍪⍳5 it should give 0 1⍴0
 
{⍺>≢⍵:0⍴⍴⍵ ⋄ ⍺÷⍨⍺+⌿⍵}
 
That's the same as
The idea is that we need to empty out the leading axis.
 
(0,1↓⍴⍵)⍴⍬
 
Sure, or just 0⌿⍵
 
3:53 PM
ofc
 
btw, if it wasn't for this, 0@1⍴⍵ might be better, as it replaces the value in-place.
That's 0@0⍴⍵ for the ⎕IO←0 crowd.
 
{⍺>≢⍵:0⌿⍵ ⋄ ⍺÷⍨⍺+⌿⍵}
nice
 
I'd say that's the industrial quality version.
 
:)
 
Two points to @Richard
 
3:55 PM
⊣÷⍨⊢+⌿⍨⊣⌊≢⍤, is the golfer's version.
 
What if ⍺ is also higher-rank?
Or at least a vector
 
How would you make sense of that?
Sliding window of varying size…
 
like a product -- mapping different values over the cells of ⍵
 
an matrix of 'sales vectors' with a corresponding ⍺
 
^^ yes
contrived, admittedly
 
3:57 PM
{⍺÷⍨⍵+⌿⍨⍺⌊1+≢⍵} would be the no-branch-prediction-failures-fanatic's version.
Shall we say we've exhausted this problem?
 
yeah
 
See you next week for Solution Salvation.
 
Sadly I'll miss next week's masterpiece. I'll leave this one here for you for then: ⌹
 
thanks again. Looking forward to the video again
@xpqz :), but now without
 
@xpqz Don't tell me you'll be playing dominoes instead of attending!
 
4:04 PM
> Hint: this is the easiest of all of the problems presented here.
?!
 
easiest provided you know the builtin
silently hoping someone implements the Cramer method or Gaussian elimination
 
4:15 PM
@xpqz Lol, I thought that was a hint, like "here's an essential ingredient you need to solve this problem"
 
@rabbitgrowth it sort of was..
 
4:42 PM
it is only recently I realized Xm≡(⌹Ym)+.×Ym+.×Xm
 
 
3 hours later…
att
7:27 PM
@dzaima I was thinking alternating axes (the second)
 
then you can (⊂⍤2)2 2 2⍴⍳8
 
att
7:42 PM
{⊂⍤2⍣(⊃⌊2÷⍨⍴⍴⍵)⊢⍵} more generally then
 
⊃⌊2÷⍨⍴⌊2÷⍨≢
 
att
why ≡/?
 
oh that's font misrendering the Tally character. this is how it should look like
 
att
ah
 
 
2 hours later…
10:12 PM
      'C:\Users\brian\Persinal\Scripts\APL\more\jónRói'⎕NPUT⍨∘⊂'test'
FILE ACCESS ERROR: C:\Users\brian\Persinal\Scripts\APL\more\jónRói: Unable to create file ("Access is denied.")
      'C:\Users\brian\Persinal\Scripts\APL\more\jónRói'⎕NPUT⍨∘⊂'test'
                                                            ∧
why am i getting access denied even as administrator?
like... what i want to do is write to a text file
or even be able to make one
 
maybe the directory doesn't exist? does it work with an ascii filename? how about a relative path?
 
oh wait... its a clear ws
is that the issue maybe?
and i don't know what you mean by ascii filename
 
without non-english characters like ó
probably not the cause as everything should understand unicode nowadays, but worth a try
 
@dzaima wow worked. thanks!
wierd
 
¯\_(ツ)_/¯
 
11:21 PM
how do i make my "CONTINUE.dws" replace my original WS?
 
11:57 PM
@BrianBED i'm a newbie here but i think you can do a File --> Save As and out in your original WS.
 
@gwa000 oh thanks that works wonderfully
 

« first day (1892 days earlier)      last day (746 days later) »