Will I make it out in time? Inspired by this.

Background

The evil farmer has decided to burn your wheat field down in order to drive up the prices. To ensure total destruction, he has also soaked your field in gasoline. Even more unfortunately, you happened to be walking on the field when it was lit on fire, and you must get out quickly to survive.

Challenge

Given a field containing wheat, fire and your location, determine if you can make it out of the field in time.

A field consists of wheat (here represented by .) and fire (F). Here your location is marked with a O. For example:

...F...F
F.......
........
.F......
....O...
...F....
........
.F....F.

Every second you move to any adjacent cell (but not diagonally), and every fire spreads to every adjacent cell. If you can't move to a cell that will not be on fire, you die. If you make it out of the field, you survive. Let's see what happens in this example:

...F...F
F.......
........
.F......
....O...
...F....
........
.F....F.

..FFF.FF
FF.F...F
FF......
FFF.....
.F.F.O..
..FFF...
.F.F..F.
FFF..FFF

FFFFFFFF
FFFFF.FF
FFFF...F
FFFF....
FF.FF.O.
.FFFFFF.
FFFFFFFF
FFFFFFFF

FFFFFFFF
FFFFFFFF
FFFFF.FF
FFFFF.FF
FFFFFFFO
FFFFFFFF
FFFFFFFF
FFFFFFFF

FFFFFFFF
FFFFFFFF
FFFFFFFF
FFFFFFFF
FFFFFFFFO <-- you made it out and survived, barely
FFFFFFFF
FFFFFFFF
FFFFFFFF

Rules

Your input is the field as a grid. You may choose any input format, including a string with line separators or a 2D array.

You may not take as input the locations for fire and/or yourself.
You may use any 3 distinct values as wheat, fire and your position, including non-strings for array input.
Fields are always at least 1x1 in size, rectangular and contain no invalid characters.
Any field will contain exactly one of the value representing your location, and every other position may or may not be fire.

Your output is one of two distinct values for "you survive" or "you die", as usual in decision-problem.
Standard code-golf rules apply.

Test cases

Survived

O

....
.O..
....

FFFFF
.....
..O..
.....

FFFF
FFFO
FFFF

.F....
......
......
.F....
..O...
.FF...
.F....
..FF..

...F...F
F.......
........
.F......
....O...
...F....
........
.F....F.

Didn't survive

FFF
FOF
FFF

F.F
.O.
F.F

....F
.....
..O..
.....
F....

.F....F.
........
........
F..O....
........
.....F..

...F...F
F......F
........
.F......
....O...
...F....
........
.F....F.

F..F
.O..
FF..

Snails, 15 bytes
\Oo!{.,fee7.,\F

Try it online!
1 means survival while 0 means death.
Since it is impossible to outrun the fire, it is never useful to try to go around it. The best route is always a straight line. So there are only four possible choices of escape route. To determine if a direction is safe, we check for any F in the "fire cone" pointing in that direction.


Compute the specificity of a CSS selector Today, your task is to write a program (or a function) that accepts a string and outputs (or returns) four integers.

Input

The input string is a CSS3 selector, and can contain basically any Unicode character.

Output

The output represents the CSS specificity of this selector.

The first number is always 0 (because it's used for inline styles, and this exercise doesn't apply to inline styles)
The second number is the number of ids (#foo) present in the selector.
The third number is the number of classes (.foo), attributes ([bar]) and pseudo-classes present in the selector.
The fourth number is the number of elements (biz)  and pseudo-elements present in the selector.

Notes:

Universal selector (*) isn't counted anywhere
The pseudo-elements ::before and ::after can also be written with a single ":" (legacy notation)
Input can use the :not(selector) pseudo-class. The selector inside doesn't count, even if it contains ids, classes, elements, ...)
The "bricks" of the selector are separated by combinators (spaces/tabs, +, >, ~, ex: body > div+a ~*), but they can also be cumulated (ex: div#foo.bar[baz]:hover::before)
You also have to handle CSS escape sequences ( \ followed by 1 to 6 hexadecimal numbers, followed by a space), and escaped special characters (\ followed by any of these: !"#$%&'()*+,-./:;<=>?@[\]^`{|}~) properly. Those escapes can be part of any brick of the selector (id, class, etc).
You don't need to do anything particular if you receive an invalid selector or a CSS4 selector. Don't bother implementing a CSS3 selector validator.
Here are a few links to learn more about CSS specificiy:

CSS-tricks article: http://css-tricks.com/specifics-on-css-specificity/
A tool (incomplete) that counts it: http://specificity.keegan.st/

Examples

// Universal

*                       => 0,0,0,0

// ID

#id                     => 0,1,0,0

// Class

.class                  => 0,0,1,0

// Attributes

[foo]                   => 0,0,1,0
[foo="bar"]             => 0,0,1,0
[foo~="bar"]            => 0,0,1,0
[foo^="bar"]            => 0,0,1,0
[foo$="bar"]            => 0,0,1,0
[foo*="bar"]            => 0,0,1,0
[foo|="bar"]            => 0,0,1,0
[ foo  =  bar ]         => 0,0,1,0
[foo  =  'bar']         => 0,0,1,0

(NB: brackets [] can contain anything except an unescaped "]")

// Pseudo-classes

:root                   => 0,0,1,0
:nth-child(n)           => 0,0,1,0
:nth-last-child(n)      => 0,0,1,0
:nth-of-type(n)         => 0,0,1,0
:nth-last-of-type(n)    => 0,0,1,0
:first-child            => 0,0,1,0
:last-child             => 0,0,1,0
:first-of-type          => 0,0,1,0
:last-of-type           => 0,0,1,0
:only-child             => 0,0,1,0
:only-of-type           => 0,0,1,0
:empty                  => 0,0,1,0
:link                   => 0,0,1,0
:visited                => 0,0,1,0
:active                 => 0,0,1,0
:hover                  => 0,0,1,0
:focus                  => 0,0,1,0
:target                 => 0,0,1,0
:lang(fr)               => 0,0,1,0
:enabled                => 0,0,1,0
:disabled               => 0,0,1,0
:checked                => 0,0,1,0
:not(selector)          => 0,0,1,0

(NB: the keyword after ":" can be anything except a pseudo-element)

// Elements

body                    => 0,0,0,1

// Pseudo-elements

:before                 => 0,0,0,1
:after                  => 0,0,0,1
::before                => 0,0,0,1
::after                 => 0,0,0,1
::first-line            => 0,0,0,1
::first-letter          => 0,0,0,1

(NB: parenthesis () can contain anything except an unescaped ")" )

(to be continued)

If you have questions or need examples or test data, please ask in the comments.

Shortest code (in bytes) wins.

Good luck!

Javascript ES6 453 430 bytes
Here goes my shot!
a=>(s){var n=z=[],c=[0,0,0,0],e=s.split(/[\s\+\>\~]+/);return e.forEach((s)=>{n=n.concat(s.replace(/\((.*)\)/,"").split(/(?=\[|::|\.)/))}),n.forEach((s)=>{if(0==s.indexOf("::"))return z.push(s);var n=s.split(/(?=:)/);z=z.concat(n[0].split(/(?=[\#])/)),/before|after/.test(n[1])?z.push(":"+n[1]):n[1]&&z.push(n[1])}),z.forEach((s)=>{/^[a-z]+$/gi.test(s)||"::"==s[0]+s[1]?c[3]++:-1!=":.[".indexOf(s[0])?c[2]++:"#"==s[0]&&c[1]++}),c}

@UPDATE improved code, now it handles :not and :before/:after selectors better, nevertheless haven't tested CSS escape sequences.


Dr. Lamport's Unfinished Business Introduction
Dr. Leslie Lamport, of the eponymous Lamport one-time signature scheme, is getting rather old. But he can't die until his most famous algorithm gets all the kinks ironed out!
In particular, that scheme had one internal component he was never satisfied with:

We hope that someone can find a more elegant method for constructing the function G

Challenge
Today, we're helping him prepare to leave by constructing a function R that takes the output of our one-way function φ (likely a hash function), and injectively uses it to select a subset of the user's private key, according to the following specifications:

Your function takes two arguments: the output of hash function φ (as a data blob, octet stream, or similar appropriate native datatype), and an ordered set (in your choice of appropriate native datatype).

If your language's standard library has a bitstring datatype [ex: Java; not Python], you may choose to take d as it with no penalty; if it does not, then unpacking the bytestring (or finding some clever way to avoid or vectorize the doing-of!) is your responsibility.

The nth bit of φ's output chooses whether the 2*nth element or the 2*n+1th element will be included in the subset. If φ outputs a 24-bit data blob, then 24 elements will be chosen.

FOR EXAMPLE: if the second bit of φ(m) is 1, then the fourth element of pk will be chosen. If this bit is, instead, 0, then the third element of pk will be chosen. (There are examples included below.)

Naturally, for 1-indexed languages, the nth bit chooses between the 2*n-1th and 2*nth elements.

behavior is totally undefined in the event that φ returns something with more bits than half the number of elements in pk; don't even consider this case.

Your function returns the thus-chosen subset of pk.

While the input set is ordered, the output set does not need to be ordered (and, if it is an ordered datatype, all possible orderings are allowed with no penalty). The function merely has to identify a subset of the ordered input set, so any ordering on its output would be redundant anyway.

This is a standard golfing challenge; shorter answers are better than longer answers.

Example Input and Output
For all examples,
N = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64

φ = MD5, with the digest truncated to the first 24 bits
m = [empty string]
φ(m) -> \xd4\x1d\x8c

R(φ(m), N) -> 2, 4, 5, 8, 9, 12, 13, 15, 17, 19, 21, 24, 26, 28, 29, 32, 34, 35, 37, 39, 42, 44, 45, 47

φ = CRC32
m = "Hello, World" (ASCII)
φ(m) -> \x26\x5b\x86\xc6

R(φ(m), N) -> 1, 3, 6, 7, 9, 12, 14, 15, 17, 20, 21, 24, 26, 27, 30, 32, 34, 35, 37, 39, 41, 44, 46, 47, 50, 52, 53, 55, 57, 60, 62, 63}

d = \x00\x00 = two bytes, with all bits "off"

R(φ(m), N) -> 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31

d = \xFF = one byte, with all bits "on"

R(φ(m), N) -> 2, 4, 6, 8, 10, 12, 14, 16

φ = Constant function returning the single byte \x1d
m = [any input]

R(φ(m), N) -> 1, 3, 5, 8, 10, 12, 13, 16

Python, 283 bytes:
(283 does not include comments, type hints, docstrings, or the example φ)
def _iterbits(data):
    yield from (((byte & (0b1 << k)) >> k) for byte in data for k in range(8 - 1, -1, -1))

def R(digest, pk: Union[OrderedSet, list, tuple]) -> set:
    "Reference solution"
    included_indices = set(2 * n + bit for n, bit in enumerate(_iterbits(digest)))
    return set(k for i, k in enumerate(pk) if i in included_indices)

def φ(m):
    "Example hash function to help you run your own test cases\n\nReturns an MD5 digest truncated to 24 bits"
    return hashlib.md5(m).digest()[:3]

R, 86 83 82 bytes
(or 64 bytes with additional NA values in output when length of hash result is greater than half the length of the private key N)

function(f,N,d=seq(b<-sapply(f,function(b)b%/%2^(7:0)%%2))*2)N[(d-!b)*!d>sum(N|1)]

Try it online!
Input is an array f of single-byte integers (representing the output of the hash function phi) and an array N (representing the ordered array from which to select a subset).
G=function(f,N){            # G is function with args f=array of bytes, N=array of values
  bits=                     # calculate the bits of f:
    sapply(f,function(b)    #   for each byte b in f
      b%/%2^(7:0)%%2)       #   get its bits
  d=seq(bits)               # define d as 1..number of bits
  N[                        # now output the elements of N given by indices:
    (d*2-1+bits)            #   d*2-1+bits (these are the indices from the bytes of f)
             *!d>sum(N|1)/2 #   multiplied by zero (FALSE) for bits that exceed the length of N
    ]
}


Tips for golfing in D2 What general tips do you have for golfing in D? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to D (e.g. "remove comments" is not an answer). Please post one tip per answer.

D is JavaScript.

Obviously not. But, when dealing  with float, double and real, nan is a value which must be handled, and, as specified by IEEE 754, NaN does not compare equal with itself.

writeln(double.nan == double.nan); // false

Meaning,

writeln(value!=value); // only true for nan

is way shorter than

import std.math;
writeln(isNaN(value));

Obviously, always use math.isNaN for real code. ;)


Multiply Quaternions Write a named function or program that computes the quaternion product of two quaternions. Use as few bytes as possible.

Quaternions

Quaternions are an extension of the real numbers that further extends the complex numbers. Rather than a single imaginary unit i, quaternions use three imaginary units i,j,k that satisfy the relationships.

i*i = j*j = k*k = -1
i*j =  k
j*i = -k
j*k =  i
k*j = -i
k*i =  j
i*k = -j

(There's also tables of these on the Wikipedia page.)

In words, each imaginary unit squares to -1, and the product of two different imaginary units is the remaining third one with a +/- depending on whether the cyclic order (i,j,k) is respected (i.e., the right-hand-rule). So, the order of multiplication matters.

A general quaternion is a linear combination of a real part and the three imaginary units. So, it is described by four real numbers (a,b,c,d).

x = a + b*i + c*j + d*k

So, we can multiply two quaternions using the distributive property, being careful to multiply the units in the right order, and grouping like terms in the result.

(a + b*i + c*j + d*k) * (e + f*i + g*j + h*k)
= (a*e - b*f - c*g - d*h)    +
  (a*f + b*e + c*h - d*g)*i  +
  (a*g - b*h + c*e + d*f)*j  +
  (a*h + b*g - c*f + d*e)*k

Seen this way, quaternion multiplication can be seen as a map from a pair of 4-tuples to a single 4-tuples, which is what you're asked to implement.

Format

You should write either a program or named function. A program should take inputs from STDIN and print out the result. A function should take in function inputs and return (not print) an output.

Input and output formats are flexible. The input is eight real numbers (the coefficients for two quaternions), and the output consists of four real numbers. The input might be eight numbers, two lists of four numbers, a 2x4 matrix, etc. The input/output format don't have to be the same.The ordering of the (1,i,j,k) coefficients is up to you.

The coefficients can be negative or non-whole. Don't worry about real precision or overflows.

Banned: Function or types specifically for quaternions or equivalents.

Test cases

These are in (1,i,j,k) coefficient format.

[[12, 54, -2, 23], [1, 4, 6, -2]]
 [-146, -32, 270, 331]

[[1, 4, 6, -2], [12, 54, -2, 23]]
 [-146, 236, -130, -333]

[[3.5, 4.6, -0.24, 0], [2.1, -3, -4.3, -12]]
 [20.118, 2.04, 39.646, -62.5]

Reference Implementation

In Python, as function:

#Input quaternions: [a,b,c,d], [e,f,g,h]
#Coeff order: [1,i,j,k]

def mult(a,b,c,d,e,f,g,h):
    coeff_1 = a*e-b*f-c*g-d*h
    coeff_i = a*f+b*e+c*h-d*g
    coeff_j = a*g-b*h+c*e+d*f
    coeff_k = a*h+b*g-c*f+d*e

    result = [coeff_1, coeff_i, coeff_j, coeff_k]
    return result

Python (83)

r=lambda A,B,R=range(4):[sum(A[m]*B[m^p]*(-1)**(14672>>p+4*m)for m in R)for p in R]

Takes two lists A,B in [1,i,j,k] order and returns a result in the same format.

The key idea is that with [1,i,j,k] corresponding to indices [0,1,2,3], you get the product's index (up to sign) by XOR'ing the indices. So, the terms that get placed in index p are those who indices XOR to p, and are thus the products A[m]*B[m^p].

It only remains to make the signs work out. The shortest way I found was to simply code them into a magic string. The 16 possibilities for (m,p) are turned into numbers 0 to 15 as p+4*m. The number 14672 in binary has 1's at the places where -1 signs are needed. By shifting it the appropriate number of places , a 1 or 0 winds up at the last digit, making the number odd or even, and so (-1)** is either 1 or -1 as needed.


How Fermat is this number? Fermat numbers are positive integers that can be expressed as 22x+1 with an integer x.

Let us now define an attribute of a number called "Fermat-ness":

The Fermat-ness of the number is one less than the length of the chain of powers of two, starting from the base, with powers of two expanded so as to maximize the fermat-ness.
A number that is not a Fermat number has the Fermat-ness of zero.

So, 17 (=22220+1) has Fermat-ness three.

Challenge

Given a positive nonzero integer as input, output the Fermat-ness of the number.

Rules

You may take the input in binary, decimal, hexadecimal, as a bignum, or whatever format lets you golf best
Your solution must be able to process numbers with bit-lengths over 64 whichever representation you use.
Nonnegative integer powers only.
Standard loopholes are of course prohibited.
This is code-golf, so shortest answer wins.

Test cases

These are in format input->output. The input is in hexadecimal to save space.

10000000000000000000000000000000000000000000000000000000000000001 -> 2
1000000000000BC00000000000000000000000000000000001000000000000001 ->0
1234567890ABCDEF -> 0
100000000000000000000000000000001 -> 1
5 -> 2
11 -> 3
10001 -> 4
101 -> 1

The same in decimal:

115792089237316195423570985008687907853269984665640564039457584007913129639937 -> 2
115792089237316497527923305698859709742143344804209838213621568094470773145601 -> 0
1311768467294899695 -> 0
340282366920938463463374607431768211457 -> 1
5 ->2
17 -> 3
65537 -> 4
257 -> 1

Thanks to geokavel for invaluable input in the sandbox.

Jelly, 15 14 bytes

1 byte thanks to Jonathan Allan.

’µBḊ⁸LṀ?µÐĿḊḊL

Try it online!


Dirichlet Convolution Inverse If \$f,g\colon \mathbb{Z}_{\geq 1} \to \mathbb{R}\$, the Dirichlet convolution  of \$f\$ and \$g\$ is defined by

\$ \qquad\qquad\qquad  \displaystyle (f*g)(n) = \sum_{d|n}f(d)g(n/d).\$

This question asked about computing Dirchlet convolution of functions.
The identity element of the Dirichlet convolution is the function

\$ \qquad\qquad\qquad\qquad\,\, e(n)=\begin{cases}1 & n=1 \\ 0 & \text{else}\end{cases}\$.

If \$f*g=e\$ then \$f\$ and \$g\$ are convolutional inverses. If \$f(1)\neq 0\$ then \$f\$ has a convolutional inverse. There is a formula for the inverse:

\$\qquad \qquad \qquad \qquad\,\,\,\displaystyle g(1)=\frac{1}{f(1)}\$

\$\qquad \qquad \qquad\qquad\,\, \displaystyle g(n)=\frac{-1}{f(1)}\sum_{\substack{d|n\\d<n}} f(n/d)g(d) \qquad \text{for $n>1$}\$.

Task:

Given a list l of integers, compute the convolution inverse of l. The output should be a list of the same length as l. The list l represents the function

\$\qquad\qquad\qquad\qquad\,\, f(n) = \begin{cases}
\text{The $n$th entry of l} & n < \text{len(l)} \\
0 & \text{else}
\end{cases}\$
My test cases are one-indexed because it makes sense in context. If you wish to pad the input and output with an ignored element at the beginning, or make some other modification to support zero indexing, that's fine. Most other i/o formats are probably acceptable. You may assume the output are integers.

Test Cases

Input:  [1, 0, 0, 0, 0, 0, 0]
Output: [1, 0, 0, 0, 0, 0, 0]

Input:  [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
Output: [1, -1, -1, 0, -1, 1, -1, 0, 0, 1, -1, 0, -1, 1, 1, 0, -1, 0, -1, 0]

Input:  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
Output: [1, -2, -3, 0, -5, 6, -7, 0, 0, 10, -11, 0, -13, 14, 15, 0]

Input:  [1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 2, 4, 4, 5]
Output: [1, -2, -2, 1, -2, 4, -2, 0, 1, 4, -2, -2, -2, 4, 4, 0]

Input:  [1, 3, 4, 7, 6, 12, 8, 15, 13, 18, 12, 28, 14, 24, 24, 31, 18, 39]
Output: [1, -3, -4, 2, -6, 12, -8, 0, 3, 18, -12, -8, -14, 24, 24, 0, -18, -9]

Input:  [1, 5, 10, 21, 26, 50, 50, 85, 91, 130]
Output: [1, -5, -10, 4, -26, 50, -50, 0, 9, 130]

Input:  [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1]
Output: [-1, -1, 1, -2, 1, 1, 1, -4, 0, 1, 1, 2, 1, 1, -1, -8, 1, 0, 1]

MATL, 32 bytes

1i1)/Gd"GX@QtZ\3L)/)y7M)*s_G1)/h

Try it online! Or verify all test cases.

How it works

1        % Push 1
i        % Take input: f, of size L
1)       % Get its first entry: f(1)
/        % Divide: gives 1/f(1). This is g(1). It will later be expanded into
         % a vector to include g(2), g(3), ... g(L)
G        % Push input again
d        % Consecutuve differences: gives a vector of L-1 numbers
"        % For each: this iterates L-1 times
  G      %   Push input again
  X@Q    %   Push iteration index plus 1: gives 2, 3, ..., L respectively in
         %   each iteration. This is n in the formula for computing g(n)
  t      %   Duplicate
  Z\     %   Divisors of n. Gives a vector with the values of d in the formula
  3L)    %   Remove last. This corresponds to the condition d<n in the formula
  /      %   Divide. Gives a vector with n/d for d<n
  )      %   Index. Gives a vector with f(n/d)
  y      %   Duplicate from below. Pushes a copy of g as built so far
  7M     %   Push vector containing d for d<n, again
  )      %   Index. Gives a vector with g(d)
  *      %   Multiply, element-wise. Gives a vector containing f(n/d)*g(d)
  s      %   Sum
  _      %   Negate
  G      %   Push input again
  1)     %   Get its first entry: f(1)
  /      %   Divide. This gives g(n)
  h      %   Contatenate. This attaches the newly computed g(n) to the vector
         %   containing the previous values of g
         % End (implicit)
         % Display (implicit)


Logical Order of Operations Task

Given an input, evaluate it as a mathematical equation following the order of operations.

But, instead of the using PEMDAS, we drop the parentheses and exponentiation and introduce spaces - SMDAS - spaces, then multiplication & division, then addition & subtraction.

How does that work?

Every operator with more spaces around it gets more precedence - but that can change from one side to the other. Usual precedence test - 2+2*2 still gets evaluated to 6 - so does 2 + 2*2 - which would be spelled out like two .. plus .. two-times-two, but 2+2 *2 or 2+2 * 2 would equal 8 - twoPlusTwo .. times two.

So, from any operator to any side every operator and number with less spaces can be grouped as in parentheses and then calculated as normal.

Alternatively, you can think of it as spaces around operators dropping the operator lower in precedence, or if the spaces are different on each side, drop the precedence on each side differently.

Examples

input = output
2+2*2 = 6
2+2-2 = 2
2+12/6 = 4
228+456/228 = 230
2+0*42 = 2
73-37-96+200 = 140

2+2 * 2 = 8
5*6  +  7*8   -3  *5 = 415
4+4*4+ 4*4-4*2  /  4*4-2 = 2
228+456 /228 = 3
2+2 * 3-6 * 4/2 + 4*3  +  1000 / 5*5 / 5-3  +  1 = 9
2+0 * 42 = 84
5*5 *7-1 = 174

Notes

The input will always be valid - it will always contain at least 2 numbers, separated by a sign (-+/* (for which you may use alternatives such as ∙ or ÷))
The input will never end or start in spaces.
There will never be unary subtraction - -4*-6.
There will never be division by zero.
There may be negative integers in the process but never in the output.
Division is only required to work for integers.
Floating-point inaccuracies at any step of the process are fine.
This is code-golf, shortest answer per language wins!

Japt, 15 bytes

OvUr" +%d"_rS'(

Test it online!

How it works

This challenge was practically made for Japt. I shall attempt to explain how:

Japt is basically a shortened version of JavaScript. In fact, after making some changes to the code ("transpiling" to JS), it is evaluated directly as JavaScript. What comes in handy here is that a space in Japt becomes ) in JavaScript (a feature I occasionally regret adding, as it makes it hard to write "ungolfed" Japt code), and missing parentheses are automatically added.

What this all means for this challenge is that we can obtain the correct result simply by changing all spaces after an operator (before a number) to left-parentheses:

5*6  +  7*8   -3  *5    Original string
5*6  +((7*8   -3  *5    Japt code that evaluates to the correct number

When transpiled to JS, the changes mentioned above are made, which results in this:

     5*6  +((7*8   -3  *5    Japt code
(((((5*6))+((7*8)))-3))*5    transpiled JS code

The JS code is then evaluated, which gives the expected result.

OvUr" +%d"_rS'(    Implicit: U = input string
  Ur" +%d"         Replace each match of / +\d/ in U with
          _rS'(      the match with each Space replaced with a '('.
Ov                 Evaluate the result as Japt.
                   Implicit: output result of last expression


Inverse quine: print everything except your program Write a program which will eventually, given enough time, print all possible permutations of ASCII characters (both printable and non-printable) less than or equal to its length, except itself. The text of the program must not appear anywhere in its output.
For example, if your program is abc, then part of your output could look like:
(many lines omitted)
ab0
ab1
ab2
...
abb
abd
(many lines omitted)

or
...[some character other than a]bcabacba5804g715^^*#0...

If your language requires characters that are not printable ASCII (e.g. Jelly or APL), print all combinations of characters in its code page.
The strings need not be separate from each other; a single character can be counted as part of multiple strings. You could try to create a superpermutation, which would be at least \$95! + 94! + 93! + 95 − 3 = 1.04 × 10^{148}\$ characters long.
Standard quine rules apply (no reading the program's source code) but this is also code golf.

Ruby, 92 91 86 bytes
Saved 5 bytes thanks to a comment by @Sisyphus on another answer.

eval s="a=*?\0..?\x7f;90.times{|i|puts a.product(*[a]*i).map(&:join)-['eval s=%p'%s]}"

Try it online!
Forms arrays containing all permutations of ASCII characters (codepoints 00 to 127) of length 1 to 91, then subtracts from each the string eval$s=%q(#$s), which is equivalent to the full program (because of the interpolated string $s).
eval s="                               # evaluate s, a double-quoted string that contains most of the program
  a=*?\0..?\x7f;                       # create array of ASCII characters 00 to 127
  90.times{|i|                         # for permutations of length i = 1 to 91:
    puts a.product(*[a]*i).map(&:join)   # print all strings of length i...
    -['eval$s=%p'%s]                     # not equal to the full program
  }
"


The shortest way to find one unique value when all other values are the same In this question at Code Review they tried to find the fastest way to return the unique element in an array where all the elements are the same except one. But what is the shortest code that accomplish the same thing?
Goal
Find the unique element in an array and return it.
Rules

The input array will contain only integer, strictly positive numbers, so you can use 0 as the end of the input if your language needs it.
The size of the array will be at least 3 and will have a finite size. You can limit the size of the array to any limit your language has.
Every element in the array will be the same, except for one which will be different.
You must output the value (not the position) of the unique element in any standard format. You can output leading or trailing spaces or newlines.
You can take the input array in any accepted format.

Examples
Input                   Output
------------------------------
[ 1, 1, 1, 2, 1, 1 ]      2
[ 3, 5, 5, 5, 5 ]         3
[ 9, 2, 9, 9, 9, 9, 9 ]   2
[ 4, 4, 4, 6 ]            6
[ 5, 8, 8 ]               5
[ 8, 5, 8 ]               5
[ 8, 8, 5 ]               5

Winner
This is code-golf, so may the shortest code for each language win!

Python 3, 27 bytes

lambda x:min(x,key=x.count)

Try it online!


Rolling digital number lock There's a simple digital number lock. After each button press the lock checks if the previous four presses constitute the correct code. I.e. typing 44445 tests two codes: 4444 and 4445. You must brute force it with a code golfed program.

Rules

Your program must test numbers by printing ASCII digits 0-9 to standard output. Other output, if any, will be ignored.
The program must be deterministic. If you need "random" numbers, you must use a deterministic generator with a well defined seed.
Infinite output beyond all 10^4 codes is allowed. Opening the lock is considered to stop the program.

Scoring

Calculate the average digits of output needed to crack the lock. I.e. search the output string for every possible four digit sequence and record where it first appears.
Add the source code length in bytes. The program must be fully functional, you are not allowed to omit imports or other boilerplate.

  Score = Average digits to crack + codelength in bytes

Example entry

Python, 35 bytes.

for i in range(9001):print '%.4d'%i

Score: 8444.9837 + 35 = 8479.9837

Other

Simple, stupid Python program to verify score of an output string:

d = {}
s = ''.join(c for c in s if '0' <= c <= '9')
for i in range(len(s)-4):
    t = s[i:i+4]
    if t in d:
        continue
    d[t] = i + 4
    if len(d) == 10000:
        break
print sum(d.values()) / 10000.

Java 5218

This is the (golfed) code:

class a{int[]a=new int[5];public static void main(String[]a){new a().b(1,1);}void b(int t,int p){if(t>4)for(t=0;++t<=p&&4%p==0;)System.out.print(a[t]);else{a[t]=a[t-p];b(t+1,p);for(a[t]=a[t-p];++a[t]<=9;)b(t+1,t);}}}

It prints a specially crafted sequence to stdout. The completed sequence has all combinations, only once, in the shortest way possible. The total length is 10.000 with the first combination after 4 (obviously) and the last after 10.000. So if I understand the challenge correctly my score is:

4 + ((10000-4)/2) = 5002 avg length to break the code
5002 + 216 (code length) = 5218

Obviously this score will be improved (Java is pretty verbose), so I'm not going to tell you the name of the sequence I'm using...


Give me the Gray Code list of bit width n The Gray Code is a sequence of binary numbers of bitwidth n where successive numbers differ only in one bit (see example output).

Reference

Example input:

3

Example output:

000
001
011
010
110
111
101
100

Notes:

This question seems to have a dupe but it's not, for that question is not a code-golf, and it demands different output. It will help to check out it's answers, though.
You may assume a variable n which contains the input.

JavaScript (77)

for(i=0;i<1<<n;)alert((Array(n*n).join(0)+(i>>1^i++).toString(2)).substr(-n))

More browser-friendly version (console.log and prompt()):

n=prompt();for(i=0;i<1<<n;)console.log((Array(n*n).join(0)+(i>>1^i++).toString(2)).substr(-n))


Create a simple math calculator +-/* accepting only Chinese characters The task:
Build a calculator that takes a simple math equation in Chinese and outputs the correct answer(To the equation from the users input) in Chinese.

Scope:

Any programming language can be used.
Input must be in Chinese otherwise an error message will be displayed .
Output must be in Chinese.
Only input and output of whole numbers between 0-999 will be in scope (this is meant to be a simple calcaulation).
The full original input must be included prior to equals then the answer.
Display answer with no decimal points.
Long number form output is mandatory.
Input must accept Long number form, inclusion of short form is optional.

Sample input/output:

  二乘以八  (2*8)
  二乘以八等于十六 (2*8=16)

Cheat Sheet:

  零 or 〇 → 0 (either form or both, you choose)
  一 → 1
  二 → 2
  三 → 3
  四 → 4
  五 → 5
  六 → 6
  七 → 7
  八 → 8
  九 → 9
  十 → 10
  百 → 100
  加 → + Operator
  减 → - Operator
  乘以 → * Operator
  除以 → / Operator
  等于 → = Operator

  Chinese numbering is basic 333 is just 3 100 3 10 3 三百三十三 only exception is 十 where you don't need 一十 to say 10 (but you might to), but you do need 一百 to say 100 (i.e., can't say just 百).

Useful link: http://www.mandarintools.com/numbers.html

If you can't see the chinese symbols, you may see them here.

Get creative and happy coding!

Java

It parses the equation as a context-free language, using these productions for that:

U1 = [一-九]                 (i.e. [1-9])
D1 = U1 十 U1?
DO = U1? 十 U1?
CDN = 〇 U1 | D1
C1 = U1 百 CDN?
F = C1 | DO | U1 | 〇
F2 = 負? F
OP = 加 | 减 | 乘以 | 除以    (i.e., + | - | * | / )
EQ = F2 (OP F2)*

The DO and D1 productions are handled in the same method, diferentiated by a parameter. The other productions take one method each. The EQ is the grammar main symbol. Before starting the parse, it replaces 零 for 〇, so it need to handle just 〇 after that.

The 負 is for negative numbers. It can handle numbers from -999 to 999 (or 負九百九十九 to 九百九十九).

Further, to make it much more chinese, all the identifiers are in chinese. The only exception is the class name (using international characters there may cause problems) that is a chinese name transliterated to latin characters.

For the input I had to use a JOptionPane. Sorry for that, but I had trouble about encodings using other input methods. If you don't like this method of input, you can use the 解方程 method directly, it takes the input formula and produce the output equation (or error message).

import javax.swing.JOptionPane;

public class ZhongguoJisuanQi {

    private final String 文字输入;
    private int 源指数;

    public ZhongguoJisuanQi(String 文字输入) {
        this.文字输入 = 文字输入.replace("零", "〇");
        this.源指数 = 0;
    }

    public static void main(String... 参数) {
        String 方程 = 解方程(读取文本行());
        System.out.println(方程);
        JOptionPane.showMessageDialog(null, 方程, "答案是", JOptionPane.INFORMATION_MESSAGE);
    }

    private static String 读取文本行() {
        return JOptionPane.showInputDialog(null, "输入数学公式", "输入数学公式", JOptionPane.QUESTION_MESSAGE);
    }

    public static String 解方程(String 数学公式) {
        if (数学公式 == null) return "错误：给定的数学公式的格式不正确。";
        ZhongguoJisuanQi 计算器 = new ZhongguoJisuanQi(数学公式);
        Integer 结果 = 计算器.解析并解决了式();
        if (结果 == null) return "错误：给定的数学公式的格式不正确。";
        return 数学公式 + "等于" + 整数转换为文本(结果);
    }

    private boolean 找到字符(char 字符, int 指数) {
        return 指数 < 文字输入.length() && 文字输入.charAt(指数) == 字符;
    }

    private Integer 解析生产一() {
        int 数 = "一二三四五六七八九".indexOf(文字输入.charAt(源指数));
        if (数 == -1) return null;
        源指数++;
        return 数 + 1;
    }

    private Integer 解析生产十(boolean 必须带有前缀) {
        int 原始来源索引 = 源指数;
        Integer 第一个数字 = 解析生产一();
        if (第一个数字 == null && 必须带有前缀) return null;
        if (!找到字符('十', 源指数)) {
            源指数 = 原始来源索引;
            return null;
        }
        源指数++;
        Integer 第二个数字 = 解析生产一();
        return (第一个数字 == null ? 1 : 第一个数字) * 10 + (第二个数字 == null ? 0 : 第二个数字);
    }

    private Integer 解析生产或零十() {
        int 原始来源索引 = 源指数;
        if (找到字符('〇', 源指数)) {
            源指数++;
            Integer 数 = 解析生产一();
            if (数 == null) {
                源指数 = 原始来源索引;
                return null;
            }
            return 数;
        }
        return 解析生产十(true);
    }

    private Integer 解析生产百() {
        int 原始来源索引 = 源指数;
        Integer 第一个数字 = 解析生产一();
        if (第一个数字 == null) return null;
        if (!找到字符('百', 源指数)) {
            源指数 = 原始来源索引;
            return null;
        }
        源指数++;
        Integer 第二个数字 = 解析生产或零十();
        return 第一个数字 * 100 + (第二个数字 == null ? 0 : 第二个数字);
    }

    private Integer 解析生产数无符号() {
        Integer 数 = 解析生产百();
        if (数 != null) return 数;
        数 = 解析生产十(false);
        if (数 != null) return 数;
        数 = 解析生产一();
        if (数 != null) return 数;
        if (找到字符('〇', 源指数)) {
            源指数++;
            return 0;
        }
        return null;
    }

    private Integer 解析该生产号() {
        boolean 负 = false;
        if (找到字符('負', 源指数)) {
            源指数++;
            负 = true;
        }
        Integer 数 = 解析生产数无符号();
        return 数 == null ? null : 负 ? -数 : 数;
    }

    private String 解析算术运算符() {
        if (找到字符('加', 源指数)) { 源指数++; return "加"; }
        if (找到字符('减', 源指数)) { 源指数++; return "减"; }
        if (找到字符('乘', 源指数) && 找到字符('以', 源指数 + 1)) { 源指数 += 2; return "乘以"; }
        if (找到字符('除', 源指数) && 找到字符('以', 源指数 + 1)) { 源指数 += 2; return "除以"; }
        return null;
    }

    public Integer 解析并解决了式() {
        Integer 第一个数字 = 解析该生产号();
        while (true) {
            String 算术运算符 = 解析算术运算符();
            if (算术运算符 == null) return 源指数 == 文字输入.length() ? 第一个数字 : null;
            Integer 第二个数字 = 解析该生产号();
            if (第二个数字 == null) return null;
            switch (算术运算符) {
                case "加": 第一个数字 += 第二个数字; break;
                case "减": 第一个数字 -= 第二个数字; break;
                case "乘以": 第一个数字 *= 第二个数字; break;
                case "除以": 第一个数字 /= 第二个数字; break;
                default: throw new AssertionError();
            }
        }
    }

    private static String 整数转换为文本(int 参数) {
        if (参数 == 0) return "〇";
        StringBuilder 字符串生成器 = new StringBuilder(7);
        int 数 = 参数;
        if (数 < 0) {
            字符串生成器.append("負");
            数 = -数;
        }
        if (数 >= 1000) return null;
        if (数 >= 100) {
            字符串生成器.append("〇一二三四五六七八九".charAt(数 / 100)).append("百");
            数 %= 100;
            if (数 >= 1 && 数 <= 9) 字符串生成器.append("〇");
            if (数 >= 10 && 数 <= 19) 字符串生成器.append("一");
        }
        if (数 >= 20) 字符串生成器.append("〇一二三四五六七八九".charAt(数 / 10));
        if (数 >= 10) 字符串生成器.append("十");
        数 %= 10;
        字符串生成器.append("〇一二三四五六七八九".charAt(数));
        return 字符串生成器.toString();
    }
}

Compile with:

javac -encoding UTF8 ZhongguoJisuanQi.java

Run with:

java ZhongguoJisuanQi

Cheat sheet for identifiers names, accordingly to google translator:

(english original text) -> (chinese text) -> (english text back from chinese)
chinese calculator -> 中国计算器 (Zhōngguó jìsuàn qì) -> china calculator
text input -> 文字输入 -> text input
source index -> 源指数 -> source index
original source index -> 原始来源索引 -> original source index
Enter the mathematical formula -> 输入数学公式 -> Enter mathematical formulas
mathematical formula -> 数学公式 -> mathematical formulas
Error: The given mathematical formula is malformed. -> 错误：给定的数学公式的格式不正确。 -> Error: The given mathematical formula is not correct.
character -> 字符 -> character
read a text line -> 读取文本行 -> read a line of text
arguments -> 参数 -> parameter
equation -> 方程 -> equation
index -> 指数 -> index
find character at -> 找到字符 -> find characters
parse the production -> 解析生产 -> resolve the production
parse the production or zero -> 解析生产或零 -> resolve the production or zero
parse the production number -> 解析该生产号 -> resolve the production number
parse the production number without sign -> 解析生产数无符号 -> resolve production unsigned
parse and solve the formula -> 解析并解决了式 -> parse and resolve the formula
parse an arithmetic operator -> 解析算术运算符 -> parsing arithmetic operators
arithmetic operator -> 算术运算符 -> arithmetic operators
must be prefixed -> 必须带有前缀 -> must be prefixed with
calculator -> 计算器 -> calculators
solve the equation -> 解方程 -> solving equations
result -> 结果 -> result
number -> 数 -> number
minus -> 负 -> minus
first number -> 第一个数字 -> the first number
second number -> 第二个数字 -> second number
string builder -> 字符串生成器 -> string builder
convert integer to text -> 整数转换为文本 -> integer is converted to text
the answer is -> 答案是 -> the answer is


Golf to find Boring numbers If an integer has a digit/sequence of digits in it which repeats continuously (You will understand why I said "continuously") 5 or more times, we call It "Boring".
For example, 11111 is Boring, whereas 12345 is not.
Instructions
Take an Integer as Input
Output a truthy value if the integer is boring, and a falsey value if the integer is not boring.
Example
11111=>true or 1 (1 repeats 5 times)
12345=>false or 0
1112111=>false or 0
4242424242=>true or 1 (42 repeats 5 times)
-11111=>true or 1
3452514263534543543543543543876514264527473275=>true or 1 (543 repeats 5 times)
If you use other types of "truth" and "false", specify it.
Rules
Basic code-golf rules apply.
Good luck!

Retina, 9 bytes

(.+)\1{4}

Verify all testcases! (slightly modified to run all testcases at once.)


Find the date that is n days from January 1st 1984 This challenge is a relatively simple concept that I'm surprised has not been done yet. You will be given only an integer as an input. Your task is to find the date that is this number of days from January 1st, 1984. This challenge is uniquely for the Gregorian calendar (which is standard almost everywhere).
One restriction
The twist on this challenge is that you should not use a built-in function that deals with the date and time - because then this challenge would be trivial for a few languages. Your program must do this calculation entirely on its own - keep in mind leap years exist and have special rules:

every year that is a multiple of four is a leap year
the exception to the above rule is any year that is a multiple of 100 but not a multiple of 400

Output format
You must output the year, month, and day of the month in any order you want so long as the number for the year and day of the month are not conjoined. You can use any character (not numeric or alphabetical), or none, as a separator. The name of the month must be given as a word instead of a number. Examples for this format are shown in the test cases.
Input
You will be given an integer as an input. You can assume this integer will be smaller in magnitude than 700000 - this means negative integers are also accepted.
Test cases
input | accepted output (which is relatively flexible)
13318 | June 18 2020
2 | JanUaRy03(1984)
656979 | 3782september29
-30 | DECEMBER 02 1983
-589001 | 00371may15 (leading zeroes may be used)
0 | 1984 1 january
Scoring
This is code-golf. Shortest code wins!

05AB1E, 111 106 103 bytes
•3zb•2ôI5°7*+F©`т‰0Kθ4ÖUD2Qi\28X+ë<7%É31α}‹i®ć>šë®1¾ǝDÅsD12‹i>1ǝë<sθ>ª]εNi”……‚æ‡‰…ä†ï€¿…Ë…ê†Ä…æ…Ì…Í”#sè

Output as a triplet [day, "Month", year].
Try it online. (Sort of, since it times out for any input above \$\geq-650000\$..)
Explanation:
Since 05AB1E doesn't have any date builtins, I've calculated things manually before. I've used the code of going to the next day from this answer of mine, which in turns also uses the leap year calculation of this answer of mine.
Since this challenge also asks to go back in time, I would need to implement something to go to a previous day as well for negative inputs, which would cost a lot of bytes. Instead, since the challenge input is limited to the range \$[-700000,700000]\$, I used that to my advantage and start going upwards in days from date June 21st, 0067 onward, which is 700,000 days before January 1st, 1984.
In pseudo-code, I therefore do the following steps:
1   Date currentDate = [21,06,0067]
2   Loop input + 700000 amount of times:
3*   currentDate += 1;  # Set currentDate to the next date in line
4   Convert month-integer to month-string and output the result

Where step 3 is divided into substeps:
a   Integer isLeapYear = ...;
b   Integer daysInCurrentMonth = currentDate.month == 2 ?
c                                 28 + isLeapYear
d                                :
e                                 31 - (currentDate.month - 1) % 7 % 2;
f   If(currentDate.day < daysInCurrentMonth):
g     nextDate.day += 1;
h   Else:
i     nextDate.day = 1;
j     If(currentDate.month < 12):
k       nextDate.month += 1;
l     Else:
m       nextDate.month = 1;
n       nextDate.year += 1;

Transforming that into code:
1) Date currentDate = [21,06,0067] is done like this:

•3zb•     # Push compressed integer 210667
     2ô   # Split it into parts of size 2: [21,06,67]
...
©         #  Store the current date in variable `®` (without popping)

2) Loop input + 700000 amount of times: is done like this:

I         # Push the input-integer
 5°       # Push 10 to the power 5: 100000
   7*     # Multiply that by 7: 700000
     +    # Add it to the input-integer
      F   # Loop that many times:

3a) Integer isLeapYear = ...; is done like this:

`         # Pop and push the day, month, and year separated to the stack
 т‰       # Take the divmod of 100
   0K     # Remove all 0s
     θ    # Pop and leave its last value
      4Ö  # And check if it's divisible by 4 (1 if it's a leap year; 0 if not)
        U # Pop and store this in variable `X`

3b) currentDate.month == 2 ? and 3c) 28 + isLeapYear:

D         # Duplicate the month that is still on the stack
 2Qi      # If it's equal to 2 (thus February):
    \     #  Discard the duplicated month from the stack
     28X+ #  And add 28 and `X` (the isLeapYear check) together

3d) : and 3e) 31 - (currentDate.month - 1) % 7 % 2;:

ë         # Else:
 <        #  Month - 1
  7%      #  Modulo-7
    É     #  Is odd (short for modulo-2)
     31α  #  Absolute difference with 31
}         # Close the if-else statement

3f) If(currentDate.day < daysInCurrentMonth)::

‹         # Check if the day that is still on the stack is smaller than this value
 i        # If it is:

3g) nextDate.day += 1;:

®         #  Push the entire date from variable `®` again
 ć        #  Extract its head (the days); pop and push [month,year] and day separated
  >       #  Day + 1
   š      #  Prepend it back in front of the list

3h) Else: and 3i) nextDate.day = 1;:

ë         # Else:
 ®        #  Push the entire date from variable `®` again
  1       #  Push a 1
   ¾      #  Push index 0
    ǝ     #  Insert the 1 at index 0 (to replace the day) in the list `®`

3j) If(currentDate.month < 12)::

D         # Duplicate it
 Ås       # Pop and push the middle item (the month)
   D12‹   # Check if the month is below 12:
       i  # And if it is:

3k) nextDate.month += 1;:

>         # Month + 1
 1        # Push index 1
  ǝ       # Insert the month + 1 at index 1 (to replace the month) in the list `®`

3l) Else:, 3m) nextDate.month = 1; and 3n) nextDate.year += 1;:

ë         # Else:
 <        #  Decrease the month by 1 to 11
  s       #  Swap so list `®` is at the top of the stack again
   θ      #  Pop and push its last item (the year)
    >     #  Year + 1
     ª    #  Convert the 11 to list [1,1] and append the year + 1

4) And finally we convert the month-integer to month-string in the resulting date, and output the result:

]         # Close both if-else statements and the infinite loop
 ε        # Map the resulting date to:
  Ni      #  If the (0-based) index is 1 (thus the month)
    ”……‚æ‡‰…ä†ï€¿…Ë…ê†Ä…æ…Ì…Í”
          #   Push the dictionary string of months ("December January ... November"
     #    #   Split it on spaces to a list of strings
      s   #   Swap so the month is at the top of the stack
       è  #   And index it into the list (0-based and with wraparound,
          #   which is why "december" is the first item)
          # (after which the resulting date is output implicitly)

See this 05AB1E tip of mine (sections How to use the dictionary? and How to compress large integers?) to understand why •3zb• is 210667 and ”……‚æ‡‰…ä†ï€¿…Ë…ê†Ä…æ…Ì…Í” is "December January February March April May June July August September October November".


Bake me a slice of cake My birthday is in a month, and this is a slice of tasty cake.

    .-""-.
 .-"      "-.
|""--..      "-.
|      ""--..   "-.
|""--..      ""--..\
|      ""--..      |
|            ""--..|
 ""--..            |
       ""--..      |
             ""--..|

In the fewest number of bytes, construct this slice of cake for me. You can print it to STDOUT or return it as a function result.

Any amount of extraneous whitespace is acceptable, so long as the characters line up appropriately.

Rules and I/O

No input
Output can be given by any convenient method.
Either a full program or a function are acceptable.
Standard loopholes are forbidden.
This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.

Eggsembly - 203 bytes

push '    .-""-.\n .-"      "-.\n|""--..      "-.\n|      ""--..   "-.\n|""--..      ""--..|\n|      ""--..      |\n|            ""--..|\n ""--..            |\n       ""--..      |\n             ""--..|'

Here is a less golfed version.

push '    .-""-.\n'
push ' .-"      "-.\n'
add
push '|""--..      "-.\n'
add
push '|      ""--..   "-.\n'
add
push '|""--..      ""--..\\n'
add
push '|      ""--..      |\n'
add
push '|            ""--..|\n'
add
push ' ""--..            |\n'
add
push '       ""--..      |\n'
add
push '             ""--..|\n'
add

This one works a bit differently, but it's significantly shorter in Chicken at 57,878 bytes.

push " "
push 4
rooster
push '.-""-.\n'
add
push ' .-"'
push " "
push 6
rooster
add
push '"-.\n'
add
push '|""--..'
push " "
push 6
rooster
add
push '"-.\n|'
add
push " "
push 6
rooster
add
push '""--..   "-.\n'
add
push '|""--..'
push " "
push 6
rooster
add
push '""--..\\n'
add
push '|'
push " "
push 6
rooster
add
push '""--..      |\n'
add
push '|'
push " "
push 12
rooster
add
push '""--..|\n'
add
push ' ""--..'
push " "
push 12
rooster
add
push '|\n'
add
push " "
push 7
rooster
add
push '""--..'
push " "
push 6
rooster
add
push '|\n'
add
push " "
push 13
rooster
add
push '""--..|\n'
add
add
add
add
add
add
add
add

Chicken - 57,878 28,135 bytes

chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken

chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken chicken chicken chicken chicken chicken chicken chicken
chicken chicken
chicken chicken
chicken chicken

So what was changed here is a little more understandable, here's the Eggsembly version.

push " "
push 4
rooster
push 4
peck
pick 4
axe
push '.-""-.\n'
add
push ' .-"'
pick 4
axe
push " "
push 2
rooster
add
push 6
peck
pick 6
axe
add
push '"-.\n'
add
push '|'
push '""--..'
push 2
peck
pick 2
axe
add
add
pick 6
axe
add
push '"-.\n'
add
push '|'
add
pick 6
axe
add
pick 2
axe
add
push " "
push 3
rooster
add
push '"-.\n'
add
push '|'
add
pick 2
axe
add
pick 6
axe
add
pick 2
axe
add
push '\\n'
add
push '|'
add
pick 6
axe
add
pick 2
axe
add
pick 6
axe
add
push '|\n'
add
push '|'
add
pick 6
axe
pick 6
axe
add
push 3
peck
pick 3
axe
add
pick 2
axe
add
push '|\n'
add
push " "
add
pick 2
axe
add
pick 3
axe
add
push '|\n'
add
pick 6
axe
push " "
add
add
pick 2
axe
add
pick 6
axe
add
push '|\n'
add
pick 3
axe
add
push " "
add
pick 2
axe
add
push '|\n'
add
add


mathpack numeric literals preface

In a very heated situation you have to go even further with golfing.
(e.g. in a challenge where your answer is 100 characters long and it is just embarrassing that you couldn't make it 99)
In that case, from now on you use the winner's algorithm of this challenge :)

goal

You have to write a program that takes an uint32 and returns the most compressed form.

$ mathpack 147456
9<<14

There will be multiple solutions for a number. Pick the shortest one
If the compressed form is longer or equal to the original number, return the original number

rules

write in any language - output in any language
i'm aware of that in C 'abc' is 6382179 and you can achieve pretty good results with this conversion. but languages are separated in this challenge so don't lose heart
it is prohibited to use external variables. only operators and literals and math related functions!

scoring

here are the test cases: pastebin.com/0bYPzUhX
your score (percent) will be the ratio of byte_size_of_your_output / byte_size_of_the_list without line breaks.
(you have to do this by yourself as i'll just verify the best codes just in case)
winners will be chosen by score and language of output!

examples:

$ mathpack 147456 | mathpack 97787584 |  mathpack 387420489
            9<<14 |           9e7^9e6 |            pow(9,9)

Code: Mathematica, Output: Julia, ~98.9457% (20177/20392 bytes)

optimise[n_] :=
  Module[{bits, trimmedBits, shift, unshifted, nString, versions,
    inverted, factorised, digits, trimmedDigits, exponent, base,
    xored, ored, anded},
   nString = ToString@n;
   versions = {nString};

   (* Try bitshifting *)
   bits = IntegerDigits[n, 2];
   trimmedBits = bits /. {x___, 1, 0 ..} :> {x, 1};
   shift = ToString[Length[bits] - Length[trimmedBits]];
   unshifted = ToString@FromDigits[trimmedBits, 2];
   AppendTo[versions, unshifted <> "<<" <> shift];

   (* Try inverting *)
   inverted = ToString@FromDigits[1 - PadLeft[bits, 32], 2];
   AppendTo[versions, "~" <> inverted];

   (* Try invert/shift/invert *)
   trimmedBits = bits /. {x___, 0, 1 ..} :> {x, 1};
   shift = ToString[Length[bits] - Length[trimmedBits]];
   unshifted = ToString@FromDigits[trimmedBits, 2];
   AppendTo[versions, "~(~" <> unshifted <> "<<" <> shift <> ")"];

   (* Try factoring *)
   factorised = Riffle[
      FactorInteger[n]
        /. {a_, 1} :> ToString@a
       /. {a_Integer, b_Integer} :> ToString[a] <> "^" <> ToString[b]
      , "+"] <> "";
   AppendTo[versions, factorised];

   (* Try scientific notation *)
   digits = IntegerDigits[n, 10];
   trimmedDigits = digits /. {x___, d_ /; d > 0, 0 ..} :> {x, d};
   exponent = ToString[Length[digits] - Length[trimmedDigits]];
   base = ToString@FromDigits[trimmedDigits, 10];
   AppendTo[versions, base <> "e" <> exponent];

   (* Don't try hexadecimal notation. It's never shorter for 32-bit uints. *)
   (* Don't try base-36 or base-62, because parsing those requires 12 characters for
      parseint("...") *)

   SortBy[versions, StringLength][[1]]
  ];

mathpack[n_] :=
 Module[{versions, increments},
  increments = Range@9;
  versions = Join[
    optimise[#2] <> "+" <> ToString@# & @@@ ({#, n - #} &) /@
      Reverse@increments,
    {optimise@n},
    optimise[#2] <> "-" <> ToString@# & @@@ ({#, n + #} &) /@
      increments,
    optimise[#2] <> "*" <> ToString@# & @@@
      Cases[({#, n / #} &) /@ increments, {_, _Integer}],
    optimise[#2] <> "/" <> ToString@# & @@@ ({#, n * #} &) /@
      increments
    ];
  SortBy[versions, StringLength][[1]]
 ];

The function takes a number and returns the shortest string it finds. Currently it applies four simple optimisations (I might add more tomorrow).

You can apply it to the entire file (to measure its score) as follows:

input = StringSplit[Import["path/to/benchmark.txt"]];
numbers = ToExpression /@ input;
output = mathpack /@ numbers;
N[StringLength[output <> ""]/StringLength[input <> ""]]

Note that some of these optimisations assume that you're on a 64-bit Julia, such that integer literals give you an int64 by default. Otherwise, you'll be overflowing anyway for integers greater than 231. Using that assumption we can apply a few optimisations whose intermediate steps are actually even larger than 232.

EDIT: I added the optimisation suggested in the OP's examples to bitwise xor two large numbers in scientific notation (actually, for all of xor, or and and). Note that extending the xormap, ormap and andmap to include operands beyond 232 might help finding additional optimisations, but it doesn't work for the given test cases and only increases run time by something like a factor of 10.

EDIT: I shaved off another 16 bytes, by checking all n-9, n-8, ..., n+8, n+9 for whether any of those can be shortened, in which case I represented the number based on that, adding or subtracting the difference. There are a few cases, where one of those 18 numbers can be represented with 3 or more characters less than n itself, in which case I can make some extra savings. It takes about 30 seconds now to run it on all test cases, but of course, if someone actually "used" this function, he'd only run it on a single number, so it's still well under a second.

EDIT: Another incredible 4 bytes by doing the same for multiplication and division. 50 seconds now (the divided ones don't take as long, because I'm only checking these if the number is actually divisible by the factor of interest).

EDIT: Another optimisation that doesn't actually help with the given test set. This one could save a byte for things like 230 or 231. If we had uint64s instead, there'd be a lot of numbers where this could be a huge saving (basically, whenever the bit representation ends in a lot of 1s).

EDIT: Removed the xor, or, and optimisations altogether. I just noticed they don't even work in Julia, because (quite obviously) scientific notation gives you a float where bit-wise operators are not even defined. Interestingly, one or more of the newer optimisations seem to catch all of the cases that were shortened by these optimisations, because the score didn't change at all.


Solve Aristotle's Number Problem Aristotle's number puzzle is the challenge of populating each of 19 cells in a hexagonal grid with a unique integer between 1 and 19 such that the total along every axis is 38.

You can picture the game board looking like this:

And the puzzle, in essence, is the solution to the following set of fifteen equations:

((a + b + c) == 38 && (d + e + f + g) == 38 && (h + i + j + k + l) ==
   38 && (m + n + o + p) == 38 && (q + r + s) == 38 && (a + d + h) ==
   38 && (b + e + i + m) == 38 && (c + f + j + n + q) ==
   38 && (g + k + o + r) == 38 && (l + p + s) == 38 && (c + g + l) ==
   38 && (b + f + k + p) == 38 && (a + e + j + o + s) ==
   38 && (d + i + n + r) == 38 && (h + m + q) == 38)

Where each variable is a unique number in the set {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19}.

There are multiple possible solutions, and are 19! possible combinations of integers, so naive brute force will be impractical.

Rules:

No hardcoding the answer or looking up the answer elsewhere; your code needs to find it on its own
Speed doesn't matter, but you do have to show your results, so code that takes 1000 years to run won't help you
Find all the answers
Treat answers that are identical under rotation as identical
Deduct 5% of your total byte count if you output the results in an attractive honeycomb
Fewest bytes wins

Java (1517 - 75.85) = 1441.15 (1429 - 71.45) = 1357.55 (1325 - 66.25) = 1258.75

This was fun.

Prints all unique solutions w.r.t. mirroring and rotation, in a pleasant honeycomb (hence 5% reduction)

Runtime: ~0.122s (122 milliseconds) on my 4 year old laptop.

Golfed code (edit realized I was stupidly repeating my printfs, reduced them to a single printf for maximum golf) (new edit Reduced calls to Set functions into clever smaller functions, some other micro-optimizations):

import java.util.*;class A{boolean c(Set<Integer>u,int z){return!u.contains(z);}Set<Integer>b(Set<Integer>c,int...v){Set<Integer>q=new HashSet<Integer>(c);for(int x:v)q.add(x);return q;}void w(){Set<Integer>U,t,u,v,w,y,z;int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,X,Z;X=20;Z=38;for(a=1;a<X;a++)for(b=1;b<X;b++)if(b!=a)for(c=1;c<X;c++)if(c!=a&&c!=b&&a+b+c==Z){U=b(new HashSet<Integer>(),a,b,c);for(d=1;d<X;d++)if(c(U,d))for(h=1;h<X;h++)if(h!=d&&c(U,h)&&a+d+h==Z){t=b(U,a,b,c,d,h);for(m=1;m<X;m++)if(c(t,m))for(q=1;q<X;q++)if(q!=m&&c(t,q)&&h+m+q==Z){u=b(t,m,q);for(r=1;r<X;r++)if(c(u,r))for(s=1;s<X;s++)if(s!=r&&c(u,s)&&q+r+s==Z){v=b(u,r,s);for(p=1;p<X;p++)if(c(v,p))for(l=1;l<X;l++)if(l!=p&&c(v,l)&&s+p+l==Z){w=b(v,p,l);for(g=1;g<X;g++)if(c(w,g)&&l+g+c==Z)for(e=1;e<X;e++)if(e!=g&&c(w,e))for(f=1;f<X;f++)if(f!=e&&f!=g&&c(w,f)&&d+e+f+g==Z){y=b(w,g,e,f);for(i=1;i<X;i++)if(c(y,i))for(n=1;n<X;n++)if(n!=i&&c(y,n)&&d+i+n+r==Z&&b+e+i+m==Z){z=b(y,i,n);for(o=1;o<X;o++)if(c(z,o))for(k=1;k<X;k++)if(k!=o&&c(z,k)&&m+n+o+p==Z&&r+o+k+g==Z&&b+f+k+p==Z)for(j=1;j<X;j++)if(c(z,j)&&j!=o&&j!=k&&a+e+j+o+s==Z&&c+f+j+n+q==Z&&h+i+j+k+l==Z){System.out.printf("%6d%4d%4d\n\n%4d%4d%4d%4d\n\n%2d%4d%4d%4d%4d\n\n%4d%4d%4d%4d\n\n%6d%4d%4d\n\n",a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s);return;}}}}}}}}}public static void main(String[]a){(new A()).w();}}

   Brute force is passe, but clever use of the fact that only a very small set of solutions exists led me to an iteration based answer, where within each loop of the iteration I only consider integers that have not been "assigned" yet. I make use of Java's HashSet to gain O(1) lookups for numbers that have been used previously. Finally, there are exactly 12 solutions, but when you discount both rotation and mirroring this reduces to just one unique solution, so when the first solution is encountered, I print it out and terminate. Check out my less-golfed code at github for a bit of a clearer view into how I am approaching this solution.

Enjoy!


Rectangles in rectangles This code-golf challenge will give you two positive integers n and k as inputs and have you count the number of rectangles with integer coordinates that can be drawn with vertices touching all four sides of the \$n \times k\$ rectangle $$
\{(x,y) : 0 \leq x \leq n, 0 \leq y \leq k\}.
$$
That is, there should be:

at least one vertex with an \$x\$-coordinate of \$0\$,
at least one vertex with an \$x\$-coordinate of \$n\$,
at least one vertex with an \$y\$-coordinate of \$0\$, and
at least one vertex with an \$y\$-coordinate of \$k\$.

Example
There are \$a(5,7) = 5\$ rectangles with integer coordinates touching all four sides of a \$5 \times 7\$ rectangle:

Table
The lower triangle of the (symmetric) table of \$a(n,k)\$ for \$n,k \leq 12\$ is
n\k| 1  2  3  4  5   6   7   8   9  10  11  12
---+----------------------------------------------
 1 | 1  .  .  .  .   .   .   .   .   .   .   .
 2 | 1  2  .  .  .   .   .   .   .   .   .   .
 3 | 1  1  5  .  .   .   .   .   .   .   .   .
 4 | 1  1  1  6  .   .   .   .   .   .   .   .
 5 | 1  1  1  3  9   .   .   .   .   .   .   .
 6 | 1  1  1  1  1  10   .   .   .   .   .   .
 7 | 1  1  1  1  5   1  13   .   .   .   .   .
 8 | 1  1  1  1  1   1   5  14   .   .   .   .
 9 | 1  1  1  1  1   5   1   1  17   .   .   .
10 | 1  1  1  1  1   3   1   3   1  18   .   .
11 | 1  1  1  1  1   1   5   1   5   5  21   .
12 | 1  1  1  1  1   1   1   1   5   1   1  22

This is a code-golf challenge, so the shortest code wins.

Python 2, 66 59 bytes

lambda n,k:sum(a%n*(n-a%n)==a/n*(k-a/n)for a in range(n*k))

Try it online!
Each possible rectangle inside the \$n \times k\$-rectangle can be specified by two integers, \$0 \le a \lt n\$ and \$0 \le b \lt k\$:

To verify a rectangle given \$a\$ and \$b\$, it suffices to check if one angle is a right angle. To do this I take the dot product of \$\binom{b}{0}-\binom{0}{a}=\binom{-b}{a}\$ and \$\binom{k-b}{n}-\binom{0}{a}=\binom{k-b}{n-a}\$ to check whether the angle at \$\binom{0}{a}\$ is a right angle:
$$
  \langle \left( \begin{matrix}
-b \\
a \\
\end{matrix}\right), \left(\begin{matrix}
k-b \\
n-a \\
\end{matrix} \right) \rangle = 0 \\\Leftrightarrow a\cdot(n-a)-b\cdot(k-b)=0
\\\Leftrightarrow a\cdot(n-a)=b\cdot(k-b)
$$


Alice and Bob have a fight Alice (A) and Bob (B) decided to have a battle.
Each combatant has 10 health.
They take turns to roll a 6 sided die for damage.
That damage is removed from their opponent's health.
In the end either Alice or Bob, will vanquish their foe.

Show me how the battle went. Outputting these codes for the actions which have taken place.

Attack

B a A
^ Combatant
  ^ Action (attack)
    ^ Target

Roll

B r 4
^ Combatant
  ^ Action (roll)
    ^ Value

Health change

A h 6
^ Combatant
  ^ Attribute (health)
    ^ Value

Win

A w
^ Combatant
  ^ Action (win)

Example output:

A a B
A r 4
B h 6
B a A
B r 6
A h 4
A a B
A r 6
B h 0
A w

Here are the rules:

Write in any language.
A single roll of the die should have an equal chance of resulting in any one of the numbers 1, 2, 3, 4, 5, or 6.
Alice always starts (Bob is chivalrous, in an old-fashioned way).
Output an action for each turn.
You must report the attack, roll, damage and win actions.
Combatants are upper case, actions are lower case.
It must not consistently produce the same result.
There must be at least one whitespace character between an output combatant, action and value.
The win action takes place when the opponent has zero or less health.
All parts of an action must be on the same line.
There should be one action per line.
Fewest bytes wins.

Have at it!

Python 3, 131 bytes

x,y="AB"
from random import*
X=Y=10
p=print
while X>0:p(x,"a",y);d=randint(1,6);p(x,"r",d);Y-=d;p(y,"h",Y);x,y,X,Y=y,x,Y,X
p(y,"w")

Try it online!

-8 bytes thanks to officialaimm
-2 bytes thanks to ChooJeremy


Reverse and subtract Challenge description

Let's take a positive integer n, reverse its digits to get rev(n) and get the absolute value of the difference of these two numbers: |n - rev(n)| (or abs(n - rev(n))).

Example:

n = 5067
rev(n) = 7605
|n - rev(n)| = |5067 - 7605| = |-2538| = 2538

After repeating this operation sufficiently many times, most numbers will become 0 (thus terminating the loop)...

5067 -> 2538 -> 5814 -> 1629 -> 7632 -> 5265 -> 360 -> 297 -> 495 -> 99 -> 0

...though some numbers (like 1584) get stuck in an infinite loop:

1584 -> 3267 -> 4356 -> 2178 -> 6534 -> 2178 -> 6534 -> 2178 -> 6534 -> ...
                        ^ infinite loop starts here

Your job is to determine if a given integer gets stuck in an infinite loop.

Input description

A positive integer.

Output description

A truthy value (True, 1) if the number gets stuck in an infinite loop, a falsy value (False, 0) otherwise.

Notes

Trailing zeroes should be ommited. i.e. rev(5020) = 205.
Remember that this is code-golf, so make your code as short as possible!
Relevant sequence: A072140

Pyth, 5 bytes
4 bytes thanks to FryAmTheEggman
uas_`

Test suite.
The truthy value is one of the numbers in the loop.
The falsey value is 0.
Explanation
uas_`      Input:Q
uas_`GGQ   Implicit filling of variables.

u      Q   Set G as Q: do this repeatedly until result seen before: Set G as
 a             the absolute difference of
     G             G
    `              convert to string
   _               reverse
  s                convert to integer
      G        and G


Cross-matching regular expressions Your task here is to write two regular expressions, each of which matches the other one but does not match itself.

Both regular expressions should have this form:

/pattern/optional-flags

This is also the form in which they should be matched.

The shortest solution wins. The solution length is counted as the sum of characters in both regular expressions including slashes and flags.

Use a regex syntax standard of your choice, or specify a programming language, when it makes a difference.

Have fun!

4+6=score of 10

First regex:

/i$/

Second regex:

/^.i/i

Hooray for flag abuse! :-P

The first one matches anything that ends with i (therefore, any regex with the i flag).

The second one matches anything with a second character of i.

Alternative version: /i$/g and /g$/i.


Help Mr Jones to enjoy his bicycle round-trip Mr Jones wants to do a round-trip on his bicycle. He wants to visit several cities in arbitrary order, but his route must not cross it self, since he hates to be at the same place twice in his holidays. As he really loves cycling, the length of his route is completely irrelevant, but he dislikes to drive around the landscape without a target. The route he likes is from on city in a straight line to another, without any detour.

As Mr Jones is a passionated code golfer, he wants you to find a program, that plans a round trip for him, given a set of cities. The input has the form A (B|C). A is a city's name, B and C are its coordinates. You may assume, that the coordinate are positive and less than 1000. The data sets for the cities are line-separated. Here is an example, of how an example input might look like:

SomeTown (1|10)
ACity (3|4)
Wherever (7|7)
Home (5|1)

Mr Jones isn't pedantic, he just wants to have a useful program. Thus, you may decide by your self how the output is looking like, as long as it mets these criteria:

The output is a map of the cities, with the route drawn between them. If anything is correct, the route shouldn't overlap itself and should end where it started
The coordinates are like in usual programming: (1|1) is in the NW corner. Add kind of a ruler to the maps border, to ease reading it
The cities names have to be written down on the map, but feel free to use abbreviations which is explained somewhere else on the map
The map can be both ASCII-art or an image
Keep the output readable

An output might look like this:

  1234567
 1    D
 2   * *
 3  *  *
 4  B   *
 5  *   *
 6  *   *
 7 *    C
 8*   **
 9*  *
10A**

A: SomeTown
B: ACity
C: Wherever
D: Home

The program with the smallest char count wins. I don't count parameters to the compiler / interpreter, if they are needed for compiling, but please don't abuse this rule. Usual code golf rules apply.

Here is another testcase. You output doesn't have to match mine, nor do you have to choose the same path as me. The output is drawn by hand and shows a possible output. Input:

home (5|7)
supermarket (13|12)
park (15|5)
new plaza (9|16)
friend's house (20|11)
old castle (14|21)
riverside (1|20)
beach (10|1)
cinema (21|18)
forest (23|7)
little island (21|1)
museum of code-golf (6|25)
airport (18|25)
tea-shop (24|14)
restaurant (24|22)
great bridge (3|12)
SO building (25|9)

And this is an example output:

           1111111111222222
  1234567890123456789012345
 1         H*        *K
 2        *  *      *  *
 3        *   *    *   *
 4       *     * **    *
 5      *       C      *
 6     *               *
 7    A                 J
 8   *                   *
 9   *                    Q
10   *                    *
11   *            ***E    *
12  P         B***   *   *
13  *        *       *   *
14  *       *        *   N
15 *       *          *  *
16 *      D           *  *
17 *       *          *  *
18*         *         I  *
19*          *        *  *
20G           *      *   *
21 *           F     *   *
22  *         **    *    O
23   *      **     *   **
24    *   **       *  *
25     L**         M**

A: home
B: supermarket
C: park
D: new plaza
E: friend's house
F: old castle
G: riverside
H: beach
I: cinema
J: forest
K: little island
L: museum of code-golf
M: airport
N: tea-shop
O: restaurant
P: great bridge
Q: SO building

I am not an English native speaker. Feel free to correct my language and grammar, if necessary.

Haskell, 633 characters

import List
c n=n>>=(++" ").show.(*3)
(x&y)l="<text x='"++c[x]++"' y='"++c[y]++"'>"++l++"</text>"
f%p=[a-1,b+2,(a+b)/2]where n=map(f.fst)p;a=minimum n;b=maximum n
s p=concat["<svg xmlns='http://www.w3.org/2000/svg' viewBox='",c[i,m-1,j,n],"'><polygon fill='none' stroke='#c8c' points='",c$snd=<<(sort$map a p),"'/><g font-size='1' fill='#bbb'>",(\x->(x&m$show x)++(i&x$show x))=<<[floor(i`min`m)..ceiling(j`max`n)],"</g><g font-size='2'>",snd=<<p,"</g></svg>"]where a((x,y),_)=(atan2(x-q)(y-r),[x,y]);[i,j,q,m,n,r]=fst%p++snd%p
w(l,s)=((x,y),(x&y)l)where(x,r)=v s;(y,_)=v r
v=head.reads.tail
main=interact$s.map(w.break(=='(')).lines

Rather longish for code-golf, but produces a lovely SVG map:

Or, if your browser can't handle SVG, a PNG of that image:

Edit: (648 -> 633) in-line coordinate drawing, and possibly draw more than needed, letting them be clipped by the viewBox; also a few golf-tricks here and there.


snakes_are_bad, camelsAreBetter Introduction
All these snakes everywhere! I've had enough, and have decided that I much prefer camels. Therefore, I want you to convert my snakes to camels for me.
Challenge
Turn any snake_case string into a camelCase string.
Capitals should be returned to lowercase before the conversion occurs.
Test Cases
In: camel_case
Out: camelCase
In: curse_these_snakes
Out: curseTheseSnakes
In: i_promise_1234_is_not_my_password
Out: iPromise1234IsNotMyPassword
In: AAAAA_BBBBB
Out: aaaaaBbbbb
Rules
As per usual, standard loophole rules apply.
This is code-golf - shortest answer wins.
Leading/trailing underscores (e.g _string_) are ignored.
Current Winners (subject to change)
Esoteric Language
Me, with -1 bytes.
Standard Language
Also me, with -2 bytes.

Python 3, 51 bytes

lambda s:s[0].lower()+s.title().replace('_','')[1:]

Try it online!

-4 bytes thanks to ReinstateMonica