Comments on Can you give me half?
Parent
Can you give me half?
Challenge idea taken from: Eliseo D'Annunzio
Task
Provide code that evaluates to 0.5 numerically, i.e. the output must be recognized by your chosen language as a numeric value (Number, float, double, etc), not as a string.
The catch, the characters 0 through to 9 cannot be used.
One example that fits the brief would be the following:
((++[[]][[~~""]]<<++[[]][[~~""]]))**((--[[]][[~~""]]))
which works out to 0.5 in JavaScript.
Scoring
This is a code challenge, where scoring is done in terms of number of unique characters used in the submission. Ties are broken by lowest bytecount.
dc, 3 unique bytes, 138 bytes …
3y ago
[C (gcc)], 8 7 unique c …
2y ago
Ruby, 7 unique, 12 bytes `$ …
3y ago
Embed ESCR, 6 unique character …
3y ago
[Python 3], 5 unique bytes, 28 …
2y ago
Clojure - 15 characters total, …
3y ago
Perl, 3 distinct, 12 bytes …
3y ago
J, 4 3 distinct, 6 bytes `` …
3y ago
[Python 3], 7 distinct charact …
3y ago
Lua 5.4, 3 unique characters …
2y ago
J, 4 unique, 4 char ``` -: …
2y ago
[Julia 1.0], 16 bytes …
3y ago
Ruby, 10 distinct, 35 chars ` …
3y ago
Raku (also Perl polyglot), 5 u …
3y ago
Scala, 15 bytes ```scala '#' …
3y ago
Japt, 1 byte ½ Test …
3y ago
Javascript, 5 Distinct charact …
3y ago
JS, 15 bytes `!![]/(-[]-[]) …
3y ago
[Extended] Dyalog APL, 4 bytes …
1y ago
Golfscript, 8 6 bytes, 5 uniqu …
2y ago
Vyxal, 1 byte ``` . ``` Tr …
2y ago
Fig, 2 unique, 2 total ``` H …
2y ago
MATL, 3 distinct, 3 total ``` …
3y ago
Post
JS, 15 bytes
!![]/(-~[]-~[])
Basically typed random characters into js console and it worked.
2 comment threads