Code Golf: Code Golf: Difference between revisions
Created Nim solution.
(→{{header|Yabasic}}: two spaces saved) |
(Created Nim solution.) |
||
Line 343:
Without string literals (52 characters):
<syntaxhighlight lang="min">(35 79 68 69 0 39 79 76 70) (32+ chr putchr) foreach</syntaxhighlight>
=={{header|Nim}}==
Using a string literal (24 characters):
<syntaxhighlight lang="Nim">stdout.write "Code Golf"
</syntaxhighlight>
Compiling on Linux with Nim 1.6.12 using command <code>nim c -d:danger --opt:size -d:lto --gc:arc code_golf.nim</code>, the executable size is 23584 bytes.
Without string literals (61 characters):
<syntaxhighlight lang="Nim">for n in[67,111,100,101,32,71,111,108,102]:stdout.write n.chr
</syntaxhighlight>
Compiling on Linux with Nim 1.6.12 using command <code>nim c -d:danger --opt:size -d:lto --gc:arc code_golf.nim</code>, the executable size is 22528 bytes.
=={{header|OCaml}}==
|