« first day (1457 days earlier)      last day (3383 days later) » 
08:00 - 17:0017:00 - 00:00

8:01 AM
Does anyone know why the questions page says there are 2884 questions but this SE data explorer query only returns 2557? I know the data explorer only updates once a day but there's no way its 300 off.
 
8:44 AM
@Calvin'sHobbies Closed questions?
If you sort by votes the lowest on the questions page is -14, but it's -11 for the query
 
8:56 AM
@Sp3000 Thanks, that's it. Without AND ClosedDate IS NULL 2896 are returned. Presumably those few extras were recently deleted.
 
9:10 AM
@MartinBüttner Congrats on 30k. imgur.com/haZFMd2
8
 
9:34 AM
@Optimizer :/
feel free to include the other one as well... there's no point posting it if it ties anway
@bitpwner thanks :)
 
Martin needs to invent a version of CJam that's not CJam so he can use it as an alternative language if questions are posted when he's asleep
 
@Calvin'sHobbies those extra few are locked
@Sp3000 as I said yesterday... I should create a Prelude/CJam hybrid
 
:D
If you're doing that maybe I should turn ><> into a golfing language, hmm...
 
that would be pretty crazy
 
New quotes rule: If a string is created using the same quote char to start/end the string, the quote char itself is pushed onto the stack as well
And an instruction to actually read in numbers
 
9:44 AM
@Sp3000 how is that useful?
 
Saves 3 bytes for quine challenges
 
oh right... when you've only got one quote, you only need one quote in the string.
 
Yeah :) and I can't think of any other situation where you would legitimately want to only use one quote char for a string
 
@MartinBüttner what other one ?
 
the :/ is a link
 
9:52 AM
lol , didn't realize :D
oh, didn't see at all!
going for words within words within ...
 
@Optimizer yeah I'm trying that as well ^^
 
Hmm does anyone here know if there's any progress with the MathJax thing? (Or is Doorknob the only one?)
 
@Sp3000 if anyone knows, it's @Doorknob
 
Ah k, hmm
 
9:56 AM
so I am also Doorknob if I come to know ?
@Calvin'sHobbies BTW, the snippet does not work for me.
its all on the same line...
 
10:21 AM
@Optimizer What browser are you using?
 
Fx 38
 
10:35 AM
@Optimizer Not sure what's going on. It works for me in Firefox but I can't get it to work in IE with any line separator...it does work in chrome though.
 
@Optimizer I've given you something to beat. hf ;)
 
@MartinBüttner starting now only :|
 
10:51 AM
shouldn't be hard to beat, I barely golfed it.
 
I am going with a different approach
using the characters instead of that black brick
so my output would be 1 level smaller than urs
 
hi
I just posed this question on math.se math.stackexchange.com/questions/1118700/… . If we extend it to ask for the number of different reachable orientations I suspect strongly there is no closed form
would it make an acceptable PPCG code-challenge?
 
Is the sequence on OEIS?
(out of curiosity)
 
@MartinBüttner -
R   E  DUC  T     IONIS  MRED U   C
R   E D   U C       T   I     ON IS
REDUC T   I O       N    ISM  R E D
R   E D   U C       T       I O   N
R   E  DUC  TIONI SMRED UCTI  O   N
 
@Sp3000 I don't know how to compute it yet :)
@Sp3000 so it's hard to tell :)
 
11:03 AM
@Calvin'sHobbies Is that correct output for HOLISM REDUCTIONISM input ?
 
I just hope there isn't a really nice recurrence relation posted on OEIS for it, that's all ;)
 
@Sp3000 hopefully math.se will tell me if there is.. I think making it reachable makes the problem much more mysteriuos though
at least that is my gut feeling :)
 
Calculating N=5 atm
 
cool!
@Sp3000 I added a sandbox question.. mostly because I ahve to leave the house for bit :)
 
kk
 
11:05 AM
@Optimizer No actually. Actual letter characters aren't supposed to be used, only the full blocks (or X). Martin has it right.
 
what about the first answer ?
 
@Sp3000 make sure the snake doesn't bump into itself when it rotates :)
 
I've got 7 so far
 
@Sp3000 I shuold really draw a picture showing what a rotation does
 
0
A: Sandbox for Proposed Challenges

LembikThe number of reachable snake orientations Imagine a 2d snake formed by sticking n identical squares horizontally in a line. This snake can rotate any part of its body by 90 degree. By doing repeated rotations it can make a lot of different snake body shapes. rules One part of the snake's...

 
11:06 AM
@Sp3000 I think it's all quite different with large n as parts of the snake can be nested in other parts...but you have to get there somehow
 
@Optimizer grc has it right too
 
@Calvin'sHobbies what if his input as three words ?
 
hmm
 
That's polyominoes though :/
 
@Sp3000 yes.. I don't really understand the difference as I don't really know what a polyomino is
if you coudl tell me the difference I could reply to the comment on math.se :)
 
11:08 AM
Well a polyomino is just N unit squares connected edge to edge
You know the tetris T block? That's a polyomino, but you can't snake that
 
@Sp3000 ah ok.. so there will be many shapes you can't make with a snake
thanks
 
Alternatively, there's also many snakes you can make which would map to the same polyomino shape
Just by bending differently
 
got you
I didn't specify but I think I regard two snakes that cover the same squares as the same shape
 
... oh so same shape counts as the same thing?
... that changes my results a bit :D
Oops
 
@Sp3000 yes!
sorry.. I was unclear on that
@So
@Sp3000 how are you checking for collisions during rotation?
 
11:12 AM
@Optimizer His was input was 3 words, DOG, CAT, and MOUSE. The MOUSEs are made of full blocks.
 
@Lembik No worries, I just misinterpreted your post (it does say in there now that I read properly!)
 
grc
my screenshot was taken with a ~1 pixel font btw
 
Doing by hand :P
 
@Sp3000 :)
 
Well if it's same shape counts as same, then polyominoes form an upper bound at least
 
11:14 AM
@Sp3000 yes... but maybe a very loose one
 
I get the feeling the OEIS polyominoes doesn't count reflections
 
it certainly doesn't worry about reachability as well
 
@Calvin'sHobbies @grc Ah, I see the terminal input now ..
well, that reduces a lot of code for me ..
 
@Optimizer Right. For the record here's a pastebin of what the snippet produces when run with the preset params. I believe it's exactly what grc's program prints.
 
@Sp3000 a 3d version could be fun for a fortnightly challenge :)
@Sp3000 especially if someone made a visualisation
 
11:18 AM
Heh
 
@Sp3000 although it would be more fun if there were a target shape and you had to minimize the number of rotations to get there
maybe a swan :)
 
grc
@Calvin'sHobbies hmm I think I messed up with the empty-space rules
are (non-leading and non-trailing) rows that only contain empty-space characters allowed?
 
@grc Yes, in fact they're usually required since theres a 1 unit space between characters at any scale.
 
@Lembik Man, there are some really funky snakes for N=6
 
11:43 AM
@Sp3000 :) maybe I should have called the question "The funky snake"
 
@Lembik aren't you just looking for the polyominoes for which a Hamiltonian path through their tiles exists?
 
:)
@MartinBüttner sorry got to dash,..back later
 
@MartinBüttner Basically, that's my understanding of it too :P
Can you do Filter[HasHamiltonianPath,Polyominoes[6]] in Mathematica? If so that'd be much more awesome than pen and paper :P
 
I don't think Mathematica can generate polyominoes, but if it does, it shouldn't be hard to form a graph from then, and then there is a built-in for the hamiltonian path
 
Wow, there's a Mathematica journal?
 
12:08 PM
@Lembik So I wrote a hacky program and it says 1,1,2,4,8,18,46,115 for N=1 to 8. If that's anything to be trusted, then it doesn't match anything in the OEIS
It's probably more likely that I have a bug somewhere :P
@MartinBüttner How good is Mathematica with Hamiltonian'ing 100k nodes? Cos you could kill this question pretty easily
Actually it's probably easier looking at Eulerian paths
 
12:39 PM
how would Eulerian paths help?
I guess it'll depend on how many edges there are
 
Make each 3 char group a vertex, and each word an edge
So there'll be 100k edges for 100k words
 
ah that makes sense
 
Not a big fan of "earliest answer wins" :P
 
as a tie breaker it sort of makes sense... provided it's not trivial to solve the question optimally
 
Yeah... (I might be jumping the gun with the thinking-that-it's-trivial part, but I'm assuming that Mathematica can handle 100k edges)
 
12:44 PM
as far as I can tell, there's no built-in to find the largest eulerian path of a subgraph. it can only find complete eulerian cycles
:( ... the polyomino article you sent me... all the code is images ... I can't be bothered to type it up
 
D: damn
Well I took the complex numbers representation idea for my program, which is pretty neat for checking rotations
 
does the eigensystem sandbox post look good to go?
 
You say builtin functions for solving eigensystems are disallowed
What about builtins for the quadratic formula?
 
"or general equation solvers."
let me know if I can rephrase that more clearly
@Sp3000 I think we're misunderstanding what Lembik meant with rotations
 
Yeah I get what you mean, but I was wondering whether restricting to degree 2 made it not general
 
12:50 PM
I think the snake must not overlap after every single rotation.
@Sp3000 ah I see... I'll just remove "general" then
 
@MartinBüttner I meant rotations of the whole shape, along with reflections and translations
 
I know
that's not what I'm talking about
I mean when folding the snake
so there are even fewer polyominoes than those which have a hamiltonian path
(I think)
 
Not sure how that makes a difference...
If it's a Hamiltonian path then each vertex is visited once, so there's no overlap, right?
 
at the end, yes
but can you get there with single folds? (not overlapping after each fold)
 
... oh
 
12:54 PM
0
Q: Solve a 2x2 Eigensystem

Martin BüttnerFor those with a little linear algebra background, the challenge is as simple as this: determine the eigenvalues and eigenvectors of a given complex 2x2 matrix. You may skip ahead to The Challenge for I/O details, etc. For those who need a little refresher on eigensystems, read on. Background T...

 
I'm trying to think of an example... like a 3x3 square spiral has to be folded from inside out, and not outside in
 
yes, can you get the ends into two interlocking spirals?
 
###########
#         #
# ### ### #
#   # #   #
##### #####
Like that?
(extra spacing for clarity, this is meant to be a 6x3 rectangle)
 
similar. I think this one works, if you start making folds from both ends
#########
#       #
####### #
      # #
##### # #
#   # # #
# # # # #
# #   # #
# ##### #
#       #
#########
although even this works if you don't check for collision during the rotation but only after it's snapped into place
 
@Lembik Scrap the last integer sequence, this problem is about 10 notches harder than I thought
 
1:09 PM
what question ?
@MartinBüttner posted mine ;)
 
@MartinBüttner what question is this
 
Ahaha nice screenshot
 
@Optimizer nice. I don't think I can be bothered to golf mine further, although there's certainly room for improvement.
 
@MartinBüttner btw for eigensystems, do you mention that eigenvectors are nonzero?
 
1:18 PM
@Optimizer okay, I golfed it a little
@Sp3000 I require them to be normalised
 
Ah, I see
 
1:40 PM
okay, I think the jigsaw puzzle challenge is good to go, although I'll probably need to tweak the snippet a bit once it's posted and I can test properly.
I'll probably post it some time tomorrow.
 
@MartinBüttner Well, me too
 
:D I thought you might
 
Although, what I want is to compress that encoded string ...
which is not happening
 
I'm not sure there's much you can do except maybe run-length encoding
 
time for chores, after which I'll take on eigen values
 
1:49 PM
plug for a feature request on meta... not sure how much the other sites would benefit from it, but I think PPCG definitely would:
0
Q: Button to minify Stack Snippets

Martin BüttnerI'm not sure of how much use this would be on other SEs, but on CodeGolf.SE, we use Stack Snippets more often to actually provide useful functionality, than to show that some code of interest is actually working. In that case, no one wants to look at that huge wall of code, all you want is the s...

 
Come to think of it, I've never had to normalise a complex vector before...
 
it's not all that different, but that reminds me that my definition is missing some vertical bar.
 
I think so, I'm not getting the right results for the 4th case
 
basically you need to multiply the components by their complex conjugate, not by themselves
@Sp3000 remember though that the results are only determined up to an arbitrary phase
 
So I should check manually then? k (I've never dealt with complex eigenvectors before, because maths education always likes to give you nice numbers for all problems, unless it's analysis)
 
1:58 PM
yeah, it's hard to provide test cases for problems with non-unique solutions ;)
 
grc
@MartinBüttner what about an option to hide the snippet's code by default?
 
@grc you mean hiding the code and the snippet separately?
 
grc
yes
 
sounds good, I'll add that
 
grc
you could have a third option: hide: false | true | code-only
 
2:24 PM
I managed to post a competitive code golf answer with Prelude:
1
A: Fibonacci function or sequence

Martin BüttnerPrelude, 12 bytes One of the few problems, where Prelude is actually fairly competitive: 1(v!v) ^+^ This requires the Python interpreter which prints values as decimal numbers instead of characters. Explanation In Prelude, all lines are executed in parallel, with the instruction pointer t...

 
2:35 PM
Can't wait for jigsaw to start
 
sorry, can't post another one today :P
 
Here's a pre-emptive Jigsaw Bingo: 1 point for every line that starts with /*, //, <<, {-, <!--, # or """
 
:D
you forgot #
and lines that start with something matching \[=*\[
 
And -1 point for every p, put, print, echo, or alert that's stuck with something and now nobody can use it any more
 
2:39 PM
I mean, are you expecting most people to give programs like print ( 5 * 2 + 1 )? :P
 
probably, at least until we get to esoteric languages
 
:D
 
I'm looking forward to the golfscript answer that just adds 5} and doesn't give a f*ck about the rest of the board
 
Pyth wouldn't even need the } :P
 
oh right, only the first line is executed, heh
 
2:42 PM
Bingo checklist 2: +10 points if you are Martin and the language is Prelude
 
lol, yes, I'm definitely going for that
 
let me just post an answer in foobar12345 language and not leave a single link behind -_-
everyone probably knows about it already . right ?
 
Note to self: Don't work on a CJam-like golfing language because we seem to be getting 3 more of those
 
KSFT just created a language (probably) 10 minutes back and it supposed just a single unicode based code character biased from the question in which he just posted the answer :D
creates OptimizerGolf which a single character to solve words within words within words challenge
 
Copy this pastebin into a markdown editor like dillinger.io. This was potentially going to be part of a contest but SE has 30k character limits and it might be considered spamming the dummyimage site...
 
2:56 PM
Oh wow, colourful
 
you forgot to mention 1 step:
wait for eternity while your browser stops responding and finally crash
 
lol, sorry
 
i tried in firefox, chrome, IE
its crashing in all
 
Works in Chrome for me, but there's this moment when the images are loading and it looks like pixels crawling from the left of the screen trying to find their respective spots
 
@Sp3000 Same here. It's a nifty effect.
 
3:02 PM
it also brought down my modem. Chrome could not even connect to internet now
ok markable is able to render it correctly without hanging'
 
Now I feel bad. I should have mentioned it needed to load over 1000 images. :/
 
3:22 PM
0
A: Sandbox for Proposed Challenges

Sp3000(I'm still waiting on MathJax for this one, so no title/nifty backstory yet and only a very rough writeup) The challenge will be: Calculate the two-sample Kolmogorov-Smirnov statistic for two integer arrays. Given an array A and a real number x, define the distribution function F by F(A,x) = (...

 
@MartinBüttner So, Prelude-CJam (PreJam?). What would be good? (I've got time to kill)
 
PJam ?
 
Hmm turning Prelude into a golfing language would have the same problem as turning ><> into a golfing language - many programs have a lot of spaces
 
3:37 PM
@Sp3000 Big Band
 
?
 
4:04 PM
4
Q: Are vimgolf questions on topic on vi/vim?

mixedmathWould asking vimgolf style questions be on topic on vi/vim? This is a type of question that is poorly suited for SO and most of the other SE sites. While it is conceivable that such a question would be suited to CodeGolf.SE, they only have two vimgolf questions there. It also does not feel clear ...

Hey, so what would we think about Vim golf questions?
 
@Sp3000 That's the unofficial working title. ("unofficial" == "in my head")
@Doorknob we've had them before, I see no reason for not having them again
 
Or, in general, editor-golf
 
Ahaha I see :)
Well here's String to Binary in Golfish: iF;t:2%48+$2,:?T~lO :D [/nonexistent languages]
 
@Calvin'sHobbies heh, I like how it grows while loading
@Sp3000 the main thing I'm worried about with Big Band is number literals
 
Oh... that is a problem
It's almost a trade-off between pushing multiple small numbers or pushing a large number
Unless you want to be CJam where all the small numbers have aliases so you don't have this problem
 
4:13 PM
well I guess, it's not that necessary... you've got literals for 0 to 9. you've got variables for 10 to 20. most larger numbers can either be obtained with a few characters of arithmetic (and are rarely needed), and for really big numbers you're going to base-encode them in a string anyway
alternatively, you could do something crazy that the meaning of a digit depends on whether the last command executed on that voice was also a digit. if not, it pushes the digit. if it was, the top of the stack is multiplied by 10 and the current digit is added
I wonder what messed up stuff you could do by jumping into the middle of such a literal
 
Oh hell I don't want to think about it :P
Well the problem I have with ><> is that to push something like space you need to do 48* to get 32. Unless you're doing the ' char syntax?
 
yeah I really like that about CJam
I think in general, I'd first try to get as many CJam features as possible in, which don't require multi-character syntax. then one could fix some Prelude things, like allowing implicit ( or ) at the beginning or end of the program
and last, I'd try to fix some things I don't like about CJam
the thing I'm wondering about most is whether you can get something like CJam's blocks into Prelude
 
With () would you need to?
 
blocks are pretty powerful
 
Oh, I guess for map/reduce
 
4:26 PM
recursion... quines... map...
I think blocks would at least have to include all lines
otherwise it's impossible to keep track of where the function pointer is
@Optimizer do you have combinatorial functions on your to-do list for CJam 2.0?
 
I don't have a compiled todo list yet.
but what do you mean ?
something like [...]3m* ?
 
getting all permutations, or the power set of an array would be nice
oh that would be neat too
 
after that, all perms would be something like _& only, no ?
 
you mean [...]_,m*_&?
 
yeah
 
4:30 PM
if you had a single (two-char) command that would save 4 bytes :P
 
power sets can get a single function though
@MartinBüttner what's the fun of it ? We are not planning to create a golfed version of Mathematica, are we ? :P
 
@Optimizer what's the fun of any built-in operations in CJam?
 
CJam really doesn't have that many.
as compared to Mathematica, or even Pyth(on)
 
well, Mathematica is ... different...
 
(You know, now that you bring up recursion... hmm I just had an idea)
 
4:33 PM
for?
one feature I'd like for a CJam-like language is to refer to a block up in the call stack
 
X$ ?
 
Thought it might be interesting if [ and ] did "Pop x, move one stack to the left, taking the top x elements with you" and ditto for right (for ><>)
I think that would allow for recursion?
 
@Optimizer yeah exactly. just not in the stack, but in the call stack.
 
what is a call stack here ?
 
this:
{+}
 ^

{{+}~}
    ^

{{{+}~}~}
       ^

{{{{+}~}~}~}
          ^

{{{{+}~}~}~}~
            ^
java.lang.RuntimeException: The stack is empty
 
4:35 PM
that would confuse people
since the stack can now change the call stack dynamically.
 
(actually Prelude might be able to do similar with multiple stacks, but I'm not sure if that'd get confusing)
 
@Optimizer that would be amazing
 
any use case you have in mind ?
 
it's possible anyway with string manipulation and eval
@Optimizer mutual recursion
and I think it would also save a byte or two for normal recursion
 
I mean , say, Xw can do that, any code example ?
 
4:38 PM
@Optimizer let me try something
okay, here is one of Hofstadter's mutually recursive functions: en.wikipedia.org/wiki/…
currently, you need {_g{_(MF-}*}:M;{_g{_(FM-(}*)}:F; if you only want F
then something like this would work {_g{_(2w{_g{_(2w4w-}*}-(}*)}
it would also save a byte for simple recursion
factorial:
5{_1>{_(F*}*}:F~
5{_1>{_(2w*}*}~
(yes, there are shorter non-recursive ways to implement factorial, this is only an example)
 
in the factorial example, I don't even have a call stack to refer to
 
whenever you use blocks, you have a call stack
 
so you want to get reference to the block two levels up and run it ?
btw, that would be 1w
 
ah yes
 
how would a quine look like ?
 
4:53 PM
I'd probably make w pull the current block if no integer is on the stack. then {w'~}~
wait
you'd need to decide if w pushes or executes the block
 
w will push and execute
 
then it's not useful for quines
 
I don't see a point in just pushing
for instance 5{_1>{_(2w~*}*}~ is same bytes
 
yeah
might be handy to have commands for both
 
{_g{_(2w~{_g{_(2w~4w~-}*}-(}*)} and {_g{_(MF-}*}:M;{_g{_(FM-(}*)}:F too
 
4:55 PM
or rethink how blocks work... I don't like that variables immediately execute the block either
 
its like in every other lang.
 
no it's not
 
var f = function(){} does not execute, while f("asd") does
 
yeah exactly
the (..) does the executing
 
yeah, in CJam its also like that
 
4:56 PM
I can throw f around all I want, it won't execute anything
 
that's not how all other built ins are made, are they ?
any function call happens directly in CJam, like d, m* etc
 
I don't know what you mean
oh right
 
I don't see why custom functions should behave differently
 
well yeah but F is not a function call
it's a variable
 
it is a custom function.
{} is a block which is a function . once F is assigned that, F is also a block , and thus a function
 
4:58 PM
yes
but when I write {...} I push a block. when I write F I run the block
 
I think its about named functions.
 
I can see that that's probably useful most of the time, but it happens fairly regularly that I think, "gaaaaah {F}%"
oh, and CJam could really use block concatenation like GS has
 
{}{}+ ?
 
08:00 - 17:0017:00 - 00:00

« first day (1457 days earlier)      last day (3383 days later) »