« first day (1883 days earlier)      last day (777 days later) » 

11:40 AM
 
12:33 PM
@bwanab I've asked Kai (the creator and maintainer of ADoc) to come in here to answer you.
 
1:21 PM
@Adám how to make the windows IDE font settings persist?
 
@PyGamer0 Save your session: Session>Save
 
also how do i permanently set boxing on?
 
Save your session.
 
thank you
 
just used triple rank, that's a first
 
1:33 PM
Whoa. Competition-related, or can you reveal?
 
competition related :( I suspect it can be simplified to a double/single rank though, still not great with rank
 
i'm stuck on one of the problems lol (in phase 1)
 
phase 2 are all fairly tricky, good thing I've got a while
@PyGamer0 I've 'answered' all of phase 1 but my answers aren't great yet (apart from one of them which I'm pleased with)
 
Which one?
 
i solved 5 problems and 2 of them cant pass the edge cases :/
 
2:14 PM
@Adám Suggestion for the next dyalog version: dyalog -h opens help.dyalog.com/latest/#UNIX_IUG/…
 
I'm quietly pleased with my solution to phase1:3
Although I'm sure everyone will land on the same.
 
I very much doubt that.
 
i stole phase1:3 from Adám
 
@Razetime Well, you had to modify my solution a little, no?
 
only a little
it's such a cute little function
 
2:21 PM
@xpqz yeah i cant solve that one....
 
Almost short enough to brute-force.
 
one of my solutions is 3 bytes...
and i'm trying to answer all of the solutions as trains
 
@Razetime I've sent an internal email to relevant colleagues.
 
thanks a lot!
 
oh wait...doesn't the 18.2 version have APLCart built-in?
 
2:28 PM
It does.
 
i think it does, yes
omg we need the meta reference to ]aplcart in aplcart now
 
Oh, right.
 
@Adám how did you add DDG support for APLCart?
 
you have to register a bang with duckduckgo
 
@Razetime TIL
TIL !ppcg
wow DDG is cool
 
3:22 PM
@PyGamer0 Yeah, like Razetime said. I've asked for !aplwiki but nothing happened. Feel free to ask for it too.
 
3:36 PM
I tried a mandelbrot function today: mandelbrot←{n←0 ⋄ n⊣⍵{n+←1 ⋄ ⍺+⍵×⍵}⍣{(~(|⍵)≤2)∧n<80}0}
this works fine on a single complex number, but i want to make it work on a 2D array of complex numbers.
however i get domain errors when i try to do it
 
's right operand needs to return a scalar.
 
another thing is that doing mandelbrot¨ on a 2d array of imaginary numbers takes a while. if i could manage to get that time down i would be fine.
(then i'll have to spend some time finding a sharpplot method for it. gotta be somewhere)
 
@Razetime Don't you just need to check if any or all of the right operand conditions hold?
 
hm?
I need to make sure absolute value stays under 2 and it does not iterate forever.
80 is arbitrary and can be changed.
i need to return the iteration count for each number.
 
@Razetime Absolute value of what?
 
3:40 PM
absolute value of the iteration value ⍺+⍵×⍵
 
@Adám ok asked for it
 
@Razetime But on a matrix of complex numbers…
 
yeah.. i guess it is impractical
maybe i can use &?
 
& doesn't speed anything up, as all APL threads run in the same OS thread. You could use isolates, though.
 
i think i'll just check it on a smaller matrix first
even on 30×20 it takes a while..
yep it was a problem with the function
yep got it!
 
4:02 PM
@Adám is there a way to auto assign colors to a scatterplot?
 
@Razetime Based on context, I imagine you mean each marker should have a colour based on a corresponding value.
 
yep that is it
in the sharpplot examples i can only see System.Drawing.color
 
I'm pretty sure you can give a rgb value.
 
alright i'll just plug it in
the value of System.Drawing.Color.Navy is 4278190208
 
@Razetime That's 256⊥255 0 0 128
 
4:06 PM
aha
then that is it i suppose.
 
IIRC, it uses argb
 
4:25 PM
i think i have it correct, just getting a WS FULL on the partition.
 
Partition?
 
partitioning is what sets colors
 
Which line?
 
sp.SplitBy ⊂type
 
Btw, you can do 256⊥⍉255,↑3/¨cl much more efficiently.
 
4:29 PM
well, 256⊥⍉255,3/⍤0⊢cl is a thing
getting rid of the transpose, maybe?
 
Yeah, 255⍪(⊢⍴⍨3,⍴)1 2 3 or 1 3⌿255,[.5]1 2 3
 
i think i'm better off writing to an image here
graphing generates a billion svg objects
 
Or 4278190080+65281×cl
@Razetime Yeah, you should use a bitmap.
 
interesting. will it work on linux?
oh wow, the png function in that repo is taken from a mandelbrot viewer! brot
 
I don't see anything OS specific.
 
4:40 PM
hm cool
ppm seems the easiest
i'll have to do this tomorrow. thanks for the help.
 
4
A: Dither a Grayscale Image

LdBethDyalog APL This is an implementation of ordered dither with a special dither array. The input format is a restricted form of raster PGM while it is also the default style produced by Netpbm programs that requires no comment line, file header separated by newline character rather than arbitrary wh...

 
another thing: is there a way to use ]link in a script?
 
⎕SE.Link.whatever
 
alright gotcha
 
@Adám what solution? (am I allowed to ask that)
is it in APLcart or something?
 
4:53 PM
 
?
 
I can't speak about it :-)
 
fair enough
 
That means it's in the vault.
 
5:34 PM
@RikedyP did you manage to get to the video now?
 
haha, my answer for phase1:10 gets timeout. I guess someone else had came up with a more clever one.
 
5:45 PM
I fixed mine to pass the test but it is still long. See if I could get some time improve it later
 
How long is long?
 
Fun APL program that solves a problem similar to aoc2021/4p1: {⊃∊⍺∘{⍸∨/5=(+/,+⌿)⍤2∨⌿⍺=⍤3 0⊢⍵}¨,\⍵}
given a set of bingo cards and the vector of numbers announced, find the first bingo card to win
 
looks inefficient
can you give an example?
 
except my code deliberately ignores diagonals
and yeah, it maybe is inefficient, i didn't really care about efficiency
i think it's elegant though
 
I think {⊃⍋⌊/(⌈⌿⍤2⌊⌈/)⍵⍳⍺} works
 
5:58 PM
> the first number called will always be 0, as will be the centre space of all of the cards. this emulates the "free space" from the real game.
> there will always be a winner, and the game will always end when the last number is called.
i feel like one could take advantage of these somehow.
i didn't
 
(⊃⍤⍋⌈⌿⍤2⌊/⍤⌊⌈/)⍳⍨ as a train maybe
 
i initially wanted to model my solution using something that isn't too APLy because i had to use something else in the end
 
fair enough
 
⊃∊b∘{{⍸↑∨/∨/¨¨5=¨(+/¨⍵) (+⌿¨⍵)}↑∨/⍺∘=¨⍵}¨,\v was my first solution assuming b is a vector of boards and v are the guesses
it's rather scalar and box heavy, but the above explains it.
 
      B←?10000 5 5⍴100
      N←?⍨100
      ]runtime -c 'B ((⊃⍤⍋⌈⌿⍤2⌊/⍤⌊⌈/)⍳⍨) N' 'B {⊃∊⍺∘{⍸∨/5=(+/,+⌿)⍤2∨⌿⍺=⍤3 0⊢⍵}¨,\⍵} N'

  B ((⊃⍤⍋⌈⌿⍤2⌊/⍤⌊⌈/)⍳⍨) N                  → 1.0E¯3 |       0%
  B {⊃∊⍺∘{⍸∨/5=(+/,+⌿)⍤2∨⌿⍺=⍤3 0⊢⍵}¨,\⍵} N → 1.6E0  | +164800% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
 
6:04 PM
      B←?10000 5 5⍴100
      N←?⍨100
      ]runtime -c 'B {(⊃⍤⍋⌈⌿⍤2⌊/⍤⌊⌈/)⍵⍳⍺} N' 'B {⊃∊⍺∘{⍸∨/5=(+/,+⌿)⍤2∨⌿⍺=⍤3 0⊢⍵}¨,\⍵} N'

  B {(⊃⍤⍋⌈⌿⍤2⌊/⍤⌊⌈/)⍵⍳⍺} N                 → 1.0E¯3 |       0%
  B {⊃∊⍺∘{⍸∨/5=(+/,+⌿)⍤2∨⌿⍺=⍤3 0⊢⍵}¨,\⍵} N → 1.0E0  | +103450% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
i get (barely) better timings
 
are you on 18.2?
 
ah interesting
 
i feel like my solution is worse by a factor of n than yours when it comes to computational complexity
as the percentage is pretty much the same for 100 boards
 
I think so because ,\ is O(n^2)
 
6:07 PM
:(
apl pls
but this isn't really needed though i think
 
well ,\ can't really be anything other than O(n^2)
there's probably a way to ¨ over N and update state that would still be O(n) slightly modifying your solution
 
even if ,\ were O(n), you'd still be doing O(n^2) operations with the result's items
 
> the game will always end when the last number is called.
am i interpreting this correctly
does this mean that the game always finishes when the last number is called
so this would theoretically mean i don't have to check prefixes of omega, just omega.
 
@PaulMansour I got 38 chars, and later 32 using a different method
 
assuming this is the case my submission becomes much faster than it used to be
 
6:11 PM
I realized there are something about @ I didn't know
 
i get a feeling that first 8 problems in phase 1 were really simple and i made satisfactory solutions to all of them within 30 minutes
while the other 2 problems are actually really hard to solve in a nice way to me
 
phase1:9 is a new one.
@KamilaSzewczyk did you find the @ hint in problem 10 helpful?
 
p2:3 feels like a question that'd pop up in an Excel/MS Access problem from the HS finals here
@LdBeth i have not solved problem 10 in an elegant way, but i can let you know once I do.
 
my solution to p10 is 20 chars and uses @ but I wouldn't say it's elegant
⋄'CI11'⎕FMT 123456789 couldn't get this to work (sorry if this is a spoiler, I don't think it is bc I don't think ⎕FMT can do that on strings)
 
@rak1507 123,456,789
 
6:26 PM
that's smart
but yeah i think it's a dead end
 
yeah
 
> Note that the number of digits in the character representation might exceed the number of digits that can be represented as a 32-bit integer.
mainly because of this
 
@KamilaSzewczyk I have 23 conv dfn, pretty ugly
@LdBeth Wrong ping
 
yep, I was hoping there was some way ⎕FMT could do that but on strings, but it doesn't seem so
 
The reason for the requirement of long input was I'm sure to specifically exclude ⎕FMT
 
6:29 PM
⎕FMT is clunky anyway, afaik there's no way to say 'give me as many digits as I need'
 
In that regard, yes.
 
 
1 hour later…
7:32 PM
@rak1507 because of the use of ?
 
8:07 PM
got a 36 char for phase1:9
I guess that's the minimal possible unless someone can come up a clever encoding trick
 
@LdBeth 32 here.
@LdBeth the answer is yes, i did
I came up with a 27 byte solution.
 
For 10 a 25 byte is possible.
hope you guys have fun on phase2
 
#9 is my longest one so far
 

« first day (1883 days earlier)      last day (777 days later) »