Discuss Scratch

ev3coolexit987654
Scratcher
1000+ posts

code golf

What you need to do:
Print “Hello World!” to STDOUT without quotes.
-50% bonus if you don't have " or ' in your code
The language has to be turing complete.
Do it in shortest bytes.
(Example reply:
[b][big]Language, N bytes[/big][/b]
[code]code[/code]
Shows as:
Language, N bytes
code
)

Scoreboard
  • CJam, 15 by WooHooBoy
  • PBTL, 9 by me (w/ bonus)
  • JS ES6, 7 with bonus by Zro716.
  • Lua, 33 with bonus by -Io-

Last edited by ev3coolexit987654 (Nov. 6, 2015 20:07:44)

WooHooBoy
Scratcher
1000+ posts

code golf

CJam, 15 bytes
"Hello, World!"
ev3coolexit987654
Scratcher
1000+ posts

code golf

I figured a lot of languages had a 15-byte solution

I know the CJam interpreter (http://cjam.aditsu.net )
ChocolatePi
Scratcher
1000+ posts

code golf

How about something more complicated? :p
It's pretty easy to write a short hello world program!
ev3coolexit987654
Scratcher
1000+ posts

code golf

Well, codegolf.SE has it,
CatsUnited
Scratcher
1000+ posts

code golf

ChocolatePi wrote:

How about something more complicated? :p
It's pretty easy to write a short hello world program!
+1. I'd like to see someone do Hello World in base 36.
gdpr533f604550b2f20900645890
Scratcher
1000+ posts

code golf

At first, I thought we were supposed to write a Hello World program without using quotes (in the code).

ChocolatePi wrote:

How about something more complicated? :p
It's pretty easy to write a short hello world program!
Why don't we do try writing a quote-less program?

*Looks up the for-each loop syntax*
public class X{public static void main(String[]a){char[]b={72,101,108,108,111,32,87,111,114,108,100,33};for(char i:b)System.out.print(i);}}
^^100% quote-free!

May we have a quote-less code competition?

Last edited by gdpr533f604550b2f20900645890 (Nov. 5, 2015 23:33:54)

CatsUnited
Scratcher
1000+ posts

code golf

Chibi-Matoran wrote:

May we have a quote-less code competition?
As in no “” <– ?
gdpr533f604550b2f20900645890
Scratcher
1000+ posts

code golf

CatsUnited wrote:

Chibi-Matoran wrote:

May we have a quote-less code competition?
As in no “” <– ?
I would imagine such a contest as being no single nor double quotes.
ev3coolexit987654
Scratcher
1000+ posts

code golf

Chibi-Matoran wrote:

CatsUnited wrote:

Chibi-Matoran wrote:

May we have a quote-less code competition?
As in no “” <– ?
I would imagine such a contest as being no single nor double quotes.
That's now a bonus.
ev3coolexit987654
Scratcher
1000+ posts

code golf

AND here's an example of the bonus

PBTL, 18 * 50% = 9 bytes
print Hello World!
WooHooBoy
Scratcher
1000+ posts

code golf

HQ9+, 1 byte
H
__init__
Scratcher
1000+ posts

code golf

Python:
Hello World!
Output:
Traceback (most recent call last):
File "<string>", line 1
Hello World!
^
SyntaxError: invalid syntax
It prints “Hello World!” – plus a bunch of other stuff
jTron
Scratcher
100+ posts

code golf

WooHooBoy wrote:

HQ9+, 1 byte
H

ev3coolexit987654 wrote:

The language has to be turing complete.

My submissions, both Turing-complete and incredibly non-cheaty:
CHIQRSX9+, 2 bytes | score: 1
XH
HQ9+B, 1 byte | score: 0.5
H
ev3coolexit987654
Scratcher
1000+ posts

code golf

__init__ wrote:

Python:
Hello World!
Output:
Traceback (most recent call last):
File "<string>", line 1
Hello World!
^
SyntaxError: invalid syntax
It prints “Hello World!” – plus a bunch of other stuff
you need to print to stdout
ChocolatePi
Scratcher
1000+ posts

code golf

ev3coolexit987654 wrote:

__init__ wrote:

Python:
Hello World!
Output:
Traceback (most recent call last):
File "<string>", line 1
Hello World!
^
SyntaxError: invalid syntax
It prints “Hello World!” – plus a bunch of other stuff
you need to print to stdout
um
and it is not printing to stdout how?
Firedrake969
Scratcher
1000+ posts

code golf

^
lol
Zro716
Scratcher
1000+ posts

code golf

Javascript - 14 chars (-50% bonus = 7 chars )
`Hello World!`
tbh I didn't even know this would work

Last edited by Zro716 (Nov. 6, 2015 03:40:53)

-Io-
Scratcher
1000+ posts

code golf

Lua, 66 * 50% = 33 bytes
print(string.char(72,101,108,108,111,44,32,87,111,114,108,100,33))
I'm not good doing short codes, so here it is lol
CatsUnited
Scratcher
1000+ posts

code golf

Zro716 wrote:

Javascript - 14 chars (-50% bonus = 7 chars )
`Hello World!`
tbh I didn't even know this would work
That's pretty cool.

Powered by DjangoBB