Thursday, October 04, 2007

Tory Conference Quote To End All Quotes

Via Caroline Hunt, the Quote of the Day from Dizzy.
"Sometimes I have to adjust my balls because they hang to the left and I worry they might be ideologically unsound."

But being Dizzy, he doesn't have to do it himself, he has written a script to do it; it'll be something like this, I imagine.
  1. IF {balls}=[align: left] GOTO 3 ELSE GOTO 2

  2. IF TIME ELAPSED=30 GOTO 1

  3. MOVE {right_hand} TO {balls} GOTO 4

  4. CUP {balls} WITH {right_hand} GOTO 5

  5. MOVE {balls} + SHIFT {right_leg [surrepticiously]} GOTO 6

  6. LOCK {balls}=[align: right] GOTO 7

  7. SOUND={"GRUNT" [contentedly]} GOTO 8

  8. IF TIME ELAPSED=30 GOTO 1

Your humble Devil never actually has this problem, as his Lefty side has utterly withered away...

UPDATE: chris suggests using a Python script...
import time
from people import RIGHT, man, grunt

while(man.clothed):
try
if man.balls.align != RIGHT:
man.balls.align = RIGHT
man.speak(grunt.SATISFIED)
except:
if man.balls == None:
man.panic()
break
time.sleep(30)

Yes, that's quite elegant. Any more coders out there who fancy interpreting Dizzy's ball-shufflings in something different? Javascript perhaps? Ruby? FORTRAN?

UPDATE 2: some Terminal script from Dizzy.
#!/bin/bash

read balls
if [ $balls != "right" ]
then
balls=right
echo "SOUND!"
else
echo "SOUND!"
fi

Any more for anymore?

UPDATE 3: another good effort from Ingram.
--PL/SQL:

HAND := 0;

SELECT COUNT(BALLS) INTO HAND
FROM NUTSACK
GROUP BY BALLS
HAVING DANGLE = 'LEFT';

IF HAND > 0 THEN
SWINGEMBACK();
END IF;

CREATE OR REPLACE PROCEDURE "SWINGEMBACK"
AS
BEGIN
UPDATE NUTSACK SET DANGLE = 'RIGHT';
COMMIT();
EXCEPTION
WHEN NO_BALLS_FOUND THEN
JOIN_LIB_DEMS;
END;

I particularly like the last few lines...

UPDATE 4:
another one from FOPhillips.
.BEGIN

BALLS: 0xDEAD
RIGHT: 0x0145
LEFT: 0x0144

LDA BALLS ; load balls
JPL A ; jump to A if left
JPU B ; jump to B unconditionally
A:
MOV BALLS,RIGHT
JPU B
B:
HLT

.END

I like these, so I have moved the post up...

UPDATE 5: one in Erlang, from Roger.
rummage(Nutsack) ->
receive
{grab_left} ->
Nutsack#.Left = hold,
Nutsack#.Right = let_go,
rummage(Nutsack);
{grab_right} ->
Nutsack#.Right = hold,
Nutsack#.Left = let_go,
rummage(Nutsack);
{scratch} ->
Nutsack#.Owner ! {scratch(Nutsack)},
rummage(Nutsack)
end.

Keep 'em coming! Let's see if we can break the world record for the number of codes we can describe Dizzy's testicle-wrestling in...

UPDATE 6: a swifty from Sam.
%!
newpath
balls left eq {balls hold 200 0 rmoveto} if
stroke

And a PHP/MySQL effort from Shug Niggurath.
$ballhang = $_POST['h'];

$SQL = mysql_query("SELECT hand FROM dizzy_body WHERE hand = 'free' ORDER BY sinister LIMIT 1");
$hand = mysql_fetch_array($SQL);
$jiggle = 'pocket';
if ($ballhang == 'left') {
// tell brain what to do
echo $jiggle.$hand.$ballhang;
$ballhang = 'right';
} else {
$demeanour = 'all good';
exit;
}

Excellent...

UPDATE 7: and still they pour in, with Peter Risdon suggesting this...
switch ($balls) {
case "right":
print "Ahhhh...";
case "left":
break;
}

... and also a very terse *nix command line order.
sed 's/left/right/' trousers.rearranged

Meanwhile, self-confessed "old-timer" Fitaloon decided that what was really needed was a Cobol programme.
IDENTIFICATION DIVISION.
PROGRAM-ID. ConservativeBalls.
AUTHOR. Fitaloon

DATA DIVISION.
WORKING-STORAGE SECTION.
01 BallsPosition.
03 BallSide PIC X(5).
88 Balls-correct value "Right".
88 Balls-Incorrect Value "Left"
01 Ballstoright
03 Ballsright pic x(5) value "Right".


PROCEDURE DIVISION.
Begin.
DISPLAY "Enter Balls Position Left or Right".
ACCEPT BallsPosition.
If Balls-incorrect
move Ballstoright to Ballsposition.
Display "Balls in correct Position".
STOP RUN.

Ah, geek humour...

17 comments:

View from the Solent said...

'Your humble Devil never actually has this problem, as his Lefty side has utterly withered away...'

I want to make a comment on that, but Godwin's Law gets in the way.

dizzy said...

Ooooooh BASIC.. very retro

anthonynorth said...

Well I'm so right I walk with a hobble.

the a&e charge nurse said...

And the right one seems to be firing blanks judging by your recent guff on "socialism".

chris said...

don't you know GOTO is considered harmful, so do you want that around your {balls}. How about a nice friendly Python instead.

import time
from people import RIGHT, man, grunt
  
while(man.clothed):
  try
    if man.balls.align != RIGHT:
      man.balls.align = RIGHT
      man.speak(grunt.SATISFIED)
  except:
    if man.balls == None:
      man.panic()
      break
  time.sleep(30)

Ingram said...

--PL/SQL:

HAND := 0;

SELECT COUNT(BALLS) INTO HAND
FROM NUTSACK
GROUP BY BALLS
HAVING DANGLE = 'LEFT';

IF HAND > 0 THEN
SWINGEMBACK();
END IF;

CREATE OR REPLACE PROCEDURE "SWINGEMBACK"
AS
BEGIN
UPDATE NUTSACK SET DANGLE = 'RIGHT';
COMMIT();
EXCEPTION
WHEN NO_BALLS_FOUND THEN
JOIN_LIB_DEMS;
END;

Fophillips said...

.BEGIN

BALLS: 0xDEAD
RIGHT: 0x0145
LEFT: 0x0144

LDA BALLS ; load balls
JPL A ; jump to A if left
JPU B ; jump to B unconditionally
A:
MOV BALLS,RIGHT
JPU B
B:
HLT

.END

Roger Thornhill said...

In Erlang:

rummage(Nutsack) ->
receive
{grab_left} ->
Nutsack#.Left = hold,
Nutsack#.Right = let_go,
rummage(Nutsack);
{grab_right} ->
Nutsack#.Right = hold,
Nutsack#.Left = let_go,
rummage(Nutsack);
{scratch} ->
Nutsack#.Owner ! {scratch(Nutsack)},
rummage(Nutsack)
end.

Sam said...

Hmm.

%!
newpath
balls left eq {balls hold 200 0 rmoveto} if
stroke

Shug Niggurath said...

php / mySQL

$ballhang = $_POST['h'];

$SQL = mysql_query("SELECT hand FROM dizzy_body WHERE hand = 'free' ORDER BY sinister LIMIT 1");
$hand = mysql_fetch_array($SQL);
$jiggle = 'pocket';
if ($ballhang == 'left') {
// tell brain what to do
echo $jiggle.$hand.$ballhang;
$ballhang = 'right';
} else {
$demeanour = 'all good';
exit;
}

Peter Risdon said...

switch ($balls) {
case "right":
print "Ahhhh...";
case "left":
break;
}

Peter Risdon said...

Or to be terse on the *nix command line:

sed 's/left/right/' <trousers > trousers.rearranged

Fitaloon said...

I'm an old timer so Cobol it will have to be and I haven't written a Cobol programme in a few years so excuse the errors.

IDENTIFICATION DIVISION.
PROGRAM-ID. ConservativeBalls.
AUTHOR. Fitaloon

DATA DIVISION.
WORKING-STORAGE SECTION.
01 BallsPosition.
03 BallSide PIC X(5).
88 Balls-correct value "Right".
88 Balls-Incorrect Value "Left"
01 Ballstoright
03 Ballsright pic x(5) value "Right".


PROCEDURE DIVISION.
Begin.
DISPLAY "Enter Balls Position Left or Right".
ACCEPT BallsPosition.
If Balls-incorrect
move Ballstoright to Ballsposition.
Display "Balls in correct Position".
STOP RUN.

guido faux said...

what no c?

void balldeology(bollock_t *myBalls){
if(!myBalls) {
   syslog(LOG_EMERG, "FUUUUUUUUUUUUUCK");
   exit(1);
}
if(myBalls->position != RIGHT) {
   if(debug) {
     syslog(LOG_DEBUG, "Adjusting ...");
   }
   myBalls->position = RIGHT;
   syslog(LOG_NOTICE, "Hmmmm");
   if(!strcmp(getenv("WHOAMI_TALKING_TO"), "FEMALE")) {
     eyebrows(RAISE,2);
   }
}

}

chris said...

here it is again in Lisp, this time tail recursive (boomb boomb)

(define scratch
(if (> (count ladies-present) 2)
((if (= NUTS LEFT)
(set! NUTS RIGHT))
(sleep 30)
scratcth)))

wonkotsane said...

Visual Basic ...

Dim oBalls(1) As Object

Set oBalls(0) = LeftTestical
Set oBalls(1) = RightTestical

If oBalls(1).Left < ScrotalArea.Width / 2 Then

oRightHand.Top = oBalls(0).Top + oBalls(0).Height
oRightHand.Left = oBalls(0).Left
Call CupHand(True)
oRightHand.Left = oBalls(0).Left + ((ScrotalArea.Width / 2) + (ScrotalArea.TwipsPerPube * 10))
Call CupHand(False)
Call MsgBox("Ahh, much better!", vbOkOnly + vbExclamation, "Balls Moved")

Else

Call MsgBox("Balls already right-aligned!", vbOkOnly + vbInformation, "Balls Not Moved")

End If

Fophillips said...

Brainfuck:

>[-]>>[-]>>>[<<<+<<+>>>>>-]<<<<<[>>>>>+<<<<<-]+>>[<<->>[-]]<<[>>[>>>+<<+>>>>>>>-]<<<<<<<<<-]