Linked Questions

207
votes
366answers
49k views

Golf you a quine for great good!

Using your language of choice, golf a quine. A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output. No cheating -- that means ...
43
votes
16answers
15k views

Biggest Irreducible Hello World

Create a program that outputs Hello, World! The winner is the source code that is the biggest, subject to the constraint that it is irreducible For this challenge,...
258
votes
297answers
104k views

Add a language to a polyglot

This is an answer-chaining challenge in which each answer builds on the previous answer. I recommend sorting the thread by "oldest" in order to be sure about the order in which the posts are made. ...
69
votes
229answers
22k views

Is this even or odd?

Note: There is not been a vanilla parity test challenge yet (There is a C/C++ one but that disallows the ability to use languages other than C/C++, and other non-vanilla ones are mostly closed too), ...
128
votes
503answers
39k views

Shortest infinite loop producing no output

Your task is to create the shortest infinite loop! The point of this challenge is to create an infinite loop producing no output, unlike its possible duplicate. The reason to this is because the code ...
90
votes
276answers
17k views

Simple cat program

One of the most common standard tasks (especially when showcasing esoteric programming languages) is to implement a "cat program": read all of STDIN and print it to STDOUT. While this is named after ...
96
votes
300answers
23k views

Print a 10 by 10 grid of asterisks

Background This is a standard textbook example to demonstrate for loops. This is one of the first programs I learned when I started learning programming ~10 years ago. Task You are to print this ...
-2
votes
20answers
546 views

Hello 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. ...
67
votes
55answers
15k views

Tips for code-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 ...
164
votes
293answers
47k views

1, 2, Fizz, 4, Buzz

Introduction In our recent effort to collect catalogues of shortest solutions for standard programming exercises, here is PPCG's first ever vanilla FizzBuzz challenge. If you wish to see other ...
58
votes
156answers
8k views

Output your Score!

Challenge: The concept is simple enough: write a full program to output its own code golf score! Output should only be the byte count of your program and a trailing ...
209
votes
308answers
50k views

Is this number a prime?

Believe it or not, we do not yet have a code golf challenge for a simple primality test. While it may not be the most interesting challenge, particularly for "usual" languages, it can be nontrivial in ...
16
votes
103answers
6k views

Turn an integer n into a list containing it n times

Given an integer n as input, return a list containing n, repeated n times. For example, the ...
39
votes
87answers
5k views

Print an alphabet wave

You are to print this exact text: ...
21
votes
44answers
4k views

Write a “Hello” interpreter

Write a "Hello" interpreter Background Hello is a language "written" by Anne Veling, which errors if the program does not contain only h, and ...
222
votes
107answers
40k views

Print every character your program doesn't have

Your task is to build a program (using only printable ASCII characters and/or tabs and newlines) that prints out exactly the characters in the printable ASCII space (...
29
votes
27answers
5k views

Ah, why is there a bug in my program?

This challenge is inspired by @LuisMendo's MATL answer to my "binary multiples" challenge. Task Pick a code-golf challenge that is open and that has been posted before this one; let me call it the "...
521
votes
235answers
118k views

Showcase of Languages

Notes This thread is open and unlocked only because the community decided to make an exception. Please do not use this question as evidence that you can ask similar questions here. Please do not ...
18
votes
30answers
5k views

Binary representation of a number is palindrome or not?

Write a full program to find whether the binary representation of a number is palindrome or not? Sample Input 5 Sample Output YES Print ...
10
votes
0answers
248 views

Golf a Golfing Language [closed]

Design a language and golf its interpreter so that it solves the following programming challenges in as few bytes as possible: Hello World cat Fizz Buzz List the first \$n\$ primes Fibonacci Sequence ...
107
votes
103answers
13k views

Make an error quine!

Your challenge: write a "program", for a language of your choice, that causes the compiler/interpreter/runtime to produce error output when compiling/running your program which is identical to your ...
153
votes
392answers
28k views

Implement a Truth-Machine

A truth-machine (credits goes to this guy for coming up with it) is a very simple program designed to demonstrate the I/O and control flow of a language. Here's what a truth-machine does: Gets a ...
37
votes
92answers
7k views

Print all alphanumeric characters plus underscore

Write a program or function that prints or returns a string of the alphanumeric characters plus underscore, in any order. To be precise, the following characters need to be output, and no more: ...
19
votes
6answers
1k views

The 1+ Metagolf Challenge

I'm letting this one out of the sandbox. Hopefully it is well-written and make sense, feel free to improve. So in order to make 1+ more popular (and ease the creation of golfed 1+ text-printing ...
83
votes
26answers
7k views

print “Hello, World!”

Yes, really. Print it with a hardware printer 🖨 to create a hard copy. Send the necessary commands/data to your printer such that the following text is printed on a piece of paper: Hello, World! ...
46
votes
136answers
14k views

Output programming language name

Challenge: In the programming language of your choice, take no input and output your programming language's name. Fair enough, right? Restrictions: You can't use any character that is included in ...
588
votes
284answers
219k views

Produce the number 2014 without any numbers in your source code

Note to challenge writers as per meta consensus: This question was well-received when it was posted, but challenges like this, asking answerers to Do X without using Y are likely to be poorly ...
29
votes
7answers
2k views

Tips for Creating/Maintaining a Golfing Language

Creating a golfing language can be hard. Let's help budding golfing language creators out and provide some helpful tips on how to create one. I'm looking for tips on: The design process ...
192
votes
211answers
42k views

The Programming Language Quiz

Congratulations to Dennis who won both the cops' and the robbers' challenge! Calvin's Hobbies has already delivered on his promise and wrote this challenge for Dennis for winning the robbers' ...
21
votes
11answers
2k views

Write an interpreter for my esoteric language Jumper

I have thought up esoteric language Jumper. Later you will see why. It operates with random-access-memory with bytes as cells. RAM is zero indexed and initially filled with zeros. When trying access ...
28
votes
4answers
3k views

Orientation Oriented Programming

Write a program for a specific language that in different orientations performs different tasks. Your code should have at least two non-empty lines and at least two non-empty columns and should ...
128
votes
129answers
39k views

Obfuscated Hello World

Create the shortest possible obfuscated program that displays the text "Hello World". In order to be considered an obfuscated program, it must meet at least two of the following requirements: Does ...
20
votes
5answers
2k views

Most efficient cubifier

Cubically is too tedious to manually write any code in. Your challenge is to translate ASCII text into Cubically source code. Cubically This is just a quick run-down of Cubically; the repository has ...
80
votes
102answers
13k views

Hello World 0.0!

source: Dilbert, September 8, 1992 I'm hoping to add a new twist on the classic "Hello World!" program. Code a program that outputs Hello World! without: String/...
79
votes
151answers
17k views

“99 Bottles of Beer”

Write a program that outputs the lyrics to 99 Bottles of Beer, in as few bytes as possible. Lyrics: ...
64
votes
115answers
9k views

Make a ;# interpreter

I recently created a new language called ;# (pronounced "Semicolon Hash") which only has two commands: ; add one to ...
25
votes
4answers
649 views

Starry Metagolf

Starry is a funny esoteric programming language in which code consists only of +*.,`' where the actual command represented by each of those characters is determined ...
42
votes
92answers
7k views

Halloween Golf: The 2spooky4me Challenge!

A current internet meme is to type 2spooky4me, with a second person typing 3spooky5me, following the (n)spooky(n+2)me pattern. Your mission is to implement this ...
51
votes
57answers
7k views

Create a Checkbox

Write a program that creates a two-state checkbox that people can interact with using a mouse. Specifically, your program should achieve all of the following: Have a 8×8 pixel (or larger if desired) ...
90
votes
38answers
22k views

Tips for golfing in Java

Are there any useful shortcuts that can be used in Java? As shown below, import already adds at least 17 characters to a program. ...
92
votes
15answers
9k views

Create a programming language that only appears to be unusable

Robbers' challenge thread is here. Cops' challenge: Design a programming language that appears to be unusable for programming, but admits computation (or at least completion of the task) through some ...
3
votes
1answer
164 views

Best free online resources to learn competitive programming [closed]

I am quite proficient in C++ and Java and want to learn competitive programming to participate in contests like Google codejam and other online contests held on sites like CodeChef and Codeforces. I ...
30
votes
11answers
1k views

Print, Increment, Decrement, Alias - Interpret Prindeal

Prindeal (pronounced prin-dee-al) is a new esoteric programming language that only has four commands: print, increment, decrement, and alias. Despite its minimalism, complex mathematical operations ...
33
votes
64answers
6k views

Cat goes “Meow”

cat goes "Meow" We are all familiar with the concept of a cat program. The user types something in, it is echoed back to the ...
68
votes
9answers
6k views

Fault-Tolerant Hello World (a.k.a. the Interview)

At the end of your interview, the Evil Interviewer tells you, "We make all of our applicants take a short coding test, to see if they really know what they are talking about. Don't worry; it's easy. ...
34
votes
3answers
2k views

Design a One Instruction Set Computer!

Notice: I'm willing to give a bounty to any answer that I find interesting. Your challenge is to design a Turing-complete one instruction set computer (OISC): An OISC is an abstract machine that ...
72
votes
15answers
11k views

Hello World in Multiple Languages

Task Create a program or a function that is valid in multiple programming languages, and when compiled/interpreted as a different language outputs "Hello, World!" in a different natural language. ...
41
votes
27answers
7k views

Count Like a Babylonian

Challenge Given an ASCII representation of a Babylonian number as input, output the number in Western Arabic numerals. Babylonian Numeral System How did the Babylonians count? Interestingly, they ...
305
votes
23answers
40k views

Write Moby Dick, approximately

Here is a 1.2Mb ASCII text file containing the text of Herman Melville's Moby-Dick; or, The Whale. Your task is to write a program or function (or class, etc. -- see below) which will be given this ...
29
votes
63answers
3k views

Palindrome Hello, World

Your task is to create a program that prints "Greetings, Planet!" exactly to the console. Seems simple enough, right? Well, here's the trick. The code must be a palindrome, meaning it reads from right ...

15 30 50 per page