FUN: HOW TO SHOOT ... (<< >>) ______ How to Determine Which Programming Language You're Using (__ __) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ / / / / (_/he proliferation of modern programming languages which seem to have stolen countless features from each other sometimes makes it difficult to remember which language you're using. This guide is offered as a public service to help programmers in such dilemmas. C: You shoot yourself in the foot. C++: You accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical care is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying, "that's me, over there." Access: You try to point the gun at your foot, but it shoots holes in all your Borland distribution diskettes instead. ADA (and Ironman and Tinman and Woodman and Strawman): If you are dumb enough to actually use this language, the Unites States Department of Defense will kidnap you, stand you up in front of a firing squad, and tell the soldiers: "Shoot at his feet". or After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream and shoot yourself in the foot. When you try, however, you discover that your foot is of the wrong type. Algol: You shoot yourself in the foot with a musket. The musket is esthetically fascinating, and the wound baffles the adolescent medic in the emergency room. The medic stabs himself in the foot with the bayonet and gives up. Altair: I was so tired of making the gun that I never got around to shooting myself in the foot. Amiga (see Atari ST): I pirated an even better game where I could be shooting myself in both feet concurrently way back in 1985! APL: You hear a gunshot; you see a hole in your foot! But you don't remember enough linear algebra to understand what the hell just happened to you. APL (alternate): You shoot yourself in the foot, and then spend all day figuring out how to do it in fewer characters (like: GN % FT ^ BLT) APL (alternate): @#&^$%&%^ foot Apple ][: We don't advocate violence, but we will sell you a BB gun. Apple System 7: Double click the gun icon and a window giving a selection for guns, target areas, plus ballon help with medical remedies, and assorted sound effects. Click shoot button and small bomb appears with note "Error of type 1 has occurred." APT: You cut a perfect bullet hole in your foot, and shoot through it. [Note to the uninitiated: APT is the oldest computer language currently in use - Automatic Programming of Tools.] Assembly: You crash the OS and overwrite the root disk. The system administrator arrives and shoots you in the foot. After a moment of contemplation, the administrator shoots himself in the foot and then hops around the room, rabidly shooting at everyone in sight. or You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot. Atari ST: I pirated a great game where Sam Tramiel shoots himself in the foot. BASIC (interpreted): Shoot self in foot with water pistol. On big systems, continue until entire lower body is waterlogged. BASIC (compiled): You shoot yourself in the foot with a BB using a SCUD missile launcher. BCPL: You shoot yourself somewhere in the leg - you can't get any finer resolution than that. Bridge Toolkit: In order to shoot yourself in the foot, you must constantly consult the manual to determine which of the commands actually have bullets in them, and which contain only blanks. CLIPPER: You grab a bullet, get ready to insert it in the gun so that you can shoot yourself in the foot, and discover that the gun that the bullet fits has not yet been built, but should be arriving in the mail _REAL_SOON_NOW_. COBOL: USING "A" COLT-45 OF HANDGUN, AIM, GUN-AT-LEG-FOOT. MOVE FINGER(INDEX) OF HAND OF ARM OF BODY TO TRIGGER OF HANDGUN. PERFORM SQUEEZE-TRIGGER THRU RETURN-HANDGUN-TO-HOLSTER VARYING BULLETS FROM MAGAZINE BY NUMBER-SHOT UNTIL BULLETS-ARE-GONE. NOTE CHECK TO SEE WHETHER SHOELACE NEEDS TO BE RETIED. COBOL (alternate): USE HAND-GUN.COLT(45), AIM AT LEG.FOOT, THEN PLACE ARM.HAND.FINGER ON HAND-GUN.COLT(TRIGGER), PERFORM SQUEEZE. RETURN HAND-GUN.COLT TO HIP.HOLSTER. CHECK SHOELACE (TIED). Cognos QUIZ: ACCESS *BULLETS LINK TO GUN SELECT IF CHAMBER1 OF GUN NE " " REPORT SUMMARY CHAMBER1 SORTED D SET SUB NAME LEFTFOOT SET REPORT LIM 1 GO (This will work ok, but you forgot to keep the subfile you created. Bummer.) Concurrent Euclid: You shoot yourself in somebody else's foot. CP/M: I remember when shooting yourself in the foot with a BB gun was a big deal. CSWIL (Common S/W industry language, Often called CS-SWILL): Ready! Fire! Aim! (Sometimes the user gets lucky and actually hits a market for the product) dBASE: You buy a gun. Bullets are only available from another company, and are promised to work, so you buy them. Then you find out that the next version of the gun is the one that is scheduled to actually shoot bullets. or You squeeze the trigger, but the bullet moves so slowly that by the time your foot feels the pain you've forgotten why you shot yourself anyway. DBase IV version 1.0: You pull the trigger, but it turns out that the gun was a poorly- designed grenade and the whole building blows up. Eagle: So I stole the bullets. So what? I'm still limping, aren't I? English: You put your foot in your mouth, then bite it off. (For those who don't know, English is a McDonnell Douglas/PICK query language which allegedly requires 110% of system resources to run happily.) FidoNet: You put your foot in your mouth, then echo it internationally. FORTH: Foot in yourself shoot. FORTH (alternate): BULLET DUP3 * GUN LOAD FOOT AIM TRIGGER PULL BANG! EMIT DEAD IF DROP ROT THEN (This takes about five bytes of memory, executes in two to ten clock cycles on any processor and can be used to replace any existing function of the language as well as in any future words). (Welcome to bottom up programming - where you, too, can perform compiler pre-processing instead of writing code) 4th Dimension: The foot-bone is connected to the anklebone, the anklebone is connected to the gunbone... pull trigger and shoot self in the gun. 4th Dimension (Multiuser): Before you shoot yourself in the foot, make sure that everyone else has loaded their guns, then check to see if you have enough bullets left over to load your gun, then pull the trigger. Move your foot into the path of the bullet, wiggle your toes, wait for all the other users to check the velocity of the bullet. 4th Dimension Server: Simultaneously shoot all the users in the foot, without having to carry the entire gun and spare ammo to each foot, sometime in the first quarter of '95. FORTRAN: You shoot yourself in each toe, iteratively, until you run out of toes, then you read in the next foot and repeat. If you run out of bullets, you continue anyway because you have no exception-processing ability. Genetic Algorithms: You create 10,000 strings describing the best way to shoot yourself in the foot. By the time the program produces the optimal solution, humans have evolved wings and the problem is moot. HyperCard: On ShootFoot Bang End ShootFoot HyperTalk: Put the first bullet of the gun into foot left of leg of you. Answer the result. INFORMIX: The first gun doesn't work. Three months later INFORMIX's support desk send another gun which doesn't match the version number of the bullets. INFORMIX suggest you upgrade to INFORMIX-ONLINE. You pull the trigger and you shoe gets wet. INGRES: You pull the trigger, and your identical twin in San Franciso gets shot. You then turn off distributed query optimisation. 370 JCL: You shoot yourself in the head just thinking about it. or You send your foot down to MIS with a 4000-page document explaining how you want it to be shot. Three years later, your foot comes back deep-fried. LISP: You shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds... Macintosh: You want to try shooting yourself in the foot, but the programmers didn't think it was an intuitive operation so the warning alert that comes up has only a "Cancel" button. Click it and a System Error occurs. The programmers shot themselves in the foot. Besides, rather than shooting yourself in the foot, Apple recommends that you drop a heavy toolbox on your foot instead. Modula/2: You perform a shooting on what might be currently a foot with what might be currently a bullet shot by what might be currently a gun. After realizing that you can't actually accomplish anything in the language, you shoot yourself in the head. Motif: You spend days writing a UIL description of your foot, the trajectory, the bullet, and the intricate scrollwork on the ivory handles of the gun. When you finally get around to pulling the trigger, the gun jams. MSDOS: You shoot yourself in the foot, but can unshoot yourself with the NORTON UTILITIES. or You finally found the gun, but can't locate the file with the foot for the life of you. MS-DOS Batch: loadhigh gun.exe echo bullet | gun >> foot.toe goto hospital :hospital find /i "bullet" foot.toe > bullet.txt del bullet.txt recover c: exit (p.s. The curious individual may wish to note the judicious use of ">>" vs. ">" . ">>" appends the output of GUN to FOOT.TOE, whereas ">" would have blown FOOT.TOE off completely.) (p.p.s. It may also be worth noting that GUN is an executable.) Netware: Fire phasers into foot three times. Neural Networks: You train the network in how to shoot your foot, after which it generalizes and keeps trying to locate some guy named Connor on the net... OCCAM: You send a message to your finger, which sends a message to the trigger, which sends a message to the firing pin, which sends a message to the primer, which sends a message to the firing charge, which sends a message to the bullet which sends a very unpleasant message to your foot. The pipeline continues to run, a hail of bullets emerging from the output channel and drilling their way via your foot to the centre of the earth. The high velocity arrival of such stupendous amounts of lead creates a density shock-wave which eventually collapses beyond its own event horizon. The black hole thus formed goes on to absorb earth, most of the minor planets and the Sun. The problems of your foot become increasingly insignificant during this process. Hyper intelligent beings from the planet Zorg nod their several heads wisely and confide to each other: `I always said Tony was a complete twat' Objective-C (NeXT): You write a protocol for shooting yourself in the foot so that all people can get shot in their feet. Omnis: Set current gun {A_GUN} Define gun {COLT_45} Find first bullet For each chamber in gun Add bullet to gun Next bullet End for No/Yes message {Are you sure you want to shoot yourself in the foot?} If flag true Set main target {MY_FOOT} Prepare for shoot If flag false OK message {Sorry, you can't shoot your foot because there are other feet in the way.} Quit shooting End if End if Redraw gun Enter aim Update trigger OK message {Leg damaged - bad footer block.} Omnis (alternate): You develop the gun using a Mac, and the bullets using Windows. When you try to load the gun, the bullets won't fit because you forgot to use cross-platform-ammunition. So you simply set the attribute $root.$clib.$bobjs.Bullets.$head. $format.$shared to kTrue and retry. This works, but since you don't have the main file set correctly, you accidentally create a new foot and shoot it instead. Because the foot is connected to its parent, it automatically shoots you in the head. You suspected this might happen, so you enclosed the whole procedure in a reversible block to ensure you'd be unshot afterwards, but shooting isn't reversible. Bogus. ORACLE: ORACLE sell you a gun, a box of bullets, a holster, a cardboard mock-up of a wild-west town and a stetson. You find the trigger takes twenty seven people to pull it. ORACLE provide 26 consultants all with holsters, cardboard mock-ups and stetsons. The bullet doesn't leave the gun-barrel and you hire four more ORACLE consultants to optimise. The bullet bounces off your sandals. You decide to buy INGRES. Richard Donkin shoots you in the foot. Paradox: Not only can you shoot yourself in the foot, your users can too. Pascal: Same as Modula/2, except that the bullet is not of the right type. Besides, the compiler won't let you shoot yourself in the foot. Picospan: You can't shoot yourself in the foot, because you're not a host. Picospan (host variation): Whenever you shoot yourself in the foot, someone opens a topic in policy about it. Picospan (alternate): You can shoot yourself in the foot, but Shibumi won't tell anyone how you did it. PL/1: You consume all available system resources, including all the offline bullets. The Data Processing and Payroll departments both double in size, triple their budgets, acquire four new mainframes, and drop the original one on your foot. Postscript: Draw gun and use type 1 bullets for better accuracy. Postscript (alternate): You open a direct channel to your favorite laser printer and dump the following program: %! PS-ADOBE-EPS 3.0 %% Title: (shoot self) %% Fonts-used: At end %% Colors-used: At end %% VM-Usage: none of your &*%#$@ business! %% invoke sh with array about weapon.. num cyls full & name of weapon /sh {/w exch def 6 w chf { w f} {emptychamber} ifelse} bind def /chf { /wp exch def /ch exch def wp 1 get 6 eq} def/f { /wp exch def /some-font findfont 234.56 scalefont setfont 100 100 moveto .1 .5 .8 setcolor (You shot yourself in the foot with) charpath stroke 200 100 moveto wp 2 get charpath stroke 1 0 0 setcolor (BANG) show showpage } def[6 (Colt 45)] sh After waiting 40 minutes for the output to confirm that your foot is bleeding, you realize the interpreter has crashed because the setcolor operator isn't supported by your version 52.3.4 interpreter. In disgust, you shoot the laser printer in the foot. Prolog: You attempt to shoot yourself in the foot, but the bullet, failing to find its mark, backtracks to the gun which then explodes in your face. or You tell your program you want to be shot in the foot. The program figures out how to do it, but the syntax doesn't allow it to explain. Revelation: You're sure you're going to be able to shoot yourself in the foot, just as soon as you figure out what all these nifty little bullet-thingies are for. RTL: You start to really shoot yourself in the foot, but 6 slugs is too many for an array and blows the compiler to pieces. Eventually you realise you must rebuild the compiler to allow such huge arrays. This is so stupid and boring that you start shoot yourself, but just in time you are interrupted by ..... scheme: You shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds the gun with which you shoot yourself in the appendage which holds... ...but none of the other appendages are aware of this happening. SmallTalk: You spend so much time playing with the graphics and windowing system that your boss shoots you in the foot, takes away your workstation, and makes you develop in COBOL on a character terminal. SNOBOL: Grab your foot with your hand and rewrite your hand to be a bullet. If you succeed, shoot yourself in the left foot. If you fail, shoot yourself in the left foot. The act of shooting the original foot changes your hand/bullet into yet another foot (a left foot). sh, csh, etc: You can't remember the syntax for anything, so you spend five hours reading .man pages before giving up. You then shoot the computer in the foot and switch to C. SQL: You cut your foot off, send it out to a service bureau and when it returns, it has a hole in it, but will no longer fit the attachment at the end of your leg. SYBASE: You carelessly invoke the procedure sp_insert_bullet() which fires a trigger (neat, eh) on the table GUN. To maintain referential integrity, the system invokes another trigger which inserts bullets in your other foot, your shins, your thighs, pelvis and so on up to the cranium. You are left in third normal form. T: Kick self in gun. T(alternate): Throw your body onto the feet of the programmers, intercepting all incoming bullets. Record in detail the time, location, and extent of all injuries received, and note any misfires. When paramedics and/or police arrive, deliver complete report, along with incriminating evidence. Repeat as necessary until perpetrator is apprehended. troff: rmtroff -ms -Hdrwp | lpr -Pwp2 & .*place bullet in footer .B .NR FT +3i .in 4 .bu Shoot! .br .sp .in -4 .br .bp NR HD -2i .* TRS-80: It took me an hour to load the gun I was going to shoot myself in the foot with. Unix: % ls foot.c foot.h foot.o toe.c toe.o % rm * .o rm: .o: No such file or directory % ls % Visual Basic: SUB Gun1_Trigger() GunLoad.TRUE GunAim(137) 'degrees, that is GunShoot END SUB or You'll shoot yourself in the foot, but you'll have so much fun doing it that you won't care. VMS: %SYS-F-FTSHT, foot shot (fifty lines of traceback omitted) or $ MOUNT/DENSITY=.45/LABEL=BULLET/MESSAGE="BYE" BULLET::BULLET$GUN SYS$BULLET $ SET GUN/LOAD/SAFETY=OFF/SIGHT=NONE/HAND=LEFT/CHAMBER=1/ACTION=AUTOMATIC/ LOG/ALL/FULL SYS$GUN_3$DUA3:[000000]GUN.GNU $ SHOOT/LOG/AUTO SYS$GUN SYS$SYSTEM:[FOOT]FOOT.FOOT %DCL-W-ACTIMAGE, error activating image GUN -CLI-E-IMGNAME, image file $3$DUA240:[GUN]GUN.EXE;1 -IMGACT-F-NOTNATIVE, image is not an OpenVMS Alpha AXP image oh well, almost.. Windows 3.x: From the C: prompt, type WIN B:\SETUP. Once you've finished installing the gun, restart Windows (I don't know why, just do it). Open the "Gun" group, and double-click the "Gun" icon. Gun crashes because BULLET.DLL is not in your path. Exit Windows, fix your AUTOEXEC.BAT, reboot and restart Windows. Double-click the gun icon. Try to put bullets in the gun, but you can't remember if they're embedded or linked. When you try linked, WinWord 2.0 automagically deletes both the bullet and the gun. When you try embedded, the gun becomes to large to hold. Drop your monitor on your foot and buy a Macintosh. WordPerfect 5.1 Macros: {DISPLAY OFF} s {Backspace} Shooo {Backspace}t self in g{Backspace} foot{Enter} {CHAR}ishot ~{^\}Did you want to shoot yourself: Y{Left}~ {IF}Ó {VARIABLE}ishot~Ó= ÓnÓ|Ó{VARIABL E}ishot~Ó=ÓNÓ~ {Exit}nn{Format} pfap You shot yourself in the footer! {END IF} Games and other diversions: cc:Mail: You pulled the trigger, but because the Administrator didn't know the bullet needed to propagate, it didn't reach your toes. SAGA (Scott Adams Graphic Adventure): SHOOT GUN AT FOOT {you must use 2 word commands} SHOOT GUN{you can't shoot that!} SHOOT FOOT {what do you want to shoot the foot with?}GUN {sorry, the gun isn't loaded} INFOCOM: PUT THE BULLETS IN THE GUN, THEN SHOOT THE FOOT WITH IT {Ok, you put the bullets in the gun. The gun is now loaded.} {Which foot do you want to shoot, the left foot or the right foot?} SHOOT THE LEFT FOOT WITH THE GUN [if game is in TAME mode:] {You shoot your left foot with the gun and scream out in pain!} [if game is in LEWD mode:] {You shoot your left foot with the gun and scream your guts out as bright crimson liquid gushes forth from your left foot.} Any Macintosh Game: Point to the icon of the bullets. Click and hold the mouse button. Drag the bullets to the gun and let go of the mouse button. Now point to the gun. Click and hold the mouse button. Drag the gun to the icon of the foot and let go of the mouse button. Bedrock: You spend two days figuring out the syntax for creating a cHandGun resource in the resource file, and how to create cBullet resources inside cHandGun. But you can't put cBullets in a cHandGun, you have to use cLoadedHandGun, but the documentation didn't mention that. After finally getting the app to create an instance of cLoadedHandGun from your resource, you get an Assertion Failure calling pLoadedGun->Shoot() because you have to specify a supervisor. The docs don't tell you if the supervisor is cHand or cYourself, but it doesn't matter because you have to specify the supervisor at construction time and you can't do that when creating a cLoadedHandGun from a resource. So you write the code to manually build a cLoadedHandGun with cBullets, and call pLoadedGun->Shoot(). A defect in "shoot" causes the bullet to be fired 90 degrees off, killing the person in the next cube. When you call the chief architect to report the bug, he asks you why you used a cHandGun anyway, you should use cCrossBow. So... you try to use a cCrossBow, but the one method you need to subclass isn't virtual (and it's const). You create a parallel class with the same functionality, but make all methods virtual and not const. It compiles fine, but you get "Assertion Failed: Target Cast not Found!" PASSPORT: Drag 6 bullets to gun. Move gun to toes. Double click on trigger. "VMM Error." NDOS/4DOS Batch Language: alias load='c:\utl\MARK.COM loadhigh %%1' alias shoot='c:\utl\RELEASE. COM echo Bang! echo My %%&hurts!!! set chamber= %%@eval[%%chamber%% - 1]' set chamber=0 loadgun load bullet.exe set chamber=%@eval[%chamber% + 1] if %chamber% eq 6 goto ready goto loadgun:ready shoot %1 foot if %chamber% eq 0 goto empty goto ready:empty CALL PARAMEDC.BTM