Questions tagged [code-golf]
For questions about code golf challenges and/or submissions. DO NOT post code golf challenges themselves as questions here; those belong on the main site or in the Sandbox if you want to get feedback on them.
246 questions
9 votes
1 answer
214 views
Changing the language of a programming language
Some programming languages, like Scratch, have an option to change the underlying human language of the program. Thus code such as define say(direction can be ...
4 votes
2 answers
256 views
Using tio.run, how does this C function return a value?
I'd like to shorten my answer below by applying this tio.run technique from this C example. Here's their C example Code ...
1 vote
0 answers
97 views
Are there specific types of code golf challenges on this site?
I posted a question in hope of starting a shortest code challenge, but it seems to attract lots of downvotes and the only answer tried to help as a programming problem. One comment on the question ...
3 votes
2 answers
157 views
Can the binary representations of argv[n] be used for numeric input?
TL;DR: Is int d = *(int*)argv[1]; allowed to obtain a integer input? A special case of this question: Can numeric input/output be in the form of byte values? This ...
-1 votes
1 answer
169 views
Maximum code-golf length
If we have a code-golf question that we have a golfed answer to in, say, Python, how long does that program have to be for it to not be a good idea to ask that question/for that to be code-golf (if ...
4 votes
1 answer
128 views
Is byte count on TIO valid, specifically for non-ASCII C code?
When I have non-ASCII characters in my C code, TIO counts them as 1 byte. For example, the following C program prints 56 music-related characters on the terminal. Link TIO reports its length as "...
1 vote
1 answer
172 views
Is outputting by modifying an input with no modifying access allowed?
Say Round to nicer numbers where it's possible to always output n'=m. I submitted a Javascript solution that does this. I can require input be f(x,n,[m]) and then ...
24 votes
28 answers
3k views
Announcing Code Golf Advent Calendar 2022! (+ Event challenge sandbox)
Following last year's event, we're doing Advent of Code Golf Code Golf Advent Calendar 20221! On each day between Dec 1st and Dec 25th (inclusive), a new challenge will be posted at UTC midnight2. It ...