*** RESULT COMPETITION 2008 ***

For the Compleat Fan
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

*** RESULT COMPETITION 2008 ***

Post by newdep »

******************************************************************

We have a winner!


Thank you all for voting.. it was 4 to 3 for Cormullion vs Cyril
based on the votings we received..

Cormullion, you lucky bastard!, you got again a T-Shirt!

You can pick up you price at Lutz's house, have a coffee and
share the profiling thought ;-) Let us know how the tripp was..

(ps: tripp not included in the price)


Thank you all for your participation!

******************************************************************

Image











The competition is closed, please make your votes!
The winner gets the famous newlisp T-Shirt and 2008 winner fame!

The poll , above, stays for 5 days, counting from today.


Okidoki... Its was very short daylight for this year competition but still we have 2 very nice entry's.

Im not sure if setting pre-tasks as a good way to setup competitions but it was worth trying it and 2 nice contributions came in..!

... within the hour Cyril already posted his calendar contribution...;-)

Cyril and Cormullion are the contributers this year.
See below their code/link..












NEWLISP COMPETITION 2008


..Alright.. it seems people are starting to get a "coding-itch"..


This years competition is predefined and there is only 1 winner.



The code
- must be written in newlisp
- run on all (Linux/MacOS/Windows) newlisp binary's without modification.
- newlisp script must run out of the box, no modifications must be done by the user.
- newlisp script must contain coding comments by author
- compatible from 9.9.9.4 and up. (basicly is should be compatible for rel. 10)
- source code is released under the GNU license from newlisp.
- For the originality "dont borrow code"
- You may select one/many from the options below to participate.



(option #1) A newlisp code profiler

Code: Select all

A program/script that returns a profile of the analized newlisp-script. 

The profile result should at least contain:
Preformance information of the analized script.
Could have readability and coding enhancements

How you target your profiler is up to you, main issue is that it
returns valuable information regarding coding/content of the profiled-newlisp-script.

(option #2) A newlisp enhanced parenthesis checker

Code: Select all

A program/script that returns the exact position of the missing/extra paranthesis inside the checked newlisp-script. 
(The buildin newlisp intepreter isn't accurate enough, from my point of view, to point out "where" it went wrong..)

The paranthesis check should at least contain:
The exact position of where a paranthese is missing/extra. (line number + char position in that line).
Not check in strings ".." {..} [text]..[/text]
Not check data in comments. ; or #

How you target your paranthesis checker is up to you, 
main issue is that it returns accurate information regarding 
the paranthesis mismatch (missing/extra) inside the checked newlisp-script.

(option #3) A newlisp AI

Code: Select all

A program/script that demonstrates newlisp and Artificial Intelligence. 
Where the script must show its capebility to "learn" from data.
It must use FOOP.
User interaction and manual data-input-feeding is not allowed. (like a chat program)
Ofcourse you can provide data for learning purposes.
http://en.wikipedia.org/wiki/Artificial_intelligence
http://en.wikipedia.org/wiki/Machine_learning

How you target your AI is up to you, 
main issue is that it shows/demonstrates that it can "learn" from data. 

(option #4) A newlisp calendar

Code: Select all

A program/script should be able to return the name of the day of the given, any!, date as input. 
(where monday is the first day of the week).

The calendar should at least return:
The name of the day when entering any date i.e. (10/05/218 = dd/mm/yyyy) as input. 
(name of day is "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday")
(B.C. notation is mm/dd/-yyyy)
No external date tools are allowed, only newlisp code.


How you target your calendar is up to you, 
main issue is that it returns accurate information regarding 
the calendar day. Basicly its a  "start/endless" calendar.


Enjoy...


PS: questions/answers/suggestions/donations (koffie/beer/milk/cooky's) are welcome.


PPS:
-Competition ends 31st of December 2008 at (23:59:59)
-Please post your code/link befor the 31th of December in this Forum topic
Last edited by newdep on Tue Jan 06, 2009 1:58 pm, edited 42 times in total.
-- (define? (Cornflakes))

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

I had a question/answer minute with Lutz about the Contest content.
I added 3 more options just to make it more variable for the users.
A 'profiler' is very nice but im not sure if that would trigger enough
people to join in.. The other options should be able to tickle more people..

Hope you all agree...

Enjoy..
-- (define? (Cornflakes))

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

Excellent! I shall attempt to write one script that does all four at once...! :)

Post only on the 31st December? Mustn't plan to party that night...

Cyril
Posts: 183
Joined: Tue Oct 30, 2007 6:27 pm
Location: Moscow, Russia
Contact:

Re: =(NEWLISP-COMPETITION 2008)=

Post by Cyril »

newdep wrote: (option #4) A newlisp calendar
Just to make the first entry:

Code: Select all

;; @module zeller.lsp
;; @description Straightforward implementation of Zeller's congruence
;; @author Cyril Slobin
;; @location http://slobin.pp.ru/newlisp/zeller.lsp
;; @version 2.0, corrected and updated
;;
;; See also @link http://en.wikipedia.org/wiki/Zeller%27s_congruence
;; Zeller's_congruence article in Wikipedia
;;
;; Date format on input as specified by newdep, <b>exactly</b>

; The week starts with Saturday, it's a feature of the algorithm used
(setq week '(Saturday Sunday Monday Tuesday Wednesday Thursday Friday))

; Modulo is not the same as reminder
(define (%% x y) (% (+ (% x y) y) y))

; Division with modulo-aware rounding
(define (// x y) (/ (- x (%% x y)) y))

; Zeller's congruence, verbatim
(define (zeller q m year , h J K)
  (when (member m '(1 2))
    (inc m 12)
    (dec year))
  (setq J (// year 100))
  (setq K (%% year 100))
  (setq h (+ q (// (* 26 (+ m 1)) 10) K (// K 4) (// J 4) (* -2 J)))
  (week (%% h 7)))

; Note that newdep specified dd/mm/yyyy for AC, but mm/dd/-yyyy for BC
(while (read-line)
  (map set '(aa bb year) (map int (parse (current-line) "/")))
  (case (sgn year)
    (0 (println "No zeroth year!"))
    (+1 (println (zeller aa bb year)))
    (-1 (println (zeller bb aa (+ year 1))))))

(exit)

Sorry, this is kinda practical joke, but it works nevertheless. ;-)

Oops! Updated to version 2.0, previous gives wrong answers B.C.
Last edited by Cyril on Tue Nov 25, 2008 2:59 pm, edited 1 time in total.
With newLISP you can grow your lists from the right side!

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Your sorry is not accepted ;-) Nice coding and reading between the lines ;-)
-- (define? (Cornflakes))

Cyril
Posts: 183
Joined: Tue Oct 30, 2007 6:27 pm
Location: Moscow, Russia
Contact:

Post by Cyril »

newdep wrote:Your sorry is not accepted ;-) Nice coding and reading between the lines ;-)
Sorry nevertheless -- the first version was WRONG. The moral of that is, NEVER try to "optimize" formulae given to you by the astronomer! I am an amateur astronomer myself, I say this from experience! The post above was corrected for version 2.0, with hope it is right this time.
With newLISP you can grow your lists from the right side!

Kazimir Majorinc
Posts: 388
Joined: Thu May 08, 2008 1:24 am
Location: Croatia
Contact:

Post by Kazimir Majorinc »

I might enter in AI class if it is allowed to bend rules somehow, i.e. that major part of the program is written in old fashioned procedural imperative style, but I can still use FOOP for some minor issue.

Is it acceptable compromise?

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

If you clearly outline what is different from the rules inside your code,
(i.e. in your case: not using FOOP)
I think people won't mind you coding it ;-)

FOOP seems to be a nice base for this but if your code can
do without...no problem with me....
-- (define? (Cornflakes))

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

My entry is posted/described here:

http://www.alh.net/newlisp/phpbb/viewtopic.php?p=14436

It's a simple newLISP script profiler, called mycroft.

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

--- 1 DAY TO GO ---
-- (define? (Cornflakes))

m i c h a e l
Posts: 394
Joined: Wed Apr 26, 2006 3:37 am
Location: Oregon, USA
Contact:

Post by m i c h a e l »

One day left?! There is no way I can deform any of my scripts to fit within the contest rules that quickly, but it was making me sad seeing cormullion standing there proudly holding his contest entry all alone :-( But since mycroft is so cool, anyway, he probably has it in the bag this year ;-)

Happy 2009 to the entire newLISP community! I'm anxious to see what fantastic things are in store for our favorite language.

m i c h a e l

Kazimir Majorinc
Posts: 388
Joined: Thu May 08, 2008 1:24 am
Location: Croatia
Contact:

Post by Kazimir Majorinc »

I didn't completed application I intended to write, so I'll also give up this year.

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »



*** HAPPY 2009 ***

May The Lisp be with you! ;-)

-- (define? (Cornflakes))

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

nothing from you norman? Ah well, you have a good excuse! :(

Perhaps announce the 2009 contest soon - give everyone more time! :)

m i c h a e l
Posts: 394
Joined: Wed Apr 26, 2006 3:37 am
Location: Oregon, USA
Contact:

Post by m i c h a e l »

In my above post, I unintentionally ignored Cyril, who, having arrived early, was quietly sitting on the stage waiting for the winner to be announced.

Cyril, please forgive my having forgotten your worthy entry.
Norman wrote:Im not sure if setting pre-tasks as a good way to setup competitions but it was worth trying it and 2 nice contributions came in..!
Maybe the pre-tasks would have worked better with a larger group of active members, but with such a small group here, I’m afraid it may have hindered participation. Cyril’s and cormullion’s entries are proof it was worth a try, though.

m i c h a e l

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

cormullion wrote:nothing from you norman? Ah well, you have a good excuse! :(

Perhaps announce the 2009 contest soon - give everyone more time! :)

Yeah i know , i dislike it too!... I had the full intention to drop in with the parenthesis checker 80% finished and some AI... but man last weeks
where so bussy I could not do any completion on my tools...

I think we should do next years competition like "pick the nicest newlisp
application you can find..." that would include any application build over the
years... but thats perhpas for next year...

Yeah..your lucky I did not join in btw ;-)
-- (define? (Cornflakes))

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

newdep wrote:Yeah..your lucky I did not join in btw ;-)
True! :) I bribed the others to stay away... :)

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

we have a winner!
-- (define? (Cornflakes))

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

Post by cormullion »

Wow, I've won something! :) Thanks everyone. Although I can't help thinking that it would have been even better to have lost out to 25 amazing contributions from others...

I still have no idea whether my entry actually works... mixing newLISP, newLISPdoc, HTML, and CSS in one file makes my head hurt. :)

Thanks again!

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Well there are at least 4 people who tested you application..
..the voters I may asume ;-)..

But never the less ill be testing it on my new OS/2 release as your application is a nice test case on newlisp, covers a lot indeed ;-)
-- (define? (Cornflakes))

Locked