- Feature Articles
- CodeSOD
-
Error'd
- Most Recent Articles
- Monkeys
- Killing Time
- Hypersensitive
- Infallabella
- Doubled Daniel
- It Figures
- Three Little Nyms
- Tangled Up In Blue
- 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
I see (July 8th) that instead of being launched in late May, the 'new design' - which presumably really will have its navigation links on the left this time - is now promised for June 2006.
That's another government initiative running to time then...
Admin
If I'm reading it correctly, it'd be more like:
user@host:~$ ls -l foo
ls: foo: Permission denied
user@host:~$ chmod 644 foo
user@host:~$
i.e. you can't find out what the current permissions are, but you can change them.
Admin
Take a careful look at the '2'. At the bottom, it overlaps the '1' slightly, and the base is a little lower than the rest of the text.
I'd say this was photoshopped.
Admin
"I happen to know someone who has a pet monkey (they live on a farm), and the monkey is not amused"
Your friends live on a monkey farm?
Admin
This should have been a choice of [x] Ok [ ] Cancel, as Usability.gov would undoubtedly have told you...
No, this is more like the other way around, isn't it? I can't tell you what the secret word is, but you can pick a new one if you like...
Admin
One could have also written it like this:
Admin
What I can't seem to reproduce in Unix, though, is "you do not have permission to find out what the current permissions are":
<FONT face="Courier New" size=2>$ ls -l foo
foo: Permission denied
total 8
$ ls -ld foo
d-wx--x--x 2 nobody nobody 69 Jul 8 16:57 foo
$ ls -ld .
d-wx--x--x 3 nobody root 105 Jul 8 16:57 .
$</FONT>
i.e. you can always find out what the current permissions are, even if no one has permission to read anything. (This might depend on the flavour of Unix, of course -- I tried this with Solaris 10. But this behaviour seems to make some kind of sense, given that a Unix directory seems to be just a list of file names, so if you already know the name of the file you're after, reading permission on the directory is not required.)
Admin
As I understand it, it's impossible (at least using standard Unix permissions) - generally, if you can access the directory the file is in, you can read its permissions. (I don't think you even need read permissions on the directory, just execute...)
Admin
"Please bang on the keyboard like a monkey" - Excellent! :D
Admin
Coach 12 departing from platform 9¾ now?
Admin
The real WTF is "RESTART THE COMPUTER TO APPLY CHANGES".
--Tei
Admin
Looks like this forum doesn't like colons... there is one between "javascript" and "alert"...
Admin
<font face="arial" size="2">> SunSolve Bug ID: 4102680
> ------------------------
> Problem: stress test gets an XError (BadDrawable) under 2.7 CDEVersion1.3_8
> Workaround: Don't pound on the mouse like a wild monkey (stress test).
>
> SunSolve Bug ID: 4256482
> -------------------------
> Problem: Banging on keyboard like a wild monkey during cde startup causes dtwm hang
> Workaround: Don't bang on the keyboard like a wild monkey </font>
Admin
I think that's a common problem with floating point numbers, not a javascript-specific bug.
Admin
Heeee.... NO.
On most stuff you can use float numbers:
- Basic on a C64
- C with a x86 computer
- Python/Perl/Ruby/Java...
- FORTH
...theres problems, but not that ridiculous as this one. This one is soo ugly that I think javascript itself is broken over repair.
Theres a good thread about the topic on this forum.
Admin
the true WTF!!!OMG is the lady on the right hand side of this site.
Admin
You should really try this kind of stuff out before opening your mouth.
int main(int argc, char* argv[])
{
if (0.30000000000000004 == (.1 + .2))
printf("looks like C sucks too!");
return 0;
}
Admin
program:
#include "stdio.h"
int main(int argc, char* argv[]) {
float f;
if (0.30000000000000004 == (0.1f + 0.2f))
printf("looks like C sucks too!\n");
else
printf("not that bad!\n");
f = 0.1f + 0.2f;
printf("sum: %f\n", f);
return 0;
}
output:
not that bad!
sum: 0.300000
Admin
confirmed
Admin
It's not that bad. Guess why? Because it's even worse. :-)
<FONT face="Courier New" size=2>D:\Projects\DailyWtfFloat\Debug>type ..\DailyWtfFloat.cpp
// DailyWtfFloat.cpp : Defines the entry point for the console application.
//</FONT>
<FONT face="Courier New" size=2>#include "stdafx.h"
#include "stdio.h"</FONT>
<FONT face="Courier New" size=2>int _tmain(int argc, _TCHAR* argv[])
{
float f = .1f + .2f;</FONT>
<FONT face="Courier New" size=2> if (0.30000000000000004 == f)
printf("looks like C sucks too!\n");
else
printf("not that bad!\n");</FONT>
<FONT face="Courier New" size=2> printf("sum: %32.30f\n", f);</FONT>
<FONT face="Courier New" size=2> return 0;
}</FONT>
<FONT face="Courier New" size=2>D:\Projects\DailyWtfFloat\Debug>.\DailyWtfFloat.exe
not that bad!
sum: 0.300000011920928960000000000000</FONT>
<FONT face="Courier New" size=2>D:\Projects\DailyWtfFloat\Debug></FONT>
Could it be that Javascript uses double's not float's?
Admin
Seems you are using a math-deprived operating system. Linux doesn't do that.
Admin
What do you mean? Linux stores floating-point numbers in a decimal representation, not in a binary one?
Admin
Well, a sane operating system (or rather: a sane lib) does not output more decimal places than can realistically be precise.
Admin
Well, it was me who told that printf() function to output 30 digits after the decimal point, instead of the default six decimal digits. Did you just call me a lib?
Admin
Sorry, I haven't noticed that. There is nothing wrong with your operating system and lib, the problem is between chair an monitor.
Admin
It's not a monkey farm - they live on a farm and just happen to have a monkey (you haven't lived until you've tried to eat dinner with a monkey running around the room throwing .... stuff
Admin
In Python:
"Talk about versatile, J.B. Langston was thrilled to see that Remedy's call tracking system is able to handle Xanthemedies' complaint about broken amphorae on his olive shipment from 352 BC ..."
Brilliant :D
Admin
damn forum, that was supposed to be:
>>> if 0.30000000000000004 == 0.1 + 0.2:
... print "test"
...
test
Admin
Somehow I wasn't quite sure you were being serious... Anyway, here's the thing on Linux:
<FONT face="Courier New" size=2>ruleheck@lt***-vmlinux-oraagent:~/DailyWtfFloat</FONT><FONT face="Courier New" size=2>> cat DailyWtfFloat.c++
// DailyWtfFloat.cpp : Defines the entry point for the console application.
//</FONT>
<FONT face="Courier New" size=2>#include "stdafx.h"
#include "stdio.h"</FONT>
<FONT face="Courier New" size=2>#ifndef _MSC_VER
typedef char _TCHAR;
#endif // #ifndef _MSC_VER</FONT>
<FONT face="Courier New" size=2>#ifndef _MSC_VER
inline
#endif // #ifndef _MSC_VER
int _tmain(int argc, _TCHAR* argv[])
{
float f = .1f + .2f;</FONT>
<FONT face="Courier New" size=2> if (0.30000000000000004 == f)
printf("looks like C sucks too!\n");
else
printf("not that bad!\n");</FONT>
<FONT face="Courier New" size=2> printf("sum: %32.30f\n", f);</FONT>
<FONT face="Courier New" size=2> return 0;
}</FONT>
<FONT face="Courier New" size=2>#ifndef _MSC_VER
int main(int argc, char* argv[])
{
return(_tmain(argc, argv));
}
#endif // #ifndef _MSC_VER
</FONT><FONT face="Courier New" size=2>ruleheck@lt***-vmlinux-oraagent:~/DailyWtfFloat</FONT><FONT face="Courier New" size=2>> ./DailyWtfFloat
not that bad!
sum: 0.300000011920928955078125000000
</FONT><FONT face="Courier New" size=2>ruleheck@lt***-vmlinux-oraagent:~/DailyWtfFloat</FONT><FONT face="Courier New" size=2>> uname -a
Linux lt***-vmlinux-oraagent 2.6.4-52-default #1 Wed Apr 7 02:08:30 UTC 2004 i686 i686 i386 GNU/Linux
</FONT><FONT face="Courier New" size=2>ruleheck@lt***-vmlinux-oraagent:~/DailyWtfFloat</FONT><FONT face="Courier New" size=2>></FONT>
You may recall that Windows rounded that to 0.30000001192092896. So if a sane operating system doesn't output too many decimal places, then Linux is even more insane than Windows. :-)
Admin
Perhaps you folks should try Java's BigDecimal object.
Admin
Damn - didn't take:
Admin
Well, Linux is obviously an even more obedient idiot than Windows ;-)
Admin
re: usability.gov
sorry, but i just have to say it - the Real WTF [tm] is the code...
Admin
Different processor architectures will produce different results with this program. Also, a different compiler might as well, as well as a debug vs release compile (on windows). On gcc, different O settings might make this produce different code as well. It all depends on the Floating Point Unit in the processor, as well as what call is made to add the numbers together. Floating point addition can be done many different ways (SSE, 3dNow, or just normal FPU, etc...).
Admin
I disagree. You can see the reflection of the 2. You can also notice how the other 1 in 11 is scrunched up against the first 1 in 11, just as the 2 is in 12. The base really doesn't look much lower either.
Admin
And it's scrolling too. So it could be that it is moving
Admin
Heh, just like Ordo in Cryptonomicon.
Admin
This brings me to one of my favorite Dr Who quotes:
"The trouble with computers is they're sophisticated idiots. They do exactly what you tell them at amazing speed."
I always start with this quote when teaching a newbie to use a computer. It seems to make it a lot easier on them, partly by insulting the computer (and thus boosting morale) and partly by explaining just what the fundamental problem is in learning to use a computer.
Admin
Indeed. In los angeles everyone uses the car to go to the bathroom.
but even so, I´d rather be there than being in Rio
Admin
The really unnerving thing is that Microsoft has found a way to split the byte, and nobody noticed.
Admin
* makes mental note to avoid using LA taxis without protective clothing *
Admin
Having used Remedy at 2 companies; the guess "someone taking trouble to build in functionality that cannot serve any useful purpose." sounds like a LOT of what is built in....LOL!
Admin
haha, noice.
Admin
Uh, that would be if you WERE good friends with a monkey.
Admin
WTF: um...yeah..look, we are really sorry, we had no idea you guys were still around...
Mad Monkey: Next time do a little reasearch, huh?
Admin
Javascript (at least the rhino of mozilla/firefox fame) uses doubles, not floats. CMIIW, but I think that may even be standard across all interpreters - nice thinking Phil.
Even the mathematically superior Linux will get these types of calculations wrong on the same processor.
The real WTF is yet another "The real WTF is ..." type comment about the real WTF that is people who are pretending to know what they're talking about saying "WTF" about floating point inaccuracies.
0.1f + 0.2f = 0.30000000000(bang-on-the-numpad-like-a-monkey)f
Admin
Or, is the real WTF the type of person who claims that the real WTF is the people who are pretending to know what they're talking about saying "WTF" about floating point inaccuracies, therefore making it sound like they are not the real WTF.
Admin
Not that anyone will read all the way down to this message, but many many many years ago, while programming in Fortran on a Data General MV platform, I caused a simple runtime error that returned an error number.
The error number was 110, so not knowing if it was hex or decimal, I ran the error reporting program using both bases to see what I might have done. I don't exactly recall what the (correct) base 10 code was, but the result of looking up the number as hex resulted in this message:
"Universal system. You can't do that."
At that moment I realized that I was infringing on the Greater Powers, so I turned off the lights and crept home to meditate upon my sins.......
Admin
Spoken like a true drug dealer.
Admin
In my opinion, this is the best IE error message. It usually occurs when you attempt to access JavaScript objects in a window that has been closed.
"The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute."
I mean, I'm a senior IT professional, and I can barely decipher what this means. What's a poor user supposed to make of this?