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

0 Members and 1 Guest are viewing this topic.

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
[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 :P )
  • 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 :P
Deadline
September 15, 2014, 1:00 AM EST

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

Python2
RankUserSizeDateCode
1Sorunome329/8/2014 7:05:34 PM
Spoiler For Spoiler:
print ord('$')*ord('$')+ord(')')

Golfscript
RankUserSizeDateCode
1JWinslow2399/9/2014 6:46:01 PM
Spoiler For Spoiler:
!.))...+)

TI-83+ BASIC
RankUserSizeDateCode
1calc84maniac99/8/2014 8:49:45 PM
Spoiler For Spoiler:
int(pi^^2^pi+int(epi
2JWinslow23119/8/2014 7:22:47 PM
Spoiler For Spoiler:
int(10^(pi)-pi-10^(sqrt(e
3123outerme389/9/2014 5:22:07 PM
Spoiler For Spoiler:
A=A->B
Output(B,B,Ans+Ans^^2+B
Output(B,Ans,Ans^^2*Ans+Ans^^2+B

Ruby
RankUserSizeDateCode
1Juju189/8/2014 10:03:56 PM
Spoiler For Spoiler:
p"~~~~~~~~~~M".sum

Perl
RankUserSizeDateCode
1Juju229/10/2014 1:46:43 PM
Spoiler For Spoiler:
print unpack"cc","\r%"
2willrandship399/9/2014 5:15:38 PM
Spoiler For Spoiler:
$_=(hex'fed')-(hex'aaa')-(hex'a');print

C
RankUserSizeDateCode
1alberthrocks339/15/2014 12:00:00 AM
Spoiler For Spoiler:
main(){printf("%i",'!'*'+'-'R');}
2willrandship639/9/2014 5:15:38 PM
Spoiler For Spoiler:
#include<stdio.h>
int main(){printf("%d",('H'-'A')*('~'+'A'));}

C++
RankUserSizeDateCode
1willrandship629/9/2014 5:15:38 PM
Spoiler For Spoiler:
#include<iostream>
int main(){std::cout<<('H'-'A')*('~'+'A');}

PHP
RankUserSizeDateCode
1Juju229/10/2014 12:51:19 PM
Spoiler For Spoiler:
<?=ord("\r").ord("%");
2Sorunome359/10/2014 4:00:54 AM
Spoiler For Spoiler:
<? echo ord('$')*ord('$')+ord(')');

CJam
RankUserSizeDateCode
1JWinslow2349/9/2014 6:46:01 PM
Spoiler For Spoiler:
DHK+
2Adriweb49/11/2014 10:04:21 AM
Spoiler For Spoiler:
DHK+

Lua
RankUserSizeDateCode
1Adriweb359/9/2014 8:26:10 PM
Spoiler For Spoiler:
a=#"-_-"b=#'_'print(b..a..a..a+a+b)

Axe
RankUserSizeDateCode
1Hayleia99/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
RankUserSizeDateCode
1LDStudios349/14/2014 8:04:05 PM
Spoiler For Spoiler:
print(("\r"):byte()..("%"):byte())

Befunge93
RankUserSizeDateCode
1Juju89/13/2014 10:13:41 PM
Spoiler For Spoiler:
"Y' "*+@
2Hooloovoo99/13/2014 6:29:06 PM
Spoiler For Spoiler:
")$$"*+.@

Befunge98
RankUserSizeDateCode
1alberthrocks99/15/2014 12:00:00 AM
Spoiler For Spoiler:
'$:*')+.@

dc
RankUserSizeDateCode
1alberthrocks79/15/2014 12:00:00 AM
Spoiler For Spoiler:
CEC F-p

MATLAB
RankUserSizeDateCode
1alberthrocks119/15/2014 12:00:00 AM
Spoiler For Spoiler:
'$'*'$'+')'

Language Ranking
RankLangUserSizeDate
1CJamJWinslow2349/9/2014 6:46:01 PM
2dcalberthrocks79/15/2014 12:00:00 AM
3Befunge93Juju89/13/2014 10:13:41 PM
4TI-83+ BASICcalc84maniac99/8/2014 8:49:45 PM
5GolfscriptJWinslow2399/9/2014 6:46:01 PM
6AxeHayleia99/11/2014 8:22:12 AM
7Befunge98alberthrocks99/15/2014 12:00:00 AM
8MATLABalberthrocks119/15/2014 12:00:00 AM
9RubyJuju189/8/2014 10:03:56 PM
10PHPJuju229/10/2014 12:51:19 PM
11PerlJuju229/10/2014 1:46:43 PM
12Python2Sorunome329/8/2014 7:05:34 PM
13Calberthrocks339/15/2014 12:00:00 AM
14Nspire LuaLDStudios349/14/2014 8:04:05 PM
15LuaAdriweb359/9/2014 8:26:10 PM
16C++willrandship629/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"?
Click here for the only set of games you'll ever need
= ?

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Code Golf Contest #9
« Reply #1 on: September 08, 2014, 07:39:39 pm »
Python3 16 bytes ^.^

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
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?
THEGAME
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.

Offline 123outerme

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 458
  • Rating: +23/-0
  • Self-unpaid intern
    • View Profile
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 »

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Code Golf Contest #9
« Reply #4 on: September 08, 2014, 08:05:01 pm »
ok, with the new rules, python2 32 bytes

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
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

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
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?
THEGAME
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.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
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-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
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.

click here to know where you got your last +1s

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
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?
THEGAME
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.

Offline Princetonlion.tibd

  • Members
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 790
  • Rating: +3/-4
    • View Profile
Re: Code Golf Contest #9
« Reply #10 on: September 09, 2014, 06:26:28 pm »
68k BASIC :P

37 bytes (about)

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 »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
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.

click here to know where you got your last +1s

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
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! >:D
« Last Edit: September 10, 2014, 05:01:03 am by Sorunome »

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline JWinslow23

  • Coder Of Tomorrow
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 556
  • Rating: +43/-6
  • I make quality calculator games...when I have time
    • View Profile
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. :P
« Last Edit: September 10, 2014, 05:37:07 pm by JWinslow23 »
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
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! >:D
I got 22 bytes, actually. And I beat willrandship in Perl as well (again, 22 bytes) :P

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
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.