Author Topic: Code Golf - The Information/Discussion/Planning Thread  (Read 19097 times)

0 Members and 1 Guest are viewing this topic.

Offline pimathbrainiac

  • Occasionally I make projects
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Code Golf - The Information/Discussion/Planning Thread
« on: June 05, 2015, 07:40:56 pm »
Since the main contest in this forum at the current time is Code Golf, this thread will be the place for the information, discussion, and planning of Code Golf.

Rules of Code Golf
  • Make a program that completes the challenge prescribed on Monday in as few source bytes as possible.
  • All programs must be PM'd to the challenge creator or one of the Community Contests board moderators by 11:59:59 PM ET the following Saturday.
  • Winning code for each language will be posted on Sunday
  • Don't be a rule breaker/bender (see this)
Challenge Creator Rotation
To keep the work load off of one person, there will be a rotation of people making Code Golf challenges each week. If you want to be in the rotation, reply in this thread. The current rotation is:
1) @pimathbrainiac <- On deck
2) @c4ooo
3) @Juju
4) @JWinslow23
5) @Ivoah
6) @LDStudios <- Current challenge

Some rules for challenge creators
  • The challenges must be open to all languages
  • It is preferred that the challenges give calculators some advantage, since this is a calculator forum (eg. key input based challenges)
  • Challenges must be posted on Monday
  • Challenges must be posted in this board on Omni. If you wish to cross post to other forums, that is fine
  • You will receive a PM one week before your turn to post a challenge
  • If you can not prepare a challenge and post it by monday of your given week, message one of the community contests board moderators. You will be skipped in the rotation, and your turn will come back to you when the rotation rotates back to you
  • Challenges must be plausible to complete in a week (so make a platformer is probably not the best idea)
  • Make sure your OP is updated with the overall ranking, and the language ranking (format seen here). While the board mods can edit your post for you if you, please don't make us do that
  • At the end of your week, prepend "[ENDED]" to the topic title in the OP, so people know it's over
« Last Edit: July 13, 2015, 07:31:03 am by pimathbrainiac »
I am Bach.

Offline Ivoah

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +3/-0
    • View Profile
    • Codinghobbit
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #1 on: June 05, 2015, 07:58:11 pm »
Oh, I've an idea for a codegolf, could I host one?
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2
TI SR-56 - $0
TI-Nspire CX CAS - $152
TI-84+ Silver Edition - $56
TI-84+ Silver Edition - $0
TI-85 - $0
TI-73 Explorer VS - $10
ViewScreen - $3

Offline pimathbrainiac

  • Occasionally I make projects
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #2 on: June 05, 2015, 07:59:01 pm »
Sure! I'll add you after JWinslow.
I am Bach.

Offline Ivoah

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +3/-0
    • View Profile
    • Codinghobbit
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #3 on: June 05, 2015, 07:59:30 pm »
Sure! I'll add you after JWinslow.
Sweet!
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2
TI SR-56 - $0
TI-Nspire CX CAS - $152
TI-84+ Silver Edition - $56
TI-84+ Silver Edition - $0
TI-85 - $0
TI-73 Explorer VS - $10
ViewScreen - $3

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 - The Information/Discussion/Planning Thread
« Reply #4 on: June 05, 2015, 08:54:37 pm »
I think we should also have rules so counting bytes is consistent between challenge creators, like, convert newlines to UNIX style (you can do that in Notepad++ for you Windows users, one newline is one byte) and no ending newline (substract one for you Linux users I guess).

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 Ivoah

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +3/-0
    • View Profile
    • Codinghobbit
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #5 on: June 05, 2015, 08:56:40 pm »
I think we should also have rules so counting bytes is consistent between challenge creators, like, convert newlines to UNIX style (you can do that in Notepad++ for you Windows users, one newline is one byte) and no ending newline (substract one for you Linux users I guess).

I agree
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2
TI SR-56 - $0
TI-Nspire CX CAS - $152
TI-84+ Silver Edition - $56
TI-84+ Silver Edition - $0
TI-85 - $0
TI-73 Explorer VS - $10
ViewScreen - $3

Offline c4ooo

  • Project Author
  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #6 on: June 05, 2015, 09:12:33 pm »
There are several ways to score an entry that are generally used:
1) size in chars of source code
2) number of bytes of source code
And finally
3) output size in bytes of final compiled/fully runnable  program. (If your language is interpreted, like windows batch, use method 1 or 2, preferable 2)
I think that the host should have a choice as to what scoring method to use. :)
« Last Edit: June 05, 2015, 09:16:46 pm by c4ooo »
-German Kuznetsov
The impossible chemical compound.

Offline pimathbrainiac

  • Occasionally I make projects
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #7 on: June 05, 2015, 09:15:13 pm »
There are several ways to score an entry that are generally used:
1) size in chars of source code
2) number of bytes in source code
And finally
3) output size in bytes of final compiled program.
I think that the host should have a choice as to what scoring method to use. :)

I don't think number 3 is a good idea, since some languages have distinct advantages over others in binary size.
I am Bach.

Offline Ivoah

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +3/-0
    • View Profile
    • Codinghobbit
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #8 on: June 05, 2015, 09:15:50 pm »
There are several ways to score an entry that are generally used:
1) size in chars of source code
2) number of bytes in source code
And finally
3) output size in bytes of final compiled program.
I think that the host should have a choice as to what scoring method to use. :)

I don't think number 3 is a good idea, since some languages have distinct advantages over others in binary size.

Yeah, #3 sounds like a bad idea (unless it's assembly language).
http://codinghobbit.no-ip.org
My Calcs:
TI-86 (now broken) $2
TI SR-56 - $0
TI-Nspire CX CAS - $152
TI-84+ Silver Edition - $56
TI-84+ Silver Edition - $0
TI-85 - $0
TI-73 Explorer VS - $10
ViewScreen - $3

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 - The Information/Discussion/Planning Thread
« Reply #9 on: June 05, 2015, 09:19:04 pm »
Number 3 is not pratical if we are to mix interpreted and compild languages, unless we accept assembly. For the newlines, the setup I described is the one we used before with JWinslow23 (I think) and is the one that minimizes the number of bytes. Also, for most purposes, we don't use characters above 127, so pretty much every character is 1 byte, although we should count characters.

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 c4ooo

  • Project Author
  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #10 on: June 05, 2015, 09:20:44 pm »
There are several ways to score an entry that are generally used:
1) size in chars of source code
2) number of bytes in source code
And finally
3) output size in bytes of final compiled program.
I think that the host should have a choice as to what scoring method to use. :)

I don't think number 3 is a good idea, since some languages have distinct advantages over others in binary size.
I recall some one saying over irc (forgot who might have been you) that "choosing your language is part of the puzzle, each has its pros and cons". :P
And no that was not a direct quote from irc, I forgot when the original was said  :P
-German Kuznetsov
The impossible chemical compound.

Offline pimathbrainiac

  • Occasionally I make projects
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1731
  • Rating: +136/-23
  • dagaem
    • View Profile
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #11 on: June 05, 2015, 09:24:27 pm »
There are several ways to score an entry that are generally used:
1) size in chars of source code
2) number of bytes in source code
And finally
3) output size in bytes of final compiled program.
I think that the host should have a choice as to what scoring method to use. :)

I don't think number 3 is a good idea, since some languages have distinct advantages over others in binary size.
I recall some one saying over irc (forgot who might have been you) that "choosing your language is part of the puzzle, each has its pros and cons". :P
And no that was not a direct quote from irc, I forgot when the original was said  :P
Yes, but compiled size makes for an unfair advantage. For example, assembly is not efficient in source, but the binaries are extremely small by comparison. We want this fair, although language choice is important.
I am Bach.

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2028
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #12 on: June 05, 2015, 09:28:28 pm »
Case 3 is for competitions which focus on 1 language OR only compiled languages. There for for say basic is not really "acceptable" But with that it is up to the Host to make the rules for there individual contests. IF they choose to count that way they can.

Offline c4ooo

  • Project Author
  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 252
  • Rating: +10/-1
  • The impossible chemical compound.
    • View Profile
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #13 on: June 05, 2015, 09:36:45 pm »
-snip-
This shows that balancing is hard. For example, using point one or two would then in turn backfire on asm.
But which method to use is not my main argument, what is is my suggestion that the hoster could chose  :hyper:
-German Kuznetsov
The impossible chemical compound.

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Code Golf - The Information/Discussion/Planning Thread
« Reply #14 on: June 05, 2015, 09:43:07 pm »
The scoring system I'm most familiar with from other sites, and which I believe is the best, is the better of #2 and #3. So for most languages, it's the size of the source code/file, but for assembly, it's the size of the assembled machine code.