Code Golf: Code Golf: Difference between revisions
m
→{{header|Phix}}: use pygments, added program name version
(Add Uxntal) |
m (→{{header|Phix}}: use pygments, added program name version) |
||
Line 499:
=={{header|Phix}}==
<!--
puts(1,"Code Golf")
▲<!--</syntaxhighlight>-->
</syntaxhighlight>
Which is 19 bytes. Note that <code>?"Code Golf"</code>, while only 12 bytes, ''does'' print the quotation marks and therefore does not meet the task specifications.<br>
Without using string literals, at 42 bytes we can have
puts(1,{67,111,100,101,32,71,111,108,102})
Slightly shorter, at 30 bytes, though it could be considered string/char:
puts(1,x"436F646520476F6C66")
The compiled size of the first is 276,992 bytes.
You can actually make a smaller executable as follows:
include puts1h.e
puts1("Code Golf")
Then compile it with p -c -nodiag ''test.exw'' (or whatever) to yield an executable of 36,532 bytes -
no diagnostics, which is itself non-trivial and otherwise pulls in file handling (for the ex.err it writes),
Line 525 ⟶ 526:
Oh, I should also say the compiler/interpreter/linker/debugger is itself (currently) 2,789,376 bytes, plus you'll still need most of builtins/ which is around the 9MB mark.
While not exactly shorter, if you name the source code as Code Golf[.exw] or the executable as Code Golf[.exe], perhaps needing a substitute(s,'_',' '), this approach will also work:
<syntaxhighlight lang="Phix">
puts(1,get_file_base(command_line()[2]))
</syntaxhighlight>
=={{header|Phixmonti}}==
|