### Author Topic: [ENDED] Code Golf Contest #9  (Read 37010 times)

0 Members and 1 Guest are viewing this topic.

#### JWinslow23

• Coder Of Tomorrow
• LV7 Elite (Next: 700)
• Posts: 556
• Rating: +43/-6
• I make quality calculator games...when I have time
##### [ENDED] Code Golf Contest #9
« on: September 08, 2014, 07:38:31 pm »
In a world without numbers...

NEXT: Here
PREVIOUS: Here

Challenge 9

Problem

Create a program that prints the number 1337...but here's the catch:
• The program must not have any numerical characters (and the language must, Adriweb )
• The program must not rely on any external variables
• The program must only use the printable ASCII characters (" " to "~")
• The program must not exit on an error message, Jens_K
September 15, 2014, 1:00 AM EST

If any further clarification is needed, contact me. Let the games BigInt()!

Python2
 Rank User Size Date Code 1 Sorunome 32 9/8/2014 7:05:34 PM Spoiler For Spoiler: print ord('$')*ord('$')+ord(')')

Golfscript
 Rank User Size Date Code 1 JWinslow23 9 9/9/2014 6:46:01 PM Spoiler For Spoiler: !.))...+)

TI-83+ BASIC
 Rank User Size Date Code 1 calc84maniac 9 9/8/2014 8:49:45 PM Spoiler For Spoiler: int(pi^^2^pi+int(epi 2 JWinslow23 11 9/8/2014 7:22:47 PM Spoiler For Spoiler: int(10^(pi)-pi-10^(sqrt(e 3 123outerme 38 9/9/2014 5:22:07 PM Spoiler For Spoiler: A=A->BOutput(B,B,Ans+Ans^^2+BOutput(B,Ans,Ans^^2*Ans+Ans^^2+B

Ruby
 Rank User Size Date Code 1 Juju 18 9/8/2014 10:03:56 PM Spoiler For Spoiler: p"~~~~~~~~~~M".sum

Perl
 Rank User Size Date Code 1 Juju 22 9/10/2014 1:46:43 PM Spoiler For Spoiler: print unpack"cc","\r%" 2 willrandship 39 9/9/2014 5:15:38 PM Spoiler For Spoiler: $_=(hex'fed')-(hex'aaa')-(hex'a');print C  Rank User Size Date Code 1 alberthrocks 33 9/15/2014 12:00:00 AM Spoiler For Spoiler: main(){printf("%i",'!'*'+'-'R');} 2 willrandship 63 9/9/2014 5:15:38 PM Spoiler For Spoiler: #includeint main(){printf("%d",('H'-'A')*('~'+'A'));} C++  Rank User Size Date Code 1 willrandship 62 9/9/2014 5:15:38 PM Spoiler For Spoiler: #includeint main(){std::cout<<('H'-'A')*('~'+'A');} PHP  Rank User Size Date Code 1 Juju 22 9/10/2014 12:51:19 PM Spoiler For Spoiler: CJam  Rank User Size Date Code 1 JWinslow23 4 9/9/2014 6:46:01 PM Spoiler For Spoiler: DHK+ 2 Adriweb 4 9/11/2014 10:04:21 AM Spoiler For Spoiler: DHK+ Lua  Rank User Size Date Code 1 Adriweb 35 9/9/2014 8:26:10 PM Spoiler For Spoiler: a=#"-_-"b=#'_'print(b..a..a..a+a+b) Axe  Rank User Size Date Code 1 Hayleia 9 9/11/2014 8:22:12 AM Spoiler For Spoiler: Disp 'F'+'F'+'F'+'F'+'F'+'F'+'F'+'F'+'F'+'F'+'F'+'F'+'F'+'F'+'F'+'F'+'A'+'A'+'W'>Dec Nspire Lua  Rank User Size Date Code 1 LDStudios 34 9/14/2014 8:04:05 PM Spoiler For Spoiler: print(("\r"):byte()..("%"):byte()) Befunge93  Rank User Size Date Code 1 Juju 8 9/13/2014 10:13:41 PM Spoiler For Spoiler: "Y' "*+@ 2 Hooloovoo 9 9/13/2014 6:29:06 PM Spoiler For Spoiler: ")$$"*+.@ Befunge98  Rank User Size Date Code 1 alberthrocks 9 9/15/2014 12:00:00 AM Spoiler For Spoiler: '$:*')+.@

dc
 Rank User Size Date Code 1 alberthrocks 7 9/15/2014 12:00:00 AM Spoiler For Spoiler: CEC F-p

MATLAB
 Rank User Size Date Code 1 alberthrocks 11 9/15/2014 12:00:00 AM Spoiler For Spoiler: '$'*'$'+')'

Language Ranking
 Rank Lang User Size Date 1 CJam JWinslow23 4 9/9/2014 6:46:01 PM 2 dc alberthrocks 7 9/15/2014 12:00:00 AM 3 Befunge93 Juju 8 9/13/2014 10:13:41 PM 4 TI-83+ BASIC calc84maniac 9 9/8/2014 8:49:45 PM 5 Golfscript JWinslow23 9 9/9/2014 6:46:01 PM 6 Axe Hayleia 9 9/11/2014 8:22:12 AM 7 Befunge98 alberthrocks 9 9/15/2014 12:00:00 AM 8 MATLAB alberthrocks 11 9/15/2014 12:00:00 AM 9 Ruby Juju 18 9/8/2014 10:03:56 PM 10 PHP Juju 22 9/10/2014 12:51:19 PM 11 Perl Juju 22 9/10/2014 1:46:43 PM 12 Python2 Sorunome 32 9/8/2014 7:05:34 PM 13 C alberthrocks 33 9/15/2014 12:00:00 AM 14 Nspire Lua LDStudios 34 9/14/2014 8:04:05 PM 15 Lua Adriweb 35 9/9/2014 8:26:10 PM 16 C++ willrandship 62 9/9/2014 5:15:38 PM
« Last Edit: June 11, 2015, 08:54:39 am by pimathbrainiac »
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
= ?

#### Sorunome

• Fox Fox Fox Fox Fox Fox Fox!
• Support Staff
• LV13 Extreme Addict (Next: 9001)
• Posts: 7920
• Rating: +374/-13
• Derpy Hooves
##### Re: Code Golf Contest #9
« Reply #1 on: September 08, 2014, 07:39:39 pm »
Python3 16 bytes ^.^
 THE GAMEAlso, check out my websiteIf OmnomIRC is screwed up, blame me!Click here to give me an internet!

#### Juju

• Incredibly sexy mare
• Coder Of Tomorrow
• LV13 Extreme Addict (Next: 9001)
• Posts: 5730
• Rating: +500/-19
• Weird programmer
##### Re: Code Golf Contest #9
« Reply #2 on: September 08, 2014, 07:46:16 pm »
8 characters here. Or 9 bytes. Dunno how you count bytes.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?

This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

#### 123outerme

• LV6 Super Member (Next: 500)
• Posts: 458
• Rating: +23/-0
• Self-unpaid intern
##### Re: Code Golf Contest #9
« Reply #3 on: September 08, 2014, 07:46:29 pm »
TI-BASIC, 38 bytes.
(JWins: I have school tomorrow, so I'll PM you after school. If I forget, please remind me )
« Last Edit: September 08, 2014, 11:05:49 pm by 123outerme »
 Projects:Sorcery of UvutuGateway to LegendSpoiler For Completed: Calc Sites Links:Cemetechticalc.orgGitHub Images:Spoiler For Because of Size:

#### Sorunome

• Fox Fox Fox Fox Fox Fox Fox!
• Support Staff
• LV13 Extreme Addict (Next: 9001)
• Posts: 7920
• Rating: +374/-13
• Derpy Hooves
##### Re: Code Golf Contest #9
« Reply #4 on: September 08, 2014, 08:05:01 pm »
ok, with the new rules, python2 32 bytes
 THE GAMEAlso, check out my websiteIf OmnomIRC is screwed up, blame me!Click here to give me an internet!

#### calc84maniac

• eZ80 Guru
• Coder Of Tomorrow
• LV11 Super Veteran (Next: 3000)
• Posts: 2912
• Rating: +471/-17
##### Re: Code Golf Contest #9
« Reply #5 on: September 08, 2014, 10:07:23 pm »
Got 9 bytes in TI-BASIC!

Also, I have an interesting idea for how to handle a z80 ASM version of this. Print 1337, but without using any immediate values, or reading data from the program in general. Only opcode fetches are allowed. (Exception is BCALL for printing.) Also, I'm unsure whether JR/JP/CALL should be allowed, since they technically have immediate values. If they're not allowed, that pretty much just means loops are out.

Edit: Another concern, I suppose, might be whether BIT/RES/SET can be used, since those have bit values from 0-7. I personally think those should be allowed, because they're technically part of the opcode itself.

Edit2: Now I don't care either way, because I have a nice solution that doesn't use BIT/RES/SET. Throw them out for all I care.
« Last Edit: September 08, 2014, 11:04:55 pm by calc84maniac »
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

#### Juju

• Incredibly sexy mare
• Coder Of Tomorrow
• LV13 Extreme Addict (Next: 9001)
• Posts: 5730
• Rating: +500/-19
• Weird programmer
##### Re: Code Golf Contest #9
« Reply #6 on: September 08, 2014, 11:02:10 pm »
Got 18 bytes in Ruby.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?

This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

• Editor
• LV10 31337 u53r (Next: 2000)
• Posts: 1708
• Rating: +229/-17
##### Re: Code Golf Contest #9
« Reply #7 on: September 09, 2014, 02:01:47 am »
Got a 32 bytes one in Lua.
I didnt put much time into it though.
My calculator programs
TI-Nspire Lua programming : Tutorials  |  API Documentation

#### Hayleia

• Programming Absol
• Coder Of Tomorrow
• LV12 Extreme Poster (Next: 5000)
• Posts: 3367
• Rating: +393/-7
##### Re: Code Golf Contest #9
« Reply #8 on: September 09, 2014, 02:10:02 am »
• The program must only use the printable ASCII characters (" " to "~")
What does this mean for a Basic/Axe program ? I mean "DispGraph" is one token but not a printable ASCII character and not composed of printable ASCII characters so is it allowed ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

#### Juju

• Incredibly sexy mare
• Coder Of Tomorrow
• LV13 Extreme Addict (Next: 9001)
• Posts: 5730
• Rating: +500/-19
• Weird programmer
##### Re: Code Golf Contest #9
« Reply #9 on: September 09, 2014, 07:58:37 am »
I guess it means nothing outside of UTF-8 systems, so everything would be allowed on calcs, I guess. It's so you couldn't do something like ord('ΤΉ') on PCs.

EDIT: 26 bytes of PHP!
« Last Edit: September 09, 2014, 09:51:15 am by Juju »

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?

This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

#### Princetonlion.tibd

• Members
• Posts: 790
• Rating: +3/-4
##### Re: Code Golf Contest #9
« Reply #10 on: September 09, 2014, 06:26:28 pm »
68k BASIC

69 bytes, 70 including the title

EDIT: Did I do something wrong, because I'm not listed?
« Last Edit: September 09, 2014, 09:35:39 pm by Princetonlion.tibd »

#### Hayleia

• Programming Absol
• Coder Of Tomorrow
• LV12 Extreme Poster (Next: 5000)
• Posts: 3367
• Rating: +393/-7
##### Re: Code Golf Contest #9
« Reply #11 on: September 10, 2014, 01:00:56 am »
EDIT: Did I do something wrong, because I'm not listed?
I guess it's just that JWinslow was not here when you posted your score and will update his post when he's here

Btw, for Axe entries, do we count the size of the source or the size of the compiled program ? I think I already asked but couldn't find the post where I did
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

#### Sorunome

• Fox Fox Fox Fox Fox Fox Fox!
• Support Staff
• LV13 Extreme Addict (Next: 9001)
• Posts: 7920
• Rating: +374/-13
• Derpy Hooves
##### Re: Code Golf Contest #9
« Reply #12 on: September 10, 2014, 04:54:28 am »
Brainfuck 31 bytes ^.^

EDIT: PHP 35 bytes, 13 less than juju!
« Last Edit: September 10, 2014, 05:01:03 am by Sorunome »
 THE GAMEAlso, check out my websiteIf OmnomIRC is screwed up, blame me!Click here to give me an internet!

#### JWinslow23

• Coder Of Tomorrow
• LV7 Elite (Next: 700)
• Posts: 556
• Rating: +43/-6
• I make quality calculator games...when I have time
##### Re: Code Golf Contest #9
« Reply #13 on: September 10, 2014, 05:34:27 pm »
EDIT: Did I do something wrong, because I'm not listed?
I guess it's just that JWinslow was not here when you posted your score and will update his post when he's here

Btw, for Axe entries, do we count the size of the source or the size of the compiled program ? I think I already asked but couldn't find the post where I did
Compiled program (sizing just like TI-BASIC).

Also, people with BF and Whitespace solutions, the programming language MUST USE NUMBERS. Otherwise, there's nothing special about it.
« Last Edit: September 10, 2014, 05:37:07 pm by JWinslow23 »
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
= ?

#### Juju

• Incredibly sexy mare
• Coder Of Tomorrow
• LV13 Extreme Addict (Next: 9001)
• Posts: 5730
• Rating: +500/-19
• Weird programmer
##### Re: Code Golf Contest #9
« Reply #14 on: September 10, 2014, 06:09:28 pm »
Brainfuck 31 bytes ^.^

EDIT: PHP 35 bytes, 13 less than juju!
I got 22 bytes, actually. And I beat willrandship in Perl as well (again, 22 bytes)

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?

This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.