« first day (1763 days earlier)      last day (3074 days later) » 

6:00 AM
@Maltysen sudo apt-get purge ninja
sudo apt-get install ninja-build
^^
 
oh lol
what was the other one?
 
@Maltysen my personal malware muhahaha
nah
ninja package in Ubuntu
ninja: Privilege escalation detection system for GNU/Linux
not sure, never used it
 
well it couldn't find it in my regular user, ran it as root and it failed
[2/11] g++ -x c++-header -MMD -MF src/...c/precompile.h -o src/precompile.h.gch
FAILED: g++ -x c++-header -MMD -MF src/precompile.h.gch.d -O2 -ggdb -std=c++11 -Wall -pedantic -fmax-errors=1 -c src/precompile.h -o src/precompile.h.gch
src/precompile.h:1:22: fatal error: libop/op.h: No such file or directory
#include "libop/op.h"
^
compilation terminated.
^Cninja: build stopped:
 
oh right
cd ..
rm -rf kwik
git clone --recursive https://github.com/orlp/kwik
forgot that git doesn't clone subrepositories by default
 
No submodule mapping found in .gitmodules for path 'src/libop'
 
6:05 AM
hrm
allright, I believe my git repo is broken then
give me a few
 
Anonymous
@quartata Smartass correct answer :P I've also offered an unending bounty on it for a smart answer
 
@Maltysen ok, remove and clone recursive again
or try git pull && git submodule update --init --recursive
 
k it worked
 
it built?
 
no it clones, its building right now
 
6:11 AM
ah
 
... and it just failed
[10/11] g++ -MMD -MF build/io.o.d -O2...x-errors=1 -c src/io.cpp -o build/io.o
FAILED: g++ -MMD -MF build/io.o.d -O2 -ggdb -std=c++11 -Wall -pedantic -fmax-errors=1 -c src/io.cpp -o build/io.o
In file included from src/libop/op.h:14:0,
from src/precompile.h:1:
src/libop/bits/scope_guard.h: In instantiation of ‘op::detail::ScopeExit<typename std::decay<_Tp>::type> op::detail::operator+(op::detail::ScopeExitAcceptor, F&&) [with F = kwik::read_file(const string&)::__lambda4; typename std::decay<_Tp>::type = kwik::read_file(const string&)::__lambda4]’:
 
g++ --version?
I believe I require too modern g++ then, but I think I can implement this in a less modern way
 
4.8.2
 
Anonymous
I tried compiling it under 4.9.3, got an error that _assert wasn't defined
 
@Mego full error msg?
 
Anonymous
6:17 AM
$ ninja
[2/11] g++ -x c++-header -MMD -MF src/...c/precompile.h -o src/precompile.h.gch
FAILED: g++ -x c++-header -MMD -MF src/precompile.h.gch.d -O2 -ggdb -std=c++11 -Wall -pedantic -fmax-errors=1 -c src/precompile.h -o src/precompile.h.gch
In file included from src/libop/op.h:11:0,
                 from src/precompile.h:1:
src/libop/bits/optional.h: In function 'void op::detail::optional::fail(const char*, const char*, unsigned int)':
src/libop/bits/optional.h:200:29: error: '_assert' was not declared in this scope
 
Linux hates me
I'm root and I get a "Permission denied" error!
 
@Mego this is a bit harder to solve
@Maltysen try pulling and building
 
[2/3] g++ -MMD -MF build/io.o.d -O2 -...x-errors=1 -c src/io.cpp -o build/io.o
FAILED: g++ -MMD -MF build/io.o.d -O2 -ggdb -std=c++11 -Wall -pedantic -fmax-errors=1 -c src/io.cpp -o build/io.o
In file included from src/libop/op.h:14:0,
from src/precompile.h:1:
src/libop/bits/scope_guard.h: In instantiation of ‘op::detail::ScopeExit<typename std::decay<_Tp>::type> op::detail::operator+(op::detail::ScopeExitAcceptor, F&&) [with F = kwik::read_file(const string&)::__lambda4; typename std::decay<_Tp>::type = kwik::read_file(const string&)::__lambda4]’:
 
hrm
you did pull?
did it say it got anything?
maybe you also needed to execute git submodule update --init --recursive?
 
Anonymous
I did git pull --all and got the latest
 
Anonymous
6:22 AM
Probably easier than that :P
 
it gave me +1 and -1
 
0
Q: Count the divisors of a number

bkulIntroduction This is a very simple challenge: simply count the divisors of a number. We've had a similar but more complicated challenge before, but I'm intending this one to be entry-level. The Challenge Create a program or function that, given one strictly positive integer N, outputs or retur...

 
because I just fixed that error maltysen
if git pull --all doesn't work neither git submodule update --init --recursive then I guess just rm -rf kwik and clone recursive again
I should really learn how submodules work someday
 
[10/11] g++ -MMD -MF build/parser.o.d...=1 -c src/parser.cpp -o build/parser.o
FAILED: g++ -MMD -MF build/parser.o.d -O2 -ggdb -std=c++11 -Wall -pedantic -fmax-errors=1 -c src/parser.cpp -o build/parser.o
In file included from src/libop/op.h:14:0,
from src/precompile.h:1:
src/libop/bits/scope_guard.h: In instantiation of ‘op::detail::ScopeExit<typename std::decay<_Tp>::type> op::detail::operator+(op::detail::ScopeExitAcceptor, F&&) [with F = kwik::parse(const kwik::Source&)::__lambda4; typename std::decay<_Tp>::type = kwik::parse(const kwik::Source&)::__lambda4]’:
 
allright, I messed up
should work now, for both of you @Maltysen @Mego
(after pulling of course)
(and assuming there aren't further issues)
 
6:33 AM
yay it worked
yep
 
Anonymous
@orlp same problem
 
Anonymous
nvm did submodule update and it's good
 
@Mego rm -rf kwik and clone recursive
ah
 
wow 7 answers in 17 mins
what does this thang do
 
I like how I'm tying with Mathematica... :P
 
6:43 AM
@Maltysen help me golf this: *FmhhdrPQ8
*Fmhhdr 8 feels so bad
 
Anonymous
0
A: Count the divisors of a number

MegoSeriously, 17 bytes ,;n;;╟@RZ`i@%Y`MΣ Try it online with explanation If my prime factorization function had been working before this challenge, I could get 9 bytes: ,w`iXu`Mπ

 
seriously?
 
Anonymous
It's always sad to discover interpreter bugs while doing a challenge
 
Question about Golfscript
 
6:53 AM
I should probably make a test suite for Minkolang.
 
If I have a stack r [a..b] {*something*}* where r,a and b are numbers and I want what's in the block to change r by using the stuff in [a..b], how do I do that?
 
haha
Pyth5's testsuite is already over 1300 lines long
and not many of the operators are implemented
 
Do I + r into the block? And what does that do exactly?
 
@Sherlock9 the answer is use pyth
 
I'm already learning one language in under a week, let's not throw another one on there yet, @orlp
... @orlp After skimming the docs, I may stand corrected. We shall see.
 
6:58 AM
Deciding to learn Golfscript now is like deciding to learn COBOL.
 
@feersum Depends. Are you working with NASA computers? They need FORTRAN programmers
 
I said COBOL, not FORTRAN.
 
why are we SCREAMING
 
@feersum Well, FORTRAN definitely, COBOL maybe at NASA, but I don't remember exactly
Because programming languages were named with the Caps Lock button on
In the early days
 
7:02 AM
*CAPS LOCK
Say, @orlp, at the time you were busy, so I'll bring this up again.
1 hour ago, by El'endia Starman
@orlp (sqrt (* 2 8)) ⇒ 4.0 <- I don't get this. Why does this work? Is sqrt already a built-in function?
 
my bad
got distracted
 
totally understandable
 
@El'endiaStarman you are on the page of lis.py right?
ctrl+f for env.update(vars(math))
 
yup
ahhh
So basically, it was imported.
 
yes
 
7:05 AM
Another question: does "anything" also mean other expressions?
> If proc is anything other than one of the symbols if, define, or quote then it is treated as a procedure.
 
@El'endiaStarman correct
((quote sin) 3.5)
 
I think lis.py is a double-win
it introduces people to how compilers work
and the elegance of lisp
 
^ that looks like a distant relative of AlexA.!
 
Anonymous
7:21 AM
@Optimizer Are you calling Alex fat?
 
wow, how do you infer that from the above line?
 
Anonymous
You totally are calling Alex fat! That is a valid and rational assumption from your statement!
 
Anonymous
Alright that's too far
 
seriously dude? you yourself start this and the second i join your jokes, you flag it?
 
relax guys
 
7:29 AM
@Mego if you can't take a joke, don't do it on others.
 
Anonymous
@Optimizer I responded with obvious sarcasm. You directly insulted me.
 
Anonymous
> That is a valid and rational assumption from your statement!
 
@Mego I don't see how that was obvious.
Also, you are a penguin. so that counts as a valid and rational extrapolation from your valid and rational assumption
from now on, I am simply gonna ignore anything you say in order to prevent myself from getting uselessly chat banned.
 
Anonymous
That's a mature response
 
Anonymous
This is stupid
 
7:34 AM
Pyth is giving me headaches
/me continues to read docs
 
don't worry, its supposed to do that initially
 
@Maltysen btw my compiler so far is only parser/lexer
of a small subset
just been doing all the infrastructure work
 
7:59 AM
I'm going to kill my ISP. The last 30 days had over 57 hours downtime.
I can't even contact support because their web-server and landline crashed!
 
@Optimizer How does array[n] in Pyth?
 
@Sherlock9 @_n
where _ is your expression with the array
 
Thanks
 
In Pyth5 @ <recipient>< message> sends an email.
 
lol
 
8:17 AM
Ok so I tried to do a sum of divisors thing by multiplying the head(exponents) of the prime factors
J{PQK1FNJ=*Kh/PQ@JN;K this is my result
Is it just me, or is this a tad verbose for Pyth?
 
I did it in 10
although it was broken for input 1 and 0 (n>=2)
hint rPQ8
also, check out m
you almost never use F for for loops
also check out *F
 
Thanks
 
0
Q: Java Code Error

JeremiahTwo Issues Im Having @Override public boolean onCreateOptionsMenu(Menu menu) this^^^^^^ is giving me an error saying Method does not override method from its superclass return super.onOptionsItemSelected(item); this is giving me an error saying Error:(100, 29) error: cannot find symbol method o...

 
8:34 AM
@orlp Well, I'm stuck
How did your 10 bytes work?
 
*FmhhdrPQ8
 
OH
Thanks
 
Anonymous
9:05 AM
Writing test suites for 100 functions is hard...
 
@Mego no
it's labour intensive, but not hard :)
 
-3
Q: why the Thanksgiving day is " lambda x:"11/"+`28-(x-2+x/4-x/100+x/400)%7` "

user553575628-(x-2+x/4-x/100+x/400)%7 ??? what's the meaning? When is Thanksgiving?

 
@orlp JrPQ8?lJ*FmhhdJ0 almost works, except that it returns 0 for input 1
Ah wait, the specs say the input > 0
So JrPQ8?lJ*FmhhdJ1
 
only n = 1 is a problem
 
Or just JrPQ8?J*FmhhdJ1
Yeah, I wrote, if J then do the lambda, else return 1
Since J == [] for input 1, we just return 1 for the one divisor
It's a bit hard-codey. Not sure if it would fly
 
9:22 AM
Oh, Raspberry Pi SE graduated, too.
 
What does it mean to graduate?
 
not a lot, but the site gets a shiny new design, the privilege thresholds are increased and moderators are elected
(although SO is in the process of decoupling those steps a bit)
wat
49
Q: Congratulations, Worldbuilding is graduating!

Grace NoteIt's a big day. You've been cleared for graduation by the Stack Exchange Community Team! Worldbuilding met our threshold for graduation-worthy sites and after a review, the Community Team determined that you're good to go. Reaching 'mature community' status is a big milestone, and you should be v...

 
Let's face it. They've probably forgotten we even exist by now.
 
Anonymous
@Sp3000 CJY knows. I hope every morning he asks his bosses "so when is ppcg graduating?"
 
Anonymous
9:38 AM
@orlp It's somewhat tricky to come up with good test cases that cover all (or as close to all as possible) of the expected behavior
 
Back in a few hours
 
Yes! Arcyou beat Golfscript at a challenge. I realize I'm slightly too excited about this but whatever
 
*beat GolfScript by a single byte with a built-in :P
3
 
Anonymous
9:57 AM
@MartinBüttner Salty Martin is salty :P
 
10:12 AM
@MartinBüttner I like the Cartesian solution, but in J it's 18 bytes, summing a matrix is 5 bytes alone unfortunately
]+/@,@:=*/~@:>:@i. NB. Cartesian
__*/@:>:@{:@q:] NB. prod(prime powers+1)
0+/@:=>:@i.|] NB. naive
 
@randomra can't you just count occurrences of the input in the matrix?
 
@MartinBüttner I don't know of any function like that in J
 
J has a very odd selection of built-ins... it contains some really obscure and specialised stuff but then sometimes doesn't have built-ins for the simplest tasks...
 
@MartinBüttner because if you can solve a task with 2 or 3 functions, they feel like it doesn't need its own function
 
it seems inefficient though to first map the values to 0 or 1 depending on equality and the sum over them, if you could just count them in a single pass
 
10:18 AM
so mean kind of have a function, it is (+/@%), still short so they don't define it with its own ID
I can't seem to count 5's in a vector in less than 7 chars...
is it 6 chars in cjam? q~]5e=
 
with q~ being "boilerplate"
 
well and ] as well sort of
if you already have the array, then you'd just do 5e=
 
oh, and J doesn't have a sum function either, you just fold the addition (2 chars instead of 1), and because of that summing a matrix is also long
but I can compute Secant Slope in 2 bytes any time :D
 
hi all.. anyone here happen to use unison from the command line?
(I know.. but we are all friends, right? :) )
 
10:34 AM
@Dennis @aditsu I was wondering... if n is actually implemented... should it maybe actually be shorthand for oNo? such that you could redefine N to make it append a different string instead? since N is almost never redefined unless you really want to, I don't think it would ever be a limitation, but might be handy sometimes.
 
I'd rather not do that
 
because?
 
well.. it's convoluted, nothing else secretly uses a certain variable like that, and I don't expect it to be really useful
 
fair enough
 
Anonymous
aditsu and I are quite different in handling feature requests :P
 
Anonymous
10:49 AM
him: "nah that's not necessary"
 
Anonymous
me: "sure!"
 
This is why CJam is the nicer language. ;) (Disclaimer: I actually have no idea what Seriously is like.)
 
Anonymous
@MartinBüttner Hell. It's hell.
 
Anonymous
I regret all of my design decisions
 
Anonymous
There are bugs everywhere
 
Anonymous
10:51 AM
And trying to convert to python 3 is even more hell
 
1
Q: Flag comments for deletion when suggestion is implemented?

Stewie GriffinIt's very common that other users comment and suggest ways to improve your answer. In almost all such cases, the user gets credited in the answer ("Saved 6 bytes thanks to ... "). A lot of those comments are removed by the user, while many are kept, at least for a while. Is it OK / a good thi...

 
Anonymous
0
A: When is Thanksgiving?

Ismael MiguelPHP 5.3+, 59 bytes This uses PHP builtin function strtotime to parse the date. <?=gmdate('M d',strtotime("Next Thursday $_GET[Y]-11-19")); This expects the value to be passed over GET parameter Y OR over php-cli Y=<year>. It tries to find the next thursday after 19th November. So far, with t...

 
Anonymous
Thoughts on this?
 
11:09 AM
Who here wrote any of the following: Golfscript, Pyth, CJam?
Just my curiosity as a new guy
 
Pyth is isaacg, CJam is aditsu
 
@Sherlock9 Relevant to your interests:
32
Q: What programming languages have been created by PPCG users?

PhiNotPiLanguage-creation has become a popular activity on PPCG. A decent portion of answers, especially code-golf answers, are written in languages invented by the community. These are also languages that might be unfamiliar to this site's wider viewing audience. What languages (esoteric, golfing, or...

 
Thanks @MartinBüttner
 
Just found an elevener in High Life.
 
11:36 AM
I wonder how golfed I could make a Javascript divisor counter
Also, does anyone know why my Firefox won't search Google after two searches?
 
Anonymous
Were the first two "google"?
 
It just "loads" for a moment and does nothing
I type in the address bar
Web addresses work fine
Google.com itself doesn't
 
Anonymous
Weird
 
Anonymous
Blast your cache
 
@Mego Ok how
Incidentally, yahoo and bing work fine
 
Thanks
 
 
1 hour later…
1:00 PM
I'm getting the sense "When is Thanksgiving?" was a bad title for a challenge
 
its a title that means lots of clicks on HNQ list
 
Anonymous
@quintopia There doesn't seem to be that much spam/bad answers on it
 
HNQ? ¯\(°​_o)/¯
 
Anonymous
Hot Network Questions
 
Anonymous
List of popular SE/SO questions on the right
 
1:36 PM
given an arbitrarily large grid of on/off switches (think game of life), what pattern of switches will maximize the number of "on" switches without there being exactly 3 "on" switches in a row?
 
Anonymous
Grid, so 2D?
 
Anonymous
Row as in horizontal, vertical, diagonal?
 
@NathanMerrill you don't mean "exactly", do you? because that would be a grid that is completely on
^ the antidiagonals break it
 
1:42 PM
@MartinBüttner ah, yes thank you
 
Anonymous
Oh carp
 
Anonymous
2smart4me
 
well, the lower bound is obviously 4/9
 
Anonymous
1:44 PM
You mean upper bound?
 
lower
110
110
000
^ just tile that
 
Anonymous
Oh
 
Anonymous
Upper bound would be 5/9 I think
 
that gives me 5/9
 
Anonymous
Yeah
 
1:45 PM
but perhaps with a bigger tiling I can fit more?
 
Anonymous
That was my thought
 
Anonymous
6/9 should be an asymptotic upper bound with increasing tile size
 
@NathanMerrill doesn't work I think
if you append it to the bottom, you get a diagonal
 
@MartinBüttner or to the left
yeah, you're right
 
this is a nice problem :)
 
Anonymous
1:47 PM
Chat box was too small to notice the diagonal
 
Anonymous
brb forcebruting
 
0110
0101
0011
1000
 
Anonymous
Actually breakfast first, then forcebruting
 
7/16
which is worse than 4/9 :(
 
Anonymous
1:49 PM
What about non-square tiles?
 
reducible to square tiling
unless you are talking hexagonal
 
Anonymous
I guess
 
Anonymous
Ooh, sounds like a hexagonizing problem
 
Anonymous
Hex tiling may be something to look into :P
 
1010
1010
0101
0101
that's 8/16
 
1:54 PM
ah, nice
@Mego I agree with your upper bound, btw
(2/3, that is)
 
@PeterTaylor thanks for the feedback
I actually think that my last example is the maximum
because each "1" is in exactly 3 different 2-in-a-rows
well, that's true of the 4/9
hmmm
 
the reason why I think the upper bound is 6/9 is because you can't fit 7 in any given 3x3 block without a violation (ignoring wrapping)
 
I agree
but I think the answer is 1/2
but can't prove it
the difference between my example and the 4/9 one is that my cycle is larger
to loop from one two-pair to itself takes 4 moves
while mine takes 6
the ideal would be no looping
whilst maintaining example 3 different 2-in-a-rows on each point
 
how about an aperiodic solution
probably doesn't make the problem any easier :D
 
nope
it also appears, that with a greedy algorithm (takes a 1 whenever possible), it always comes out periodic
 
2:11 PM
I suppose that depends in what order you're filling the grid?
 
I've tried to fill it in fairly randomly, but yeah
 
hm, yeah, if I fill it along diagonals I get 4/9
filling along diagonals but flipping the direction each time gives something slightly more interesting
wait, I think it doesn't
 
I'm posting the problem on Mathematics
but I have no idea what tag to use
oh, there's a tiling tag
 
Anonymous
2:29 PM
I would expect 6/9 to only be possible with a hex tiling, if it's at all possible
 
Anonymous
But I think 6/9 being an asymptotic bound is more likely
 
@NathanMerrill link? :)
 
0
Q: Maximal tiling without any 3-in-a-rows

MrTiYou are given an arbitrarily large grid, where each square can either be off or on (think Game-of-life type board). You need to tile such a grid to maximize the number of "on" squares without there being any 3-in-a-row of "on" squares? A 3-in-a-row can be horizontal, vertical, or diagonal. The...

 
I like how you're using your full name (if it's your actual name) with a gravatar on one SE and a photo of yourself (if it's you) with a pseudonym on another :P
 
lol
Ti was my nickname for a long time
and Nathan is my real name, but I'm not sure why the images are different
but not motivated to go and update (especially because I don't have that photo on my computer any more)
 
2:36 PM
why did you repeat the tile 3 times in the question?
 
because technically the tiling is
01
01
10
10
 
oh, right
 
so tiling makes the example more obvious
 
(also I'd personally probably add "Bonus question: does the answer change if we allow aperiodic tilings or arbitrary 0/1 assignments?")
you could even call a non-regular tiling with tile 01
 
I haven't said anything about periodic in my question
 
2:39 PM
I should just randomly test arbitrary 10x10 grids in python
 
@NathanMerrill oh right. "tiling" does imply a finite set of prototiles though I think
 
true
I added a line indicating that I'm open to aperiodic tilings
 
Wait, how do you make multiline comments? /dumb
 
4 spaces
 
thanks
 
2:43 PM
actually no
that makes code-style
shift-enter for multiline
 
I'm ok with that
0110
Nope it doesn't work, lemme try again
 
Anonymous
 
lol, it was easier than that
 
Anonymous
Or you could just sync profiles across SE
 
I had to change my profile to use gravitar instead of identicon
 
Anonymous
2:46 PM
> You need to tile such a grid to maximize the number of "on" squares without there being any 3-in-a-row of "on" squares?
 
Anonymous
That ? shouldn't be there
 
Anonymous
But I'm too lazy to suggest an edit
 
Anonymous
Also I would need to find 5 more chars to edit for it to be posted to the review queue
 
Anonymous
#lowrepproblems
 
thank you
 
Anonymous
2:52 PM
You're welcome
 
Anonymous
I swear half of my edits are fixing spelling/grammar :P
 
Anonymous
If I had a talent for explaining grammar I'd be farming karma on ELL :P
 
Anonymous
Oh hey the pinned message went away finally
 
it will be remembered fondly
 
Anonymous
I'm glad it's gone; that means we can start abusing stars again, right? /s
2
 
Anonymous
2:55 PM
If there isn't a constant reminder to not abuse stars, then certainly abusing stars is acceptable
 
Anonymous
And if there is a constant reminder to not abuse stars, then certainly everyone will take heed of it and not abuse stars
 

« first day (1763 days earlier)      last day (3074 days later) »