yes is 91 lines long
yes, from coreutils, is 91 lines long. Many of them are comments, but that is still WAY too long.Edit from September 2019: the source file grew over the past five years and is now 126 lines long.Write...
View ArticleReconstruct a missing RGB channel
Look at these photographs of natural scenes, with one of the RGB channels taken out of them:Source (with red): https://en.wikipedia.org/wiki/File:Altja_j%C3%B5gi_Lahemaal.jpgSource (with green):...
View ArticleThe worst ever phone number entry screen
The name of the challenge was prompted by this GIF and the GIF also gave me the idea.Your challenge today is to take a input guaranteed to be \$2<=n<=100\$ and output a sequence of x and -...
View ArticleTo Vectory! – The Vector Racing Grand Prix
User CarpetPython posted a new take on this problem which puts a much bigger focus on heuristic solutions, due to an increased search space. I personally think that challenge is much nicer than mine,...
View ArticleDetermine your language's version
Your challenge is to write a polyglot that works in different versions of your language. When run, it will always output the language version.RulesYour program should work in at least two versions of...
View ArticleRegex validating regex [closed]
Build a regex that will accept a regex string as input and check if it's valid. Basically, your regex should be able to validate itself. (Any invalid regex should not be validated, so you can't use .*....
View ArticleHello ASCII World!
Construct a full program which outputs Hello, World!. The score of your submission will be equal to the sum of all of the ASCII values of the distinct characters. The lowest score wins!RulesIt must be...
View ArticleFusing Fireworks
OverviewGiven a list of fireworks a-z and times 3-78, arrange them with fuses to make them all light up at the correct time.A line of input is given as space separated letters and numbers:a 3 b 6 c 6 d...
View ArticleHow high can you count?
Challenge:Your task is to write as many programs / functions / snippets as you can, where each one outputs / prints / returns an integer. The first program must output the integer 1, the second one 2...
View ArticleForward foo, reverse bar, but avoid dead code [closed]
So simple: Provide some code that outputs foo and with the reversed source outputs bar. But before you come up with something like this boring python 2:print "foo"#"rab" tnirpyou should know the score:...
View ArticleDefinite integral of polynomial functions
You will need to evaluate the definite integral (bounded by \$a\$ and \$b\$) of a certain polynomial function that takes the form of:$$\int_a^b \left( k_n x^n + k_{n-1} x^{n-1} + \cdots + k_2x^2 + k_1x...
View ArticleCode close to the challenge: Sum of integers
This is a simple challenge:Given a sequence of integers, find the sum of all integers in it.But with a twist.Your score is the Levenshtein distance between your code and the following phrase (The...
View ArticleBuild a fewest-moves freecell solver
In the game of Freecell, you are tasked with building four foundation piles in suit from ace to king, on a layout where you build downward in alternating colours. However, you can only build one card...
View ArticleI irradiate your source code, you irradiate your output
Your task is to write a program \$p\$ which outputs a string \$s\$ with the same length as \$p\$, where \$s \neq p\$.If I remove the \$n\$th byte from your program to get program \$q\$, then either...
View ArticleSay Hello to the Pioneers of Computer Science
Choose your favorite famous computer scientist or computer science pioneer who was born in 1942 or earlier (as 1943 marks the start of the creation of the 'first' computer). They should have a...
View ArticleWhat is the smallest positive base 10 integer that can be printed by a...
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 programs...
View ArticleThe many ways to skin a `cat` [duplicate]
The well known cat command simply copies its stdin directly to stdout unchanged. But there are plenty of other commandline tools that exist...What other commands can be used to duplicate the...
View ArticleA Programming Puzzle of Mode Golf
Your task is to print the text Good morning, Green orb!, with every character repeated in place as many times as the most frequent byte in your source (the mode). A trailing newline is permitted and...
View Article50 digits of π in HQ0-9+-INCOMPUTABLE?
BackgroundHQ0-9+-INCOMPUTABLE?! is a half-joke programming language introduced in Internet Problem Solving Contest 2011, Problem H.HQ9+ is an esoteric programming language specialized for certaintasks....
View ArticleDistinguish between Masculine and Feminine Nouns in French within 100 characters
You are to write a very small program within 100 characters. Your program must distinguish between masculine and feminine french nouns. The output should be un if it is masculine and une if it is...
View Article