« first day (2326 days earlier)      last day (2502 days later) » 

11:04 AM
Hello!
 
@Okx & @Adám If I allow for substitution characters in the prison door challenge only for languages that can't support the symbols then that gives those languages an advantage over languages in which the symbols are multi-byte characters so I'd need to make an exception that any language using the symbols could count them as a single byte only. But, if I'm going to do that, I may as well just ditch the symbols and use the substitute characters throughout.
Although, the result then doesn't look as much like a prison door. Hmm ... What to do?
 
Okx
make it so people can choose
 
@Okx With the allowance that the symbols may be counted as 1 byte in order to level the playing field?
 
Okx
yeah i guess
 
@Shaggy Require that those that cannot use the symbols, double the width and use T% f% W% `% l% c% ]% i% Z% instead.
 
11:11 AM
@Adám The symbols are 3 bytes in UTF8.
 
@Shaggy But two in UTF-16.
 
@Adám Yup, which is why I'm suggesting that we just allow people using the symbols to count them as one bytes; seems to be the easiest option.
 
@Shaggy How about languages that use an entire 256 char char set? Can they also add these 9 as single bytes?
I'd say it is easy to require size 4 to give:
T%f%W%
`%l%c%
`%l%c%
Z%i%]%
 
-2
Q: Am a I square repdigit?

GryphonYour Task You will write a program or function to return a truthy value if the integer inputted to it is a square repdigit, and a falsy value if it is not. A repdigit is an integer that contains only one digit. For the purpose of this challenge, a square repdigit is a repdigit that is the squa...

 
@Adám Hmm ... I'm gonna have to give this some more thought. And I was so close to getting it out of Sandbox!
 
11:34 AM
Is there a general formula for calculating f(n), where f(n) is the diameter of a circle in which a regular n-gon, with a side of 1, has all of its vertices touching the inner circumference of the circle?
$f(2) = 2, f(3) = \frac{2}{\sqrt{3}}, f(4) = \sqrt{2}$
 
You can place the vertices at R e^(k * 2*pi/n) for integer values of k.
 
What's R?
 
So you want 1 = R |1 - exp(2i pi / n)|
Whatever the radius of the circle is.
Oops forgot teh i.
 
@feersum Does this relate to $e^{\pi i}-1=0$?
 
Well sort of, in the sense that if you understand one you would understand the other.
 
11:43 AM
there is no way I can get all the answers to run in windows... :(
I might have to retime them all in a VM
which I hope won't upset anyone
 
@Qwerp-Derp So the radius of the circle would be R = 1 / sqrt( (1 - cos 2pi/n)^2 + (sin 2pi/n)^2 ).
 
@Lembik wait why
@Lembik also pls link
 
@Lembik well if you have Hyper-V it should be fine, or WSL would make it faster
 
actually.. would anyone be find enough to time the answers for mme?
@isaacg are you about? I need help please
@ASCII-only how do I tell? I have the list of cpu flags in front of me
which should I look for?
 
11:46 AM
@Lembik Hyper-V is a BIOS option
 
ah.. how do I tell if I have that?
 
do you have an intel processor
 
yes
it's listed in the question
My laptop has 8GB of RAM and an Intel i7 5600U@2.6 GHz (Broadwell) CPU with 2 cores and 4 threads. The instruction set includes SSE4.2, AVX, AVX2, FMA3 and TSX.
 
Yeah it probably has Hyper-V, you'll just need to make sure it's enabled
@Lembik turn off -> turn on and spam f2, controls will be at bottom, just navigate to system or something -> look for "Hyper-V"
 
my BIOS is completely locked with bitlocker I think
 
11:48 AM
But before you do that: What are you having trouble running
 
it's a work machone
 
@Lembik what if I hardcode the answers for n = 1...50 and have it output each in sequence?
 
@Mayube that makes you a loser :)
@ASCII-only Rust using CryptoMiniSat, by Anders Kaseorg for example
 
@feersum Is it cos(2pi/n) or cos(2pi)/n?
 
any of the ones where I have written ??
 
11:50 AM
@Qwerp-Derp The former.
 
@Mayube also good luck doing it for n = 50 !
 
@Lembik :O It's not in OEIS
 
@ASCII-only of course not! :)
 
I'm not sure if I've read the formula correctly, but this should be it, right?
$$r = \frac{1}{\sqrt{(1-cos(\frac{2\pi}{n}))^2+(sin(\frac{2\pi}{n}))^2}}$$
 
@Lembik Why can't you run that on Windows
 
11:52 AM
I think a plausible requirement for a valid answer in Lembik's type of question would be that a proof that the program gives the correct answer should be "much shorter" than the execution of the program.
 
@Lembik Also :| Cygwin
 
@Qwerp-Derp Sorry, I'm not willing to read this format.
 
@feersum Oh you don't have the chat plugin, hang on
 
@Lembik yeah, can do up to n=28 easily enough though :P
 
@Qwerp-Derp Use the other userscript :P
 
11:55 AM
@feersum Here is the equation
 
Seems ok.
 
@Lembik "borrowing" work's notably powerful cluster to try and compute n up to 50
 
Or just leave Anders' solution running for two hours
 
I'm running Anders' solution :P
 
@Mayube The one with n=41?
@Mayube Okay then you should get results for n up to 50 in ~2 minutes :P
 
12:05 PM
yeah I gotta get rust and stuff set up on the cluster first
 
:| no cmake rip
 
the cluster's a closed system, it's really awkward to get shit running on it, and the guys who manage it are pretty anal about wiping it between uses, so I pretty much have to install an OS, install rust, compile the code on the cluster, then run it
 
@Mayube Haha lol
 
12:17 PM
ugh well there goes my chance
couldn't get rust to compile, and somebody else needed to use the cluster
 
@Mayube Haha me too, on Windows it's because I'm missing g++
 
I installed gcc but it was exiting with exit code 101, and I didn't have time to spend 20 minutes troubleshooting gcc
 
user165474
@MDXF Also Dennis has a mean rep gain per month of around 6 times yours :P
 
user165474
In fact Dennis gets all of your rep in a month.
 
user165474
For every month since he was created his account was created :o
 
user165474
12:22 PM
Actually more like 7 times
 
user165474
Also yay more bounty thanks Peter Lenkefi :D :P
 
user165474
wait both of my bounties were given by someone named Peter :o
 
user165474
:O I finally got one of my answers accepted!!11!!!
 
Okx
@HyperNeutrino Only took 5000 reputation and 100 answers ;)
 
user165474
Yep :I :P Then again, Python doesn't win often, and my Jelly answers don't get accepted because ether 05AB1E or Pyth beat it or OP doesn't accept answers
 
user165474
:o so many units
 
EARTHQUAKE AAAAAAAAAAAAAAAAAAAAAAAA
 
user165474
? you alright there @betseg ?
 
at least 5 i think
im ok
 
user165474
:o ok that's good
 
user165474
12:31 PM
welp got to go now. cy'all later! o/
 
@ASCII-only A pattern would be great!
 
0
Q: Wind me a number snake!

JuliusGiven an input integer n, draw a number snake, that is, a grid measuring n x n consisting of the numbers 1 through n^2 that are wound around each other in the following fashion: Input n = 3: 7 8 9 6 1 2 5 4 3 Input n = 5: 21 22 23 24 25 20 7 8 9 10 19 6 1 2 11 18 5 4 3 12 17 16 15 1...

 
@Lembik And would obsolete every answer :P but it doesn't seem that easy to find
 
ooh we should do a ppcg gamejam
 
@Mayube gamejam?
 
12:40 PM
@ASCII-only gamdev contest, basically. Way it usually works is a timeframe is given (common ones are 24/48 hours) and at the start a theme is announced. After it's over people can vote on a few factors such as how fun it was, how original it was, and how well it fit the theme, and the highest overall wins
 
@Mayube So basically Ludum Dare
 
@betseg poseidon plz stop thx
there was a second one
first one was 6.3 :O
 
@ASCII-only correct, Ludum Dare is one example of a gamejam
 
Only one unit? :(
 
@LegionMammal978 unit?
 
Okx
unit to measure something
 
$hi$
 
1:09 PM
@ASCII-only I don't have to use cygwin if there is an easier way
 
so much hate for java on the starboard
:[
 
user165474
welp rip presentation was horrible
 
user165474
rickrolling was funny tho
 
Could I get some looks at this:
62
Q: The shortest code to invert a binary string

ToonAlfrinkMe thinks there aren't enough easy questions on here that beginners can attempt! The challenge: Given a random input string of 1's and 0's such as: 10101110101010010100010001010110101001010 Write the shortest code that outputs the inverse like so: 01010001010101101011101110101001010110101

I think it is rather unclear
it doesn't even say what it wants it just provides a testcase
 
user165474
I think it's clear enough.
 
user165474
1:21 PM
+65/-3, 2 years old, 110 answers, looks pretty good to me
 
@WheatWizard given a random string of 0s and 1s, write code that outputs the inverse
 
user165474
then again 15 of those are deleted
 
-4
Q: Output the wikipedia article for Komogorov complexity

PyRulezYour job is to output the html of the current version (at the time of this writing) of the Wikipedia page for Kolmogorov complexity: https://en.wikipedia.org/w/index.php?title=Kolmogorov_complexity&oldid=781950121&action=raw (backup) This is code-golf, so the shortest code wins.

 
@Mayube It doesn't say that though, and it doesn't say anything about what cases to handle
Are we supposed to handle strings without ones and zeros?
 
@WheatWizard it says exactly that
 
1:26 PM
Are we reading the same question?
 
It says verbatim: Given a random input string of 1's and 0's...Write the shortest code that outputs the inverse
 
"inverse" is not a meaningful phrase
 
Bitwise inverse
 
I had to go read the answers to figure out what the heck I was supposed to do
Its just a testcase with a vague description of what the author wants
 
at this point you're either being unreasonably pedantic, or simply lacking common sense.
The title is The shortest code to invert a binary string
 
1:28 PM
It certainly would be closed if it were posted today
 
binary string
yes it would, because it would be a dupe :P
 
The main task is clear to me.
Only thing missing is whether an empty string should be handled.
 
you could argue that an empty string is not a random string of 1s and 0s
 
Of course an empty string is a string of ones and zeroes.
 
If it were posted today people would complain that the author didn't specify a distribution for random /s
 
1:30 PM
The program is not asked to do anything randomly, so that's irrelevant.
 
(thats why the /s)
 
@Mayube By most definitions used here, "random" means "every possibility has a non-zero probability." Thus, as there is only one option with probability 1, all length-0 strings have non-zero probability, so it would be random
 
0
Q: Create an implementation of the Seltzer Spigot

PyRulezOne day, a guy ran a program which outputted this: : : : ../../: /: ../../: /: \ : ++.: -: .: /: : : He thought it looked interesting, so he asked the world to create a programming language in which that was valid source code. He also added it to this list. Your job is to create a p...

 
any rust people? I need help please
 
1:45 PM
Is there a consensus on whether or not the use of a proxy should count towards your total bytes? See this answer for example - should the extra bytes required to access the image via crossorigin.me be counted?
 
@ATaco What are you running a-ta.co on?
 
0
Q: Good examples of [tag:popularity-contest]

PyRulezpopularity-contest is a hard tag to create questions for. Its hard balance between vagueness and broadness. What are some good examples that other challenges should seek to emulate?

 
2:33 PM
1
Q: Reversed language name

user69279You should code a piece of code that looks like it outputs the language name but actually outputs the name reversed. E.g. a Python program should look like it outputs Python but should actually output nohtyP. The winner is the answer with the most upvotes in a week!

 
@NewMainPosts that one answer though
 
R's answer is pretty good too :D
underhanded challenges may no longer be welcome, but that one's attracted some pretty entertaining answers, maybe we should make an exception
 
Personally I like the underhanded questions
 
So do I, but there's a good reason why they're no longer welcome in general
 
2:47 PM
however I understand why they're disallowed, there's only so many ways to obfuscate things creatively
 
yeah, plus you can't objectively rate how "underhanded" an answer is
 
True, but I think the popularity-contest tag handles that
objectivity is found in "most votes wins"
and the underhanded tag tells people that they should be voting up answers that are underhanded and creatively so
 
@LegionMammal978 google chrome :P
 
16
A: This will eventually stop…

Carlos AlejoC#, 94 85 bytes My first answer! using System;s=>{var r=new Random();for(var i=2;r.Next(i++)>0;)Console.Write(s+" ");} Previous attempt (I liked that goto): using System;s=>{var i=2;var r=new Random();a:if(r.Next(i++)>0){Console.Write(s+" ");goto a;}} Ungolfed: using System; class P { ...

I don't understand why this got 16 upvotes.
 
@LeakyNun Then you're really not going to like this!
 
3:00 PM
@Shaggy well that was clever, but the one I linked to is just straightforward
 
Goddamnit! Who threw another +1 on mine?! :D
It's my 2nd highest voted answer :\
 
For a while my top 2 were both very trivial
 
@LeakyNun I think the first line in that answer might acount for a couple of the votes.
 
My top two are trivial
 
4 of my top 5 are trivial.
 
3:03 PM
My top now is one I put a fair amount of thought into, but I can't help but feel like a lot of the votes are just because it's on one of the top voted questions
 
My top 2 are a regex I stole from StackOverflow and op 8 in Minecraft for shortest code to produce nondeterministic input
Actually I don't think I have a nontrivial one.
 
it took me way too long to understand that ><> is a palindrome
 
my top one... dammit
 
Bizarrely, my top-voted question and answer are ones I put a lot of effort into.
 
@totallyhuman proves that "upvotes are inversely proportional to effort"
 
3:05 PM
oh, it's the seed answer, how long did it take you to crack it?
 
My top voted question is a Kolmogorov complexity one
 
and why is there still no explanation >_>
 
@totallyhuman Depends on how much effort you put into snarky/cheaty answers :P
 
And my top voted answer is a C# answer to one of my own questions, which actually ended up in a string compression war with @totallyhuman
 
I don't recall how much time I spent on coding it.
Computationally, it's trivial.
 
3:06 PM
@totallyhuman Yeah, I couldn't figure out the number of votes on that one, either!
 
i was honestly happy when dennis' jelly answer took over it in votes >_>
 
I have less than 10% of the votes you do for that question and I put a fair bit of effort in. Feelsbadman
 
Why effort when you can FindInstance[#==x!&&x>0,x]&
 
While we're on this topic, why does this have the most upvotes here? codegolf.stackexchange.com/a/125320/70388
 
@totallyhuman and that helped it get less votes because of the giganticity of the answer
and giganticity was not a word but now it is
 
3:10 PM
In Haskell if I do use a lambda on a tuple like (\ (a,b) -> a ++ b ) (somefunction) will somefunction be evaluated twice?
 
@totallyhuman Conversely, the satisfaction gained from implementing a complex solution is directly proportional to the effort.
 
yess
 
@TuxCopter Looks like MC Escher's Drawing
 
actually, in braingolf I find it most satisfying when I can complete a challenge by chaining a couple of builtins together
 
Moreso when it takes further effort to golf it down and eventually beat another solution that it originally looked like you had no chance of beating.
 
3:13 PM
Like this one
 
or this one, really pleased with this one
 
what if you get happiness from rep?
 
then you choose rep
happiness means happiness derived from finishing the solution not upvotes
 
and define happiness? In what sense do you mean?
 
3:16 PM
ninja'd
 
I care a little about rep, but I mostly care about satisfaction
 
rep pisses me off if I get it on a trivial answer
 
I care about rep mostly but it's not as selfish as it sounds
I can look at a good code golf answer and say "oh wow that's pretty neat" and I'm happy if my answer can make someone else say "oh wow that's pretty neat"
 
@KritixiLithos 75 25 balance then
I accounted for that
that is unless you already chose rep
 
I chose 75/25
 
3:19 PM
@KritixiLithos same
 
@KritixiLithos Me too. Or rather, it pisses me off to see my trivial answers get so much attentionn but my more complex ones go largely ignored.
 
I chose happiness
 
@EriktheOutgolfer 75/25
 
I chose reputation
 
3:20 PM
^
 
strawpoll proves diversity
 
what
why rep only?
 
@EriktheOutgolfer Because you have significant reputation :P
 
not actually
 
It was meant to be a joke
 
3:21 PM
you are close to 10k rep
 
@Arjun are you betseg or do you just have very similar avatar?
 
Happiness is a function of a combination of SE Rep, proximity of nearest food, and the amount of time you have until you need to get off of TNB and do actual work.
 
This is my favourite solution of mine because I got to spend some time working on it and it was incredibly satisfying to eventually tie Arnauld.
 
since I have been slightly inactive in my answering, you might beat me in rep soon
 
@Downgoat Don't, you'll regret it
 
3:22 PM
@Phoenix ... and proximity to nearest goat
 
(Why are people still upvoting my HTML password solution?!)
 
> time you have until you need to get off TNB and do actual work.
so like... negative 8 hours?
 
@Downgoat I am not betseg. I was Dobby The Free Elf at some time. And at the very beginning, I was Arjun. And, now too, I am Arjun.
 
Hmm, I need 1 answer for dupe hammer.
 
@Shaggy Good for you, I guess
 
3:24 PM
@Shaggy probably a "right tool for the job" type of upvote
it's not a bad answer
 
I don't golf on here that often now, since I currently do code golf mostly on platforms that are actually suitable for code golf.
 
@Poke There are more deserving answers to that challenge, though.
 
So who knows when I will get it.
 
@Shaggy I don't only upvote one answer when looking through a challenge
 
@feersum Such as? I've yet to find a more active golf community than here so I'd love to find some others
 
3:27 PM
By suitable for golf I mean that the answers are hidden until a deadline, there are per-language leaderboards, automatic testing, etc.
 
so you're a competitive golfer? :P
 
@Shaggy I can Downgoat it if you want
 
Poll: If you have the PPCG Gradscript, do you use the normal voting icons or the goat voting icons?
 
@Downgoat That's the only thing worse than upvotes to trivial solutions: downvotes! :D
 
@Phoenix I use the boat icons
 
3:30 PM
I use the goats
 
@Phoenix Neither, I use the boats, 'cause there's no option to use the normal ones.
 
Goatsssss
 
I really liked the idea someone had for them to be ++ and -- but it isn't in the userscript ;_;
 
I meant the boats by 'normal' because they look normal and goats are... goats.
 
@Phoenix of course goats
 
3:31 PM
I am actually really surprised by the amount of people who use goats.
 
goats are the best
 
^ what insane person would not use goats
 
As long as you don't use sheep
 
Not an option
 
boats
 
3:33 PM
@Phoenix For good reason.
 
sheep = evil creatures of Satan
 
inb4 Evil Sheep pops up
 
downgoat has brainwashed us to believe that ∧∧
:P
 
@KritixiLithos :O ;_; oh no, are you one of them? D:
 
s/oh no/ono
 
3:35 PM
don't worry, I'm a human, sheep = food
 
Downgoat is one of the few people to have made a significant lasting impact on TNB culture.
 
definitely
 
@totallyhuman s/h /
 
;-; no golf my sed substitutions
 
wait wouldn't s/h / without the last / work?
 
3:36 PM
no
 
Technically for it to be valid sed it would have to be s/h //
But no one does that for some reason
 
@Phoenix vim allow without trailing /
 
Vim require leading :
 
leading :% to be precise
 
Not if in the comand mode thig
 
3:40 PM
sed is a fun language, unless you golf arithmetic using it and spend two days doing so, in which case it borks your brain
 
@EriktheOutgolfer % only require to replace whole file so if one line you're doing it needed
 
@EriktheOutgolfer the % is only for multiline substitution
ninja'd
 
Discord requires neither leading : nor trailing /
Let's say it'sa discord command
Actually it doesn't allow trialing /, it gets added to the end of the sub
 
discord substitution sucks
it doesn't support regex
 
discord has substitution?
wat?
 
3:49 PM
Edits last message
 
Area51 wants me to commit to the Technical Communication proposal, but idk if I'll be able to submit 10 questions/answers in the three months :/ I only followed it because I'm slightly interested in the topics, and I'll probably need to learn a lot in this area if I'm going to work as a software engineer
@ASCII-only "".match(1)
 
CMC: write a regex that matches both Hello and olleH, but nothing else
 
Don't think you'll get shorter than /^(Hello|olleH)$/
 
Ninja'd
 
hmm yeah guess I didn't think that one through...
we should allow regex golf on ppcg
 
3:59 PM
basically /^(Hello|olleH)$/ is pretty much golfed...
@Mayube we do
 
@EriktheOutgolfer regex golf != regex code golf
 
you mean different regex flavors?
 
1
Q: Regex Challenges

Noah CristinoSo I had an idea to make a challenge where users have to make a regex expression, based on what I give them. Example: test2 FIND test3 FIND test SKIP Then they just answer with the shortest expression they can, but they don't have to use an actual language, just plain regex. Like for this chal...

 

« first day (2326 days earlier)      last day (2502 days later) »