« first day (1686 days earlier)      last day (3148 days later) » 

12:07 AM
A: Sandbox for Proposed Challenges

vihanCentering Text code-golf Given a character and a multiline string, your job is to pad the string so they line up among the given delimiter. Examples Input: , Programming, Puzzles And, Code golf Output: Programming, Puzzles And, Code golf Input The input will be a multiline stri...

Wow, I found a nice trig identity.
(cos x + sec x)² + (sin x + csc x)² - (tan x + cot x)² equals...
@Mauris Done.
Thank you!
Q: Objective winning criteria added, may I ask for reopen?

peterhI am asking about my this question for reopen - or an explanation if it is still offtopic. A further problem what I can see, that - although it is not language-specific -, the question effectively still reduces the usable languages to the C-like procedural solutions. As I can see, many of you li...

12:26 AM
2 rep points away from 1k :D
12:51 AM
Q: Write a panic script to remote secure a Mac Pro from an untrustworthy local user

jvriesemThe Situation Suppose I allow "Shady Sam" admin access on my workstation to perform an important administrative task on my Mac Pro for me by giving them a temporary root login password. (Assume they were trustworthy, perhaps a systems admin for my company.) From a remote location (e.g. home), ...

YAY! I hit 1k! Thanks guys :)
I have some simple code blocks working in my new language.
1:31 AM
They aren't true lambdas yet, I need to figure out a way to put "variables" inside of them.
1:50 AM
@TreFox Congrats! I just hit 1K on Tuesday :)
@TreFox Congrats!
@ETHproductions Congrats!
2:15 AM
@Mauris The word-search leaderboard had a bug, but now that it has been fixed, you are leading by 19k. That may sound backward, but no, it's not. :P
@ETHproductions 19k sounds impossible.
It's a margin of 3407%. Go figure
Here, see for yourself:
Q: Let's make a word-search!

YpnypnIn this challenge, we will together create a word-search containing many programs in different languages. I have started us off with a grid of 60-by-25 blanks (·), some of which are replaced by the characters of a Ruby program. To answer, choose a language that was not yet used. Using your chos...

Isn't the maximum score for each post 30, if just one character is added?
Yes, but apparently, your total score is multiplied by the number of answers you have.
Then 19890/30 = a minimum of 663 answers
2:19 AM
Makes no sense to me, but I decided to play by the rules.
Your total score is the sum of the scores for all of your answers, multiplied by the number of answers. Highest score wins.
oh, was that multiplication added after the sandbox post?
I suppose; I didn't see the challenge at all in the sandbox
I've just suggested adding 20 to each score instead of squaring the whole thing. (see my second-to-last comment)
Yeah, the multiplication was added sometime during the sandbox process.
Perhaps each number should be multiplied by (the votes on the answer +1) instead.
Then the clever, fan-favorite answers would score more.
What I would have done is change 30/number to like 5/number or something.
If he wanted to give more value to writing many answers over 1 or 2 really short ones.
2:25 AM
Nah, that wouldn't have changed the margin of leadership of Mauris, just divide everyone's score by 6
^^ that
Without doing the multiplication by number of answers.
Ah, yes
It still wouldn't change the divide by 6 part, if you just dropped the multiplication
Yeah, division isn't what I was thinking about.... hold on a sec...
You could do (sum of 5/answers) + (# answers)
2:32 AM
Nice, a 19k lead.
@MartinBüttner Alright. Dennis challenge on the way.
Well the current scoring mechanism is (average answer score) * (# answers)^2
@Dennis Will your avatar be staying as is or will you switch back to the fractal again?
Which means that it's not a linear scoreboard.
@Calvin'sHobbies I'll be Dennis the Menace for the foreseeable future.
2:35 AM
I assume CH would have made a fractal-drawing challenge.
Ok. (Though we already had a perfectly good comic strip referenced by our top users... :P)
Haha. My dad named me after Dennis Mitchell. It was just a matter of time. :P
If you ever have a son you should name him Mr. Wilson.
"Mr." as his first name.
"Wilson" as the middle name.
2:48 AM
@PhiNotPi Yeah. I've got a decent Dennis idea going but he's trickier than NinjaMonkeyBear.
@Calvin'sHobbies Is it to mess around in Mr. Wilson's basement before he finds you and gets pissed?
I just read about how the TSA's master luggage keys have been "leaked"
3:07 AM
I thought you only read about vexilology.
That was literally over 2 months ago.
I thought it was only figuratively over 2 months ago.
By, "leaked" I mean the keys were shown in a photo published by an online newspaper.
So people now know that they have master luggage keys?
3:11 AM
There's TSA-approved luggage locks. The whole point was that the TSA would have a master key, so that you can keep your luggage secure from random people without preventing the TSA from being able to open it.
Off topic but does anyone else associate Phi with a sith lord?
Oh. That's a worse issue that I would have though.
Everyone already knew the TSA had master keys to TSA-approved locks, but now everyone with a 3D printer can make a master key too.
To be honest, the locks never served as any protection against somebody who really wanted to get in your stuff, just against crimes of opportunity.
I've been browsing Google Image search results for "phi sith"
There's weird stuff in there
Like the tanktop I posted
How do you guys pronounce "phi"? I say it like "fee."
to rhyme with pie
3:18 AM
It's supposed to rhyme with pie. Edit: well, depending on who you ask
Not if you say it right.
To match Phinal Destination
Phinal Phantasy
I say /faɪ/ in English, but /fi/ in my native language.
3:20 AM
I was actually practicing making a tour video of the PPCGMC server today and I always said it the pie way
A lot of the Greek letters are not pronounced the same way by, say, English-speaking mathematicians, as by actual Greeks.
@Mauris What's your native language?
@PhiNotPi Yes
A part of my heritage (~1/8?) is Greek but the only remaining family from that side of the family doesn't know Greek.
I speak Belgian Dutch (Flemish) natively, hoi!
(I don't know what that means, but I'm acknowledging your response)
3:24 AM
It's a bit of a confusing language situation. It's basically a dialect, and in writing it's indistinguishable from Netherlands Dutch. The differences lie only in a handful of words
Ah, okay. So if you and orlp were to speak Dutch in here together there would be no barrier at all, only if you spoke to each other?
I can understand speakers from the Netherlands perfectly, and they could understand me; if you move west a bit in Belgium you run into West Flanders, where the local dialect is a bit more inscrutable, and they'd have to enunciate a bit more
And it's a spoken difference only?
Yeah. Plus, spoken language in lots of Flemish dialects uses lots of words that differ from Standard Dutch, but nobody writes like that
I'm from Antwerp, which is close to the Dutch border. I dunno where in the Netherlands orlp is from, but if we spoke to each other, it'd be a bit like American vs. British English. Not a huge difference, mostly vowel position stuff
Oh, alright. Then again, my aunt's husband and his kids are British and I can't understand a single word his son says. :P
3:32 AM
Haha, yeah. Dialects are crazy. There are British English dialects that still use "thou"!
3:59 AM
Well, nobody can say that this site isn't educational! I just learned a new word: dastardly. Someday I'll figure out this whole English thing. When I first saw it, I thought it was just a variation of "bastardly" (which probably isn't a word, but it should be).
It really should be.
Is "dastardly" a commonly used word? Pretty sure I had never heard it.
It's a little bit archaic nowadays but I think it's still said occasionally when people are trying to jokingly sound dramatic.
If the web site I found is reliable, it's rank 28,052. I figure that's supposed to be a ranking of English words by frequency.
I wonder what data it uses to determine frequencies.
But regardless, out of all of the English words, #28,052 sounds a little generous. :P
4:08 AM
This is the site I came across: wordandphrase.info/frequencyList.asp.
What has been said cannot be unsaid.
Who? What? Nobody said anything.
I actually don't have much insight into American universities. I happen to know where that one is, must have heard it mentioned somewhere.
It's pretty ubiquitous in the US. I guess they have satellite campuses in other states as well.
They call themselves the cougars? Must have chosen the name when it meant something different.
Haha XD
4:24 AM
Apple stopped naming their OS releases after cats way too early. There were many great options left. Cougar being a very obvious one. I was also very much in favor of House Cat.
According to my girlfriend, "Cougar" was registered by Apple but never used.
OS X House Cat would have been perfect!
4:41 AM
OK, that was fun.
A: A Program that Print Programs

DennisCJam, 4.56 × 10526 2D#2b{"\256b_(256b:c'\s`_:(er`":T~{;38'ÿ*`{:T~{;63'ÿ*`{:T~{;88'ÿ*`{:T~{;114'ÿ*`{:T~{;140'ÿ*`{:T~{;166'ÿ*`{:T~{;192'ÿ*`{:T~{;219'ÿ*`{Q?\"_~"}s(\T}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}s(\T`}?\"_~"}_~ Exact score: 254219 + 254192 ...

I'm fairly certain that I should compress the source code at some point, but the explanation will be long enough as it is.
I do miss the long string of ÿ, admittedly.
Don't worry, you get it back after 5 * 10^461 iterations. :P
Oh good
4:57 AM
That's going to take a while. Supposedly there are only about 10^80 atoms in the universe. Which seems like surprisingly little. I looked it up after getting about 10^160 solutions in a performance challenge.
5:52 AM
Hey little magpie, you still awake?
Haha aww
@AlexA. how so?
@orlp It's visually amazing. It looks so clean and fancy.
I'm just generally impressed by it.
@Dennis You seem to be the king of horribly large programs (and numbers)
5:58 AM
And small programs. He's an expert golfer.
Not even close.
A: Largest Number Printable

Peter TaylorGolfScript; score at least fε_0+ω+1(17) / 1000 Following r.e.s.'s suggestion to use the Lifetime of a worm answer for this question, I present two programs which vastly improve on his derivation of Howard's solution. They share a common prefix, modulo the function name: ,:z){.[]+{\):i\.z={.z+.({<

What the hell is that after the f?!
Satan math
I see. A function of brimstone
A freaking huge ordinal.
In mathematics, the epsilon numbers are a collection of transfinite numbers whose defining property is that they are fixed points of an exponential map. Consequently, they are not reachable from 0 via a finite series of applications of the chosen exponential map and of "weaker" operations like addition and multiplication. The original epsilon numbers were introduced by Georg Cantor in the context of ordinal arithmetic; they are the ordinal numbers ε that satisfy the equation in which ω is the smallest infinite ordinal. Any solution to this equation has Cantor normal form . The least such ordinal...
6:02 AM
user image
That's more than 90%!
@Dennis Do you do maths professionally?
No, he does math professionally.
Yup. Just finished my PhD.
Good night, everybody!
6:03 AM
Ahh cool. Night
@Dennis tbh
that question is just bad
Still don't understand how Peter has such an in depth knowledge of maths
oh wait
there's a maximum codelength of 100 bytes
@BetaDecay His degree is actually in computer science, not math. I figured he had like a quadruple PhD in mega math.
6:05 AM
then I don't understand the reason for the 1 / b^3
@AlexA. How did you know his degree? ;)
I've chatted with him a couple times about it in here
He has a master's
@BetaDecay I asked him about it before. He said he read a few books, but mainly learns from online resources, the math stack exchange, etc.
Don't you have a PhD, @Reto?
Yeah, but in computer science.
6:09 AM
From ETH Zurich?
That's still super awesome
:O ?
In amazement
6:10 AM
Of what?
Reto's accomplishments?
If so, then I agree: :O
It was actually a kind of unusual PhD. It was not really core computer science. I was in a biophysics group (Prof. Wuthrich, who got a Nobel Prize in 2002), and worked on software and computational methods there.
Allow me to reiterate the sentiment of the cartoon bear several messages up.
I had done my diploma thesis with Prof. Wirth.
Mainly known for creating Pascal, and some other programming languages.
Oh, he created Pascal???
He was involved in Algol earlier, which I believe was the first structured programming language. Then created Pascal, Modula-2, etc.
6:15 AM
That dude has certainly left his mark on history.
Niklaus Emil Wirth (born 15 February 1934) is a Swiss computer scientist, best known for designing several programming languages, including Pascal, and for pioneering several classic topics in software engineering. In 1984 he won the Turing Award for developing a sequence of innovative computer languages. == Biography == Wirth was born in Winterthur, Switzerland, in 1934. In 1959 he earned a degree in Electronics Engineering from the Swiss Federal Institute of Technology Zürich (ETH Zürich). In 1960 he earned an M.Sc. from Université Laval, Canada. Then in 1963 he was awarded a Ph.D. in Electrical...
Wow, the closest I've come to a CS pioneer is possibly sleeping in the same bed that Bjarne Stroustrup slept in while he was doing his PHd :P
@Peter's ears were burning :P
They actually developed their own computers as well. Dennis would have liked it, since the CPU itself was stack based. :) No registers.
@BetaDecay When I got halfway through that sentence I thought you were saying that you had a sleepover with Bjarne Stroustrup.
6:18 AM
@AlexA. That too. But it ended badly so we don't like to talk about it
I ran into Fred Brooks (of "The Mythical Man Month" fame) in a parking lot once. Funny story.
@RetoKoradi I would ask you more about this stack based CPU but for now I must sleep.
Goodnight all!
@AlexA. Gn8
6:28 AM
@BetaDecay I don't. I have a superficial knowledge of a few areas, and I lean on references.
Mm. I suppose I have no reference point...
@BetaDecay What were you up at Churchill for?
There was a chemistry camp kind of thing which my teacher suggested to me to go to
@PeterTaylor When I read this answer here, I was convinced that you were an all out mathematician, until you started denying it: codegolf.stackexchange.com/questions/51266/…
@PeterTaylor Did you go to Churchill?
6:39 AM
regex = element*
element = repeater | choice | grouping | nbracket | bracket | token
repeater = zero_once | zero_many | once_many
zero_once = element '?'
zero_many = element '*'
once_many = element '+'
choice = element '|' element
grouping = '(' element* ')'
bracket = '[' bracket_char* ']'
nbracket = '[^' bracket_char* ']'
bracket_char = '\]' | asciichar
token = escaped | dot | asciichar | empty
escaped = '\' asciichar
dot = '.'
empty = ''
asciichar = <any ASCII character>
for my upcoming regex challenge
.?* seems valid
@Sp3000 it is
Is there some assumed convention for resolving ambiguities?
@feersum left-most
Then nbracket should be before bracket?
6:44 AM
@feersum correct
So... is this supposed to be a separate grammar altogether and not reflecting PCRE/etc.?
@feersum it is though
@feersum I just made it slightly unclear by accidently changing the order of the lines they're defined in
@Sp3000 correct, it's simplified
I see, in 'element' not the separate lines
How does [^] resolve?
for example, a? could be two tokens, each with asciichar a and ?, but because repeater is to the left of token, it should be parsed as a repeater
@Sp3000 it's nbracket with no containing bracket_chars
@Sp3000 because nbracket comes before bracket
6:47 AM
You should totally allow built-in regexes and see how many broken answers you get from people not noticing the differences.
@feersum would still simplify answer
@feersum it would just be a 'parse into AST, transform AST into my languages regex flavour, run'
I doubt building AST would be the shortest approach in many languages
I await the answer that uses builtin regexes before unloading )([^]**?*+)[ on them
Oh, even ??? is allowed
@feersum that parses to repeater(repeater(repeater(token('')))) if I'm not mistaken
6:51 AM
this grammar is not ambiguous right?
Repeater is before choice... then would a|b* parse as (a|b)* ?
that's a mistake
choice should be first
regex = element*
element = choice | repeater | grouping | nbracket | bracket | token
choice = element '|' element
repeater = zero_once | zero_many | once_many
zero_once = element '?'
zero_many = element '*'
once_many = element '+'
grouping = '(' element* ')'
nbracket = '[^' bracket_char* ']'
bracket = '[' bracket_char* ']'
bracket_char = '\]' | asciichar
token = escaped | dot | asciichar | empty
escaped = '\' asciichar
dot = '.'
empty = ''
asciichar = <any ASCII character>
although I guess grouping should come before THAT
e.g. (a | b) should not be choice('(a ', ' b)')
same with nbracket and bracket
Unmatched parens, another trap for builtin regex users
damn I can't edit my message
regex = element*
element = grouping | nbracket | bracket | choice | repeater | token
grouping = '(' element* ')'
nbracket = '[^' bracket_char* ']'
bracket = '[' bracket_char* ']'
bracket_char = '\]' | asciichar
choice = element '|' element
repeater = zero_once | zero_many | once_many
zero_once = element '?'
zero_many = element '*'
once_many = element '+'
token = escaped | dot | asciichar | empty
escaped = '\' asciichar
dot = '.'
empty = ''
asciichar = <any ASCII character>
(obviously this is only the parsing specification, afterwards I will specify what each parsing element matches)
7:03 AM
So ([) would match a literal [ right?
yeah, this is pretty different from normal regex
New screw-with-regex-users test case: ` ?*+)([][^][]])++\ ` :D
@feersum correct
this is not a DCFG however
consider the string (aaaa with any amount of as
and then at the end possibly a single ).
(or in the regex language I described above, \(a*\)?, or \(a*)? if you so prefer)
How does [][] parse, anyway?
the parser can not determine at the first ( with any amount of finite lookahead whether it should be a token or a grouping
@Sp3000 hrm, that's something I was going to clarify in the specification below, but I guess I should include into the grammar
Seems pretty clear that it's 2 pairs of empty brackets, no?
7:08 AM
bracket_char = '\]' | <any ASCII character except ']'>
It could be bracket with ][, depending on if regex = element* is greedy or nongreedy
@Sp3000 does my new rule solve your issue?
How does [\] parse?
I think it might need to be '\]' | '\\' | <any except ']' or '\'>
Wait... hmm maybe not
7:13 AM
If you allow ([) you might as well allow [\] :P
@Sp3000 it would parse as bracket('\')
basically the parser would first see the [, so try to parse as nbracket, but no ^ follows so it backtracks and gets to bracket
then it will try to parse as \], but that would fail bracket, so it backtracks and parses as \, which then completes the bracket succesfully
I edited out the token, there are no tokens inside brackets
So it's not anything like regex = element* trying to maximise the number of elements parsed?
@Sp3000 * is greedy
but it will not go beyond valid parsings
in ebnf, something* gets replaced by something_star
So it'll never reach asciichar escaped?
then something_star = something something_star | ''
7:17 AM
What is this, hyper-extended BNF?
@feersum no, regular EBNF
How is ||| parsed? (sorry for bombarding random test cases, this is amusing)
I mean, I can write the grammar without *
regex = elements
elements = element elements | ''
element = grouping | nbracket | bracket | choice | repeater | token
grouping = '(' elements ')'
nbracket = '[^' bracket_chars ']'
bracket = '[' bracket_chars ']'
bracket_chars = bracket_char bracket_chars | ''
bracket_char = '\]' | <any ASCII character except ']'>
choice = element '|' element
repeater = zero_once | zero_many | once_many
zero_once = element '?'
zero_many = element '*'
once_many = element '+'
token = escaped | dot | asciichar | empty
I think [|]a parses as choice... awkward
hrm, actually, it might be that * is fully greedy and will parse [\] as 3 tokens
@feersum bracket comes before choice
7:22 AM
nvm, misread it
@Sp3000 actually, those are three choices
||| is choice('', choice('', choice('', '')))
Why is it not choice('|', '|')?
@Sp3000 because we choose the leftmost derivation
So... when doing choice you choose the leftmost |?
OK, [|]a doesn't parse as choice, but what about a[|] ?
Choice is before token now
7:25 AM
hrm, I don't exactly know
wait, I do know
@feersum first the parser matches a to a token
actually, hrm, I don't fully understand it
But choice is before token in elements
Choice might need to be its own separate line
So it should be choice(token('a')token('['),token(']'))
7:59 AM
@aditsu I would take some gum .. :)
8:51 AM
you're given two (distinct) values out of {0, 1, 2}. If you consider them as a cyclically adjacent pair, is there an elegant way to figure out which of the two values comes first? i.e. if the inputs are 0 and 1 (in any order) return 0, if they are 1 and 2 (in any order) return 1, if they are 0 and 2 (in any order), return 2.
I've come up with (7-a-b)%3, but this is not for code golf so I was wondering if there's something less obscure
@MarcDefiant Ok no then we probably do not know eachother, I only thought of this because I met a "Marc D." with a programming affinity at uni=)
@MartinBüttner [a, b][a < b if abs(a-b) == 1 else a > b]
booleans as 0,1 ftw :)
hm, I'm using Ruby
[a, b][(a < b) ^ (abs(a-b) == 1)]
neat, but not exactly less obscure
9:00 AM
might just go with mine and add a comment
what is your goal here
a bit of readability without spending many lines of code on a rather trivial computation
you could do
r = a
if (a < b) ^ (abs(a - b) == 1): r = b
well yeah, that's essentially the same as before, minus boolean indexing which I can't use anyway
9:07 AM
@MartinBüttner b if (a-b)%3 == 1 else a
this is nice
I should have posted this as a code golf :P
9:23 AM
9:34 AM
(7-a-b)%3 still the shortest
might not be incredibly difficult to bruteforce all expressions shorter than it
10:03 AM
Q: Find the maximum digit occurred in a range of prime numbers

alienCoderFind the maximum digit occurred in a range of prime numbers. For example: Range ( 21 -40) –>Prime numbers are 23,29,31,37,39 ( 2 occurs 2 times, 3 occurs 4 times, 1 and 7 occur 1 time and 9 occurs 2 times ->Answer is 3)

10:55 AM
Q: Cake! It's somebody's birthday

James WebsterI hear somebody was very selfish on their birthday, demanding cake from everyone and there were no plans to share! 🎂 It's bound to be somebody's birthday today, so why not bake them a cake. Use your favourite programming language to make a delicious cake, with a nice "Happy Birthday" message as...

11:16 AM
@NewMainPosts This question has been edited so that time complexity is the scoring criteria, but is that good enough?
I'm not sure if we'll have any problems with incomparable complexities or something
left a comment
Looks good :) didn't realise tag wiki already had those
It's atrocious. It's beautiful. I proudly present to you: Hexagony
11:47 AM
Interesting wrapping method. I'm trying to visualise whether that makes the edges undetectable from inside the grid.
well due to the special treatment of the corners, it should be possible to detect them
It seems like it gives the board width 11 in any direction from any point, apart from the corner rule
The unthinkable happened:
Q: Add left margin to time in chat messages

Martin BüttnerI just saw this in a chat message and recoiled in horror: Could the CSS of the .timestamp class get a margin-left of a few pixels?

2 hours? That must be some sort of record
Ah I see - there is only 1 long width so it can't cover both the short widths without a decision.
11:52 AM
@trichoplax if you picture the wrapping by repeating the source tile, the catch is that the edge rows of adjacent tiles overlap
Q: Z̡̬a̧̯̔l̆̓g̛̘̟o̡ generator

FatalizeWrite a program or function that transforms an input string into Zalgo text. For example, for an input string Zalgo, a possible output might look like: Z̗̄̀ȧ̛̛̭̣̖̇̀̚l̡̯̮̠̗̩̩̥̭̋̒̄̉̏̂̍̄̌ģ̨̭̭̪̯̫̒̇̌̂o̢̟̬̪̬̙̝̫̍̈̓̅̉̇ Zalgoification specs Each letter (uppercase or lower) must be zalgoified, a...

@MartinBüttner Our previous chat feature requests clearly didn't have enough emotional content to trigger a fast response...
Lol I hadn't seen that one. Maybe the longer wording requires a few extra emotional words to bring the ratio up
12:00 PM
A wild cjfaure appeared.
just yesterday I was thinking/speaking of you ;)
ah yes :D I'm glad my utter laziness is still remembered
@MartinBüttner I think I see the problem. The fixed one was tagged , whereas the other is tagged . Feature requests are more fun to work on than bugs...
12:33 PM
@trichoplax apparently ;)

« first day (1686 days earlier)      last day (3148 days later) »