« first day (1316 days earlier)      last day (1635 days later) » 

02:04
tio.run/##SyzI0U2pTMzJT9dNrShJzUtJTfn/v/… why is it saying 'Boolean singleton value required'?
@Razetime The value used for a guard has to be a boolean singleton (a 1-element array containing 0 or 1). You probably want 0<⍵: instead of ⍵:.
thanks a lot
 
5 hours later…
ngn
ngn
07:01
@cannadayr tbh i don't understand why they had to replace all of linux
07:28
@ngn What's the alternative? Partial replacement? How'd that work?
ngn
ngn
@Adám keep the original problematic drivers, comply with the gpl by publishing the rest of your kernel changes (which as far as i understand consist mostly of removing code), keep the k language and apps proprietary
 
2 hours later…
09:13
@dzaima is there a way to draw arcs in APLP5?
This is very annoying why does ↑ pad with 0s rather than spaces
⋄ ↑(⊂⊣∘⍕,'*'⍴⍨⊢∘≢)⌸,+/¨⍳6 6
my logic says that instead of spaces it has been padded with the empty string
and apl is printing them as 0's with spaces between them
maybe just remove all the zeros in the final result
it still adds spaces in between characters too
not sure what's going on
with -style=max they seem to have +s on the border, whatever that means
try ]box on
it's probably packaging each * separately
09:19
yeah I have ]boxing on -style=max
ok so is the tally converted to char?
Ah it isn't, that's the problem
⋄⍪(⊂⊣∘⍕,'*'⍴⍨⊢∘≢)⌸,+/¨⍳6 6
Alright fixed, thanks for the help @Razetime :)
09:25
Ended up with {↑⍕(⊂⊣,'*'⍴⍨⊢∘≢)⌸,+/¨⍳⍵}
Ah damn it, not properly formatted
oh, changed to dfn
I used the forbidden unary ⍪
I should probably do some physics just now, rather than APLing
that one dosn't have pormatting either lol
⋄{↑⍕(⊂⊣,'*'⍴⍨⊢∘≢)⌸,+/¨⍳⍵ ⍵}6
@Razetime
 2 *  3 **  4 ***  5 ****  6 *****  7 ******  8 *****  9 ****  10 ***  11 **  1
      2 *
need a ⍤
09:28
now only it get it on 12 lines
{↑⍕⍤(⊂⊣,''⍴⍨⊢∘≢)⌸,+/¨⍳⍵ ⍵}6 has the same output as ⍪(⊂⊣∘⍕,''⍴⍨⊢∘≢)⌸,+/¨⍳6 6
cya anyway
have fun with physics
@Razetime i don't think so
cool, no problem
09:50
@Razetime Notice how your *s caused italic text!
dyalog.com/blog/2018/09/… the fact problem 3 doesn't work with ]boxing on annoys me slightly
10:33
@Adám oh sorry about that lmao
11:32
@rak1507 Well, it does work, but looks different. You can always add monadic ⎕FMT to make it "work".
anyone here happen to know haskell? don't think there's a haskell chat room :/
11:56
@rak1507 there was, but it's frozen
12:30
<kritixilithos> @rak1507 i know a tiny bit, also the ppcg discord has a channel for 'of monads and men' although that is inactive as well
12:45
@cannadayr k9 will (apparently) eventually make it to risc-v, so who knows
2
13:22
Is there a way to append (1 2 3) to (4 5 6) so you get 2 3 ⍴ 1 2 3 4 5 6? I feel like ⍪ can probably do it but I'm struggling to figure out how
ngn
ngn
@rak1507 you should make 1 2 3 a 2d array before you catenate 4 5 6 below it
⋄(1 3⍴1 2 3)⍪4 5 6
@ngn
1 2 3
4 5 6
Yeah, is there an easy way of doing that with variable length arrays?
ngn
ngn
@rak1507 you could also use "mix": ⋄↑(1 2 3)(4 5 6)
 @ngn
1 2 3
4 5 6
13:26
@rak1507 also 1 2 3,[.5]4 5 6
⋄ 1 2 3 ,[.5] 4 5 6
@Bubbler
1 2 3
4 5 6
ngn
ngn
right, "laminate"
↑,⍥⊂ I guesss this works
Oh right
,[.5]
But: ⋄ 1 2 ,[.5] 4 5 6
13:27
@Bubbler LENGTH ERROR
ngn
ngn
@rak1507 apl arrays are always rectangular (not "ragged"), so you must fill the gaps with something. if 0 is ok as a filler - "mix" () does exactly that.
@rak1507 So that's (↑,⍥⊂) the right way for different lengths
(Filler is 0 for numeric arrays and space for char arrays)
@rak1507 I like ⋄ 1 2 3 ⍉⍤,⍥⍪ 4 5 6 because it looks so cute.
@Adám
1 2 3
4 5 6
ngn
ngn
13:43
i got a mysterious upvote on this 4-year-old answer and i noticed it can be shortened. mini-challenge: can anyone get to 16 bytes?
the question was answered 2 hours ago and then 1 hour ago, so I guess it's not mysterious
ngn
ngn
@mypronounismonicareinstate mystery solved :) challenge still stands
@mypronounismonicareinstate Welcome to the Orchard, btw. Intested in APL now?
14:03
not really (I occasionally join this room silently, but I do not know APL)
@mypronounismonicareinstate We can fix that.
⋄ ]runtime -compare '{0}¨3 3⍴⍳9' '≠⍨3 3⍴⍳9'
@TessellatingHeckler VALUE ERROR
@TessellatingHeckler No user commands for the bot (and you can't copy in cmpx either).
{0}¨3 3⍴⍳9 → 3.5E¯7 |   0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
≠⍨3 3⍴⍳9   → 4.6E¯7 | +31% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
then
I was predicting that not using a d-fn and each, and only using primitives, would be faster. And it isn't. How come?
ngn
ngn
14:10
@TessellatingHeckler {0} is an idiom
@TessellatingHeckler {0}¨ is an idiom
ngn
ngn
even better
Operators have an overhead to set up.
@dzaima However:
      a←30 300⍴⍳9
      ]runtime -c {1}¨a =⍨a 1⍨¨a

  {1}¨a → 5.5E¯4 |    0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  =⍨a   → 1.2E¯7 | -100%
  1⍨¨a  → 3.7E¯7 | -100%
14:15
set the array up first:

M←300 300⍴⍳9
]runtime -compare '{0}¨M' '≠⍨M'

{0}¨M → 4.4E¯7 | 0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
≠⍨M → 4.5E¯7 | +2% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
was trying to set up more proper tests (also with factorio not running in the background..) but seems y'all have got that covered
Interesting:
      a←⍳15
      ]runtime -c {2}¨a 1+=⍨a 2⍨¨a

  {2}¨a → 1.7E¯6 |   0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  1+=⍨a → 3.0E¯7 | -83% ⎕⎕⎕⎕⎕⎕⎕
  2⍨¨a  → 3.3E¯7 | -80% ⎕⎕⎕⎕⎕⎕⎕⎕
I think this is enough reason to allow and A⍤k
@dzaima +1 for mentioning factorio
java power... or something
what is Dyalog's IDE written in?
14:23
@dzaima Interesting. Your array of 1s is int, right? Not bits.
@Razetime C.
hmm should be faster then right
@Razetime as a hint, a 1e100 item array would have the same performance
@dzaima Oh, 2⍨ not 2⍨¨
@Adám eh, same thing
(≢a is 2147483647 as it's truncated to an int, not that the specific size changes anything anyways)
14:28
@ngn Nailed it (and found a BQN bug in the process; hard refresh if it doesn't work).
nice pillow
ngn
ngn
@Marshall yes, you nailed it!
Are those quotes supposed to be there?
...but then I looked at other answers and Moris beat me to it by four years.
ngn
ngn
@Marshall huh! i hadn't noticed that
moris's code is exactly the same as what i had
14:33
@Razetime In the output, yes. That's how it indicates a character array, since otherwise something like "1 2"≍"3 4" would be confusing.
14:45
interesting
so there a command for removing those then
15:13
@Razetime No. The formatter's not really part of the language; it's just how results are shown. In dzaima/BQN you can use •← to print a string directly, but the online version doesn't have any mechanism like that yet.
@Marshall in dzaima/BQN all printing/formatting is equal and all of it depends on global state (i.e. )oneline, )quote, •pp). i think having a -something for direct printing would be good
@dzaima •i and •o would be nice, also as inverses, so you can do F⌾•i 0 to get input, transform it, and output it.
@dzaima (but with that i still think •← for print-debugging (so full formatting) without need to worry about spaces (and, though unsupported currently, allowing printing functions/modifiers directly in-place) is wonderful)
@dzaima Wouldn't an operator that is a no-op with the side-effect of printing be better for debugging? Like {⎕←⍺⍺ ⍵} or maybe {⍺⍺ ⎕←⍵} in APL.
@Adám edited in a counter-argument as you posted that :p
15:20
@dzaima True, but it is really awkward to output intermediary values while a train is running.
@Adám true, i've been annoyed by that. {•←𝕨𝔽𝕩} does seem useful for that
@chrispsn very interesting do you have any links you could send me?
ngn
ngn
15:33
@cannadayr are you in the google group? have you tried k9?
@ngn i am not and have not.
ngn
ngn
15:53
@cannadayr see the links at the top of shakti.com
16:37
@cannadayr In general, you can find links about APL-related subjects on aplwiki.com
17:04
damn the fact the winner didn't know any APL before and was able to win shows some serious dedication, I assumed everyone who got prizes would've been APLing for years
@rak1507 I don't think I'd have a chance in the competition, and I've been doing APL for over 3 decades.
Interesting, what do you think makes people likely to do well in it if not experience?
ngn
ngn
people with decades of experience tend not to be students :D
I forgot it was a student competition, fair enough, I guess doing CS at uni or something helps
@rak1507 No, that'll probably lessen your chances.
17:13
It'd probably help more than doing any other subject though
@ngn When I has 2 decades of APL experience, I was still a student :-)
2
@rak1507 Mathematical inclination, I'd say, and attention to detail.
17:38
Fair enough
@ngn could win the professional prize if he wanted to.
@Adám - As far as I am concerned, when it comes to programming languages, regardless of how many years of using the language I have, I am always and forever a student... :)
@JeffZeitlin Regarding the language, sure, but I was actually in a school.
@Adám - OK... but then, there's always SHK... the School of Hard Knocks... :)
18:01
@rak1507 also, 3/4 of the winners mentioned ppcg, woot
18:12
~~what is ppcg~~
<kritixilithos> =programming puzzles and code golf, a former name for this site
Oh cool
@Adám in your bounty thing, what's the reason for 'The challenge was posted before 2020'?
@rak1507 New challenges get more attention anyway and I didn't want to simply reward all new APL answers, but rather try to get APL to "catch up" on older ones. It has the additional benefit for the site as a whole, to get some focus on older challenges with untapped potential.
Fair enough!
18:44
Can anyone find a golfier way to do:
⋄ ↓⍉2(⊥⍣¯1)1 2 4 8 7 14
@rak1507 DOMAIN ERROR
oh ffs
↓⍉2(⊥⍣¯1)1 2 4 8 7 14
┌───────┬───────┬───────┬───────┬───────┬───────┐
│0 0 0 1│0 0 1 0│0 1 0 0│1 0 0 0│0 1 1 1│1 1 1 0│
└───────┴───────┴───────┴───────┴───────┴───────┘
formatting is butchered but you get the idea
@rak1507 (⊥⍣¯1)⊥⍣¯1⊢
@rak1507 Ctrl+K!
I did ctrl K
Maybe I didn't do it correctly
ngn
ngn
@rak1507 1 2 4 8 7 14 -> ⎕a⍳'BCEIHO'
18:47
'ABDHGN' if ⎕IO←1
clever, thanks
Tbh I don't think this is where the byte saving will be important
Same length but simpler: ⋄ (4⍴2)∘⊥¨⎕A⍳'ABDHGN'
ngn
ngn
@Adám delenda est
@Adám 15 30 60 120 105 210
Meh, I mean ⋄ (4⍴2)∘⊤¨⎕A⍳'ABDHGN'
18:48
@Adám 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 1 0
nice
ngn
ngn
⋄2⊥⍣¯1⊢5 11 19 34
@ngn DOMAIN ERROR
@ngn bot is paranoid.
ngn
ngn
⋄↓2⊥⍣¯1⊢5 11 19 34
18:51
@ngn DOMAIN ERROR
ngn
ngn
@Adám what is it afraid of?
How can I flatten a vector of vectors?
ngn
ngn
@rak1507 ∊
⋄10|(↓⍉2⊥⍣¯1⊢⎕A⍳'ABDHGN')(-,⍥⊂+)¨⍨⊂4 5 6 7
@rak1507 DOMAIN ERROR
18:52
∊ flattens it all
@rak1507 ⊃,/
Thanks!
great now I need to apply this function recursively, time to kill my PC
@rak1507 Pro-tip for when nobody is around: APLcart.
Ah yeah
@rak1507 Why kill your PC? If you forget a stop condition, you can always interrupt.
@ngn Tight loops that cannot be interrupted with a weak interrupt, and bugs in the inverse code that crash the interpreter.
I've since improved the bot's code, but it hasn't been updated yet.
ngn
ngn
18:56
@Adám this message seems to contradict your previous message :)
@ngn I know it seems that way, but a user can issue strong interrupts while an APL green thread can only issue weak interrupts to kill its fellow green thread without killing itself.
ngn
ngn
@Adám green threads are very ethical
hmm currently this algorithm that I'm writing would potentially need a a vector of 12^12 other vectors
ngn
ngn
@rak1507 what are you solving?
codegolf.stackexchange.com/questions/69187/… but please don't beat me to it <3
I think I'll go in reverse order
ngn
ngn
19:08
@rak1507 i don't care much about rep
My current thoughts are a function that takes something like (0 0 0 0)(0 0 0 1)(0 0 0 2)... the current paths and returns all new possible paths from that
And then use the power operator or something to apply it to 0 0 0 0 15 times or however many it takes to generate all 10000
ngn
ngn
@rak1507 for the thing we golfed, shouldn't you include 4-vectors with 2 consecutive 1s too?
And then some sort of search and just print it out
@ngn I think you have a pretty good reputation already
@ngn good point, up to 3 didn't see that
only 3 more characters
ngn
ngn
19:15
⋄⎕io←1⋄↓↑∪,(-⍳4)∘.↑,\3⍴1
@ngn
 1 0 0 0  0 1 0 0  1 1 0 0  0 0 1 0  0 1 1 0  1 1 1 0  0 0 0 1  0 0 1 1  0 1 1
      1
⋄↓⍉2⊥⍣¯1⊢⎕A⍳'ABCDFGHLN'
@rak1507 DOMAIN ERROR
one byte less
ngn
ngn
@rak1507 usually ⎕io← isn't counted
19:18
ah
fair enough
Got any bright ideas for the main meat of the program?
ngn
ngn
@rak1507 not yet
ngn
ngn
20:18
@rak1507 i have an idea now
oh cool
ngn
ngn
compute the matrix of neighbours - 0000..9999 along the first axis and what we golfed before (with their negatives too) along the second axis
then compute the distances from 0000 to each of 0000..9999
The distances don't matter, all that matters is the sequence right?
ngn
ngn
then use recursion or maybe ⍣ to recover the path from the input to 0000
Ah fair enough
ngn
ngn
20:20
@rak1507 yeah, it's just an intermediate step
sounds pretty tough
(-,⍥⊂+)
I was using this for plus or minus
ngn
ngn
@rak1507 not trivial, but i guess it should be doable in <100 bytes
Yeah
ngn
ngn
20:33
⋄⎕io←0⋄x←9871⋄ m←10⊥¨10|(,⍳4⍴10)∘.+,∘-⍨↓↑∪,(-1+⍳4)∘.↑,\3⍴1⋄t←{⍵⌊1+⌊/⍵[m]}⍣≡0,⍴⍨9999⋄1↓¨⍕¨1e4+1↓{×⍵:⍵,∇a[⊃⍋t[a←⍵⌷m]]⋄0}x
@ngn 9881 9991 0001 0000
ngn
ngn
x input, m matrix of neighbours, t distances
21:28
(ignore the crap code) tio.run/##SyzI0U2pTMzJT///… why does this error?
Works fine for me :/
ngn
ngn
@rak1507 probably because tio uses an old version of dyalog
how frustrating
Ah using ∪ doesn't account for different paths to the same number
is there a way to get the elements with unique left parts?
ngn
ngn
@rak1507 can't we output any shortest path?
Yeah, as long as they're equally short, but atm I'm getting cycles, so when I go to find the path, I could find a longer one
If that makes any sense haha
ngn
ngn
@rak1507 what do you mean by "elements with unique left parts"?
21:39
┌─────────────────┬─────────────────┬─────────────────┬─────────────────┬─────────────────┬─────────────────┬─────────────
│┌───────┬───────┐│┌───────┬───────┐│┌───────┬───────┐│┌───────┬───────┐│┌───────┬───────┐│┌───────┬───────┐│┌───────┬────
││0 0 0 1│0 0 0 0│││0 0 0 9│0 0 0 0│││0 0 1 0│0 0 0 0│││0 0 9 0│0 0 0 0│││0 0 1 1│0 0 0 0│││0 0 9 9│0 0 0 0│││0 1 0 0│0 0
│└───────┴───────┘│└───────┴───────┘│└───────┴───────┘│└───────┴───────┘│└───────┴───────┘│└───────┴───────┘│└───────┴────
└─────────────────┴─────────────────┴─────────────────┴─────────────────┴─────────────────┴───────────────
my stuff looks like this, where the right is what produced what's on the left
so I was thinking I'd backtrack at the end
ngn
ngn
@rak1507 so, group by left part, and pick one from each group?
yeah something like that
ngn
ngn
@rak1507 train: (⊃¨{⊂⊃⍵}⌸⊢)
amazing thanks
f⍣12 gets 10000! amazing
time to write the backtracking and then I think I'm basically done
22:13
@rak1507 Polyfill.
 
1 hour later…
23:19
⋄ (' '∘≠(/)⊢)'a b'
@TessellatingHeckler SYNTAX ERROR
SYNTAX ERROR is "The function does not take a left argument", but why? The tree view of the train looks like I intend, there is no left argument for my train (intentionally), there is a left argument for not-equal and it does take one
this is going to turn out to be something I've seen before, I can feel it
⋄ {(' '≠⍵)/⍵}'a b'
@TessellatingHeckler ab
perfect
⋄ ((' '≠⊢)/⊢)'a b'
@TessellatingHeckler 1
23:24
broken
⋄ ((' '≠⊢)(/)⊢)'a b'
@TessellatingHeckler 1
isolate the reduce so it's compress/replicate ... still no
@TessellatingHeckler Slashes don't translate well to trains
You can use ⊢⍤/ though
⋄ ((' '≠⊢)⊢⍤/⊢) 'a b'
@Bubbler ab
Also (' '≠⊢) → ' '∘≠
⋄ (' '∘≠⊢⍤/⊢) 'a b'
23:30
@Bubbler ab
@Bubbler But what's wrong with it when the slash is isolated inside parens to avoid it being treated as an operator?
@TessellatingHeckler Isolated slash alone is still a slash syntax-wise
So the previous workaround to force it to a function was (/⍨⍨)
which makes / an operand to an operator
:o I could have sworn I've used that before; I see it, in the -trains=tree view it's binding as an operator, the tree view doesn't look like I intend
Thank you, Bubbler
Btw, if the sole purpose is to remove spaces, you can just ~∘' '
⋄ (~∘' ') 'a b'
@Bubbler ab
23:37
@Bubbler "without space" 😃 that's beautiful

« first day (1316 days earlier)      last day (1635 days later) »