- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
a.k.a Gridlock: http://en.wikipedia.org/wiki/Gridlock
Admin
re: /bin/true
v1.0: exit 0 # "true" v1.1: exit 1 # "enum Boolean.TRUE" v1.2: exit # default v1.3: return # this works in "C" v1.4: exit # but apparently not in shell v1.5: exit FILE_NOT_FOUND v1.6: <empty script> # turns out we don't need to do much here
Admin
My guess:
v1.0: <empty script> v1.1: add version number v1.2: add copyright notice v1.3-1.6: update copyright notice with the current year
Admin
Traffic like that doesn't happen so easily if people fricken remember NOT to pull into an intersection they can't get out of...
Admin
Hm... cars everywhere, angry drivers who refuse to be the one who gets traffic moving again, (because it would require going around the block)... I've played this game before.
Admin
I love how those 2 santas seem to be enjoying the jam.
Admin
I blame the drivers. The junctions are clearly boxed (the yellow diamonds) so they should not have pulled out until there was somewhere to get out. Only a moron blindly pulls forward without thinking just because the lights told them to.
Admin
Mac OS X?
38kB, just to return true! And works on two separate processor architectures! (I believe it's also cryptographically signed...)
Now there's progress for you.
Admin
Incidentally, yes, the program that returns its argument until killed, is 13 KB as a binary.
Admin
The malpractice ad reminds me of a billboard here for a news radio channel. It bears a picture of a bunch of cars with a banner across the top:
"Depend On Us For Traffic"
Yeah, thanks for all the traffic, guys.
Admin
Admin
The man page for /bin/true should be in the Tao of Programming: "The true utility does nothing, successfully. The untrue utility does nothing, unsuccessfully". Now that's deep.
Admin
Admin
For someone loving to read legalese, try to look at clear instead of true, while that has one line doing something, the many corporations claiming rights in it are....
Admin
You know, there is also a program called false
Admin
Do we have any verification that the lights were broken, not the users?
Asshat 1 drives into intersection while light is yellow, even though he has no way out. Asshat 2 misses his light thanks to asshat 1. Decides to just run it once there's an opening. ...griddlock!
Admin
My friend probably has a time machine, because he has published this picture on December 18th, 2007. Before it was taken!
Admin
Isn't the malpractice one from a lawyer's firm or something? Surely that's not much of a WTF. I can't see anything on the advert that means it's from a doctor's surgery, if that's the intended WTF...
I think someone's pulling your leg with the junction of fail, too. I've seen that around for a while.
Admin
????
Profit!
Admin
Comcast has an inept billing system? I never knew. I stopped using the "auto" bill pay because there was nothing auto about it. Unless by "auto" they mean that I am supposed to automatically call them every month and speak to a rep and make the payment over the phone because their "system" doesn't "automatically" charge my credit card. That must be what they meant.
Admin
On my installation of Linux, '/bin/true --version' is reporting version 5.2.1. And it's 12K of code.
Admin
Hmm. On my Solaris box, /bin/true is an executable.
Admin
Admin
Linux:/bin$ ll true -rwxr-xr-x 1 root root 12K 2007-09-29 08:51 true Linux:/bin$ file true true: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), stripped
Admin
You should have a look at true.c from the GNU coreutils some time. You'll be amazed...
Admin
The earlier date would justify the Santas
Admin
Admin
On mine, it's version 6.9, and 19k. Feature creep, probably.
Admin
Which actually describes the majority of drivers at any given epoch.
Admin
Admin
What's the deal with black cars in Sao Paulo? Half of them are black!
Admin
Due to budget constraints, the Civil Engineers were forced to implement a square roundabout...
Admin
I think you mean a boxabout.
Admin
A v1.6 shell-sript "true" is a WTF indeed. An even bigger WTF however is how everybody is laughing at binary implementations of the same without even benchmarking it:
mb@aldous ~ $ file /bin/true /bin/true: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), stripped mb@aldous ~ $ cat true.sh #!/bin/sh exit 0 mb@aldous ~ $ time for (( i=0; i<10000; ++i )); do ./true.sh; done
real 0m35.886s user 0m4.432s sys 0m12.373s mb@aldous ~ $ time for (( i=0; i<10000; ++i )); do /bin/true; done
real 0m25.883s user 0m1.648s sys 0m8.637s
There you go, NetBSD. Considering what a monster /bin/sh is in comparison to some "int main{return 0;}" plus libc gruft, it's pretty obvious why that is. Of course a dynamically linked "true" is a minor WTF in itself:
mb@aldous ~ $ diet gcc -Os true.c -o true; strip true; ls -l true; cat true.c -rwxr-x--- 1 mb users 1248 2008-02-22 17:55 true int main(void){return 0;} mb@aldous ~ $ time for (( i=0; i<10000; ++i )); do ./true; done
real 0m6.122s user 0m1.008s sys 0m4.072s
Admin
DON'T BLOCK THE BOX.
It is a simple driving rule. If you can't make it across the intersection, you do not enter the intersection. It drives me nuts when people are selfish like this. It ruins many well thought out intersections.
I love the people that panic and enter when the light turns yellow. I mean, if they don't go then, they might NEVER make it across. Jackasses.
Admin
screenshot
Easily the funniest thing I've seen on the WTF.
Just awesome
Admin
On the last one, the revisions probably reflect changes to the copyright years.
Admin
One of my colleagues has just pointed out that the linux version of true can return false:
umm....
Admin
Admin
It's just plain frustrating to sit through a green light at a blocked intersection, have the light turn red, the intersection clear only to block up again just before the light changes...
Admin
Completely agreed. Being polite only works when everyone else agrees to be polite. If you're the only one being polite, you never get your turn and the guy stuck behind you gets out and punches you in the face. You just go when the light is green and keep inching forward.
Admin
Any more, I rarely go to any big city. My current office is at a traffic light in such a lighly travelled city that you can walk diagonally across the intersection at 5 pm and not obstruct traffic.
Admin
Admin
Even better, it's version 1.6, contains no uncommented code, AND HAS A BUG!
The bug is that if you use this /bin/true from within your shell init scripts it'll cause an infinite loop!
Not to mention a bug in your shell init scripts can cause /bin/true to return false!
Re: version number, I suspect it was just to update the legalese. I seem to recall that the original version was just an empty file.
Ciao!
Admin
Dunno 'bout other countries, but over here (the Netherlands) the rules are such that you HAVE TO start driving when the light turns green.
That said, only a moron blindly obeys moronic rules.
BTW: the santas are indeed cool, but I also like the bus blocking all lanes towards the bottom right.
Admin
The posted version of /bin/true has a bug, at least if /usr/bin/sh is bash or another "advanced" shell.
This is a bug I originally reported in NextStep 0.8 quite a few years ago.
On NextStep /bin/true was an empty file. /bin/sh was actually bash.
What does bash do when it starts up? It loads ~/.bashrc. What happens if you call /bin/true from ~/.bashrc?
Admin
Wow, you must have an incredibly slow 64 bit machine to take 25 seconds for the default true binary..
@debian:~/Desktop$ file /bin/true /bin/true: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), stripped
@debian:~/Desktop$ time for (( i=0; i<10000; ++i )); do /bin/true; done
real 0m10.954s user 0m3.280s sys 0m7.504s
Admin
If I understand this correctly, those yellow diamonds in the intersection mean that you're not allowed to stop in the middle of it? And you have to wait before the intersection for the oncoming traffic to clear? (I'm serious, I've never seen them before and the first thing that turns up on google for "yellow diamonds intersection" is this very page :D)
Admin
The GNU/Linux /bin/true as true.c: http://www.koders.com/c/fidDF83F838AA5D91F9B07D35DD6353BCA20BD2B48B.aspx?s=md5
I find the Solaris solution rather elegant :-)
Admin
In America, you aren't allowed to enter an intersection unless you can clear it, period. The left turn yield on green means that you can enter it and wait for traffic or until the light turns yellow to clear but you still must be able to clear it.
99% of Americans (and especially in the state where I live) don't understand that you aren't supposed to enter an intersection that you can't clear. It's really irritating.