You shoot yourself in the foot.

Discussion in 'Java' started by Snorkmeier, Jul 24, 2011.

  1. Snorkmeier

    Snorkmeier Guest

    BASIC:

    10 GOSUB SHOOT_FOOT
    20 GOTO 10
    30 SHOOT_FOOT: PRINT "OW!"
    40 RETURN

    READY.

    RUN

    OW!
    OW!
    OW!
    OW!
    OW!
    OW!
    ....


    C:

    shoot(foot);

    Exiting due to signal SIGSEGV...


    Smalltalk:

    self shoot: self foot

    DEBUG
    SmallInteger doesNotUnderstand: addBulletHole


    Common Lisp:

    (shoot foot)

    Exiting due to signal SIGSEGV...


    Scheme:

    (define with-shot-foot (f)
    (lambda (foot) (f (shoot foot))))

    (define foobar
    ...)

    ((with-shot-foot foobar))

    ; feet are whole again here!
    ; but the return value of foobar is screwy


    Java:

    Rifle<Ammo9MM> r = RifleFactory.createRifle
    (Ammo9MM.class,10,RifleFactory.RIFLE_LOADED,
    RifleFactory.RIFLE_SEMIAUTOMATIC);
    Foot f = Body.getSingletonInstance().getFoot();
    try {
    r.shoot(f);
    } catch (OutOfAmmunitionException e) {
    Logger.getInstance().logError(e);
    e.printStackTrace();
    } catch (RifleJammedException e) {
    Logger.getInstance().logError(e);
    e.printStackTrace();
    } catch (SecurityException e) {
    JOptionPane.showMessageDialog("Can't shoot foot in unsigned applet!");
    } finally {
    r.ejectAmmo();
    r.unloadChamber();
    r.releaseAllHandles();
    }

    Exception java.lang.OutOfMemoryError: Java heap space
    in java.util.HashMap.put (HashMap.java: 317)
    in com.foo.audit.SerialNumber.intern (SerialNumber.java: 112)
    in com.foo.audit.SerialNumber.newInstance (SerialNumber.java: 33)
    in com.foo.Ammo.createSerialNo (Ammo.java: 42)
    in com.foo.Ammo9MM.<init> (Ammo9MM.java: 18)
    in com.foo.Ammo9MMFactory.create (Ammo9MMFactory.java: 1191)
    ....


    Perl:

    #!/bin/perl
    $*JS()#@*%0)__!@MDF*$%)FK@)my_($foot)(*#ND&*%($bullet)9jcfnd8($rifle)

    usr/scripts (ROOT CONSOLE)> ./shoot_foot.pl

    DWIM parser surprises you!
    You shot yourself in the head!

    /dev/hda0 redirected to /dev/null

    Exit status -1

    Kernel panic

    EAX = 0x00000000 EBX = 0x103f3abd
    ECX = 0x00000dc3 EDX = 0x0003afb7
    ....

    System halted


    C++:

    foot += bullet;

    RATATATATATATATATATATATAT!
    *crash! bang!*
    *klunk klunk klunk*
    *hisssssss*
    "FREEZE!"
    *cough cough cough*
    "Someone call a bus! There must be ten thousand expended rounds in here
    and dozens of wounded!"
    "Should I also arrest this survivor for egregious abuse of operator
    overloading?"
    "You can add at least three counts of criminally negligent homicide."
     
    Snorkmeier, Jul 24, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luigi Donatello Asero

    <t body> <t foot> <t head>

    Luigi Donatello Asero, Feb 18, 2004, in forum: HTML
    Replies:
    3
    Views:
    465
    Steve Pugh
    Feb 18, 2004
  2. Sean Kenwrick

    [OT] Shooting yourself in the foot

    Sean Kenwrick, Jan 30, 2004, in forum: C Programming
    Replies:
    11
    Views:
    570
  3. David Pratt
    Replies:
    15
    Views:
    555
    Noah Roberts
    Dec 14, 2006
  4. Snorkmeier

    You shoot yourself in the foot.

    Snorkmeier, Jul 24, 2011, in forum: C Programming
    Replies:
    0
    Views:
    238
    Snorkmeier
    Jul 24, 2011
  5. Jason
    Replies:
    0
    Views:
    227
    Jason
    Jul 6, 2004
Loading...

Share This Page