Skip to main content
31 votes

Logic Gates Manually

Python 2, 38 bytes lambda s:sum(map(ord,s))*3%61%37%9%7%2 Try it online! A good ol' modulo chain applied to the sum of ASCII values of the input string, making ...
xnor's user avatar
  • 145k
23 votes

26 Singers, 26 Letters

Python 2, 80 71 bytes def f(s):i=sum(map(ord,s))%98%40;return chr(i-i/26*18+i/32*3-i/37*8+65) Try it online! The sums of ordinals modded give numbers between <...
TFeld's user avatar
  • 19.8k
22 votes

26 Singers, 26 Letters

6502 machine code routine (C64), 83 bytes ...
Felix Palmen's user avatar
  • 4,266
16 votes

Output with the same length always

JavaScript (ES8), 33 bytes Expects the input in the range of safe JS integers: \$-2^{53}\le n < 2^{53}\$. Returns a string of 76 characters. ...
Arnauld's user avatar
  • 193k
14 votes

26 Singers, 26 Letters

Python 2, 68 bytes def f(n):i=hash(n)%337%125%45;return chr(65+i-i/25*2-i/29*21+i/35*2) Try it online!
ovs's user avatar
  • 59.5k
12 votes

Compute CRC32 Hash

Intel x86, 34 30 29 27 bytes Takes the address of the zero-terminated string in ESI, and returns the CRC in EBX: ...
Mark Adler's user avatar
11 votes

Output with the same length always

Python 3, 49 39 bytes lambda i:[chr(ord(x)*2)for x in"%9x"%i] Try it online! -10 bytes thanks to negative seven Converts the integer to hexadecimal, and ...
Stephen's user avatar
  • 14k
10 votes

Help me recognise my monster

JavaScript (ES6), 915 ... 902 890 bytes ...
Arnauld's user avatar
  • 193k
10 votes

26 Singers, 26 Letters

Javascript, 138 132 characters As all initials are unique, except for MJ = Michael Jackson / Mick Jagger, I check for Michael Jackson specifically (the only one ...
nl-x's user avatar
  • 326
10 votes

Logic Gates Manually

JavaScript (ES6), 39 bytes s=>341139>>parseInt(btoa(s),34)%86%23&1 Try it online! How? We can't parse spaces with ...
Arnauld's user avatar
  • 193k
9 votes

Implement SHA-256

Python 2, 519 bytes ...
Sp3000's user avatar
  • 61.9k
9 votes

Output with the same length always

05AB1E, 11 5 bytes тjÇ·ç -6 bytes porting @Stephen's approach, so make sure to upvote him! Outputs a list of up to 100 characters, with \$100-(\text{input length})\...
Kevin Cruijssen's user avatar
8 votes
Accepted

Implement SHA-256

J, 458 445 443 438 435 430 421 bytes ...
miles's user avatar
  • 16.9k
8 votes

Help me recognise my monster

Java, 1130 bytes ...
Arnaud's user avatar
  • 8,533
8 votes

Meta radiation hardener

CJam, score ≤ 286,516 + 54 + 36 = 286,606 Encoder {_{1\+_:e>)_0a+@@b0\{{)_256b_,\e`,-}g}*256b+\)e*}{*}?} Try it online! Decoder ...
Martin Ender's user avatar
8 votes

What characters are more common in my MD2 hash?

Mathematica, 43 bytes Tr@Sign[15-2#~Hash~"MD2"~IntegerDigits~16]& Outputs the number of digits in 01234567 minus the ...
Martin Ender's user avatar
8 votes

What characters are more common in my MD2 hash?

JavaScript (ES6), 731 bytes This monster is implementing the MD2 algorithm, so it's embarrassingly long. Based on js-md2 by Chen Yi-Cyuan. ...
Arnauld's user avatar
  • 193k
8 votes

Output with the same length always

brainfuck, 48 29 28 16 13 bytes This program requires cells, where \$ c_n \in \mathbb{N} \$, but if you want consistent results, make sure that \$ c_n < 256 \$ Output will obviously be unique no ...
Kamila Szewczyk's user avatar
7 votes

26 Singers, 26 Letters

Java (OpenJDK 8), 128 126 115 113 bytes Not too shabby for a java submission! Thanks to Kevin for saving me a whole lot of bytes with the lambda expressions! ...
Lucy Stevens's user avatar
  • 1,007
7 votes

Arbitrary Length Hashing

Haskell, 91 90 86 bytes -1 byte thanks to Laikoni -4 bytes thanks to xnor ...
Delfad0r's user avatar
  • 6,266
7 votes

Arbitrary Length Hashing

R, 159 154 bytes ...
Giuseppe's user avatar
  • 28.6k
7 votes

Rotation invariant fingerprinting

Python 2, 48 bytes f=lambda l,z=5:z and max(l,f(zip(*l)[::-1],z-1)) Try it online! Takes the largest of the four rotations in terms of list comparison. Based on ...
xnor's user avatar
  • 145k
6 votes

Meta radiation hardener

bash + GNU utilities, score 294506 283468 Edit 1: Fixes a problem that @Leo noticed -- thank you! Edit 2: Improved the encoding method for the radiation parameter, for a better score. Encoder (97 ...
Mitchell Spector's user avatar
6 votes

Help me recognise my monster

Jelly, 228 bytes in Jelly's encoding ...
6 votes

26 Singers, 26 Letters

Python 3, 132 99 96 bytes lambda m:chr(98+"ԇ̲ЙГ̫ѼӿИԸՋжʾҍϴЬֺΝעЕΞϾҞ֜ӣ֪".find(chr(sum(map(ord,m))))) Try it online! Not golfed brilliantly, but I thought I'd give ...
LyricLy's user avatar
  • 3,673
6 votes

Logic Gates Manually

CJam (13 bytes) q1bH%86825Yb= Assumes that input is without a trailing newline. Online test suite This is just a simple hash which maps the 24 possible inputs ...
Peter Taylor's user avatar
  • 43.1k
5 votes

Geohash Generator

Python 2, 129 bytes import md5 d,q,c=input() h=md5.new(d+'-'+q).hexdigest() print map(lambda p,o:o+'.'+`float.fromhex('.'+p)`[2:8],(h[:16],h[16:]),c) Input is ...
Copper's user avatar
  • 3,930
5 votes

Help me recognise my monster

Mathematica, 1067 bytes (Mac OS Roman character encoding) ...
Greg Martin's user avatar
  • 15.8k

Only top scored, non community-wiki answers of a minimum length are eligible