1. A Little Programming Fun... Contest!
- Posted by jeremy (admin) Nov 27, 2010
- 1539 views
I've been thinking about this for a little while now. Let's have some programming fun! To encourage 4.0 use and the testing thereof, let's have a little contest. Depending on how it goes, we may make this into a weekly thing for a while. The rules overall rules are simple... Complete the task in Euphoria (any version), include in a comment at the top of the file your OpenEuphoria user name. The scoring is a little more complex (and can be modified for the next contest if good ideas are given):
- 1 point is given for completing the task according to the spec
- 1 point is given for using Euphoria 4.0
- 1 point is given for each 4.0 language construct you use
- 1 point is given for each 4.0 standard library method you use
- 1 point is given if your program is in the top 20% for speed
- 1 point is given if your program is in the top 20% for LOC (smallest, not largest!)... comment lines do not count
This is basically going to be on the honor system. Each person submitting should count the total points they earn (besides the last two of course) and submit that as a comment in the top of the file. Why? It would be a lot of work for one person to figure this out for all the submissions. We are doing it for fun. Now, if someone is caught cheating... that wouldn't be very cool, play nice!
Ok... So, let's say the contest was "Create a program that says 'Hello, World!'" ... A possible submission would be:
-- User: jeremy -- 3 points (per spec, 4.0, 1 library method) include std/text.e puts(1, trim("Hello, World!\n"))
(trim added for point scoring example only!). Do not count each use of a method, only count once.
Ok... So, let's start with a simple contest for our first one...
LCD Numbers
Accept on the command line any number of arguments. Each argument will be a number up to 5 digits long. The program should output on their own line each number in a standard text based LCD number. A single space should be placed between each number. Numbers should look like:
-- -- __ -- -- -- -- -- | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- -- -- -- -- -- -- | | | | | | | | | | | | | | | | | | | | | | | | | | -- -- -- -- -- --
They are 4 characters wide and 7 characters tall. An extra point will be given if your program takes an extra parameter to vary the digit size proportionately. i.e. 3x5, or 8x14, etc. i.e. 3x5 would be:
_ | | - | | -
The parameter should be the width: 3, 4, 5, 8, 256
Sample:
$ lcd -w 4 343 -- -- | | | | | | | | -- -- -- | | | | | | -- --
Submissions should be made via email to myself, jeremy (spat) cowgar/com. Submissions will be accepted through Saturday morning, December 4th, no later than 9am EST. The winner will be announced that evening. Discussion can occur on the forums about the contest if you wish but code should not be put on the forum on how to accomplish the task in whole or part.
We can discuss the contest, scoring, future "problems" to solve, since this is the first one. I thought it may be fun to allow the winner of this contest to choose and accept the submissions of the next contest in order to allow everyone to participate in the fun (i.e. in this one it wouldn't really be fair for me to compete as I could wait for everyone's to come in and pick the best one stealing ideas for each one if I wanted ).
I hope everyone has fun with this idea and that we get a lot of submissions.
Have Fun w/the contest!
Jeremy
2. Re: A Little Programming Fun... Contest!
- Posted by DerekParnell (admin) Nov 27, 2010
- 1538 views
-- User: derekp -- 4 points (per spec, 4.0, ONLY 1 library method, smaller) include std/io.e writefln("Hello, World")
LOL
3. Re: A Little Programming Fun... Contest!
- Posted by ChrisB (moderator) Nov 27, 2010
- 1455 views
Submissions should be made via email to myself, jeremy (spat) cowgar/com. Submissions will be accepted through Saturday morning, Nov 4th, no later than 9am EST. The winner will be announced that evening. Discussion can occur on the forums about the contest if you wish but code should not be put on the forum on how to accomplish the task in whole or part.
Darn - too slow again!
Chris
4. Re: A Little Programming Fun... Contest!
- Posted by jeremy (admin) Nov 27, 2010
- 1444 views
Submissions should be made via email to myself, jeremy (spat) cowgar/com. Submissions will be accepted through Saturday morning, Nov 4th, no later than 9am EST. The winner will be announced that evening. Discussion can occur on the forums about the contest if you wish but code should not be put on the forum on how to accomplish the task in whole or part.
Darn - too slow again!
LOL.... That should be December 4th! I've corrected the original message.
Jeremy
5. Re: A Little Programming Fun... Contest!
- Posted by jeremy (admin) Dec 02, 2010
- 1269 views
Just a reminder, this Saturday morning (Dec 4) at 9am EST is the deadline for submissions! Less than 2 days left.
BTW... CK has decided to sponsor prizes for the top 3 winners: A free copy of 4.0 final when it's released. Please see him for your copy if you're one of the lucky three!
Jeremy
6. Re: A Little Programming Fun... Contest!
- Posted by useless Dec 02, 2010
- 1226 views
Just a reminder, this Saturday morning (Dec 4) at 9am EST is the deadline for submissions! Less than 2 days left.
BTW... CK has decided to sponsor prizes for the top 3 winners: A free copy of 4.0 final when it's released. Please see him for your copy if you're one of the lucky three!
Jeremy
How much is the copy of 4.0 final otherwise?
useless
7. Re: A Little Programming Fun... Contest!
- Posted by jeremy (admin) Dec 02, 2010
- 1217 views
How much is the copy of 4.0 final otherwise?
Well, we sell them to CK for $1,000 per copy, but everyone else can download it for free on our wiki:DownloadEuphoria page (once available of course)
Jeremy
8. Re: A Little Programming Fun... Contest!
- Posted by jimcbrown (admin) Dec 02, 2010
- 1211 views
How about bonus points for those who can scale below 3x5? And even more for those who can scale to 1x1 (excluding the obvious '1', '2', '3', etc).
9. Re: A Little Programming Fun... Contest!
- Posted by jeremy (admin) Dec 02, 2010
- 1230 views
How about bonus points for those who can scale below 3x5? And even more for those who can scale to 1x1 (excluding the obvious '1', '2', '3', etc).
Sounds fun but I don't want to change the scoring now as some may already be done w/their submission, that would be unfair. Up coming contests though we can talk about it a bit before and get the scoring down. I just tossed this one out as a starting point.
Jeremy
10. Re: A Little Programming Fun... Contest!
- Posted by jeremy (admin) Dec 03, 2010
- 1198 views
I've created a Mercurial repo for contest submissions. Submissions should not be made directly to this repository. They should still be made directly to me. I will submit all submissions to the repo once the deadline has past.
However, in the repo there is a program that some may be interested in. This is the first version ever and it will probably change w/time, but you can use it to know exactly how your program will be scored in regards to lines of code. It's name is token_count.ex and is in the root directory.
You do not need to have Mercurial in order to download this program. It can be accessed directly via:
hg:contest/raw-file/default/token_count.ex
BTW... as a general note, the original statement said that programs would be scored based on non-comment lines of code. This has changed slightly due to fairness. One person could write the entire program on a single line to win the LOC points. This is not fair and should not be encouraged. Thus, instead of scoring on lines of non-comment code we will be scoring on the number of tokens. An example:
integer a = add(1, 1)
Tokens in the above program: 9
- integer
- a
- =
- add
- (
- 1
- ,
- 1
- )
Those tokens could be spread across 5,000 lines and it would still be 9 tokens. Like wise, you could have a 5,000 line program and right before submission put it all on one line. It no longer matters as 1 line or 5,000 lines, it will be the same token count.
Jeremy