Author Topic: [ENDED] Code Golf Contest #4  (Read 21884 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 #4
« Reply #30 on: August 10, 2014, 01:34:22 pm »
Jens_K has finally submitted, bringing the score on Nspire Lua from 122 to 115! Can LDStudios do any better?
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline LDStudios

  • Coder Of Tomorrow
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 388
  • Rating: +41/-1
    • View Profile
    • LD Studios
Re: Code Golf Contest #4
« Reply #31 on: August 10, 2014, 02:17:14 pm »
Jens_K has finally submitted, bringing the score on Nspire Lua from 122 to 115! Can LDStudios do any better?
I'm down to 118 bytes.. we'll see



Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Code Golf Contest #4
« Reply #32 on: August 10, 2014, 04:13:44 pm »
got a 113 chars in Lua ^^
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline LDStudios

  • Coder Of Tomorrow
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 388
  • Rating: +41/-1
    • View Profile
    • LD Studios
Re: Code Golf Contest #4
« Reply #33 on: August 10, 2014, 04:25:38 pm »
got a 113 chars in Lua ^^

I got 105 ^^



Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Code Golf Contest #4
« Reply #34 on: August 10, 2014, 05:54:51 pm »
But you do it char by char so it's not the same :P

Anyway, your way, I got a bit more than you so I won't submit it ^^

Also, made one in C that's 143 chars + length of input string.
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline LDStudios

  • Coder Of Tomorrow
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 388
  • Rating: +41/-1
    • View Profile
    • LD Studios
Re: Code Golf Contest #4
« Reply #35 on: August 10, 2014, 07:20:10 pm »
But you do it char by char so it's not the same :P

Anyway, your way, I got a bit more than you so I won't submit it ^^

Also, made one in C that's 143 chars + length of input string.

You should either submit it, or show me, because I'm curious to see what you did ^^



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 #4
« Reply #36 on: August 10, 2014, 07:27:13 pm »
Rule clarification: We measure by the amount of characters it takes. Link to character counter: http://mothereff.in/byte-counter
« Last Edit: August 10, 2014, 07:32:08 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 Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Code Golf Contest #4
« Reply #37 on: August 10, 2014, 08:18:20 pm »
@LDStudios : eh, too bad, I deleted it.
But the core of it is the same as my function-based code so you'll be able to see that.

Also, I had a nice looking solution with pattern matching instead of loops but it's several bytes longer, so... :P
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 187
  • Rating: +52/-0
    • View Profile
Re: Code Golf Contest #4
« Reply #38 on: August 11, 2014, 07:29:50 am »
I got 93 by doing it char by char ^^
Not sure if I am after deadline though...
Sorry for nonsense.

Projects:



Offline LDStudios

  • Coder Of Tomorrow
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 388
  • Rating: +41/-1
    • View Profile
    • LD Studios
Re: Code Golf Contest #4
« Reply #39 on: August 11, 2014, 10:14:03 am »
I got 93 by doing it char by char ^^
Not sure if I am after deadline though...

How? O.O



Offline Jens_K

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 187
  • Rating: +52/-0
    • View Profile
Re: Code Golf Contest #4
« Reply #40 on: August 11, 2014, 12:04:50 pm »
I got 93 by doing it char by char ^^
Not sure if I am after deadline though...

How? O.O
Well I was too late... Anyways, heres my code:
Code: [Select]
n=0
function on.charIn(c)n=n+(tonumber(c)and-c or c:byte())..""print((n:gsub(".","%1\n")))end
Sorry for nonsense.

Projects:



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 #4
« Reply #41 on: August 11, 2014, 12:11:51 pm »
While not eligible for judging, it is an impressively small solution!

Oh, and Jens_K, the deadline is always midnight (Central Standard Time) on a Monday.
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Code Golf Contest #4
« Reply #42 on: August 11, 2014, 12:15:32 pm »
Ha ! Why didn't I try with gsub :P
I did too complicated with gmatch trying to do everything within a single call... ^^
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

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 #4
« Reply #43 on: August 11, 2014, 12:28:01 pm »
OK, so unless we have any objections, the next challenge is to make a game of Snake. If anyone objects to this challenge, speak now or forever hold your peace.
Did you know that "Ammonia Gas" rearranged is "As Omnimaga"?
Click here for the only set of games you'll ever need
= ?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Code Golf Contest #4
« Reply #44 on: August 11, 2014, 06:19:11 pm »
You should move the deadline to 11:59 PM instead of 12 AM, because from experience when I organized Omnimaga contests, even experienced programmers and TI community veterans would mix up 12 AM with 12 PM and it was even more confusing for people living in different timezones.