Cthulhu Project : Let's Make Unmaintainable Code

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: Cthulhu Project : Let's Make Unmaintainable Code

Post 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 ?
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Cthulhu Project : Let's Make Unmaintainable Code

Post 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.
bekey
Party member
Posts: 255
Joined: Tue Sep 03, 2013 6:27 pm

[]

Post by bekey »

-snip-
Last edited by bekey on Fri Jan 24, 2014 2:06 am, edited 1 time in total.
szensk
Party member
Posts: 155
Joined: Sat Jan 19, 2013 3:57 am

Re: Cthulhu Project : Let's Make Unmaintainable Code

Post 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
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Cthulhu Project : Let's Make Unmaintainable Code

Post 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.
szensk
Party member
Posts: 155
Joined: Sat Jan 19, 2013 3:57 am

Re: Cthulhu Project : Let's Make Unmaintainable Code

Post 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.
User avatar
Cybearg
Prole
Posts: 4
Joined: Thu Oct 31, 2013 9:07 pm

Re: Cthulhu Project : Let's Make Unmaintainable Code

Post 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.
bekey
Party member
Posts: 255
Joined: Tue Sep 03, 2013 6:27 pm

[]

Post by bekey »

-snip-
Last edited by bekey on Fri Jan 24, 2014 1:56 am, edited 1 time in total.
User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

Re: Cthulhu Project : Let's Make Unmaintainable Code

Post by substitute541 »

Yeah...
Currently designing themes for WordPress.

Sometimes lurks around the forum.
User avatar
Nsmurf
Party member
Posts: 191
Joined: Fri Jul 27, 2012 1:58 am
Location: West coast.

Re: Cthulhu Project : Let's Make Unmaintainable Code

Post 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 3930 times
OBEY!!!
My Blog
UE0gbWUgd2l0aCB0aGUgd29yZCAnSE1TRycgYXMgdGhlIHN1YmplY3Q=
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests