« first day (1775 days earlier)      last day (54 days later) » 

1:13 AM
Was watching Ron's Gone Wrong with my son. From a far this "friendship code" looked like APL :D. I was excided for couple of minutes ;D
 
1:55 AM
I made a video walkthrough of my day 4 Advent of Code solution if anyone's interested! (code here)
 
 
1 hour later…
3:21 AM
shiftR
{len←≢⍵ ⋄ a←(len-⍺)↑⍵ ⋄ (⍺⍴0),a}
      1 shiftR 1 0 0 1
┌→──────┐
│0 1 0 0│
└~──────┘
      m1
┌→────────┐
↓1 2  3  4│
│2 4  6  8│
│3 6  9 12│
│4 8 12 16│
└~────────┘
I have shiftR function, and I want to apply the shiftR on matrix m1 for each row,
1 shiftR m1
LENGTH ERROR
shiftR[0] shiftR←{len←≢⍵ ⋄ a←(len-⍺)↑⍵ ⋄ (⍺⍴0),a}
                                              ∧
      1 ∘ shiftR ⌿ m1
SYNTAX ERROR: The function does not take a left argument
      1∘shiftR⌿m1
any idea?
(1 ∘ shiftR) m1
LENGTH ERROR
shiftR[0] shiftR←{len←≢⍵ ⋄ a←(len-⍺)↑⍵ ⋄ (⍺⍴0),a}
                                              ∧
      (1 ∘ shiftR) ⌿ m1
SYNTAX ERROR: The function does not take a left argument
      (1∘shiftR)⌿m1
               ∧
 
Try 1∘shiftr⍤1⊢m1
 
@voidhawk, nice.. it works..
what does ⊢ do here anyway?
↑ 1 shiftR¨ ⊂[1] m1
┌→───────┐
↓0 1 2  3│
│0 2 4  6│
│0 3 6  9│
│0 4 8 12│
└~───────┘
it works too, but your solu is better..
 
It separates the arguments to ⍤ so that they aren't considered a single list (stranding has higher precedence)
 
does 1∘shiftR⌿m1 plainly work
 
3:39 AM
⊂[1] is equivalent to btw (even if I wish it were ⊂⍤¯1 )
 
@Razetime, no, it does not work,
@voidhawk, you are right,
 
4:43 AM
how do i do apl's bracket indexing (x[3 4]) in bqn?
 
4:54 AM
@PyGamer0 3‿4⊏x
 
 proc2←{
     (a b c d)←⍵
     range←⊣,⊣-∘(⍳∘|××)-
     a=c:mat[a;b range d]+←1
     b=d:mat[a range c;b]+←1
     ⍝ else
     (=/|(a-c)(b-d)):mat[a range c;b range d]+←(,⍨⍴1↑⍨1∘+)≢a range c
 }
mat←1000 1000⍴0
proc2⍤1⊢Data.input
+/,1<mat
quick and dirty solution for today's :)
Before that, I preprocessed my data to strip , and -->s, and read them up as 2D array.
 
5:54 AM
@PyGamer0 yep looks like it
 
ok so i am going to post it
 
do BQN allow you to add new unicode as function name or operator ? I do not think APL allow to do so
 
BQN does not either
 
is my answer 14 bytes?
sbcs?
do i link the sbcs?
 
if you want to
 
5:59 AM
 
I'm wondering do you guys use APL/J in your daily to solve practical problem other than solve online coding question?, .. can you share some info.. what tool do you use.. ?
 
I wrote an image data finding tool for Dyalog earlier
 
UI app or just back-end?
 
backend
 
 
1 hour later…
7:18 AM
@elliptic00 I wrote a utility for image processing github.com/LdBeth/pnmaster
 
8:09 AM
github.com/rak1507/Advent-Of-Code-APL/blob/main/2021/… today's was pretty fun, should've seen the diagonal change coming lol
had to redo my fill fn
 
@rak1507 ah, so you filter out the diagonal for part 1
 
yea
also TIL that VFI can take a vector left argument: very handy for parsing numbers
 
8:47 AM
@LdBeth, APL program supposes to be one liner ?
Joking.. Nice.. I will study your code once I have time..
@LdBeth, btw, do I need to any special function or any plugin to read some image file to some matrix.. and do some image processing on it.. ?
Let simplify the problem a bit. If I just want to read some image (png..) bit map file, and scale to different size..
It seems to APL can be very powerful tools to do image processing
Of course we need some libraries tools
 
9:21 AM
@elliptic00 I use the netpbm command line programs to convert all kinds of image formats from/to the so call PNM format supported by my image processing program
 
10:05 AM
@Pineapple Hi there. Interested in APL?
 
10:18 AM
@adr No, they don't share scope, but you're using a monadic operator not a function, and there, is equivalent to (⍺⍺∇∇) so ∇∇ is a reference to the operator itself, while is a reference to the function it derives.
 
10:30 AM
@RikedyP I am a silly bean. Shall refactor at some stage. Meanwhile, today's: gist.github.com/xpqz/5af963d56153b9e340f398931106adcf
 
@xpqz nice, didn't think to use iotag
 
Completely accidentally, it worked unchanged for the diagonal case.
 
yeah, I had to rewrite fill to work for that
although it was basically the same, just using ⍳¨
 
10:46 AM
@xpqz Yeah I accidentally solved the 2nd part first
I used ]copy dfns to
 
@voidhawk Awesome. i've learnt a lot from your previous years' efforts.
 
11:29 AM
@voidhawk Now learning that yernab is voidhawk! I'll fix your links to the apl wiki article aplwiki.com/wiki/Advent_of_Code
 
 
2 hours later…
12:59 PM
Finally cleaned up and commented my solutions so far: https://github.com/rikedyp/Advent-of-Code/tree/main/Y2021
let's see how sustainable it is to keep it going...
 
 
1 hour later…
2:00 PM
Hi does anyone has access to the "Elementary Analysis" by Iverson 1976?
I can see the "http://www.jsoftware.com/jwiki/Doc/Elementary_Analysis" but it's partial. Thanks!
 
@hyper-neutrino Can you give chat.stackexchange.com/users/481057/justin2004 access?
 
2:16 PM
@k1m190r I'm pretty sure I have a copy of this at my office. Can check tomorrow...
 
My father had it at home :-(
 
@PaulMansour Awesome Paul. If there is any chance for me to get a copy (PDF). I would cover the cost of whoever is going to do the scan. Thanks.
 
Who owns the rights to APL Press issues?
@k1m190r I'm pretty sure we have it at our UK office.
 
@Adám print version that I can get/ buy?
 
@k1m190r We're planning to scan all these things, but copyright is a big question.
 
2:22 PM
oh ok
 
Someone really should find out about re-publishing all these old gems.
 
please :)
 
For now, I suggest writing to support@dyalog.com and asking about that particular book. The people getting support emails are regularly at the office. Maybe we can, for now, scan it and arrange a video call where you can browse it, or something.
 
sending...
 
2:49 PM
@RikedyP 0<¯2-/x -> 2</x (day 1)
 
3:41 PM
@user16329133 Hi Hrishikesh Deshpande. If you want to participate here, please email access@apl.chat
 
@Adám done, assuming i did it right (on mobile)
 
Looks right. Thanks!
@user11022895 Hi justin2004. You should be able to chat now. Welcome!
 
4:24 PM
@Adám @hyper-neutrino
thanks!
 
@user11022895 As you're new to Stack Exchange chat, I highly recommend having a look at apl.wiki/APL_Orchard#Features
 
4:39 PM
On APLcart I see:
⊂⍤¯1∘⍉Ym Matrix to vector of column vectors

but ↓⍉Ym works for the matrices I am using. Are there cases where ↓⍉Ym wouldn't work like the APLCart function?
 
@justin2004 No, that looks like a simple mistake.
 
@Adám Did I just help improve APLCart? :)
 
@justin2004 Yes. I've pushed the change. Thank you.
I'd be interested in knowing your relationship with APL, if you want to share.
 
@Adám Nice! Although that "mistake" did cause me to learn a little bit more about rank.
Sure, at the moment I am using APL ([April](https://github.com/phantomics/april) specifically) on the advent of code. But last year I taught a small course on image processing using April to middle school students. I'll be teaching it again in February.
 
Nice. (You have to include the protocol for markdown links to work, but you can still edit your message; just press up-arrow.)
If you've not done so already (people have aliases…) feel free to add your solutions to apl.wiki/aoc
 
4:49 PM
@Adám I had the students use your javascript APL character entry method. It worked well with April in a Jupyter notebook.
 
Did they click the bar, use backtick, or use tab?
 
They clicked the bar. But that is because I dodn't know about backtick at the time. I was using the Linux setxkbmap method myself.
I'll show them the other methods this year.
 
@Adám i think protocol-less urls work fine? but it's a multiline message, where markdown is disabled
 
@dzaima Oh, I didn't notice it was a multi-line message. Edit: Nope, just tested it. Doesn't even work with www.
(Doesn't change the fact that even having the protocol wouldn't have worked, due to multi-lining.)
 
huh. SE chat ¯\_(ツ)_/¯
actually, message source does include the https://. SE just hides it
 
4:56 PM
@justin2004 Then I owe you an apology. The issue was the multi-line.
Just use multiple messages instead, and they'll be merged visually.
(I should have spotted that, as the URL was clickable.)
 
@Adám Gotcha. ty.
BTW, I sent an email to The Array Cast contact email suggesting that the creator of April would be a neat guest to have on.
 
Ah, that's you! Thanks.
 
Yeah. You guys are doing great with that podcast. Just wanted to add to the guest inventory.
 
Appreciate that. If APL history interests you, you might enjoy apl.wiki/APL_Campfire
 
Cool. Good call on making recordings.
 
 
1 hour later…
6:09 PM
@Adám I found a report written by G. Chaitin, when he was working at IBM. He did some computational physics with APL back in the day, and had written that APL is ideal for physics because it's array/matrix oriented. Do you think you could invite him in one of the APL Campfire sessions ?
I'd love to see him there
or in arraycast, for that matter
 
Do you know of a way to contact him?
 
@Adám not really, but I can look
@Adám this is the closest to an email that I could find right now: gregorychaitin.academia.edu/contact
 
That's my main problem with getting people to the campfire – contact info.
 
yeah :/
maybe that contact form will yield some results
 
Sent.
@milia Whoa, that uses a couple of 6-simensional arrays!
 
6:22 PM
@Adám well he is using general relativity that uses tensor algebra...
but yeah, haven't studied it in depth yet
was focusing on the quantum examples he had
pretty neat find I'd say :D
that website is a goldmine
 
6:37 PM
@Adám I've invited a few of my old profs from the math & physics school at the meetup. Most of them do computational (math/physics) stuff. It'd be nice if I'd get them to try do some of that in APL :)
not sure if they'll show up on a Saturday evening tho, but you never know
 
Maybe prepare something that'd interest them? @RikedyP might be able to help.
 
@Adám maybe it'd be a good idea to invite this person from the French APL user group too. France is close to Spain, it'd be nice to keep them close :) afapl.asso.fr/topo.pdf
@Adám yes, I have some themes at mind...Was thinking doing a live coding session after the trip back to the history lane, with applications from simple math, to computational math/physics stuff.
 
@milia Good idea; go for it!
 
Sure, I'd love some help if @RikedyP has the time and is interested into it :)
 
6:52 PM
@Adám invitation to Dr. Chachaty has been sent :)
 
7:04 PM
Hi guys. Is there documentation for the different types of graphs I can plot with load 'plot'
?
APK wiki seems to have broken links
 
7:16 PM
@Adám btw, I hope you know the connectedpapers website right? Here's an example of what it does : connectedpapers.com/main/…
(on a favorite paper of mine)
TLDR: you feed it with a DOI, it returns the graph of all the cited papers to that paper (or papers that cite that paper)
@M4X_ is this the 'plot' function of J ?
 
Yes
 
Not sure if it exists, but then I haven't looked for any examples
 
Form the 'J primer' documentation [0] they talk about plot also being a dyad.

'TITLE myplot;TYPE bar' plot 2 ^ i. 5 for example plots a bar graph.
'TITLE myplot;TYPE pie' plot 2 ^ i. 5 plots a pie chart.

I wanted to know what else is available.
 
@rak1507 Of course! Thanks, I'll add that later
@milia Drop me an email to rpark@ and we can discuss / make a plan
 
@RikedyP sure, thanks !
 
7:48 PM
@RikedyP sent
 
 sin ← {1○⍵}
      cos ← {2○⍵}
      s1 ← (⍳10)÷10
      s1
┌→────────────────────────────────────┐
│0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1│
└~────────────────────────────────────┘

      ↑2 take 2,/{sin ⍵,cos ⍵} s1
┌→─────────────────────────┐
↓0.09983341665 0.1986693308│
│0.1986693308  0.2955202067│
└~─────────────────────────┘
↑2 take 2,/{4⍕sin ⍵,4⍕cos ⍵} s1
DOMAIN ERROR
sin[0] sin←{1○⍵}
any idea why I got DOMAIN ERROR?
 
you want {(4⍕sin ⍵),4⍕cos ⍵}
 
So one can create dictionary-like structures in APL. Nice.
 
@dzaima , thx!
@dzaima, can we edit BQN on emacs? or is there any BQN mode in in Emacs?
 
@elliptic00 there's this, but i don't know anything about it
 
8:02 PM
thx
 

« first day (1775 days earlier)      last day (54 days later) »