ThisIsNotAMoon-Competition

ThisIsNotAMoon-Competition

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderators: Moderators, Moderators

Post Reply
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10306
Joined: 24 Jan 2006, 21:12

ThisIsNotAMoon-Competition

Post by PicassoCT »

Well.. as Eximius suggested it, but quite contrary not only in c_|__|_, here is a little Code-competition. First the rules.

Allowed languages?
C, C++, Java, Lua

Forbidden Languages: Java, C#, everything that basically a librarycall in disguise and therefore cheating.

The task?

Alway setup by the winner of the round. He might be utterly ignored, if he asks people to produce big things for the bin. The Challenge is to produce something neat, something fast, something elegant, bonus if it has comments in it (would help some who dont know all the C-trickery of old). Remember that people dont read code because it is such fun, so if you wanna handle all the exceptions thats nice for you, but do it elsewhere - and cut.

If the winner doesent come up with a task, the second place gets the call.

The vote. After everyone who has delivered, delivered, everyone is allowed to vote, on one post (OPviciously not on yourself). Only votes of people who deliverd count. The winner is named. He gets it all.

Image
The Prick.. ahem.. the price is handed over (which consists of a trophy.jpg and a e-penis that long, that local firemen will lend it for practicing purposes (you are the owner of that endless pink waterhose in the garden?)


The Task is to write a function that multiplies two mxn-matrices as efficient as possible.
Two Weeks time.
Competition ends on the 16 March, at 21:00 o clock. May the better performer succeed, and all the others forever fall silent in his presence.

I know, that You know.. its a waste of time, and all the others will tell you the same- but if this really gets going, and they all show up with something- so what bad can it do to sharpen the knife, and show everyone what a bleeding edge is?
Attachments
thisIsNoLua.jpg
thisIsNoLua.jpg (170.79 KiB) Viewed 1167 times
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: ThisIsNotAMoon-Competition

Post by smoth »

Image
0 x

gajop
Moderator
Posts: 3027
Joined: 05 Aug 2009, 20:42

Re: ThisIsNotAMoon-Competition

Post by gajop »

wrong subforum
0 x

Andrej
Posts: 176
Joined: 13 Aug 2006, 18:55

Re: ThisIsNotAMoon-Competition

Post by Andrej »

Ok let me try.
Two mxn matrices can be multiplied only when m=n.
This is a special case so we don't need to handle it.

Code: Select all

/* Return zero if exception happened.
 * Return nonzero if matrices can't be multiplied. */
int mul(int m, int n) {
  return (m == n) ? 0 : 1;
}
Asymptotic time complexity: O(1)
Asymptotic space complexity: O(1)

Might be optimized by using:

Code: Select all

int mul(int m,int n){return m-n;}
0 x

Google_Frog
Moderator
Posts: 2445
Joined: 12 Oct 2007, 09:24

Re: ThisIsNotAMoon-Competition

Post by Google_Frog »

I use GPU. It's super effective.

(btw how do you plan to judge performance?)
0 x

User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: ThisIsNotAMoon-Competition

Post by CarRepairer »

So java is allowed but it's forbidden.
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10306
Joined: 24 Jan 2006, 21:12

Re: ThisIsNotAMoon-Competition

Post by PicassoCT »

Google_Frog wrote:I use GPU. It's super effective.

(btw how do you plan to judge performance?)
celsius vs fahrenheit of the resulting flamewar.

I know you could push it all into the openglpipeline.. still some matrices remain to be done
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: ThisIsNotAMoon-Competition

Post by smoth »

linux vs windows GO GO GO
0 x

User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: ThisIsNotAMoon-Competition

Post by CarRepairer »

CarRepairer wrote:So java is allowed but it's forbidden.
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10306
Joined: 24 Jan 2006, 21:12

Re: ThisIsNotAMoon-Competition

Post by PicassoCT »

Everything that is too heavily dependent upon work not done by you. Is not impyling that you cant be a lazy copycat in c++ or any other language, but the idea of this competition is to overcome this golden age syndrom (everything good has done by the forefathers, just need to include <library.all>
and call a relique.(made.Of.(The.Toe.OfDR(noRealArguments)));
)

You get the spirit, and while you argue, the others are thinking, doing stuff.. so you fall behind..
0 x

Post Reply

Return to “Lua Scripts”