« first day    last day (2915 days later) » 

12:35 AM
@LuisMendo I added a description to the gist. Do you want me to add more info to the actual post on here?
 
1:03 AM
@Suever If you feel like it, you could add a small description here, with a link to the gist. That way the message with the description and the link can be pinned here. Just a general idea of what it does; the code is actually very well commented
 
1:21 AM
To determine how MATL is actually used I developed a simple MATLAnswer class available here. This class parses each answer and returns information about function usage including input/output specification and provides some basic visualizations of the usage. It also returns an array of MATLAnswer instances which each contain metadata about the answers that can be used to perform custom analysis and visualization.
2
@LuisMendo ^^ How's that?
 
 
4 hours later…
5:11 AM
@LuisMendo I think that writing a normal MATL function then encoding/compressing it will not be well received on PPCG, the base conversion might not be a good plan.
I think it should be fine if we allow two kinds of MATL program, one defined by one-byte integers (uint8's), and normal ASCII ones, and MATL checks whether the input is a string of characters or a numeric data type and runs accordingly.
And I would have thought it would be good enough to show and explain the ASCII version, and give the numeric version along with something that says how it is obtained and that MATL can run it. (I'm not sure whether TryItOnline would be able to)
 
 
2 hours later…
6:53 AM
OK, I removed my earlier fork and made another one. github.com/DavidJArnold/MATL/commit/…
This can read an array of uint8's and turn them into a MATL program. The conversion table is in matl_conversionTable.txt. The conversion is generated using generate_conversionTable.m, and it is very simple to change which two-character functions we include using incl and excl. We can also add longer strings to the mapping if necessary. This is where Suever's code will be helpful, to allow us to put the right two-character commands in the conversion table.
That's the last wall of text from me for a while, I should be doing work :)
 
 
3 hours later…
9:43 AM
@Suever Great! Pinned
@David That sounds like a good plan :-) Another idea I'm toying with (but I don't know if it will be well received) is defining a custom encoding for the 95 printable characters. That encoding would be a 95-to-256 base conversion. That way we wouldn't need any change in the code, we'd just need to indicate which encoding is used. Custom encodings are accepted; the only unusual thing here is that characters would not be byte-aligned
 
10:04 AM
@David I just saw this answer. In the comment by Pietu1998 there's a link to an encoding that seems to also not be byte-aligned
 
 
10 hours later…
7:40 PM
@Suever This is the first matl class I've ever seen. And also probably the last one.=)
 
 
1 hour later…
8:49 PM
@flawr Because Suever is a programmer with class :-P
I just commited a small change that affects the `cumsum` function:
https://github.com/lmendo/MATL/commit/21cbd96a6f5f44d09678b53ec110e5f2f8ddba76
 
9:08 PM
@LuisMendo When it comes to Matlab, I'm a Marxist programmer then.
 
@flawr meaning...?
Oh got it!
:-)
Same here
No OOP or anything fancy
I tried to avoid even functions
 
Who needs loops anyway???
 
Yep
Convolution is enough
2
for ANYTHING
 
9:21 PM
@LuisMendo Not even any recursion :'(
 
Recursion is so difficult to grasp anyway :-P
 
I wonder if there's a Prolog golfing language
 
There's something called Brachylog. Maybe that?
I have no idea about any of them, though
I've just tried to set up a feed from PPCG. We'll see if it works
 
> Brachylog is a declarative golfing language based on SWI-Prolog.
Yaaay!
created by Fatalize
 
9:24 PM
So Fatalize is JCumin?
Are you into Prolog, @beaker? How would you describe the language in few words?
 
yes, according to his profile
@LuisMendo I haven't played with it in a while, but it's pretty interesting
you generate facts and rules that make up the program, then you run it to make logical inferences
as a tiny example, say you know x is true and x implies y
then you can ask the program what the value of y is and it will tell you true
 
Aaah. Nice! So not an imperative language I guess @beaker
 
no, it's almost exclusively recursion
 
Aah :-)
"To iterate is human. To recurse, divine"
 
nearly every program of any size processes H|T... it takes the first element (the head) of the input and processes it, and passes the remainder (the tail) to itself recursively
 
9:31 PM
That sounds... weird. "Weird" as in "interesting"
 
yeah, it was pretty interesting for a change of pace
unfortunately I don't find it all that easy to pick up a program someone else has written and understand it, or debug it, or maintain it
although my professor maintained just the opposite: that it was easier to update and maintain
 
That's what they call "write-only languages" :-)
 
Job Security: Writing code nobody else can understand.
 
But that inevitably includes your future self :-D
 
unfortunately
 
9:47 PM
@David Relevant conversation with Isaacg about character encoding
in Pyth, 28 mins ago, by Luis Mendo
Hello, @isaacg. I'd like to ask you something. I guess at some point in the past you've considered changing Pyth's character encoding to reduce byte count (like other languages do). But if I'm correct you haven't done so. What's your opinion about that? Do you have plans to change encoding? I'm asking because I have some ideas for MATL, but I'd like to avoid changing all functions' names at this point
 
10:14 PM
@beaker Because no-one really can write long programs? :P
 
You'd be surprised. He had a startup that coded exclusively in Prolog. I have no idea how much business he had.
 
Wow
 
But that was before he became head of our CS department :)
 
Luis Mendo has stopped a feed from being posted into this room
Luis Mendo has made a change to the feeds posted into this room
 
Let's see if the feed works now...
@beaker Do you work in the university, if I may ask?
 
10:20 PM
no, he was head of the department when i was working on my master's
 
21
Q: How many steps does it take from n to 1 by subtracting the greatest divisor?

insertusernamehereInspired by this question over at Mathematics. The Problem Let n be a natural number ≥ 2. Take the biggest divisor of n – which is different from n itself – and subtract it from n. Repeat until you get 1. The Question How many steps does it take to reach 1 for a given number n ≥ 2. Det...

15
Q: Gasket Weaving - draw a Sierpiński knot

trichoplaxGiven an integer N >= 2, produce an image showing a Sierpiński knot of degree N. For example, here are knots of degree 2, 3, 4 and 5: Click on the images to view full size (the higher the degree the larger the image). Specification A Sierpiński knot of degree N is drawn using the vertic...

13
Q: Is the electric garage door open?

Digital TraumaMy electric garage door works like this: There is just one push button to control the door If the door is fully closed and I hit the button, the door starts to open. It takes 10 seconds to open fully If the door is fully open and I hit the button, the door starts to close. It takes 10 seconds...

3
Q: Rotation-safe Latin squares

Nathan MerrillA Latin square is a square that has no repeated symbols in either the X or Y columns. For example: ABCD DABC CDAB BCDA is one such square. Notice how every column and row contains a permutation of the same 4 letters. However, our Latin square has a problem: If I were to rotate the seco...

-1
Q: Are there any advanced stratego AI's out there?

Alexander AmeyeI was wondering if there are any advanced and playable Stratego AI's out there? also I don't rly know if this website is the right place to ask this..

 
11:23 PM
-1
Q: Greatest Divisor for Python

Vishok JI got introduced to Python a week ago, and so am new to the language, but was wondering if there was a simple way to find the greatest divisor of an integer in Python. I have figured out how to find the greatest common divisor, but am curious as to finding just the divisor. I apologize if this so...

 
@LuisMendo yep, I think we will need a meta answer before using it
 
11:53 PM
@David Isaacg suggested talking to a mod instead / before the meta question. I think he's right. I'll probably ask Dennis in a few days. First I want to investigate other languages that I think may be using something similar (TI-BASIC, Bubblegum)
 

« first day    last day (2915 days later) »