I had the same doubt as specified here (which is why I haven't accepted any answers yet).
Reading it told me that both kinds of questions are accepted:
Catalog question - Users attempt to find the shortest code in every language. No answer is accepted.
Shortest code question - Users attempt to...
This is a false distinction.
On every code golf question, people answer in a variety of languages, striving for the shortest solution in that language. If it were simply a competition for the overall shortest solution, there would no point coding in Java or Python or any language but a select fe...
that'll just get people worked up about stuff that is actually quite irrelevant
no one is bothered if you forget to accept an answer (unless they're waiting for Enlightened, Guru or Populist maybe), but if you explicitly say that you won't accept an answer, there's suddenly a bunch of meta posts about whether something like that should be off-topic :/
I could see folks arguing that if no answer is accepted (and there isn't text explaining why), they could feel it doesn't have an objective winning criterion...
Got any tips for golfing this down further? More Bernoulli!
from fractions import*
def b(m):
s=0
for k in range(m+1):
p=1
for v in range(k+1):s+=Fraction(p*(v+1)**m)/(k+1);p=p*(v-k)//(v+1)
return s
does any python guru understand how to use gmpy2 to test if a large integer is prime? gmpy2.is_prime(17) is the method but how do you do gmpy2.is_prime(2**100-1) ?
we need to make some arbitrary precision integer out of 2*100-1 somehow
Future Catalogue Challenges
This post collects ideas for future catalogue challenges. Some of these tasks already have challenges, some of which may be editable into a catalogue while others may not.
Existing challenges that could be catalogues
In these cases, the OP's should be asked whether ...
I'm not a big fan of that any more either
just adds to the "catalogues are special" business...
Using a made-up language specifically designed for the challenge
This includes any language with commands that "do whatever I choose them to do". Claiming that your answer is written in "MyOwnLanguage", where the command x means "read a sequence of numbers, split them into groups of three, and ...
Nathan's right on point, that's one of the defining characteristics of "catalog" questions.
Swift has only existed since June 2, 2014, meaning Swift programmers cannot currently participate in a lot of challenges. (Just giving a real example of a new language that isn't designed to solve a specific task)
@quartata Two possibilities. Either the guy doesn't like golfing languages, or he likes them and wanted to prove that the rest of the community likes them too (devil's advocate post)
@Rainbolt But yes, you have a good point of course. It's even more present with newer versions. I can't go answering an old challenge in Mathematica without having to figure out which version was the latest release back then and then figuring which functions (and which of their overloads) existed back then.
I like how he posts a loophole and everyone comments with "How does this break the rules?" The whole point of loopholes are that they aren't against the rules until we make it so.
The Catalan numbers (OEIS) are a sequence of natural numbers often appearing in combinatorics. The nth Catalan number (for n >= 0) is defined as:
Starting from n = 0, the first 20 Catalan numbers are:
1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 9694845, 35...
Converging Sums of a Fractal Sequence
code-golf number sequence number-theory fractal
Background
A fractal sequence is an integer sequences where you can remove the first occurrence of every integer and end up with the same sequence as before.
A very simple such sequence is called Kimberling'...
The question is
One of our agents recently caught a young hacker with the code name !$criptkiddie. He hid the below piece of javascript on a page which calculates a value but doesn't output the final result. It's also embedded on this page - can you find the result?
I need the code please..
va...
@quartata re Catalan numbers. looks good, but could use some motivation about how it's the number of balanced strings of length n or something. just the definition as a binomial coefficient is a bit boring.
also as much as I'm looking forward to a plain binomial-coefficient challenge (because I recently discovered a neat way to compute them in CJam), that makes it a fairly trivial challenge in most languages. not a bad thing, but something you should be aware of.
Python 3, 150 bytes
import random as r,sys;f=lambda s,p=0:f(s[:p]+r.choice(["-+","+-","<>","><"])+s[p:],p+r.randrange(2)) if len(s)<int(sys.argv[1]) else s; print(f(""))
To run, save it as filename.py and then python3 filename.py 10 where 10 is desired length.
... well, first 24 is nothing ...
Major League Gaming (MLG) is a professional eSports organization. MLG is headquartered in New York City, New York and was founded in 2002 by Sundance DiGiovanni and Mike Sepso. MLG has held official video game tournaments throughout the United States and Canada. Major League Gaming competitions have been broadcast on television, ESPN.com, and other broadband sites. The company has also been involved in television production, and game development. MLG's aim is to elevate computer and console game tournaments to viable competitive and spectator events. Major League Gaming acquired Agora Games on...
In the theory of formal languages of computer science, mathematics, and linguistics, the Dyck language is the language consisting of balanced strings of square brackets [ and ]. It is important in the parsing of expressions that must have a correctly nested sequence of brackets, such as arithmetic or algebraic expressions. It is named after the mathematician Walther von Dyck.
== Formal definitionEdit ==
Let be the alphabet consisting of the symbols [ and ] and let denote its Kleene closure. For any element with length we define partial functions and by
is with "" inserted into the...
Programming Puzzles & Code Golf has opened a taco truck! The word is out and now users from all over the Stack Exchange network are coming to try our tasty, authentic ASCII tacos. We need your help to ensure that everyone gets their orders in a timely manner. There isn't a whole lot of room insid...
I like the concept of 0815, except the interpreter on the creator's website returns an Error 404. So I decided to ask you all to help!
The Basics
0815 is based around three (3) registers and a queue. The registers are named X, Y, and Z, with X being write-only, Z being read-only, and Y being a ...
I think one of the first things I asked Optimizer in here when I first became active in chat was whether he's French. I also thought that because of the punctuation spacing. But alas, he is not.