Skip to main content
added 224 characters in body
Source Link
Bubbler
  • 78.4k
  • 5
  • 149
  • 469

C (gcc) -zexecstack -Wl,-eAe$ -nostartfiles on Linux x86-64, 876876 914 bytes, score 798798 293

A[]={1111+1111+1111+111+111-11-11-11-11+1+1+1,1111111111+111111111-11111111+1111111+1111111-111111+1111+1111+111+111+111+111+111$=1111+1111+1111+111+111-11-11-11-11+1+1+1+1+1,111111+11111111+1+1+1;$$=1111111111+111111111-11111111+1111111+1111111-111111+1111+1111+111+111+111+111+111-11-11-11-11+1+1+1+1+1;$$$=111111+111111-11111-1111+111+111+111-11-1-1-1-1-1,111111111+111111111+11111111+11111111+11111111+1111111+1111111+1111111;$$$$=111111111+111111111+11111111+11111111+11111111+1111111+1111111+111111-1111-1111-1111-1111-111-111-111+11+11+11+11+1+1+1+1+1,1111111111+1111111111111+11+11+11+11+1+1+1+1+1;$$$$$=1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-1111111-111111-111111-111111+11111+11111-1111+111+111+11+1,111111111+111111111+111111111+111111111+111111111-11111111-1111111-1111111-1111111-1111111-111111-111111+1111+1111+1111+1111+1111-111-111-111+11+11-1-1,1111111111+11111111111111+111+111+11+1;$$$$$$=111111111+111111111+111111111+111111111+111111111-11111111-1111111-1111111-1111111-1111111-111111-111111+1111+1111+1111+1111+1111-111-111-111+11+11-1-1;$$$$$$$=1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-111111-111111-111111-111111-111111-1111-1111-1111-1111-1111+11+11+11+11+1,111111111+11+11+11+11+1;$$$$$$$$=11111-1111-1111-111-111-111-11+1+1+1};11+1+1+1;

Try it online!Try it online!

Charset: A[]={+,-1}; A[]={+,1+-1};$=;

Same method as the previous answer, with even more hacking to supply a custom entry point named A$ (which has the smallest ASCII value among a-zA-Z_Z_$). Credit to this SO answer for identifying the flags and assembly setup to make this work. Also got a hint from ceilingcat's awesome linker hack to remove []{} from the code.

C (gcc) -zexecstack -Wl,-eA -nostartfiles on Linux x86-64, 876 bytes, score 798

A[]={1111+1111+1111+111+111-11-11-11-11+1+1+1,1111111111+111111111-11111111+1111111+1111111-111111+1111+1111+111+111+111+111+111-11-11-11-11+1+1+1+1+1,111111+111111-11111-1111+111+111+111-11-1-1-1-1-1,111111111+111111111+11111111+11111111+11111111+1111111+1111111+111111-1111-1111-1111-1111-111-111-111+11+11+11+11+1+1+1+1+1,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-1111111-111111-111111-111111+11111+11111-1111+111+111+11+1,111111111+111111111+111111111+111111111+111111111-11111111-1111111-1111111-1111111-1111111-111111-111111+1111+1111+1111+1111+1111-111-111-111+11+11-1-1,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-111111-111111-111111-111111-111111-1111-1111-1111-1111-1111+11+11+11+11+1,11111-1111-1111-111-111-111-11+1+1+1};

Try it online!

Charset: A[]={+,-1};

Same method as the previous answer, with even more hacking to supply a custom entry point named A (which has the smallest ASCII value among a-zA-Z_). Credit to this SO answer for identifying the flags and assembly setup to make this work.

C (gcc) -zexecstack -Wl,-e$ -nostartfiles on Linux x86-64, 876 914 bytes, score 798 293

$=1111+1111+1111+111+111-11-11-11-11+1+1+1;$$=1111111111+111111111-11111111+1111111+1111111-111111+1111+1111+111+111+111+111+111-11-11-11-11+1+1+1+1+1;$$$=111111+111111-11111-1111+111+111+111-11-1-1-1-1-1;$$$$=111111111+111111111+11111111+11111111+11111111+1111111+1111111+111111-1111-1111-1111-1111-111-111-111+11+11+11+11+1+1+1+1+1;$$$$$=1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-1111111-111111-111111-111111+11111+11111-1111+111+111+11+1;$$$$$$=111111111+111111111+111111111+111111111+111111111-11111111-1111111-1111111-1111111-1111111-111111-111111+1111+1111+1111+1111+1111-111-111-111+11+11-1-1;$$$$$$$=1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-111111-111111-111111-111111-111111-1111-1111-1111-1111-1111+11+11+11+11+1;$$$$$$$$=11111-1111-1111-111-111-111-11+1+1+1;

Try it online!

Charset: A[]={+,-1}; 1+-$=;

Same method as the previous answer, with even more hacking to supply a custom entry point named $ (which has the smallest ASCII value among a-zA-Z_$). Credit to this SO answer for identifying the flags and assembly setup to make this work. Also got a hint from ceilingcat's awesome linker hack to remove []{} from the code.

added 64 characters in body
Source Link
Bubbler
  • 78.4k
  • 5
  • 149
  • 469

Same method as the previous answer, with even more hacking to supply a custom entry point named A (which has the smallest ASCII value among a-zA-Z_). Credit to this SO answer for identifying the flags and assembly setup to make this work.

Same method as the previous answer, with even more hacking to supply a custom entry point named A (which has the smallest ASCII value among a-zA-Z_. Credit to this SO answer.

Same method as the previous answer, with even more hacking to supply a custom entry point named A (which has the smallest ASCII value among a-zA-Z_). Credit to this SO answer for identifying the flags and assembly setup to make this work.

added 26 characters in body
Source Link
Bubbler
  • 78.4k
  • 5
  • 149
  • 469

C (gcc) -zexecstack -Wl,-eA -nostartfiles on Linux x86-64, 876 bytes, score 798

A[]={1111+1111+1111+111+111-11-11-11-11+1+1+1,1111111111+111111111-11111111+1111111+1111111-111111+1111+1111+111+111+111+111+111-11-11-11-11+1+1+1+1+1,111111+111111-11111-1111+111+111+111-11-1-1-1-1-1,111111111+111111111+11111111+11111111+11111111+1111111+1111111+111111-1111-1111-1111-1111-111-111-111+11+11+11+11+1+1+1+1+1,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-1111111-111111-111111-111111+11111+11111-1111+111+111+11+1,111111111+111111111+111111111+111111111+111111111-11111111-1111111-1111111-1111111-1111111-111111-111111+1111+1111+1111+1111+1111-111-111-111+11+11-1-1,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-111111-111111-111111-111111-111111-1111-1111-1111-1111-1111+11+11+11+11+1,11111-1111-1111-111-111-111-11+1+1+1};

Try it online!

Charset: A[]={+,-1};

Same method as the previous answer, with even more hacking to supply a custom entry point named A (which has the smallest ASCII value among a-zA-Z_. Credit to this SO answer.

Assembly: (NASM syntax)

bits 64
global _start
_start:
  mov edx, 13
  pop rax
  push rax
  lea rsi, [rel s]
  pop rdi
  syscall
s: db "Hello, World!"

Uses the argc=1 set up on the stack to load the value 1 to rax and rdi. The instructions are slightly mixed up in order to get the minimal code length in C.

Here is the Python script that generates the "ones decomposition" from the xxd -i output (C include-style hex output) of the compiled binary.


C (gcc) -zexecstack on Linux x86-64, 891 bytes, score 1154

main[]={1111+1111+1111+111+111-11-11-11-11+1+1+1,1111111111-111111111-111111111+11111111-1111111-111111-111111-111111-111111+11111-1111-1111-1111-1111+111+111+111+11,1+1+1+1,111111111-11111111-11111111-1111111-1111111-1111111-1111111+111111+111111+111111+111111+11111+11111+11111+11111-111-111-111-111-111-11-11-11,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-1111111+111111+11111+11111+11111+11111-1111-111-111+11+11+11,1111111111+111111111+111111111+111111111+11111111+11111111-1111111-1111111-1111111-1111111-111111-111111-111111-111111-11111-11111-11111-11111-11111+1111+1111+1111+1111-111-111-111-11-1-1-1-1,1111111111+111111111+111111111+111111111+111111111+111111111+11111111+11111111-1111111-1111111-1111111-1111111+111111+111111+111111+11111+11111+11111+11111+11111-1111-1111-1111-1111-111+11-1-1-1-1-1,11+11+11};

Try it online!

Uses ceilingcat's minimal Turing-complete charset main[]={1+,};, plus - to meet the code length limit.

Assembly: (NASM syntax)

bits 64
global _start
_start:
  mov edx, 13
  lea rsi, [rel s]
  mov eax, edi
  syscall
s: db "Hello, World!"

Essentially calls write syscall once, and goes into arbitrary instructions formed by the string literal, causing segfault.

C (gcc) -zexecstack -Wl,-eA -nostartfiles on Linux x86-64, 876 bytes, score 798

A[]={1111+1111+1111+111+111-11-11-11-11+1+1+1,1111111111+111111111-11111111+1111111+1111111-111111+1111+1111+111+111+111+111+111-11-11-11-11+1+1+1+1+1,111111+111111-11111-1111+111+111+111-11-1-1-1-1-1,111111111+111111111+11111111+11111111+11111111+1111111+1111111+111111-1111-1111-1111-1111-111-111-111+11+11+11+11+1+1+1+1+1,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-1111111-111111-111111-111111+11111+11111-1111+111+111+11+1,111111111+111111111+111111111+111111111+111111111-11111111-1111111-1111111-1111111-1111111-111111-111111+1111+1111+1111+1111+1111-111-111-111+11+11-1-1,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-111111-111111-111111-111111-111111-1111-1111-1111-1111-1111+11+11+11+11+1,11111-1111-1111-111-111-111-11+1+1+1};

Try it online!

Same method as the previous answer, with even more hacking to supply a custom entry point named A (which has the smallest ASCII value among a-zA-Z_. Credit to this SO answer.

Assembly: (NASM syntax)

bits 64
global _start
_start:
  mov edx, 13
  pop rax
  push rax
  lea rsi, [rel s]
  pop rdi
  syscall
s: db "Hello, World!"

Uses the argc=1 set up on the stack to load the value 1 to rax and rdi. The instructions are slightly mixed up in order to get the minimal code length in C.

Here is the Python script that generates the "ones decomposition" from the xxd -i output (C include-style hex output) of the compiled binary.


C (gcc) -zexecstack on Linux x86-64, 891 bytes, score 1154

main[]={1111+1111+1111+111+111-11-11-11-11+1+1+1,1111111111-111111111-111111111+11111111-1111111-111111-111111-111111-111111+11111-1111-1111-1111-1111+111+111+111+11,1+1+1+1,111111111-11111111-11111111-1111111-1111111-1111111-1111111+111111+111111+111111+111111+11111+11111+11111+11111-111-111-111-111-111-11-11-11,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-1111111+111111+11111+11111+11111+11111-1111-111-111+11+11+11,1111111111+111111111+111111111+111111111+11111111+11111111-1111111-1111111-1111111-1111111-111111-111111-111111-111111-11111-11111-11111-11111-11111+1111+1111+1111+1111-111-111-111-11-1-1-1-1,1111111111+111111111+111111111+111111111+111111111+111111111+11111111+11111111-1111111-1111111-1111111-1111111+111111+111111+111111+11111+11111+11111+11111+11111-1111-1111-1111-1111-111+11-1-1-1-1-1,11+11+11};

Try it online!

Uses ceilingcat's minimal Turing-complete charset main[]={1+,};, plus - to meet the code length limit.

Assembly: (NASM syntax)

bits 64
global _start
_start:
  mov edx, 13
  lea rsi, [rel s]
  mov eax, edi
  syscall
s: db "Hello, World!"

Essentially calls write syscall once, and goes into arbitrary instructions formed by the string literal, causing segfault.

C (gcc) -zexecstack -Wl,-eA -nostartfiles on Linux x86-64, 876 bytes, score 798

A[]={1111+1111+1111+111+111-11-11-11-11+1+1+1,1111111111+111111111-11111111+1111111+1111111-111111+1111+1111+111+111+111+111+111-11-11-11-11+1+1+1+1+1,111111+111111-11111-1111+111+111+111-11-1-1-1-1-1,111111111+111111111+11111111+11111111+11111111+1111111+1111111+111111-1111-1111-1111-1111-111-111-111+11+11+11+11+1+1+1+1+1,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-1111111-111111-111111-111111+11111+11111-1111+111+111+11+1,111111111+111111111+111111111+111111111+111111111-11111111-1111111-1111111-1111111-1111111-111111-111111+1111+1111+1111+1111+1111-111-111-111+11+11-1-1,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-111111-111111-111111-111111-111111-1111-1111-1111-1111-1111+11+11+11+11+1,11111-1111-1111-111-111-111-11+1+1+1};

Try it online!

Charset: A[]={+,-1};

Same method as the previous answer, with even more hacking to supply a custom entry point named A (which has the smallest ASCII value among a-zA-Z_. Credit to this SO answer.

Assembly: (NASM syntax)

bits 64
global _start
_start:
  mov edx, 13
  pop rax
  push rax
  lea rsi, [rel s]
  pop rdi
  syscall
s: db "Hello, World!"

Uses the argc=1 set up on the stack to load the value 1 to rax and rdi. The instructions are slightly mixed up in order to get the minimal code length in C.

Here is the Python script that generates the "ones decomposition" from the xxd -i output (C include-style hex output) of the compiled binary.


C (gcc) -zexecstack on Linux x86-64, 891 bytes, score 1154

main[]={1111+1111+1111+111+111-11-11-11-11+1+1+1,1111111111-111111111-111111111+11111111-1111111-111111-111111-111111-111111+11111-1111-1111-1111-1111+111+111+111+11,1+1+1+1,111111111-11111111-11111111-1111111-1111111-1111111-1111111+111111+111111+111111+111111+11111+11111+11111+11111-111-111-111-111-111-11-11-11,1111111111+1111111111-111111111-111111111-111111111-111111111+11111111+11111111+11111111+11111111-1111111-1111111-1111111+111111+11111+11111+11111+11111-1111-111-111+11+11+11,1111111111+111111111+111111111+111111111+11111111+11111111-1111111-1111111-1111111-1111111-111111-111111-111111-111111-11111-11111-11111-11111-11111+1111+1111+1111+1111-111-111-111-11-1-1-1-1,1111111111+111111111+111111111+111111111+111111111+111111111+11111111+11111111-1111111-1111111-1111111-1111111+111111+111111+111111+11111+11111+11111+11111+11111-1111-1111-1111-1111-111+11-1-1-1-1-1,11+11+11};

Try it online!

Uses ceilingcat's minimal Turing-complete charset main[]={1+,};, plus - to meet the code length limit.

Assembly: (NASM syntax)

bits 64
global _start
_start:
  mov edx, 13
  lea rsi, [rel s]
  mov eax, edi
  syscall
s: db "Hello, World!"

Essentially calls write syscall once, and goes into arbitrary instructions formed by the string literal, causing segfault.

added 2660 characters in body
Source Link
Bubbler
  • 78.4k
  • 5
  • 149
  • 469
Loading
added 30 characters in body
Source Link
Bubbler
  • 78.4k
  • 5
  • 149
  • 469
Loading
Source Link
Bubbler
  • 78.4k
  • 5
  • 149
  • 469
Loading