Slashdot Mirror


The Shakespeare Programming Language

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."

20 of 148 comments (clear)

  1. snort by wrinkledshirt · · Score: 4, Funny

    combines the best features of BASIC, assembly language, and Hamlet.

    Let me guess. It takes three long, boring hours to figure out (2b | !2b)?

    --

    --------
    Bleah! Heh heh heh... BLEAH BLEAH!!! Ha ha ha ha...

    1. Re:snort by GiMP · · Score: 3, Informative

      That would be (0x2b || !0x2b) or (toB || !toB)..

      Variables cannot start with numbers, and | is a bitwise OR operation.. which is OK but you probably wouldn't want that in this example.

  2. oh well by banky · · Score: 5, Funny

    Server, server, whereforeart thou, server?
    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?

    --
    ZOMG I WOULD LOVE TO KNOW ABOUT YOUR FEELINGS ON MACINTOSH VERSUS WINDOWS, VI VERSUS EMACS, AND HOW YOU'RE NOT A DORK
  3. The true meaning of Shakespeare by aoihai · · Score: 5, Funny

    Thus it is revealed that "Much Ado About Nothing" is actually a polynomial time solver of the "Love Triangle" subclass of NP-complete problems.

    --
    You were eaten by a grue.
    1. Re:The true meaning of Shakespeare by jovlinger · · Score: 4, Funny

      fscking genius! Bravo, my good man.

      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.

  4. why not code in Grunting Neanderthal? by perdida · · Score: 3, Interesting

    Shakespeare used the common language of his day. Like The Sopranos, Shakespeare's oevure is meant to be a big hit.

    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.

    1. Re:why not code in Grunting Neanderthal? by majcher · · Score: 4, Interesting

      You must have missed Ook, a language designed for orangutangs.

  5. A great new step by einhverfr · · Score: 4, Funny

    On April 1, 2000, an RFC was released on IMPS, the Infinite Monkey Protocol Suite, which is a means of keeping track of an infinite number of monkeys on an infinite number of typewriters to see if they duplicate the works of Shakespear (or any other works for that matter). The RFC is located at http://www.ietf.org/rfc/rfc2795.txt.

    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!

    --

    LedgerSMB: Open source Accounting/ERP
  6. Any CSS descrambling software in Shakespeare? by Mark+Gordon · · Score: 5, Interesting

    Assuming this isn't a complete joke...

    David Touretzky would probably get a kick out of this language, since it could lead to a dramatic rendition of a CSS descrambler.

    1. Re:Any CSS descrambling software in Shakespeare? by Jimmy_B · · Score: 3, Insightful
      Any CSS descrambling software in Shakespeare? Assuming this isn't a complete joke...
      Oh, what fools these moderators be. Of COURSE this is a complete joke; notice the category it's in, and read the sample program. It's easy to recognize which phrases have been designated to have language meanings, and that the way they're combined is grammatically-correct nonsense.
  7. Shakespeare is a good start. Now let's try others. by alewando · · Score: 3, Interesting
    Elizabethian English is a good proof of concept, but we should build on this success with other more practical languages.

    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 would make a much better natural language to implement. It has several important advantages over English:
    1. Simple grammar
    2. English-based lexicon for backwards vocabulary compatibility
    3. Full extensibility, owing to its pidgin origins.

    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.
  8. Not Quite Right by robbyjo · · 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.

    --

    --
    Error 500: Internal sig error
  9. Amazing... by Anonymous Coward · · Score: 5, Funny

    "Amazing what CompSci-students can create when they really should do real work."

    Like Linux?

  10. Cook me up some Hamlet by sparcv9 · · Score: 5, Funny

    Another natural language language is Chef. Programs are written like cooking recipies. The above link has examples of a Hello World and a Fibonacci sequence generator. I wouldn't want to eat either of them, though. The ingredients are the variable names, so some of the concoctions sound downright nasty. Although, the Fibonacci generator only requires 100g flour, 250 g butter, and one egg, and it's accompanying Caramel Sauce (the recursive function) requires a cup of white sigar, a cup of brown sugar, and a single vanilla bean.

    --

    This is not a Fugazi .sig
  11. Re:Shakespeare is a good start. Now let's try othe by Anonymous Coward · · Score: 5, Funny

    fuck that. ebonic would be a much better programming language.

    int foo()
    {
    word up, biatch;

    homey = sup();

    }

  12. Temporary mirror by jooon · · 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

    http://cgi.student.nada.kth.se/~d98-jas/shakespear e/

    --
    Jon Åslund (one of the authors)
  13. Not a compiler? by p3d0 · · Score: 3, Insightful

    Just because something uses C as its output language doesn't mean it's not a compiler. If it scans and parses text to build an abstract syntax tree like a duck, then generates intermediate code which gets optimized like a duck, then outputs the result in some target language like a duck, then it's a duck, regardless of which target language is used.

    C is actually quite a popular output language for compilers, because it means they don't have to do register allocation.

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  14. World's first recursive insult by tulare · · Score: 3, Funny
    Lol!
    You lying stupid fatherless big smelly half-witted coward!
    You are as stupid as the difference between a handsome rich brave
    hero and thyself!
    The way the language sets up insults just kills me. I like the above. See the title to this post and think about it :)
    --
    political_news.c: warning: comparison is always true due to limited range of data type
  15. Re:Natural lang processing isn't real work? by joto · · Score: 3, Insightful
    Short-sightedness on the part of our story poster here. I think natural language processing, or at least work in its direction is "real work".

    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...

  16. This is weird! Weird! Weird, I say! by WWWWolf · · Score: 3, Interesting
    You know, just yesterday I fixed some table generation problems in this small program of mine. I commented the offending piece of code better, adding silly comments like "Dramatis Personae" before the variable declarations and stuff like "I Act" before each part of the code...

    ...and next day, someone has Shakespeare Programming Language in Slashdot.

    Weird. Really weird.