From: Rudolf Polzer Date: 2003-07-31T23:00:15+09:00 Subject: Re: Hm... nice, Euclid is a one-liner Scripsit ille �Josef 'Jupp' Schugt� : > * gabriele renzi; 2003-07-30, 22:59 UTC: > > I still believe RubyHaiku is the best , just replace syllables with > > lines and you can do quite everything in ruby :) > > 17 Lines? I thought of something sig-sized. OK, now define what a syllable is. A token (including |, ; and others)? A keyword or identifier? A keyword or identifier's syllable? Or even a token's syllable: ; = se-mi-co-lon [probably not, I don't know English hyphenation]? se-mi-ko-ro-n [oops, virtually no ; allowed in the first or third line *g*]? Hehe, and then there's the possibility to choose a word for a character. One could call * one time "splat" and one time "asterisk" depending on which one fits :-) But somehow there won't be many programs left. I'll try... def euclid(x, y) # def-eu-clid-x-y x, y = y, x%y \ # x-y-is-y-x-mod-y while y != 0; end # while-y-not-nil-end Well, at least it CAN be pronounced to fit... but it doesn't have a return value :( Can anyone fix it? Renaming the procedure to "foo" helps, but splits up too much... def foo(x, y) x, # def-foo-x-y-x y = y, x%y while # y-is-y-x-mod-y-while y != 0; x; end # y-not-nil-x-end No, I don't like it - too obfuscated, hard to read. And now in distichon (one hexameter, one pentameter): d�f eucl�dus(x, �) x, � = �, x%� while � != �; return 'x; �nd; p eucl�dus(4, '6) read: d�f eucl�dus ex wh� ex wh� becomes wh�, ex mod wh� while wh� not zer� return �x || �nd pee eucl�dus four s�x Doesn't follow the rules of which syllables are long and which not at all (ex, eu are done wrong and especially inconsequently). Conclusion: I can't, I am untalented in that. Perhaps someone else. -- Doch - alles, was dazu mich trieb, Gott! war so gut! ach, war so lieb!