return armada;
August 6, 2012 11:27 AM   Subscribe

If Hemingway wrote JavaScript [SFW, despite the .xxx URL]
posted by brundlefly (35 comments total) 16 users marked this as a favorite
 
Lovely stuff.
posted by Artw at 11:31 AM on August 6, 2012


(I would have titled it "The Old Man and the C")
posted by Artw at 11:32 AM on August 6, 2012 [25 favorites]


Ha!
posted by brundlefly at 11:35 AM on August 6, 2012


though it's no more C than it is Java and just happens to share some syntactical elements which blah blah blah
posted by Artw at 11:39 AM on August 6, 2012


Henry James was such a bitch.
posted by Egg Shen at 11:47 AM on August 6, 2012 [2 favorites]


Who is this "Roberto Bolano"? Do JavaScript people not know ñ exists, or are they just confused because they think it should mean bitwise-not-n?
posted by RogerB at 11:51 AM on August 6, 2012 [4 favorites]


A Firewall to Arms?
The Snow Effect Without Images of Kilimanjaro?
The Sum Also Rises?
For Whom the Bell Alerts for Validation?

Artw: to my table and a drink then
posted by hal9k at 11:56 AM on August 6, 2012 [2 favorites]


theories relating to the expressive potential of a limited syntax

Surely these types would then be even more attracted to Lisp.

Also, the Dickensian solution wasn't nearly long enough. It needs an elderly spinster variable who is never referenced.
posted by DU at 12:00 PM on August 6, 2012 [10 favorites]


COMPILER WARNING: unreferenced character: 'Bulkington' (alas)
posted by RogerB at 12:05 PM on August 6, 2012 [1 favorite]


Is this a pointer I see before me
The handle to my value? Come, let me dereference thee
I have thee not, and yet I see thee still
Art thou not, fatal cache line, alias'd
To write as to read? Or art thou but
A dagger of the MIMD, a false creation,
Proceeding from the speed-obsessed icc?
posted by Talkie Toaster at 12:15 PM on August 6, 2012 [4 favorites]


Who is this "Roberto Bolano"? Do JavaScript people not know ñ exists ....?

It's complicated.
posted by benito.strauss at 12:19 PM on August 6, 2012 [1 favorite]


I am not smart enough to figure out how Italo Calvino would write javascript. Lots of recursion, maybe?
posted by liamcampbell at 1:00 PM on August 6, 2012 [1 favorite]


it’s his kind of language, am I right? A spare and deceptively plain surface, masking substance and drama beneath.

Ha ha ha ha... no, you're not right. I'm not sure how to describe this in literary terms:
for (var key in obj) {
  if (obj.hasOwnProperty(key)) {
    doSomething(key, obj[key]);
  }
}
...but "spare" would not be the first thing that came to mind.
posted by whir at 1:00 PM on August 6, 2012 [1 favorite]


I can't exactly say why, but I imagine Italo Calvino (javascript or not) would accumulate a huge array storing thousands of continuations, and then call them all in parallel threads.
posted by benito.strauss at 1:04 PM on August 6, 2012 [4 favorites]


Given that Jorge Luis Borges' short story The Garden of Forking Paths alludes to hypertext decades before its invention, one can only imagine what sort of stories he would have come up with given Javascript.

And part of me wants to know what H.P. Lovecraft-style Javascript would look like.
posted by Talkie Toaster at 1:10 PM on August 6, 2012


And part of me wants to know what H.P. Lovecraft-style Javascript would look like.

Probably a lot of security scripts so that he could do whitelisting.
posted by BrotherCaine at 1:17 PM on August 6, 2012


Perl is the true lovecraftian language.
posted by MysticMCJ at 1:22 PM on August 6, 2012 [2 favorites]


It's basically just one long regex.
posted by Artw at 1:24 PM on August 6, 2012 [2 favorites]


MetaFilter: It's basically just one long regex.
posted by Talkie Toaster at 1:25 PM on August 6, 2012 [1 favorite]


I'm now waiting for the Javascript extensions that would allow Shakespeare to write code like this:
folio theSeriesOfFIBONACCI(theSize) {

  //a CALCKULATION in two acts.
  //employ'ng the humourous logick of JAVA-SCRIPTE

  Dramatis Personae:
    theResult,    //an ARRAY to contain THE NUMBERS
    theCounter;   //a NUMBER, serv'nt to the FOR LOOP

  //ACT I: in which a ZERO is added for INITIATION

  //Upon the noble list bestow a zero
   ENTER: theResult = [0];

  //ACT II: a LOOP in which the final TWO NUMBERS are QUEREED and SUMM'D

  //Commence at one and venture o'er the numbers
  for (theCounter = 1; theCounter < theSize; theCounter++) {
    //By divination set adjoining members
    theResult[theCounter] = (theResult[theCounter-1]||1) + theResult[Math.max(0, theCounter-2)];
  }

  //'Tis done, and here's the answer.
  return theResult;

  //[Exuent]
}
posted by egypturnash at 1:27 PM on August 6, 2012 [4 favorites]


I once wrote an erotic Donald Duck/Mickey Mouse slashfic in the style of Hemingway.
posted by Doleful Creature at 1:55 PM on August 6, 2012 [3 favorites]


Indeed Lovecraft predicted regular expressions. That's how you check if the stars are right.
posted by Cironian at 2:03 PM on August 6, 2012 [2 favorites]


Someone do Joyce or Proust!
posted by drezdn at 2:17 PM on August 6, 2012


egypturnash- not javascript, but close enough.
posted by a snickering nuthatch at 2:19 PM on August 6, 2012


I once wrote an erotic Donald Duck/Mickey Mouse slashfic in the style of Hemingway.

GO ON.
posted by davidjmcgee at 2:44 PM on August 6, 2012 [2 favorites]


NO. DO NOT.
posted by Panjandrum at 2:45 PM on August 6, 2012 [3 favorites]


if (to_be)
  suffer(outrageous_fortune[slings && arrows]);
else return 0;
posted by PlusDistance at 3:14 PM on August 6, 2012 [2 favorites]


Cormac McCarthy's javascript wouldn't compile
posted by braksandwich at 3:28 PM on August 6, 2012 [1 favorite]


"Exuent" :(
posted by rodii at 4:25 PM on August 6, 2012


Javascript never compiles.

I guess he's fine, then.
posted by LogicalDash at 4:27 PM on August 6, 2012


JavaScript? Rubbish. Cultured programmers use the Queen's PHP.
posted by djb at 4:46 PM on August 6, 2012 [3 favorites]


I don't see how the Shakespeare code works. What's going on with

(theResult[theCounter-1]||1))

?
posted by madcaptenor at 4:58 PM on August 6, 2012


You guys know Shakes already has his own language, right?
posted by 23 at 6:11 PM on August 6, 2012


I don't see how the Shakespeare code works. What's going on with

(theResult[theCounter-1]||1))

?


That expression takes advantage of the truthiness of 0 and 1; it evaluates to 1 if theResult[theCounter-1] is equal to zero (i.e., the zero 'bestowed' above the for loop). So the first time through the loop that whole line resolves to be:

theResult[1] = (1 + 0)

The next two it's:
theResult[2] = (1 + 0)
theResult[3] = (1 + 1)
And predictably after that...
posted by axiom at 6:59 PM on August 6, 2012 [1 favorite]


I'm now waiting for the Javascript extensions that would allow Shakespeare to write code like this

If you remove the space between 'Dramatis' and 'Personae', put 'var' right after 'DramatisPersonae:', and change 'folio' to 'function', that's perfectly legitimate JavaScript.
posted by axiom at 8:14 PM on August 6, 2012


« Older Contortionists Unite!   |   'how casinos have created a new kind of crowd' Newer »


This thread has been archived and is closed to new comments