Solve Grid-Tangram
This is just a rough outline under development, feel free to share thoughts!
The Tangram is a dissection puzze made from seven shapes: Five different sized triangles, a parallelogram and a square. Given a shape, the goal is recreating the shape using all the pieces and withou...
Donald Knuth was born in 1938, on the 20th day of Capricorn.
The first day of Capricorn is the 22nd December.
Donald Knuth was born on the 10th of January (1938).
The challenge
Write a program or function which takes three inputs about a person (any other specified order is fine):
Their (ca...
@flawr One possibility for input is to just give the solid black shape, and require programs to output the tiles with white outlines. I feel like that's most true to the Tangram puzzle.
You could come up with an input/output that works via labeling the pieces and giving their positions and orientations, which would theoretically open up the challenge to more languages, but I think sticking to making it a visual challenge is more interesting.
/* Created by GAN 01/28/87
* Amended by AKP 09/22/87: if not hard, don't choke, just vomit.
* Amended by 3. 06/12/89: if not hard, sometimes choke anyway, to keep risk.
* 11/10/89: if hard, rarely vomit anyway, for slim chance.
Seeing things like this reminds me that this stuff is old
The book is wrong. The standard does not specify if plain char is signed or unsigned.
In fact, the standard defines three distinct types: char, signed char, and unsigned char. If you #include <limits.h> and then look at CHAR_MIN, you can find out if plain char is signed or unsigned (if CHAR_MI...
The HexaGolf Series
code-golf ascii-art hexagonal-grid
This will be a series of challenges based upon ASCII hexagons.
HexaGolf: Wordagons - Posted
HexaGolf: Rotatagons
Challenge
Given a hexagon and a number n as input, output the same hexagon rotated n times.
Hexagon
The hexagon will ...
A Fragile Quine
A fragile quine is a quine that satisfies the property of having each substring made by removing a single character, when evaluated, produces an error.
For example. If your program asdf is a quine, then for it to be fragile, the following programs must error:
sdf
adf
asf
asd
...
A Fragile Quine
A fragile quine is a quine that satisfies the property of having each substring made by removing a single character, when evaluated, produces an error.
For example. If your program asdf is a quine, then for it to be fragile, the following programs must error:
sdf
adf
asf
asd
...