New answers tagged

2

Day 3, Trigger, score 6 333454353 Try it online! Restrictions used The program's length is no more than its lowest byt.e (Lowest byte is 51.) The bytes of the program, when sorted and duplicates removed, are all consecutive. (3, 4, 5.) The output does not change when /* is added to the beginning. (We only print 3 and flip some triggers, of course this ...


2

Day 3, brainfuck, score 6 ...------ Outputs three null bytes (3 in unary). Try it online! Satisifed restrictions: The program's length is no more than its lowest byte (length is 9, lowest byte is 45) The bytes of the program, when sorted and duplicates removed, are all consecutive (there are only two bytes, . (45) and - (46)). The output does not change ...


3

Day 3, 05AB1E, score 6 3 Try it online! The bytes of the program, when sorted and duplicates removed, are all consecutive (yes, as only 1 byte) Programs must be pristine (yes, as only 1 byte) The program is palindromic line-wise (yes, as only 1 byte) The program's length (1) is no more than its lowest byte (51) The output does not change when /* is added ...


3

Day 2. Befunge-98 (PyFunge), score 5 \x07$'.269:@krsu{ Try it online! This follows the restrictions: Each byte in your answer must be strictly higher than the last (07 24 27 2e 32 36 39 3a 40 6b 72 73 75 7b) The code also performs the task if reversed - Try it online! You must use any of the following bytes at least once in your code: 0x02, 0x03, 0x05, ...


3

Day 2. 99, score 7 Introducing my newest invention - A great rocket, uh, thingy... (Does this even look like a rocket?) =>=>=>=>=>e 98989 98989 98989 98989 9 98989 9 98989 98989()<{>}~[]lO 98989 9 98989 9 98989 98989 98989 98989 =>=>=>=>=>e Try it online! This follows the restrictions: The code should use each of (){}[]...


2

Day 2, Raku (Perl 6), score 6 # {+ords(<^C^E>[*])}#1d1d1d1f2#tnirp.2 Here ^C stands for 0x03 and ^E for 0x05. Satisfied restrictions The code should use each of (){}[]<> at least once The code also performs the task if reversed. You must use any of the following bytes at least once in your code: 0x02, 0x03, 0x05, 0x07 (0x03 and 0x05 are used.) ...


3

APL (Dyalog Unicode), 36 bytes (SBCS) Full program. ↑'Liftoff in T-'∘,∘⍕¨⌽⍳10 'LIFTOFF!' Try it online! ⍳ ɩndices 1 through 10 ⌽ reverse them ¨ on each number, do:  ⍕ format as text  ∘ then:   , prepend   ∘ the entirety of:    'Liftoff in T-' this string ↑ merge list of strings into character matrix (and implicitly output to stdout) 'LIFTOFF!' this string (...


4

Java (JDK), 92 79 78 bytes v->{for(int i=11;i-->0;)System.out.println(i>0?"Liftoff in T-"+i:"LIFTOFF!");} Try it online! Edit: Thanks to @KevinCruijssen for -1 byte


5

Day 2, Lenguage, score 7 Program has a ton of unprintable characters. As a hex dump: 00000000 29 28 7b 68 7d 6a 5b 6c 5d 3c 6d 3e 41 00 01 00 |)({h}j[l]<m>A...| 00000010 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 |................| * 000014f0 01 00 01 00 01 00 01 02 03 02 03 02 03 02 03 02 |................| 00001500 03 02 03 02 03 02 03 ...


2

Day 2. Actually, score 5 ♥►F Try it online! The bytes are [0x03, 0x10, 0x46]. This follows the restrictions: Each byte in your answer must be strictly higher than the last. You must use any of the following bytes at least once in your code: 0x02, 0x03, 0x05, 0x07 (Uses 0x03.) The sum of the byte values in your program should be a Fibonacci number. (Bytes ...


4

Day 2, Free Pascal, score 6 begin write(2) end. !"#$%&'()*+,-./0123456789:;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Some more fuzzy texts. So the bytes sum would be a Fibonacci number... .dne )2(etirw nigeb 00000000: 0a62 6567 696e 2077 7269 7465 2832 2920 .begin write(2) 00000010: 656e 642e 1a0a 0102 0304 0506 0708 090a ...


3

Day 2, Scala 3, score 6 @main def m=print{2}//S[]<>//(2)tnirp=m fed niam@ Try it online! This follows the restrictions: The code uses each of (){}[]<> at least once It uses a byte which is a prime factor of 420 in its source code (0x07) The code also performs the task if reversed The sum of each byte is a number in the Fibonacci sequence (4181)...


6

Day 2. JavaScript (V8), score 6 e=>(2)// //[]{}<// //)2(>=g //VVVVVVVVV// Try it online! This follows the restrictions: The code uses each of (){}[]<> at least once It uses a byte which is a prime factor of 420 in its source code (0x02) The code also performs the task if reversed The sum of each byte is a number in the Fibonacci ...


3

Day 1, Unary, score 3  Code consists of 84 0x10 bytes. Equivalent brainfuck code is +., producing the character with code point 1. This follows the restrictions: You must include the 0x10 byte in your source code You must have an even number of bytes in your source code You ...


2

Day 1. 05AB1E, score 3 X This follows the restrictions: You must include the 0x10 byte [data link escape] in your source code [It is at the end] You must have an even number of bytes in your source code [The number of bytes is 2] You must only use even bytes in your source code [X: 88, DLE: 16] Answers posted tomorrow may use programs that work when //# ...


2

Day 1 Python 3, score 2 print(len(' ')) Try it online! Hexdump: > hexdump -C quickly_group_together_day1.py 00000000 70 72 69 6e 74 28 6c 65 6e 28 27 10 27 29 29 0a |print(len('.')).| 00000010 This follows the restrictions: You must include the 0x10 byte in your source code Note the quoted character in my hexdump is 0x10, couldn't figure out a way ...


2

Day 1. Z80Golf, score 3 00000000: 3e30 3cc4 1076 7676 >0<..vvv Try it online! This follows the restrictions: You must include the 0x10 byte in your source code You must have an even number of bytes in your source code You must only use even bytes in your source code Answers posted tomorrow may use the restriction that the ...


3

Day 1. Ruby, score 3 p 4>>2 "" Try it online! A \u0010 in quotes. Next day: The sum value of each (unsigned) bytes used in your program should be a number in Fibonacci sequence. (0, 1, 2, 3, 5, 8, 13, ...)


4

Day 1. MAWP, score 3 tt: Try it! There's a 0x10 character at the end. This follows the restrictions: You must include the 0x10 byte in your source code (last char) You must have an even number of bytes in your source code (4) You must only use even bytes in your source code (116 116 58 16) Tomorrow's restriction: You must use a byte which is a prime ...


4

Day 1. Jelly, score 3 рPP This follows the restrictions: You must include the 0x10 byte in your source code You must have an even number of bytes in your source code You must only use even bytes in your source code Answers posted tomorrow may use the restriction that the code also performs the task if reversed. Try it online! The four, even, bytes are ...


5

Day 1. Jelly, score 3 0‘ḷ“ Ñ Try it online! The bytes are [48, 252, 218, 254, 32, 16] in Jelly code page. Fulfills these three restrictions: You must include the 0x10 byte in your source code You must have an even number of bytes in your source code You must only use even bytes in your source code Tomorrow's restriction The code should use each of (){}[]&...


5

Day 1. Keg, score 3 24<#„22| „ Try it online! The joys of having a custom code page and a parser that doesn't exactly ignore comments. 2 is less than 4, so it pushes 1 and autoprints it. The mess after the comment is a string, which the parser tries to parse even though it's in a comment. This follows all of the day 1 restrictions Tomorrow's ...


6

Day 1. dotcomma, score 3 ., (There are two 0x10 bytes at the end) Try it online! This follows the restrictions: You must include the 0x10 byte in your source code You must have an even number of bytes in your source code You must only use even bytes in your source code Answers posted tomorrow may use the restriction that each byte must be higher than the ...


1

Python 3, 67 bytes print('\n'.join(''.join('*' for x in range(10))for y in range(10))) Try it online!


1

05AB1E, 7486 bytes •тûιX>Þ*ι+»¹œΛaá3ðwkç.qn₅‰HYNgO m$ǝ‰š¹¦øýŸ‹ÁKÝ9ʒgāBVδ)EΔü§ý7Q@3)Züf†Bª*Ωā8∊á-<ãäε¬JåS©ÌтíH´λÁвáλ%ò¬õ+Pð²ǝÜεHC°₁+íP)΂©≠àlíδĀ²ƶèKä¹vôµǝÏÕĀ₃TùÈ]«-Ô™εˆðʒì—zÆO¼‰ÙÙœ2gǝL§´āǝ¯xïd>Å^ºÁ%Ü|M₆}×i“ε*г:tнθ§òΓθIεïdƶ₂&ñd®ηôΔÀxåZS–€wÇ b»fÒ∞ xFØØÎuŠh₃м£[üï/θú‹*,©ÔÐ`êζlΣº¤¹Áǝ¸нòô^X¬ˆa8ƒ(WÖx°ˆËÛHвù{±š®÷ÈÑþþW‚±²PÚ₄ߊNUNdZÜλ¸ù<ûí≠ø Ÿ½ÊѨYā¦’...


0

Eso2D, 15 bytes + 5 = 20 2v ,>#1~5 @#,5< Eso2D is a language starting with E that has a relatively short name and an instruction set very good for string construction that I found on the esolang wiki. This could probably be improved further, but it's more than enough for a new best E. Explanation: 2v Increment the accumulator by 97 and move ...


0

X is for XJam, 6 + 4 = 10 '[,65> What is XJam, you may ask? It's a language I started creating earlier this year and gave up before doing anything really interesting. It technically does fulfill its design criteria though, which is to be a version of CJam which adapts to the informal specification in the xkcd comic X. It accomplishes this by using a ...


1

05AB1E, 47 45 bytes Thanks to Kevin Cruijssen for -2 bytes! 16ôí16jí15ÝhJš¬ðìsøv"+---"69∍=yS3j€ÀõšĆ'|ý,}, Try it online! Commented: 16ô # split the input into groups of (up to) 16 í16jí # right-pad the groups to 16 with reverse, left-pad, reverse 15Ý # push [0, 1, ..., 15] hJ ...


1

Perl 5 -pl, 127 120 bytes @.=($",0..9,A..F);$\='+---'x@..'+ ';$_=join'',@.,s;.{1,16};$.[$.++].sprintf'%-16s',$&;gre;s;.;| $& ;g;s;.{1,68};$\$&| ;g Try it online! Previous version: @.=($",0..9,A..F);$~='+'.'---+'x@.;$_=join'',@.,s;.{1,16};$.[$.++].sprintf'%-16s',$&;gre;s;.;| $& ;g;s;.{1,68};$~ $&| ;g;$_.=$~ Try it online!


1

Scala 3, 34 bytes @main def m=print("Hello, World!") Thought Dotty deserved its own answer. Try it in Scastie


2

Fugue, 276 bytes 00000000: 4d54 6864 0000 0006 0001 0002 0001 4d54 MThd..........MT 00000010: 726b 0000 001b 0090 4040 0190 3c40 0090 rk......@@..<@.. 00000020: 4640 1b90 4440 0390 4240 0190 4740 00ff F@..D@..B@..G@.. 00000030: 2f4d 5472 6b00 0000 db00 905c 4001 905d /MTrk......\@..] 00000040: 4001 9059 4000 905c 4001 9058 4000 904e @..Y@..\@..X@..N ...


3

Python, 70 60 bytes print("rnbqkbnr","p"*8,*["."*8]*4,"P"*8,"RNBQKBNR",sep='\n') Also if someone could explain to me why this doesn't work, I'd appreciate it! map(print,["rnbqkbnr","p"*8,*["."*8]*4,"P"*8,"RNBQKBNR"])


1

Source Engine Console, 18 bytes echo Hello, World! You can't try it online unless Valve ports Half-Life 2 to WASM or something. This script is pretty basic. It's perfectly valid to echo like this without quotes in the Source Engine. The Source Engine is a game engine developed by Valve Software, and used in all their games after 2004 (until DOTA 2 in 2015). ...


0

Julia, 636 bytes Zlib compression is not part of standard libraries, so I only used Base64 encoding using Base64 red,blue,green=[(x,y,d=base64decode)->d("AAAAavmMukdHTGFYV3bDelDPK1JAYDRr7Zg0dk5O")[3vcat([fill(div(i,16),i%16) for i=d("...


1

05AB1E, 11 bytes …_|_ĆƵм×Tä» Try it online! ä # split... … # three char string... _|_ # literal... Ć # concatenated with its first character... × # repeated... м # numeric literal... Ƶ # converted from base 255 to decimal plus 101... × # times... ä # into... ...


1

Jelly, 13 bytes 70:þ⁵“_|__”ṁY Try it online! The dyad given to þ doesn't matter so long as it outputs a scalar, so I chose : solely for aesthetic purposes. þ Take the rangifying outer product : by integer division 70 of 70 ⁵ and 10, “_|__”ṁ mold "_|__" like it, Y ...


1

Bash, 27 bytes printf %u $[57#OSiLrEickbS] Try it online! Uses pre-calculated base-57 string. Why base-57? Because anything larger would require one of the prohibited digits. printf %u $[-3/3] would also work for 17 bytes, but that’s been done...


1

Attache, 12 bytes {$`e^$`G-!0} Try it online! Uses Attache's inbuilt number compression literals. $`<string> decompresses <string> into a number. In this case, e maps to 4, and G to 32. Another solution would be to replace both with $`q, which maps to 16. We subtract 1, which can be calculated as !0, or \$0!\$. This is a lambda returning the ...


0

Whitespace, 61 bytes [S S S T S N _Push_2][S N S _Duplicate][T S S N _Multiply][S N S _Duplicate][T S S N _Multiply][S N S _Duplicate][T S S N _Multiply][S N S _Duplicate][T S S N _Multiply][S N S _Duplicate][T S S N _Multiply][S N S _Duplicate][T S S N _Multiply][S S S T N _Push_1][T S S T _Subtract][T N S T _Print_as_integer] Letters S (space), ...


0

Julia 1.0, 17 15 bytes print(~UInt(0)) Try it online!


1

05AB1E, 37 bytes т>GN3ÖUi"Fizz"?}N5ÖVi”ÒÖ”?}XY~_iN?}¶? Try it online! т>GN3ÖUi"Fizz"?}N5ÖVi”ÒÖ”?}XY~_iN?}¶? # full program G # for N in [1, 2, ..., т # ..., 99... > # plus 1]... i # ...


0

Japt, 10 bytes GîGpG)+#¡5 Try it GîGpG)+#¡5 G :16 î :Slice the following to that length GpG : 16**16 ) :End slice + :Append #¡5 :1615


1

Japt -R, 27 bytes Finally came up with a shorter way! Lõ@"FiBu"ò úz4 ËpXv°EÑÄìªX Test it Lõ@"FiBu"ò úz4 ËpXv°EÑÄìªX L :100 õ :Range [1,L] @ :Map each X "FiBu" : Literal string ò : ...


0

MUMPS, 11 bytes w 5**.5+1/2 Output: 1.618033988749894849 This highlights a quick about MUMPS: order of operations is evaluated left to right. Something like .5+5**.5/2 would give us (5.5**.5)/2 (1.172603939955857389).


1

Husk, 4 bytes (floating-point; accurate to 15 significant figures) ½→√5 Try it online! This seems (to me) to be surprisingly readable for a golfing language... √5 # square root of 5 → # increment ½ # halve Husk, 9 bytes (calculation as arbitrary precision rational number) !Ẋ/İf!5İ⁰ Try it online! (TIO header converts the rational number [...


2

Python 3, 11 bytes (1+5**.5)/2 = 1.618033988749895


0

Kotlin First I must admit that about half of this is shamelessly stolen from Keith Randel's answer. I literally copied and pasted his code for finding multiplications into mine. It is very well done. I have made 2 modifications to his code. It is very easy to reverse the direction of any of the transitions Keith's code produces. All you have to do is ...


1

Google Sheets, 40 Output per cell: =ArrayFormula(CHAR(SEQUENCE(104,1,260)/4 If newlines are important, 49: =ArrayFormula(JOIN(" ",CHAR(SEQUENCE(104,1,260)/4 No, Sequence does not support floating point steps.


0

!@#$%^&*()_+, 43 bytes >^^!(!_++^!!@[_^+)`!(!_++^!!@{_^+) (!#_^_)# Try it online! Outputs ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz9876543210. Perfect language for the challenge. That long space you see is a tab. >^^!(!_++^!!@[_^+) This starts a loop from "A"-1 (">" + 2) and continues printing while ...


2

Python 3, 2188 bytes _=𝓸𝓻𝓭('/') 𝓹𝓻𝓲𝓷𝓽(𝓬𝓱𝓻(𝓸𝓻𝓭('')-_)+𝓬𝓱𝓻(𝓸𝓻𝓭('‘')-_)+𝓬𝓱𝓻(𝓸𝓻𝓭('’')-_)+𝓬𝓱𝓻(𝓸𝓻𝓭('“')-_)+𝓬𝓱𝓻(𝓸𝓻𝓭('”')-_)+𝓬𝓱𝓻(𝓸𝓻𝓭('•')-_)+𝓬𝓱𝓻(𝓸𝓻𝓭('–')-_)+𝓬𝓱𝓻(𝓸𝓻𝓭('—')-_)+𝓬𝓱𝓻(𝓸𝓻𝓭(':')+_)+𝓬𝓱𝓻(𝓸𝓻𝓭(';')+_)+𝓬𝓱𝓻(𝓸𝓻𝓭('<')+_)+𝓬𝓱𝓻(𝓸𝓻𝓭('=')+_)+𝓬𝓱𝓻(...


Top 50 recent answers are included