Code Golf Stack Exchange Community Digest

Top new questions this week:

80% of respondents agreed…

Sometimes I see a claim like "80% of respondents agreed" and I think "what was your sample size? 5?" because, of course, with a sample size of 5 it's possible to get 80% to agree ...

code-golf arithmetic  
user avatar asked by msh210 Score of 19
user avatar answered by ovs Score of 9

Just another traffic jam!

One lane is closed, the vehicles have to thread their way in according to the zip-lock system: One car from one lane, the next car from the other lane, always taking turns. Input: Two vehicle queues, ...

code-golf string array  
user avatar asked by Philippos Score of 16
user avatar answered by Jonathan Allan Score of 9

One-dimensional map colouring

It is a well-known fact that you can colour a two-dimensional map with four colours in such a way that two countries with a common border always have different colours. There have already been enough ...

code-golf string array  
user avatar asked by Philippos Score of 16
user avatar answered by Arnauld Score of 3

Write a Web server quine

Write a program that accepts HTTP requests on any port of your choice above 1024, and responds to requests on any URL of your choice with its own source code. It must work with, at least, Firefox and ...

code-golf quine internet  
user avatar asked by Somebody Score of 15
user avatar answered by noodle man Score of 4

Ungolf the Wind

Weather conditions at airports are reported to pilots in METAR (METeorological Aerodrome Report) format. This format could be described as being "golfed." Here are some examples: ...

code-golf parsing  
user avatar asked by Somebody Score of 13
user avatar answered by doubleunary Score of 5

Parse nested absolute values

The absolute value of a number \$x\$ is normally written as \$|x|\$. The left and right side of the absolute value uses the same symbol, so it is not immediately obvious how to parse nested absolute ...

code-golf parsing  
user avatar asked by bsoelch Score of 12
user avatar answered by Arnauld Score of 8

Write the date in abbreviated Latin

Inspired by How do you write dates in Latin? Challenge Given a month-and-day date, output that date in abbreviated Latin, as explained below. Input Input is flexible. You may choose to: Take a date ...

code-golf date roman-numerals  
user avatar asked by Stef Score of 11
user avatar answered by Neil Score of 4

Greatest hits from previous weeks:

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

I think the question as above is clear, but just in case: Write a full program (not just a function) which prints a positive base 10 integer, optionally followed by a single newline. Qualifying ...

number code-challenge optimization self-referential  
user avatar asked by Arandur Score of 192
user avatar answered by Martin Ender Score of 206

Hello, World! (Every other character)

Write a program that prints "Hello, World!". But also, if you take only the first, third, fifth, etc. characters of your program, the resulting program should still print "Hello, World!". If your ...

code-golf string source-layout hello-world  
user avatar asked by pommicket Score of 144
user avatar answered by vroomfondel Score of 212

We're no strangers to code golf, you know the rules, and so do I

Write the shortest program that prints the entire lyrics of "Never Gonna Give You Up" by Rick Astley. Rules: Must output the lyrics exactly as they appear in the above pastebin*. Here's the raw dump:...

code-golf kolmogorov-complexity  
user avatar asked by Polynomial Score of 289
user avatar answered by Ed H. Score of 87

Tips for golfing in C

What general tips do you have for golfing in C? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to C (e.g. "remove comments" is not an ...

code-golf tips c  
user avatar asked by Casey Score of 162
user avatar answered by Lowjacker Score of 127

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Hold up..... this isn't trolling. Background These days on YouTube, comment sections are littered with such patterns: ...

code-golf string ascii-art  
user avatar asked by Arjun Score of 105
user avatar answered by Nitrodon Score of 121

Repeat your program to print Fibonacci numbers

Write a program fragment so that, when repeated N times it prints the Nth Fibonacci number. For example, if your program is print(x) then: ...

code-challenge source-layout fibonacci  
user avatar asked by mousetail Score of 30
user avatar answered by Giuseppe Score of 15

Convert 1, 2, 3, 4, 5, 6, 7, 8, and 9 to "one", "two", "three", etc

Winner: professorfish's bash answer! An entire 9 bytes! Wow! You may continue to submit your answer, however you can no longer win. Original post kept for posterity: Your goal is to convert a whole ...

code-golf kolmogorov-complexity  
user avatar asked by Jon Score of 51
user avatar answered by grc Score of 132
You're receiving this message because you subscribed to the Code Golf community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 14 Wall Street, 20th Floor, New York, NY 10005

<3