Code Golf: Code Golf: Difference between revisions

m
(Add Uxntal)
 
(6 intermediate revisions by 3 users not shown)
Line 225:
49 characters without quoted literals:
<syntaxhighlight lang="qbasic">FOR i in [44,0,11,10,79,40,0,3,9] DO ?CHR(111-i);</syntaxhighlight>
 
=={{header|Binary Lambda Calculus}}==
shortest: 10 bytes
<pre>*Code Golf</pre>
avoiding ASCII: 23 bytes
<pre>46 60 17 ac 23 40 b0 02 cf f7 97 f7 ee 80 bc 90 9b 9a df b8 90 93 99</pre>
 
=={{header|BQN}}==
Line 277 ⟶ 283:
 
=={{header|EasyLang}}==
<syntaxhighlight lang="easylang">
# with string literal (16 characters)
write"Code Golf"
# without quoted literals (5354 characters)
# for i in [44 0 11 10 79 40 0 3 9]write strchar (111-i).
for i in [44 0 11 10 79 40 0 3 9]write strchar (111-i).
</syntaxhighlight>
 
Line 499 ⟶ 505:
 
=={{header|Phix}}==
<!--<syntaxhighlight lang="Phix">(phixonline)-->
<!--</syntaxhighlight>-- lang="Phix">
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"Code Golf"</span><span style="color: #0000FF;">)</span>
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
<!--<syntaxhighlight lang="Phix">(phixonline)-->
puts(1,{67,111,100,101,32,71,111,108,102})
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,{</span><span style="color: #000000;">67</span><span style="color: #0000FF;">,</span><span style="color: #000000;">111</span><span style="color: #0000FF;">,</span><span style="color: #000000;">100</span><span style="color: #0000FF;">,</span><span style="color: #000000;">101</span><span style="color: #0000FF;">,</span><span style="color: #000000;">32</span><span style="color: #0000FF;">,</span><span style="color: #000000;">71</span><span style="color: #0000FF;">,</span><span style="color: #000000;">111</span><span style="color: #0000FF;">,</span><span style="color: #000000;">108</span><span style="color: #0000FF;">,</span><span style="color: #000000;">102</span><span style="color: #0000FF;">})</span>
<!--</syntaxhighlight>-->
Or quite long but deliciously cryptic:
<syntaxhighlight lang="Phix">
puts(1,atom_to_float64(1.276409856e-152)[4..$]&
atom_to_float64(1.458406353e-258)[4..$])
</syntaxhighlight>
Slightly shorter, at 30 bytes, though it could be considered string/char:
<!--<syntaxhighlight lang="Phix">(phixonline)-->
puts(1,x"436F646520476F6C66")
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span>x"<span style="color: #0000FF;">436F646520476F6C66</span>"<span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
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,'_',' ') [or (..,95,32)], this approach will also work:
<syntaxhighlight lang="Phix">
puts(1,get_file_base(command_line()[2]))
</syntaxhighlight>
The compiled size of the first is 276,992 bytes.
You can actually make a smaller executable as follows:
<!--<syntaxhighlight lang="Phix">(phixonline)-->
include puts1h.e
<span style="color: #008080;">include</span> <span style="color: #000000;">puts1h</span><span style="color: #0000FF;">.</span><span style="color: #000000;">e</span>
puts1("Code Golf")
<span style="color: #000000;">puts1</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"Code Golf"</span><span style="color: #0000FF;">)</span>
<!--</syntaxhighlight>-->
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 524 ⟶ 540:
of subscript stuff we don't rightly need... still I suppose 36K ain't really all that bad.
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.
 
 
=={{header|Phixmonti}}==
56

edits