Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. ×

Comment Re:7 is far less of a fustercluck than 5.2-5.3 (Score 1) 159

That's not naivety, that's a deficiency in PHP, you're fobbing it off as a problem in understanding, when in reality it's simply that PHP is poorly designed.

Well, I did quite some work in assembly. I didn't have any thread mechanism available as a core feature of the language, so I'd assume you'd also say CPUs are poorly designed.

There's nothing inherently wrong with wanting to send something off for processing in the background so that the main execution thread can return a response to the user.

No, there's not. What is wrong is the notion that you can only accomplish this by using threads.

The fact PHP can't do that is a problem with PHP, not naivety on behalf of someone wanting to do that because it's sometimes a legitimate thing to be able to do.

Sometimes I want to be able to issue syscalls. Its a legitimate thing to be able to do, and PHP doesn't allow me to do it easily. Or manage how memory is allocated. Or see an assembly dump of what's being executed. Well, its a limitation. So what?

If you think thread usage is purely about performance

I have great difficulty in having a valid discussion with someone that only performs a naive syllogism when reading a sentence, but I'll bite. If you're deferring tasks to be background processed so you can continue execution, it IS about performance, even though it wasn't what I wrote.

So what you really mean here is that PHP has a 3rd party beta threading implementation that may or may not work on your host

You mean, a package? Like basically every functionality available in every other language or operating system? Hey, PHP doesn't support Memcache also. Its an external package. And in Linux, bad luck - all those basic I/O functionalities are also available in a separate package. You know, like the one the JVM uses (GlibC).

If you do not have enough experience of web applications to realistically understand why you would want threads

Ahh the ad hominem attack. Well, I could say that if you cannot solve your problems without using threads you should be doing something else instead of programming, it doesn't really add nothing to the conversation, does it? By your reasoning, I'd say you're against using eg. PostgreSQL as a database server because isn't threaded. Oh well.

All this ignores the absurdity of the broken argument being made here - PHP is fine because it doesn't need threads, but it's got a barely working threading implementation because it doesn't need it, what?

PHP also has Sybase and Oracle support. I'd guess most developers don't really need that, and the language itself doesn't really need that, but exists. At this point I realize why you prefer to stay anonymous.

Before that it was solved in the most absurd ways by firing up a whole extra process with cURL, but you probably wont understand the performance implications of such a heavyweight action either.

Yah, probably not. I usually don't cater to smart-asses in the internet.

The worst part is, most PHP developers are at such an early stage in their development careers that they're not even equipped to understand why it's broken

So, it's the newbies fault, huh? I often see shitty production code done in Java or C# than in PHP, but it's obvious we have a different definition of shit.

No they wont, this is absolute bullshit. I don't care how good a programmer thinks they are, if the language has more gotchas then code written in that language will over time, be inherently more buggy than code written in a language with less gotchas, and therein lies the problen

Well, since you're so full of certainties, can you demonstrate it? If you have a look at http://www.computerworld.com.p..., you'll see that while the defect ratio of PHP is high, it is tied to a very specific set of defect categories. But hey, lets not spoil your rant with facts.

The problem is that most amateurs that think PHP is great don't even understand why their code is shit

Replace PHP with any language name. It's not about the language, its about the algorithm. And yah, I've seen some shitty algorithms done in "good" languages like C# and Java, and they weren't coded by amateurs.

. No programmer has ever written bug free software regardless of how big or small their ego but they'll write less bug free software in a language that eliminates entire classes of bugs (which the jump from dynamically to statically typed languages alone will typically do).

True, dynamically typed languages favor a specific set of defects. So why don't we write everything in Haskell? Why are you wasting time with Java or C# when Haskell is clearly superior?

It's just not the case - there's no longer a niche for PHP

The market says otherwise.

it's not faster to develop with

That's a bold statement. Are you comparing to Java? Yah its faster to develop with. Are you comparing to eg. Ruby? Maybe not.

it's not more efficient

Compared to what? It has a smaller memory footprint than equivalent solutions in Java, so it really depends on what you mean by "efficient".

it's not more performant

I can do web programming in assembly. I don't, but its not that hard. There are a bunch of obvious reasons why I don't do it. One of them is that, in most web cases, it doesn't really matter if the application takes 0.1ms or 5ms to execute.

it doesn't cost less

It does. A top PHP programmer can be upto 40% cheaper than a top Java programmer.

it's last remaining niche was the availability of cheap hosting

I'm currently finishing an application able to withstand 100K simultaneous users on a small cluster. I'd hardly call that cheap hosting, but hey, I'm not using wordpress.

because they're largely talentless and untrained

If you think programmer's talent is tied with the language, you're in for a big surprise.

you could hire 5 to release a masterpiece for the same price

This one made me laugh. I will take a hint from your book and assume - I'll assume you never managed developers nor designed a software product from scratch.

it's not clear that there's any benefit to PHP whatsoever over it's competitors any more

No one is forcing you to use it. Hey, I can't stand Python, does it make it a bad language? Hardly.

Yeah, except some of us like there to be less 1s and 0s so that our code is efficient

Bullshit. Efficiency has nothing to do with code size. And if you want that kind of efficiency, you're going to have a bad day with Java.

and we like our 1s and 0s to be ordered as they're supposed to be

As god intended, right? you're aware that most modern processors use out-of-order execution, right?

and so that they do what they're supposed to do

This fails more often than you might think, regardless of the language.

causing a vulnerability, poor performance, or an outright crash

So, shall I infer that those problems only occur in PHP?

Comment Re:7 is far less of a fustercluck than 5.2-5.3 (Score 1) 159

(...) Java runtime not using the native multi threading implementation (...)

Well, AFAIK you cannot perform processing affinity on Java threads. And also AFAIK it's not part of the POSIX standard, so it's often up to the system scheduler (depending on whether you're using a userland implementation or a kernel-based one) to decide that. You ASSUME it will use all cores.

the realistic use case happens to support multiple processors

The realistic case is that you have no control over this in Java or a standard POSIX implementation. However, eg. Linux does provide extensions for this.

Also one of the features of multi threading is working around blocking API calls, one thread can work while the other is in sleep mode waiting for data from network or disk and the CPU would be otherwise idle ( of course using an async API when available is better ).

I'd suggest you look at some async subsystems to realize this often isn't really an advantage (GIANT was removed from Linux in 2011, not that long ago), and add it the complexity of syncing thread state and application state.

Comment Re:7 is far less of a fustercluck than 5.2-5.3 (Score 1) 159

Well, threads aren't really that important in the PHP context. Keep in mind, most PHP applications are run via CGI or similar, so they are stateless from a request point of view - at each request the whole application is bootstrapped, run and then exits.The notion that you could fire a tread to do some heavy lifting while the rest of the application executes is, well, naive - the application only exits when all work is done. Also, in some languages (e.g. Java) there is no guarantee that threads will execute on a separate processor, so its not obvious threading will translate directly into performance gains. But hey, let me just point out that PHP actually has pthread support - http://php.net/manual/en/book...., so if anyone wants them, they can use them.

Like every language, PHP has its shortcomings. Some of them are quite ugly (I do identify with most of the issues pointed by "Fractal of Bad Design", and also think the rebuttal is somewhat hilarious), but what productive language doesn't require you to know more than 100 pages? Good programmers will write good code, regardless of the syntax. And its not a general purpose language - at all. Even in web development, there are a lot of situations where PHP is a poor choice. There are also a lot of situations where it is an acceptable choice, regardless of the flaws. Complaining about mysql_* when PDO and prepared statements exist for more than 10 years is also quite amateurish. Every language allows you to shoot yourself in the foot. Granted, PHP does give you a lot of options in this regard, but hey - you can shoot yourself in the foot with C, Java, Assembly, Perl, Python, Erlang or whatever is your poison. Every language has a niche, and failing to understand that is, well, dumb. And in the end it's all ones and zeros being executed in a processor.

Comment Re:Germany should take note (Score 1) 48

Disposable/Virtual VISA cards can be bought at any convenience store anywhere (gas stations, 24/7 stores) - at least in Berlin and Munich. You can even top them with a small amount when you buy them. You can then top them via bank transfer, and the limit is defined by the amount of info about yourself you give the broker. In Portugal, you have MBNet, a free service that will generate one-time usage VISA or Mastercard numbers with a limit amount, debiting it right on your bank account, but disposable VISA cards (eg. for anonymous usage) basically don't exist.

Comment Re:People still use Firefox? (Score 2) 115

Unless you're one of the users running into those mysterious "memory leaks" that nobody can replicate once they file an actual bug

I stopped using Firefox a couple of years ago because of this. They're not mysterious, they were real. Try opening a reasonable amount of tabs (50-100), and leave the browser open for a day or two, and you'll probably be able to reproduce it.

Comment Re:Good deal! (Score 1) 1307

Given the liquidity problems the banks have had this last two weeks, I'd seriously doubt that. Even if so, who is going to buy such assets? At what price? A fraction of the real value?

Comment Re:Good for greece (Score 1) 1307

The value of a thing is nothing more than more the price which people are willing to pay to acquire it.

So, why would you choose an unstable, national currency over a more stable, international one? As many african countries can attest, having your own currency is only effective if your economy is stable.

Slashdot Top Deals

Today is the first day of the rest of your lossage.