« first day (1811 days earlier)      last day (3017 days later) » 

9:00 PM
@LuisMendo A safe version would be great! Could you also exclude the > prompt in that version? I've removed it manually for now, since it looks a bit odd in non-interactive mode...
 
@Dennis It does, but for some bizarre reason, an int overflow doesn't get cast to long, it get cast to double. No, I have no idea why.
PS C:\Tools\Scripts\golfing>  $n=720;7..15|%{$n*=$_;"$_! -> $($n.GetType().Name)"}
7! -> Int32
8! -> Int32
9! -> Int32
10! -> Int32
11! -> Int32
12! -> Int32
13! -> Double
14! -> Double
15! -> Double
 
I think this is an accurate portrayal of my thoughts on this. The community is the guy talking and SO is the other one. — Alex A. 11 secs ago
 
@LuisMendo Precisely because of the lack of sandboxing, I'm pulling manually for now, as completely benign, new language features could pose security problems for my web server.
 
@Dennis Sure, I'll remove the > prompt as well. I'm pretty new to GitHub. Is it better to create a branch, or a new repo for that?
 
@LuisMendo a branch
 
9:03 PM
@zyabin101 Thanks
 
@LuisMendo If you have to modify only one file, I'd create a matl-safe.m or something. Otherwise, a branch.
 
@Dennis Ok. I'll see what's best
 
@Dennis Ninja'd
 
@Dennis "Pulling manually" means I should ping you when I update version?
 
@MartinBüttner I don't need any promotion, I just thought that they all had to do very specifically with a grade-school subject
 
9:05 PM
I suppose I could cast it as [long] before output and ignore the .ToString('G17')
 
@LuisMendo For now, yes please. Automatic updates are definitely planned though.
 
But then, that would trim off the .5 at the end. Hrm.
 
@Dennis That's perfect. I'll try not to ping you too often. I tend to update very few days, as the language is evolving
@Dennis Some MATL functions require certain Octave packages: images, io, statistics. Maybe some other. Is it possible for you to install them in Octave? Also, are you using Octave 4.0.0?
 
@LuisMendo Don't worry, I spend a lot of time here anyway, and pulling and update is just one command.
 
Anonymous
> I spend a lot of time here anyway
 
Anonymous
9:10 PM
Understatement of the century
3
 
^
 
@LuisMendo Yes, I installed 4.0.0. I'll install the extra packages if you give me a list.
 
@Mego :-D I was going to say the same. But you put it better :-)
@Dennis I'm amazed at how easy you make everything. I'm really happy to have MATL online
 
Damn, I was a minute late!
@Dennis see above
 
@Dennis These are the packages I've identified as necessary for now
Package Name  | Version | Installation directory
--------------+---------+-----------------------
       image  |   2.4.1 | C:\Octave\Octave-4.0.0\share\octave\packages\image-2.4.1
          io *|   2.4.0 | C:\Octave\Octave-4.0.0\share\octave\packages\io-2.4.0
  statistics *|   1.2.4 | C:\Octave\Octave-4.0.0\share\octave\packages\statistics-1.2.4
 
9:12 PM
Oh by the way, @Dennis, do you have some sort of protection against excessive memory usage?
Like if someone tries to calculate 100^(100^100).
 
@El'endiaStarman I think he has things on a timeout, so if computing that takes too long then it will be killed anyway.
 
Anonymous
Senpai still hasn't noticed us Q_Q
 
Anonymous
32
Q: Hey Stack Exchange, how are we doing?

Alex A.The last time we heard from a Stack Exchange community manager was in March of 2014, when Grace Note came to talk to us about the progress we've made as a site. That was back when code-trolling was a thing, and the community's response to the news wasn't particularly positive given how code troll...

 
@AlexA. Memory usage can shoot up incredibly fast.
 
9:16 PM
@El'endiaStarman don't worry, there's always WolframAlpha.
 
@Mego I don't expect it to happen for quite some time, honestly. It's been over a month since we had near unanimous support increasing reputation given for question upvotes and we still have no indication from senpai about that.
 
@Dennis should I just remove that requirement then? I was hoping to see creative ways around it, but if it is actually that hard to come up with such ways it isn't worth it
 
@LuisMendo I'm having some dependency problems, as Octave 4.0.0 wasn't in the main repo. I'll install those packages later today.
 
@Dennis Yes, I noticed the online compiler is not working. I assumed you were doing something
 
@zyabin101 I'm talking about Dennis' Try It Online site.
 
9:19 PM
Hey, I forgot the Kappa! I'm on mobile!
 
He's taking good security precautions regarding file I/O and the like, but I still know of a way to cause him/his server problems: calculate huge numbers.
Particularly with Python.
 
@El'endiaStarman There's a 60 second time limit.
 
@Dennis That's true of mine as well, and I still ended up using twice the memory allocated to me.
For the Bernoulli numbers problem.
 
use as much memory as you can in 60 seconds
 
@Dennis It feels that Ackermann could run into memory limits long before 60 seconds are up
@undergroundmonorail
 
9:22 PM
@Mego Perhaps ping some of the admins?
@ping @pong
 
@LuisMendo Is that because of the missing packages? I might have been doing something wrong with the Bash wrapper.
@TimmyD There's no swap, so the OOM killer deals with them rather quickly.
 
Snails is a good language for using all the memory quickly.
 
haha
 
Empty input and the program ~, will use something like 10^11 bytes
 
9:23 PM
@quintopia I think the challenge is better without the requirement. It makes it really hard on languages with 64-bit integers.
 
@flawr I tried that with the reputation proposal. Basically they just tell us to be patient. :P
 
@undergroundmonorail the first clip i linked was inexplicably missing the last bit
 
@AlexA. And now?
@AlexA. Are we there yet?
@AlexA. How long?
 
Maybe they'll get back to us after we graduate, 800 years from now.
 
@AlexA. I need to pee!
 
9:26 PM
...then you should go?
 
@flawr Well, I feel for ya, pal, but I'm not really sure how I can help.
 
@Dennis No, it's not the packages. It fails with a simple + program (add the two inputs). After some warnings, it gives error: writing file '/var/www/.octave_hist': Permission denied
 
Quick question: How do you guys pronounce ":P"?
 
I don't.
 
I don't
o so ninjo'd
 
9:28 PM
Also, @Dennis, even though you don't know PowerShell, I hope my explanation is follow-able?
 
@RikerW As the "h" in "honest"
 
@RikerW /p/
 
lol
 
I am tagged in a removed message.
ಠ_ಠ
 
9:29 PM
There's no sound associated with ":P", just a feeling that is..."small", or "contained" in much the same way that a word's sound is.
 
XD eggs-deeh
 
I always think of it as pronounced "P". IDK why.
 
@flawr what is the problem
 
@LuisMendo Yes, that's a simple permission error. What files does it need write access to?
 
@RikerW COLON LATIN CAPITAL LETTER P
 
9:33 PM
@geokavel I don't know. The topics seem fairly unrelated and the challenges don't seem much more educational than any other challenge with some mathematical background.
@El'endiaStarman wat
 
@Dennis It needs to write to MATLc.m, which is compiled file that gets executed by Octave. It also writes to MATLp.txt (parsed program, text file), although that can be removed for the online version if you prefer. And it writes all input and output to defout(text file). Again, I can remove that. Only the compiled file MATLc.m is really needed
 
@Dennis also Octave needs to write the .octave_hist in your website's folder
 
@LuisMendo It can write to all files in the current directory (which is created in /tmp for each submission). I've created /var/www/.octave_hist and gave write access as well.
 
@RikerW By sticking my tongue out.
 
hello
(from the other siiiide!)
 
9:43 PM
@Dennis Ok. All MATL writes is within its directory
 
@LuisMendo Is addition still not working? Could you give me a link?
 
@Dennis It works. But I'm seeing [1 2]t+ gives error. I think it's because of how Octave parses strings. In Octave, matl [1 2]t+ fails; you need to make it a string explicitly: matl '[1 2]t+'. And of course any quotes would have to be duplicated. Perhaps it would be easier to have the online compiler read a file with the code? matl -f filename, where filename contains the normal code
'[1 2]t+' works correctly. It's the string thing
 
If objects are nouns and functions are verbs, what are adjectives?
 
@LuisMendo That's probably my wrapper's fault then. I'm currently using this:
#!/bin/bash

export LANG=en_US.UTF8

code="$(<$1)"
shift

octave --path /opt/MATL --eval "matl $code" "$@"
So, $code should be surrounded by quotes?
 
@El'endiaStarman Private variables?
 
9:52 PM
Why?
 
Because they represent properties of objects.
 
@El'endiaStarman Cast types?
 
@TimmyD Yeah, interfaces are a possibility too.
 
@Dennis Would that automatically duplicate quotes? For example, 3'a'+ should become '3''a'''+, not just '3'a'+'
 
9:54 PM
Those do make sense if/when you consider adjectives to be descriptors.
But in natural human languages, adjectives do more than just describe. They can change the meaning of sentences by their presence or lack thereof.
 
You could also consider destructive functions as verbs, and non-destructive ones as adjectives.
 
@LuisMendo Oh, no it wouldn't. I'll have to add that. Is reading from a file possible right now or would that have to be added?
 
@El'endiaStarman At least in PowerShell, $String + $Int is very different than $Int + $Int, so they change the meaning of sentences here, too.
 
hmm, true
 
@Dennis Right now. Just use the command matl -f filename (i.e. add the -f)
 
9:57 PM
@Zgarb Yeah, that could work. I had been thinking of verbs as more like actions. They do a thing.
Adjectives are descriptors, but in a sense, they can be modifiers too. An adjective applied to a verb is an adverb. "Run quickly" is different from "run slowly".
 
Have you read the docs of J? They use grammatical terms to describe programs.
 
It's horrendous
Also have you seen the source code for J? It's the stuff of nightmares.
 
@AlexA. I haven't. Where is that?
 
It's available as a download from the J site. I'll see if I can find the link.
GPL 3
Unfortunately not hosted anywhere like GitHub. Probably because they don't want to give people nightmares. :P
 
Oh god. I will go cry in a hole now...
Did they try to golf that?
 
It's like o.c except bigger and scarier.
 
o.c?
 
@phase's language, O, has a golfed interpreter. The horrifying nature of o.c has become a running joke.
 
what's an efficient way to compute the determinant of an integer matrix efficiently and exactly?
using any library you like :)
 
Okay, that is even worse...
 
10:10 PM
@Lembik Julia, 3 bytes: det
 
@AlexA. is that exact even if the determinant is large?
 
¯\_(ツ)_/¯
 
In linear algebra, the determinant is a useful value that can be computed from the elements of a square matrix. The determinant of a matrix A is denoted det(A), det A, or |A|. In the case of a 2 × 2 matrix, the specific formula for the determinant is simply the upper left element times the lower right element, minus the product of the other two elements. Similarly, suppose we have a 3 × 3 matrix A, and we want the specific formula for its determinant |A|: Each determinant of a 2 × 2 matrix in this equation is called a "minor" of the matrix A. The same sort of procedure can be used to find...
 
@AlexA. I'm pretty sure that uses floats.
 
...it looks like they wanted to write the interpreter in J, did a million #defines, and got quite close in terms of how the code looks.
 
10:11 PM
@Lembik What language?
 
@Zgarb Haha yep, sounds about right. :P
 
"Linear algebra functions in Julia are largely implemented by calling functions from LAPACK."
it will be floating point
@flawr my preference is python but I can be flexible
 
What format are the matrices in?
 
@flawr I am creating them myself but they start as 2d numpy arrays
 
(And how big?)
 
10:12 PM
This furthers my theory that @Lembik is actually a mathematician who outsources research to PPCG.
 
@flawr up to 22 by 22
 
I wrote a naive implementation of determinant in Python for Minkolang.
 
BTW, anybody remember that website about clearing your cache?
 
@AlexA. :) how successful do you think my math career would be if that were true ??
 
@Lembik ...doesn't numpy have a determinant function?
 
10:13 PM
It was like a meme that clearing your cache would always work.
 
numpy = floats
 
I can't imagine that they wouldn't.
 
@El'endiaStarman Probably uses floats
 
ahhh, right, okay
 
@El'endiaStarman yes.. it is floating point and I am worried about rounding errors for large determinant
 
10:13 PM
@Lembik What kind of integers, if there are no 'symmetries' or stuff you could use, you can only do the naive approach
 
@flawr they are +-1 in the matrix
 
Oh then the floating point arithmetic should not be too bad
 
Oh wow, a +/- 1-filled matrix should have a trick of some kind for calculating determinant.
 
I think doing Gauss elimination, and recording row operations used, gets it done in the optimal complexity
 
as the determinant is a homogenuous polynomial in it's coefficients
 
10:14 PM
@Lembik Depends on how good the answers you get here are ;)
 
@El'endiaStarman that would be great!
 
Not sure if that adds overhead compared to a specialized determinant implementaiton
 
@Lembik Disclaimer: I have no idea what it is.
 
@feersum ah ok.. Am trying sympy which is exact but it is dog slow
 
Yeah, SymPy is a beast
 
10:15 PM
^
But useful sometimes....
 
@feersum that's interesting! My main concern is that the determinant could be big which I think means rounding errors are inevitable in floats
 
hmm probably does add overhead since it requires division
 
Sage might be a little better than SymPy.
 
@Lembik Nope, as I said.
As long as you stay under 22 float shoudl be enough
 
@flawr ok cool! int(round(np.linalg.det(A))) it is :)
@AlexA. isn't sage just a wrapper?
 
10:17 PM
What do you need it for?
Orthogonal matrices?
 
@flawr I am counting distinct absolute values of determinants for circulant matrices :)
 
@Lembik No, AFAIK Sage is a separate entity, though it does draw from a lot of existing Python stuff.
 
@AlexA. oh.. I didn't know it actually had different implementations of routines that already exist in the python standard libraries (by which I mean the extended family of libraries)
 
There ought to be a shortcut for circulant matrices
 
10:18 PM
@LuisMendo OK, I switched to matl -f.
 
@Lembik It might not but my impression was that it did for many things.
 
@AlexA. ok
maybe that is a SO question in itself :)
@feersum yes!
but that is too much math for me to grok properly
@feersum well I can just about parse so it might be interesting to implement actually.. although to make it exact I think you would need to do something clever
maybe a good codegolf question in fact!
 
Woah, big monologue... :P
 
@Lembik Sorry, some wrong thoughts....
In mathematics, Hadamard's inequality, first published by Jacques Hadamard in 1893, is a bound on the determinant of a matrix whose entries are complex numbers in terms of the lengths of its column vectors. In geometrical terms, when restricted to real numbers, it bounds the volume in Euclidean space of n dimensions marked out by n vectors vi for 1 ≤ i ≤ n in terms of the lengths of these vectors ||vi||. Specifically, Hadamard's inequality states that if N is the matrix having columns vi, then and equality is achieved if and only if the vectors are orthogonal or at least one of the columns is...
So the determinant of an nxn matrix with entries in {1,-1} is at most n^(n/2)
sqrt(n^n)
quite bad.
 
yes
it is exactly n^{n/2} if the matrix is orthogonal
 
10:24 PM
@LuisMendo image was in the repos. I had to install io and statictics from the Forge.
 
I better go but.. please someone submit a fast answer to codegolf.stackexchange.com/questions/69154/… :)
so I don't feel too humiliated
 
@LuisMendo Code with single quotes seems to work now. matl.tryitonline.net/…
 
Why is it suddenly important to turn off UseRoaming in SSH config
 
@Dennis Yeah, sorry. I don't use Octave often, so I don't know where stuff really is
@Dennis Yup! Just tried. Amazing!
I'm finishing the safe mode
I removed all file-read functions and the input prompts
 
Great.
 
10:31 PM
I did it in the same files, to keep things centralized. You'll have to add an o switch for online mode. So: matl -of filename. I'll push it to GitHub after I've tested some more @Dennis
 
@Lembik The "associated polynomial" of a circulant matrix C is f(x) = c0 + c1*x + c2*x^2 + ... + c{n-1}*x^(n-1). w_j = exp(2*pi*i*j/n) are the nth roots of unity. The determinant is \prod( f(w_j), j=0 to n-1).
 
@LuisMendo That's probably the easiest option. Please let me know when I can pull the update.
@TimmyD It is, but there's always the possibility that I misunderstood something.
139 downvotes on the Meta post... Wow!
 
The MIT one?
 
Yup.
 
What's the +/- breakdown?
 
10:41 PM
+60/-139
 
Nice!
 
I get why they'd want to release code in answers under the MIT license, but in questions?
 
There's still a weird fragmentation between the license for code versus other content in a post. If someone explains an algorithm in words, is that CC-BY-SA or is that the weird, new kind-of-MIT-kind-of-not license?
 
IDK.
 
I don't think anyone knows.
They haven't made anything clearer on what constitutes "code" for the purpose of licensing.
 
10:45 PM
Yeah.
Lets make the @AlexA. license!!
It has to be golfed, and possibly wrong.
 
The Alex A. license would be CC-BY-SA. I don't understand the need for them to change the licensing.
 
Attribution is required.
@AlexA. Agreed.
Maybe OCDness?
 
They were claiming that they're doing it for the users and that it's a hassle on their end, but if it's a hassle for them and there was pretty clear opposition, why are they going forward with it rather than reevaluating?
</rant>
 
Herro
 
Herrrrring
 
10:49 PM
@AlexA. If you can't use common sense to figure out what constitutes code, then I don't think any amount of explanation from Stack Exchange representatives is going to help you.
 
@AlexA. I have no clue...
@Rainbolt rofl
 
Licensing we're talking?
 
yes
 
Yes.
ninjaed
 
Quick question, does anyone know if you can connect to this chat via IRC?
 
10:50 PM
@CameronAavik Probably not.
 
No.
 
I am at least clearer on when I have to attribute. As of March 1, I need to put a link in a comment in my code when I use code from Stack Exchange. Not something I knew yesterday, and pretty simple to follow.
 
hmm, alright
 
I mean IDK.
 
@Dennis I tested the ZP (pdist2) function, which requires the Statistics package, and it gives the error 'pdist2' undefined near line 149 column 9. Did you load the packages? pkg load statistics etc
 
10:51 PM
71
Q: IRC access for the chat?

jszWill there be any way of accessing the chat over IRC? As beautiful ajax interfaces are ... IRC is still #1 for chats.

 
Well, if y'all speak licenses - Shog's answer cuts it:
10
A: A New Code License: The MIT, this time with Attribution Required

Shog9Meta meta-Meta For a post that was intended primarily to address one of the concerns raised (repeatedly) in the previous discussion, this sure has kicked up a lot of dust. I got to talking with a few people in chat earlier, and they... Kinda seemed surprised by a few things that I thought were o...

-_-
 
484
A: The MIT License – Clarity on Using Code on Stack Overflow and Stack Exchange

200_successIn essence, this proposal is to move from a copyleft license (CC-BY-SA 3.0) to a permissive license for code. (By default, it's basically the most permissive license possible, nearly equivalent to public domain with a liability disclaimer.) Having thought about it for a couple of hours, I've sh...

 
Alright, seems like you can't
 
Since I'm an awesome spammer... Here's mine:
0
A: A New Code License: The MIT, this time with Attribution Required

Zizouz212Let me break this down, because it appears no one is: What does the “Stack Exchange license” do? It allows you to use code for any purpose, good, evil, and commercial, under these conditions: You provide attribution to the author By using the code, you agree not to hold the author liable for a...

 
@LuisMendo No, I didn't. Do I have to do that just once or every time MATL is executed? (complete Octave noob here)
 
10:55 PM
Another question, I'm part of a club at my university with ~200 people and we thought it would be cool to set up our own weekly codegolf challenge with a running leaderboard over the year. Any suggestions on how to set that up? Specifically for setting up the leaderboard
I could just make a web app for it, but maybe a service already exists which simplifies that
 
@Rainbolt (That was rude. :() I know what code is but it doesn't matter what I think code is because they're the ones setting the license for code with a different license for non-code. So what matters is what they consider code and what they don't, because that makes a difference with how things are licensed.
@CameronAavik Host it here! :D
 
^
 
I think we'd go with just our site since we want it to be a competition between people in the club rather than the general public
so we can give away prizes and stuff
 
I think there used to be a biweekly challenge...
 
@AlexA. Personally, I feel like just license the entire post under two licenses. People who are sane will choose whichever fits best (code will go under the code license, and all else under CC BY-SA). If they don't, then they probably have no moral sense of justice, and won't even care about licensing
Good point: Licensing does not prevent careless or malicious use. I'm surprised about how many people are thinking that this license will let them steal their code, because it's already happening right now. I don't want to sound pessimistic, but when thousands of people break a license/law/contract, it's a bit of a lost cause. You're not significantly damaged in a direct way, so honestly, let it go... — Zizouz212 12 mins ago
 
10:58 PM
@AlexA. But it does matter what you think code is. From the post: "But ultimately, identifying code will be a judgement call on your part. We have full faith in your ability to do this."
 
Plus @Doorknob's bidiurnal challenge.
 
... All I want is to make sure that no one can come up to me if something of mine screwed something on there side. Aside from that, I don't care about people who don't attribute me: chances are, they have no moral sanity, and I will appreciate the people who do, and help me out. As it is, I'm 16, I share what I know with a good heart, and in a well-spirited manner, and at the end of the day, knowing that I was able to help someone out makes my day. — Zizouz212 10 mins ago
 
@RikerW there was, but nobody liked it
 
@Dennis I'm not sure, because I mainly use Matlab, and only recently did I get into Octave. But from what I've already tried, it seems you need to load the packages when Octave is started. They seem to remain loaded. Apparently you can install the packages with the -auto flag so they are automatically loaded when Octave is started. I think that's the best option. I'll try if it works and let you know
 
@Doorknob Why?
 

« first day (1811 days earlier)      last day (3017 days later) »