« first day (1765 days earlier)      last day (3068 days later) » 

6:00 AM
Yeah. Only integers for any base greater than 96. That sounds good.
 
Anonymous
6:22 AM
r'([+-]?\d+\.?\d*)([+-]\d+\.?\d*[ij])?' will work for ints, floats, and complex. For ints and floats, you can eval(match.group()) to get the value, and for complex, you can eval(match.group().replace('i','j')) will get the value.
 
25 mins ago, by feersum
Doesn't work for .1
 
ninja'd
 
Personally I find regexes unuseful for number parsing.
 
Anonymous
I don't see a problem with that :P Just require a leading 0
 
That's so verbose.
 
Anonymous
6:24 AM
You're so verbose
 
@feersum I won't be using them to parse, but rather as a "is this a number?" check.
 
Regexes are only really helpful if you can outsource to eval, which won't work if you're trying to allow different bases.
@El'endiaStarman How is that not a part of parsing?
 
I won't be doing the actual work of parsing with regexes...?
I'll be stepping through the given string one character at a time.
 
Exactly.
When you see a digit, you know you have to parse a number.
 
Anonymous
He means interpreting/evaluating vs recognizing
 
6:29 AM
And keep taking chars one at a time until you hit a non-number char.
So using regexes there is redundant.
 
ψ
 
Anonymous
@AlexA. !π
 
Psi not pi?
 
Anonymous
@AlexA. Yeah, that's Phi's sock
 
Hm. Okay.
I meant ψ to be like sigh
Because it amuses me
Way to ruin my dreams, Mego.
 
6:32 AM
New challenge idea! "Calculate Psi(not phi or pi)" where "or" is bitwise or. :P
 
Poll: do you pronounce the p in 'psi'?
 
Silent.
 
No, because you aren't supposed to
 
How do you bitwise-or non-integers?
I do!
 
@feersum Don't, it's wrong
Like it actually is
 
6:33 AM
@feersum Well, considering my last challenge was about phi(x) and pi(x)...
 
If @AlexA. says it's wrong, that means it's right. Yay.
 
I pronounce it like "sai"
 
^ That is correct.
 
^
 
@feersum Bitwise or the binary representations :P
 
6:34 AM
That could be a good challenge for a non-golfing language to win.
Very easy in C, very hard in some language where you can't cast memory.
 
Hmm not necessary...
 
What isn't necessary?
 
Well except the psi part, I dunno what that's meant to be
 
Anonymous
@AlexA. Always glad to help
 
@Sp3000 I don't know either.
 
6:35 AM
*necessarily
 
Anonymous
@AlexA. You obv /s
 
psi has got to be the input.
 
I keep dropping the "il" from "rily" endings for some reason
 
Since we do not want constant-output challenges.
 
Anonymous
psi is the wave function
 
6:36 AM
Of what?
 
👋
^ wave function
👋(x)
 
Anonymous
@feersum I dunno. A photon?
 
Alternatively, 🌊(x)
 
Anonymous
The problem is, most interesting wavefunctions require 4D coords
 
Anonymous
(3+1D technically)
 
6:37 AM
Yes, 3+1=4. Good job, little buddy.
 
Anonymous
@AlexA. Except in physics
 
3+1 overflows in physics because physicists can't use computers?
 
Anonymous
Where ds² = dt² - (dx² + dy² + dz²)
 
Except in physics, where 3 + 1 = 5.124
 
Anonymous
(Minkowski space if I remember my terminology)
 
6:40 AM
@Mego Correct!
 
Anonymous
So it's not quite simple addition of the 4 dimensions
 
Anonymous
@El'endiaStarman yay
 
Anonymous
Someone else who can help explain why
 
@Mego Did you study physics?
 
Anonymous
@AlexA. No it just appeared in my brain one night
 
6:41 AM
ಠ_ಠ
I mean was it your major
 
Anonymous
The 2 years of physics classes in college had nothing to do with it
 
Anonymous
No, though it was almost my minor
 
Almost?
 
Anonymous
At my uni, to get any sort of BS, you had to take 4 science credits
 
Anonymous
I chose to take physics for the majority of them
 
6:43 AM
What was your major? CS?
 
Anonymous
Yep
 
Anonymous
CS major, Math minor
 
toot toot i am a roobat
 
Anonymous
And I was like 2 or 3 physics classes away from being a physics minor
 
Anonymous
@NewMainPosts wut
 
Anonymous
6:44 AM
On the front page, it shows it as being asked by Chipperyman
 
It isn't on the front page.
That shit was deleted, yo.
 
Anonymous
 
Anonymous
And now it's gone
 
Anonymous
I guess the cache strikes again
 
If I had a dollar every time someone asked a calculator-with-strings question... I'd have about $5 right now, I think?
 
6:46 AM
you mean FIVE dollars
 
Canadian dollars
 
Anonymous
FIVE loonies
 
100 rep away from 2000! Sooooo close...
 
Anonymous
@GamrCorps it's not worth it turn back while you can
 
lol
 
6:50 AM
100 rep away from 13120! Sooooo close...
 
False, it's totally worth it.
@AlexA. Wait, did you just pass 13k?
 
Yep
 
Ah! Indeed!
 
Anonymous
@El'endiaStarman Go to the Sandbox when you have 2000, you'll see how not-worth-it it is
 
oh, right, that...
 
6:51 AM
@xnor btw xnor, out of curiosity - have there been any must-pass-these-test-cases-only type questions on PPCG?
I feel like it might be interesting to see some anagol-like exploits for once
 
fixed output ones? :-)
i don't know, i've considered posting ones
well, just saying "as long as you pass the test cases, that's fine"
 
So you describe how it should work and it's okay if it doesn't work like that so long as it works in like 3 specific cases?
 
Anonymous
Whenever I provide test cases, I make sure to specify that it should theoretically work with any input, and those test cases are just there to help people out
 
Well the scenario would be that this is the problem where the test cases came from (to provide some basic intuition), but that the test case system is incomplete and you only need to pass the given ones (or as xnor puts it, "as long as you pass the test cases, that's fine")
 
if input == 1
    output test case 1
else if input == 2
    output test case 2
...
 
6:56 AM
You could do that, but that generally wouldn't be the golfiest way
 
Idk, just seems less interesting to me.
 
This is a good example: has22 on CodingBat in Python.
def has22(nums): return '2, 2' in str(nums) passes all test cases but it's wrong.
nums = [12, 2] is one case where it would give a false positive.
 
What kind of Bat is it supposed to be?
 
Batman
 
Anonymous
@feersum Baseball
 
Anonymous
7:01 AM
Battery
 
@xsot I forgot about m=240. Minutes should still work though?
 
How would it work for minutes?
 
wait, never mind, that doesn't make sense
that's what i get for trying only 3 values
 
The m/2%30 is such an eyesore.
 
The OP changed the input lower bound from 60 to 0 after 28 answers had already been posted. ಠ_ಠ
 
7:07 AM
@xsot Is m%60/2 the same?
no that it changes anything
 
@AlexA. Oh what, that breaks both my submissions.
 
Anonymous
@AlexA. Yeah that's bad on him
 
@xnor I think it's equivalent.
 
@xsot I left a comment telling him to change it back to the original. It's pretty bad form to make changes that invalidate answers after they've been posted.
 
Anonymous
He also changed the acceptable format for round hours, removing x hours as an output
 
7:13 AM
@Mego Ugh, seriously? Alright. I left another comment addressing that too.
 
Anonymous
@AlexA. ಠ_ಠ
 
Why give me the disapproval face? I'm the one trying to keep answers from being invalidated. :P
 
Anonymous
Because seriously
 
Anonymous
That's my standard reaction to anyone who uses that word in a message addressed to me :P
 
Oh right, I forgot.
 
Anonymous
7:21 AM
sure..
 
Anonymous
I believe you...
 
Anonymous
evil mod
 
Language name idea: the
 
Anonymous
@feersum Language name idea: no
 
That's even better actually.
 
7:22 AM
registers it on github
There's a language called FALSE.
That's not as good as No though.
Someone should make a golfed version of PL/I and call it GL/I.
 
Would it be crazy to disallow accepting answers as a matter of policy?
with exceptions for questions that are a single language or have a single language-independent metric like algorithmic complexity
 
I think so, yes.
 
why do you think so?
 
Crapppppppppppppppppppp
I just realized that I've been drinking coffee since 10PM and it's now 11:30PM
We all know who isn't getting sleep.
 
@xnor @AlexA. There is a guy username markshancock that is suggesting the edits
 
7:30 AM
@xnor One of the fundamental parts of the Stack Exchange network is accepting answers. It's not possible to disable that on a per-site basis. If we were to make it our policy to disallow accepting answers entirely, we'd have a lot of explaining to do every time we got a new user from another SE site.
@Sherlock9 What edits
 
The ones that break the hours minutes question
 
@AlexA. so should i take this to be a practical objection rather than a principled one?
say, if magically SE devs would turn off accepting, what would you think?
 
I would still disagree on principle, but I figured the practicality argument is stronger.
:P
 
i see
 
Why do you think it would be best never to accept answers?
 
7:34 AM
it implies that some languages don't really matter
 
How so?
 
since realistically a pyth answer will always be shorter than a python one, a python one will pretty much never be accepted
or a C answer, and so on
 
Why does not being the accepted answer imply that the language doesn't matter?
 
"doesn't matter" is stronger than i meant
more like, are playing a side game
whereas the real game is between those coding in Pyth and CJam and etc
 
Suppose one language solves it with a 2 byte builtin and another works hard to anwer.
It's stupid that the 2 byte answer should be considered better.
 
7:38 AM
I guess the other thing about accepts is that they're pinned to the top, which doesn't really mean much for golfing...
 
It's not inherently better because it's accepted, it's just the shortest answer that complies with the challenge spec. I feel like as long as someone enjoyed putting together an answer in their language of choice, be it Pyth or Java or what have you, then it doesn't really matter whether they win.
Interesting, well thought out answers get upvotes.
 
@AlexA. Can you name any positive aspects to accepting?
 
Declaring a winner is a nice privilege to have
 
That doesn't even make sense.
 
for who?
 
7:40 AM
For the person who can click the button and say, "Hooray you to win," and the person who wins.
No, not at all.
 
they're not choosing then, right?
 
"Choose" was a bad choice of words on my part
Edited above message
 
so are you saying it's a perk for askers?
 
I think so.
Perhaps not a particularly strong one, but I enjoy being able to click the check mark. :P
 
i don't like it as an asker
 
7:43 AM
Is the perk to decide whether to accept the shortets answer, if you like it, but ignore it if you don't like it?
 
i feel that that i'm unjustly ignoring most of the answers
so i've stopped doing it
 
No one says you have to accept an answer.
 
I feel that it is meaningless to compare languages, but having an accepted answer seems to validate certain languages.
 
@feersum No, not at all. The perk, at least for me, is being able to congratulate the person who found the absolute shortest means of accomplishing the task you've laid out with +15 rep.
 
as opposed to just the 10 rep of upvoting?
 
7:46 AM
Yep
For me, upvote = Nice work! and accept = Hooray you win
 
i'm never going to get congratulated though, no matter how good my python golf is, and that's a downer
and, sometimes a person who just ports my python code into pyth will
 
(irrelevant to current topic, but we all think your golfs are cool xnor, nod nod)
 
^
 
thanks!
 
He ninja'd what I was about to say. :P
 
7:48 AM
but your compliment isn't green enough
or check-marky
i just need something to fill the checkmark shaped hole in my heart
 
WE LOVE XNOR
 
aww thanks!
 
Is it a putter?
 
Apparently so
xnor wins the green putter of justice
 
@xnor You're pretty dang good at recursion.
 
7:50 AM
He's pretty dang good at every dang thing I've seen him do on this site.
No joke.
 
@xsot it's funny how much different IO standard lead to different solutions
in my stint on anarchy golf, dealing with lines of input from STDIN made me realize there's a whole new bag of tricks
and it trickles down surprisingly much into the code, not just changing boilerplate
 
I agree, I like how both sites are unique in their challenges this way.
 
would it actually be crazy to let the asker accept what they want?
i do imagine there might be complaints of unfairness
 
user image
2
 
haha
oh no, it's being negated!
 
7:53 AM
26 mins ago, by Alex A.
I think so, yes.
 
Isn't that the output?
 
oh right
i'd find it cool to give a nice checkmark to answer i though was best, as long as i got to choose
 
Bounties are an expensive way of doing that
(expensive in terms of reputation, that is)
 
When you're asking, you could make a different rule for accepted answer.
 
i think there's a particular appreciate you get from coming up with a spec of the solution strategies someone might take
 
7:56 AM
Like lowest length / length of shortest same-language answer on a certain question was mentioned before, I think
 
@feersum would people be annoyed if i just put "I'm going to accept the answer i like most"?
 
Probably.
 
^
It negates the purpose of objective winning criteria, IMO.
 
"i'm going to accept the answer that i think is shortest relative to its language, based on a total eyeballing of it and not any statistics"?
 
With our current site situation, most likely. We've even gotten some people to revert when they accept "the wrong answer"
 
7:57 AM
Well, the objective winning criteria isn't exactly a fair one.
 
In a broad sense, objective == fair
The point of objectivity is to be fair, is what I mean
 
ok, but surely if i gave an objective but totally out there criterion, like "I'll accept the answer that has the least punctuation", people would complain?
how about, if I said, "I'm accepting the shortest Python answer"?
 
Major butthurting from golfing language users no doubt
 
I would consider that unfair. I have a feeling that at least some of the community would agree with me, though I'm sure some wouldn't.
 
I think removing the need to accept answers might encourage people to return to non-golfing languages.
 
8:00 AM
i'm not really proposing it, just trying to juxtapose it with the current de-facto "I'm going to accept the shortest answer in a golfing language"
i feel like people would be annoyed if you said it much more than if it was basically the case, but not stated
 
Some challenges require tasks that golfing languages can't do. For example, I won a challenge that involved the SE API with a ~200 byte Julia solution once. So golfing languages don't always win, they just usually do.
 
Aren't there golfing languages that can download from URL?
 
yes, of course, but i think that tiny minority doesn't justify the overwhelming trend
 
Probably it was only that none of them bothered to answer.
 
and even among that minority, a lot of it seems to be "Mathematica has a built-in", and few people are in the running for that either
 
8:07 AM
tbh, at this rate, even Mathematica's advantage might be dwindling...
 
Seriously is shaping up to be the Mathematica of golfing languages, it seems.
(in terms of standard library capabilities)
 
Code golf is turning into a game of language design.
 
In some ways I think that's true. But I've also learned a lot about language design by seeing golfing language implementations, so that's fun.
 
i think it's a nice competition to have
 
@AlexA. ?
 
8:12 AM
it's impressive what type of things have come out of pushing golfing languages to their limits
i just want to make sure it doesn't create the feeling that these languages are the real competition and everyone else is doing some side-contest
 
In general my view of the site is to just come up with a solution, shorten it, post it, and enjoy the fact that I've made a working solution in my favorite language. I don't feel that competitive. (Could be because I don't know any competitively brief languages :P)
 
On the one hand I've liked seeing how new languages try to come up with golfy ideas (eg prefix notation, blocks), but I'm not too sure wherethe line is between that and "builtins for everything"
 
Yeah.
I think Arcyóu is a neat idea. It's a Lisp-like golfing language (so it's almost guaranteed not to win :P) and it doesn't rely all that heavily on built-ins.
The user's name who made it is bkul
 
@xnor Hmm tbh I'd still golf in Python since it's what I like, but I'm not sure how other users feel about it
 
^
 
8:19 AM
Golfing languages have their place, but I see a trend where they have become the focus of the game, to the extent where poorly golfed answers in a golfing language can draw more attention and awe than well golfed answers in regular languages.
 
^^ "Wow that's short! Can you please provide an explanation?" - first timer seeing a golfing language
Explaining good golfs helps a bit for regular langs, but people still vote weirdly I've given up figuring out how they tick
 
it's hard to overcome the fact that 14 is a lot less that 54
it's the thing people see
 
I can't say for sure as this is a counterfactual, but I suspect I would have been much less likely to join PPCG if there were as many golfing language answers as there are now.
To me it would give the impression "these guys have their heads up their own a****"
 
# Java, 14 bytes
Plus another 83 more because I lied in the header.
2
 
@Sp3000 I actually hesitate to explain my submissions unless someone asks as I find that part of the fun is in figuring out how someone else's code works on your own :)
 
8:24 AM
# Python 2, 80 bytes * 0.2 (language conversion adjustment) = 16 bytes
 
@feersum Why so?
 
Dude. That's a great excuse for not providing any explanations.
I'm going to use that all the time now.
 
Anonymous
@AlexA. <3
 
;)
 
ಠ_ಠ <-- Me every time I see a submission without an explanation, regardless of the language
5
 
8:25 AM
@xsot I've never thought about it that way, tbh - interesting...
 
i'm too lazy for that ...
 
Anonymous
@AlexA. That's why I built an explanation generator into the online interpreter for Seriously :P
 
If I see something in J I immediately know that I won't be able to decipher the code. I'd rather see an explanation that just say "Oh it's short and they posted it so it must work as expected."
 
@AlexA. When there are are those gibberish languages that only 5 people can read it makes it harder for outsiders to participate.
 
@Zgarb you can use 0's and 1's in J for masks effectively: codegolf.stackexchange.com/a/65201/7311
 
Anonymous
8:26 AM
Though I usually try to provide a higher-level explanation of what's going on
 
@Mego Seriously?
 
Anonymous
@Stefnotch ಠ_ಠ
 
@feersum Unfortunately, ditto with your counterfactual, which is why I've kinda refrained posting solutions lately (and kept them on my wiki) :/
 
@Sp3000 What is your wiki?
 
Anonymous
I think golfing in Python is much more rewarding than using a golfing language, because there are so many neat tricks to use
 
8:27 AM
Maybe I'll post if it's really interesting...
 
Does your online interpreter really have that?
 
Anonymous
I love golfing in Python and learning new tricks
 
@AlexA. Just the Github wiki for Gol><>, example programs page
 
Anonymous
However, I also love golfing in Seriously and getting to know my own language better
 
Anonymous
@Stefnotch Yep, though it only provides definitions for individual operations, not an abstract overview
 
8:29 AM
That's pretty awesome...
 
Anonymous
The way I see PPCG is, there are multiple layers of competition going on simultaneously
 
Anonymous
The most obvious one is competing for the shortest overall answer on each challenge
 
And the most important one is chat.
The question is, who's winning?
 
0
A: Sandbox for Proposed Challenges

MegoBernoulli Numbers The Bernoulli numbers (specifically, the second Bernoulli numbers) are defined by the following recursive definition: Given a nonnegative integer m as input, output the decimal representation of the mth second Bernoulli number, rounded to 6 decimal places. Here is the input...

 
Anonymous
Then you have the competition for the shortest answer per language on each challenge
 
8:30 AM
Was Mego writing up that challenge while chatting? XD
 
Anonymous
Then there's the subtler competition between language authors, who are competing to get the shortest answers across all challenges
 
Anonymous
@Stefnotch No, I was writing it up while I was conspicuously absent from the conversation
 
Anonymous
Bets on how long it takes Peter to point out something I missed?
 
@feersum Dennis
 
@AlexA. At chat?
 
8:31 AM
Yes
 
Anonymous
Well in the chat category, there are multiple competitions
 
No
 
Anonymous
Stars, trolling, helpfulness, etc
 
Dennis wins all
 
Anonymous
Doorknob is winning at stars obviously, but he cheated
3
 
Anonymous
8:32 AM
Alex and I are the main contenders for trolling
 
Haha
 
Anonymous
(which means we're in last place for helpfulness)
 
@Mego Note that Doorknob wasn't the one who pinged that message
@Mego I try to be helpful but I rarely have the knowledge to help people who have questions in here
 
Anonymous
@AlexA. Someone else cheating on your behalf is just as bad
 
Anonymous
@AlexA. Same
 
8:33 AM
If you can't help 'em, troll.
 
Anonymous
Martin is probably the most helpful in chat, though Sp and xnor are pretty awesome too
 
One day I swear I'll make a codegolf bingo challenge - must use one LISP-like language, one of [Ruby, Python, Perl, Julia], ...
 
Anonymous
@Sp3000 Bingo multiple-holes?
 
About the Bernoulli Numbers:
Mind adding an explanation of the sequence that an idiot could understand? (I hate seeing those fancy formulas without any other explanation..)
 
Yeah
 
Anonymous
8:34 AM
@Stefnotch Unfortunately that formula is probably the simplest explanation
 
@Mego Bingo, you found all of the multiple holes
@Sp3000 One of Ruby, Python, Perl, and Julia?
How darest thou lump Julia in with the common filth!
 
Be glad I didn't include JS :P
 
ಠ_ಠ
 
@Mego You could try giving an example program/function for the formula...nobody around here can't read code!
 
Aug 4 at 4:10, by Dennis
Hey, if you can't win, troll.
 
8:37 AM
@AlexA. Like purple?
 
What?
 
@AlexA. You know, the color? Do you not know what purple is?
 
No what is purple I've never heard of it
 
Well, it's impossible to explain. So, that's what purple is, you're welcome.
 
its 790–666 THz
 
8:38 AM
I can't win, so I'm trolling (Or attempting to)
 
@Maltysen 666 so metal \m/
 
nah i'm not really that metal its wikipedia:
Violet is the color of amethyst, lavender and beautyberries. It takes its name from the violet flower. On the visible spectrum of light, violet light is at the end, with the lowest wavelength of 380-450 nanometers (in experiments under special conditions, people have so far seen to 310 nm). Light with a shorter wavelength than violet but longer than X-rays and gamma rays is called ultraviolet. In the color wheel historically used by painters, it is located between blue and purple. On the screens of computer monitors and television sets, a color which looks similar to violet is made, with the RGB...
 
@xnor Hmm not accepting from now on seems like a decent idea... Don't think I'll mention it in the post though
 
yes, silently not accepting is pretty convenient
 
Anonymous
@Stefnotch Done
 
Anonymous
8:45 AM
Not golfed, horribly optimized, but done :P
 
I "forgot" to accept, even after you reminded me :o
 
@Calvin'sHobbies you haven't wrote an answer since october!
 
@Mego Great! :D
 
how can you survive?!
 
It think I just trolled @AlexA out of this chat.
 
8:45 AM
@Sp3000 "i'm waiting for more submissions" :-P
 
Win?
 
I can't read Python, but since it is so verbose, it is almost like reading a book! :P
 
@xnor Touche
 
@Stefnotch anyone can read Python
it's like the simplest language out there
 
XD
 
8:46 AM
@Sp3000 Touch
 
Anonymous
The reference implementation will take forever around m=13 because of the horribly-inefficient way of computing factorials and combinations, but hey, it exists :P
 
Anonymous
The Akiyama-Tanigawa algorithm is probably the way to go for that challenge, but it'll be interesting to see what people come up with
 
@Mego which changenge
 
Anonymous
1
A: Sandbox for Proposed Challenges

MegoBernoulli Numbers The Bernoulli numbers (specifically, the second Bernoulli numbers) are defined by the following recursive definition: Where denotes a combination. Given a nonnegative integer m as input, output the decimal representation of the mth second Bernoulli number, rounded to 6 dec...

 
the algorithm description on wiki is weird
for j from m by -1 to 1 do
 
Anonymous
8:59 AM
for j in range(m, 0, -1)
 

« first day (1765 days earlier)      last day (3068 days later) »