« first day (290 days earlier)      last day (2603 days later) » 

2:11 PM
@LuisMendo Hmmm apparently modular indexing using a char array doesn't work
 
 
1 hour later…
3:32 PM
@Suever Yes, that's intentional (which doesn't necessarily mean it was a good idea...). The reason is to keep Matlab's odd semantics of ':' used as an index
So chars as an index are just interepreted as Matlab would
 
@LuisMendo Ohhhhhh
 
I've yet to find a case when that's useful in MATL :-P
 
Yea with Y( and Z( we basically have all of that. Maybe it would be useful in 3D indexing where you want a colon as the second subscript
I think it's good to be consistent. I just wanted to make sure that it was a feature and not a bug :)
 
:-)
@Suever BTW, [aA] instead of [-1A]
 
@LuisMendo Oh nice! Thanks
That challenge was more annoying than anticipated
I feel like it should have 1) had more flexible i/o 2) only allowed valid inputs
 
3:39 PM
^^ I got that impression from the comments
 
Yea they kept modifying the spec
 
Would it help to use Ys third/fourth inputs?
Ys  cumulative sum
    1--4 (1 / 2);  1
    cumsum. Allows first input to be char. Optional third and fourth
    numerical scalar inputs are interpreted as minimum and maximum
    values, which are applied after the sum at each position. These
    can be substituted by a 2-element numerical array as second or
    third input
 
@LuisMendo Oh that is a VERY good idea
Let me test it out
 
You could use inputs '2' and '0' and do Uq
 
3:48 PM
\o/
 
I didn't know that Ys could do that
 
Yes, that was an addition. I often miss that in Matlab
 
Oh wait it can be shorted more by using an array as the second input
 
I was about to say that! :-)
'234561N'j!UqFq6h&Ys0))
 
Now it's to a much more reasonable length
 
3:54 PM
Expect a 15-byte Jelly answer :-P
 
Also who is this new MATL answerer @LuisMendo?
I may have to learn a new esolang to submit answers!
 
4:09 PM
@Suever B. Mehta? Yeah, I down know him/her
 
Yea that's the one
 
I like CJam :-)
And it's very simple to use
 
I was messing with CJam the other day and was a little confused on some of the basics
Is there an exhaustive spec somewhere?
Like MATL's (amazing) spec
 
:-)
I started with these two tutorials. It's a 20-minute read and gets you going:
And then I use this all the time:
 
I was trying to use some online interpreter that had the docs listed but yea the basics in that first tutorial you linked are what I needed
 
4:13 PM
The one by usandthem or something, right? I saw that one but I don't use it often
 
Yea that's the one
Also, I enabled verbose logging on the server to see if I can finally get to the bottom of those damn timeouts
 
Anyway they seem to be less frequent maybe?
 
In watching it, I don't see anything obvious. The packet to upgrade the connection to a websocket just never gets sent to the application. Unfortunately none of the logs along the whole pipeline show anything being an issue.
Yea it shouldn't really be noticeable anymore because it will auto-reconnect and auto-resubmit on failure
I'd still like to just figure out what the issue is so that I can fix it for myself and others
 
5:14 PM
Hello! :)
 
welcome @B.Mehta!
Just figured I'd point you here since you've been using MATL a lot lately
 
Thanks, much appreciated :)
 
We all love to ping @LuisMendo In here with feature ideas etc.
Which usually results in him showing us that it's already implemented
 
Haha! Is there an online version of the spec I should be looking at? At the moment I've just got a copy downloaded for easy access
 
6:09 PM
@B.Mehta For the full spec you have to download the PDF. As far as help for functions goes, you can either use the documentation link at matl.suever.net or you can use the -h flag for matl to search the help.
matl -h reshape
 
Hey @B.Mehta! Nice answers you've been posting!
Just so you know, the fact that 5 works here is a compiler bug. As you see in the help, 3 already is uint64. The 5 should actually refer to uint16, not to uint64 again:
Z%  convert datatypes without changing underlying data
    2;  1
    typecast. This function allows strings in second input to be
    replaced by numbers, as follows: 1: 'uint8', 2: 'int8', 3:
    'uint64', 4: 'int64', 5: 'uint64', 6: 'int16', 7: 'uint32', 8:
    'int32', 9: 'double', 10: 'single'
This will be corrected in next release. You may want to change that 5 to 3.
Anyway, since Suever's interpreter keeps track of language versions you may leave the 5 and it will continue to work
 
6:25 PM
@LuisMendo About online docs, have you ever tried to compile the MATL spec using something like this to see if it renders to HTML decently?
I often find myself wishing for a searchable online full spec
mainly because I tend to write all of my answers purely in the online interpreter so the version of MATL on my machine is horribly out of date
Also an online spec would allow some useful hyperlinking with the -h text to specific locations in the spec (particularly how indexing can work since the help for ) et al is very sparse)
You could really just host the static HTML version of the spec using github pages
 
Hi @LuisMendo, thanks! Ah okay, I was wondering about the duplicate there, thanks for the info
 
The other (more work) option would be to convert the spec to be compatible with readthedocs and then it would be hosted, searcheable, and also exportable as a PDF.
 
7:09 PM
@Suever That would be great. However, I do some ugly things in the .tex file to get the formatting. Especially the "shadowed" blocks of code gave some problems and I had to do some not very elegant tricks. So I'm not sure how it would translate to HTML. Sounds like it won't be a very straightforward thing. When I have some time I'll do some tests
Readthedocs would be nice too. Also I remember Ray mentioned some similar system. Sounds like a lot of work though :-)
Yes, indexing functions friends are not really documented in the help. They take too many pages in the doc :-)
Anyway, regarding searchable online full spec, there's the pdf now. It's linked from the main page
However, for me it takes a lot to open. I wonder if it's a GitHub thing
Maybe I can upload the .tex to GitHub in case you want to experiment with it
 
7:34 PM
Pushed:
* 5 as second input in Z% was interpreted incorrectly. This has been corrected
* Second input in Y% can now be numbers, as in Z%
* Included source files for spec
 
 
1 hour later…
8:58 PM
@LuisMendo Yea I'd be happy to take a look. Yea I found the same thing with downloading the online version of the PDF.
Not really a priority, just thinking out loud mainly
 
 
2 hours later…
11:26 PM
I'm having trouble getting histcounts to work... anyone know why?
 
11:47 PM
@beaker Octave doesn't have histcounts, so it doesn't work. (I need to implement it one day). Also, it would require two inputs: data end edges
You may want to use the fourth output of u. Perhaps that's what you want? tio.run/nexus/matl#@2@hXPr/f7ShgpGCsQKINIwFAA
u   unique
    1--4 (1);  1--4 (1)
    unique, with 'stable' option by default. It includes a fourth
    output with the count for each unique element. It also allows
    cell array input with numeric content, or mixed char/numeric
    content. In this case it only works with a single output, either
    in sorted or stable mode. This function allows flag strings in
    second and subsequent inputs to be replaced by numbers, as
    follows: 1: 'stable', 2: 'sorted', 3: 'last', 4: 'first', 5:
    'rows'. See also Xu
 
@LuisMendo Yeah, that was pretty much what I was trying to do.
In Octave what I did was histc(x, unique(x)), which is almost the same thing
 
I find that most of the time when we want to use histc it's that way. That's why I added the fourth output to u, which may even make histcounts not that useful
 

« first day (290 days earlier)      last day (2603 days later) »