Archive for the ‘ Uncategorized ’ Category

LOLCODE

HAI
BTW This is a BrainFuck interpreter written in LOLCode
BTW It accepts as input a BF program, followed by a "!", followed  by any input to the BF program.
BTW Since BrainFuck is turing-complete, this proves that LOLCode is too

I HAS A INSTRUCTIONS    BTW Array for BF instructions
I HAS A IPTR            BTW Pointer to first empty element in INSTRUCTIONS
IPTR R 0
I HAS A LOOPZ            BTW Array of loop start/end addresses
I HAS A LOOPSTACKZ        BTW Loop stack for building the above two
I HAS A LSPTR            BTW Pointer to first empty element of LOOPSTACKZ
LSPTR R 0

BTW Read in BF instructions, terminated with "!"
IM IN YR CODE
  GIMMEH IPTR IN MAH INSTRUCTIONS

  BOTH SAEM IPTR IN MAH INSTRUCTIONS AN "[", O RLY?
    YA RLY
      LSPTR IN MAH LOOPSTACKZ R IPTR
      LSPTR R SUM OF LSPTR AN 1
  OIC

  BOTH SAEM IPTR IN MAH INSTRUCTIONS AN "]", O RLY?
    YA RLY
      I HAS A STARTPTR
      LSPTR R DIFF OF LSPTR AN 1
      STARTPTR R LSPTR IN MAH LOOPSTACKZ
      STARTPTR IN MAH LOOPZ R IPTR
      IPTR IN MAH LOOPZ R STARTPTR
  OIC

  BOTH SAEM IPTR IN MAH INSTRUCTIONS AN "!", O RLY?
    YA RLY
      GTFO
    NO WAI
      IPTR R SUM OF IPTR AN 1
  OIC
IM OUTTA YR CODE

BTW Variables for BF's tape
I HAS A LTAPE
I HAS A RTAPE
I HAS A LPTR
LPTR R 0
I HAS A RPTR
RPTR R 0
I HAS A CELL
CELL R 0

BTW Reset instruction pointer to start
IPTR R 0

BTW Start interpreting
IM IN YR LOOP
  I HAS A THING
  THING R IPTR IN MAH INSTRUCTIONS

  BTW Move tape head right
  BOTH SAEM THING AN ">", O RLY?
    YA RLY
      LPTR IN MAH LTAPE R CELL
      LPTR R SUM OF LPTR AN 1
      BOTH SAEM RPTR AN 0, O RLY?
        YA RLY
          CELL R 0
        NO WAI
          RPTR R DIFF OF RPTR AN 1
          CELL R RPTR IN MAH RTAPE
      OIC
  OIC

  BTW Move tape head left
  BOTH SAEM THING AN "<", O RLY?
    YA RLY
      RPTR IN MAH RTAPE R CELL
      RPTR R SUM OF RPTR AN 1
      BOTH SAEM LPTR AN 0, O RLY?
        YA RLY
          CELL R 0
        NO WAI
          LPTR R DIFF OF LPTR AN 1
          CELL R LPTR IN MAH LTAPE
      OIC
  OIC

  BTW Increment
  BOTH SAEM THING AN "+", O RLY?
    YA RLY
      CELL R SUM OF CELL AN 1
  OIC

  BTW Decrement
  BOTH SAEM THING AN "-", O RLY?
    YA RLY
      CELL R DIFF OF CELL AN 1
  OIC

  BTW Output produces numbers instead of ASCII characters
  BOTH SAEM THING AN ".", O RLY?
    YA RLY
      VISIBLE CELL!
      VISIBLE " "!
  OIC

  BTW Input doesn't work because we can't convert characters to integers
  BTW Oh well, it doesn't stop it being turing complete

  BTW Start of loop
  BOTH OF BOTH SAEM THING AN "[" AN BOTH SAEM CELL AN 0, O RLY?
    YA RLY
      IPTR R IPTR IN MAH LOOPZ
  OIC

  BTW End of loop
  BOTH OF BOTH SAEM THING AN "]" AN DIFFRINT CELL AN 0, O RLY?
    YA RLY
      IPTR R IPTR IN MAH LOOPZ
  OIC

  BTW End of program!
  BOTH SAEM THING AN "!", O RLY?
    YA RLY
      GTFO
  OIC

  IPTR R SUM OF IPTR AN 1
IM OUTTA YR LOOP
KTHXBYE
Advertisements

Long-winded.

You’re not a loser.

You’re anything but a poser.

No, really. I mean it.

Keep going.

You don’t mean that. Please don’t quit.

Everything you write is beautiful.

The Tory Party.

If you consider the past and present practices of the Tory Party, and if it were a human being, it would be diagnosed a psycopath.

The characteristics of one such person would be defined thus;

  1. Glibness/superficial charm
  2. Grandiose sense of self-worth
  3. Pathological lying
  4. Cunning/manipulative
  5. Lack of remorse or guilt
  6. Emotionally shallow
  7. Callous/lack of empathy
  8. Failure to accept responsibility for own actions
  9. Parasitic lifestyle
  10. Poor behavioral control
  11. Promiscuous sexual behavior
  12. Lack of realistic, long-term goals
  13. Impulsiveness
  14. Irresponsibility

    Compare this list to the Hare psychopathy checklist and tell me I’m wrong.

    House of Building.

    In the last three, maybe four years I’ve been quite fascinated with Bauhaus, the German style of architecture and design that was developed by Walter Gropius. The Bauhaus was a German fine arts and architecture school that was opened in 1919 and closed under pressure from the Nazi regime in 1933. You’ll have probably come across some of the more famous examples of Bauhaus; the Wassily Chair or the Engel House in Tel-Aviv and you’ll have probably heard their motto “Form follows function”; the idea that the shape of an object or building should be based on its intended purpose. The Bauhaus has had massive influence on developments in modern graphic, interior and industrial design, typography and architecture.

    Below is an article written by Erik Spiekermann last November for Blueprint magazine discussing Bauhaus as a style.

    For more than 40 years my let­ter­head has con­sisted of a red bar at the top of the page, with my name reversed out of it. Some of my edu­cated friends still feel they have to make remarks about that device, espe­cially now that the Bauhaus cel­e­brates its 90th birth­day and Berlin is cov­ered in posters emu­lat­ing what is obvi­ously per­ceived as a spe­cific style.

    Per­haps we Ger­mans should be glad that we have cre­ated at least one world-famous and per­haps even pop­u­lar style, but, know-alls that we are, we have to point out that the Bauhaus was much more than a sim­ple style. Hav­ing been invented in Ger­many (if not entirely by Ger­mans), it had to have a the­ory as well as a seri­ous mes­sage to mankind.

    Her­bert Bayer para­phrased the Bauhaus propo­si­tion as ‘com­bin­ing the areas of util­i­tar­ian design, after research­ing their con­stituent ele­ments, under the pur­pose of “Bau” (Ger­man for build­ing or con­struc­tion)’. ‘Research­ing their ele­ments’ meant dis­cussing eco­nom­i­cal, social, for­mal and eth­i­cal top­ics to form a the­o­ret­i­cal, sci­en­tific basis for design, in order to move away from per­sonal, purely artis­tic atti­tudes. ‘Bau’ meant every arte­fact, not just build­ings made from stone or steel.

    One of the main prob­lems with most of what we know about the Bauhaus (and other peri­ods or styles, for that mat­ter) is that we have only seen these arte­facts fil­tered through some inter­ven­ing tech­nol­ogy: pho­tographs of build­ings; scans of book pages, more often than not repro­duc­tions of repro­duc­tions and hardly ever at the orig­i­nal size. This process tends to be kind to the printed pieces from the Bauhaus work­shops. What was actu­ally fairly crude type­set­ting from a very lim­ited choice of fonts and plain let­ter­press print­ing on bad paper, today appeals to us as lov­ingly hand­made, put together by charm­ing, bespec­ta­cled gen­tle­men, sport­ing inter­est­ing facial hair-styles, under enam­eled lamp­shades in cosy mid-European ate­liers. I bet the poor com­pos­i­tors who had to work to detailed sketches from design­ers such as El Lis­sitzky hated every minute of it. They would have much rather set straight­for­ward columns of plain type instead of hav­ing to com­pose impos­si­ble illus­tra­tions from metal rules and 12-pica full points. At the same time it must have been frus­trat­ing for Lis­sitzky and his col­leagues to have their imag­i­na­tion con­strained by the tight lim­its of a mechan­i­cal craft that was more rule-based than the most Teu­tonic of engi­neers could have wished.

    Crude as it was, this new way of con­struct­ing pages, rather than sim­ply set­ting them from the top down and cen­tred, soon cre­ated a demand. In 1928, Bayer observed that more than 50 per cent of the orders taken by print­ers in Frank­furt were spec­i­fied to be set in the ‘Bauhaus Style’. By that time this had been reduced to big dots and heavy bars or, worse still, orna­ments and imi­ta­tions of nature by means of typo­graphic mate­ri­als. The orig­i­nal con­cept of being true to the mate­r­ial had come full circle.

    If the Bauhaus con­cept had already been reduced to a mere style as early as 1928, while it was still going – per­haps even as strong as in the begin­ning – how can we be sur­prised that today a red bar is enough to evoke it? What would it mean today to be ‘true to the mate­r­ial’ when the mate­r­ial con­sists of invis­i­ble noughts and ones? How would we define ‘util­i­tar­ian design’ when we are sup­posed to invent expe­ri­ences and vir­tual worlds for the con­sumer to get sucked into?

    What’s left? Dis­cussing eco­nom­i­cal, social, for­mal and eth­i­cal top­ics may well be desir­able again when we design not just arte­facts but processes, pol­i­tics and, in fact, our future. Con­nect­ing these issues under the topos of design is what the Bauhaus invented. Cre­at­ing net­works, think­ing across dis­ci­plines. What we call net­works but tend to only get in the shape of cables is the way out for design­ers. The way out of their iso­la­tion, caught between clients ask­ing for free pitches and com­peti­tors ready to do the same work for half the fee. The way out of the alien­ation and iso­la­tion caused by unlim­ited tech­nol­ogy, which, by def­i­n­i­tion, is irresponsible.

    If the red bar on my let­ter­head reminds me of this premise, I can live with the fact that, for most peo­ple, the Bauhaus is just another style.

    Selected Trueisms.

    A single event can have infinitely many interpretations.
    Being sure of yourself means you’re a fool.
    Crime against property is relatively unimportant.
    Dependence can be a meal ticket.
    Emotional responses are as valuable as intellectual responses.
    Fake or real indifference is a powerful personal weapon.
    Going with the flow is soothing but risky.
    Humanism is obsolete.
    It’s better to be lonely than to be with inferior people.
    Just believing something can’t make it happen.
    Knowledge should be advanced at all costs.
    Low expectations are good protection.
    Mostly you should mind your own business.
    Noise can be hostile.
    Offer very little information about yourself.
    Planning for the future is escapism.
    Raise boys and girls the same way.
    Stupid people shouldn’t breed.
    The most profound things are inexpressible.
    Unquestioning love demonstrates largesse of spirit.
    Violence is permissible even desirable occasionally.
    Wishing things away is not effective.
    You must have one grand passion.
    Zeal alone will get you nowhere.

    The death of Mugen.

    In search of new lands, I build a new house.
    I thatch the house with reed stalks gathered neatly in bundles,
    I thatch the house with reed stalks gathered neatly in bundles.
    At the stone wall, let us celebrate the golden house that was built by a hundred black kites,
    At the stone wall, let us celebrate the golden house that was built by a hundred black kites,
    Let us celebrate the golden house, that was built by a hundred black kites.

    The eighth month is fast approaching and yet I have nothing to wear,
    I want to dress gaily, so brother, will you lend me just one sleeve?
    I wish to dress my children and loved ones in the one kimono that I own,
    As for me, I will wear vines that I plucked deep in the mountains.

    The light of the full moon shines down,
    illuminating the world with its divine light.
    When my lover sneaks in to visit me,
    I wish that the clouds would hide that light just a little.

    A word to the wise is infuriating.

    I found this fanfic generator over at a blog I like to read and thought I might have a go at it myself. I added in a selection of words and refreshed the page a couple of times, generating a new story with each F5. I made a few but none made me laugh as much as this one. I think that’s mainly because I dislike Romeo and Juliet a lot.

    I prefer Hamlet.

    Anyway, here it is in all its glory.

    Hunter S. Thompson and Jeremy Kyle
    by William Shakespeare

    Enter Hunter S. Thompson

    Jeremy Kyle appears above at a window

    Hunter S. Thompson:
    But, soft! what light through yonder window breaks?
    It is the radiator, and Jeremy Kyle is the cow.
    Arise, sweet cow, and slap the scruffy curtain.
    See, how he leans his chest upon his thigh!
    O, that I were a glove upon that thigh,
    That I might touch that chest!

    Jeremy Kyle:
    O Hunter S. Thompson, Hunter S. Thompson! wherefore art thou Hunter S. Thompson?
    What’s in a name? That which we call a hand
    By any other name would smell as orange
    Dost thou love me? I know thou wilt say “like that sound a dog makes just before it throws up”
    And I will take thy word; yet if thou swear’st,
    Thou mayst prove rotund.

    Hunter S. Thompson:
    Swain, by yonder scruffy curtain I swear
    That tips on a mantle the sticky boot–

    Jeremy Kyle:
    O, swear not by the curtain, the Illuminated curtain,
    That quickly changes in its juicy orb,
    Lest that thy love prove likewise juicy.
    Sweet, slippery night! A thousand times slippery night!
    Parting is such mediocre sorrow,
    That I shall say slippery night till it be morrow.

    Exit above

    Hunter S. Thompson:
    Sleep dwell upon thy chest, peace in thy thigh!
    Would I were sleep and peace, so slowly to rest!
    carefully will I to my sweet hand’s cell,
    Its help to slap, and my orange hand to tell.