>Do Not RUN

16 Jan

>10 TIE ME KANGAROO DOWN
20 MATE
30 GOTO 10
40 END

Just promise me the offspring won’t be allowed to run wild. Kthxbye.

(Cybrus suggests an expansion, thusly:
10 ON (KANGAROO = DEAD) GOTO 50
20 TIE ME KANGAROO DOWN
30 MATE
40 GOTO 10
50 SKIN KANGAROO
60 TAN KANGAROO HIDE
70 INFORM CLYDE
80 HANG ON SHED: KANGAROO HIDE
90 INFORM NED
100 END
I have to point out that if you encounter an immortal kangaroo, you’re still stuck in a loop. Also it requires a non-standard version of BASIC.)

It has been suggested that this is cleaner programming:

DO UNTIL KANGAROO = DEAD
TIE ME KANGAROO DOWN
MATE
LOOP
SKIN KANGAROO
(…identical to beta s/w from here to END…)

Advertisements

33 Responses to “>Do Not RUN”

  1. Carteach0 16 January 2011 at 7:13 am #

    >So wrong. So….. basic.

  2. Roberta X 16 January 2011 at 7:18 am #

    >Yes, GOTO loops are always wrong.

  3. cybrus 16 January 2011 at 7:27 am #

    >So we tanned his hide when he died, Clyde. That's him hangin' on the shed!

  4. Roberta X 16 January 2011 at 7:44 am #

    >Ah!10 ON KANGAROO = DEAD GOTO 5020 TIE ME KANGAROO DOWN30 MATE40 GOTO 1050 SKIN KANGAROO60 TAN KANGAROO HIDE70 INFORM CLYDE80 HANG HIDE ON SHED90 INFORM NED100 END

  5. Anonymous 16 January 2011 at 9:35 am #

    >An immortal kangaroo can only be found in a pocket universe.Antibubba

  6. CGHill 16 January 2011 at 9:45 am #

    >I probably should not mention that Rolf Harris also did cover versions of "Bohemian Rhapsody" (!) and "I Touch Myself" (!!).

  7. D.W. Drang 16 January 2011 at 11:31 am #

    >I used to like that song…

  8. Carteach0 16 January 2011 at 4:36 pm #

    >Where is the if/then statement in the tree which describes the 'dead' kangaroo variant?Sheeesh… tighten it up! Loops and dead code are basically incorrect.

  9. Roberta X 16 January 2011 at 5:56 pm #

    >Then: DO UNTIL KANGAROO = DEAD TIE ME KANGAROO DOWN MATE LOOP SKIN KANGAROO (…identical to beta s/w from here to END…)

  10. Stingray 17 January 2011 at 12:13 am #

    >Now we just need to cover the case where my boomerang won't come back.

  11. BobG 17 January 2011 at 1:30 am #

    >"Now we just need to cover the case where my boomerang won't come back."It is written in Basic, and Basic doesn't support a recursive function, so your boomarang is gone, John.Word verification: eightholA new kind of alcohol?

  12. Nathan 17 January 2011 at 2:26 am #

    >Or,WHILE KANGAROO = ALIVE  TIE ME KANGAROO DOWN  MATEWENDSKIN KANGAROOetc.Or, since I've been elbow-deep in PHP since early this morning,while (kangaroo) {  tie (kangaroo, me, down);  mate();}skin(kangaroo);while (!hide_tanned) {  tan(kangaroo, hide);}echo "kangaroo hide tanned, clyde!";while (!hide_hung_on_shed) {  hang(hide);}echo "kangaroo hide hung, ned!";exit();

  13. Anonymous 17 January 2011 at 3:38 am #

    >SPOKEN: There's an old Australian stockman lying, dying. He gets himself uponto one elbow and 'e turns to his mates, who are all gathered around and 'e says:Watch me wallabies feed, mateWatch me wallabies feed,They're a dangerous breed, mateSo watch me wallabies feedAltogether now!CHORUS:Tie me kangaroo down, sportTie me kangaroo downTie me kangaroo down, sportTie me kangaroo downKeep me cockatoo cool, Curl,Keep me cockatoo coolAh, don't go acting the fool, CurlJust keep me cockatoo coolAltogether now!(CHORUS)'n' take me koala back, JackTake me koala backHe lives somewhere out on the track, MacSo take me koala backAltogether now!(CHORUS)Let me abos go loose, LewLet me abos go looseThey're of no further use, LewSo let me abos go looseAltogether now!(CHORUS)And mind me platypus duck, BillMind me platypus duckAh, don't let 'im go running amok, BillJust mind me platypus duckAltogether now!(CHORUS)Play your didgeridoo, BluePlay your didgeridooAh, like, keep playin' 'til I shoot thru, BluePlay your didgeridooAltogether now!(CHORUS)Tan me hide when I'm dead, FredTan me hide when I'm deadSo we tanned his hide when he died, ClydeAnd that's it hangin' on the shed!!Altogether now!ROLF HARRIS, 1963per bRUCEcrankyoldmanwithgun@yahoo.com

  14. Roberta X 17 January 2011 at 5:09 am #

    >H'mmm:100 INPUT N 'HOW MANY WALLBIES ARE THERE?'200 REM 'N=NUMBER OF WALLABIES'300 IF N<2 THEN GOTO 900400 INPUT $S 'ARE THEY FEEDING?'500 IF $S=NO THEN GOTO 900600 PRINT "CONTINUES WATCHING WALLABIES. WARNING: THEY ARE DANGEROUS."700 MATE800 GOTO 100GOSUB 900900 REM 'CHORUS. MAY NEED TO MOVE TO END OF PROGRAM'1000 FOR I = 1 TO 21100 TIE KANGAROO DOWN1200 ENGAGE IN ORGANIZED ATHLETIC COMPETITION1300 TIE KANGAROO DOWN1400 NEXT1450 RETURN1500 INPUT M "WHAT IS TEMPERATURE OF COCKATOO?"1600 IF M > 68 THEN GTO 21001700 PRINT "BEHAVE IN A SHORT-SPOKEN, SOMEWHAT HOSTILE MANNER"1800 INPUT M "WHAT IS TEMPERATURE OF COCKATOO?"1900 IF M > 68 THEN GOTO 21002000 GOTO 15002100 GOSUB 900(etc.)

  15. Borepatch 17 January 2011 at 5:10 am #

    >Two comments:1. GOTO considered harmful.2. Ozzie drinking songs considered harmful.And in one of my file folders (on dead trees), I have some code showing how to write C in Ada. That, too, is considered harmful.I guess that's three comments. I'm now blogging at http://thespanishinquisition.blogspot.com

  16. Roberta X 17 January 2011 at 5:22 am #

    >Unexpected.

  17. Roberta X 17 January 2011 at 5:22 am #

    >…I ended up with icky little DO loops last time I tried actual BASIC-esque work…

  18. Carteach0 17 January 2011 at 5:26 am #

    >This comment thread has fallen off the geek end…. er…. I mean the deep end.I say this as someone who has actually written code via punch cards once.Only once.

  19. Nathan 17 January 2011 at 6:59 am #

    >I was going to translate it to REXX but then something in my head said, "Dude…nobody cares" 🙂

  20. Living in Babylon 17 January 2011 at 6:01 pm #

    >One is forced to wonder if there is a word for "The Sensation of Finding Something Hilarious But Being Slightly Embarrassed You Find It Hilarious." Whatever it is, I have it.

  21. Don 17 January 2011 at 6:10 pm #

    >I don't know what REXX is, but in this crowd you've probably got a shot at finding someone who cares.

  22. John 17 January 2011 at 6:43 pm #

    >This seems like a natural application of functional programming, to me. I may just be in that (unfortunate? long-delayed?) stage of my development.

  23. TXGunGeek 17 January 2011 at 7:06 pm #

    >Like FORTRAN so much better.At work we still run FORTRAN, in a DOS shell on a Win97 Pentium 1 box!

  24. ViolentIndifference 17 January 2011 at 7:15 pm #

    >Wow, Roberta. Writing code in BASIC in a blog for amusement. You just got a lot cooler to me.Which is kinda a bad reflection on me.Oh well.

  25. dantesfiringrange 17 January 2011 at 9:32 pm #

    >- Out of Cheese Error – +++ Redo From Start +++.

  26. Old Grouch 17 January 2011 at 11:50 pm #

    >xbase:set talk offclearkcount = 1       &&integer, number of kangaroos, max 28verse = 1        &&integer, verse number (1..6,7)finished = .f.   &&logical, program runner* Main program starts heredo while (finished=.f.)  do case    case (stockman = dying)      do case        case (verse=1)          count=1          do while !(count < number_wallabies)            do watch_feed(count)            count=(count+1)            loop            * They're a dangerous breed, mate          enddo        case (verse=2)          do while (cockatoo=hot)            do cool_cockatoo            loop          enddo          if (Curl_acting_fool=.t.)            * Throw an error?          endif        case (verse=3)          .          .          .        case (verse=6)          if (digeridoo_playing=.f.)            do start_digeridoo          endif        case (verse>6)          * "I'm not dead yet!"          loop      endcase      verse = verse+1    case (stockman = dead)      * —————————————————————-      * Note from QC:      * Rewrite to make sure we did all verses before (stockman=dead)      * Thanks      * —————————————————————-      if (digeridoo_playing=.t.)        do stop_digeridoo      endif      if !(hide=tanned)        do tan_hide &&It's HIS hide, not the kangaroo's!        ! "So we tanned his hide when he died, Clyde."        loop      else        do hang_on_shed        ! "and that's it hangin' on the shed!"      endif      finished=.t.   &&We're done!      otherwise     * "I'm alive and doin' fine!"     loop  endcase    chorus  loopenddoreturn* Main program ends hereprocedure chorus* Sung 7 times, four kangaroos each  loop=1  * 1-dimensional matrix of kangaroos, kangaroo(n)  do while (loop<3)   &&i.e., twice    if !(kangaroo(kcount)=tied)      do tie_kangaroo_sport(kangaroo(kcount))    endif    if !(kangaroo(kcount+1)=tied)      do tie_kangaroo_notsport(kangaroo(kcount+1))    endif    kcount=(kcount+2)    loop=(loop+1)  enddoreturn

  27. SFlorman 18 January 2011 at 1:04 am #

    >It's "Tie me kangaroo down, SPORT," not "mate." But the intent is appreciated.And the other verse:"Mind me platypus duck, Bill,Mind me platypus duck,Don't ye let 'im go runnin' in the muck, now, Bill;Mind me platypus duck!All together now . . ." (etc.)(Oh. I see someone else has the Rolf Harris album. 🙂 )

  28. Tam 18 January 2011 at 2:54 am #

    >SFlorman,"It's "Tie me kangaroo down, SPORT," not "mate." But the intent is appreciated."Yes, but that's not funny. ;)(WV: "whinnesm" After which, the horse lights a cigarette…)

  29. Nathan 18 January 2011 at 3:20 am #

    >@Don, REXX is an English-like programming language designed by Michael Cowlishaw back in the 1980s. It was intended for IBM mainframes but has been ported to various other platforms.I still use it on the z/VM box we run at work and used to use the Windows port (known as Regina) extensively for things that couldn't be easily scripted in the DOS batch command language.

  30. ViolentIndifference 18 January 2011 at 3:27 am #

    >Nathan: I used to use REXX on old DOS PS. Switched to using AWK and also a language called 'builder' that would make batch/script files that you could run interactively. Could set up an interface that looked just like the old TurboC 80×25 block-graphic IDE.Ah. Those were the days.

  31. Joseph 18 January 2011 at 6:06 am #

    >Ok, folks…now in Binary Code…(which, once upon a time, I could read and write)This is so geeky…and hilarious. Does that mean I am a hilarious geek??WV..troutor

  32. Anonymous 19 January 2011 at 3:24 am #

    >I'd like to re-write the thing in Haskell, but I don't think I have the monads to pull it off.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: