« first day (464 days earlier)      last day (2429 days later) » 

1:08 AM
*worse
Aww, and now I see the typo you were referring to... What a mess I'm doing of my commit descriptions :-)
 
 
9 hours later…
10:19 AM
 
 
1 hour later…
11:37 AM
Can anyone explain why 'dip'{'dip','dop'}wX~ works, but 'dip'{'dip','dop'}X~ (without the w) does not? In MATLAB, both work fine.
OK, that just turned into a bug report. Works in MATLAB, does not work on either Suever or TIO. :) So I suppose it's an Octave thing.
 
12:12 PM
Commited:
* Extended Zs with skewness and kurtosis
@Sanchises :-D
 
I once made the mistake of installing an XKCD reader app with offline access, which means that I now know virtually all XKCD comics xD
The good ol' days before EU-wide roaming, when 'offline access' could save your day.
 
@Sanchises I had to patch Octave's setxor for MATL. I'll take a look at the patch function
 
Yeah I figured, Octave has its own set of peculiarities.
Turned out I didn't need it anyway, and a single w fixed it regardless.
(and then I made a 5-byte instead of 14-byte program that worked equally well)
(but, imho, is way less interesting)
 
@Sanchises Indeed! Patching those (and unique) was hard
 
Yeah I can only imagine.
Not in the least because MATLAB is also very confusing.
 
12:19 PM
@Sanchises I just saw. Good job!
 
Meh. It's just making the input suit my needs. And still, I'm not sure if it complies because the OP is super vague about non-unique entries. But a single u could fix that if necessary.
I liked my 14 byte program a lot better, because it exploited the idea of unique entries to save me like 5 bytes.
 
Yes, that challenge is badly specified. I VTC'ed after they failed to clarify
and downvoted, I now see
The challenge is quite unclear
 
Yeah me too but I couldn't resist tying with Jelly.
(or well, first winning, but then it turned out arbitrary strings had to be supported)
I have no morals.
By the way, this is MATLAB behaviour too, but why would {{1,2},{3,4}}"@&DD yield {{1,2}} and {{3,4}} instead of just {1,2} and {3,4}?
It's wrapped in some extra layer of cell array for some reason.
Maybe I'll just ask in the MATLAB/Octave chatroom
...or on SO, because why not.
 
12:58 PM
@Sanchises It turned out to be a very silly, easy to fix mistake in my patch functions for Octave (a 2 should have been 1). It also affected setdiff, union, intersect. All of them are fixed now. Thanks!
Commited:
* Correction for set functions in Octave. The bug afffected Octave's compatibility functions for setxor, setdiff, unionand intersect. Thanks to Sanchises for noticing!
@Sanchises Yes, that's what Matlab does. I was tempted to change that in MATL, but I decided to go with Matlab, although that behaviour is hardly evver useful
Basiccally, Matlab's for applies () indexing (for the columns of the array), even if the loop is over a cell array
> For example, on the first iteration, index = valArray(:,1). The loop executes a maximum of n times, where n is the number of columns of valArray, given by numel(valArray(1,:)). The input valArray can be of any MATLAB data type, including a character vector, cell array, or struct.
 
1:40 PM
Thanks for your answer on SO.
Yeah it's better to keep it at MATLAB's way, you don't want sudden bugs popping up when you for example loop over a cell array that can be either a row or a matrix.
You could consider a &" which checks whether it's a row and unwraps it accordingly. Or vice versa, do that by default and use &" for true MATLAB behaviour.
But I don't know if the language fundamentals allow for & to precede a control flow operator.
 
 
2 hours later…
3:25 PM
@Sanchises It was an interesting question :-)
@Sanchises That's the problem. & (like $ and # ) only applies to normal functions, not to control statements like ". It would have to be a new 2-char control statement. And it's probably not worth it, because almost always the cell array is a vector, so to get the cell contents in each iteration you only need to use g (cell2mat) after @
 
@LuisMendo Yes, I figured. I'm getting the hang of how you guys built the compiler a bit, and I already assumed that wasn't easily supported.
What actually happens if you do &"...?
Does the & just apply to the first loop, first function, or?
 
3:40 PM
@Sanchises Building it was fun :-) The main problem is that visualizing the function definition file (funDef.txt) may be difficult, for example on GitHub, because of the tabs
@Sanchises & applies to whatever normal function comes next. A normal function is that which is not a loop/branch, or stack-rearranging function, or meta-function, or clipboard function
Example:
>> matl 3:&"@f
1
1
1
1
You get four 1's here because the first f has the & modifier applied, which turns it into two-output find
 
4:01 PM
Yeah I thought so. Good example, thanks.
Why did you go for a single definition file, and not a large (well... Very large, there may be my answer) number of m files?
 
You may be thinking in terms of Matlab functions. But the MATL compiled file (MATLc.m) doesn't have functions (except functions like setxor that need to be intercepted for Matlab compatibility; but that's a different story). A MATL function like f is translated into a bunch of lines directly in the compiled file.
So what is needed is a way to specify the lines that define each MATL function. Apart from some wrapping code to get values from/onto the stack, implicit input etc, which is common to most functions, those lines actually define that the MATL function does. For example, for f it's just [out{:}] = find(in{:}) (in and out are handled by the wrapper code I mentioned). For other functions there are more lines, but often it's just something like the above: a simple call to a Matlab function
Those lines are defined in the 13th column of funDef.txt. Other columns define things like possible and default numbers of inputs and outputs, help/doc text etc
 
4:43 PM
@LuisMendo Yeah I see. But there is no real reason to read those functions from one file, or read them from multiple files. For example, you did have separate compatibility function files, rather than make a compFunDef.txt file.
 
Yes, it could have been done differently. Anyway, they are not directly read from the file txt. That file is converted into a funDef.mat file, which contains a struct array with the data. So when a function needs to be inserted into the compiled file, its defining code is taken from the body field of that struct, which corresponds to the column I mentioned from file funDef.txt
 
 
3 hours later…
7:40 PM
* Circular convolution (`cconv`) implemented as `Z+` with 3 inputs; including Octave compatibility
* `Zc` with a single, non-cell input replaces nonzeros by 35 (ASCII for '#') and converts to char. Thanks to Conor O'Brien for the idea!
* Octave compatibility: `Zd` (`gcd`) and `Zm` (`lcm`) now allow char inputs
* Extended `Zs` with skewness and kurtosis
* Correction for set functions in Octave. The bug afffected Octave's compatibility functions for `setxor`, `setdiff`, `union` and `intersect`. Thanks to Sanchises for noticing!
@Suever I just created a new release, and it failed to automatically push to MATL Online again. Github says error was HTTP 500 (same as tge other time). Manually redelivering didn't work. Maybe it has become read-only again?
 
8:05 PM
@LuisMendo Can you try again real quick?
 
8:18 PM
@Suever Working! :-)
 
awesome! It was a permissions issue on the server
go figure :)
 
:-)
 
9:16 PM
@Suever chmod gimme_my_files
... SO chat does not allow profanity even in chmod :)
 

« first day (464 days earlier)      last day (2429 days later) »