Author Topic: [ENDED] Code Golf Contest #1 (thanks for the many submissions!)  (Read 36294 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
Re: Code Golf Contest #1
« Reply #15 on: July 15, 2014, 05:13:15 pm »
It's easier for me to count it as two, as that's how my OS counts it. If anyone knows a way for a Windows 7 user to use the other option, be my guest.
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 #1
« Reply #16 on: July 15, 2014, 05:14:47 pm »
Notepad++ supports UNIX line endings (Edit > Convert newlines > Convert to UNIX format (LF)).

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 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 #1
« Reply #17 on: July 15, 2014, 05:22:14 pm »
Thanks for the information. I'll switch.

EDIT: All code now counts newlines as one byte. Scores updated accordingly.
« Last Edit: July 15, 2014, 05:37:29 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 TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Code Golf Contest #1
« Reply #18 on: July 15, 2014, 06:21:45 pm »
My first attempt at a TI-BASIC solution is sitting at a hefty 178 bytes. Annnnddd it's not working yet. :P I'm gonna have to play with it some more. :D

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 #1
« Reply #19 on: July 15, 2014, 06:52:30 pm »
willrandship got a sub-100 solution in Python! Congrats!

By now, I don't know whether or not code should be revealed.
« Last Edit: July 15, 2014, 06:58:00 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 #1
« Reply #20 on: July 15, 2014, 07:01:03 pm »
I'd say not. Probably.

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 Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Code Golf Contest #1
« Reply #21 on: July 16, 2014, 03:04:54 am »
How is one supposed to send an entry by PM ? PMs don't support attachements do they ?
Or i should upload it somewhere and share the link by PM ?
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 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 #1
« Reply #22 on: July 16, 2014, 03:10:03 am »
Depends on the language. If you can copy-paste the code in the message, be my guest. If not, maybe upload it somewhere like Runer did.
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Code Golf Contest #1
« Reply #23 on: July 16, 2014, 03:18:59 am »
Ok, uploaded it on dropbox and sent you the link to my Basic entry :)
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 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 #1
« Reply #24 on: July 16, 2014, 11:28:57 am »
I added it in.

I also added something of my own...let's see Runer112 try to golf this TI-BASIC entry... >:D

If he asks, though, I'll show it in a spoiler. ;)
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Code Golf Contest #1
« Reply #25 on: July 16, 2014, 12:49:56 pm »
I added it in.

I also added something of my own...let's see Runer112 try to golf this TI-BASIC entry... >:D

If he asks, though, I'll show it in a spoiler. ;)

Why would I want to see it? If I want to beat it fairly, I shouldn't get to peek at it.

EDIT: Only about 5 minutes later, I've figured out how to get it down to 49 as well. :P Did you use my initial entry and see the same optimization? Or did you develop yours completely independently?

EDIT a while later: Down to 48!
« Last Edit: July 16, 2014, 03:52:57 pm by Runer112 »

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 #1
« Reply #26 on: July 16, 2014, 02:37:50 pm »
For TI-BASIC, does it matter if Done is displayed in one case and not the other? If not, then I have a 47-byte program. If so, then it's 48.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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 #1
« Reply #27 on: July 16, 2014, 08:02:23 pm »
For TI-BASIC, it does not matter.
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Code Golf Contest #1
« Reply #28 on: July 17, 2014, 01:07:43 am »
Dammit, 71 bytes in TI-BASIC too :P




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 #1
« Reply #29 on: July 17, 2014, 01:20:00 am »
Is that AFTER subtracting the mem management size by 9 and then by the name length? If so, you're beaten. If not, you're beaten. :P

calc84maniac, Runer, and myself have figured out a 46-byte solution (howevef, as calc84 was first, he is the one getting credit). I'll give you a hint  on how we did it: binomial probability and logarithms.
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?