« first day (1242 days earlier)      last day (1673 days later) » 

1:29 PM
@flawr Indeed the program I used for the test cases was shorter. I haven't looked into your algorithm, but you can change ' '' to 0 and '#' to 35
And maybe 0* by ~
And then remove ' '+ or 0+ altogether
TT instead of 9L|?
Also you can replace tand w by y
(Sorry, I'm typing as I notice things)
 
@LuisMendo Thanks:)
BTW: Have you thought about making a shuffle() command? the randperm can sometimes be a little bit cumbersome to use
 
1:47 PM
@flawr I sometimes miss that in MATLAB too. Maybe I could overload XN for that, so that [10 20 30 40 50]&XN would give [20 50 40 10 30] for example (randomly)
 
2:15 PM
@LuisMendo would maybe be nice to have a way to disthinguish shuffling only one dimension or the whole thing
@LuisMendo the TT is a really nice design feature:)
 
@flawr That's what I thought, but often it's same-length or shorter to use things like 3B
@flawr Hm that would require two inputs, so no overloading of XN
 
@LuisMendo or instead overload S and XS?
should we move to matl-chatl?
 
@flawr I like the idea, but S already takes 1, 2 or 3 inputs...
Maybe move there, yes
 
in The Nineteenth Byte, 1 min ago, by Luis Mendo
@flawr I like the idea, but S already takes 1, 2 or 3 inputs...
ah I didn't consider that
 
@LuisMendo Would you like me to move some messages?
 
2:22 PM
Would it be justified to use a new function name for shuffle? There are some free, but I'm not sure if it would be that useful
 
no probably not
but I don't see any other "obvious" candidates
 
@DJMcMayhem Ah, thanks, good idea. But I'm afraid the time line would be broken if they appear now in that room. Or would they appear at their orignal times?
 
I think they appear at the original times
 
maybe overloading randperm?
 
21 messages moved from The Nineteenth Byte
 
2:25 PM
but then you again need 3 symbols
 
@flawr I was thinking exactly that. But only the 1-input version is free
Maybe specifying the dim is not that useful
 
well you can use "randperm" for shuffling across all dimensions, and then one input would just shuffle a long one dimension
 
Sorry, I though you were referring to randsample, not randperm
Anyway, Z@ (randperm) is already defined for 1, 2 or 3 inputs
Zr (randsample) for 1 input is free
And it is semantically a nice match
But it would not be possible to specify dimension
 
hm that might work
yes that would probably be the best solution
(btw has anyone ever used tic/toc in MATL? seems like a waste of commands:)
but then the question is: what behaviour do you want?
again unrelated: you could use ZX... ZY... ZZ... for a whole new page of commands:)
I'll coma back later, have to "work" right now:)
 
2:55 PM
@flawr With 1 input it would linearize to a row or column (not sure) if needed, then shuffle
@flawr I think so, yes, but I'll check later. I think I solved the issue with Suever's analytics script getting stalled by the API because of too many requests
^^ Or maybe shuffle "linearly" (i.e. regardless of dims) while keeping shape. So ['ab';'cd'] could become ['da';'cb']
 
 
4 hours later…
7:17 PM
 
7:49 PM
@flawr Using data from July 2019, toc is used in seven answers:
http://codegolf.stackexchange.com/a/151793
http://codegolf.stackexchange.com/a/119412
http://codegolf.stackexchange.com/a/112585
http://codegolf.stackexchange.com/a/108270
http://codegolf.stackexchange.com/a/106876
http://codegolf.stackexchange.com/a/100684
http://codegolf.stackexchange.com/a/67272
And tic is used in 2 of those 7:
http://codegolf.stackexchange.com/a/112585
http://codegolf.stackexchange.com/a/67272
It turns out that a MATL wins (shortes answer) in more than half of those answers :-) Probably not many languages have tic and toc, which are useful for challenges related to measuring time
 
Huh ok, didn't expect that
 
I vaguely remembered having used it a couple of times for "real-time" / time-related challenges
 

« first day (1242 days earlier)      last day (1673 days later) »