« first day (1397 days earlier)      last day (1260 days later) » 

ngn
7:57 AM
@Adám does it use primitives introduced in the latest version?
 
@ngn No. Works in 12.1 (I don't have an earlier version installed).
 
ngn
8:08 AM
i can match rak1507's 15 bytes but no better :|
≢¨({⊣⌿⍵}\16⍴⊂)~⊃ (16 but i know there's a way to save 1 byte from {⊣⌿⍵})
 
 
1 hour later…
9:31 AM
           0*0j1    0⍟0j1
ngn/apl    DOMAIN   DOMAIN
Dyalog       0      DOMAIN
GNU-APL      1        0
NARS2000  NaNjNaN    ¯0
J            0        0
Wolfram    undef      0
 
 
3 hours later…
12:29 PM
> NaNjNaN
 
1:01 PM
@Adám what is this research for
 
@Razetime I was reporting a few GNU APL bugs and noticed this discrepancy. I am suggesting internally at Dyalog that we return 0 for 0⍟0j1 but I'm not 100% certain about 0*0j1.
 
1:53 PM
@ngn fails on non-simple arrays
 
2:05 PM
@dzaima ⊂¨ fixes that
@dzaima (also fails on shapes containing 0)
 
ngn
@dzaima ah, damn.. you're right
 
@Bubbler Naja naja
 
@dzaima bit shorter, even though voidhawk's latest beats it anyways - {¯1↓{0::∇0,¨⍵⋄⍳⍣¯1⊢⍵}↑⍬⍨¨⍵}
 
2:52 PM
another random solution, this one failing on scalars for Some Reason™: ,/(⍳16){0::⍬⋄≢⊃↓[⍺]⍵}¨⊂
@dzaima working: ,/(⍳16){0::⍬⋄≢⊃⊂[⍺]⍵}¨⊂
 
whats the double : for
 
@Razetime 0:: catches errors
 
was trying this: {⎕←≢⍵⋄⊃⍵}⍣{≢⍵=0}
 
3:07 PM
@Razetime ≢⍵=0?
 
forgot the parentheses
 
3:37 PM
codegolf.stackexchange.com/questions/215436/… anyone got a clever idea to construct the matrix used in the sagemath solution?
 
ngn
3:51 PM
@rak1507 one obvious but inefficient way is ⍉↑+⌿¨∘.=∘⎕a¨'ALPHA' 'BRAVO' ..
 
I think I'm going to cheat and do something devious...
 
I reckon I can get a max 50 char solution
 
@rak1507 dfns doesn't appear to have NATO spelling from what i can see so i have no clue what that is :P
 
I assume the lack of precision is fine?
 
3:58 PM
@rak1507 the question specifies either mod 2^32 or bigints
 
Ah ok
I wonder if that makes the matrix solution not work
Probably
I think I'll port the R solution
Getting a working solution isn't the fun bit anyway ;)
 
ngn
@rak1507 why wouldn't it work?
 
Well I'm not entirely sure if it would or wouldn't either way, but if you took the matrix mod 2^32 at each stage of multiplication, would it not result in something different to what it should be?
 
@rak1507 with ⎕FR←1287 you can get >64 bits of precision so mod32 after each multiplication should be fine (or something like that idk)
 
Yeah, I'm just wondering if it results in the calculations not working
 
ngn
4:07 PM
@rak1507 it's as if you're using a 32 bit int type and it overflows - the last 32 bits are still correct
(as usual: floating point issues aside)
@dzaima would this work? {0::⍬⋄(≢⍵),∇⊂[0]⍵}
 
@ngn seems so :D
 
ngn
it feels like there should be ≢[K]Y :)
 
4:28 PM
well I got a working 188, which is decent, but time to get the 50!
 
I should have a working ±147 but it's not working
(also TIL that newlines are fine in strings in ed code)
 
interesting, I wonder what you're doing
 
Is there a nicer way to find the last occurrence of some element x in a vector xs than doing 1 + (≢xs) - (⌽ xs) ⍳ x?
 
⊃⌽⍸x=xs
 
Cool, thanks!
 
4:37 PM
np
 
@dzaima ah ಠ_ಠ
 
What is TIO's compression in the URL format?
 
@rak1507 pako zlib of base64 with a couple replaced characters
 
Thanks
Is there find and replace in TIO?
 
@rak1507 no. the fields on it are just regular textareas
 
4:50 PM
That's what I thought
 
using dfns.base64 or some other compression tool in there might be useful
 
@Razetime using base64 instead of full 8-bit bytes means 33% more length though
 
oh well
 
(which in my case would be 35 lost bytes)
 
4:57 PM
@dzaima oh, i had ⎕IO←0 in the generator but not in the final solution.. ಠ____ಠ
i have 147 in Extended (classic is being extra annoying and giving some translation errors)
 
Yay I have a 31.... technically not breaking the rules
 
@rak1507 technically? :D
 
I would send it here but the TIO link is too long!
I mean, it does say whitespace doesn't count
 
@rak1507 that's for the letter counting, not the source
@rak1507 multiline messages allow for longer links
 
that's hilarious but it's probably under one of the loopholes
 
5:01 PM
Oh oops I read the comment 'Whitespaces do not count. Only letters do. that means someone could implement it in Whitespace at a grand total of "0 bytes", right?' and assumed they were right
 
I should've checked
tio.run/… this is my 188
 
implementing in whitespace sounds like victorian era torture
 
There are probably transpilers
Or you'd do it with different characters and then sed it
 
as a hint for my 147, it has precisely 104 full 8-bit bytes of data
 
5:05 PM
unicode
 
5:53 PM
@dzaima oops
 
6:04 PM
@Razetime Turns out it was a user error:
 
 
5 hours later…
10:54 PM
@dzaima Does dzaima/APL not have exponential notation?
 
@Adám it does, but not on TIO
 
Ah. I always forget to check that.
 

« first day (1397 days earlier)      last day (1260 days later) »