I code PHP every day, so I've become quite proficient at it. However, I constant find myself horrified at some newly-discovered inconsistency in its library. The language itself is not so terrible, but its library is a beast.
As a particular example, take PHP's error handling. The language has no real exceptions, which is forgivable--but it insists of making up for it by faking them.
It has something akin to sigaction(), but much less powerful. It allows you to provide one function to handle all errors, except for some that PHP insists on handling itself. At least that function can switch on the error, right? Nope! There are only 5 different error codes which your code can catch, only 3 of which you can actually throw (again, with a function instead of a language construct).
And if you thought this was bad, try the error handling in the library. Each set of functions seems to have its own function to check for errors, and you have to repeatedly check the manual to find out how a function indicates failure. I've seen the following different methods of indicating failure:
function returns FALSE
function returns TRUE
function prints a message to the browser
function returns 0
function returns 1
function returns nonzero
function returns negative
call another function to find out
functions returns something that can be fed into another function to find out
function raises an error condition you can catch (through fake exceptions described above)
function raises an error condition you can't catch
pass in a variable by reference and the result will be there
check if the returned array is empty, and if it is use a different function to find out whether that indicates an error or just a (legitimate in context) empty array
Don't even get me started on the naming conventions of functions, or the ordering of their arguments. (Check out the array functions if you want some good examples.)
PHP is a language that was designed for small, simple CGI scripts, and it does this well. It does not scale. PHP was never meant to be used from the command line, but how else can you write a cron job to do some nightly maintenance? (Write in another language? Sure, and give up all the libraries you've written for the project.) Sure, you can use lynx -dump http://example.com/nightly.php >/dev/null, but then you have to make sure no one but you can use that script, and it's just generally an ugly thing to do.
For all of its faults (and it has many), one of the thigs Perl does well is provide actual language features for things like merging arrays, sorting arrays with a user-provided comparison function, or declaring a variable with loop scope. PHP's libraries keep growing, which is nice, but the language itself is too small and too limited. I don't want to use library functions for everything, nor do I honestly care whether the language is even context-free. I just want a lanugage that doesn't suck.
Once I actually rewrote some of gcc's source code so that reserved words like for, while, switch, etc. were changed to FOR, WHILE, SWITCH, etc. I also capitalized the functions in the standard library (!).
And I suppose all of that FORTRAN also made you forget how to use C preprocessor macros?
#define FOR for
#define Malloc malloc
Re:Maybe the problem is Minsky himself?
on
AI Going Nowhere?
·
· Score: 1
The "successes" they had towards AI were, as one author has written, like climbing to the top of a tall tree and claiming you've made progress getting to the moon.
Seriously though, NT is a bad example to use when discussing reliable software. Samba is indeed a better example, though even then I'd comment that if one part of it crashes, so does much of it--last I checked it was only a few daemons. If Samba's browser crashes, it should keep serving files. That was the idea of the article I think.
I don't mind the mailing list archives so much as seeing the same mailing list archived on 50 different sites and scrolling past all 50 listings of a particular message on Google.
Or you restart the appropriate services, like the Server service (and possibly some others in your vaguely described situation). Come on, have you ever actually used NT?
No. The universe he presumably meant was the natural numbers, which include 2 as an element. He's correctly pointing out that under certain assumptions about the universe, it is possible that an event only occurs once.
The reason the probability of drawing a rational from [0,1] is zero is that the rationals are countable and [0,1] is uncountable. Who said that there are only countably many monkeys? If there are uncountably many monkeys, they will indeed produce Shakespeare.
the other real targets are nation states like Germany
Yes, but not only in the ways you've pointed out. The real goal is allowing the US government to engage in industrial espionage on behalf of US companies. The CIA is probably much less interested in German military movements than in advance German manufacturing techniques.
Re:actually, this manuever is still in use today
on
Nuke-Lobbing
·
· Score: 1
Of course, at that time it was only suspected that Pakistan had The Bomb
That's why the current situation on the subcontinent is so dangerous. Until both sides have enough nukes that an exchange would annihilate both countries, there'll be the temptation to think a nuclear war can be "won". It's one of the great ironies of the nuclear world that India and Pakistan will both be safer places to live when the two traditional enemies have enough firepower to destroy all of Asia.
We're detaining plenty of people that aren't terrorists and have no ties to them so far as they know.
We're not (yet?) rounding up Arabs and Muslims, sending them to forced labor camps, and murdering them en masse. No matter how bad Ashcroft is (very), he's not quite Hitler.
We still have some form of a democratic system left in which to fight these laws.
This document defines the behavior of security elements for the 0x0 and 0x1 values of this bit. Behavior for other values of the bit may be defined only by IETF consensus [RFC2434].
MySQL does have transaction support and is fully ACID-compliant--iff you use the InnoDB table type. This also allows you to use foreign key constraints. However, it's not as fast as MyISAM and doesn't support certain features (e.g. fulltext indexing).
In my (informal) tests MySQL/InnoDB is less than half the speed of MySQL/MyISAM but still about 50% faster than PostgreSQL for simple and small tasks. That said, PostgreSQL has more features than MySQL and I still prefer it for most tasks.
They suck in massive amounts of matter and spew out lots of high-energy crap.
This tells us that not only is Firebird more popular than Mozilla, it's also faster! Well, one of those might actually be true...
As a particular example, take PHP's error handling. The language has no real exceptions, which is forgivable--but it insists of making up for it by faking them.
It has something akin to sigaction(), but much less powerful. It allows you to provide one function to handle all errors, except for some that PHP insists on handling itself. At least that function can switch on the error, right? Nope! There are only 5 different error codes which your code can catch, only 3 of which you can actually throw (again, with a function instead of a language construct).
And if you thought this was bad, try the error handling in the library. Each set of functions seems to have its own function to check for errors, and you have to repeatedly check the manual to find out how a function indicates failure. I've seen the following different methods of indicating failure:
function returns FALSE
function returns TRUE
function prints a message to the browser
function returns 0
function returns 1
function returns nonzero
function returns negative
call another function to find out
functions returns something that can be fed into another function to find out
function raises an error condition you can catch (through fake exceptions described above)
function raises an error condition you can't catch
pass in a variable by reference and the result will be there
check if the returned array is empty, and if it is use a different function to find out whether that indicates an error or just a (legitimate in context) empty array
Don't even get me started on the naming conventions of functions, or the ordering of their arguments. (Check out the array functions if you want some good examples.)
PHP is a language that was designed for small, simple CGI scripts, and it does this well. It does not scale. PHP was never meant to be used from the command line, but how else can you write a cron job to do some nightly maintenance? (Write in another language? Sure, and give up all the libraries you've written for the project.) Sure, you can use lynx -dump http://example.com/nightly.php >/dev/null, but then you have to make sure no one but you can use that script, and it's just generally an ugly thing to do.
For all of its faults (and it has many), one of the thigs Perl does well is provide actual language features for things like merging arrays, sorting arrays with a user-provided comparison function, or declaring a variable with loop scope. PHP's libraries keep growing, which is nice, but the language itself is too small and too limited. I don't want to use library functions for everything, nor do I honestly care whether the language is even context-free. I just want a lanugage that doesn't suck.
</rant>
#define FOR for
#define Malloc malloc
About as stable as it was before that. :)
Seriously though, NT is a bad example to use when discussing reliable software. Samba is indeed a better example, though even then I'd comment that if one part of it crashes, so does much of it--last I checked it was only a few daemons. If Samba's browser crashes, it should keep serving files. That was the idea of the article I think.
I don't mind the mailing list archives so much as seeing the same mailing list archived on 50 different sites and scrolling past all 50 listings of a particular message on Google.
Or you restart the appropriate services, like the Server service (and possibly some others in your vaguely described situation). Come on, have you ever actually used NT?
No. The universe he presumably meant was the natural numbers, which include 2 as an element. He's correctly pointing out that under certain assumptions about the universe, it is possible that an event only occurs once.
The reason the probability of drawing a rational from [0,1] is zero is that the rationals are countable and [0,1] is uncountable. Who said that there are only countably many monkeys? If there are uncountably many monkeys, they will indeed produce Shakespeare.
Other reasons the election was suspect: it didn't occur in a presidential election year.
Oh, but ATI has delivered your pony. You just need to stop using those drivers that make its textures 100% transparent.
Five of those seven questions are simple. Sex is never simple, and I often spend a long time thinking up new passwords, so that makes 5 simple ones.
MySQL does have transaction support and is fully ACID-compliant--iff you use the InnoDB table type. This also allows you to use foreign key constraints. However, it's not as fast as MyISAM and doesn't support certain features (e.g. fulltext indexing).
In my (informal) tests MySQL/InnoDB is less than half the speed of MySQL/MyISAM but still about 50% faster than PostgreSQL for simple and small tasks. That said, PostgreSQL has more features than MySQL and I still prefer it for most tasks.
Try StartupMonitor.
Good luck!