+acadiel Posted January 25, 2018 Share Posted January 25, 2018 Assembly You try to shoot yourself in the foot only to discover that you must first invent the gun, the bullet, the trigger, and your foot. 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 system administrator shoots himself in the foot and then hops around the room rapidly shooting at everyone in sight. By the time you've written the gun, you are dead, and don't have to worry about shooting your feet. Alternatively, you shoot and miss, but don't notice. Using only 7 bytes of code, you blow off your entire leg in only 2 CPU clock ticks. BASIC Shoot self in foot with water pistol. On big systems, continue until entire lower body is waterlogged. If using TI-BASIC variant, watch bullet slowly exit gun and travel through the air and then slowly pierce foot Forth Foot in yourself shoot. First you decide to leave the number of toes lost on the stack and then implement the word foot-toes@which takes three numbers from the stack: foot number, range, and projectile mass (in slugs) and changes the current vocabulary to blue. While testing this word you are arrested by the police for mooning (remember, this is a bottom-up language) who demonstrate the far better top-down approach to damaging yourself. 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 actually writing code. Logo You can easily shoot the gun, but you have to work out the geometry to make sure the bullet goes into your foot. (source: http://www.toodarkpark.org/computers/humor/shoot-self-in-foot.htmlexcept TI BASIC which was me) 11 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted January 25, 2018 Share Posted January 25, 2018 We shouldn't leave out both guys who use Pascal. Pascal The compiler won't let you shoot yourself in the foot. The gun is mounted such that it cannot point towards your feet, but you can swivel it round and shoot yourself in the head instead. 1 Quote Link to comment Share on other sites More sharing options...
+mizapf Posted January 25, 2018 Share Posted January 25, 2018 This is my favorite: (note the blank behind the asterisk in the rm line) $ ls foot.c foot.h foot.o toe.c toe.o $ rm * .o rm: .o: No such file or directory $ ls $ because I did something similar some weeks ago, trying to copy files from my backup drive to my home directory: $ rsync -avuK /mnt/backup/home/michael/ ~ $ rm -rf /mnt/backup/home/michael/ ~ (first line copies files to my user directory, ~ = /home/michael, second line shall remove the directory (unconditionally, recursively), but I copied the line and forgot to remove the ~, so it wiped both) Quote Link to comment Share on other sites More sharing options...
Tursi Posted January 25, 2018 Share Posted January 25, 2018 where you too can perform compiler pre-processing instead of actually writing code .. which is the direction C++14 decided to go... Quote Link to comment Share on other sites More sharing options...
+mizapf Posted January 25, 2018 Share Posted January 25, 2018 For illustration purpose. 2 Quote Link to comment Share on other sites More sharing options...
+9640News Posted January 25, 2018 Share Posted January 25, 2018 Hopefully, that was just a graze wound. If it went down his leg, he is in a world of hurt. Quote Link to comment Share on other sites More sharing options...
pacman000 Posted January 25, 2018 Share Posted January 25, 2018 (edited) There are so many versions of this. Here's another list, which seems to combine many versions, and trace their history: http://www-users.cs.york.ac.uk/~susan/joke/foot.htm Still incomplete, however. Favorite bits from this list: dBase (alternative) 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 scheduled to actually shoot bullets. Java You locate the Gun class, but discover that the Bullet class is abstract, so you extend it and write the missing part of the implementation. Then you implement the ShootAble interface for your foot, and recompile the Foot class. The interface lets the bullet call the doDamage method on the Foot , so the Foot can damage itself in the most effective way. Now you run the program, and call the doShoot method on the instance of the Gun class. First the Gun creates an instance of Bullet , which calls the doFire method on the Gun . The Gun calls the hit(Bullet) method on the Foot , and the instance of Bullet is passed to the Foot . But this causes an IllegalHitByBullet exception to be thrown, and you die. Assembly Language (alternatives) You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot. COBOL USEing a COLT 45 HANDGUN, AIM gun at LEG.FOOT, THEN place ARM.HAND.FINGER on HANDGUN.TRIGGER, and SQUEEZE. THEN return HANDGUN to HOLSTER. CHECK whether shoelace needs to be retied. 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. Edited January 25, 2018 by pacman000 2 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted January 25, 2018 Share Posted January 25, 2018 Good Lord, I hate to see what it takes to do this in RPG-II. Quote Link to comment Share on other sites More sharing options...
JamesD Posted January 25, 2018 Share Posted January 25, 2018 There are so many versions of this. Here's another list, which seems to combine many versions, and trace their history: http://www-users.cs.york.ac.uk/~susan/joke/foot.htm Still incomplete, however. Favorite bits from this list: The Java one needs to be at least twice as long. 3 Quote Link to comment Share on other sites More sharing options...
Rossman Posted January 26, 2018 Share Posted January 26, 2018 We shouldn't leave out both guys who use Pascal. It is a small but dedicated community! 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted January 26, 2018 Share Posted January 26, 2018 It is a small but dedicated community! The Forth guys understand and respect that. Quote Link to comment Share on other sites More sharing options...
RXB Posted January 26, 2018 Share Posted January 26, 2018 Or me pretty much alone in GPL. 1 Quote Link to comment Share on other sites More sharing options...
lucien2 Posted January 26, 2018 Share Posted January 26, 2018 Or me pretty much alone in GPL. Wrong. There were two new games entirely written in GPL in the last few years by me and Davvel. http://atariage.com/forums/topic/259623-ti-994a-break-free/?do=findComment&comment=3642722 http://atariage.com/forums/topic/224567-2048/?do=findComment&comment=2973710 3 Quote Link to comment Share on other sites More sharing options...
RXB Posted January 26, 2018 Share Posted January 26, 2018 Cool I stand corrected. Quote Link to comment Share on other sites More sharing options...
JamesD Posted January 26, 2018 Share Posted January 26, 2018 After looking at this again, I'm pretty sure you cannot shoot yourself in the foot with Pascal.You may want to shoot yourself in the head trying to get it to do something, but you cannot shoot yourself in the foot. Quote Link to comment Share on other sites More sharing options...
+mizapf Posted January 26, 2018 Share Posted January 26, 2018 We still need to know how to shoot yourself in the foot with GPL. 1 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted January 26, 2018 Share Posted January 26, 2018 (edited) By using a variant record in Pascal, you can very well shoot yourself in the foot. Like in the type declaration below. type dual = record case boolean of false: (data: integer); true: (address: ^integer); end; end; Edited January 26, 2018 by apersson850 1 Quote Link to comment Share on other sites More sharing options...
lucien2 Posted January 27, 2018 Share Posted January 27, 2018 Assembly You try to shoot yourself in the foot only to discover that you must first invent the gun, the bullet, the trigger, and your foot. Using only 7 bytes of code, you blow off your entire leg in only 2 CPU clock ticks. GPL You can maybe find the bullet in the system GROMs, but it's undocumented. It uses 3 bytes of code, but it takes 50 CPU clock ticks. 4 Quote Link to comment Share on other sites More sharing options...
+acadiel Posted January 27, 2018 Author Share Posted January 27, 2018 GPL You can maybe find the bullet in the system GROMs, but it's undocumented. It uses 3 bytes of code, but it takes 50 CPU clock ticks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.