« first day (1806 days earlier)      last day (849 days later) » 

3:08 PM
@Adám teach me dyadic non-operator
 
@Fmbalbuena Ah, so remember I taught you the operator f⌿Y and the function X/Y?
I actually omitted part of the whole truth.
 
Wdym?
 
Both and / are both operators and functions. I kept them separate to make the learning easier for you.
In fact, they are almost the same, and they are entirely the same when the arguments are scalars or vectors.
 
Ok, both are the same?
 
Almost. The difference between them is which axis of a multi-dimensional array they work on.
 
3:11 PM
Scalar?
 
Single data item, e.g. a character or number.
Consider the matrix ⎕←2 3⍴1 0 1 2 1 3
 
@Adám
1 0 1
2 1 3
 
Now compare ⎕←+⌿2 3⍴1 0 1 2 1 3
 
@Adám 3 1 4
 
With ⎕←+/2 3⍴1 0 1 2 1 3
 
3:12 PM
@Adám 2 6
 
What happened?
 
+⌿ summed the columns, and +/ summed the rows.
 
Ok, but function are the same?
 
They are the same kind of operator. Both reduce, but along first and last axis, respectively.
 
I have a question
 
3:15 PM
Just ask. No need to introduce your questions.
 
(link to APL Bar)
I can't write question without APL bar
 
Ah, I think I get it now. You're using me as a bookmark keeper, so you can request links to things, and I just have to deliver them to you. Correct?
 
Yes
 
lol
 
3:17 PM
@Fmbalbuena Do you mind telling me what kind of browser you use to access this chat?
Most browsers have bookmark capability. Much more convenient than relying on people that sometimes sleep.
 
@Adám Chrome
 
Mobile or desktop?
 
(Mobile)
 
My bookmark manager isn't polite nor greets me - I think Fmbalbuena has the right idea!
 
@all anyone else here uses mobile Chrome and can tell Fmbalbuena how to bookmark the language bar?
 
3:20 PM
@Adám idea for dyalog: create an AI-powered personal APL assistant based on a model trained using your messages
 
:60060884 I'd much rather teach you how to bookmark things. It might be generally useful.
 
I believe you have to click share on the link/address bar and then tap "bookmark"
 
@KamilaSzewczyk Like print converts to ⎕←
 
i bookmarked a random page and edited it so i can type apl glyphs from mobile
 
3:22 PM
That's awesome :)
 
It literally says to do so here.
 
@PyGamer0 or drag and drop to the bookmark
 
@Fmbalbuena OK, the link is here ^^ please bookmark it now, instead of asking for it again and again.
 
@Fmbalbuena i cant drag and drop on a phone
 
@Adám I will use desktop tomorrow
 
3:25 PM
@Fmbalbuena No, bookmark it on your mobile device now!
 
its easy
 
Why? ⍨
 
why not?
 
@Fmbalbuena Because it is extremely impolite to keep demanding people provide you with services you can easily automate.
 
Ok, how to bookmark JavaScript link?
 
3:26 PM
There's a section ^ called "Edit a bookmark".
 
Ok
And
How to use bookmark?
 
You can select the javascript snippet from the website, copy it to clipboard, then edit your bookmark and paste it there.
 
@Fmbalbuena It says in the the guide under "Open a bookmark".
 
3:28 PM
@Fmbalbuena if you do not put in the effort to solve your own problem before asking a question here, then you guarantee that other people will not put in the effort to answer that question.
 
I can't
 
What goes wrong in the process?
 
How to add a folder?
 
@Fmbalbuena It says in the guide under "Create a folder".
 
@Adám I see cultivation lesson 2 covers defining your own operators... hard core.
 
3:33 PM
is Nial discussion on topic here?
 
@xpqz I think I mentioned to you that the order of the lessons is less than ideal.
@Razetime I think so (closer to APL than J — which is on topic — no?), but there's probably not much of an audience.
 
It works, though, I think. Easy to dip in and out.
 
yeah, figures.
i guess i'll put some of my nial exploits here whenever i get a chance
 
I'm glad you're enjoying Nial, Raze. It's a pleasant language :)
 
I made APL folder in APL folder in a folder. How to flatten?
 
3:35 PM
@FawnLocke oh, you use it as well?
oh wait you're awagga
nvm
 
@Fmbalbuena You can move the bookmark by following the guide under "Move a bookmark to a different folder".
 
@Fmbalbuena if you have older siblings/parents you may want to ask them instead
 
It doesn't say how to delete the superfluous folder, but I assume it is similar to how one deletes bookmarks. See "Delete a bookmark".
 
So you successfully got it bookmarked?
 
3:38 PM
@Adám thanks
But I'm adding
 
Sorry to distract, is there a nice way to do ((⍺ ⍵⍵ 1⌷⍵) ⍵⍵ 2⌷⍵) for the length of ⍵ I suspected eachright could be useful and searched the aplcart for it
 
@Adám you are probably the most patient person on the planet... LOL
 
:) sitting on my hands :)
 
@FawnLocke Each-right is X∘f¨Y or (⊂X)f¨Y
Isn't this a reduction?
 
Thanks, I'll see if that helps :)
 
3:41 PM
Ok, not now
I'm tried adding one
 
I think you may be right
Yes, I just needed to reorder my arguments. Thanks.
 
(⍺ ⍵⍵ 1⌷⍵) ⍵⍵ 2⌷⍵
(2⌷⍵) ⍵⍵⍨ (⍺ ⍵⍵ 1⌷⍵)
(2⌷⍵) ⍵⍵⍨ (1⌷⍵) ⍵⍵⍨ ⍺
⍵⍵⍨/((⊂2 1)⌷⍵),⊂⍺
 
Mobile + Chrome = Not Great Experience D:
 
That makes sense to me in retrospect
 
And if only has those two elements, then it is ⍵⍵⍨/(⊖⍵),⊂⍺
 
3:44 PM
By(t)e
 
Or something similar to the above. (Might differ if and are high-rank.
 
3:55 PM
@Adám I just successfully installed the bookmark on Chrome for iOS with your procedure. It works. The problem is that the buttons are so tiny that they cannot be pressed (on an iPhone 8 Plus). I suppose that the minimum form factor to type APL characters is a tablet.
 
Even in landscape?
(You should be able to pinch-zoom onto them, but I can imagine that's pretty awkward.)
Maybe the language bar needs a font-size ∧ and ∨.
 
@Adám even in landscape. Pinch-zoom works, of course, but who has time for that?
 
Someone also mentioned wanting a minimise button. I just need more hours in the day \○/
Don't get me wrong. I'm happy it is useful to folks.
 
@Adám I suggest making it self-sizing, without manual adjustments. If JS sees a small screen, just makes the font larger.
 
array hacker's keyboard helps a lot
 
3:58 PM
CSS can detect DPI, so maybe that.
> iOS
 
oh, sad
hm maybe a mobile style togglable keyboard as a bookmarklet
 
A full keyboard?
 
yeah just made in html
 
Feel free to PR ;-)
 
sigh I guess I'll have a stab at it
 
4:26 PM
Working on this LeetCode problem. Probably a classic.

Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.

An input string is valid if:
Open brackets must be closed by the same type of brackets.
Open brackets must be closed in the correct order.

Most solution work with a stack. That's new for me but seems a good solution. Is that also possbile with APL or should I think about a more APL'like solution? (whatever that might be, but I'll try to figure something out)
 
i'm sure @rak1507 did this in an array-y manner a short while ago
 
And thanks for these puzzles Adam (for who ever didn't see them already)
https://abrudz.github.io/crosswords/1/
 
@Richard I usually solve this by removing inner brackets and seeing if anything brackets remain.
 
wrong, it wasn't array-y but it was short (just regex replace all pairs ⍣≡ and check if it equals '')
 
This was one of last year's AoC problems.
 
4:28 PM
stack machine nicely fits into a left to right reduction
 
Yes. I'll give that a try.
 
@rak1507 hm maybe it was marshall's bqn thing
 
@Razetime Could you elaborate on this one?
 
@Richard This is what I did: strip←'\[\]' '\(\)' '\{\}' '<>'⎕R''⍣≡⊢¨d
 
@xpqz ⊢¨
 
4:32 PM
@xpqz lot of new things for me. I'l study this.
 
@xpqz Now there's a neat way to write that without backslashes: '[]' '()' '{}' '<>'⎕R''⍠'Regex'0⍣≡
@Fmbalbuena Yeah, I should get back to handing those out.
 
@Adám There were lots of them, not a single one.
 
consider a left to right reduction where ⍺ is a stack and ⍵ is the next char.
if ⍵ is an opening bracket, concatenate.
if ⍺'s last element matches ⍵, remove the last element of ⍺.
if there is a bracket mismatch, replace the stack with a 0.
 
@xpqz ⊢¨ is a no-op.
 
4:34 PM
 
@Adám o yea - prolly a left-over from trying to code fast
 
@FawnLocke Yeah, I'm aware that ]defs is broken. It doesn't quite work on a full system either.
 
Gotcha
 
Unfortunately, its developer died.
 
Thanks all, will keep me busy this evening and probably tomorrow
 
4:36 PM
have fun
 
I'm assuming it's in the dfns library
Yeah, found it.
 
It is based on something there, yes, but it gets things wrong:
      f←(+∘1)(1∘+)
      ]defs
f ← +∘1 1∘+
 
Ah, I see
 
4:59 PM
Can you invert (2,⍥⊂/⊢)?
 
Did you try?
 
Yeah, got a domain error. Probably because I applied a function before inverting, give me a moment
 
In principle it should be invertible.
Heh, I bet nobody has added inversion rules for
 
Ah, that might be the case
 
      'def',⍥⊂⍣¯1⊢'def',⍥⊂'abc'
DOMAIN ERROR
      'def',⍥⊂⍣¯1⊢'def',⍥⊂'abc'
            ∧
      'def'{⍺⍵}⍣¯1⊢'def',⍥⊂'abc'
abc
 
5:02 PM
@Adám do you mind if i remove my remaining bounties? i've stopped rep farming since a while
 
@Razetime Not at all. Makes it faster for me to go through.
I need a secretary for mundane things like rep.
 
@Adám consider this as a late hanukkah gift 😛
 
@Razetime Thanks! Appreciate that. ○7
 
from 47 bounties to 7 lol
 
Yeah, that's much more manageable.
 
5:07 PM
Doesn't seem like n-wise reductions invert either
 
Aren't there often infinitely many solutions because they shorten the argument?
 
Yeah, I'd prefer if instead they gave the prototype for the last element(s)
 
@Adám can you explain me, the ⍞←'W',⎕C'_'⎕R' THERE IS A W'⊢'HERE_ILL,_AY.'
@Adám APL Bar for me? jk but I can't bookmark
 
@Fmbalbuena Are you serious?
@Fmbalbuena It replaces underscores with ' THERE IS A W', then lowercases and sticks an uppercase W in front.
 
I don't understand
 
5:17 PM
Try to evaluate these in turn:
'HERE_ILL,_AY.'
'_'⎕R' THERE IS A W'⊢'HERE_ILL,_AY.'
⎕C'_'⎕R' THERE IS A W'⊢'HERE_ILL,_AY.'
'W',⎕C'_'⎕R' THERE IS A W'⊢'HERE_ILL,_AY.'
 
' THERE IS A W'⊢'HERE_ILL,_AY.' gives
Unknown
 
That's not how things bind.
 
@Adám what is
 
'_'⎕R' THERE IS A W' is a single function because ⎕R is a dyadic operator.
@Fmbalbuena I just taught it to you.
 
@Adám Help me
 
5:20 PM
Look in the transcript. It is very simple.
 
@Adám ?
 
yesterday, by Fmbalbuena
@Adám ⊢ seems doing nothing?
 
Ok
Wait why I need?
⍞←'W',⎕C'_'⎕R' THERE IS A W'⊢'HERE_ILL,_AY.' gives ⍞←'W',⎕C'_'⎕R'HERE_ILL,_AY.'
@Adám ^
 
@Fmbalbuena ⎕R needs 3 things, what to replace, what to replace it with, and the text to be altered.
 
I don't understand
 
5:25 PM
what_to_replace ⎕R what_to_replace_it_with text_to_be_altered
Now I need to play with my children.
 
@Adám ok
 
6:20 PM
Hey, is it possible to change the font in RIDE?
 
i don't think so
it seems hardcoded
https://github.com/Dyalog/ride/blob/28f972e387c18ac13fbbf80f9e82595a6065fc1a/style/less/layout/fonts.less
https://github.com/Dyalog/ride/blob/6978b01c3181d1a615e870da58fb33203518372e/style/less/themes/base.less
 
Hm okay, thanks
 
6:51 PM
Hey, Who are APL Experts?
 
@Fmbalbuena please just ask your question
 
@rak1507 I want to know who are APL experts
 
@Fmbalbuena ⍬ LOL
 
@AlexB What is that joke?
 
@pmikkelsen I believe @RikedyP found a (hacky) way to do it, since RIDE is just HTML+CSS+JS. Meanwhile, go express your support for github.com/Dyalog/ride/issues/611 as that may increase the chance of this feature being added.
 
7:00 PM
@Adám I also just went in to the folder in my RIDE installation and replaced the Apl385 font files with SAX2.ttf and it seems to work.
 
@Adám tell me a APL joke and explain
 
@Fmbalbuena Zilde (there are no APL experts)... it was a joke...
 
@Fmbalbuena PaulMansour, Morten, Brian, JeffZeitlin,… Me, I guess, but I have much less experience than those.
@pmikkelsen Without changing any files? Or did you rename SAX2?
 
APL joke
@Adám can you remember/think one?
 
@Fmbalbuena ¨∊∪←=⊢2⍝∧?* Each member of the union gets equal right to comment and question power.
@Fmbalbuena You don't need to ping me twice. I answer requests as quickly as I can.
 
7:05 PM
Ok, another?
 
>⍝ Help me, Obi-Wan Kenobi, you’re my only hope
 
@Adám explain?
 
Have you ever seen Star Wars?
 
@Adám maybe
 
You don't know if you've seen Star Wars‽
 
7:09 PM
@Adám I have seen Star Wars. But I probably forgot.
 
OK, so in Star Wars, there's a robot that looks like which plays back a recorded holographic message. The holographic projection looks like >. The message is "Help me, Obi-Wan Kenobi, you’re my only hope".
 
Hmmm another?
 
⍴⍴⍴'your boat'
 
⋄5 ¨∊∪←=⊢2⍝∧?*
 
@Fmbalbuena
SYNTAX ERROR: The function requires a left argument
      5¨∊∪←=⊢2
           ∧
 
7:11 PM
@Adám explain?
Shape Shape Shape your boat?
 
is a Greek Rho, which is pronounced very close to "row".
 
@Adám i renamed it to the name of the file I deleted :)
 
"Row, Row, Row Your Boat" is an English language nursery rhyme and a popular children's song. It can also be an "action" nursery rhyme, whose singers sit opposite one another and "row" forwards and backwards with joined hands. It has a Roud Folk Song Index number of 19236. Bing Crosby included the song in a medley on his album 101 Gang Songs (1961). Crosby also used the song as part of a round with his family during his concert at the London Palladium in 1976. The performance was captured on the album Bing Crosby Live at the London Palladium. == Lyrics == The most common modern version is often...
 
@Adám last one?
 
@pmikkelsen Maybe add a section to apl.wiki/Fonts explaining how to do that hack?
@Fmbalbuena bb∨~bb to be or not to be
 
7:14 PM
heh
 
@Adám good idea, but I'm off my computer for today, so I'll do it next time I turn it on
 
@Adám ?
 
@Fmbalbuena Have you heard about Shakespeare's theatre piece called "Hamlet"?
"To be, or not to be" is the opening phrase of a soliloquy given by Prince Hamlet in the so-called "nunnery scene" of William Shakespeare's play Hamlet, Act 3, Scene 1. In the speech, Hamlet contemplates death and suicide, bemoaning the pain and unfairness of life but acknowledging that the alternative might be worse. The opening line is one of the most widely known and quoted lines in modern English, and the soliloquy has been referenced in innumerable works of theatre, literature, and music. == Text == This version preserves most of the First Folio text with updated spelling and five co...
 
Here you'll find all the APL jokes you want
 
7:24 PM
@user I read everything
@Adám a task
 
⋄ (,⍨∘(⊢/)⍨'∨~',⍥⊂≢,∪)'bb'
 
@FawnLocke
┌───┬──┬───┐
│2 b│∨~│2 b│
└───┴──┴───┘
 
7:50 PM
@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
 
CMC: taking a list, move left and right example [1, 2, 1, 2] gives [1, 2, 2, 4, 1, 2] because
   [1, 2, 1, 2]
          v  -  v
       v  -  v
    v  -  v
 v  -  v
[1, 2, 2, 4, 1, 2]
@Adám ^
 
@Fmbalbuena 0 0∘(,+,⍨) : ⋄ F←0 0∘(,+,⍨) ⋄ F 1 2 1 2
 
@Adám 1 2 2 4 1 2
 
same as what I had
 
⋄ F←0 0∘(,+,⍨) ⋄ F 1 1 1
 
8:02 PM
@Fmbalbuena 1 1 2 1 1
 
Longer, but more beautiful solution: 0 0∘,+,∘0 0
 
@Adám CMC: infinite sequence starting with [1] and move left and right.
 
So
1
1 0 1
1 0 2 0 1
1 0 3 0 3 0 1
1 0 4 0 6 0 4 0 1
 
@Adám exactly
 
@Fmbalbuena Try it online!
 
8:06 PM
without integer overflow
 
@Adám ah nice, pascals triangle
 
That's cool
 
@Adám and ignore zero
 
@Adám thrilling
 
@Fmbalbuena Try it online!
 
8:13 PM
do we really have that many high-level APL wizards here
 
I guess we could add Aaron Hsu (arcfide) and Marshall to the "young wizards" list.
 
and dzaima
 
Yeah
 
Has dzaima ever written any APL code that went into any sort of production?
 
For some definition of production
 
8:16 PM
has marshall? (also I don't think that makes someone good at APL it makes them good at writing production software)
 
code golf is production prove me wrong :P
 
I'm pretty sure he has. Certainly J code.
 
production code is usually of much worse quality than other code
 
Really?
 
lack of time pressure, limited backwards compatibility requirement
yeah.
that's the case for MySql
open source databases are usually much better and preffered over clunky MySql
 
8:18 PM
Where is this suppose to work? On RIDE it seems to do nothing on RIDE and on the IDE it opens a windows, but it gives this error message.,
1+1
2
VALUE ERROR: No result was provided when the context expected one
P[0] P←{SelText⊢←2⍴⊂1,⍨≢Text⊣Text,←{0=⎕NC'⎕SE.Dyalog.Out.Filter':↓⎕FMT ⍵ ⋄
⍵ ⎕SE.Dyalog.Out.Filter ⍬ 1}⍺}
 
just look at enterprise dyalog code lol
 
@MasterQuiz Requires 18.2
 
@Adám Why is it useful for you? Like, if I have to save some code I put it in a file, I don't go search for it in the session...
@Adám Where can I download it?
 
What makes someone an expert in your eyes?
@anyone, really
 
8:21 PM
appropriate amounts of knowledge, insight and experience
 
@MasterQuiz Dunno, really. I guess it reminds me what I was working on, I guess. I don't look much at it, but it doesn't bother me either.
 
experience, as in "I've already worked on the X problem and I came up with the Y solution"
 
@MasterQuiz You can ask for access to the beta programme or wait a couple of weeks. But you hardly need it. I already published a cross-platform alternative that works with previous versions. It was just an experiment.
 
for any X loosely related to the subject of study
 
When I was little, I kept my session clean, but I was using APL*PLUS which had nice default keystrokes for removing text.
 
8:26 PM
@Adám Didn't understand what should I do. Wait?
 
What are you trying to achieve? A separate output pane?
 
monadic is actually pretty useful for managing highly recursive structures
 
@Adám I tried both. But one was simply dockable
 
@FawnLocke I mostly write utilities, tools, etc. That's why I lobbied (successfully!) for it.
 
8:29 PM
@MasterQuiz Ah, I think I can modify the existing one to be dockable on Windows.
 
8:46 PM
@Adám small question: assume i have an operator A
i want to apply it stacked N times
 
Yep, another useful hyperator.
 
so for instance, {2×⍵}A 5 is A applied once, {2×⍵}A A 5 is A applied twice
or with parens for clarity, ({2×⍵}A) A 5
 
You want for operators what is for functions?
 
sort of
 
I can't think of any other simple way to do it than using
 
8:49 PM
i think i can
 
Oo?
 
hang on
yep :)
did it
i know i know
tried to fix it
      {2×⍵}{⍵⍵=1:⍺⍺ D ⍵⋄((⍺⍺ D) ∇∇ (⍵⍵ - 1)) ⍵}1⊢5
2
      {2×⍵}{⍵⍵=1:⍺⍺ D ⍵⋄((⍺⍺ D) ∇∇ (⍵⍵ - 1)) ⍵}2⊢5
0
there, first and second derivatives
 
that hardcodes D though
 
i never asked for a general solution
I wanted to apply my operator and nothing else
but you could solve this with a nested dop.
 
(D)ops can't take operators as operands.
 
8:51 PM
truuuueee...
 
Even BQN and J would have trouble, I think.
 
@Adám How? The 'Zero Footprint' thing?
 
Yes.
 
@Adám In the docs I'm not finding how to do it...
 
     (('h',⍕∘≢)U⊃@(<\≠)' '∘(≤\⍤≠⊆⊢))
   h,  ∇ç ∘≢   ∇U ⊃ @  <\ ≠    ∘   ≤\ ⍤≠ ⊆⊢

TryAPL output I'm assuming it's because of the U, sorry to spam this btw
 

« first day (1806 days earlier)      last day (849 days later) »