Jump to bottom

Closed Thread Icon

Preserved Topic: Return of the mighty 20 liners. (Page 2 of 2) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18451" title="Pages that link to Preserved Topic: Return of the mighty 20 liners. (Page 2 of 2)" rel="nofollow" >Preserved Topic: Return of the mighty 20 liners. <span class="small">(Page 2 of 2)</span>\

 
Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-23-2002 00:45

I meant for my words to be taken literally:

quote:
If the comma can be replaced with a semi-colon and a line break and still have the exact same effect, then you're not allowed to use the comma.



In the case of

var a=1,b=2,c=3;

replacing the commas with semicolons yeilds

var a=1;
b=2;
c=3;

which does *not* necessarily have the exact same effect, since b and c are not declared with the var keyword. (The var keyword says "this variable should only be defined within the current scope"; without the var keyword, the scope of the variable may be larger than the current scope.)

However, in the case of

var dummy1=blah,dummy2=blah,dummy3=blah;

Switching the commas to semicolons is guaranteed to have no effect on the code, since the dummy variables are never used. So you're not allowed to do this; you must make each one a separate line.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-23-2002 00:53

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-23-2002 01:11
quote:
Which does not happen with any parser I could test.



I believe it happens when the variable has already been used in a larger scope. For instance, this code

for(var x=0;x<10;x++)
myfunc();

function myfunc()
{
for (var x=0;x<5;x++)
document.write(x);
}

should write 01234 10 times, whereas this code

for(x=0;x<10;x++)
myfunc();

function myfunc()
{
for (x=0;x<5;x++)
document.write(x);
}

will loop infinitely, because the variable x is being shared between the two loops.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-23-2002 01:28

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Lord_Fukutoku
Paranoid (IV) Inmate

From: West Texas
Insane since: Jul 2002

posted posted 10-23-2002 16:44

Any browser requirements?

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-23-2002 17:11

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 10-27-2002 22:10

Here's my contribution to the mighty 20 liners :
3D TOMB II ENGINE DEMO
9 lines of javascript

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 10-28-2002 00:18

incredible poi. im speechless.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-28-2002 08:47

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-30-2002 13:16

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 10-30-2002 19:11

Absolutely! I'll make the deadline. I have a question though... what about multiple calls to one function from html elements? Do they each count as one line?

. . : slicePuzzle

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-30-2002 19:16

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Lord_Fukutoku
Paranoid (IV) Inmate

From: West Texas
Insane since: Jul 2002

posted posted 10-30-2002 21:44

I think Bugs means, that something like clicking button 1, calls function A. Clicking button 2 also calls function A. Do the two different calls count as two lines, even though it's the same line in two different places?

[edit... Deleted a bit...

[This message has been edited by Lord_Fukutoku (edited 10-30-2002).]

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-30-2002 22:15

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 10-30-2002 23:08

Yes, that is what I meant alright. I've got a few of those that would put me over 20 so I won't count them

. . : slicePuzzle

Lord_Fukutoku
Paranoid (IV) Inmate

From: West Texas
Insane since: Jul 2002

posted posted 10-31-2002 04:34

I wouldn't count them because "technically" they're
a part of the HTML... Even though the script might
not work without them...

Anyways, InI said earlier:

quote:
5) Rely on html.
For example, if you can avoid declaring a variable,
and rather can pass it using a form, use a form.
The more "local" your variables get, the
less lines you'll waste declaring them.




________________________________________________________________
-- Jack of all trades, master of that which has my attention at
the moment.

Unoriginal Cell 693

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-31-2002 11:00

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 10-31-2002 11:37

http://www.bugimus.com/dhtml/20liners/bugstwentyA.html

. . : slicePuzzle

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 10-31-2002 11:45

Wow Bugs, that's an amaging use of a for loop!... I'd never thought about putting that much code into one of them before.

I'll try and make something but It's gonna suck arse compared to what's been done already.

[This message has been edited by Dracusis (edited 10-31-2002).]

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-31-2002 13:37

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 10-31-2002 15:27

Dracusis: your entry doesn't work in IE5.5 ( I don't really care 'coz I understand what it does, and I'll watch it peacefully (at home) with IE6.0 )

*: if the javascript code applied in eventHandler of html tag doesn't count as one line. Then the challenge looses in complexity since you can have some "free" code by putting it in onload or onreadystatechange eventHandlers... :

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-31-2002 17:25

InI: for variation, I suggest you change the rules somewhat for next month. Maybe increase or decrease the number of lines allowed (increasing it may open the contest up to people with less experience), and provide a general theme (very general, such as "contrast" but not something that's a noun like "puppies") so that it's not the same thing all over again.

Very cool bugs =)

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 10-31-2002 18:22

poi: Arr, dude. I haven't entered anything yet. :P

I also agree with slime on opening up the line count a little. I was almost certain I couldn't make anything even half decent in under 20 lines. I still made something but the 20 line thing almost kept me from even starting it.

Although some of the rules are a little silly and I'd even say promote bad coding habits, like this line where I declare my variables:

mouseX = score = pongTimer= (pongOut = 1) - 1 + (pongAngle = 35) - 35 + (speed = 5) - 5

Yuck!... Can't we just ignore variable declarations?

Anyways, Here's my entry:

13 Line Pong Game -- IE 5.5+ only I think.

It's not that great and I still had 7 lines to play with but I'm tired. I might add better angle deflection later (based on where the pong hits the paddle). I might make it a little more cross browser too.



Edit: Actually, I missed the deadline by an Hour. It was almost 1:00am standard time when I finished. But I didn't start untill 9:30pm so I don't really care.

[This message has been edited by Dracusis (edited 10-31-2002).]

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 10-31-2002 18:33

poi, I thought the event handlers in the html elements may be blurring the rules but I *really* wanted that color bar I originally had a pull down menu which kept me under the limit but looked ugly. I'll see about finding a way to squeeze it in and trying to figure out why it chokes in IE5... and I'm Bugimus btw

. . : slicePuzzle

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 10-31-2002 19:30

Perhaps the line limit should be removed entirely, for the benefit of less experienced scripters? I realize it's sort of an important part of the idea, but perhaps changing the idea wouldn't be a bad thing.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-31-2002 19:45

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 10-31-2002 19:46

I think I'd prefer no line limit. Just coding for friendly monthly gig is enough for me.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-31-2002 20:01

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Nevel
Bipolar (III) Inmate

From: Amsterdam
Insane since: Jun 2002

posted posted 10-31-2002 20:12

I think Drac's right, it is fun creating 20-liners alright , but it does decrease the grooviness of the result. I think it's challenging enough to set an early deadline and being forced to use a theme.

Though "tell me a story" is kind of a weird theme(though I like it).

By the way, I guess drac'll probably win the "drag-fun" contest.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-01-2002 00:28

Bugimus: sorry Your entry is really cool. And I think I could make a ... remake of PAINT GIFT in 20lines. A quick sight at the source code strengthens my thought

I like InI's idea of having different categories, and why not having theses ones :
.25 lines (not) on a given theme
.unlimited lines on a given theme

Thus the challenge is open to experienced and less experienced coders.

Mathieu "POÏ" HENRI

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 11-01-2002 01:15

Wow, thanks for pointing Paint Gift out, I didn't know you did one of those. It's good how you allow people to send the pics via email.

I was thinking about something similar where I could make mine into an icon generator. People could draw an actual Mac or PC icon and then I would pass the information to a backend program to build the image file and then download it to the user. That could possibly generate some repeat visitors.

As far as the contest rules go, I'll be happy to play with whatever rules there are. I'm not too picky about that.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 11-01-2002 01:25

I think, whatever we do, we shouldn't have *multiple* sets of rules. Pick one set and go with it. I just think loosening or removing the line limit will encourage more people to participate; a theme can certainly be restrictive enough. In addition, people will be able to write the code more naturally and cleanly, which means others can critique it and learn from it if they want. It's a cool idea for those of us who have more coding experience, but the point of things like repeat performance and the sig contest is practice, and a line limit can hinder that.

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 11-01-2002 02:26

Yeah, again I'd agree with slime.

Coding a 20 liner was fun and I did learn a lot but it's also made me
do things I didn't want to do. And it forced me not to do a couple of
things that I really wanted to do. Like simple pointers which would
have made my code a lot cleaner.

It's also really hard for less experienced people to forsee something
to code that will fit within 20 lines. Just a deadline and a theme would
be cool and it will hopefull make a bunch of the inmates undertake a
monthly coding project. Somthing that gives us a reason to code full
stop is great for me because I sure as hell need the practice.

Like I said before, I honestly didn't think a pong game was possible
in under 20 lines. Hell, I didn't even understand how to caculate the
angles and move a layer based on an angle before I started it so
learning that alone was worth it to me. It got to about 70+ lines
before I even got it working.

Anyway who's to say that "Under 20 Lines" or "1 linked JS file under 5k"
can't be a theme?

Effectively this month was a "Under 20 lines" theme, and it worked well
but if we're going to have line/size themes as well then we'll need a tight
set of rules defined for them. We could even say that every 6th round is
a "20 liner" theme. Which might make for a good bi-yearly comp and the
other less strictly themed ones could make good practice for it.

Oh, another negative point for the 20 liners would be that less experienced
coders might have trouble even understanding the rules, which would
certainly turn them away. Even I was confsed about weather or not we
could do this:

if (1) {do this} if (1) {do this} if (1) {do this} if (1) {do this} if (1) {do this} if (1) {do this}

Although I was pretty sure that would be cheating.

Oh and we should also make a rule against using [ code ] UBB tags,
cause I hate having to scroll sideways to read a post! Heh. And I
think a requirment should be that you display you entry on an html
page and not just as code so we don't have to cut'n-past it.



[This message has been edited by Dracusis (edited 11-01-2002).]

Lord_Fukutoku
Paranoid (IV) Inmate

From: West Texas
Insane since: Jul 2002

posted posted 11-01-2002 16:26

I like the idea of having two catagories... An more than that would get confusing, particularly to people just who haven't followed the development of the rules, namely this thread.

But if we had an open catagory, unlimited lines, it would be a lot easier for those of us who haven't been coding for a real long time to get involved.
Then also have a catagory with a size restriction (which could change every month as needed, or as voted on) so we can keep the original idea of the challenge.

Or, as I think Drac said, make the 20 line limit its own theme that we cycle through every few months, 6 months would be often enough to still call this whole thing "The Mighty 20 Liners," but give everyone enough practice in between to have a chance at making something interesting.

Or, here we go... Do the 20 Liner theme every 6 months (or whatever), but rather than have a seperate "theme" for it (or no "theme" at all), we use the last set of themes since the last month we did the 20 Liners. I think that might be open enough to not really restrict anyone, but have enough content to give any of the less creative people (namely me ) a few ideas to go with. Then the months up to the next 20 Liner really would be practice...


Just some ideas...

________________________________________________________________
-- Jack of all trades, master of that which has my attention at
the moment.

Unoriginal Cell 693

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-01-2002 16:45

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 11-01-2002 17:36

Ok then, I look forward to it

And since the month is over I thought I'd drop all of the links to this months entries in one spot. 11 in total!

IMHO, 11 top quality scripts. Well done everyone! ~ (I took some liberties with the names)

InI 1: Graident Maker
InI 2: Star Field... warp speed?
Slime: Lense? - eh, cool shit!
RoyW 1: Text Fader
RoyW 2: Orbit
RoyW 3: Ohhh... Arrr... - Fireworks
Nevel: Pop-win-slide-weee
Lord_Fukutoku: And this little pinky had too much acid
Poi: 3D Tomb - Doom III eat ya heart out!
Bugimus: Bugpaint!
Dracusis: Just another pong game

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 11-01-2002 19:27

Another idea: A theme every month, and every third month is also a "20 liner."

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-01-2002 20:48

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

« Previous Page1 [2]

« BackwardsOnwards »

Show Forum Drop Down Menu