Javascript poetry

V

VK

This was indirectly inspired by the "Idiomatic for ... in" thread and
I sincerely hope that Pedro Pinheiro will not take it as anything
personal. Just while typing in "belletristic" I realized that
Javascript still doesn't have(?) its own poetry. Perl does since
nearly the beginning ( http://en.wikipedia.org/wiki/Perl#Perl_pastimes
)

So I am proposing to fill out this humiliating gap :)

The rules:

1) can be wrapped into a function
2) no pre-declared variables
3) no [var]
4) sensual
5) corresponds to the basic rules of English grammar
! 6) has to be a valid executable code, its usefulness is not
important

I am first with a sad poem about the love and the life :-( :)

<script>

(function JSPoetry() {
// by VK


somePeople: do {for (ManyYears in Error) {
continue somePeople; Date;}}
while (void arguments);}).apply();


// validity check
window.alert('OK');

</script>
 
V

VK

The rules:

1) can be wrapped into a function
2) no pre-declared variables
3) no [var]

Sorry if breaking someone's poetic product :) but two more obvious
rules:

3b) no string literals
3c) LABELS: only where they are syntactically functional (for, for-
in, do loops entry points)
Otherwise it could be just
"string",
"string";
or
STRING:
STRING:
and no sport at all :)
<script>

(function JSPoetry() {
// by VK

 somePeople: do {for (ManyYears in Error) {
 continue somePeople; Date;}}
 while (void arguments);}).apply();

// validity check
window.alert('OK');

</script>

This poem came out so sad that put a depression on myself :) So I
wrote a cheerful poetical answer to it:

<script>

(function JSPoetry() {
// by VK

try {new Object}
catch (on_Fly){}
finally {with (self){}}}).apply();


// validity check
window.alert('OK');

</script>
 
T

Thomas 'PointedEars' Lahn

P said:
VK said:
<script>

(function JSPoetry() {
// by VK

try {new Object}
catch (on_Fly){}
finally {with (self){}}}).apply();

// validity check
window.alert('OK');
</script>

if (u !object) {
i.say( u.r ) = q[white][a.bar.d];
}

I think the point was that it must also compile, in the best case run
(surprisingly for VK, their code does both in several Web browsers).
Also, I do not understand the right-hand side of your assignment, and
I do not see a verse.

Anyhow, aside from the well-known

var theQuestion = ("bb" || !"bb");

there is also this Shakespearan wisdom:

this
all: ({self: true}) && ("day", "night") && !({} === {});


PointedEars :)
 
P

P E Schoen

"Thomas 'PointedEars' Lahn" wrote in message
P E Schoen wrote:
if (u !object) {
i.say( u.r ) = q[white][a.bar.d];
}
I think the point was that it must also compile, in the best case
run (surprisingly for VK, their code does both in several Web
browsers).
Agreed.

Also, I do not understand the right-hand side of your assignment,
and I do not see a verse.

Well, the translation to "verse" could be:

If you do not object,
I say you are quite a bard.

It is similar to iambic trimeter. The stress pattern is thus:

x/x/x/
x/xx/x/

This notation is used for some examples in
http://en.wikipedia.org/wiki/Meter_(poetry), where a stressed syllable is
"/" and an unstressed one is "x". It is also described as
dah-DUM-dah-DUM-dah-DUM (first line iambic trimeter), and
dah-DUM-dah-dah-DUM-dah-DUM (second line with the second foot being an
anapest).

This pattern is best illustrated by the middle portion of "The Mexican Hat
Dance":

Paul the Poet
http://www.smart.net/~pstech/bsn/EarlyPoems.txt
http://www.smart.net/~pstech/bsn/kpoems.htm
http://www.smart.net/~pstech/bsn/NewPoems.htm
 
V

VK

(surprisingly for VK, their code does both in several Web browsers).

"several Web browsers"?! My well versed profound poetry is readable by
any ECMA 262 3rd ed. compliant engine. I am proclaiming right now to
the faces of all Javascript engines around: the one that doesn't
understand my poetry is an illiterate sorry loser! :))
there is also this Shakespearan wisdom:

  this
  all: ({self: true}) && ("day", "night") && !({} === {});

Puzzled on that one. Is it "O day and night, but this is wondrous
strange!" ?
I see you are working in Richard Kostelanetz style while I am tending
to classical forms.
:)
 
L

Laser Lips

OK this is not a poem but an quote.

<script type='text/javascript'>
var houses=["brick","mud","glass"];
for(people in houses)
{
try
{
if (houses[people]!="glass")throw "Stone";
}
catch(er)
{
if(er=="Stone")alert("");
}
}
</script>
Graham Vincent
 
L

Laser Lips

Which should probably be...

<script type='text/javascript'>
var houses=["brick","mud","glass"];
for(people in houses)
{
try{if(houses[people]!="glass")throw "Stone";}catch(e){}
}
</script>
 
V

VK

<script type='text/javascript'>

var houses=["brick","mud","glass"];
for(people in houses)
{
try{if(houses[people]!="glass")throw "Stone";}catch(e){}}

</script>

Your message is rather hard to interpret to me at the line
(houses[people]!="glass").
Should it be read in the Punk style or in the Hippie style? Should one
throw the stone if seeing careless people in the window - or one
should not throw stone into people looking through the window at the
blue sky? Or is it an intentional ambiguity left by the author?
 
V

VK

This pattern is best illustrated by the middle portion of "The Mexican Hat
Dance":

From my observations of Javascript language the most suitable meter
for it is choliamb ( http://en.wikipedia.org/wiki/Choliamb ) though of
course we cannot use syllable weights to fully enjoy it. That is
basically true for English itself anyway.

For a lightweight/energetic poetry, because of the primarily
monosyllabic nature of English and because of the forced lack of
articles: the most suitable meter is trochee ( http://en.wikipedia.org/wiki/Trochee
).

IMHO of course.

:)
 
L

Laser Lips

<script type='text/javascript'>
var houses=["brick","mud","glass"];
for(people in houses)
{
 try{if(houses[people]!="glass")throw "Stone";}catch(e){}}
</script>

Your message is rather hard to interpret to me at the line
 (houses[people]!="glass").
Should it be read in the Punk style or in the Hippie style? Should one
throw the stone if seeing careless people in the window - or one
should not throw stone into people looking through the window at the
blue sky? Or is it an intentional ambiguity left by the author?

VK, are you not aware of the saying, "People in glass houses should'nt
throw stones" ?

Graham
 
V

VK

Your message is rather hard to interpret to me at the line
 (houses[people]!="glass").
Should it be read in the Punk style or in the Hippie style? Should one
throw the stone if seeing careless people in the window - or one
should not throw stone into people looking through the window at the
blue sky? Or is it an intentional ambiguity left by the author?

VK, are you not aware of the saying, "People in glass houses shouldn't
throw stones" ?

Oh, that one... I was mislead by ["brick","mud","glass"] with "mud" in
it, sorry.
 
P

P E Schoen

"VK" wrote in message
Oh, that one... I was mislead by ["brick","mud","glass"] with
"mud" in it, sorry.

Or

var $houses=["brick","grass"];
var $people;
function advice() {
var $whatNot = "thrones";
if ($people.liveIn($houses.grass) ) {
alert("Should not stow " + $whatNot);
}
}

Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top