text stringlengths 180 608k |
|---|
[Question]
[
One of the most common standard tasks (especially when showcasing esoteric programming languages) is to implement a ["cat program"](http://esolangs.org/wiki/Cat): read all of STDIN and print it to STDOUT. While this is named after the Unix shell utility `cat` it is of course much less powerful than the... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic).
Closed 7 years ago.... |
[Question]
[
Given a number `N`, how can I print out a Christmas tree of height `N` using the least number of code characters? `N` is assumed constrained to a minimum value of `3`, and a maximum value of `30` (bounds and error checking are not necessary). `N` is given as the one and only command line argument to yo... |
[Question]
[
>
> As of 13/03/2018 16:45 UTC, the winner is [answer #345](https://codegolf.stackexchange.com/a/156848/66833), by [Khuldraeseth na'Barya](https://codegolf.stackexchange.com/users/73884/khuldraeseth-nabarya). This means the contest is officially over, but feel free to continue posting answers, just so... |
[Question]
[
It's time to face the truth: We will not be here forever, but at least we can write a program that will outlive the human race even if it struggles till the end of time.
Your task is to write a program that has a expected running time greater than the remaining time till the end of the universe.
You ma... |
[Question]
[
This is similar to other "Tips for golfing in <...>" but specifically targeting the newer features in JavaScript brought up in ECMAScript 6 and above.
JavaScript inherently is a very verbose language, `function(){}`, `.forEach()`, converting string to array, array-like object to array, etc, etc are sup... |
[Question]
[
## Overview
This is a bot battle to see who can survive the longest. These bots increase their power by being attacked, though, so you need to think carefully before you shoot.
Each turn, you can choose a bot to attack, or defend. Attacking will lower its life and increase its power. Last bot standing ... |
[Question]
[
Choose any five characters your language supports. There are 5! = 5√ó4√ó3√ó2√ó1 = 120 ways these can be arranged into a 5-character string that contains each character once; 120 [permutations](https://en.wikipedia.org/wiki/Permutation).
Choose your characters such that, when each of the 120 strings is ... |
[Question]
[
Conceptually, this challenge is really simple. You're given a list of non-negative integers `ai`. If possible, find a non-negative integer `N`, such that the list consisting of `bi = ai XOR N` is sorted. If no such `N` exists, output should be anything that can't be mistaken for a valid `N`, e.g. a neg... |
[Question]
[
Write a program or function that listens for incoming TCP traffic on port N. It offers a simple service: it calculates sum of IP address fields of incoming connection and returns.
Program or function reads integer N from arguments or stdin. It listens to incoming TCP connections on port N. When someone... |
[Question]
[
You've just been hired by a German car manufacturing company. Your first task, as an engineer, is to write a program that computes the ecological footprint of ASCII strings.
The ecological footprint of character is computed as follows:
>
> Write the character's ASCII code in binary, and count the numb... |
[Question]
[
Despite your protest, you have been put to work by your boss on a program that takes a single unsigned integer as input and prints the string "prime" if that integer is prime and "not prime" if it isn't. You may choose which language you do this in, as long as the resulting program is short; your boss ... |
[Question]
[
The aim of this challenge is to find an *impossibly* short
implementation of the following function `p`, in the langage of your
choosing. Here is C code implementing it (see
[this TIO link](https://tio.run/##XZTbahtBEETf9RWLQ0DCnTA9t51Bdn4k@MFIsi1IZCNLIAj@duWULgmJ2GVn@1JdXd2rxZfnxeL4ab1Z/NgvV3fvu@X69e... |
[Question]
[
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
As a little joke in the office someone wanted a script that randomly picks a name, and said person... |
[Question]
[
There have been many other flag challenges posted but not one for the [national flag](https://en.wikipedia.org/wiki/Flag_of_France) of [France](https://en.wikipedia.org/wiki/French_Fifth_Republic). [This week](https://en.wikipedia.org/wiki/November_2015_Paris_attacks) seems like an appropriate time.
Pr... |
[Question]
[
Following the [best](https://stackoverflow.com/questions/1197417/why-are-plain-text-passwords-bad-and-how-do-i-convince-my-boss-that-his-treasur) [security](http://plaintextoffenders.com/about/) [practices](http://gizmodo.com/sony-kept-thousands-of-passwords-in-a-document-marked-1666772286), I keep a p... |
[Question]
[
Are there any useful shortcuts that can be used in Java?
As shown below, `import` already adds at least 17 characters to a program.
```
import java.io.*;
```
I understand that the simple solution would be to use another language, but it seems to be a real challenge to shorten Java programs.
---
Tips ... |
[Question]
[
One nice property of a Turing-complete language is that it can be used to write any program, up to and including the simulation of the entire Universe.
Your job is to do exactly that: **write a program which simulates the Universe**.
---
Note: although I don't doubt you'll be able to accomplish this ta... |
[Question]
[
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
Closed 7 years ago.
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently ... |
[Question]
[
Hold up..... this isn't trolling.
---
# Background
These days on YouTube, comment sections are littered with such patterns:
```
S
St
Str
Stri
Strin
String
Strin
Stri
Str
St
S
```
where `String` is a mere placeholder and refers to any combination of characters. These patterns are usually accompanied by ... |
[Question]
[
The challenge is to find a string of characters that **cannot** appear in *any* legal program in your programming language of choice. That includes comments, strings, or other "non-executable" parts.
## Challenge
* Your program may be specific to a particular version or implementation of your language'... |
[Question]
[
Write a function or program that determines the *cost* of a given string, where
* the cost of each character equals the number of how many times the character has occurred up to this point in the string, and
* the cost of the string is the sum of its characters' costs.
### Example
For an input of `aba... |
[Question]
[
The goal of this challenge is to produce an animation of a **[chain drive](https://en.wikipedia.org/wiki/Chain_drive)** system, comprised of a set of **[sprocket gears](https://en.wikipedia.org/wiki/Sprocket)** connected together by a **[chain](https://en.wikipedia.org/wiki/Roller_chain)**.
**General R... |
[Question]
[
Your task is to reverse the order in which some `prints` get executed.
---
**Specs:**
Your code will be in this form:
```
//some lines of code
/*code*/ print "Line1" /*code*/
/*code*/ print "Line2" /*code*/
/*code*/ print "Line3" /*code*/
/*code*/ print "Line4" /*code*/
//some lines of code
```
You ... |
[Question]
[
You need to produce output that is **non-deterministic**.
In this case, this will be defined to mean that the output will not always be the same result.
**Rules:**
* A pseudo-random number generator that always has the same seed does not count.
* You can rely on the program being run at a different (un... |
[Question]
[
I always used a [Mandelbrot](http://en.wikipedia.org/wiki/Mandelbrot_set) image as the 'graphical' version of Hello World in any graphical application I got my hands on. Now it's your guys' turn.
* Language must be capable of graphical output or drawing charts (saving files disallowed)
* Render a squar... |
[Question]
[
Consider a square of [printable ASCII](http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters) characters (code points 0x20 to 0x7E) for side length **N**, like the following (here, **N = 6**):
```
=\
g \
7
m+y "g
L ~
e> PHq
```
We also require **each row** and **each column** to ... |
[Question]
[
**[Watch live](https://trichoplax.github.io/formic-functions/) | [Active answers](https://codegolf.stackexchange.com/questions/135102/formic-functions-ant-queen-of-the-hill-contest?answertab=active#tab-top) | [Add new answer](https://codegolf.stackexchange.com/questions/135102/formic-functions-ant-quee... |
[Question]
[
This is a code golf challenge I thought of with a mathematical bent. The challenge is to write the shortest code possible such that it is an open question whether or not the code terminates. An example of what I mean could be the following piece of python code, adapted from an anwser to [this](https://... |
[Question]
[
Write a program that takes in a non-empty string of the digits 0 through 9 and prints how they would be shown on a [seven-segment display](http://en.wikipedia.org/wiki/Seven-segment_display) using slashes (`/`, `\`).
These are the precise digit shapes:
```
/\
\ \
\/
\
\
/\
/
\/
/\
/\
/
\
\/... |
[Question]
[
# The Challenge
Write a complete program that writes twice as many bytes to standard output as the length of the program.
# Rules
* The program must write ASCII characters to the standard output.
* The contents of the output doesn't matter.
* The output, measured in bytes, must be *exactly* twice the l... |
[Question]
[
Write a piece of code that is executable in at least three different languages. The code must output the integer `1` in language number one, `2` in language number two, `3` in language number three etc.
Rules:
* The output must be only the integer, but trailing newlines are OK.
* The code can't take in... |
[Question]
[
*Aww, man, this expiry date doesn't write the months with letters! I can't tell if it's expiring on March 10th or October 3rd... Wait, no, never mind, the year says 2012. **(alley-oops half-used brick of cheese into the trash can like a pro)***
So let's suppose for a moment that you're too busy to try ... |
[Question]
[
The aim of this post is to gather all the golfing tips that can be easily applied to `<all languages>` rather than a specific one.
**Only post answers that its logic can be applied to the *majority* of the languages**
>
> Please, one tip per answer
>
>
>
[Answer]
## Merge Loops
You can usually... |
[Question]
[
This challenge was inspired by [this Wendy's commercial](https://youtu.be/eANcbFSPHyA) from 1984.
[](https://i.stack.imgur.com/1UdR1.png)
*Illustration by T S Rogers*
Your task is to find a hexadecimal 0xBEEF on a binary bun.
The 'beef' consists ... |
[Question]
[
The sorting algorithm goes like this:
While the list is not sorted, snap half of all items (remove them from the list). Continue until the list is sorted or only one item remains (which is sorted by default). This sorting algorithm may give different results based on implementation.
The item removal pr... |
[Question]
[
*99* (pronounced "ninety-nine") is a brand new [Esoteric programming language](http://esolangs.org/wiki/Main_Page) (not to be confused with [99](http://esolangs.org/wiki/99_(Joke_language)), note the italics). Your task in this challenge is to write an interpreter for *99* that is as short as possible.... |
[Question]
[
# Most Recent Leaderboard @ 2014-08-02 12:00
```
| Pos # | Author | Name | Language | Score | Win | Draw | Loss | Avg. Dec. Time |
+-------+----------------------+-------------------------+------------+-------+-------+-------+-------+----------------+
| 1st | Em... |
[Question]
[
Assume we want to shift an array like it is done in [the 2048 game](https://gabrielecirulli.github.io/2048/): if we have two equal consecutive elements in array, merge them into twice the value element.
Shift must return a new array, where every pair of consecutive equal elements is replaced with their... |
[Question]
[
Inspired by the bugged output in [*@Carcigenicate*'s Clojure answer](https://codegolf.stackexchange.com/a/109197/52210) for the [Print this diamond](https://codegolf.stackexchange.com/questions/8696/print-this-diamond) challenge.
## Print this exact text:
```
1 2 3 4 5 ... |
[Question]
[
Some `sleep` commands implement a delay of an integer number of seconds. However, 2³² seconds is only about 100 years. Bug! What if you need a larger delay?
Make a program or a function which waits for 1000 years, with an error of less than ±10%. Because it's too time-consuming to test, please explain ... |
[Question]
[
Determining whether a Language is [Turing Complete](https://en.wikipedia.org/wiki/Turing_completeness) is very important when designing a language. It is a also a pretty difficult task for a lot of esoteric programming languages to begin with, but lets kick it up a notch. Lets make some programming lan... |
[Question]
[
*This is the cops' thread. The robbers' thread is [here](https://codegolf.stackexchange.com/q/135365/58826).*
Your challenge is to make a program that runs forever without halting1, unless it gets a particular input or inputs2. If it receives that input, it must terminate in a finite amount of time3. T... |
[Question]
[
Sixteen piles of cheese are put on a 4x4 square. They're labeled from \$1\$ to \$16\$. The smallest pile is \$1\$ and the biggest one is \$16\$.
The Hungry Mouse is so hungry that it always goes straight to the biggest pile (i.e. \$16\$) and eats it right away.
After that, it goes to the biggest neighb... |
[Question]
[
Once I wrote a JavaScript program that would take as input a string and a character and would remove all characters except for the first one and the character given as input, one by one.
For example, computing this with inputs `codegolf.stackexchange.com` and `e` for the character yields:
```
codegolf.... |
[Question]
[
This question has been spreading like a virus in my office. There are quite a variety of approaches:
Print the following:
```
1
121
12321
1234321
123454321
12345654321
1234567654321
123456787654321
12345678987654321
123456787654321
1234567654321
12345654321
... |
[Question]
[
# AlienWar
This game takes place in a very crowded planet where aliens are the superior race. Your task is to create your own alien and beat all other.
## The Board
It is a 2 dimensional board.
The length of one side of the board is `Math.ceil(sqrt(species * 100 * 2.5))` = ~40% of board used.
The boa... |
[Question]
[
Your challenge is simple. You need to write a program that prints to either STDOUT or a file the year the language it is written in was released. Because this is such a simple task, the twist is that it must be written in as many different languages as possible.
Your score is the total number of differ... |
[Question]
[
## Results are now out [here](https://github.com/EnderShadow8/xkcd-2385-KOTH/blob/main/results.md)!
Congratulations ***[offset prediction](https://codegolf.stackexchange.com/a/224890/103324)*** for winning the challenge!
*Don't worry if you missed out, the controller code as well as all the bots that c... |
[Question]
[
Adam West passed away, and I'd like to honor his memory here on PPCG, though I doubt he knew of our existence. While there are many, many different things that this man is known for, none are more prominent than his role as the ~~original~~ batman. I'll always remember my step-father still watching the... |
[Question]
[
*[Robbers' challenge thread is here](https://codegolf.stackexchange.com/questions/61805/create-a-programming-language-that-only-appears-to-be-unusable-robbers-thread).*
**Cops' challenge: Design a programming language that appears to be unusable for programming, but admits computation (or at least comp... |
[Question]
[
Write a program that takes a single line string that you can assume will only contain the characters `/\_‾`. (That's forward and backward slash, underline and [overline](https://en.wikipedia.org/wiki/Overline). You can use `~` in place of overline if you need since overline is not convenient ASCII.)
Fo... |
[Question]
[
Write a program or function that, when given a string, filters out as many distinct bytes as it can and returns the cleaned string. However, since your program hates them, none of these bytes can be present in your own code.
Your score will be the number of distinct bytes your program filters out from ... |
[Question]
[
The Tabula Recta (sometimes called a 'Vigenere Table'), was created by Johannes Trithemius, and has been used in several ciphers, including all variants of Bellaso's Vigenere cipher and the Trithemius cipher. It looks like this:
```
ABCDEFGHIJKLMNOPQRSTUVWXYZ
BCDEFGHIJKLMNOPQRSTUVWXYZA
CDEFGHIJKLMNOPQR... |
[Question]
[
## Challenge
Given two strings, work out if they both have exactly the same characters in them.
## Example
**Input**
>
> word, wrdo
>
>
>
This returns `true` because they are the same but just scrambled.
**Input**
>
> word, wwro
>
>
>
This returns `false`.
**Input**
>
> boat, toba
>
>
>
Thi... |
[Question]
[
The challenge is actually extremely simple. Pick 5 ***distinct*** letters (you can just pick the 5 that allow you the shortest code if you like) and output them to the console. However, the twist is that they must be from the following list:
```
AAA BBBB CCCC DDDD EEEEE FFFFF ... |
[Question]
[
It's been a rough few months at work and I feel like I just want to scream right to my boss' face. I am, however, not one to directly confront people I have a problem with. I also don't want to lose my job.
So here's an idea: I want to be able to insult him, without him ever finding out. And I realized... |
[Question]
[
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
Closed 6 years ago.
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently ... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic).
Closed 7 years ago.... |
[Question]
[
Write a program that outputs the lyrics to 99 Bottles of Beer, **in as few bytes as possible**.
Lyrics:
```
99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.
98 bottles of beer on the wall, 98 bottles of beer.
Take one down and pass it... |
[Question]
[
Let's define a *pristine program* as a program that does not have any errors itself but will error if you modify it by removing any contiguous substring of \$N\$ characters, where \$1 \le N < \text{program length}\$.
For example, the three character Python 2 program
```
`8`
```
is a pristine program ([... |
[Question]
[
Super simple challenge today, or is it?
I feel like we've heard a fair bit about double speak recently, well let's define it in a codable way...
Double speak is when each and every character in a string of text is immediately repeated. For example:
```
"DDoouubbllee ssppeeaakk!!"
```
---
# The Rules
*... |
[Question]
[
Your job is to animate this [circle illusion](http://www.youtube.com/watch?v=pNe6fsaCVtI). It looks like the points rotating inside of the circle, but they are actually just moving in straight lines.

# Criterias
* The result has to be... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/172480/edit).
Closed 5 years ago.
[Improve this question](/posts/172480/edit)... |
[Question]
[
Your challenge is simple: write as long of a [pristine program](https://codegolf.stackexchange.com/questions/63433/programming-a-pristine-world) as possible in the language of your choice using only unique bytes. (The full definition of a pristine program, copied from that link, is at the bottom of thi... |
[Question]
[
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
Closed 7 years ago.
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently ... |
[Question]
[
Create the shortest program or function that finds the [factorial](http://en.wikipedia.org/wiki/Factorial) of a non-negative integer.
The factorial, represented with `!` is defined as such
$$n!:=\begin{cases}1 & n=0\\n\cdot(n-1)!&n>0\end{cases}$$
In plain English the factorial of 0 is 1 and the factori... |
[Question]
[
[
source: Dilbert, September 8, 1992](http://dilbert.com/strips/comic/1992-09-08/)
I'm hoping to add a new twist on the classic "Hello World!" program.
Code a program that outputs `Hello World!` without:
* String/Character literals
* Numbers ... |
[Question]
[
To "function nest" a string, you must:
* Treat the first character as a function, and the following characters as the arguments to that function. For example, if the input string was `Hello`, then the first step would be:
```
H(ello)
```
* Then, repeat this same step for every substring. So we get:
```... |
[Question]
[
Boys and girls are excited to see *Fifty Shades of Grey* on the silver screen, we just want to code without being bothered, so here's a challenge to pick our brain.
You have to:
* Print on the screen fifty squares filled **each with a different shade of grey**
* If your language of choice **lacks image... |
[Question]
[
Write a program that takes in a string or text file whose first line has the form
```
width height
```
and each subsequent line has the form
```
x y intensity red green blue
```
where:
* `width` and `height` may be any positive integers.
* `x` and `y` may be any integers.
* `intensity` may be any non-n... |
[Question]
[
It's that time of year when many of us get our [advent calendars](https://en.wikipedia.org/wiki/Advent_calendar)! If you are unfamiliar with an advent calendar, these are special calendars used to count down advent in anticipation of Christmas. In my experience the doors are placed randomly, and part o... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win.
Closed 7 years ago.
**Locked**. This qu... |
[Question]
[
In the popular (and essential) computer science book, *An Introduction to Formal Languages and Automata* by Peter Linz, the following formal language is frequently stated:
$$\large{L=\{a^n b^n:n\in\mathbb{Z}^+\}}$$
mainly because this language can not be processed with finite-state automata.
This expre... |
[Question]
[
## Challenge
Write a program that takes an 11x11 array of integers, and constructs a 3D ASCII block building, where each value in the array represents the height of a column of blocks at the coordinates matching the array position. A negative height is a "floating" column - only the top block is visibl... |
[Question]
[
All bots at the battle arena suddenly got brainfucked and no one can explain why. But who cares as long as they are still able to fight - although Brainfuck is the only language they understand anymore.
---
It's been a while since the last submission so I'll finally annouce the winner of BrainFuckedBot... |
[Question]
[
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!
>
>
>
You may use any local- or network-connected printer that is available to you.
If your p... |
[Question]
[
What general tips do you have for golfing in Haskell? I am looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Haskell. Please post only one tip per answer.
---
If you are new to golfing in Haskell, please have a look at the **[Guide to Golfing ... |
[Question]
[
Write a program that prints its own source code out backwards, in other words an *eniuq*.
**Scoring:**
* +50 if you use pull data from the Internet.
* +25 if you read your own source code.
* +1 point per character
* Lowest score wins.
**Rules:**
* No using other files (e.g. `reverse.txt`)
* Minimum co... |
[Question]
[
## Challenge:
In the programming language of your choice, shut down the machine that your code was executed on.
# Rules
* No shutting down by resource exhaustion (e.g.: forkbomb to force shutdown)
* You are allowed to write code that only works in a specific environment/OS, if you wish.
* Standard loop... |
[Question]
[
Your task is to write code that will leak at least one byte of memory in as few bytes as possible. The memory must be leaked *not just allocated*.
Leaked memory is memory that the program allocates but loses the ability to access before it can deallocate the memory properly. For most high level langua... |
[Question]
[
Create a program which can rearrange pixels in image so it can't be recognized.
However your program should able to convert it back to original image.
You can write two functions - for encoding and decoding, however one function which applied repeatedly gives original image (example in math - `f(x) = 1... |
[Question]
[
Write a program or function that prints or outputs this exact text (consisting of 142 characters):
```
()()()()()()
|\3.1415926|
|:\53589793|
\::\2384626|
\::\433832|
\::\79502|
\::\8841|
\::\971|
\::\69|
\::\3|
\__\|
```
Your program must take no input (except in languages ... |
[Question]
[
*Note to mods, if the title doesn't do justice, change it to whatever, I thought it was funny.*
---
You're tasked with hanging up the lights for this Christmas season, and your family has decided that for it to be a merry Christmas, you need to hang at least 2 Christmas lights on your house. So, your c... |
[Question]
[
### Challenge
Create a program that returns a truthy value when run on Microsoft Windows (for simplicity we'll stick with Windows 7, 8.1 and 10) and a falsey value when run on any other operating system (OSX, FreeBSD, Linux).
### Rules
* Code that fails to run/compile on a platform doesn't count as a f... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/31695/edit).
Closed 2 years ago.
[Improve this question](/posts/31695/edit)
... |
[Question]
[
Your task is to write a program that outputs the *exact* string `Programming Puzzles` (trailing newline optional), but when all spaces, tabs, and newlines are removed it outputs `Code Golf` (trailing newline optional.)
Your byte count is the count of the first program, with spaces still there.
# Notes... |
[Question]
[
This is the Collatz Conjecture (OEIS [A006577](https://oeis.org/A006577)):
* Start with an integer *n* > 1.
* Repeat the following steps:
+ If *n* is even, divide it by 2.
+ If *n* is odd, multiply it by 3 and add 1.
It is proven that for all positive integers up to *5 \* 260*, or about *576400000000... |
[Question]
[
Write a program that counts up forever, starting from one.
Rules:
* Your program must log to `STDOUT` or an acceptable alternative, if `STDOUT` is not available.
* Your program must be a full, runnable program, and not a function or snippet.
* Your program must output each number with a separating char... |
[Question]
[
# Background
We already have a challenge [about throwing SIGSEGV](https://codegolf.stackexchange.com/questions/4399/shortest-code-that-return-sigsegv), so why not a challenge about throwing SIGILL?
# What is SIGILL?
SIGILL is the signal for an illegal instruction at the processor, which happens very ra... |
[Question]
[
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Update the question so it focuses on one problem only by [editing this post](/posts/22877/edit).
Closed 7 years ago.
[Improve this question](/p... |
[Question]
[
My dog is called Rex. Every time I scold him, he seems not very impressed and the only times I see him react is when I pronounce his name. If I say
`Rex, I told you not to do this! You're making me angry Rex!`
all he hears is
`Rex, * **** *** *** ** ** ****! ***'** ****** ** ***** Rex!`
**The challen... |
[Question]
[
[Matthias Goergens](https://github.com/matthiasgoergens/Div7/blob/master/regex7) has a 25,604-character (down from the original 63,993-character) regex to match numbers divisible by 7, but that includes a lot of fluff: redundant parentheses, distribution (`xx|xy|yx|yy` rather than `[xy]{2}`) and other ... |
[Question]
[
Consider these 10 images of various amounts of uncooked grains of white rice.
**THESE ARE ONLY THUMBNAILS. Click an image to view it at full size.**
**A:** [](https://i.stack.imgur.com/8T6W2.jpg)
**B:** [](https://i.s... |
[Question]
[
Say I have text like this (each word on one line, with no spaces)
```
Programming
Puzzles
&
Code
Golf
```
That makes no sense! It totally defies the laws of physics.
Your challenge is to remedy this impossible situation and collapse the text like so:
```
P
Prog
&uzz
Coderam
Golflesming
```
So that ther... |
[Question]
[
*This is a tips question for golfing in Python concerning the [Evil Numbers](http://golf.shinh.org/p.rb?Evil%20Numbers) question on [Anarchy Golf](http://golf.shinh.org/).*
An number is [evil](https://en.wikipedia.org/wiki/Evil_number) if its binary expansion has an even number of 1's. The challenge i... |
[Question]
[
Sleep Sort is an integer sorting algorithm I found on the Internet. It opens an output stream, and for each input numbers in parallel, delay for the number seconds and output that number. Because of the delays, the highest number will be outputted last. I estimate it has O(n + m), where n is the number... |
[Question]
[
Write a program or function that transforms an input string into [Zalgo](https://stackoverflow.com/questions/6579844/how-does-zalgo-text-work) text.
For example, for an input string `Zalgo`, a possible output might look like:
>
> Z̗̄̀ȧ̛̛̭̣̖̇̀̚l̡̯̮̠̗̩̩̥̭̋̒̄̉̏̂̍̄̌ģ̨̭̭̪̯̫̒̇̌̂o̢̟̬̪̬̙̝̫̍̈̓̅̉̇
>
>
>
##... |
[Question]
[
I'm honestly surprised that this hasn't been done already. If you can find an existing thread, by all means mark this as a duplicate or let me know.
# Input
Your input is in the form of any positive integer greater than or equal to 1.
# Output
You must output the sum of all integers between and includi... |
[Question]
[
Your task is to display the letter "A" alone, without anything else, except any form of trailing newlines if you cannot avoid them, doing so in a program and/or snippet. Code that returns (instead of printing) is allowed.
Both the lowercase and uppercase versions of the letter "A" are acceptable (that ... |
Subsets and Splits
Python Q&A Count
Counts the number of questions and answers related to Python in the dataset, providing insight into the prevalence of Python content.