« first day (11 days earlier)      last day (3192 days later) » 

10:43
Maybe you can duplicate those inputs "before" instead of "after". So the copy wouldn't have to go to the bottom, but to the top. Does that make any sense?
 
4 hours later…
14:20
@LuisMendo Do we have a good way to shuffle a cell array?
The jobs answer really seemed bloated for doing that: nZ@)
@Suever I can define Z@ ( randperm) to work with cell input. However, it can't work with normal array input, because then something like 5 could correspond to number 5 (and thus array 1:5) or to the array 5
But yes, for cell arrays it can be done. I'll add that for next version
Hm wait
randsample?
>> matl {1 2 3}tnZr
2
3
1
Oh that could work!
Got it down to 6 bytes
I'm sure I can work with the input order a bit
There we go 5 bytes. Probably as low as it can get
Thanks!
14:39
Wow! What an improvement
Done this:
>> matl -h Z@
Z@  random permutation
    1--3 (1 / 2);  1
    randperm (produces a row vector as output). If 3 inputs: third
    input indicates number of permutations, each on a different row.
    First input can also be a cell array or a char array, and then
    its elements are permuted
>> matl {'abc' 'de' 'fghij'}Z@
de
fghij
abc
I will commit this weekend
Yea that could definitely save some bytes over doing {'abc', 'de', 'fg'}tnZr
Although maybe it would be &Zr
Oh no it requires two inputs
So now you are winning! :-) Provided input is flexible, that is. But most answers assume that
And output
It's a pretty poorly written question
Also there is something weird with YX
It doesn't actually respect any regex
It basically just works as a non-overlapping strrep
Huh? Can you give an example?
Essentially YX just calls regexprep
Yea let me dig it up
Oh just kidding, it works, I'm just doing a strfind first to see if it exists and the regex doesn't match
Because I can't use strrep since that replaces overlapping matches
So if you pass a specially crafted string it fails to work
aw crap
Doesn't seem to work when there are more jobs than workers. — Emigna 11 mins ago
14:53
@Suever ? But that works as expected. 'aba.*' matches the whole string, which then gets replaced by ''
@Suever Aww
Right sorry that's what I meant, the regex works expected but doesn't quite guarantee the challenge to work
Because they want a basic non-overlapping strrep
I'll delete that other one for now until I think of a better way to deal with different length strings.
it sucks because you may have to chop either
Some looping structure may be better
and display within the loop so it errors out
@Suever Ah, ok
@Suever Yes, that sounds good
 
7 hours later…
21:44
Luis Mendo has made a change to the feeds posted into this room
New release of the language
Description:
* Third and fourth (optional) inputs of `Ys` (`cumsum`) can now be a single input
* `Xv` (remove whitespace) unified with `Xz` (`nonzeros). Also, char(0) is now considered whitespace
* `X+` has been removed. Use `Y+` ot `Z+` instead (`conv2`). In addition, `Y+` allows string input flag to be replaced by a number; and both `Y+` and `Z+` now allow sparse input in Matlab
* Added `polyfit` function as 3-input version of `ZQ`
* Octave compatibility: `kron` now automatically converts inputs to `double`, as happens in Matlab
2
22:25
@David Suever's very nice script tells me that this answer of yours uses X+. This function has been removed, as Y+ does the same (sorry about that)
 
1 hour later…
23:33
OK @LuisMendo. I'll put a note on the answer. Actually, with all the changes to MATL since then, the answer would be a good bit shorter now!

« first day (11 days earlier)      last day (3192 days later) »