Page 2 of 4

Re: Cthulhu Project : Let's Make Unmaintainable Code

Posted: Mon Nov 04, 2013 6:41 pm
by MadByte
Nixola wrote:What if I wanted to add a lbrary written by me? Do I have to copypaste it in?
( quoted so everyone see it also on my post :p )

And what about editing / replacing resources ( images, sounds etc.. ) of other people ?

Re: Cthulhu Project : Let's Make Unmaintainable Code

Posted: Mon Nov 04, 2013 6:56 pm
by Roland_Yonaba
Nixola wrote:What if I wanted to add a lbrary written by me? Do I have to copypaste it in?
My opinion would be : don't. Maybe you can copy/paste the relevant code to include it, but definitely not the whole library.
MadByte wrote:And what about editing / replacing resources ( images, sounds etc.. ) of other people ?
Not a definitive answer, but i'd say yes, it should be possible to replace/edit assets of other people.

[]

Posted: Mon Nov 04, 2013 9:39 pm
by bekey
-snip-

Re: Cthulhu Project : Let's Make Unmaintainable Code

Posted: Tue Nov 05, 2013 1:55 am
by szensk
T-Bone wrote:Lua isn't quite as well prepared for something like this. We don't have gotos etc. But writing bad code can be fun anyway :)
We can do fun things like define operators on types that normally don't have operators and as types aren't explicitly typed this can be quite sneaky as to what's actually happening. For example:

Code: Select all

debug.setmetatable(0, {__mul=function(j, f)if type(j)=="function"then j,f=f,j end for i=1,j do f(i,j)end return j end})

range = 1, 5
* function (i)
	print("Hi",i)
end
* print

Re: Cthulhu Project : Let's Make Unmaintainable Code

Posted: Tue Nov 05, 2013 7:46 am
by Roland_Yonaba
szensk wrote: We can do fun things like define operators on types that normally don't have operators and as types aren't explicitly typed this can be quite sneaky as to what's actually happening. For example:

Code: Select all

debug.setmetatable(0, {__mul=function(j, f)if type(j)=="function"then j,f=f,j end for i=1,j do f(i,j)end return j end})

range = 1, 5
* function (i)
	print("Hi",i)
end
* print
Hell no...
Although it looks nice (really), such an hacky trick relies on Lua's debug library. And I do not recommend playing with this.
Actually, i'll add a rule, Lua's standard library functions should not be altered. This would (unnecessarily) complexifies the challenge. Keep in mind the purpose of this is not "writing bad code intentionally", as Micha pointed it out previously. Such wise words have to be quoted.
micha wrote:No, it's a project about writing a game together in the community, with the extra rule that you may not change existing code, but only add new code. The unmaintainability is more a result than a rule.
I would rather say that everyone should strive to write clean code.
The difficulty here is "the mess will come naturally" because commit after commit, the whole program takes a different direction, depending on the crazy ideas that were added by the last committer.

Re: Cthulhu Project : Let's Make Unmaintainable Code

Posted: Tue Nov 05, 2013 12:53 pm
by szensk
Roland_Yonaba wrote:
micha wrote:No, it's a project about writing a game together in the community, with the extra rule that you may not change existing code, but only add new code. The unmaintainability is more a result than a rule.
I would rather say that everyone should strive to write clean code.
The difficulty here is "the mess will come naturally" because commit after commit, the whole program takes a different direction, depending on the crazy ideas that were added by the last committer.
Oh boy, I misunderstood the intent. Luckily it sounds a lot more fun this way.

I stand by that it's easy to write bad code in Lua, however.

Re: Cthulhu Project : Let's Make Unmaintainable Code

Posted: Wed Nov 06, 2013 4:23 am
by Cybearg
This sounds like fun! I know nothing of LOVE or Lua, so I doubt I can participate, but I'll definitely be following along.

[]

Posted: Sun Dec 01, 2013 8:02 pm
by bekey
-snip-

Re: Cthulhu Project : Let's Make Unmaintainable Code

Posted: Mon Dec 02, 2013 3:46 am
by substitute541
Yeah...

Re: Cthulhu Project : Let's Make Unmaintainable Code

Posted: Tue Dec 03, 2013 5:24 am
by Nsmurf
I am so in.
Please add me once you create the project, so that I'll get an email about it. My username on github is WesleyAC. (Hey, look, everyone knows my real name now!)

What would be awesome is if this went on longer than 3 days though, so it could get really messy. I'd prefer something like 1 week.

Also:
A logo I made to practice my GIMP skillz.
A logo I made to practice my GIMP skillz.
cthulu.jpg (731.61 KiB) Viewed 3923 times