Linked Questions

546 votes
239 answers

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 ...
107 votes
269 answers

Output with the same length as the code

In this challenge, you should write a program or function which takes no input and prints or returns a string with the same number of bytes as the program itself. There are a few rules: You may only ...
user avatar
189 votes
161 answers

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 ...
user avatar
  • 1,909
148 votes
154 answers

I double the source, you double the output!

Your task, if you wish to accept it, is to write a program that outputs a positive integer (higher than 0). The tricky part is that if I duplicate your source code, the output must be double the ...
user avatar
  • 41.5k
137 votes
29 answers

Making Future Posts Runnable Online with Stack Snippets [closed]

Stack Snippets were recently added to PPCG! Reminiscent of JSFiddle, Stack Snippets allow HTML, CSS, and JavaScript to be run directly in posts! Here is a very simple Stack Snippet: ...
user avatar
32 votes
95 answers

Numbers by Position

Challenge Print the numbers: 1 22 333 4444 55555 666666 7777777 88888888 999999999 In that order. I/O Takes no input. The numbers can have any delimiters desired (...
user avatar
  • 1,891
30 votes
69 answers

Implement Takewhile

Introduction and Credit Today without a fancy prelude: Please implement takewhile. A variation of this (on a non-trivial data structure) was an assignment at my ...
user avatar
  • 3,263
29 votes
76 answers

Script that outputs a script that prints a given input

Write a piece of code that takes a string as input, and outputs a piece of code in the same language that, when run, will output the initial input string. It must be able to handle any combination of ...
user avatar
  • 407
30 votes
30 answers

Output with the same length always

With challenges like Output with the same length as the code and Create output twice the length of the code, I thought of a separate, but similar challenge. The task is to produce an output. It can ...
user avatar
  • 6,667
32 votes
28 answers

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 "...
user avatar
  • 13.8k
17 votes
9 answers

The NX source-length problem [duplicate]

On PPCG, we have had lots of challenges where the length of your output is dependent on the length of your source code. For the purposes of this challenge, we will call these Source-length problems. ...
user avatar
  • 57.4k