« first day (1425 days earlier)      last day (1234 days later) » 

2:45 AM
@Adám nice sombrero
 
@Razetime Thanks. Yeah, it fits perfectly with my pic.
 
yep, perfect fit
conga can be used to make an IRC bot, right?
 
I guess. I don't know how the whole listening to the chat room works.
 
I'm gonna have a stab at this as well
 
Combining some of the earliest ideas with the latest apple shape:
 
2:54 AM
that is neat
 
My only problem is that it looks quite lopsided with a very heavy A and a very light L.
 
the L seems fine
you can adjust the left side to make the A looks better
 
Maybe if I move the letters all the way up…
 
or flatten the apple from the sides
 
3:20 AM
While nice and grid'y, there's too much spacing going on here.
More balanced, but I just don't find it very attractive.
 
@Adám yep that isn't attractive
 
3:54 AM
Back to the matrix idea:
 
@Adám this is nice
 
4:05 AM
@Adám this might work!
 
Too much detail, though.
 
well, just remove the borders
it should work
 
@Razetime Which borders? The white or black?
@chrispsn Refining that idea:
@Razetime Like this, you mean?
Novel approach:
I kind of like how the black-and-white part is a Boolean matrix, something that is very central in APL.
 
4:27 AM
interesting
@Adám yes, but switch the colors
 
@Razetime B/W? That'd lose the apple shape..
 
change the white to a really light grey
then the apple should still be visible
 
yay!
 
4:49 AM
Refined light and dark version:
 
dark mode is always epic
 
Maybe the leaf should be the same grey, to limit the palette.
Yeah, looks more serious with a medium grey leaf:
 
hmm ok then
or just use a subdued green
 
Sure, the colours can be discussed. The apple could be green too, for that matter.
Subdued colours:
 
 
4 hours later…
8:31 AM
After feedback from my children:
 
9:06 AM
@Adám first one looks clean
 
@Razetime What do you mean? They are the same, other than colouring.
By making the apple the same colour as the leaf, we can afford a secondary apple colour.
 
@Adám I just like dark themes more lol
 
9:58 AM
Perhaps I should have named my dialect LAP. That way I could steal everybody's logos by just rearranging the characters. :-)
 
10:53 AM
is there a writeup somewhere on operators in APL? Like, how to write them, what they're useful for, maybe some examples?
 
11:27 AM
@KamilaSzewczyk like, just the operators or a tutorial?
 
11:43 AM
whatever, something good quality to teach me how they work, I can work with just a description
I checked the APL wiki and other corners of the internet but nothing interesting there
 
this should be helpful
 
What is the maximum integer in Dyalog, because following is not working (8⍴256)⊤9223372036854775807?
 
@user14835830 you need to set ⎕FR and ⎕PP for large calculations: aplcart.info/?q=exact%20int#
 
ngn
@user14835830 with the default ⎕fr, arithmetic starts to fall apart beyond 2^53 (9007199254740992) because of stupid floating point
 
11:59 AM
I didn't remember ⎕FR at all.
Thanks.
 
so sad Dyalog APL doesn't support arbitrary precision :c
(ik about big operator, but it's quite limited)
 
I'am importing/exporting data from KDB+/q and I have to use bits when I am importing 64 bit integers.
 
12:33 PM
@KamilaSzewczyk There's this lesson.
@KamilaSzewczyk … This article
@KamilaSzewczyk Documentation: General, and specific to dops.
 
12:49 PM
@Adám it's virtually empty - no examples, no actual value in learning context
 
1:34 PM
@KamilaSzewczyk Sorry about that. Th other links do contain examples, though, and there are four more here. That said, we should add some more content. Do you feel like doing so once you get a good grip on the subject?
 
sure thing, after I learn operators I can make the article a bit better
Also page 13 of APL tutor about evaluation order seems kinda off?
> No APL expression needs to end with a closing parenthesis
how would one rewrite, say, ×/(+.!∘⌽⍨∘⍳¨1+∘⍳⊢), to not need a closing parenthesis at the end? Simply stripping it off doesn't help
if I enable boxing, it's evident that it's split into the ×/, +.!∘⌽⍨∘⍳¨ and 1+∘⍳⊢ boxes without parens (instead of the last two being in a single box).
 
@KamilaSzewczyk One could argue that that isn't an expression, but rather a function phrase, even even so, the statement is less than accurate. How about 1(2 3)? More precise would be that any trailing expression for an entire array never needs parenthesis.
 
> You never need two consecutive closing parentheses.
this one doesn't mention expression on function phrase context and I'm fairly sure it's false too
 
1:50 PM
Because the tutorial predates function phrases.
But yes, for nested arrays, you sure can need two consecutive closing parentheses: 1(2(3 4))
It may even be that that part of the tutorial harks back to the days before nested arrays!
As I've mentioned here before, the tutorial is in dire need of an overhaul.
 
RGS was working on an updated notebook for "Mastering Dyalog APL"
 
You may well be able to find a statement that says that a line of APL can have a function of its far right.
 
noo why is the tutor in comic sans
whyyyyy
 
Because it is from a time when Comic Sans was "in". What can I say \○/
 
ngn
@Razetime what is "the tutor"?
tryapl?
 
1:58 PM
@ngn tutorial. Don't go there. You've been warned.
 
ngn
it doesn't look like comic sans to me
 
It probably doesn't host its font, so if you don't have it installed, you don't see that.
 
ngn
@KamilaSzewczyk ah.. so it's not tryapl. thanks.
 
@Adám Very cool, like this
 
2:02 PM
hahaha
 
ngn
lolol :)
 
?
 
ngn
let's take a moment to appreciate the css:
#butt {
 font-family:"Comic Sans MS";
 ..
 
The font at least would be easy to change
 
ngn
it's not the only line with comic sans
 
2:05 PM
@ngn Either that CSS is generated, or it was written by someone not well versed in CSS.
Also, I doubt this works as intended:
.tb {
 font-family:"APL385 Unicode",monospace;
 height=24px;
 width=15px;
}
 
Haha
 
@Adám Ah yes i must delete it
 
The chat lets you use all kinds of crazy avatars huh? Nice sombrero Adam btw
 
@phantomics it's this winter bash thing
they added a bunch of stuff you can add to your avatar
 
right
 
2:14 PM
It is just that the sombrero fits my avatar so well…
 
We now need to see a real sombrero in that pic
 
I don't have one. But I do wear a brimmed hat every day.
 
ngn
btw, tryapl feels better than before. nice language bar :) but after staring at it for a while, i started seeing a green rectange every time i blink :)
 
@ngn Maybe we should tone it down a bit. Are you at least using dark mode?
 
ngn
@Adám there's dark mode in tryapl?
 
2:24 PM
Yup. Accesskey+b or add the b parameter to the URL.
 
ngn
i wouldn't have guessed. the purple is still there.
 
No need to guess. It is listed on the HELP tab.
 
ngn
of course, rtfm..
any aoc solutions in apl today?
 
not from me
I only got part1
rak might find a way
 
I'd go with a bit less harsh color scheme for dark mode, like a deep sea blue instead of black with very pale lavender chars instead of white
 
2:35 PM
I'll try a brute force once my exams are over
 
@phantomics The problem is that people can always adjust their screen for less contrast, but some people have poor eyesight and appreciate the availability of full contrast.
That's why APLcart has a high-contrast black mode, not just the low-contrast dark TIO-like grey mode.
 
ngn
^^yup, i like #ffffff on #000000 :)
 
@Adám I see, I haven't heard complaints about the Solarized color scheme's light and dark modes being unusable for people with vision problems, I would go with a similar level of contract, not something totally washed out
*contrast
 
@phantomics If you press the up arrow, you can edit your last message.
 
ngn
@phantomics those who don't like solarized simply don't use it, so complaints are unlikely
 
2:41 PM
@ngn do you have an apl port?
 
ngn
@Razetime not yet. i was planning to study @xpqz's solution from yesterday, but today's problem is still fresh in my head and it might be better to port it now
 
@ngn Interesting point, I suppose my ideal would be to have 4 color modes you could flip through by clicking a button, not at separate URLs. Two light, two dark, two with intense b/w contrast, two with a bit less contrast
 
@phantomics Yeah, I guess that'd be ideal. Or maybe two binary buttons: High-contrast on/of, and dark/light.
 
ngn
i've noticed a few interesting things after coding for many years. i don't wear glasses. the clarity of my vision depends on how tired i am. when i'm tired, my vision is a bit blurred, so i appreciate the contrast.
in a dark scheme, i've noticed i care much more about the black than the white. the white could be "toned down" and still look great. but when the black is grey, i find it annoying.
 
I have strong astigmatism, and dark background is not only difficult for me to use. I get physically affected by it.
If there was a way to permanently set it to black-on-white so I could follow links to tryapl, that would be great. For me, right now, I prefer not to click on the link because the effect comes very quick if I actually attempt to read anything.
 
2:49 PM
@EliasMårtenson Uh, but TryAPL's permalink shortcut/button does not include colour scheme.
 
@ngn and i absolutely hate it :)
 
ngn
@EliasMårtenson astigmatism causes blurring, right? how does the prevalence of black (lack of light) affect you more than white (being bombarded with photons)?
 
That said, we could add a low-contrast setting to TryAPL, and we could save your colour scheme preference locally, and let that override whatever permalink you use.
 
ngn
@dzaima yeah, your colourschemes are like #818181 on #7f7f7f :) but wait until you're twice as old
 
@Adám why is the theme allowed in the permalink anyways? just for those that clear cookies way too often?
 
2:52 PM
@ngn Well, it's an actual effect (head starts spinning, things starts to float in front of my eyes, it's incredibly uncomfortable) and it's quite common, I have learned. The only physical explanation that sounded plausible was that with less light, the iris opens up, which reduces the FoV (just like low F-stop on a camera). This causes the eyes to work harder to keep things in focus.
 
@dzaima To allow bookmarking TryAPL with a colour scheme.
 
I did find some papers on the topic that seemed to confirm it, but I'm not very knowledgeable in medicine.
 
@Adám but if it was just stored in localstorage, you'd be able to just bookmark the plain link
 
@Adám That would still be a problem when following links.
 
@dzaima That's already what we do when you use the built-in permalink feature.
@EliasMårtenson Someone would have to go out of their way to edit in the colourscheme. Unlikely when simply posting things.
 
2:54 PM
@Adám so it is really just for those that clear cookies/localstorage
 
ngn
@EliasMårtenson so, absence of light triggers it. interesting.
 
@dzaima No, that would be the case if it all was by design, but we didn't actually think of storing that setting in localstorage. I'll log an issue to switch to using localstorage instead of URL param.
 
@ngn I don't think it's that simple. It's more like focusing on a single light spot (or several, in the case of text) on a black background.
Because I have no problem when in a dark mine in Minecraft for example.
 
@Adám when I paste a string which is too long to be parsed, RIDE just keeps displaying an INPUT LIMIT alert
I have to force quit it basically
 
I think that's becayse I don't have to focus on details in that case.
 
2:56 PM
is that a known problem?
 
@Razetime Ah, sounds like it was designed expecting one-by-one keypresses, not pasting a lot at once. It should of course discard any further input when it first complains. Can you log an issue?
 
Good progress with my MENACE project. Here's a complete game player. This version just makes random moves but I have the extra code to do MENACE stype Reinforcement Leaning. It just need s stitching together.
⎕io ← 0

show ← {3 3⍴⍤ 1 ⊢'.×○'[⍵]} ⍝ display position
list ← {⊂⍤2 show ⍵} ⍝ spread boards across the page
ild ← {(⊂⍺) ⌷[¯1+⍴⍴⍵]⍵} ⍝ index last dimension
np ← {1+>/+/1 2∘.=⍵} ⍝ next player
cg ← {0⊃⍵} ⍝ current game from config
p ← {,¯1↑⍵} ⍝ current position from game
random_player ← {cf ← ⍵ ⋄ g ← cg ⍵ ⋄ cp ← p g ⋄ i ← ⍸e←0=cp ⋄ cp[i[?+/e]] ← np cp ⋄ g ← g⍪ cp ⋄ cf[0]←⊂g ⋄ cf }
wpi ← {rows ← ⍵ ⋄ cols ← ⍉⍵ ⋄ diagonals ← 2 3⍴↑(0 0⍉⍵) (0 0⍉⌽⍵) ⋄ ⊃⍪/rows cols diagonals} 3 3⍴⍳9 ⍝ winning indices
wf ← {∨⌿∨/^/1 2∘.=wpi ild ⍵} ⍝ is this a win?
 
@RomillyCocking If you press up arrow, you can edit your old message. Press Ctrl+k to switch to monospace font, then Enter to re-submit.
 
Ctl-K does't seem to do it on Linux :(
 
You should also have a "fixed font" button on the right →
 
ngn
3:04 PM
@Adám i don't have one. are you sure it's not from a userscript?
 
Yes, but it only appears once I've entered multiple lines.
 
No, and up-arrow doesn't seem to work :(
 
There's a time limit for edits.
 
@ngn You should be able to inspect it. It is "#codify-button"
 
ngn
3:06 PM
@Adám right! i never noticed..
 
@Adám Done
 
@Razetime Right. I get notified.
 
cool
 
Can I attach a file to a post?
 
You can link to one. (If it is available online, of course.)
@RomillyCocking No big deal. The biggest issue is when people post a single line of APL without backticks or code-blocking it, as that keeps markdown active, and some APL code can be misunderstood as markdown.
 
3:09 PM
Can I use backticks around multi-line APL?
 
@RomillyCocking not here
 
@RomillyCocking No, then you need the code-block. If Ctrl+k doesn't work, and you don't see the button, you can make sure every like has at least 4 leading spaces.
 
I guess I should be looking at a stack exchange for noobs page somewhere
 
Do you not see a "help" link in the lower right corner?
 
Stack exchange chat has different markdown rules from the actual site for some reason
 
3:11 PM
@RomillyCocking there's this unfinished thing. doesn't cover everything, but should be acceptable (along with this)
 
I was just about to ask if anyone feels like taking up that project?
 
I missed the 'more' at the bottom of the help window :(
 
@Adám which one?
 
The one dzaima linked to, the APL Wiki draft page.
 
oh ok
never knew +←1 was a convention
 
3:17 PM
It isn't required, just to help people understand those that use it.
 
@Razetime there was a phase when it was used quite a lot. since september it's died out
 
Because RGS finished his internship and got busy finishing up his master's. He'll be back.
 
ngn
when i see "+←1", i think of rgs. when i see "TMN", i think of adam :)
 
heh, RGS actually almost always used +← 1 whereas everyone else doesn't have the space
@Adám i'll clean it up a bit
 
3:37 PM
⋄⍳6
 
@Razetime
┌→──────────┐
│1 2 3 4 5 6│
└~──────────┘
 
wow
 
@RomillyCocking This is awesome and inspirational. Thanks for sharing!
 
ngn
@Razetime part1
 
cool
also @ngn ↑
even works on edited code
 
ngn
3:48 PM
@Razetime oh, nice. what was the problem?
 
this guy from SO saw my question on SO
and fixed the checking of previous executions
It also suppresses alert boxes
so pretty epic
his version is in the gist comments
 
ngn
@Razetime ^it worked
 
weehee
try typing a statement
they also added error checking
⋄dksjfndkjfh
 
@Razetime VALUE ERROR
 
ngn
i like how instant it is compared to the bot :)
 
3:53 PM
I was so happy when it worked
 
@ab5tract Thanks - more to come soon :)
 
@Adám did stuff
 
4:22 PM
@dzaima Sounds like a commit message. Thank you. Looking great. I'll edit some more, and then un-draft it.
SE (chat) markdown doesn't actually have anything to do with specifically GitHub flavoured markdown, more than any other flavour, does it?
 
@Adám don't think so
 
anyone else wanna test the userscript?
 
@Razetime Any idea why Tampermonkey doesn't kick in when I click Raw?
 
on github?
 
Yeah.
 
4:36 PM
Not sure how tampermonkey works
It should work when it's copied to tampermonkey
as a new script
 
Ah, maybe missing the // @namespace http://tampermonkey.net/ declaration.
 
or maybe the @GMs are messing with it
 
I can't load a chat page with the script active.
 
hmm whats in the console?
 
I wrote my first APL snippet utilizing operators: (2|⊢){⍵/⍨⍺⍺⍵},⊢∩2∧⊢
 
4:40 PM
@Razetime No more errors than always.
 
that's odd
lemme check
 
@KamilaSzewczyk Nice, but isn't that the same as /⍨∘(2|⊢)⍨,⊢∩2∧⊢ ?
 
@Adám i do see an extra error
 
seems a whole lot smaller
let me process it
 
@KamilaSzewczyk Maybe this intermediary step can help: ((2|⊢)⊢⍤/⊢),⊢∩2∧⊢
⊢⍤/ is a trick to make sure / means the replicate function and not the reduce operator.
 
4:43 PM
i'm not entirely sure how atop differs from bind or a traditional function train
I checked the cultivation lesson but it doesn't seem clear enough
 
@Razetime seems the importing of ngn/APL is the cause. Makes sense that something would clash with all the short names & minification
 
well
I can only open the APL orchard here on chrome
 
@KamilaSzewczyk In general f⍤g means apply f monadically on the result of g, so ⊢⍤ would be a no-op, but it has the sideeffect of forcing / to behave.
 
I see, nice
 
One of the reasons you see very few user-defined operators is that they are rarely needed.
But if you ever see a pattern where you apply various function inside a repeated pattern, then you might want an operator.
 
4:46 PM
@ngn Is there a way to put the entirety of the js file under a namespace?
@dzaima somehow it's perfectly fine on firefox
@Adám (2|⊢) can be 2∘| right
 
@Razetime Sure, but I was trying to retain a hint of the origin.
 
while golfing I'm constantly missing opportunities for binding and getting rid of the tacks
 
For example, if you are writing an interpreter for a stack-based language, you might write:
 
⋄⍳7
 
@Razetime
┌→────────────┐
│1 2 3 4 5 6 7│
└~────────────┘
 
4:50 PM
:Case '+'
  stack←stack[1]+stack[2],2↓stack
:Case '×'
  stack←stack[1]×stack[2],2↓stack
 
so the userscript seems to work, but only on this page for some reason
not sure if it's some caching thing
 
@KamilaSzewczyk Then notice the pattern where only the function differs. This calls for an operator: {⍵[1] ⍺⍺ ⍵[2],2↓⍵}
 
fair
I see
 
You could even (in best APL-style) generalise it further: _Apply←{(⍺⍺ ⍵↑⍺),⍵↓⍺}:
:Case '+'
  stack +/_Apply←2
:Case '×'
  stack ×/_Apply←2
:Case '-'
  stack -_Apply←1
 
okay, so I got to your solution via: ((2|⊢){⍵/⍨⍺⍺⍵}) -> ((2|⊢){(⍺⍺⍵)/⍵}) ->({((2|⊢)⍵)/⍵}) -> ({((2|⊢)⍵)}⊢⍤/{⍵}) -> (((2|⊢)⊢)⊢⍤/⊢) -> ((2|⊢)⊢⍤/⊢) -> 2∘|⊢⍤/⊢
it's a needlessly complex and convoluted way
but I like small steps
 
4:57 PM
Me too.
 
my code doesn't seem to work on TIO
but in the Dyalog REPL I can see:
      f←(2∘|⊢⍤/⊢),⊢∩2∧⊢
      ⎕←f ¯4 3 3
3 3 ¯4
 
it does return 3 3 ¯4 though
 
@KamilaSzewczyk Because TIO's APL is out of date. You can either use Extended or dzaima, or define a polyfill for .
@Razetime Note the expression.
 
oh
 
okay, now it works
 
5:01 PM
@Adám clicked the link before edit lol
 
I wonder if it can be golfed more
 
Hi Kami
Hi @Adám, wdyt about continuing that APL lesson tonight?
 
@Konrad'Unrooted'Klawikowski Sure. When is good for you?
(And, welcome back!)
 
hm, within half an hour? or an hour? what about you?
 
@Adám dzaima/APL needs /, at which point ⊢⍤⌿ for -2, and then there's another -1 opportunity for a total of 12 bytes
 
5:04 PM
@Konrad'Unrooted'Klawikowski That can work, although at some point I'll have to take a break to get my kids to bed.
 
sure, I get it, by the way, thanks for helping me to get into APL :D
 
My pleasure (and, full disclosure: job).
 
5:30 PM
      f 496
Eh?
      f 496
      ∧
what does the Eh? error message mean
 
Did you use function from the dfns workspace?
 
Some of them jokingly say that instead of throwing a proper error message. Not sure why it was done that way.
 
professional. I like it
 
okie, I do have a time rn, if you do too, we can continue, I think
 
5:36 PM
Sure. Let me start by reminding myself where we were holding…
 
I think we've finished on printing even and odd numbers till 20
 
Ah, yes. Do you remember how to get the odd numbers until 20?
(Note that the bot has been upgraded to show more informative, but verbose results.)
 
it was something like ⍳ (2×10)(1-) if I do recall it correctly
 
Ah, then let's review the basic APL syntax a bit.
 
⋄ ⍳ (2×10)(1-)
 
5:39 PM
Huh, does the bot now ignore errors‽
 
I remember that right-to-left thing tho
 
Exactly. One way to think of it is that the right argument of every function is the entire expression on its right, as far as it can reach, i.e. until the end of the line/statement/parenthesis.
So what you want here, is to let use just 10 as its argument, giving you ten indices, then let × use that as its right argument, then let - use that as its left argument, which means you need a parenthesis.
⋄ 'bot test'
 
@Adám
┌→───────┐
│bot test│
└────────┘
 
⋄ 'bot test 2'
 
@Adám
┌→─────────┐
│bot test 2│
└──────────┘
 
5:42 PM
⋄ 'bot'+'test'
 
@Adám LENGTH ERROR
 
wait, I do recall it somehow
⋄ 2×⍳ 10
 
@Konrad 'Unrooted' Klawikowski
┌→────────────────────────┐
│2 4 6 8 10 12 14 16 18 20│
└~────────────────────────┘
 
⋄ (2×⍳ 10)-1
 
@DyalogAPL Hello?
 
The bot is known to have a temper.
 
⋄ (2×⍳ 10)-1
 
@Adám
┌→───────────────────────┐
│1 3 5 7 9 11 13 15 17 19│
└~───────────────────────┘
 
@DyalogAPL Thank you.
 
5:43 PM
maybe he doesn't like me?
 
@Konrad'Unrooted'Klawikowski I don't know you well enough.
 
Maybe try putting backticks around your code. It is a good idea in general, as some APL code looks like markdown.
 
` in the beginning and in the end?
 
(It is known to dabble with sentience sometimes.)
@Konrad'Unrooted'Klawikowski Yes.
 
5:45 PM
(2×⍳ 10)-1
 
@Konrad 'Unrooted' Klawikowski
┌→───────────────────────┐
│1 3 5 7 9 11 13 15 17 19│
└~───────────────────────┘
 
@DyalogAPL That took a while!
 
@Adám Hey, we all need a break sometimes.
 
amazing
 
5:48 PM
surely it is
 
OK, so you already know a few built-in APL symbols. They called primitive functions.
Primitive functions are either dyadic (take two arguments), like multiplication, or monadic (take one argument), like negation. Most primitive functions use a symbol shared between a monadic and a dyadic function.
E.g. dyadic - is subtraction, while monadic - is negation.
Often, the two are closely related, e.g. with the monadic form being like the dyadic one with a default left argument of some sort.
@Konrad'Unrooted'Klawikowski Dyadic ÷ is division. Can you guess what monadic ÷ is?
 
Exactly. Nice.
 
I found one of the cheat sheets whith the table where's the monadic and dyadic function of one glyph
does a function behavior depend on how many arguments I pass to it?
 
Well, functions either take one or two arguments, so yes. That said, an argument can be an array, but that doesn't usually make a difference to the actually meaning.
 
5:55 PM
okie, got it
 
Since we we use × for multiplication * is available for X-to-the-power-of-Y.
Can you guess the meaning of monadic *?
 
hm, exponential?
 
Nailed it!
 
ah, I see now why there's × and *
they're totally different, I see
 
@Konrad'Unrooted'Klawikowski Can you get the first 10 squares? 1, 4, 9, …, 100?
 

« first day (1425 days earlier)      last day (1234 days later) »