« first day (1937 days earlier)      last day (2907 days later) » 

5:10 AM
@AlexA. -_-
I'm still trying to figure out your musical tastes... Broader than lifehacks' scope
 
Hey @Downgoat Why does the PPCG graduation userscript look weird? i.imgur.com/YomIZGW.png
 
@DrGreenEggsandHamDJ O_o try updating or refreshing
 
Doesn't do anything.
For the longest time, I thought that was how it was supposed to look until I installed it on another computer and it looked really nice.
 
@DrGreenEggsandHamDJ Do you, by any chance use Chrome version 49?
 
Version 50.0.2661.102 m
 
5:22 AM
Then nope, is the version the same on both computers?
 
Uhhhhhhh I have no clue.
FWIW the ugly one is win10 and the non-ugly one is ubuntu.
 
Check once you can, if they are, then there's q chance that's the problem.
And open the interactive console, to check, if there are any errors
 
Update: The non-ugly one is on 49.0.2623.110
 
Then there's also a chance, that the ugly one is the correct one, Chrome 49 is a buggy mess.
 
Yeah, I have 2 errors (on 50). Error one
 
5:34 AM
Hello
 
@DrGreenEggsandHamDJ The first one is normal, and only there because of the dynamic page generation.
 
ok. I found the line causing it 224-227:
var darktheme = {
  BACKGROUND_COLOR: "red",
  BACKGROUND_IMAGE: "//i.stack.imgur.com/vAWfF.png",
  STATS_COLOR: "#FFF",
 
I can't see the second one, can you post it as text?
@DrGreenEggsandHamDJ
@zyabin101Hi
 
I've figured it out.
if (localStorage.getItem('main.MODE_DARK') == "true") {
  main = $.extend(main, darktheme);
  meta = $.extend(meta, metadark);
}
For some reason, it thinks I have a setting requesting a dark theme.
I don't know where that setting is.
Although, I can just gank out those lines.
 
@DrGreenEggsandHamDJ That's the local storage, it's on the local computer in the chrome's repository
@DrGreenEggsandHamDJ Look here: %LocalAppData%\Google\Chrome\User Data\Default\Local Storage.
@DrGreenEggsandHamDJ Or open the console, and type in: localStorage.setItem("main.MODE_DARK", "false")
While you're on the page
 
6:09 AM
@Bálint Beautiful. That solved it for me. Ty!
 
@DrGreenEggsandHamDJ the == "true" is unnecessary
why would even
 
Hey, I didn't write it.
Blame Downgoat.
 
I do that anyway
 
-1
Q: accuracy required for spherical faraday cage null void

s.croginzHow do I calculate what level of precise manufacturing tolerances are required for a 2 meter diameter spherical faraday cage to be considered as null void and zero EMF ?

 
wtf
 
6:40 AM
> Can you imagine an imaginary menagerie manager imagining managing an imaginary menagerie?
I got a card with this tongue twister today from my English teacher as participant of "British Bulldog" contest. :D
 
@DrGreenEggsandHamDJ Wich one? You should report it though, with the code snippet: localStorage.setItem("main.MODE_DARK", "true")
 
@Bálint Heh.
 
@zyabin101 I edited it
 
 
1 hour later…
7:53 AM
\o/ Chat ees ded.
 
8:08 AM
@Mego There isn't a GitHub Pages site here. :(
It was intended to have one.
But good job cloaking it. :)
 
8:22 AM
@flawr Just do var repair = "Repaired!";
 
Again.
@_@
Apparently, these projects again lead to a 404 page.
 
He's changed his account to this btw
 
Great.
Now I confirm that Angus managed to break my feed. D:
 
@mınxomaτ ermahgerd, can't handle the cuteness
 
8:44 AM
0
Q: Find the last three words of each paragraph iff they are shorter than 20 characters in total

Tobias KienzlerBased on my SO question, but more specifically: Given a text where paragraphs end with an empty line (or $ at the very end), match the up to twenty last characters of a paragraph excluding the \r or $ but no more than three complete "words" including the "separators" in between and the punctuati...

 
9:40 AM
Ohhh, the new Worldbuilding design launched.
 
@MartinBüttner Ohhh, I like it.
Ohhh, you too?
 
it's also one of the nicest main/meta design pairs yet.
 
10:25 AM
I don't know which data to bring to zyabinVI :/
 
@MartinBüttner I love the fact that the meta design isn't just a greyscale version of main - the little subtle differences in the picture, and the O of Worldbuilding being wireframe instead of just black and white
 
@Maaaaarvin haaaaai!
 
10:46 AM
Does anyone with experience in have an opinion on this sandbox post
 
I don't need an experience in to know that it is too short
 
"Winner is the shortest run time to check whether all numbers up to N"
I can't tell whether the criteria is shortest time or highest N
 
Winner is a time
@Sp3000 I believe he means he will test the program for some N
 
If that's true, then not disclosing that N makes it a bit harder to judge :/
 
Judging from 'How can I phrase the above challenge', I believe that the question is heavily under development
 
10:55 AM
Yes this challenge is far from finished - but it was suggested in the comments that it isn't worth working on because the only speed increases will be trivial leaving no room for interesting approaches
So I wanted to hear people's thoughts on that before suggesting any tidying up of the wording
I want to know if the comments on the post are fair
 
11:24 AM
@trichoplax Yeah exactly :) ... the only other SE I know that has this is bicycles.
 
Chat mini-challenge: if I have a fair coin, I would give me head with a 0.5 chance and tail with a 0.5 chance; now, write a program that returns head with a p chance, and tail with a (1-p) chance, where p is a random number between 0 and 1 generated on runtime
Hint: this is chameleon
p follows a uniform distribution
you spoilt the fun :)
 
11:46 AM
a=Math.random;f=_=>a()<a()
I hope it works
 
that looks about 7 bytes too long :P
 
@MartinBüttner There's a catch to it, I assume
 
yes
(I would also omit the f= though)
 
_=>a=Math.random,a()<a()
 
Challenge idea: make an incremental game.
 
12:00 PM
what does that mean?
 
~_~
 
@Bálint Still 8 bytes too long?
 
Incremental games, also called idle games, clicker games or clicking games, are video games whose gameplay consists of the player performing simple actions (such as clicking on the screen) repeatedly to gain currency. This can be used to obtain items or abilities that increase the rate at which currency accrues. A common theme is to give the player sources of time-based income displayed as "buildings", such as factories or farms. Some incremental games require players to collect multiple currencies to progress through the game. In some games, even the clicking becomes unnecessary after a time,...
 
oh ok
 
So, making an incremental game in the browser is very easy and requires graphics.
Making an incremental game on the desktop is harder, but still requires graphics.
Make an incremental game in the console!
The main feature is the spacebar, which has to be repeatedly pressed in order to get currency.
Let's call it cookies.
There are also upgrades, which may be bought for cookies to make more cookies.
 
12:04 PM
@KennyLau I just don't know what's the catch
 
The loop goes indefinitely.
 
Uhm, is the "I would give me" a grannar error or a hint?
 
Well, some games have definite goals, but ours would have none.
 
@Bálint It's a grannnnar error.
 
Englis is hard
@KennyLau a=>1 // chosen by a fair coin toss, guaranted to be random
 
12:09 PM
come on
 
@Bálint Loophole eleven. Waffles!
@StackCodeGolf/mods c'mon ~_~ :P
 
_=>Math.random()<.5
Just a guess
 
prove it
 
@KennyLau Is it correct though?
 
yes
 
12:19 PM
waffles
 
Dunno
 
@StackCodeGolf/mods c'mon
@Maaaaarvin looooove you
 
12:36 PM
0
Q: Copying parts of other programs not related to solution

LauseSo given for example a challenge with rather specific input and varying output (i.e. image-processing challenges) is it considered "fair play" to copy input processing logic from other answers? (for example logic to load an image to memory).

 
 
Eeeeeh! I didn't end reading! :P
 
@orlp lol, someone's a bit touchy about comments.
Goes too slow though.
 
@Geobits Too slow?!
 
Well, it could be faster anyway. I've played around with rapid-word-flicker-things (I'm sure there's a name for it...), and you can go really fast and still read it.
I'm not sure what it does to comprehension levels, but for something like this it wouldn't really matter.
 
1:01 PM
Yea, I had an app for my phone that you could bring up for most text fields.
Odd that the spritz example there only goes to 700wpm.
 
It's actually pretty amazing how fast your brain can see/decode/interpret the words.
 
@MarsUltor Heh, tried their Spritzlet on chat from my last message to right now.
Spritzes the sender name twice in a row.
 
I just had a brilliant idea. I can wear headphones during "don't interrupt me" time slots at work, and anyone that wants to interrupt me will have to actually walk to my desk!
 
1:07 PM
@Rainbolt Music interrupts you?
 
@zyabin101 No
 
You don't already do that? Yes, headphones are a very easy signal. Even someone that wants to interrupt you has to really want to interrupt you.
 
0
Q: Algorithm for creating all possible strings with x characters

3DescapeI can't wrap my head around the algorithm for making the following: I have an array for all possible characters: array("a", "b", "c",...."z", " ", "!"...) you get the idea. Now I would like to generate all possible compinations of these characters with the length of x. so for example the array...

 
I mean some genres of music would interrupt me but I wouldn't listen to them at work
 
@KennyLau Don't answer off-topic questions, please.
 
1:12 PM
@Doorknob ok sorry
 
I guess I lost the privilege to see deleted answers when we graduated
Or answers deleted in the grace period don't show up
 
@Rainbolt Nope. You'll lose it when we get design.
Or SE devs accidentally push the "Set permanent privileges on codegolf" button. :P
 
@Rainbolt Kenny answered in a comment.
 
Oh
 
@El'endiaStarman Comment? Which? :3
Also, which data should I use for zyabinVI? :/
 
1:26 PM
@zyabin101 ...a comment that is now deleted and invisible.
 
@El'endiaStarman D:
 
hi all
 
hi part of all
 
for those who don't follow Scott Aaronson's blog, our own awesome Peter Taylor is making an awesome code golf contribution currently. See scottaaronson.com/blog/?p=2741#comments
3
Thus proving finally that PPCG users >> Professors at MIT :)
 
@Lembik Which comment No. ?
 
1:39 PM
just search for "Peter Taylor"
 
@Lembik "PPCG users get input from Professors at MIT"
 
@Rainbolt :) no.. "are far superior to"
here is a fun question.. does there exist a perfect number that is one more than a prime?
 
yes
6
 
damn :)
you win
how about one less?
 
1:47 PM
:)
 
28
 
can you find another one that is one more than a prime?
 
No, I cannot.
 
@Lembik Yes, I can-non. :P
Mon!
 
@Lembik 2^(p-1)(2^p-1)-1 = 1/2 (2^p-2)(2^p+1), so apart from 6 you're not going to find any for even perfect numbers
 
1:55 PM
and all the perfect numbers generated have been in that form
 
Has it been proved that there cannot be any odd perfect numbers?
 
No, it hasn't.
But nobody has managed to find one either.
 
I'll give you $10 if you find an odd perfect number and let me publish about it
 
@CᴏɴᴏʀO'Bʀɪᴇɴ you should have an RSS feed for your blog.
 
@Sp3000 I'll give you $1000 if you give me $10!
 
1:58 PM
I bet you $10 that, if you give me $50, I'll give you $1000
5
 
@KennyLau I'll give you $100000 if you g--- wait, I don't have that much.
 
I am currently wishing that MathJax was smarter about money signs...
 
@Sp3000 nice :)
@trichoplax Descartes thinks they exist :)
 
chat mini-challenge: given a number (say 108), return two numbers (6,3) such that 6**2 * 3 = 108, and the second number is square-free
 
2:06 PM
What does it mean to be square free?
 
You probably want to specify the challenge a bit better :P
 
without squares :)
 
Or else lambda n:(n,1)
 
@Rainbolt Not divisible by a square.
 
@Lembik Really?
 
2:07 PM
@Sp3000 such that 6**2 * 3 = 108
in algebra: return (a,b) such that a**2 * b = n
 
I am completely distracted by mercurynews.com/drive/ci_29905115/… :)
 
That's an example, not a specification
 
come on.
 
Alternatively, a number n is square-free if no prime divides it twice. That is, all exponents in the prime factorization of n are <= 1.
 
@Lembik Trying to steal my stars eh? I see how it is.
 
2:08 PM
@Rainbolt :)
 
@El'endiaStarman That works much better, since 1 is square :)
 
I know what you're trying to say, but I'm just pointing out that you need the spec to be a bit clearer :P
 
@Sp3000 alright, thanks
 
@trichoplax Heh heh yeah... >_>
@Sp3000 Well, Kenny did say that the second number had to be square-free, which rules out 108 = 1^2 * 108.
 
I almost said something too but I'm feeling non-confrontational so I will do the work for you: Given a number X, return two numbers (Y, Z) such that Y**2 * Z = X, and Z is square-free
 
2:10 PM
guys
 
Thanks @Rainbolt
 
square-free is standard terminology
 
@orlp guy
oh god
 
if you don't know it you can google it
 
@orlp It's standard terminology if you are heavily involved in mathematics. If you aren't heavily involved in Mathematics, then "square free" looks like ambiguous English.
I know both of those words actually
 
2:11 PM
@Rainbolt I said "square-free"
 
spheres are square free too
 
that's one word
maybe italicize it square-free
what about quadratfrei?
or kwadraatvrij?
 
@orlp Me dun speek Deutzia.
 
everyone on wordpress agrees that hyphens get misused all the time
 
You are pretty smart using a math term and then being all condescending towards people that didn't recognize it as such.
 
2:13 PM
@orlp Me dun speek Doich, ether.
 
@zyabin101 Dutch
 
@El'endiaStarman I meant 1 as the second number - I was just being a jerk, but basically without the example, there wasn't much of a spec except that the second number is squarefree (the "return (a,b) such that a**2 * b = n" phrasing is better)
 
20 bytes in Pyth: @/QJ*F+1{f%/PQT2PQ2J
 
>>> def f(n):
...  a, b = 1, 1
...  for p, e in factorization(n).items():
...   a *= p ** ((e & ~1) >> 1)
...   b *= p **  (e &  1)
...  return a, b
>>> f(108)
(6, 3)
 
golf please
 
2:19 PM
@KennyLau meh, the challenge was unspecified
I assumed it was a code challenge
 
come on, do chat mini-challenge need to be so detailed
 
Badly-golfed CJam says "I think you can do better than 20 in Pyth" :P
 
@Sp3000 Use Try it online! for code with special chars.
 
Normally I only need to escape () manually
Might as well
(Hmm doesn't work on 1 though)
 
nice
 
2:32 PM
can I return a such that a is a square, instead of its root?
 
well, alright
 
I'm about to make someone really mad by rejecting a code review where 100% of the code was copied and pasted from another project instead of being extracted into a third project for reuse.
 
@Sp3000 17 bytes... ,Jef!%Q^T2SQ//QJJ
 
@KennyLau It's calling for Jeff! D:
 
in jelly
how do I map some operation over a list of pairs?
in this case, I want to apply an operation (halving) on the right element of each pair
so [[a, b], [c, d]] becomes [[a, b/2], [c, d/2]]
 
2:41 PM
Doing it in general is tricky though, I'd ask Dennis if you can't use some trick like dividing by 1...
 
I meant a more general method :P
 
24 bytes in Minkolang: nd[di-2;$d%8&$d:N1MN.x].
Yeah, 20 bytes in Pyth is a bit much. :P
 
Yeah I think the best way is to just manually work around it in that case like Kenny did above
 
2:45 PM
Daaaaarn, Dennis introduced some new superscript builtins.
 
@El'endiaStarman I modified it to 17 bytes lol
 
brb writing an answer with these.
 
Now that's more like it.
 
This problem's a bit biased towards Jelly though :P
 
raaaaaah
I refreshed the page
rip my jelly answer
w/e it was way too long anyway
compared to what people who know jelly will get
 
2:50 PM
@El'endiaStarman have you any idea how to golf it further?
 
Nope. I don't know Pyth. :P
 
oh ok
much of the bytes are used to generate the second number...
 
(fyi I have... 7 for Jelly - wasn't kidding about biased)
 
I was mostly commenting on how it's normal for Minkolang programs to be about 1.5-2 times the size of Pyth programs for the same problem.
 
only 9 bytes are used for the first number ef!%Q^T2S
 
2:51 PM
9 bytes is the majority of your 17-byte program...
 
well
but it is just n/a/a
for the second number
 
4
A: Tips for golfing in Jelly

zyabin101You can use superscript three to nine (³⁴⁵⁶⁷⁸⁹) to golf some usually used values, but this depends on the amount of command line arguments, and in case of links, on the arguments of the links. ³ returns 100, and works only if there's no input. ⁴ returns 16, and works only if there's at most on...

My Jelly tip on superscript values, improved with new superscript eight and nine!
from plug import shameless
:)
 

« first day (1937 days earlier)      last day (2907 days later) »