« first day (1699 days earlier)      last day (2804 days later) » 

5:00 AM
Also, how in the world do we not have a Euclid's golf yet? I could have sworn we did, but if so my search-fu is failing.
 
@Dennis I stand humbly corrected.
 
I love that the first result for that is Write a code golf problem in which Java wins :D
 
@Dennis Just using the word Java in the answer does not count. ;) One of the first search results: codegolf.stackexchange.com/questions/51871/…
 
I'd also think Processing doesn't count as "Java", but maybe I'm just a purist :)
 
5:05 AM
I thought Processing was its own language?
 
It is to my mind. A few users have tried to convince me to use it in my Java answers (esp on gfx challenges) to "golf it down", so I'm not sure everyone agrees.
 
Haha, I'm the user with the most accepted "Java" answers to code golf challenges.
 
That's just because you mention CJam's java interpreter too often :P
 
3 in CJam, 1 in Bash. whistles
 
@Geobits I never know how to phrase it :/
 
5:09 AM
@ZachGates In the only challenge I've posted so far, I just said that the input can be taken through any method desired (except hard-coding).
 
If you don't have a specific input method that you want to enforce, you can use this list from meta. It's fine to be more specific, I just tend to participate more often in more open ones (and I assume at least some others are like-minded).
 
^
 
I definitely prefer making input and output whatever is convenient to the user because then the focus is more on the actual problem/puzzle/etc.
 
You have to be somewhat careful, depending on what you're trying to achieve. I've seen challenges where the input was wide open, and people found very creative ways of defining the input that simplified the problem for them. Which might be fine if you want to recognize the creativity. But if you wanted the focus on the problem itself, it could be undesired.
 
@RetoKoradi Examples? I want to form an opinion on that.
 
5:12 AM
I just made an edit. I think it improves it.
 
That's true. For many inputs it's no issue (like a simple list of ints, etc), but some cases are hard to spot in advance.
 
@El'endiaStarman I was afraid you would ask for examples. ;) Let me see if I can remember one...
 
A favorite hypothetical example is to use unary input on a challenge to add two numbers
 
There was the hypothetical in chat the other day: "My language only takes integer input via a list of prime factors" or something like that :D
 
In ascending order, no doubt :P
 
5:15 AM
I'd like to read the integers i and j as i j]$~_{2$1$:G1$1$md}h]7>4/"=( * )+ "N+S/f.+G, please.
 
That sort of thing shows up with specifications like "Instead of A and B, you may use any two distinct strings..."
 
@Dennis Honestly, I'm not sure what that means..
 
Pretty sure that's a whole program. Makes it trivial to write the "real" program that actually executes it.
 
If input may be taken in any form, I'd like it followed by the code I need to solve the problem. ;)
 
@ZachGates You're not the only one.
 
5:18 AM
2
A: A Euclidean Algorithm

DennisCJam, 46 43 bytes q~]$~_{2$1$:G1$1$md}h]7>4/"=( * )+ "S/f.+G Try it online in the CJam interpreter.

 
@El'endiaStarman Ok, this is not an extreme example, but it might somewhat illustrate where I was going. Look at aditsu's answer here: codegolf.stackexchange.com/questions/54105/…. While the problem is specified as having 3 inputs, the answer defines the input format as the 3 strings concatenated into a single string.
Which was very clever, and completely in the spirit of code golfing. But maybe not what the OP (which happens to be @Dennis) had in mind.
 
43 bytes for Euclidean algorithm ???
 
@Dennis It seems like you're pointing out a flaw in my phrasing, but I can't be sure
 
I think that's how long it is in C.
 
@Dennis OH. Now I see what you're saying..
 
5:21 AM
@feersum Most of it is probably for generating the step-by-step output. Just producing the final result would be very little code.
 
No, that isn't allowed, haha
 
@ZachGates I've seen people embed code in their "input format", so I usually try to be explicit in my challenges. Something like You may read the integers as such, an array of integers or a string representation thereof..
 
lol, I didn't actually read the challenge.
2
 
@Dennis Fixed it. (I think)
 
@RetoKoradi Hmm. I feel like that doesn't quite count. The spec ends up defining b and B in such a way that they are one character each. Thus, given bnB, it is entirely possible to extract the three numbers from it. So I think that is a valid input method.
 
5:24 AM
To be fair, that's exactly what I had in mind when I wrote the challenge.
 
I would agree if it didn't explicitly say "Accept three strings as input:"
 
@Geobits You may read the three strings in any convenient order, as such, an array of strings, a string representation thereof, concatenated or separated by single-character delimiters of your choice.
 
Ah, I missed that. Was expecting input rules in the input section :)
I've seen better examples anyway, but they're really hard to search for. is:answer input form is a pain to sift through.
 
@El'endiaStarman It's absolutely valid, and apparently what Dennis was looking for in this case. My general point is that if you leave the input rules too wide open, you risk that people will do something that is not what you wanted.
@Geobits Yes, it's not the ideal example. But the only one that came to mind at the moment.
 
@RetoKoradi Definitely true. I just don't know how much of a worry it really is. I'll just be safe from here on out though and do something like Dennis' method to disallow code/etc.
 
5:28 AM
This might be a good example:
7
A: Find the odd character out in a pattern

DennisBash Perl, 231 229 218 178 164 166 138 106 74 bytes /^(((.*).*)\2+)\3$/;$_.=$1x2;$.--,die$+[1]if/^(.*)(.)(.*) .*\1(?!\2).\3/ The script requires using the -n switch, which accounts for two of the bytes. The idea of appending two copies of all full repetitions of the pattern has been taken fro...

You must output the (zero-based, starting from the top left) coordinates of the odd one out. For example, in the above input, the corresponding output is 4,2. You may also output 4 2, or "4""2", or even [[4],[2]], or any other format, as long as you can tell what the output is supposed to be.
 
I'm off to bed. Have to be up at 6 /:
 
I chose 4 at script.pl line 1, <> line 2..
 
...you output the answer by throwing an error?
That's clever. And definitely something I would disallow.
 
Well, in R, stop() is shorter than return()...
 
I've been tempted to System.exit(n) several times rather than print to STDOUT.
 
5:33 AM
@El'endiaStarman We now have defaults for I/O that forbid using STDERR for output, so it wouldn't work anymore.
 
What if I made a language where all output was to STDERR?
Could I never use it here?
 
There are language like that.
 
:O
Which, and why?
 
I think if you did that we'd find a new disparaging tag to star.
 
I... don't know what you're talking about. >.>
 
5:35 AM
There are languages that don't write to either. I think? JavaScript, I figure?
 
4
A: The Programming Language Quiz

jimmy23013Gnuplot, 51 bytes, cracked by Sp3000 set timestamp "off"; f(x)="Hello, World! print f(1) Edit: I just realized that it printed to STDERR. But arguably that's the closest alternative.

 
Damnit, someone else starred the tag now. :/
 
Tag?
 
See starboard.
 
Yes, you win the star competition! Are you proud?
 
5:37 AM
fights urge to pin tag
 
Don't fight it man :D
 
@Dennis ಠ_ಠ
 
False-eyelash-guy makes another appearance.
 
Quoi
 
5:43 AM
Quit Using Obscure Initialisms?
3
 
Can't stop, won't stop ಠ_ಠ ಠ_ಠ ಠ_ಠ
PEACE
 
People Exist As Creepy Emoji
3
Aww, we pushed the tag off the board. Now it really does need to be pinned :P
 
@Geobits It really does annoy me that there's not a scroll bar or functionality over there.
 
Yea, on my laptop it's not so bad, but on my desktop I have 3-4 inches of dead space where more stuff could be.
 
Done. :P
For some reason, I had to click unpin this message to pin it.
 
5:50 AM
With that accomplished, I think I can go to sleep in peace.
 
6:08 AM
Hey @MartinBüttner did you find anything wrong with FizzBuzz? :)
 
7:04 AM
This seems potentially promising:
5
A: Are Stack Snippets a good enough reason to increase the 30k post limit?

ᔕᖺᘎᕊThis seems to not be a restriction of the database. On Code Review, it seems the restriction has been doubled, as per @ChrisJester-Young♦'s comment: I just upped the MaxBodySize limit, so you should be able to have the whole code in the question body. For Code Review, I believe it's importan...

Maybe we need a site specific feature request on our own Meta?
 
This is pathetic. You should be grateful for the opportunity to golf your oversized posts! :P
2
 
I know Calvin's Hobbies had to golf both the code and the spec for some of the Stack Snippets KotHs. I'm half considering writing a KotH and then posting the controller as a golf before then using the result to post a KotH
 
Everyone loves a KOTH in which a single round takes 100 years to run.
 
7:19 AM
"The leaderboard will be updated shortly after the heat death of the universe"
 
7:43 AM
That awesome feeling when your (my) Befunge answer is just under half the size of its competitor.
 
0
Q: Should we increase our post character limit to allow substantial stack snippets?

trichoplaxCalvin's Hobbies posted on Mother Meta about increasing the character limit for posts across the Stack Exchange network. This answer shows that it is possible to increase the limit from the standard 30,000 characters for individual SE sites, and this has already been doubled for Code Review. To ...

 
8:23 AM
@MartinBüttner I wasn't aware of that rule, and I'm certain it's not always valid.
For example it's common practice to post decent but not fully fleshed out approaches to hard s
 
EmoGolf, it's the new new thing
 
I could delete said answer, but I'm not certain if it's hurting anyone or anything. I just found the simple stack based parsing method pretty.
 
8:41 AM
I'm working on my CS lab (C++). It works in windows, but not on g++. Apparently g++ doesn't allow me to call function(std::istringstream{ "some string" }); when function expects a std::basic_istream<char> &. I have no idea what is going wrong here...
 
@orlp If you golf it, you can still leave the readable version in the answer...
 
@Justin Did you pass the -std=c++11 switch?
 
@feersum Oh, let me double check.
 
@trichoplax I already posted 2 golfed answers to that question
 
@orlp Not questioning your effort - I think the only problem is the example it sets. I can see that code being displayed either alongside its golfed form, or edited into another answer for the same language, to say "I like this pretty approach but it turned out not to be the shortest"
 
8:46 AM
@trichoplax I'll do that
 
@feersum Yes, I did. g++ tells me this (cropped): ^
no matching function for call to ‘lexer::Lexer::Lex(std::istringstream)’
lexer_test.cpp:43:35: note: candidate is:
  lexer.Lex(istringstream{ string });\
In file included from lexer_test.cpp:1:0:
lexer.hpp:27:8: note: void lexer::Lexer::Lex(std::basic_istream<char>&)
   void Lex(std::basic_istream<char> & inputStream);
        ^
lexer.hpp:27:8: note:   no known conversion for argument 1 from ‘std::istringstream {aka std::basic_istringstream<char>}’ to ‘std::basic_istream<char>&’
Wonder if it has to do with the reference.
 
@Justin you're passing a temporary into a function taking a non-const reference
 
@orlp I didn't realize that wasn't legal...
Why does the Visual C++ compiler have to hide these problems! Ugh.
 
@Justin because it sucks
using gcc on windows
 
I should figure out how to do that with visual studio. But now I just want to finish my lab and sleep (it's 3 AM here. been working on this lab for a really long time today)
 
8:54 AM
@Justin I don't think that's really possible
 
@orlp Using gcc with Visual Studio? Then I'd have to find another C++ IDE...
Maybe the one by JetBrains would work.
 
@Justin vim :P
 
@orlp I avoided vim because I need tools like a debugger, code hints, IntelliSense (whatever that's called, where the comments are looked up on mouseover or something similar). I don't know how to configure vim.
 
@Justin and today will be the day where you start cursing the world for not developing good tools like such as standalone applications
 
@orlp What would make it not a temporary? Would doing this work: std::istringstream stream{"value"}; function(stream);?
 
8:58 AM
@Justin yes
 
Okay. Sorry for the dumb questions. I've spend the last 12 hours straight working on this lab.
 
although I'm not certain why you need a non-const reference to an istringstream
 
Reading from a stream changes its state
 
@orlp It could just be that I'm coding in bad style. But I want to have an input stream, which I read from.
And I wanted it generic so that both an ifstream and an istringstream would work (for testing purposes).
 
@feersum I guess, yeah
I generally only pass output streams around, though
 
9:01 AM
I might change it to just take a string as input.
@orlp Hooray! It compiled and ran now.
 
9:18 AM
Night
 
10:05 AM
@BetaDecay having a look at fizzbuzz now
I'm not a fan of the comma separation. I think newlines are canonical for fizzbuzz. I'd say it should either be that or a flexible delimiter (comma, space, newline).
requiring newline-separation (\n or \r\n) and allowing an optional trailing newline seems cleanest
 
@MartinBüttner Just a minor thing, but would you be able to edit this comment to add in a note that Trigger doesn't satisfy our programming language criteria?
Forgot about that, just in case anybody gets ideas in the future
(at least, I don't think it's valid...)
 
@Sp3000 why edit the comment?
just place a comment of your own
 
@Sp3000 your call. if you want me to edit it, just let me know what exactly I should add.
 
10:24 AM
@BetaDecay I've made some minor edits. I'll leave the delimiter thing to you. You might want to add an introductory paragraph to pre-empt comments/downvotes re "blah, boring standard task". Like "In our recent effort to collect catalogues of shortest solutions for standard programming exercises, here is PPCG's first ever vanilla FizzBuzz challenge." (with optional links to primes and HW)
 
 
2 hours later…
11:56 AM
@Doorknob I'm assuming you've already seen this NetHack skin?
 
@trichoplax I have not. Not even close to Nethack though ;)
 
It just amused me that it's in a Stack Snippet...
You could always propose a ludicrously high character limit for posts and make full NetHack feasible
 
12:19 PM
@MartinBüttner Good idea, I'll add it in either now or later
> The output will be a list of numbers (and Fizzes, Buzzes and FizzBuzzes) separated by a newline (either \n or \r\n). A trailing newline is acceptable, but a leading newline is not.
 
1:04 PM
@Geobits
@Geobits Hey, can you check my question? Is it ok now?
 
1:28 PM
0
Q: Implement functional programming paradigms

WizardOfMenloYour company is just getting started on a project, and for the first time you decided to go use a functional programming code-style. However your boss is really diffident and doesn't want to use built-in functions, and requires you to implement yourself the main functions. In particular you need ...

 
@quartata Sorry about before :/
 
Nah nah nah it's cool :P
Your answer was better anyways
Imma try to make one in Fishing
 
Well in any case, have a present :)
user image
3
 
LOL
OK I'll be holding on to that
 
I hope I don't forget about it :P
How's Fishing going?
 
1:32 PM
Just started with it
Before I get going on that can you tell me if this challenge is OK or too broad:
A ***heterogram*** is a word where no letter of the alphabet occurs more than once. The challenge here is to write a program that outputs a heterogram that is **at least** 5 characters. The catch is that the program itself must be a heterogram -- it can have repeated symbols, but no letter can be repeated.

This is popularity contest, so most upvoted answer wins. A list of some heterograms can be found here: http://www.thefreelibrary.com/Vicinal+and+nonvicinal+heterograms-a0129627825 and here: https://en.wikipedia.org/wiki/Heterogram_(literature).
 
So the goal is just to print any >=5 letter word that's a heterogram? I'm not sure how the popularity contest helps here
 
Well the code also has to be a heterogram
I made it popularity contest cause in code golf the CJam answer would be trivial
 
PHP would be pretty trivial too
 
I wanted to see some creative answers in funky languages, not just super simple golfscript languages winning
Yeah see
Those answers might get a few upvotes but they won't win here in popularity contest
Or at least I think
Idk this is my first challenge so
 
It's an okay idea, but usually with a popularity contest it's good to have an idea of what makes an answer "good" and "upvote-worthy"
 
1:36 PM
Hmm
 
If the problem is trivial in many languages (even Python would be trivial, if you get to choose the word), then it's hard to tell what to look for
 
I see
I could increase the char minimum to make it less trivial in some languages
Lemme see here
 
print "abcdefg"
 
^^ that
 
Yeah, that's kinda not what I wanted to happen
Darn
I wanted to make one where it was palindromes
but that had already been done
 
1:38 PM
Yeah, unfortunately. No repeated char has been done too I think, but allowing symbols but not repeated letters is pretty different IMO
 
Oh, I know! How about palindromes without repeating letters? ;)
 
Best of both worlds
 
a I O <-- done
 
Maybe if I specified the heterogram
LIke picked one with p in it
but then that would make it difficult to answer in a lot of languages
 
Not really. Most languages have a way to output by ASCII code also.
 
1:40 PM
I think it'd be more interesting to make it so that you have to write a program to check whether a given word is a heterogram
(or a function)
Hmm not sure about popcon still though. It seems hard to make it nontrivial for golfing languages yet doable for "normal" ones...
btw @quartata even if you picked a word with p, there's languages out there which use other keywords, like say or echo
 
I think it would be very hard to balance any "print this single word" challenge between eso, golfing, and "normal" languages.
 
1:58 PM
This is a list of paradoxes, grouped thematically. The grouping is approximate, as paradoxes may fit into more than one category. Because of varying definitions of the term paradox, some of the following are not considered to be paradoxes by everyone. This list collects only scenarios that have been called a paradox by at least one source and have their own article. Although considered paradoxes, some of these are based on fallacious reasoning, or incomplete/faulty analysis. Informally, the term is often used to describe a counter-intuitive result. == Logic == Barbershop paradox The supposition...
This is blowing my mind
> I know that I know nothing at all.
 
I'm not sure that that's a paradox so much as just wrong.
 
If you know that you know nothing, you actually do know something; invalidating your first statement. But then since your first statement is false, you don't actually know that you know nothing, so you really do know nothing.
Then the cycle starts over.
 
It's like the liar paradox for philosophers
 
If the first is wrong, it doesn't mean you really do know nothing, it just means you don't know that thing.
I assume you know how to type/speak/express that sentence/thought/idea, for instance.
 
Ooh, I hadn't thought of that
 
2:02 PM
@Geobits Hey man! Did you see my edited question? Is it correct know? Or should I fix something else?
 
I'm back
What did I miss
 
@DiegoPatrocinio It's borderline for me. I understand the objective, but it could use a bit of cleaning up IMO. I have already voted to reopen it because I do think it's answerable, but it doesn't look like others have agreed with me yet.
 
Not much - I think the hetero thing might make an interesting program restriction for a challenge, but it's hard to come up with a task to suit that's sufficiently difficult...
 
so I rewrote the challenge
and now it's identify a word to be either a heterogram or not
but the program must be a palindrome
 
Did you ban comments?
 
2:05 PM
If you're doing palindrome, you might want to think about comments, strings and other ways to circumvent the restriction. Or is this still popcon?
 
This would probably be code golf
I was going to ban comments
 
When would comments circumvent the palindrome requirement?
 
Is the input letters only or can there be apostrophes/hyphens/etc.? (also test cases)
 
Could have your code then a comment with your code backwards
 
print "aba"#"aba" tnirp
 
2:06 PM
Yeah like that ^
It was going to be letters only
 
If you haven't, it would be a good idea to look over past palindrome challenges to see other common workarounds.
 
Ah, gotcha. (I just wanted to see an example. I wasn't doubting that it wouldn't work.)
 
Have we ever done a unique-characters thing? I know there's this for numbers...
(checking for dupes in case)
 
I think it's been part of stripping input for a cipher golf or two, but not on its own.
 
0
A: Sandbox for Proposed Challenges

ASCIIThenANSICompute a factorial code-golf In the style of the Hello, World! catalog, this question is a collection of the shortest programs that compute a factorial (a common task for new programmers) in a given language. Specifications Your program must take a positive integer as input from STDIN, and ou...

 
2:13 PM
Ugh. I'm torn between redoing my ugly Java answer to Playfair, or leaving it there as a reminder of how bad my first golf looks.
 
Redo but leave old in there?
 
Hmm, maybe. I'll leave it for now. I might get bored one day :D
 
alright heres my final challenge
A ***heterogram*** is a word where no letter of the alphabet occurs more than once, and a ***palindrome*** is a phrase that is the same backwards and forwards. The challenge here is to write a piece of code that takes in a word (just letters) as input, and outputs whether or not it is a heterogram. The catch is that the program must be a palindrome -- reads the same backwards and forwards. No comments are allowed, and you cannot place strings that contain your code (or a significant part of your code) to try to make the palindrome part easy :P
 
Lowercase or uppercase letters?
Also... I hate to say this but... what counts as a comment?
 
2:29 PM
Any construct that the language deliberately ignores
And capitalization shouldn't matter I'll add that
hmm well actually
I'll make capitalization matter
 
Hmm so HelLo is falsy and UnCoPyRiGhTaBlE is truthy then? (I'm assuming 'outputs whether" means truthy/falsy output)
 
oh that's not what I meant
But yes
I thought you meant capitalization for the palindrome part
 
Oh, I mean whether the input was lowercase, uppercase or both (and if both, whether capitalisation matters)
But actually it'd probably be good to clarify whether you want true/false, 1/0, truthy/false or...
So... code that never executes is okay?
(as in, actual code)
 
0
Q: Approval of trivial / incorrect edits

steveverrillThis question The Euclidean Algorithm originally had the title "A Euclidean Algorithm." A user (who happens to be German according to his profile) proposed an edit as follows: "An Euclidean Algorithm" Now I can understand this mistake from a native German speaker because "An Eulerian Al...

 
Yeah that's fine
I'm gonna post it
See how it goes
boom
0
Q: Heterograms, Palindromes, oh my!

quartata(First challenge, please let me know if there are any problems with it.) A heterogram is a word where no letter of the alphabet occurs more than once, and a palindrome is a phrase that is the same backwards and forwards. The challenge here is to write a piece of code that takes in a word (just...

 
2:40 PM
> Capitalization does matter here, so for the heterogram to be valid it can't have both q and Q, for instance.
^ Sounds more like it doesn't matter to me.
 
oh der
typos
Lemme fix that
 
Nice. I thought it was, but figured I'd ask since it was bolded and all :)
 
Thanks for pointing that out
Well gotta go bye
Enjoy my terrible challenge
 
0
Q: Heterograms, Palindromes, oh my!

quartata(First challenge, please let me know if there are any problems with it.) A heterogram is a word where no letter of the alphabet occurs more than once, and a palindrome is a phrase that is the same backwards and forwards. The challenge here is to write a piece of code that takes in a word (just...

 
@Geobits Is there something I can do to help it be reopened?
 
2:47 PM
I think the general consensus is that it's still unclear and/or contradictory. You'd need to figure that out or take it up with those people (or ask a question on meta perhaps). Like I said, I've already voted on it; you need four more votes to reopen.
 
Is there a way that I can contact you particularly? It's business related..
 
No, and if it's business related, I'm already not interested.
 
Ok, thanks anyways
 
3:13 PM
0
A: Sandbox for Proposed Challenges

Tom HartCountdown Solver The TV show countdown contains a numbers round, where you get 6 random numbers (1-10, 25,50,75,100), and a 3 digit target (100-999). Create a program to attempt to solve it. Rules You can only each number once You don't need to use all the numbers. You can add, subtract, mult...

 
3:36 PM
0
Q: Dependency Graph Visualization

EllThe goal of this challenge is to write a program that visualizes a dependency graph in the form of a tree. While "dependency graph" in this context means nothing more than a directed graph, the visualization method described here works best for graphs describing some dependency relation (as an ex...

 

« first day (1699 days earlier)      last day (2804 days later) »