« first day (263 days earlier)      last day (638 days later) » 

5:59 PM
@Adám looks like you survived the last holidays triplet 😅
@Ven As always, interesting read. Btw, you have an obvious extra byte with 10÷⍨ instead of .1× and you don't need the rightmost parenthesis.
@Uriel Yeah, I understand that triplets (R"H) are hard for E"Yers. We have them all the time. Almost didn't rain.
@Adám nice phrase, E"Yers.
any comments on this?
@Uriel Ugh.
@Adám why? its actually pretty pretty. and I know about the '⍺ ⍵' space, waiting for more edits to pile up
@Uriel If Jelly can do it in 23, APL shouldn't really be longer than 50.
@Uriel YOu also don't need parens around (0 3 1 2)
6:04 PM
@Adám if only I knew jelly. you got any glimpse on his algorithm?
@Uriel It actually isn't so hard to read, just hard to memorize the primitives. Read left-to-right, then look up each symbol in Atoms/Quicks table and think of it as an APL train.
@Uriel I'll have a go at it, but I think ngn is the right one for this.
@Adám I'll try scratching the technique.
@Uriel A tip: You know that 1 1⍉ is the major diagonal?
@Adám now I do
@Uriel :-) Do you understand why?
6:17 PM
@Adám I think I do, given the 3D example in the IDE. but I'm not sure yet
looks like it's working with the same principle of the rank operator
and chooses the plane, vector or space it goes through
@Uriel Yeah, or n-hyperspace of course
Heh, which language/notation allows you to take the diagonal 4D space out of a 5D space?
I still don't understand the implications regarding this tasks
@Adám well, APL. quite useful for wrap drive users in some centuries
@Uriel It may or may not come in handy. Just a pro-tip.
@Adám oh great, thought it was a hint
@Uriel I have an idea about using , maybe twice.
6:25 PM
@Adám sounds fair considering my 4 outer products
@Uriel {⊂×⍺}⌺5 5 says for each element which neighbour to add to it.
(where 5 is the matrix size of course)
@Adám huh?
doesn't tell me much
@Uriel So top line is something like ×|×⌊ in APL.
Hey, @Mr.Xcoder you know Jelly, right?
@Adám Yes, I do.
@Adám yea, I guessed that. the bottom line is what looks like gibberish, with the each ops and refferal to other links
6:33 PM
@Mr.Xcoder Can you explain the Jelly code?
@Adám Which?
@Mr.Xcoder ^^^^^^^^
Just a sec.
@Adám btw, the trains is the reason that (apart for APL) I favor only golf-langs that uses stack, like 05ab1e and befunge
Ok, it will take some time.
But what Is it for?
6:36 PM
A: Fold up a matrix!

UrielDyalog APL, 101 99 bytes {,/↑,/,/¨(⍉2↑o)(+/+/⍵×∘.{⍺ ⍵∊⍨⌈x}⍨⍳≢⍵)(⊖⍉2↓o←+/¨+/¨⍵∘ר(0 3 1 2)∘.{⌽∘⍉⍣⍺⊢⍵}(⍳⌊x←.5×≢⍵)∘.=⊂∘.⌈⍨⍳≢⍵)} Try it online! How? m ⍝ the matrix 1 2 3 2 1 0 3 2 3 0 4 2 5 6 3 7 4 7 9 4 0 6 7 2 5 {⍳≢⍵} m ⍝ range of length 1 2 3 4 5 {⊂∘...

@Mr.Xcoder RE
oh Dennis' answer
I have to get off the train now. I hope to go to bed soon (dead tired). I'll have a look tomorrow what you guys found out.
@Uriel @Adám So first off, there is a helper link, namely AṂ×Ṡ that, as far as I can tell takes an array of integers, gets the absolute value of each, then gets the minimum absolute value. After that, it maps each integer to 1 if it is positive, 0 if it is 0 and -1 if it is negative and then does vectorized multiplication (of each sign with the minimum absolute value).
I must admit it is very obfuscated.
@Adám E"Yers tend to associate tiredness to food consumed on holidays
@Mr.Xcoder and that's only the helper link. wonder what is that for
6:42 PM
Then there is a Main link, which is gigantic: LH which, as you well guessed gets the length halved
@Uriel Deciphering right now.
@Mr.Xcoder You mean halved?
Yes, corrected
@Uriel then ŒR gets the range [−|z|, |z|] inclusive. ṗ2 means Cartesian square, which basically means Cartesian product with itself... Then, Ç€ applies the helper link to the list preceding it (the cartpow).
@Mr.Xcoder I figured the single meanings (see pic up). I just don't get how they sum up together
Ok, the large description is mainly for myself.
(it is hard to decipher Dennis' cryptic posts)
ok, so this is the output for the first matrix:
-2 -2
-1 -1
 0  0
-1  1
-2  2
-1 -1
-1 -1
 0  0
-1  1
-1  1
 0  0
 0  0
 0  0
 0  0
 0  0
 1 -1
 1 -1
 0  0
 1  1
 1  1
 2 -2
 1 -1
 0  0
 1  1
 2  2
Using the code:
If you now group the indices by their values, you'll get:
 2  6  7
 4  9 10
 3  8 11 12 13 14 15 18 23
16 17 22
19 20 24
Median gives us 6 9 1 5 1 3 1 7 2 0 2 1 2 5
@cairdcoinheringaahing Can you please find another challenge for JHT in the elapsed time?
@Mr.Xcoder Yeah, that's what I'm doing. There aren't a lot without Jelly answers :(
6:52 PM
@Uriel TBH I have no idea how he did it. Just comment asking for a detailed explanation --- It's far more obfuscated than I thought.
7:07 PM
Cool, local bus has wifi.
@Adám Yeah, they've introduced that here, along with on-board phone chargers. Great isn't it?
@Adám well, I guess local in UK is regional for us. Maybe national?
7:34 PM
A: Fold up a matrix!

DennisJelly, 25 23 21 bytes AṂ×ṠṚ LHŒRṗ2Ç€ḅLĠịFS€ Try it online! Background (WIP) We start by replacing its elements with coordinates, increasing leftwards and downwards and placing (0, 0) in the center of the matrix. For a 7x7 matrix M, we get the following coordinates. (-3,-3) (-3,-2) (-3,-1) ...

dude is totally brilliant
7:58 PM
@Adám codegolf.stackexchange.com/a/145238/65326 something to work with
I really liked the x××× part
8:43 PM
@Uriel +/¨+/¨ can be +/∘,¨ or +/∘∊¨ depending on argument.
@Uriel ∪/∪/∪/,
@Uriel {(+/1x×××⌊/∘|)⍺⍵}((+/1x×××⌊/∘|),)
9:08 PM
@Adám thanks!
@Uriel I'm writing up a totally different approach at same length.
@Adám the more the merrier
yet, my original solution resembled vaguely Dennis'. the main advantage of the last one is the early determination of order (with p+nq)
9:36 PM
A: Fold up a matrix!

AdámAPL (Dyalog), 60 bytes* In collaboration with my colleague Marshall. Anonymous prefix lambda. Takes matrix as argument and returns vector. Assumes ⎕IO (Index Origin) to be zero, which is default on many systems. {(,⍉{+/,(s×-×⍺)↓⍵×i∊¨⍨s←⌊⊃r÷2}⌺r⊢⍵)/⍨,(⊢∨⌽)=/¨i←⍳r←⍴⍵} Try it online! {…} ano...

Really cool use of 's left argument, if I may say so.
(Mine is shorter, but has more bytes.)
@Adám really cool approach. I still win 😈
@Uriel Only because PPCG's byte counting for APL is silly. On codegolf.co.uk, I would have won.
@Adám just noticed that if APL answers were half my answers I'd have 12*2 answers, and apparently I have 13*2. this proves that the time it takes to adapt to * as the power symbol is ≤ than the time where code golfing damages your brain
9:54 PM
@Uriel I think this statement proves that you need to get some sleep.

« first day (263 days earlier)      last day (638 days later) »