The Shakespeare Programming Language 148
Erik Tjernlund writes: "Oh, where art thou my lovely new programming language? Stop fiddling around with those perl magnets and use a real poetic computer language: The Shakespeare Programming Language. Not a compiler, but it converts to C. Cool 100+ line Hello World example. Amazing what CompSci-students can create when they really should do real work."
snort (Score:4, Funny)
Let me guess. It takes three long, boring hours to figure out (2b | !2b)?
Re: Screw Linux (Score:1, Offtopic)
I have never understood why people say there is no money in Linux. The value of the Windows software I have sold to my customers is far, far less than they pay me for support.
Friends who know more about Linux than I have converted the server farm of a school district to Linux. Judging from what they say, the support time required is about 1/8 that of Microsoft Windows. But, there is still support needed. The cost of support is still more than the cost of OS software, from any vendor.
Re:snort (Score:3, Informative)
Variables cannot start with numbers, and | is a bitwise OR operation.. which is OK but you probably wouldn't want that in this example.
You're missing the point (Score:1)
A great new step (Score:4, Funny)
RFC 2795 specified that the entity which stores the works of Shakespear (and everyone else) is the Big Annex of Reference Documents (BARD) and communicates with the ZOO (Zone Operation Organization) vie the InterAnnex Message Broadcasting Protocol for Evaluating Neo-classical Transcripts (IAMB-PENT).
Anyway, my point is that this new language is great because what other language would you want to write an implimentation of IAMB-PENT in than Shakespear? Soon we will have another Linux groups try to demonstrate this important protocol like they did with RFC 1149!
So how many monkeys would it take ... (Score:1)
Re:So how many monkeys would it take ... (Score:1)
Re:So how many monkeys would it take ... (Score:1)
Depends. Are they MCSE's?
Re:So how many monkeys would it take ... (Score:2)
Gar... (Score:1, Funny)
Hello world (Score:2, Offtopic)
The Infamous Hello World Program.
Romeo, a young man with a remarkable patience.
Juliet, a likewise young woman of remarkable grace.
Ophelia, a remarkable woman much in dispute with Hamlet.
Hamlet, the flatterer of Andersen Insulting A/S.
Act I: Hamlet's insults and flattery.
Scene I: The insulting of Romeo.
[Enter Hamlet and Romeo]
Hamlet:
You lying stupid fatherless big smelly half-witted coward!
You are as stupid as the difference between a handsome rich brave
hero and thyself! Speak your mind!
You are as brave as the sum of your fat little stuffed misused dusty
old rotten codpiece and a beautiful fair warm peaceful sunny summer's
day. You are as healthy as the difference between the sum of the
sweetest reddest rose and my father and yourself! Speak your mind!
You are as cowardly as the sum of yourself and the difference
between a big mighty proud kingdom and a horse. Speak your mind.
Speak your mind!
[Exit Romeo]
Scene II: The praising of Juliet.
[Enter Juliet]
Hamlet:
Thou art as sweet as the sum of the sum of Romeo and his horse and his
black cat! Speak thy mind!
[Exit Juliet]
Scene III: The praising of Ophelia.
[Enter Ophelia]
Hamlet:
Thou art as lovely as the product of a large rural town and my amazing
bottomless embroidered purse. Speak thy mind!
Thou art as loving as the product of the bluest clearest sweetest sky
and the sum of a squirrel and a white horse. Thou art as beautiful as
the difference between Juliet and thyself. Speak thy mind!
[Exeunt Ophelia and Hamlet]
Act II: Behind Hamlet's back.
Scene I: Romeo and Juliet's conversation.
[Enter Romeo and Juliet]
Romeo:
Speak your mind. You are as worried as the sum of yourself and the
difference between my small smooth hamster and my nose. Speak your
mind!
Juliet:
Speak YOUR mind! You are as bad as Hamlet! You are as small as the
difference between the square of the difference between my little pony
and your big hairy hound and the cube of your sorry little
codpiece. Speak your mind!
[Exit Romeo]
Scene II: Juliet and Ophelia's conversation.
[Enter Ophelia]
Juliet:
Thou art as good as the quotient between Romeo and the sum of a small
furry animal and a leech. Speak your mind!
Ophelia:
Thou art as disgusting as the quotient between Romeo and twice the
difference between a mistletoe and an oozing infected blister! Speak
your mind!
[Exeunt]
oh well (Score:5, Funny)
Deny thy slashdotting and accept mine HTTP connects!
5 comments and I can't seem to connect. mayhap I shall bite my thumb at RoadRunner?
Re:oh well (Score:2, Funny)
When'er thine voice is delayed from reaching mine ears
before sweet sleep approaches me,
and I knowest that we be in the presence of yonder overlooking master of all things constructed,
then my awareness shall be that the master hast brought his minions to overwhelm thine voice with their chanting
and I shall be filled with woe and anticipation of what sweetness might I forsee in the morrow.
Yes, It Rhymes In The Original Language (Score:1)
Re:oh well (Score:1)
Re:oh well (Score:1)
By the way, has the "postercomment compression filter" ever heard that brevity is the soul of wit? Calvin Coolidge would have driven himself nuts trying to post here
The true meaning of Shakespeare (Score:5, Funny)
Re:The true meaning of Shakespeare (Score:4, Funny)
Following your lead, I have deduced that Othello must be a game-theoretic treatsie, while the Comedy of Errors is clearly a C compiler.
I suspect that All's Well that Ends Well must be an early formulation of the halting problem, but I'm still waiting for the mechanical proof solver to come back with results. It may be that the last word of the title is a transcription error.
Re:The true meaning of Shakespeare (Score:1)
Re:The true meaning of Shakespeare (Score:1)
why not code in Grunting Neanderthal? (Score:3, Interesting)
His writing is not a language or a diction or a dialect unto itself, but to combine the ways of speaking of the poor and rich playgoers of the Elizabethan time. It's the original accessible style, and that is why 15 year olds can understand, and dig, Romeo and Juliet today.
However, this "speak your mind" crap de-shakespearizes the writing anyway. The topics may be shakespearean, but the diction is a geek-ized bastardization of Elizabethan speech.
This era's English is as complex as our own. The best way to code in such a language understandably is to write simple prose.
For coding, you need a more modular language, something less complex. The semi-linguistic grunts and signs of a Neanderthal, or Koko the signing ape,may be more useful. You would get compilable code, due to a simpler logix, and the Neanderthal observer would still understand the meanings.
Re:why not code in Grunting Neanderthal? (Score:4, Interesting)
Re:why not code in Grunting Neanderthal? (Score:2)
I believe it's already been done. See the posix utilities. A pretty good vocab: (try pronouncing these as spelled) awk, grep, ls, su, tar, stty, zcat, rm, mknod, cp, rmdir, chmod
Then there's the functions: fchmod, msgsnd, msgop, msgget, mmap,
Any CSS descrambling software in Shakespeare? (Score:5, Interesting)
David Touretzky would probably get a kick out of this language, since it could lead to a dramatic rendition of a CSS descrambler.
Re:Any CSS descrambling software in Shakespeare? (Score:3, Insightful)
Re:Any CSS descrambling software in Shakespeare? (Score:2)
Did you even look at the website? It si NOT a joke. I just downloaded and compiled the spl2c interperter myself, and then coverted to C and compiled a sample program. it works!
Re:Any CSS descrambling software in Shakespeare? (Score:2)
(B)The fact that it compiles doesn't make it any less a joke. The fact that it compiles is, by itself, humorous. The fact that it compiles *and* reads like a parody of Shakespeare is hilarious. Awhile ago, a steganographic tool was mentioned on Slashdot which would reversibly turn text messages into what looks like spam. This is a similar thing, for C code.
Re:Any CSS descrambling software in Shakespeare? (Score:2)
Shakespeare really is a fairly simple programming language with built-in steganographic obfuscation. But it'd be a hoot to see MPAA try to come down on a Shakespeare version of DeCSS or Adobe try to complain about a Shakespearean e-book decryptor.
(And while the language looks at quick glance to be turing-complete it could do with some richer semantics -- floats, function calls, etc.)
Re:Any CSS descrambling software in Shakespeare? (Score:1)
Shakespeare is a good start. Now let's try others. (Score:3, Interesting)
Natural-language programming has had its ups and downs over the year. Some will recall Hypertalk, for example, as the language the original Myst game was programmed in. Only some will recall, however, inasmuch as it never got terribly far off the ground. Other natural languages haven't faired much better.
My contention, however, is that these efforts have not failed because the idea of natural-language programming is somehow fundamentally flawed. Nay, the problem is that we're busy trying to implement the wrong language: English. English may be the language lots of us speak, but it's simultaneously too imprecise to permit of exacting programming and too verbose to allow structures to be implemented quickly and cleanly.
Tok Pisin [adequacy.org] would make a much better natural language to implement. It has several important advantages over English:
As yet, a language like Tok Pisin would encounter much opposition among programmers and speakers in the population at large unaccustomed to change, but it's a proposal deserving of serious examination.
OFF TOPIC Re:Shakespeare is a good start. (Score:1)
[adequacy.org]
http://www.adequacy.org/?op=view_poll;qid=99910
and suddenly realized perhaps how very small this little web forum we call slashdot really is
Re:OFF TOPIC Re:Shakespeare is a good start. (Score:2)
But, given that their main poll had 137 votes, I guess most people have already voted with their [metaphorical] feet.
Re:Shakespeare is a good start. Now let's try othe (Score:2)
Re:Shakespeare is a good start. Now let's try othe (Score:5, Funny)
int foo()
{
word up, biatch;
homey = sup();
}
Umm.. what about AppleScript? (Score:1)
Umm.. what about AppleScript? It was based on many of the same elements and ideas of HyperTalk, but extended to a system-wide metaphor. In fact, with Apple's OSA (Open Scripting Architecture), AppleScript has gotten to be pretty darn useful.
Apple's probably got the best implementation of a natural language parser around right now. With the right extensions and coding, it could serve very easily as a great meta-language for programming.
Not Quite Right (Score:3, Informative)
Not a compiler, but it converts to C.
Well, technically, the tool that translates one language to another (be it to machine language, intermediate language, or just another sufficiently different high level language) is called compiler. Therefore, calling it non-compiler would be incorrect.
Re:Not Quite Right (Score:2)
But if we are to accept common (albeit faulty) terminology, I will agree that something that translates language foo to C is definitely worthy of being called a compiler...
Re:Not Quite Right (Score:1)
We never got far enough to be useful, but it does actually work.
Includes? (Score:1)
==
Oh damned damned damned villian!
(from McBeth?)
Amazing... (Score:5, Funny)
Like Linux?
Natural lang processing isn't real work? (Score:2)
When you can dictate instructions to your machine - whether it's 16th century English, or modern Nihongo - the world will be a better place. Steps like this will help lead us to the elimination of these primative and clunky UI's and I/O devices we're currently attached to in favor of elegant, natural communication. Age of intelligent machines, anyone?
Re:Natural lang processing isn't real work? (Score:3, Insightful)
Nope, this has nothing to do with natural language processing. If you had read the manual you would understand that as well. It is a fairly simple language quite similar to the original basic-dialects, with a lot of syntactic sugar. Adding syntactic sugar has very little to do with natural language processing.
But I'm sure it was fun, and that they learned something in the process of creating it, so I wouldn't call it worthless...
Re:Natural lang processing isn't real work? (Score:2, Informative)
Maybe not useful work (as in creating peace, ending world hunger etc etc) for our society at large, but interesting, funny and cool work.
The language grew out of a lab assignment in a syntax analysis course [midgard.kth.se] at our school [www.kth.se]. If viewed as a lab assignment, SPL is probably a little more work than the course coordinator demands
/Erik
Cook me up some Hamlet (Score:5, Funny)
Re:Cook me up some Hamlet (Score:1)
I always was slightly nervous about posting physics.usyd URL's to
TimC.
to suck or not to suck (Score:1)
gcc hellow.shks (Score:1)
#include <romeo.h>
#include <juliet.h>
#include <performance.h>
int main(void *scene) {
enter(_romeo + _juliet);
printf("Behold, thou seest the world");
exeunt(romeo);
exeunt(juliet);
render(theatre);
}
Re:gcc hellow.shks (Score:1)
Latin, Shakespeare, and programming. What more could a geek want?
Object oriented Glagolithic in 21 days! (Score:1)
GLAGOL 61 was the forerunner of several undeservedly obscure computer languages, such as Barfy, SNET, and %++. Inspired by an incident (recorded in a humorous note in the Journal of the ACM by Dr. Harry Buttle) in which a moth was squashed by the print head of a primitive Sperry "wrecking-ball" teletype, Buttle invented the insect-oriented programming paradigm and created a language for the representation of algebraic and algorithmic formulae whose symbols consisted exclusively of
vowels, used as reserved key-letters, and
bugs squashed on the page.
GLAGOL (short for GeneraL AlGOrithmic Language) used a specially designed terminal whose printing element was a modified flyswatter. Used in a bug-filled room (the prototype was set up in a dormitory shower room at William and Mary that had a broken window), it required the use of rubber type to set vowels. Later, the rubber-type mechanism was abandoned in favor of a carriage-mounted Dymo labelmaker. GLAGOL 61 also required special processing hardware for optimized execution. Source code was represented internally by larval grubs, and executable code by pupae, nestled in a unique "honeycomb store" on a rotating surface of uniform negative Gaussian curvature, which doubled as an element in the machine's analog differential analyzer, and as an occasional dressmaker's dummy, eventually leading to a grotesque incident which I shall not offend the reader's sensibilities by recounting.
GLAGOL 61's economy of expression may be glimpsed in the following two-line decimation algorithm for a fast Fourier transform [I have translated the insect splotches to ASCII as best I can]:
(random stream of Glagol doesn't pass Slashdot's "lameness filter." Its painful but true
Rarely has the essence of an algorithm shone through so clearly on the printed page; of modern languages, only APL is comparable.
Re:Object oriented Glagolithic in 21 days! (Score:1)
Don't worry, the only thing I fear is your ego.
Temporary mirror (Score:5, Informative)
We didn't expect the slashdot effect (well, not so soon anyway ;-), and our WikiWiki certainly didn't, so the web server died.
So, we set up some temporary, but not complete mirrors. The source, documentation and examples are here, but it lacks the lively and lovely Wiki discussion.
http://spl.pu240.com [pu240.com]
http://cgi.student.nada.kth.se/~d98-jas/shakespear e/ [nada.kth.se]
--Jon Åslund (one of the authors)
Re:Temporary mirror (Score:2, Funny)
You killed the wiki! YOU BASTARDS!
(Another reason
Re:Temporary mirror (Score:1)
Great idea. Google caches every page it finds, slashdot doesn't even cache the few linked pages of the articles it has. I don't read slashdot very often, or at all actually, but from the reactions on this page and from some e-mail I have received, this seems the happen a lot.
--
Jon Åslund
Neat, but... (Score:2, Funny)
Re:Neat, but... (Score:2, Interesting)
Well...kinda. I demo'd the forthcoming Lingua::tlhInganHol::yIghun Perl module at YAPC::NA [yapc.org] last June. It will hit the CPAN in a few weeks time.
With it you'll be able to implement programs like Eratosthenes' well-known "Death Challenge for Primes" in the original Klingon:
Damian
Re:Neat, but... (Score:1)
Looks like completely ordinary Perl to me.
Sorry, couldn't resist :)
MartRe:Neat, but... (Score:1)
HAHAHAHA
Mod parent up.
Re:Neat, but... (Score:1)
How did you get Perl to accept the apostrophe as a letter, instead of treating it as a quote mark?
Re:Neat, but... (Score:1)
Apart from being a string delimiter, apostrophe was also the package name separator in Perl 4 and has been kept on in that role (for backwards compatibility only) in Perl 5.
That is, the following are synonyms in Perl 5:
sub Phroggy's_Question { return "???" }
sub Phroggy::s_Question { return "???" }
So I could have used an apostrophe in any Perl identifier, so long as I didn't care which package the corresponding referent ended up belonging to.
However, Klingon has a very different grammatical structure from Perl -- Klingon imperative verbs are RPN, whereas Perl subroutines use a prefix notation.
So I needed to use a source filter [cpan.org] to translate the grammatical structure. Since I was translating anyway, it was quite easy to include specific handling of glottal stop apostrophes as word characters.
Of course, that also meant I couldn't use apostrophes as string delimiters. But that was okay, since I had already decided that the pach ("talon") and pachmey ("double talons") delimiters:
<qo' nuqneH> yIghitlh!---> print 'qo\' nuqneH';
<<qo' nuqneH>> yIghitlh!---> print "qo' nuqneH";
were more in keeping with the Klingon mindset anyway
Damian
Shakespeare & Chef vs. DeCSS (Score:2)
Re:Shakespeare & Chef vs. DeCSS (Score:1)
Re:Shakespeare & Chef vs. DeCSS (Score:2)
Other Ideas (Score:1)
Not a compiler? (Score:3, Insightful)
C is actually quite a popular output language for compilers, because it means they don't have to do register allocation.
Re:Not a compiler? (Score:1)
Uh, which is to say, not at all?
Note for the metaphorically impaired (Score:2)
Have they reserved the movie rights? (Score:1)
Leo di Caprio might actually be able to act if all he had to say was "Speak thy mind!"... but the dirty codpieces and square roots of lying pigs-offal might get him down a bit.
-Perc
Will Would be Proud (Score:1)
-Ryan
ideal language for DeCSS (Score:1)
the other extreme (Score:1)
World's first recursive insult (Score:3, Funny)
Re:World's first recursive insult (Score:2)
Amazing (Score:2)
There's a similar project for Perl [perl.com] called Lingua::Romana::Perligata [monash.edu.au] . This is an awesome module written by Damian Conway, that let you program in Latin. Totally crazy.
real work (Score:1)
Amazing what CompSci-students can create when they really should do real work.
I'll assume, for your sake, that you were trying to be cute and that the above was a misdirected quip with the aim to amuse. But the truth is that when I was in university I did some of the most creative work that I ever did, granted it was mostly useless but it did prepare me for the real world.
Life is not all work. Arbeit macht Frei. Not always.
Re:real work (Score:1)
Ouch.
Fishing usually set me free.
Re:real work (Score:1)
Mr. Torvalds and Linux is another pretty good example of what university students can create when they probably should use their time to "real school work".
As I said. Only trying to be amusing. Next time I'll just submit a URL.
/Erik Tjernlund
This is pretty cool! (Score:1)
Global File System (GFS) Rewritten in SPL (Score:2)
thk writes "Sistina [christusrex.org], the main developer of the Global File System, has changed its language from C to SPL [d.kth.se] (Shakespeare Programming Language). SPL is basically a language to make the source code for programs written with it, resemble a Shakespeare play. Interestingly, the change came just after beta testing, leaving some users a bit miffed. The GFS is an important component of some GPL clustering projects, such as Compaq's SSIC project. The Sistina press release is here [slashdot.org]."
This is weird! Weird! Weird, I say! (Score:3, Interesting)
Weird. Really weird.
college students? real work? (Score:1)
Esoteric Programming Languages (Score:1)
And other esoteric programming languages [yahoo.com]
Port DeCSS! (Score:1)
weird languages (Score:1)
I like the references (Score:2)
Incredible language, by the way. Really really nifty, and something I will use as an example when I'm trying to define the term "hacker".
--
Evan