Slashdot Mirror


PHP 5 Released; PHP Compiler, Too

TheTomcat writes "After years of anticipation, PHP 5 was released today. This release represents a milestone in the evolution of PHP. It sports the new Zend Engine II, a completely re-worked object model, and many many new features. Check it and the changelog out." In other PHP news, remote_bob writes "There have been many attempts, like BinaryPHP and PASM, but finally there is a complete compiler for PHP. The Roadsend compiler produces standalone, native executables, and supports the entire PHP language (but not all extensions). It uses Bigloo Scheme to do its job, a variant of Lisp, the language that Paul Graham writes about. Benchmarks say that performance is pretty good. Is this another sign that dynamic languages are the future?"

524 comments

  1. So it is out... by Necromutant · · Score: 3, Insightful

    ...but who will use it for another year or two?

    --
    ~Necromutant
    1. Re:So it is out... by Anonymous Coward · · Score: 1, Funny

      I hope it dies. Stupid girly toy language.

    2. Re:So it is out... by Necromutant · · Score: 1

      Eh... I wasn't saying that, I love PHP! Use it every day. I am sure that PHP 4 will get alot more use for most before they start in on 5. I know that is how it will more than likely play out where I work.

      --
      ~Necromutant
    3. Re:So it is out... by Barryke · · Score: 0

      Enlighten me, please. Whats wrong with php?
      Or just upset you spend all that time learning asp, while you could php-enable yourself in a week?

      --
      Hivemind harvest in progress..
    4. Re:So it is out... by Barryke · · Score: 0

      sorry seems i reply'd to the wrong post :S

      --
      Hivemind harvest in progress..
    5. Re:So it is out... by Barryke · · Score: 0

      Doom on my eyes. It WAS the correct post =] and i (seem to) suck.

      --
      Hivemind harvest in progress..
    6. Re:So it is out... by Rosyna · · Score: 4, Funny

      No, the correct response is, "So it is out... but will it get me laid?"

      The answer is, "Depends on if you wrote PHP5 or if you just write with it."

    7. Re:So it is out... by Anonymous Coward · · Score: 1, Funny

      No, the correct response is, "So it is out... but will it get me laid?"

      The answer is, "Depends on if you wrote PHP5 or if you just write with it."


      Humor me, but which group goes with which action?

    8. Re:So it is out... by Anonymous Coward · · Score: 2, Funny

      People who write with PHP are more likely to get laid, out of sympathy. Girls take one look at the mess that is PHP and say to the developers holy shit, I'm not sleeping with someone who can't make a halfway consistent API thanks.

    9. Re:So it is out... by maxdamage · · Score: 3, Interesting

      Me for one. My site is now running it!

    10. Re:So it is out... by Capt'n+Hector · · Score: 1
      ...And in both cases, you're a hopeless computer nerd, so regardless of status among your fellow coders, you're still not getting laid. You'd best get your satisfaction and comfort in the fact that at least women are USING your code. I dunno, I kinda get a kick out of that.

      Oh how I wish code was like cars...

      --
      Quid festinatio swallonis est aetherfuga inonusti?
      Africus aut Europaeus?
    11. Re:So it is out... by Anonymous Coward · · Score: 0

      i reply'd

      "I replied".

    12. Re:So it is out... by tokul · · Score: 1
      So it is out...
      ...but who will use it for another year or two?

      Anybody who gets latest version available. Even when it is marked as RC or first release. Even when some php scripts might break.

    13. Re:So it is out... by Kosgrove · · Score: 2, Interesting

      Let me preface this by saying that I take a moderate stance in the Windows/Linux never-ending holy war and while I haven't developed extensively in PHP or ASP, I think I have a decent grip on the capabilities of both.

      I found ASP MUCH easier to read. It's at least pseudo-OO. There's a reason why Visual Basic (and VBScript-based ASP) is so incredibly popular, even besides the prevalence of MS' operating systems: it's VERY well designed and very readable.

      Now, throw in ASP.NET, (which admittedly is a whole different language) and its compiled (rather than interpreted) pages and you've got a much better (IMHO) language. Also, the Interdev IDE is far better than any IDE I've seen for PHP. (Not that one doesn't exist - I just haven't seen one.)

      That said, I've found that PHP as a shell scripting language (In Linux of course) has allowed me to accomplish some system administration tasks that would've taken me forever using BASH scripting (because I know very very little).

    14. Re:So it is out... by kristaps.kaupe · · Score: 1

      ...but who will use it for another year or two?

      I will use!

    15. Re:So it is out... by Misunderstood_Geek · · Score: 2, Funny

      It got me laid once ... but she was a hippie ... and she thought it meant People Helping People.

    16. Re:So it is out... by Technonotice_Dom · · Score: 1

      I am for one. I'm starting a new project that was going to originally be done in Java but as other users may want to run a free (as in freedom) language, I've decided I should be able to work it in PHP 5 as the object model's a bit better.

      Although it can't compare to Java for a lot of things, it'll do the job for me where PHP 4 wouldn't.

    17. Re:So it is out... by jayminer · · Score: 1

      What? You say that VB is readable? If's and End If's or this kinds of blocks are totally unreadable by me. They make a total mess. Infinitely many characters just for opening and closing a block?

      Holy C's (and derivatives) block approach { and } are much better read by me.

      I can't imagine why and how people say Visual Basic is easy and readable. It's a total mass and mess of unneeded blocks.
      If you're a Microsoft guy (no troll here), why don't you go with C# and get some benefit from what Sun has been doing the research and Microsoft is implementing?

    18. Re:So it is out... by Kosgrove · · Score: 1

      I learned programming in C++ (using vi, too), and I did not like the word-y blocks VB uses either at first. But I've since grown to like it. Here's why:

      You know what kind of control statment you're ending: If/End If, Do/Next. With {} you have to keep track of that yourself.

      As much as I like the power of C++, they did some truly stupid things when they designed the language. How could they not put a native string type in there? Now there's a million string class implmentations (including the STL's, which isn't always compatible with other stuff) and no consistency.

      Since I'm a consultant, I don't get to dictate the language for clients. But I'm not sure I would want to use a .NET language if I HAD the choice because of an article I read on Joel on Software. It appears from what Joel says that the .NET platform isn't going to be around for very long, while the VB6 platform is extremely tried, tested, and it works.

      I'll easily admit that VB's OO features are far weaker than C++'s, but the ease of developing UI's,the error handling, and the IDE (particularly the debugger) are absolutely spectacular. If there's a language that's got similar capabilities for *nix, I'd love to know about it. That's Linux's strength and weakness of course - that there's no universal UI and no universal API associated with the OS (kernel) itself.

    19. Re:So it is out... by blix5 · · Score: 1

      PHP and languages with similar syntax (C++, C, JavaScript) can all be easy to read.

      It's mostly up to the coder to make that happen. A lot of the C++/PHP code that you see is the product of people trying to be 'clever and boastful,' rather being productive and friendly to the people that will, at a later time, have to trudge through that code.

    20. Re:So it is out... by tomhudson · · Score: 1
      Kosgrove wrote:
      You know what kind of control statment you're ending: If/End If, Do/Next. With {} you have to keep track of that yourself.
      there are 2 solutions to this:
      1. folding editors
      2. use the "} // write a comment about what we're ending
      and
      As much as I like the power of C++, they did some truly stupid things when they designed the language. How could they not put a native string type in there? Now there's a million string class implmentations (including the STL's, which isn't always compatible with other stuff) and no consistency.
      Designing a string class that does what you want without a bunch of bloat to include all things to all people is consistent with the design goals of C and C++ - speed and flexibility.
      I'll easily admit that VB's OO features are far weaker than C++'s, but the ease of developing UI's,the error handling, and the IDE (particularly the debugger) are absolutely spectacular. If there's a language that's got similar capabilities for *nix, I'd love to know about it. That's Linux's strength and weakness of course - that there's no universal UI and no universal API associated with the OS (kernel) itself.
      The "universal API" is the web browser. This is Microsoft's biggest fear - that the underlying OS will become irrelevant. Too bad for them that its already happened.

      Coding for the the web browser is simple, and you can use any language you want, including compiled languages like C and C++, and scripting languages like php.

  2. Goodbye Perl? by FyRE666 · · Score: 3, Interesting

    This may well sever my last remaining link with Perl. While I used to ride the camel for web and shell scripting, I've now moved entirely to php for the web, and mostly php for shell scripting, with Perl used when its extra speed is useful. Presumably compiled php will eclipse Perl for scripting use now though, so (on Linux at least) I'll probably convert fully. Pity I have to stick with sed, awk and shell scripts on our old HPUX servers though...

    1. Re:Goodbye Perl? by KevinKnSC · · Score: 5, Interesting
      I agree, this makes it hard to justify something besides PHP in a lot of situations.

      It's too bad the compiler is $399 per year, and only currently available on Linux. If it was a little less, and not licensed annually, I'd be uninstalling a lot of other development tools right now.

    2. Re:Goodbye Perl? by defsdoor · · Score: 2, Interesting

      I thought I was the only person that used php for scripting too. I've got a landline call rating system that runs superbly written entirely in php.
      It started out as a prototype but worked so well and fast that it stayed.

    3. Re:Goodbye Perl? by brunorc · · Score: 1, Troll

      For Perl it's not only speed, but regexp power (to name one of its advantages). And if you dip into some more sophisticated Perl engines (Apache::ASP, Embperl or Mason) you'll find that Perl - as a language - gives one flexibility and scalability. For example, when a lot of engines are at their top, Mason just begins to spread its wings. I started my web scripting with PHP, then came to CGI, and now I'm using Apache::ASP and Mason.

      And I simply don't understand why there is no difference between array and scalar.

      --
      Just finding inspiration, well, that's my excuse
    4. Re:Goodbye Perl? by Tyler+Eaves · · Score: 5, Informative

      Any decent language has full PCRE support these days. Perls days as regular expression king are in the past. Sure it may have set the standard for how it's done, but now it's no longer a selling point. Plenty of other nicer languages exist.

      --
      TODO: Something witty here...
    5. Re:Goodbye Perl? by Dr.Dubious+DDQ · · Score: 0
      I thought I was the only person that used php for scripting too.

      Me too - I've been using PHP for command-line stuff at least as much as I have for web interfaces, and even then I tend to try to design the PHP code so that as much as possible of it can be useful outside of a "web page" context.

      So, how much longer until someone writes a whole shell in PHP?...

    6. Re:Goodbye Perl? by mentatchris · · Score: 3, Insightful

      Perl is still an excellent option IMHO. For me, the most important feature of a language is the amount of support available. Perl has so much documentation scattered around the web, it's usually very easy to find an example or get help with a problem. Also, the books are now all on version 2+, meaning most of the bugs have been worked out. With my Safari access, I have years of resources at my disposal. While I appreciate all that PHP offers, I still haven't been convinced that it is good enough to make me switch. The resources out in the community are far too attractive for me to fight my way back up the learning curve.

      Plus, is there any greater comedian in the community than Larry Wall?

    7. Re:Goodbye Perl? by Pieroxy · · Score: 1

      Completely offtopic, but you are pointing to "http://www.javascript-games.org/" as your website, but this domain name is not registered... Weird. Are you the seller?

    8. Re:Goodbye Perl? by FyRE666 · · Score: 3, Interesting

      I don't think there's much of a learning curve going from Perl to PHP - the other way there would be though! PHP closely resembles Perl in many ways - it has certainly been influenced by it to a greater extent than any other language I can think of.

      I've been using Perl for around 10(?) years and while I appreciate its regex engine is faster than PHP, and the CPAN modules offer things PHP doesn't have (at present), you can put almost any web app together far faster with PHP than Perl. IMV this also goes for most database driven shell scripts.

    9. Re:Goodbye Perl? by MourningBlade · · Score: 2, Insightful

      Any decent language has full PCRE support these days. Perls days as regular expression king are in the past. Sure it may have set the standard for how it's done, but now it's no longer a selling point. Plenty of other nicer languages exist.

      C has full PCRE support. That doesn't mean its regexp support is royal.

      One of Perl's advantages is just how tightly integrated into the language regexps are. I haven't seen PHP5 yet, I hope it's better than PHP4. I'm just saying that PCRE support does not a good regexp language make.

    10. Re:Goodbye Perl? by LostCluster · · Score: 2, Funny

      $399 per year for nothing more than a compiler puts it at roughly at the same price as the entire Microsoft Visual Studio... seeing that you get about 2-3 years out of the typical VS release.

    11. Re:Goodbye Perl? by FyRE666 · · Score: 1

      Heh! That was my domain - I forgot to re-register it and some other outfit has snapped it up I think (it was getting a tonne of traffic too...) Screwed up there...

    12. Re:Goodbye Perl? by prockcore · · Score: 2, Insightful

      Plenty of other nicer languages exist.

      The biggest problem with PCRE in PHP is the escaping problem. PHP needs something so you don't end up with having to type \\\\ to match a backslash.

    13. Re:Goodbye Perl? by CyanDisaster · · Score: 1

      From what I understood, the compiler costs $399 and comes with a one year license. Whether the included license is a courtesy, or part of the cost is to cover the license, I don't know, but I don't imagine that you'd have to pay another $399 next year as well.

      Hope be with ye,
      Cyan

    14. Re:Goodbye Perl? by garaged · · Score: 1

      Come on, to backslashes is no more complex than "do2 or "for" !!

      --
      I'm positive, don't belive me look at my karma
    15. Re:Goodbye Perl? by Pieroxy · · Score: 1

      Time to change your sig ;-(

    16. Re:Goodbye Perl? by jejones · · Score: 1

      OK. Time for a Dixie Chicks parody...

    17. Re:Goodbye Perl? by xa0s · · Score: 3, Interesting

      I'm a longtime Perl programmer, and while I've seen Perl having been taken over by PHP on the web side of things, Perl still sees enourmous use in generic *nix system world. For example, in the company I work for we use many programming languages on many architectures, and Perl has consistently been the duct tape that ties them all together. We even have a dedicated infratructure team that maintains the various releases of Perl and our core Perl APIs. I dont think Perl will ever completely die(), but it's use in certain areas has certainly diminished.

      Although I haven't done much more than quick hacks to PHP scripts, I still prefer to use Perl for everything. Every time I've tried to seriously use PHP for web stuff, I always go back. I end up missing the syntax, idioms and CPAN. I suppose its just a matter of personal taste.

    18. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      Perl still kicks the ass of pretty much every other language in terms of regexps. Why? Because of all those wonderful things in perlre that are marked "Highly Experimental." The ability to call code and other things from regular expressions enables enormous amounts of fun that simply aren't available in 99% of pcre implementations.

      And of course, Perl 6 will blow everything else out of the water.

    19. Re:Goodbye Perl? by XunilOS · · Score: 1
      (slightly off topic...)

      Pity I have to stick with sed, awk and shell scripts on our old HPUX servers though...

      Why? I guess if you're using HPUX 8 or something you're out of luck, but gcc, apache, etc. - i.e. everything you need to make PHP go - is all available for any remotely recent HPUX version... see http://hpux.cs.utah.edu/ if you haven't before.

      --
      -- -R
    20. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      Gotta pay money for the compiler?
      Hmm.. what's the matter, can't make money on OSS?

    21. Re:Goodbye Perl? by aled · · Score: 1

      Yours were Java games or Javascript games?

      --

      "I think this line is mostly filler"
    22. Re:Goodbye Perl? by LetterJ · · Score: 3, Interesting

      I do an *awful* lot of commandline scripting and have an experimental demo of doing PHP with HTA's as a GUI, giving you PHP without a web server, but with a GUI and still using HTML as the GUI language. It's actually pretty slick. You can build HTML forms that are processed by PHP scripts just like they would going through a web server, but run on the commandline instead. It emulates POST and I'm working on emulating XML-RPC next. I'm calling it PHUI (PHP HTA UI) toolkit.

    23. Re:Goodbye Perl? by Christianfreak · · Score: 4, Insightful

      Compiled PHP won't be much faster IMHO. If you want something compiled why don't you write your web apps in C? One of the main points about using an interpreted language is that your app can be changed quickly on the fly which is often nessicary in web development. Doubtful that people are going to start compiling PHP apps anytime soon.

      PHP for shell scripts? That's just strange. ick.

      PHP 5 still lacks namespaces, that alone is a good reason not to switch. That and CPAN (and no before you mention it, PEAR doesn't come anywhere close)

      Since I always get the same replies everytime one of these posts comes up I'll answer them all now.

      I use PHP everyday, its part of my job (sysadmin/web-developer). Have been using it for 4 years. At first I thought it was alright, but the more I've used it the more I loathe it. I find it inconsistant and I find at its core everything that goes against what a well designed language should be.

      Perl code is not ugly unless you make it ugly. You can make C or PHP ugly as well.

      Perl can be used in projects with multiple developers, I work with one other developer on a regular basis, sometimes two. At the beginning of the project we plan core modules and set APIs and coding style, much like I would expect anyone would do for any language.

      IMHO and experience mod_perl is faster than PHP especially in larger apps. /flame on

    24. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      It isn't complicated. It's brain dead. Everything related to quoting strings in PHP is stupid.

    25. Re:Goodbye Perl? by Christianfreak · · Score: 1

      I don't understand why people say this? I use the Pear DB module when I'm writing with PHP for database abstraction. After adding extra queries because it converts my explicit '0' to null all the time (thus messing up my NOT NULL fields), or its use of ! as a place holder when ! should be availiable as 'NOT' in queries. Or tracking down an obscure function name that acts nothing like any other function, or keeping track of variable names since I can't stick like variables in their own name space. And tracking down bugs when I accidentally use the same name. Or extra code to remove magic_slashes .... etc, etc, etc. Does one really save any time or typing? I certainly don't.

      Perl DBI just works and doesn't corrupt my data. CGI (and Apache::Request in mod_perl) just works and doesn't corrupt my data. Namespaces just work. Strict coding can be enforced and works. Global variables just work. It works! And it doesn't annoy me all the time!

    26. Re:Goodbye Perl? by goon · · Score: 0, Troll

      wheres the php equiv of CPAN, Pear? One of the reasons that php is superior to perl is running a site on mswindows. Perl on win32 platforms (sans cygwin) is a joke.

      --
      peterrenshaw ~ Another Scrappy Startup
    27. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      PHP+Internet Explorer? Sounds cool in an evil way.

      However, I'm not sure why you need to emulate a POST for a HTA. Is this because you are reusuing other PHP code?

    28. Re:Goodbye Perl? by a_karbon_devel_005 · · Score: 1

      In what way? it's pretty freaking straightforward. The original poster who said something about \\\\ was clueless. WHEN do you ever need four backslashes in PHP for a backslash literal? in my experience, never. It's very simple. Double quotes are interpolated. Singles are not. Use \' and \\ in singles, and that's all you need OR use them plus the other myriad of combos with double quoted strings. VERY SIMPLE. jesus christ, if you can't handle escaping some characters you're NOT meant to be a programmer.

    29. Re:Goodbye Perl? by Anonymous Coward · · Score: 1, Funny

      I've been using Perl for around 10(?) years... ...you can put almost any web app together far faster with PHP than Perl.

      You have ten years of Perl experience and still can't write Mason or Embperl apps as fast as PHP?

      Way to waste a decade. You are officially the worst Perl programmer ever.

    30. Re:Goodbye Perl? by mentatchris · · Score: 1

      It really is all about CPAN.

    31. Re:Goodbye Perl? by metasyntactic · · Score: 2, Informative

      Microsoft makes all its compilers available for free. You can find them all at http://msdn.microsoft.com

      -- Cyrus (http://blogs.msdn.com/cyrusn)

    32. Re:Goodbye Perl? by jswhiting · · Score: 2, Informative

      zend is offering a package that includes the zend accelerator, studio, & encoder for $295 or $450 with upgrades/bells/whistles per year, as long as your company is pulling in less than 100k per year.

      i dont work for zend; i bought the package (think its a good deal).

      if you insist on free software, there are a number of free php code caching apps as well as development ides available...

    33. Re:Goodbye Perl? by LetterJ · · Score: 1

      Well, on my blog, when I came up with this, I called it another Frankenstein project that I did because I could, not because it's a good idea.

      I'm emulating POST because I'm not sending the data to any web server anywhere. Rather, I'm taking the data in the form and passing it to an arbitrary commandline. In this case, it's "php-cli.exe formprocessor.php", which receives the contents of the fake POST. If it was HTA->web server, it wouldn't be any different than a normal web app. However, this gives you completely local PHP apps without having to open a single port in any firewall, while still retaining the HTML form method of building forms. It's a complete hybrid.

    34. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      Hi. I am a 1000-word string containing single quotes, double quotes, and backslashes. You must now spend half an hour individually escaping my entities because PHP has no single-quote style here-doc or any other method of delimiting large literals beyond output buffering.

    35. Re:Goodbye Perl? by AstroDrabb · · Score: 1
      Umm, he said Visual Studio, which is _far_ from free as in beer or as in speech. My company pays a few grand per year for an MSND licence for me and we all wish it were free to develop under MS as it is for Linux.

      Oh, by the way, do they have a C++ 6 or VB 6.0 compiler for free? I was not able to find it.

      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    36. Re:Goodbye Perl? by ErikZ · · Score: 5, Funny

      I have a very difficult time debugging perl scripts and figuring out how to do new things with it.

      PHP is more like a more friendly. Allows you to fumble around and then gives you informative errors. Kind of like your first Girlfriend. :)

      Well, the first week of her anyways.

      --
      Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
    37. Re:Goodbye Perl? by prockcore · · Score: 1

      The original poster who said something about \\\\ was clueless. WHEN do you ever need four backslashes in PHP for a backslash literal? in my experience, never.

      Your experience must be very limited. I was talking about PCRE. You have to escape everything *twice*. Once because PHP wants it escaped, and again because PCRE wants it escaped. Thus you get \\\\ just to match a single literal backslash in a regular expression.

      Have you never used preg_match or preg_replace?

    38. Re:Goodbye Perl? by takshaka · · Score: 1

      Perl DBI just works and doesn't corrupt my data. CGI (and Apache::Request in mod_perl) just works and doesn't corrupt my data. Namespaces just work. Strict coding can be enforced and works. Global variables just work. It works! And it doesn't annoy me all the time!

      I agree. Unlike the grandparent, my nine or ten years of Perl use have led me to the conclusion that Perl works for you while PHP works against you. It's easier and faster to build robust HTML::Mason apps than PHP apps.

      Incidentally, I don't have experience with PEAR::DB, but adodb has done alright by me when I've had to use PHP.

    39. Re:Goodbye Perl? by MourningBlade · · Score: 3, Interesting

      Of course, she could be like Oracle, where she knows you're not doing it right, but has no suggestions whatsoever on where the problem might lie or how to fix it.

      Perl can be difficult to debug. It's one of those "wide or deep" questions: you can have an extremely simple syntax, and require a ton of code to describe what you mean to do, or you can have a rich syntax and say it more succinctly (even more descriptively, given skill on the part of the writer and the reader).

      All languages are a tradeoff. Glad PHP is where you want to be on that spectrum.

    40. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      OK, I guess I just think the DOM form object is more pleasant than a POST request.

    41. Re:Goodbye Perl? by slarshdot · · Score: 0

      I've complied PHP scripts, although it I only noticed slight speed increases. It's still esseciential in protecting my code.

      I'm current working on a project with 10 PHP developers that has a lot of web based interfaces and lots of batch scripts. The ability to share all the classes works brilliantly. Usually I would write the scripts in perl, but I havent noticed any speed differences in execution and the development time has been decreased dramatically!!

      I don't need anything like CPAN, I'm a true coder I can write anything I put my mind too. All I need is php.net.

      Overall you can't give an informed opinion until you've tried everything out, so give it a go!!

      --

      I'm not out of order! You're out of order! The whole freaking system's out of order!
    42. Re:Goodbye Perl? by scrame · · Score: 2, Informative
      Yep. All the Visual Studio 2005 betas are free here

      and also Creative Expression

    43. Re:Goodbye Perl? by AstroDrabb · · Score: 1
      /flame on
      I don't think there is any reason for flamming. CPAN is just great. When I first tried Perl and CPAN, my jaw hit the floor when I saw how much Perl code was available to me through CPAN. Now if PHP had an equivelent of CPAN, then Perl might have something to worry about. My main coding is in C, C++, Java and Mono/C#/.Net. Though it is hard to beat Perl and CPAN for many tasks that would take tons of code in other languages.
      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    44. Re:Goodbye Perl? by senzafine · · Score: 3, Interesting

      At my work we develop alot in PHP. Me and another co-worker started creating a repository of classes which we use like there's no tomorrow. We've gotten a really good system of consistent coding style. Though I can still tell what lines he's written and I've written. But they're formatted the same so a third developer can come in and understand it all as well.

      As far as PHP for shell scripting. I use it when I just need something quick. I'll sometimes go back and change it to a different language when I have time.

      To make a long post short...I'm estatic about php5 being released!

      --
      Better than Flickr - Manage, Share, Archive
    45. Re:Goodbye Perl? by LetterJ · · Score: 1

      That's how I'm emulating it. Onsubmit, the form's action value gets used as the processing script and it reads in the form object, making a name=value, ini-style file. The javascript then executes the appropriate script and waits for the script to finish. It then reads in the output of the script and acts on it. I thought that that process would be ridiculously slow, but it's just as fast as any web app. My goal was to make it as "web-like" as possible, while eliminating the web server. It's not the only way to skin this highly inappropriate cat. Basically, you just need a communication layer between your HTML/Javascript and your PHP. I used the lowest common denominator, the filesystem, since both Javascript(through COM in HTA) and PHP can access it easily.

    46. Re:Goodbye Perl? by a_karbon_devel_005 · · Score: 1

      Oh? PHP doesn't have a heredoc style quoting system? Did you even think about putting "heredoc site:www.php.net" into google before you typed? ;)

    47. Re:Goodbye Perl? by yerfatma · · Score: 1
    48. Re:Goodbye Perl? by a_karbon_devel_005 · · Score: 2, Informative

      I eat hat now.

      Yes I do use preg_match() quite often, but apparently I've never needed to match a backslash. I humbly apologize, and realize you are correct.

      HOWEVER, other than that I can't think of anything too hard about the quoting style of PHP. You've got interpolated, non interpolated, and HEREDOC. *shrug*

    49. Re:Goodbye Perl? by Anonymous Coward · · Score: 1

      I don't need anything like CPAN, I'm a true coder I can write anything I put my mind too. All I need is php.net.


      A "true coder" who doesn't know the value of code reuse of debugged and standard libraries? Let's write our own TCP/IP stacks while we're at it! I'm sure the next developer will know what we were trying to do!

      And I wonder if your scripting development speed increases has anything to do with having 10 PHP developers and a set of PHP classes?
    50. Re:Goodbye Perl? by Anonymous Coward · · Score: 1, Interesting

      So why does slashdot keep advertising for commercial companies again?

    51. Re:Goodbye Perl? by blankslate · · Score: 5, Interesting

      I'm surprised with all this PHP vs PERL talk that no-one's mentioned that ZEND says you can use PERL from within PHP, as of release 5. Does no-one else find this highly interesting? Anyone tried it yet?

      --
      ---- death to all fanatics
    52. Re:Goodbye Perl? by Christianfreak · · Score: 1

      there's nothing wrong with the mysql_* functions etiher, other than the lack of placeholders, its just that if you want to migrate to something more robost you have to rewrite large portions of your code.

    53. Re:Goodbye Perl? by johnnyb · · Score: 1

      Actually, theoretically high-level languages have much better opportunities available for optimization because the compiler has access to more semantic details, and therefore can do more tricks on your behalf. Unfortunately, research in computer science has not been met w/ engineering in many instances, probably because we're getting so much out of chip engineering currently it's not currently worth the effort.

    54. Re:Goodbye Perl? by Christianfreak · · Score: 1

      Me and another co-worker started creating a repository of classes which we use like there's no tomorrow.

      Good! Think about releasing them if they are good enough, PHP as a whole could only be improved by more classes. It sounds like you know how to program which is more than a lot of PHP people can say (maybe I've just met the wrong ones ;-) ).

      As far as PHP for shell scripting. I use it when I just need something quick. I'll sometimes go back and change it to a different language when I have time.

      I still say 'ick'. Perl has a lot more native shell like functions and better input/output control IMHO. Still for most stuff I use a real shell script. But to each his own I guess.

      To make a long post short...I'm estatic about php5 being released!

      And that's great. I think that PHP has its uses even if I personally dislike it. Its the "X language is so great that Y language is dead" statements that get under my skin. And the people who say such things are typically blind the short comings of X language and don't really know anything about Y language.

    55. Re:Goodbye Perl? by AstroDrabb · · Score: 1
      Once they are no longer beta, they will not longer be free as in beer and most certainly not as in speech. So anyone that uses them now are just free beta-testers for MS. Also, you said
      Microsoft makes all its compilers available for free
      Where are the Visual C++ 6, VB 6, etc compilers for free?
      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    56. Re:Goodbye Perl? by AstroDrabb · · Score: 1

      Oh, and about your Creative Expression link, according to the site:
      a free download version is available to _existing_ users
      Just how is this free to non-existing users?

      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    57. Re:Goodbye Perl? by senzafine · · Score: 1

      Good! Think about releasing them if they are good enough

      There's one I plan on doing that with. The rest already exist and are probably a little more robust. Ours are streamlined to suit our needs. I do hand them out on #php though :).

      I still say 'ick'. Perl has a lot more native shell like functions and better input/output control IMHO. Still for most stuff I use a real shell script.

      Yea. If I was as fluent in Perl as I am in PHP I think I could leverage it's strengths more often. It's on my list of to-dos :).

      --
      Better than Flickr - Manage, Share, Archive
    58. Re:Goodbye Perl? by scrame · · Score: 1
      Ugh, why do i even bother with this wasteland?

      Microsoft Visual C++ Toolkit 2003.

      As a service to the many loyal users of Expression, a free download version is available to existing users of the product for either Microsoft Windows or Mac OS. Follow Windows or Macintosh download link below to complete the registration survey and download the software.

      Non existing users have to sign up for a passport account. Or login with a hotmail account. How heinous.

      yes I know its free as in beer, not free as in speech. That isnt what the question was asking.

      Yep, studio 2005 is in beta. I wouldnt claim to know what MS's step will be once its in full production.

    59. Re:Goodbye Perl? by Old+Wolf · · Score: 1
      At first I thought it was alright, but the more I've used it the more I loathe it. I find it inconsistant and I find at its core everything that goes against what a well designed language should be.


      I'm glad you said that! I thought it was just me. Once the excitement of being able to write a socket-using application in 5 minutes wore off, and the hours of fiddling and adjusting to fix all the little unexpected behaviours set in (not to mention the entire rewrite each time a new PHP version comes out), it sucks.
      3 cheers for C++ and portability and reliable behaviour. Now if only there was a good sockets library..

    60. Re:Goodbye Perl? by csnydermvpsoft · · Score: 1

      3 cheers for C++ and portability and reliable behaviour. Now if only there was a good sockets library..

      Java?

    61. Re:Goodbye Perl? by dekeji · · Score: 1

      All languages are a tradeoff.

      Yes, we know that from economics. However, just because there are some languages that may each be optimal under different circumstances doesn't mean that every language is optimal for something.

      Perl can be difficult to debug. It's one of those "wide or deep" questions: you can have an extremely simple syntax, and require a ton of code to describe what you mean to do, or you can have a rich syntax and say it more succinctly (even more descriptively, given skill on the part of the writer and the reader).

      Perl's syntactic problems go beyond having an expressive and complex syntax: there are a number of syntactic misfeatures in Perl that only cause problems but don't make Perl code any more succinct. The good thing is that Perl6 is addressing many of them, which in itself tells you that Perl5's syntax could benefit from improvement.

    62. Re:Goodbye Perl? by Tony-A · · Score: 1

      Microsoft makes all its compilers available for free

      That's a Microsoft "all".

    63. Re:Goodbye Perl? by ErikZ · · Score: 1

      Why would Microsoft care about users that don't exist?

      --
      Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
    64. Re:Goodbye Perl? by spacefight · · Score: 1

      You're not the only one. PHP together with cron is as powerful as perl is. I've been using PHP to boost out several tousands SMS within one weekend, using an opensource php class for submitting messages trough an XML API to the SMS Provider. Worked like a charm.

    65. Re:Goodbye Perl? by raju1kabir · · Score: 2, Funny
      However, this gives you completely local PHP apps without having to open a single port in any firewall

      Your firewall blocks traffic from 127.0.0.1 to 127.0.0.1? You're hard core, man.

      --
      "Patriotism is your conviction that this country is superior to all other countries because you were born in it." -- GBS
    66. Re:Goodbye Perl? by slarshdot · · Score: 0

      There are plenty of php classes type sites out there that have lots of collections of scripts that do everything you need. The main reason there is less of a need for something like cpan with php is its so feature rich to begin with.

      And the reason things are being developed so quickly is becuase there are so many classes that we wrote that share so many functions between the web interface and the command line.

      Of course we're using pure OOP so that always helps.

      --

      I'm not out of order! You're out of order! The whole freaking system's out of order!
    67. Re:Goodbye Perl? by FyRE666 · · Score: 1

      Unfortunately our HPUX servers operate as a cluster with shared RAID and are mostly there to run our company's commercial sales system. I have root access, and have built perl and installed all the CPAN modules I needed on it, however the commercial software maintainers wiped it all, claiming it was not part of our support agreement. It's a real PITA, however I have gotten around most of it by simply mounting almost all the HPUX's filesystems onto one of the Linux machines, and run all the scripts on that ;-) (also don't have to use the braindead shell and crippled toolset that comes with HPUX)...

    68. Re:Goodbye Perl? by fucksl4shd0t · · Score: 2, Interesting

      If you properly abstracted your db layer in the first place, then you're safe to use mysql_* without having to worry about rewriting large sections of your code later.

      Pet peeve: all these open source PHP applications that embed every single fucking query right where they use it. Inheritance works great for this, and I've got an object model put together that solves this problem nicely. Two classes, one that you derive from. That one you call for your data, whatever you need. It (dbPage or dbCategory, depending on what it is, you have to write this one, it's not generic) calls dbBase->Query for the data you requested. dbBase returns true on success, or an error on failure. On success it stores the results in a member, which you then dbBase->Results to get. dbBase also manages the connection and so forth.

      Later on, when I want to migrate to another database, I only have to rewrite *one* class, and PHP happens to provide a number of nice features that'll let me choose which version of the class to use at runtime. And even then, I don't have to rewrite the whole class, just three core methods, all of the others of which are just error-handling based on results from those methods.

      Really, there's very little excuse in this day and age for having to rewrite large portions of your code just because your database changed. Don't we all have some generic db abstractors laying around in our pet languages by now? I've got 'em for php and python (the only languages I use anymore).

      --
      Like what I said? You might like my music
    69. Re:Goodbye Perl? by fucksl4shd0t · · Score: 1

      I still say 'ick'. Perl has a lot more native shell like functions and better input/output control IMHO. Still for most stuff I use a real shell script. But to each his own I guess.

      I can't imagine using php for shell scripting, but for any shell script of any sizeable workload, you've got to load an interpreter of some sort. I just find Python easier to work with and provides mostly the same level of I/O ease that Perl does. The thing about Python is how much time it cuts back in debugging, for me. The problems I had with Perl had to do with how many ways you can typo on a line and still have it be syntactically correct. Psychologically, it can be hard to find these typos because you *know* they're syntactically correct. Python won't let you do that. By enforcing coding standards (not the best, granted, but at least some) the interpreter actually helps you debug shit, because if you typod something, it doesn't run and you get umpteen fucking errors about it.

      And that's great. I think that PHP has its uses even if I personally dislike it. Its the "X language is so great that Y language is dead" statements that get under my skin. And the people who say such things are typically blind the short comings of X language and don't really know anything about Y language.

      I have to admit, those things irritate me too. I haven't yet learned a language that I haven't wished I had easy access to in the last year, and that includes BASIC and Pascal from back in the days. Yeah, I know, I can get that stuff somewhere if I dig hard enough, but the problem is library support and community. Without supporting libraries and an active community, a language is dead or dying, or just starting up, and therefore a pain to use for anything useful and modern.

      Ummm, with one minor exception. I'm fucking happy I don't have to use C anymore. ;)

      --
      Like what I said? You might like my music
    70. Re:Goodbye Perl? by vandan · · Score: 1

      Extra speed under Perl?
      Are you sure?
      PHP has always been 50% faster for me, and I assumed because this was because it was lighter and had a less complicated object model.

      What are other people's thoughts on the speed of Perl 5.8.x verses PHP 4.x? I'm sure PHP is faster...

    71. Re:Goodbye Perl? by stesch · · Score: 1
      Any decent language has full PCRE support these days. Perls days as regular expression king are in the past.

      You're right. There are other implementations of regular expressions which are faster.

    72. Re:Goodbye Perl? by julesh · · Score: 1

      I've been using the same release of Visual Studio for 7 years, and have little desire to upgrade. I don't see why many people would. The new features beyond VS97 just aren't worth it, IMO.

    73. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      So what? Heredoc strings in PHP follow the same escaping rules as double-quoted ones. I don't see how that solves the problem of having to write a horrendous amount of backslashes.

      I love PHP and use it every day, but I have to admit that placing regexps out of strings and into the syntax would make some of them much more readable.

    74. Re:Goodbye Perl? by LetterJ · · Score: 1

      Mine? No. The tons of people that get completely locked down when another ./er shows up and blocks everything? Yes. The simple reality is that lots of people are starting to block absolutely everything in order to prevent infection.

      Besides, if the app is a simple one, but needs to be secure, avoiding sending packets at all is a good thing and avoiding having to install a web server makes for a simpler install.

    75. Re:Goodbye Perl? by jwinter1 · · Score: 1

      First of all, PHP 5 has decent backwards compatibilty so your PHP 4 code will probably just work under PHP 5. But mostly, WHY DO YOU HAVE TO REWRITE YOUR CODE JUST BECAUSE THERE IS A NEW VERSION OF PHP? You do realize that Zend won't send officers to your house to remove your PHP 4 binaries and source, right? (They'll only take your PHP/FI binaries and that's for your own good.)

      --
      Anything you can do, I can do meta.
    76. Re:Goodbye Perl? by md81544 · · Score: 1

      Or she could be like Microsoft applications... you do one thing wrong and she turns blue and dies...

    77. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      Hi, I'm a 1000 word string. I have no business being hardcoded into a program's source code.

    78. Re:Goodbye Perl? by AstroDrabb · · Score: 1

      Again, where is the free Creative Expression? It is only for existing users. Where is the free Visual C++ _6_ complier or VB _6_ complier?

      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    79. Re:Goodbye Perl? by saintp · · Score: 1

      PHP does have an equivalent to CPAN: PEAR.

    80. Re:Goodbye Perl? by Christianfreak · · Score: 1

      Maybe you should ask the PHP developers. All I know is that more than once a bunch of production websites broke when I updated even just a minor version. I can't imagine the crap I'd have to put up with upgrading to PHP 5

    81. Re:Goodbye Perl? by jwinter1 · · Score: 1

      My main point was that no one is forcing you to upgrade to PHP 5. PHP 4 is still supported, and I'm willing to bet, will be for quite a while.

      And if you're talking about the register_globals change from PHP 4.2, well, you're better off with register_globals being off by default. I would like to know what the differences that broke your production websites.

      --
      Anything you can do, I can do meta.
    82. Re:Goodbye Perl? by hesiod · · Score: 1

      > So why does slashdot keep advertising for commercial companies again?

      Because those commercial companies come out with products that we would be interested in. Look at the logo, it doesn't say "News for Nerds, Stuff that's free."

    83. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      "One of the main points about using an interpreted language is that your app can be changed quickly on the fly which is often nessicary in web development. Doubtful that people are going to start compiling PHP apps anytime soon."

      We looked at it, but the tradeoff is extremely weak compared with the cost of adding hardware or tweaking the various applications in the chain.

      "PHP for shell scripts? That's just strange. ick."

      Why? I've heard tell of people using regexes here to parse log files rather than straight string parsing. When I moved from Perl to PHP I was using regexes before I found that the regex engine was around 10% the speed of snipping up strings.

      "That and CPAN (and no before you mention it, PEAR doesn't come anywhere close)"

      Hmm, this _is_ a little bit of apples and oranges. CPANs been around for quite a few years, and PEAR has only really been effective for the past year or so.

      "I find it inconsistant and I find at its core everything that goes against what a well designed language should be."

      And those would be?

      Right now I don't think anyone knows what a good language should be...everyone has an approach that gets touted, but experience is shoving me in the direction of multi-paradigm languages; ie doing what suits the job in hand.

      There's no mistake that it's inconsistent; after the relative snowballing of V3 it accreted functions at an increasing rate...some useful, some not so useful and some that entirely broke internal conventions. So occasionally you have to remind yourself of the substr argument order...

      "Perl can be used in projects with multiple developers"

      Hmm. We pair program in PHP on a regular basis and have developed a method of working that means we can be both effective at the same time; We also work on APIs and core functionality...This point is isolated.

      "IMHO and experience mod_perl is faster than PHP especially in larger apps."

      Doing what?

      The John F. Kennedy has a greater ground speed than a Corvette if you drop both of them in the middle of the Atlantic.

    84. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      "All I know is that more than once a bunch of production websites broke when I updated even just a minor version."

      Register Globals? That was the biggie at one point, and bit us in the ass, but it was a worthwhile upgrade.

      I'm a bit worried about the fact that you don't actually know what broke.

      "I can't imagine the crap I'd have to put up with upgrading to PHP 5"

      Only your own vague hostility, it would seem.

    85. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      "I would like to know what the differences that broke your production websites."

      I'm not the intended person for this note, but I have come across stale dependencies in the setup for PHP can cause Apache to panic spectacularly, which has prompted me upgrading those first when shifting up versions.

      Last time it happened, it was a CURL library.

    86. Re:Goodbye Perl? by LWATCDR · · Score: 1

      Well you could always right a php frontend for gcc.

      Actually I would like to see a PHP modual for PostgresSQL.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    87. Re:Goodbye Perl? by Christianfreak · · Score: 1

      And if you're talking about the register_globals change from PHP 4.2, well, you're better off with register_globals being off by default

      This was (and is) a huge problem. I got my job right after that change and the previous programmer always had them on. While I code for them to be off I have to leave them on since out of 300+ sites we host there is still a bunch of code out there that uses it.

      register_globals was never a good idea to begin with, it will be difficult to get over it! :)

    88. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      What you're saying in this post is a contradiction of your parent post. First you said you don't need CPAN because you're a "true coder", now you're saying there's lots of sites with stuff you need and php has lots of features.

      And what abou these features? These "features" are just a proliferation of namespace-poluting functions that aren't object oriented. They would be better kept, say, in a dynamically loadable library, module, or package. Then you could go to this site, say, a comprehensive archive network, and download these modules and packages and install them as you needed them. You could even make an automatic tool that downloaded, built, tested, and installed these packages. Or you could make an installer that installed pre-compiled binaries. That'd be pretty slick. I'd call the first one "cpan" and second one "ppm".

      And yes, if you make a sufficiently loosely-coupled library of classes that don't include any display or UI code, development of a front end, be it console or browser, should be pretty quick. I'd devide it into three major components: the first, let's call it the "Model", contains the business logic. The second, call it the "Controller", deals with handling the user input and output. The third, call it the "View", handles display and formatting output. I'd call this a "design pattern" and call it "MVC" for short. Then for the View I'd use some templating and for the Model and Controller I'd use as many third party packages I could download. I'd tie the Controller to Apache, a CGI object, or command-line script, and marry the Model to the database. Sounds pretty productive, regardless of language. Especially for projects lasting over a year and are tens of thousands of lines long, regardless of language. Actually I probably wouldn't attribute any long-term productivity gains to the language, because the real work came out of design and planning.

    89. Re:Goodbye Perl? by raju1kabir · · Score: 1
      Your firewall blocks traffic from 127.0.0.1 to 127.0.0.1? You're hard core, man.
      Mine? No. The tons of people that get completely locked down when another ./er shows up and blocks everything? Yes. The simple reality is that lots of people are starting to block absolutely everything in order to prevent infection.

      Maybe I'm just naïve, but I don't think anyone actually does that. Seems like it would break an awful lot of things, and not solve any problems.

      Besides, if the app is a simple one, but needs to be secure, avoiding sending packets at all is a good thing and avoiding having to install a web server makes for a simpler install.

      If your machine "sends" localhost packets anywhere, then your troubles may be bigger than you think.

      --
      "Patriotism is your conviction that this country is superior to all other countries because you were born in it." -- GBS
    90. Re:Goodbye Perl? by Anonymous Coward · · Score: 0

      FYI, try PriadoBlender for a free php compiler.

  3. Let the PHP flame war begin! by Saeed+al-Sahaf · · Score: 1, Funny
    Let the PHP flame war begin!

    While I use PHP quite a bit, I think I'll wait a few months / versions befor deploying this...

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    1. Re:Let the PHP flame war begin! by blackmonday · · Score: 4, Funny

      I would prefer to say "Begun, the PHP flame war has".

    2. Re:Let the PHP flame war begin! by Anonymous Coward · · Score: 0

      if ($language == PHP) {
      flamewar();
      }

    3. Re:Let the PHP flame war begin! by trevorrowe · · Score: 1

      While I use PHP quite a bit, I think I'll wait a few months / versions befor deploying this...

      And for good reasons.. I have been using the latest version of php5 now and there are a few nasty bugs, especially with serialization. I still prefer perl for just about everything (minus small webscripts).

  4. Thanks PHP team by Dreadlord · · Score: 3, Informative

    Doing PHP development has been my main source of income for a couple of years, the new release will make my life much easier, especially the new OOP model, let's just hope that web hosts will upgrade soon.

    Thanks again PHP team!

    --
    The IT section color scheme sucks.
  5. Short answer... by Anonymous Coward · · Score: 1, Insightful

    Is this another sign that dynamic languages are the future?

    Yes.

  6. PHP is moving in the right direction by jbellis · · Score: 4, Insightful
    PHP5 looks a lot cleaner than 4, at the expense of backwards compatibility. Some will probably make a lot of noise about this latter, but it's necessary when changing (improving) the language this much.

    Remember, nobody's forcing you to upgrade that site running perfectly well under php4, and you probably shouldn't.

    1. Re:PHP is moving in the right direction by andig · · Score: 5, Informative

      One of our design goals for PHP 5, was to keep backwards compatibility as much as possible. Actually most PHP 4 sites run out of the box with PHP 5. If there are problems, there's a compatibility mode (configurable via php.ini) which makes the object-oriented model behave the same as in PHP 4.
      Bottom-line: Very few people will have problems doing the upgrade. Of course you should thoroughly test your site before upgrading.

    2. Re:PHP is moving in the right direction by Snoopy77 · · Score: 1

      As far as I understand it, backwards compatibility was not sacrificed, perhaps given a couple of slaps in the face but most php4 sites should be able to run in a php5 environment.

      --
      "She's a West Texas girl, just like me" - G.W Bush Iraqis
    3. Re:PHP is moving in the right direction by Anonymous Coward · · Score: 0

      Mod parent up, this person appears to be none other than Andi Gutmans, also known as the ND in ZEND, co-creator of PHP!

    4. Re:PHP is moving in the right direction by LostCluster · · Score: 1

      But, unless you plan on using some of the new features in PHP5, you might as well stick with PHP4... no need to take an unneeded risk on new software. Let somebody else do the bug discovery... :)

    5. Re:PHP is moving in the right direction by Dr.Dubious+DDQ · · Score: 4, Interesting

      I can vouch that, to the extent that I've been trying it, all of my PHP4-developed code has been working fine with the PHP5 interpreter so far. As andig suggests above, I suspect that only a few cases where someone relies heavily on 4.x "quirks" will cause a problem.

      I was slightly disappointed to find that the "native Java/PHP integration" support was quietly dropped from PHP5 - I'd been wanting to play with that. Oh well.

    6. Re:PHP is moving in the right direction by Nicholas+Evans · · Score: 1

      Wrong. If you're using a shared hosting account for your site, you /can/ be forced to upgrade to php5. The system admins don't go around and ask every user 'do you want php5?', now do they?

    7. Re:PHP is moving in the right direction by Sokie · · Score: 4, Informative

      A kind of slick way to test your existing code and applications is to do a little -fu in your apache.conf and set it up so you have two instances of Apache running on different ports but using the same DocumentRoot. One instance running the PHP4 module and one the PHP5 module. I've got this set up on my Gentoo dev server with PHP5 running over port 8080. Just add an :8080 to the URL and your page is running through PHP5, I've found it quite useful for playing around and testing. If anyone wants more details just e-mail me. And if you're not using Apache, you can probably set up a similar thing, but I can't really help you there.

      --
      ------
      Where are the slash-groupies? I distinctly remember being promised slash-groupies!
    8. Re:PHP is moving in the right direction by garaged · · Score: 1

      Get your 24/7 internet conection and put your box inther, with your web page :-)

      --
      I'm positive, don't belive me look at my karma
    9. Re:PHP is moving in the right direction by Anonymous Coward · · Score: 0

      You should be able to set the php.ini compatability mode to be, by default one. And then at the customers leiser and request, the admins can configure the setting on a per-site basis. Not that hard, now is it?

    10. Re:PHP is moving in the right direction by RazzleFrog · · Score: 2, Informative

      I would normally agree with you but the testing on PHP 5 has been so extensive and has gone on for so long (2 or 3 Betas and 3 RC's) that I am pretty confident in it. I have been using it since Beta 2 and I haven't had any problems with it. Premature releases are so ingrained into our mentality that we sometimes forget that there are quality developers out there who do do thorough testing.

    11. Re:PHP is moving in the right direction by Anonymous Coward · · Score: 0

      hmmm...Gentoo user and PHP fanatic at the same time....why does that not suprise me?

    12. Re:PHP is moving in the right direction by loginx · · Score: 1

      Can this behaviour be enabled on a per-script basis using ini_set()?

      I have many PHP applications on my servers that really differ a lot in nature but if I can use an ini_set() in the ones that are broken w/ php5, I'll just upgrade this week and everything will work perfectly...

    13. Re:PHP is moving in the right direction by Anonymous Coward · · Score: 0

      Seems that yes, that extension was scrapped, however Zend was adamant that they were working with Sun to develop a new Java extension, when they were here in Montreal for Conf. PHPQuebec, 2004.

      Maybe "andig" can confirm/deny.

      S
      (posting anonymously to preserve moderation )-: )

    14. Re:PHP is moving in the right direction by andig · · Score: 5, Informative

      Yes I can confirm. We, as in Zend, are working with Sun on the JSR 223. The result will be a Sun reference implementation of the standard (based on PHP) which defines what the interface between PHP (and other scripting languages) and Java will look like.

    15. Re:PHP is moving in the right direction by andig · · Score: 1

      No because ini_set() happens too late in the game (it needs to be set before the compiler kicks in). However, you can user per-directory httpd.conf settings or .htaccess

    16. Re:PHP is moving in the right direction by fucksl4shd0t · · Score: 1

      What about when the webserver is running php in cgi mode? My host is doing this (don't know why, those bastards, but other than that caveat it's a wonderful service), but it'll probably be awhile before they upgrade.

      --
      Like what I said? You might like my music
    17. Re:PHP is moving in the right direction by davegaramond · · Score: 1

      I will still wait for a year or two though. The PHP team is notorious for breaking compatibility even between minor versions. I had several days of headaches a few months ago dealing with 4.2-4.3 migration. Defaults are changed/switched, path info not working, other changes of behaviours, some warnings becoming fatal error, etc etc. Don't even want to think about 4.3-5.0 for now...

    18. Re:PHP is moving in the right direction by Huogo · · Score: 1

      Yes... because my home DSL connection can upload a 2 MB/sec. Hosting the site yourself at a reasonable speed is not an option for most people.

    19. Re:PHP is moving in the right direction by Anonymous Coward · · Score: 0

      Now if it was Gentoo and Perl, then you'd be on to something.

    20. Re:PHP is moving in the right direction by pacman+on+prozac · · Score: 1
      all of my PHP4-developed code has been working fine with the PHP5 interpreter so far

      Tip from a German magazine a coupla years ago, to make your PHP classes work in PHP4/5, write them in this format:
      class foo {

      function foo($args) // php 4 constructor
      {
      $this->__construct($args);
      }

      function __construct($args) // php 5 constructor
      {
      //do stuff
      }

      }
      If you need a destructor too, call it __destruct() and use register_shutdown_function in the php 4 constructor.
    21. Re:PHP is moving in the right direction by Dr.Dubious+DDQ · · Score: 1
      Yes I can confirm. We [...] are working with Sun on the JSR 223. The result will be a Sun reference implementation [...] which defines what the interface between PHP [...] and Java will look like.

      (Sorry - just trimming for space). Very nifty! Is there any timeline (however rough) for this, or at least a website or mailing list where interested parties might watch for news?

      (My own backstory - I'm one of those "learn by doing" types. Copying pointless or irrelevant code out of a manual teaches me nothing, so in order to learn, I need to have a real use for what I'm doing [and I have absolutely no use whatsoever for a simplistic "employee tracking database" or "change making program" in Java...]. I currently have no need for a completely-java project, but I'd like to learn Java, so I'd find it useful to be able to interface Java with PHP - which I use very frequently - to play with it. Using Java modules to speed up e.g. mathematical calculations or image handling...or for GUI interfaces...would be useful. Or so *I* think, anyway.)

    22. Re:PHP is moving in the right direction by sootman · · Score: 1

      I used to have Apache 1.3, Apache 2, and IIS (PWS, actually)--all with PHP--running on my Win98 ThinkPad and all were sharing the same DocumentRoot/wwwroot, running on :80, :85, and :8080. Good times. :-)

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  7. Cross Platform? by blackmonday · · Score: 2, Interesting

    How is the cross platform ability of PHP? Can I write an app un Linux and comile and run it on OS X and Windows? Does it need a runtime, or is it bundled? Seems like an intriguing alternative to .NET.

    1. Re:Cross Platform? by Dreadlord · · Score: 5, Informative

      Yes the official interpreter is cross-platform, it is available for *nix and Windows.

      Check out the downloads section at php.net for Windows binaries and *nix source, and here you can find more details on PHP under Mac OS X.

      As for the compiler in the story, I haven't tried it before so I don't know.

      --
      The IT section color scheme sucks.
    2. Re:Cross Platform? by drinkypoo · · Score: 1

      Clearly you did not read the story submission, or you would have seen this link.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    3. Re:Cross Platform? by Aeiri · · Score: 1

      Pretty soon /. will just be another message board, with each post completely unrelated to the article because nobody will read it.

      Can you not even read the TITLE of the /. article now?

      PHP 5 Relased; PHP Compiler, Too

    4. Re:Cross Platform? by KevinKnSC · · Score: 1

      The new compiler (you know, the one mentioned in the news item) doesn't say anything about being able to compile on one system and run elsewhere, but it uses gcc so it should be possible to target another architecture, in theory. Whether or not the Roadsend compiler supports that is another question.

    5. Re:Cross Platform? by Dreadlord · · Score: 1

      Sorry for replying to my own post, but that compiler isn't free, and it's only available for Linux, however, the mainpage says that Windows and Mac OS X ports will be available soon.

      --
      The IT section color scheme sucks.
    6. Re:Cross Platform? by ergonal · · Score: 0

      Yeah yeah, sorry, I'll just crawl into a corner and die now.

    7. Re:Cross Platform? by ZorbaTHut · · Score: 1

      I personally know (mostly the hard way :P) that saying "It's all cross-platform! We promise!" doesn't always mean it *is* cross-platform.

      However, a few months ago I moved an (admittedly small) webapp from Windows apache to Linux apache, and the only change I needed to make was switching all my include backslashes to frontslashes. Which I should have done to start with, since frontslashes work on Windows.

      So that cross-platformability seems pretty reliable. :)

      --
      Breaking Into the Industry - A development log about starting a game studio.
    8. Re:Cross Platform? by man_ls · · Score: 3, Informative

      Very cross-platform...obviously some things like file paths might have to be changed to reflect the filesystem they run on top of (/usr/bin/whatever vs c:\program files\whatever) but with few exceptions, PHP code written on any OS will work on any other one.

    9. Re:Cross Platform? by Philosomatographer · · Score: 1

      Had you used Java, you would not even had to have changed the slashes in your includes. Has anybody had a look at JSP2.0 and Servlets 2.4? Especially with the new (ok new new) XML syntax, and the expression language and Standard Tag Libraries, JSPs are far simpler yet more powerful than PHP pages. That is, of course, if you actually design your application, and don't place business logic in your pages. (A nasty habit that PHP coders seem to love doing).

    10. Re:Cross Platform? by jmertic · · Score: 1

      For us, it was great until PHP 4.3.7 and PHP RC3 introduced this bug for all Win/PHP/IIS/MySQL installations. This is a very annoying bug that has been marked bogus by the developers and still exists in the 5.0 Final. I can't move forward at all ( even to 4.3.8 to which has security updates ) until then. We're sticking at 4.3.6 for now; I can't have Access Violation error at the bottom of every page.

    11. Re:Cross Platform? by dave420 · · Score: 1
      I wrote a script for my ipod to parse the itunesdb and allow regular-expression pattern matching on song details, and rip the matching mp3s off to the hard disk (tagged with id3v2 tags). It's in PHP, and runs under windows, linux and osx perfectly. PHP is really cross-platform, which is cool :)

      The runtimes are available, and for the command-line tools, all you need is the PHP executable and the php library (on windows, php.exe and php5ts.dll).

    12. Re:Cross Platform? by ZorbaTHut · · Score: 1

      I suppose - except (1) the server is extremely low on RAM, and I've never seen a JRE that isn't a RAM hog, and (2) I don't particularly like Java.

      --
      Breaking Into the Industry - A development log about starting a game studio.
  8. the past is the future by ChipMonk · · Score: 5, Insightful

    Is this another sign that dynamic languages are the future?

    I'm starting to think there are no new ideas any more, just re-hashes of old ideas. Unix, almost 35 years old, looks to be once again the wave of the future. LISP is still teaching us lessons. And the command line is still the most powerful sysadmin tool we have.

    1. Re:the past is the future by Anonymous Coward · · Score: 0

      And Turd Ferguson is still a funny name.

    2. Re:the past is the future by D-Cypell · · Score: 5, Funny

      I think I might even start porting some of my code to punch cards, by the time they return to the mainstream I could be a 6-figure consultant.

    3. Re:the past is the future by LostCluster · · Score: 1

      I'm not sure what the term "dynamic language" means anyway...

      PHP's far from the first language to have an interpreter and get a compiler, far from the first language to accept extentions, and far from the first language to be cross-platform... none of these are new concepts.

    4. Re:the past is the future by Anonymous Coward · · Score: 1, Insightful

      It's important to remember that while each of these seem to be just rehashes of the old, that in reality major changes have been made, that make them much better then the old versions.

      Now that at first doesn't seem to waylay your point, but it's important to remember that many small changes in the end give a huge result which is of the same scale as the paradigm shifts you were looking for. If you don't believe it, go back to one of the really old systems and see for yourself.

      As for new ideas, well I think the distributed computing systems are coming up well now, I suppose the idea is quite old. But till not all to long ao implementation was far from easy or cheap. As such I think you could consider it as a newcomer then.

      Quickshot

    5. Re:the past is the future by eidechse · · Score: 1

      I'm not sure what the term "dynamic language" means anyway...

      Generally, it refers the type system; i.e. the language is dynamically typed (as opposed to statically typed).

      Not to be confused (though it often is) with weak typing.

    6. Re:the past is the future by stonecypher · · Score: 1

      Unix, almost 35 years old, looks to be once again the wave of the future

      This post is significantly older than unix is. Cicero started it; they more things change, the more they stay the same.

      --
      StoneCypher is Full of BS
    7. Re:the past is the future by Anonymous Coward · · Score: 0

      FWIW, a "Dynamic Language" has dominated the low-end programming market for years. Maybe you've heard of Visual Basic?

    8. Re:the past is the future by Anonymous Coward · · Score: 0

      I'm starting to think there are no new ideas any more, just re-hashes of old ideas.

      Nah. You'll just have to wait the next 35 years before the todays new ideas get rehashed and start to sound actually good..

    9. Re:the past is the future by ChipMonk · · Score: 1

      Hehe... well, I didn't say that all the old ideas were the best. Just that some of the best ideas are turning out to be (relatively) ancient.

    10. Re:the past is the future by XeRXeS-TCN · · Score: 1

      This post has largely turned into an attempt to pull up the most unlikely archaic technologies and make jokes about them coming back to the mainstream, but in actuality it's a very valid point.

      PHP *isn't* the first language to come up with a lot of principles, that much is true. It isn't like it's even the first incarnation of the language in itself, it is simply the next version. But it adapts and improves a lot of the fundamental principles that were set down in languages such as Perl. That's not to say that it has totally superceded Perl, I know people will continue to use it for years to come, but it's taking the best lessons from languages like it, and moving from strength to strength. It's like many of the principles in books like "The Art of Unix Programming", which explains the importance of learning the lessons of good program design, and building on the very strong framework that Unix originally set down, all those years ago.

      With the addition of the (admittedly proprietary) compiler, I think it has nowhere to go but up, and really can begin to match those dynamic languages which can run standalone as well as in a web context. It's certainly within business interests and finance to buy licensing, and if there is that much call for it, I'm sure someone could create a free software alternative.

    11. Re:the past is the future by killjoe · · Score: 1

      It is a shame that people are still trying to rewrite lisp and smalltalk and still not getting it right.

      --
      evil is as evil does
    12. Re:the past is the future by M.+Baranczak · · Score: 1

      How's dynamic typing different from weak typing? I thought they were the same thing.

    13. Re:the past is the future by Anonymous Coward · · Score: 2, Informative
      Static/dynamic dictates whether the typing happens at parse/compile time or at run time. Weak/strong dictates what to do when small type-mismatches arise. C is the classic (mostly) weakly-typed language. You can do "double x = int_variable;". You can do "void *blah = &int_variable;". You can do all sorts of crazy stuff.

      Here's a handy table:
      Dynamic/weak: PHP
      Dynamic/strong: LISP
      Static/weak: C
      Static/strong: Haskell

    14. Re:the past is the future by CableModemSniper · · Score: 2, Informative

      In a really simplified explanation:
      Strongly typed - the identifier is typed
      Dynamicly typed - the data (object) is typed
      Weakly typed - the operations on the data are typed

      --
      Why not fork?
    15. Re:the past is the future by evronm · · Score: 1
      I'm starting to think there are no new ideas any more, just re-hashes of old ideas. Unix, almost 35 years old, looks to be once again the wave of the future. LISP is still teaching us lessons. And the command line is still the most powerful sysadmin tool we have.

      I'm inclined to agree, but I should add that Unix, Lisp, and the command line solved the problems for which they were designed very well. As a consequence, it will take a lot to supplant them, and IMO that's a good thing.

      How many times in your career do you want to have to learn a whole new interface to do something you can already do quite well?

    16. Re:the past is the future by ThisIsFred · · Score: 2, Interesting

      Considering the problems with the shelf life of various recordable optical storage, that may be where we all end up!

      --
      Fred

      "A fool and his freedom are soon parted"
      -RMS
    17. Re:the past is the future by eidechse · · Score: 1

      The two previous replies pretty much cover it.

      If you like, here's something I said about this a while back...but I think AC's list above better illustrates the point.

    18. Re:the past is the future by Anonymous Coward · · Score: 0

      From many lisper's perspective, unix sorta supplanted them. Unix is best considered as a language similar to lisp. The shell prompt is akin to the lisp repl prompt. The commands are akin to lisp functions. Using lisp interactively is like using unix interactively (only the lisp command names make sense, mostly).

    19. Re:the past is the future by rasilon · · Score: 1

      They are already back, just in the form of CDs and DVDs. A media which encodes data as physical holes in it... (or tricks the reader into thinking there are holes).

    20. Re:the past is the future by Junks+Jerzey · · Score: 1

      Generally, it refers the type system; i.e. the language is dynamically typed (as opposed to statically typed).

      The type system is part of it, but it's more an overall philosophy: Make the language flexible and useful without worrying about how to turn it into efficient machine code. Or at least don't worry about that at all until the language is well designed and already proven useful.

      Other things you'll see in some dynamic languages are interactive command shells which allow quick testing, the ability to redefine modules or functions on the fly without having to reload the entire program, and access to the compiler at run-time.

    21. Re:the past is the future by Anonymous Coward · · Score: 0

      Other things you'll see in some dynamic languages are interactive command shells which allow quick testing.

      These are also standard for modern static languages like ML and Haskell. Don't judge all static typing by Java's braindead design...

    22. Re:the past is the future by ehiris · · Score: 1

      That isn't funny, it's more like informative:
      http://www.research.ibm.com/resource s/news/2002061 1_millipede.shtml

    23. Re:the past is the future by ehiris · · Score: 1
  9. PHP5 by mfh · · Score: 4, Interesting

    Some folks were suspicious of PHP5, and being a longtime PHP programmer, I am very pleased with the changes and additions in PHP5. Can't wait to test it out. Personally, I'm not sure if I'll use *all* of the new stuff, yet I'm sure I'll have to play with the coolest additions for the hell of it, and sort out what I'll be using and what will remain vestigial in my scripts. I will add that some of the previous PHP version quirkiness seems to be fixed.

    I am certain this is not the last we'll hear about PHP5 on Slashdot, yet I am only hoping that it's creative/cool stuff, and not security problem/exploit stuff.

    I can't wait to see what kinds of changes I can make to my content management system that PHP5 will bring.

    --
    The dangers of knowledge trigger emotional distress in human beings.
    1. Re:PHP5 by Anonymous Coward · · Score: 0

      Sure, but can PHP do THIS....

      http://siamesestew.no-ip.org/

      I don't think so!!

  10. Hurray! by AcornWeb · · Score: 0, Offtopic

    Now all we need is for Cpanel to officialy support it and I'll be able to upgrade all my software to use it; finally ...

    --
    Your Windows PC is my other computer.
  11. PHP Object Model by Eberlin · · Score: 3, Interesting

    A good reworking of the PHP object model was definitely in order. Inheritance was a bit weird, destructors were odd to work with, and there weren't ways to declare stuff private.

    The bigger question is compatibility. Will older code be ok? When will mainstream hosts migrate to the newer version? It'll be scary to find systems borken because of version updates.

    As for a compiler, I'm not sure I'm comfy with the idea. Always figured if you wanted to write code for native compilation, you'd hack in C or maybe C++. Not that PHP wouldn't have its uses...as PHP is really handy and greatly increases the speed of development.

    1. Re:PHP Object Model by dave420 · · Score: 1

      Older code will work fine. You can make PHP5 act like PHP4 on OOP via the .ini file, and most other code works straight away. I upgraded a server at work from php4 to php5, and had to change nothing.

  12. PHP compiler is nice, but expensive! by MisterJones · · Score: 5, Informative

    http://www.roadsend.com/home/index.php?pageID=faq

    $400 for the license, which is only good for one year. After that, it won't compile until you renew.

    Doesn't seem worth it for the casual hobbyist...

    1. Re:PHP compiler is nice, but expensive! by YetAnotherAnonymousC · · Score: 1

      Yow. For that price it doesn't seem worth it for *anyone*.

    2. Re:PHP compiler is nice, but expensive! by LetterJ · · Score: 1
      Bloody hell. One day I'll learn to either type properly or preview.

      PriadoBlender

  13. Re:holy shit batman! by Anonymous Coward · · Score: 0
    now you have something to do for the next 10 hours! please dont rack yourself on this one...

    <? echo "hello world!"; ?>
  14. What the Frick is a dynamic language? by skybuck · · Score: 0

    Euhm a script language ?

    1. Re:What the Frick is a dynamic language? by brunorc · · Score: 1

      Maybe a language with dynamic typing? AFAIK languages with static typing are considered as more useful...

      OK. C advocates, reload your rifles ;)

      --
      Just finding inspiration, well, that's my excuse
  15. Been using it the past few weeks by killermookie · · Score: 1, Interesting

    Ever since I picked up George Schlossnagle's Advanced PHP Programming as few weeks back I've been using PHP5 RC3 to get used to the new Object-Oriented layout. It's my first real step into using strong OO in my web application and I'm learning a lot!

  16. Compiled vs Cached by chill · · Score: 4, Interesting

    If speed and not closed-source is your main consideration, then how does the Roadsend compiled code stack up against interpreted code fed through the Zend Accelerator, the Turck MMcache or other caches?

    mmCache is OSS and free (as in beer), which is a big plus in my book.

    -Charles

    --
    Learning HOW to think is more important than learning WHAT to think.
    1. Re:Compiled vs Cached by Anonymous Coward · · Score: 0

      Turck has an encoder as well.

      Apart from the fact that turck was bought out by Zend - because they have another product, Zend Accelerator.

    2. Re:Compiled vs Cached by Anonymous Coward · · Score: 0

      Roadsend is a front end to GCC and produces native code. What should interest you is Sterling Hughes work on project-pint which is PHP on parrot, and I think he delivers a paper on that at OSCON this month. I use APC with PHP4, which bypasses parsing and compilation and loads preprocessed scripts from memory, it can't be any faster than loading bytecode from a ramdisk IMHO.

  17. PHP Compiler by Anonymous Coward · · Score: 0

    The Roadsend compiler isn't a true compiler. As far as I can tell it compiles PHP scripts into scheme and is still interpreted at run-time using a scheme interpreter.
    The fact that it creates an executable file doesn't mean it's not interpreted.

    1. Re:PHP Compiler by KevinKnSC · · Score: 3, Informative
      From the site:

      The compiler generates binary code that is executed directly by the CPU, avoiding the intermediate process of compiling to bytecode and running in a virtual machine

      That's a true native compiler to me.

    2. Re:PHP Compiler by Anonymous Coward · · Score: 0

      Link please? I've gone up and down the Roadsend pages and I see nothing to suggest this.

    3. Re:PHP Compiler by Waffle+Iron · · Score: 1
      The Roadsend compiler isn't a true compiler. As far as I can tell it compiles PHP scripts into scheme and is still interpreted at run-time using a scheme interpreter.

      The bigloo scheme compiler can compile the scheme to native machine code that runs without an interpreter.

  18. $$ for compiler by hkb · · Score: 2, Interesting

    Uhm, the compiler is priced at a low, low introductory price of $399. I don't think it'll be taking the *NIX world by storm any time soon, or cause mass adoption to PHP executables anytime soon.

    --
    /* Moderating all non-anonymous trolls up since 2004 */
    1. Re:$$ for compiler by NoMercy · · Score: 2, Informative

      Well that makes it pretty worthless.. on a plus side if they sell it there's likely support and other features which would make php more of a option in business.

      And if they can do it, why can't we... how long till GCC compiles php code?

    2. Re:$$ for compiler by Saeed+al-Sahaf · · Score: 2, Interesting
      Well that makes it pretty worthless.. on a plus side if they sell it there's likely support and other features which would make php more of a option in business.

      Not really. Most people interested in compiled PHP are working in the "enterprise" market. $400 for a commercial compiler is not that bad.

      And if they can do it, why can't we... how long till GCC compiles php code?

      I think most people who have the skills to write something like a compiler generally want to make a living from their work, hence the $$. But, I agree it would be nice...

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    3. Re:$$ for compiler by prockcore · · Score: 5, Interesting

      Uhm, the compiler is priced at a low, low introductory price of $399. I don't think it'll be taking the *NIX world by storm any time soon, or cause mass adoption to PHP executables anytime soon.

      The price is nothing. If you're running a site that requires compiled PHP, $399 is a joke. The thing holding the compiler back isn't the price, it's the lack of Solaris support.

    4. Re:$$ for compiler by Muerte2 · · Score: 4, Funny

      I think most people who have the skills to write something like a compiler generally want to make a living from their work

      You mean except for those dirty commie gcc guys!

    5. Re:$$ for compiler by hkb · · Score: 0, Flamebait

      I was talking about mass adoption to PHP executables, not a website, nor anything about a dying OS from the overpriced Microsoft of the UNIX world.

      --
      /* Moderating all non-anonymous trolls up since 2004 */
    6. Re:$$ for compiler by Anonymous Coward · · Score: 0

      Except those of us who make a living by actually doing *WORK* instead of working once and hoping to get rich by charging over and over again for something that costs nothing to copy. And not even giving out the source code.

    7. Re:$$ for compiler by Anonymous Coward · · Score: 0

      PHP is a pain in the ass under Solaris (when using the Sun ONE Web Server anyways). I'd advise against it for this reason.

    8. Re:$$ for compiler by gabe · · Score: 1

      No site should require compiled PHP code. If you need speed, get a cache extension like APC, Turck MMCache which are free, or Zend Accelerator or ionCube's accelerator if you require a commercial product with support.

      If you need even faster code, write a PHP extension (in C, compiled) to handle your resource-intensive functions.

      Both of those solutions are much more versatile than a compiler that doesn't support the full language.

      --
      Gabriel Ricard
    9. Re:$$ for compiler by Monkey-Man2000 · · Score: 1

      I ran into a similar problem that the linked page refers to while running a Java app on a Solaris server. The fix that solved my problem was to execute "ulimit -n 1024" in bash before starting the VM. Other shells have analogous commands. This makes the maximum number of file descriptors equivalent to what is the default under my Linux distro (i.e., 1024). This does not sound to me like a PHP problem.

      --
      This post was generated by a Cadre of Uber Monkeys for Monkey-Man2000 (603495).
    10. Re:$$ for compiler by Glock27 · · Score: 1
      You mean except for those dirty commie gcc guys!

      It should be pointed out that a lot of "those guys" work for RedHat (since it bought out Cygnus) and...actually get paid!

      What a concept! :-P

      --
      Galileo: "The Earth revolves around the Sun!"
      Score: -1 100% Flamebait
    11. Re:$$ for compiler by Just+Some+Guy · · Score: 1

      The thing holding the compiler back isn't the price, it's the lack of Solaris support.

      No, the thing holding the compiler back is the lack of freedom. Here's what I would tell my boss:

      "Yes, that could make our site run faster. However, realistically speaking, this compiler will probably never catch on in a big way. This means that we'll be tuning our code against the inevitable compiler bugs instead of more standard coding practices. When this compiler disappears from the market and we are no longer able to renew our compiler license, what do we do then? Pray that someone's written a competing and feature-complete Open Source compiler that we can port our code to in a reasonable amount of time, or go back to using non-compiled code with the same performance bottlenecks that we've been compiling away for the last two years?"

      No, I think we'll be taking a pass on this one.

      --
      Dewey, what part of this looks like authorities should be involved?
    12. Re:$$ for compiler by hkb · · Score: 1

      I think most people who have the skills to write something like a compiler generally want to make a living from their work, hence the $$.

      While true, I ask you then why GCC has such an enormous popularity? Being free is a large part of it, but it's not shoddy by any means.

      --
      /* Moderating all non-anonymous trolls up since 2004 */
    13. Re:$$ for compiler by Saeed+al-Sahaf · · Score: 1
      It should be pointed out that a lot of "those guys" work for RedHat (since it bought out Cygnus) and...actually get paid!

      See the post above that this interesting tid bit came from...

      --
      "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    14. Re:$$ for compiler by joshmccormack · · Score: 1

      And if they can do it, why can't we... how long till GCC compiles php code?

      The GCC has competitors, too. Price is not the only issue. And I've seen mention here of other PHP compilers.

  19. Awesome! by Anonymous Coward · · Score: 3, Funny

    Now that PHP has stopped imitating Perl, and started imitating Java, I can write some Java-look-alike code while still simple-mindedly sneering at that language as inefficient and bloated!

    1. Re:Awesome! by HydeMan · · Score: 1

      Surely you have missed all of the innovative features that PHP has introduced which have eclipsed the other languages/platforms. I mean, who can turn down a $400 compiler when compared to the pricey Java offerings (free compiler, free IDE, free libraries, free application server, etc). Long live PHP 5.

  20. PHP sucks, go VBscript!! by dj42 · · Score: 0, Troll

    hehe.

    --
    We are one consciousness experiencing itself subjectively. Back to you with the weather, Bob!
  21. A Book Recommendation by z0ink · · Score: 4, Informative

    For those who are not new to php, but wan't a good primer for PHP 5 I would definatly recommend this book by George Schlossnagle. Advanced PHP Programming was recently reviewed here and it was upon reading that review that I decided to pick up a copy. It serves as an introduction to OOP to those who are unfamiliar and does a good job in covering the specific mechanics of how things operate in PHP. The book even includes some good info on some Zend Engine hacking.

    --
    Steal This Sig
  22. Am I the only one... by jwthompson2 · · Score: 0, Flamebait

    Am I the only one who is troubled by the blend of proprietary and 'open' systems surrounding PHP? I mean a proprietary system, Zend, powers PHP, plus to get best performance I'm suppose to license another proprietary system? I am a big advocate of Free Software and feel uncomfortable using PHP even though it is a great tool because of the strange mixture of proprietary and open development. Maybe it's just me.

    --
    Even if I knew that tomorrow the world would go to pieces, I would still plant my apple tree. -Martin Luther
    1. Re:Am I the only one... by Neil+Blender · · Score: 1

      Am I the only one who is troubled by the blend of proprietary and 'open' systems

      I'm with you. I am even troubled by using my computer, what with all those patents and proprietary things under the hood.

    2. Re:Am I the only one... by cyberlotnet · · Score: 5, Informative

      PHP itself including the zend engine is 100% opensource, You can download the source you can browse the cvs to your hearts content and see everything.

      The products they produce to support the development of php the closed source.

      You do not need to touch, use or otherwise dirty your poor soul with any "non-free" software to use php.

      There is nothing wrong with this business model, get over it.

    3. Re:Am I the only one... by Anonymous Coward · · Score: 0

      The ZendEngine is free when used with PHP.

    4. Re:Am I the only one... by Dr.Dubious+DDQ · · Score: 2, Funny

      AUGH! And now I've violated your copyright by creating a derivative work by replying to your post without permission!

      (I'll stop now. It's just too easy to make fun of the current interpretations of "Intellectual Property"...)

    5. Re:Am I the only one... by Anonymous Coward · · Score: 0

      The ZendEngine is free when used with PHP.

      He's talking about Free not free.

    6. Re:Am I the only one... by doe · · Score: 4, Interesting

      Roadsend is a development house unrelated to the PHP development team. I doubt that their compiler would make any noticable impact since they don't support many of the PHP's most useful extensions. I have not tested it but it looks to me that the people that would be interested in this are those that want to close source their own PHP code so I guess its only fair to pay for it.

      Many useful PHP tools are open source. From the bytecode compiles such as APC and MMCache, debuggers (APD and XDebug).

      I see tha fact that there are some companies out there providing commercial tools for PHP developers as a good thing(tm).

    7. Re:Am I the only one... by drmike0099 · · Score: 4, Interesting

      There's certainly nothing wrong with this business model, although that's no reason to not be concerned about potential problems. As you said, they create a significant part of the core for PHP and make it open source and available for free, all of which is good. In a perfect world, this would be the perfect solution.

      However, it is right to be watchful (not necessarily concerned) when the core of an open-source app is created and driven by a for-profit company. Since they sell a lot of surrounding support applications to make their money, they are clearly driven at some level to pay for that development. At the very least, it means that any really good idea that they have will get turned into a commercial product instead of rolled into an open source solution. Again, perfectly fine business model, but not awesome.

      The other thing it does is that there is a subtle but probably powerful pressure pushing other developers working in the PHP space to consider not working there, because they will by definition start out behind this core company. It wouldn't hold off a determined company, but if a determined company began to come into the mix, it would be surprising if the core company didn't somehow use the fact that they are so essential to their advantage somehow. Without competition they can be magnanimous, but with it much less so.

      At any rate, I'm just pointing out that there's reason to keep an eye on it, even if nothing ever comes of it. It's also important to encourage more businesses to adopt this model so something as good as this can come along, and it's important for them to be watched by others to make sure they don't abuse it. The lessons of Microsoft, although in a different league entirely, are too strong to ignore.

    8. Re:Am I the only one... by trifakir · · Score: 1

      I can assure you that Zend as a company is very friendly to the open-source development and do their best to support it. They make their income from tooling around PHP, but why can IBM, Oracle make money from apache, and Zend not from PHP? Some time ago, they even changed their license (of the Zend engine) in a bow to the rest of the PHP developers. Open-source developers buy their food as well, right?

    9. Re:Am I the only one... by bofkentucky · · Score: 1

      Are you comfortable about using apache or mozilla? There are corporate influences (and corporate only features) in a lot of F/OSS projects. Covalent is the employer for a large part of the Apache core team and sells customized apache builds, Mozilla gets hacked by a NS/AOL team to produce the Netscape 7 series of browsers with added features that do not get ported back to the Moz trunk.

      Its nothing but the old GPL vs BSD license flamewars, I'm not about to rehash them here.

      --
      09f911029d74e35bd84156c5635688c0
    10. Re:Am I the only one... by ShadeARG · · Score: 2, Interesting
      The products they produce to support the development of php the closed source.
      This is part of the problem. While this isn't in itself a terrible practice, it does leave esoteric developers who prefer other different architectures out in the cold.
      There is nothing wrong with this business model, get over it.
      Exactly. It's not that we always want free beer, we just like to make sure that we can drink as much as everyone else. Now, if you could request a cross-compilation for a different architecture at no additional cost with the license, then we'd all be impressed.
    11. Re:Am I the only one... by Snoopy77 · · Score: 1

      How comfortable are you in knowing that your web hosting service uses Plesk, a closed source application?

      --
      "She's a West Texas girl, just like me" - G.W Bush Iraqis
    12. Re:Am I the only one... by Anonymous Coward · · Score: 0
      You know what? If you don't like what this company is doing, or will do in the future, don't download any of their future releases. The code you have will still work, and the PHP runtime you've downloaded will still function and be covered under the license agreement that was in place when you got it.

      I don't know why you're posturing with this internet watchdog pose, but don't get too self important. The people who make PHP have every business running their business as they see fit, and you should be grateful to them for opening the source, not suspicious of them. Who are you to question them? Do you submit patches? Are you a shareholder?

    13. Re:Am I the only one... by bobsledbob · · Score: 2, Interesting

      With your reasoning, there's reasons to be concerned about every open source software except those created in the basements of college dorms.

      Frankly, I don't disagree with you. You should be mindful of every piece of software you use, open or otherwise. But, your argument seems more about Karma Whoring than it does a real concern.

      I mean, seriously, what about the Apache Foundation? Where do you think they get their money from? Corporations using their products, right? Don't think they're influenced by said corporations?

      I frankly an very supportive of the Zend model of creating a business around open source. It's very pioneering, they've done a good job. I've used php since the PHP/FI (v2) iterations, and I'm still happy to continue using it.

      --
      Beware of geeks bearing formulas.
    14. Re:Am I the only one... by ErikZ · · Score: 1


      Nope. I love it. It means that there's enough free PHP stuff out there to get things done. And enough PHP business to employee full time PHP programmers.

      It sounds fantastic, and I'm very excited that these guys have managed to create jobs by writing useful tools.

      --
      Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
    15. Re:Am I the only one... by jwthompson2 · · Score: 1

      I would love to use another tool, unfortunately I had to make the decision to not use Webmin and its virtual hosting system because it doesn't provide the experience for my paying clients that they expect. I will gladly switch to a Free substitute once I have time to build one or someone else produces one that will meet the expectations of my clients.

      --
      Even if I knew that tomorrow the world would go to pieces, I would still plant my apple tree. -Martin Luther
    16. Re:Am I the only one... by Anonymous Coward · · Score: 0

      Since they sell a lot of surrounding support applications to make their money, they are clearly driven at some level to pay for that development.

      Um, if it becomes a problem, the vast multitude of php using companies and individuals fork the core and replicate the toolset in open source... seems like a pretty big stick to keep a commercial vendor that uses this business model ethical, and they do seem to have a pretty good track record.

    17. Re:Am I the only one... by Anonymous Coward · · Score: 0

      I'm just pointing out that there's reason to keep an eye on it

      Reminds me of this psycho church I accidently went into once (you know the type, where the church members are encouraged to speak gibberish into the air and flop around on the floor like a fish...). Well, one of the members got really agitated about some dude (apparently well-known -- I'd never heard of him) who criticized their church as being from the devil. This church member kept saying "We gotta keep an eye on that person. Somebody's gotta do something about him." I just kept thinking "What's this nut going to do...kill him?" Well, I wouldn't recommend going to that church, or hanging out with its church members. I guess the same thing goes for fanatics in all areas including open-source. Like, really, who cares? It's a FUCKING PROGRAM, not your family or friends. Find something important to be concerned about, not something stupid.

    18. Re:Am I the only one... by fucksl4shd0t · · Score: 1

      If you can read this, thank a teacher. If you are reading it in English, thank a soldier.

      Um, what soldiers should I thank? Just out of curiosity.... (And I could read before I started school. That's probably true of a lot of people around here)

      --
      Like what I said? You might like my music
    19. Re:Am I the only one... by drmike0099 · · Score: 1

      Comparing a model like Zend to a model like Apache is apples and oranges, frankly. Apache is an non-profit, organization that is both privately held (i.e. not publically traded) and does not sell products based on the apps that they create. Whenever any company starts requiring a profit from whatever they're doing, and worse if they are accountable for quarterly earnings reports for the stock market, there is the potential for what I will loosely call "bad things". I'm not suggesting Zend or other groups like MySQL or JBoss have done any bad things, but it's always possible.

    20. Re:Am I the only one... by Anonymous Coward · · Score: 0

      So...what you're saying is that you're okay with using a closed-source tool as long as there's no open-source tool that provides a comparable experience? Like, say, Linus choosing Bitkeeper over CVS?

      Not that I have a problem with that, but it definitely puts you at odds with a fundamental position of the FSF, with which you attempted to align yourself in order to bolster your objection to PHP.

  23. And the compiler is only $399.00! by DAldredge · · Score: 1, Troll

    And the compiler is only $399.00! And it only runs on x86, no Sparc, no AMD64, no PPC and no S/390 support!

    What a deal, what a deal!

    1. Re:And the compiler is only $399.00! by Anonymous Coward · · Score: 0

      That's $399/year (for up to 5 people).

    2. Re:And the compiler is only $399.00! by k98sven · · Score: 1

      What a deal, what a deal!

      Probably not a good deal for the guy who hacked together a PHP script to conveniently display his web-page of pet photos.

      But I could see how this could be a good deal for larger websites who're already running on x86. Given the speed and memory benefits of native code should have over interpreted, a sufficiently large website could save that sum on hardware upgrades alone.

      And I suppose that would be the intended customer.

    3. Re:And the compiler is only $399.00! by Anonymous Coward · · Score: 0
      And the compiler is only $399.00! And it only runs on x86, no Sparc, no AMD64, no PPC and no S/390 support!

      Just like Windows!

  24. not trying to start a flamewar by abes · · Score: 5, Interesting

    I used to really be into PHP. It was great for creating a webpage in little or no time. It's syntax, while maybe not perfect, was pretty good. Until, that is, I tried to start developing my own libraries, and ran into weird quirkiness with object design, and trying to figure out the best way to do libraries, etc. It looks like PHP5 might fix the problems I had with how objects worked, and I'm not sure if it was my own fault with the messy libraries I ended up with, or whether I didn't find the best way to do it in PHP, but I eventually moved to Python out of frustration.

    I had avoided Python for a long time, as I really disliked (and still do) the indentation-matters issue. But besides that, and its own set of quirks, it's a really great language, and for larger projects I have trouble even thinking about going back to PHP.

    I think the biggest selling point to PHP over other solutions such as Python is that its simple. You don't have to make a whole of choices. For example, with Python you have a large number of packages to choose from: Zope, mod_python, twisted.web, Python CGI, and a bunch of variants on these. While choice can be good, it can also be overwhelming (like how do you know which package to go with until you've tried them all?).

    I think I am not alone with some of difficulties I faced with PHP. So while it's great to hear that PHP has fixed many of its bugs, I think its worthwhile for people to also look at other solutions out there.

    Just my $0.02.

    1. Re:not trying to start a flamewar by Anonymous Coward · · Score: 0

      boo python, go ruby.

      it's even more functionally hip.

      as if scheme and perl made a baby.

    2. Re:not trying to start a flamewar by a_karbon_devel_005 · · Score: 1

      (cliff notes for parent) "I tried to do OO in PHP, but umm... it was confusing... and so I tried Python and I'm happy but now I'm happy the parts I didn't understand, err.... BUGS in PHP are worked out. Or not. Someone tell me if they are?"

    3. Re:not trying to start a flamewar by killjoe · · Score: 1

      Try ruby.

      --
      evil is as evil does
    4. Re:not trying to start a flamewar by Anonymous Coward · · Score: 0

      Maybe it was: "I tried to do OO in PHP, but umm, private methods and properties weren't available in PHP4"

    5. Re:not trying to start a flamewar by Anonymous Coward · · Score: 1, Funny

      It's syntax, while maybe not perfect, was pretty good.

      I think the biggest selling point to PHP over other solutions such as Python is that its simple.


      Your syntax, while maybe not perfect, sucks.

      /sorry, trying to be funny, failing miserably...

    6. Re:not trying to start a flamewar by Anonymous Coward · · Score: 0

      Though PHP's syntax may have some good parts (more familiar to C folks), for some parts it totally sucks.

      I really, really, really dislike the $ fixation inherited from Perl, it's just as annoying as Python's forced indentation, except that indentation is actually useful as well whereas the damn $'s are only annoying.

    7. Re:not trying to start a flamewar by Anonymous Coward · · Score: 0

      This is the most insightful post I've read yet in in this thread. I have been trying to figure out for a long time now the best way to maintain a library of my PHP code, and it's been absolutely draining. I'm glad I'm not the only one. You've made me seriously consider Python (and to take a peek at ruby, as some of the replies have mentioned).

      Thanks for posting this

  25. IonCube by JohnnyBigodes · · Score: 2, Informative

    Speaking of PHP compilers, there's a good and very affordable solution from IonCube as well.

    (no, I have no affiliation to them)

    1. Re:IonCube by mdfst13 · · Score: 2, Informative

      That's not a compiler in the same sense; it's an encoder. It allows people to store PHP scripts as a proprietary code (it's actually a lot like java). A true compiler creates native machine code.

    2. Re:IonCube by gabe · · Score: 1

      That's not a compiler, it's an encoder.

      A compiler, in the case of Roadsend's product, takes your PHP code and produces an executable binary that does not require a PHP interpreter to run.

      An encoder, like ionCube, Zend Encoder, etc., takes your PHP code and encrypts it so that you don't have to distribute the source. The encoded script still requires a PHP interpreter to run, and depending on the encoder product, a PHP extension to load the encoded script.

      --
      Gabriel Ricard
    3. Re:IonCube by pclminion · · Score: 1
      A compiler is technically just a translator, but the term most commonly refers to translation to a lower-level language. This need not be machine code, and it fact it hardly ever is.

      Java compilers produce Java bytecode. These programs are indisputably compilers, regardless of the nature of the instructions they produce.

      A true compiler creates native machine code.

      According to that definition, gcc itself isn't a compiler. It doesn't produce "native machine code," it produces assembly language. The assembler translates this to actual machine code -- you could accurately say the assembler compiles it, since it is again reducing from a higher-level language (human-readable assembly language instructions) to a lower-level one (binary machine instructions, essentially unreadable to most people).

      Think of compilation as "boiling down" from a complex language to a simpler one. The exact nature of the two languages doesn't matter -- it's still compilation.

  26. And the benchmarks by ElMiguel · · Score: 1

    That kind of price tag certainly provides an incentive for Roadsend to publish attractive benchmarks. I think it would be better to wait until there are independent benchmarks before we proclaim that "the performance is pretty good", as the submitter does.

    1. Re:And the benchmarks by FyRE666 · · Score: 1

      Why wait? There's an uncrippled evaluation version available on the site for free. I'm going to be compiling a LOT of code over the next couple of weeks to see if it's worth the money (and I can see where it could be VERY useful for me!) I have one of our servers running at high loads around the clock. It was looking like having to convert some of the code over to C to help speed things up, but this may give a bit of breathing room...

    2. Re:And the benchmarks by _typo · · Score: 1

      For the $400 it costs buy yourself some more memory or disk. Whatever is the bottleneck.

      --

      Pedro Côrte-Real.

    3. Re:And the benchmarks by FyRE666 · · Score: 1

      For the $400 it costs buy yourself some more memory or disk. Whatever is the bottleneck.

      Yeah, because $400 bucks will obvious more than double the power of a 4 way Xeon server, as we all know. It'll also more than double the speed of all the other servers running PHP apps - bargain!!

    4. Re:And the benchmarks by maddskillz · · Score: 1

      This is the problem. We have people who just hack at stuff at home, and don't understand that to a large organization $400 is not very much money.
      On my home computer, $400 will add a fair bit of speed to my system. To my server at work, if the compiler is as good as they claim, it would be better spent there.

  27. PHP5 is out... by TiggertheMad · · Score: 4, Funny

    ...does the FBI know about this? I have heard about some of the PHP busts in recent years, but all this talk about how 'powerful' this new PHP is makes me wonder how dangerous it is. It sounds expensive, too. I hope that this doesn't lead nice young kids, into a life of crime. Imagine, hords of young, glassy-eyed kids stealing stuff like...video games and movies just to fund their PHP habbit.

    Damn kids.

    --

    HA! I just wasted some of your bandwidth with a frivolous sig!
  28. Dynamic languages? by JessLeah · · Score: 2, Interesting

    What the heck does that mean? Is that a fancy way of saying "Compiled languages"? (I somehow doubt it) What precisely is meant here? Is a dynamic language "a language that can be either compiled or interpreted"?

    1. Re:Dynamic languages? by anim8 · · Score: 1

      dynamic language == scripting language

      perl, python, php, javascript, etc.

    2. Re:Dynamic languages? by Waffle+Iron · · Score: 5, Informative
      Dynamic language usually means "dynamically typed". This means a typed language that associates type information with data values, not with variables. (i.e, the language keeps track of types, but any variable can hold a value of any type)

      Sometimes, it also implies things like dynamically extensible type definitions at runtime, automatic memory management, and support for various functional-style features such as closures.

      Compiling a dynamic language to machine code is usually a challenging problem.

    3. Re:Dynamic languages? by CaptainPinko · · Score: 1

      I believe LISP and Scheme are dynamic to but I wouldn't call them scripting languages...

      --
      Your CPU is not doing anything else, at least do something.
    4. Re:Dynamic languages? by Anonymous Coward · · Score: 0

      Ralph Richard Cook: "I look at it this way. A lot of the new, interesting software is being written in a combination of two languages; a high-level, dynamically typed language with good built-in data structures and an environment for rapid software development, and a statically typed, heavily optimized language for performance. For a Python programmer, these two languages are Python and C. For the Common Lisp programmer, the two languages are Common Lisp and Common Lisp."

      Could've said PHP instead of Python. Could've said Scheme instead of Common Lisp. Interesting they didn't write the PHP compiler in PHP, isn't it?

    5. Re:Dynamic languages? by Anonymous Coward · · Score: 1

      "I believe LISP and Scheme are dynamic to but I wouldn't call them scripting languages."

      Actually, one common use of lisp is as an embedded language for scripting in interactive programs. EMACS of course is the ur-example of this. However, this is not the only use of lisp, and "scripting language" here means something different than PHP. perl or python

    6. Re:Dynamic languages? by Anonymous Coward · · Score: 0
      Compiling a dynamic language to machine code is usually a challenging problem.
      Bzzzt. Thanks for playing. It's actually fairly easy to compile a dynamic language. Just print your bytecode as C macros and #include a spiffy header that includes all the same definitions from your interpreter. I've done it; it works. Unfortunately, the problem with this approach is the fact that it's only slightly faster than invoking the interpreter. And for most things (i.e. not cpu intensive), the compilation delay overwhelms any benefit you may have gotten.

      The challenge part is writing a fast compiler. Among other things, this requires you to do extensive type inferencing and data flow analysis. In particular, it usually is very important to detect variables that can be modeled with primitive types (e.g. integers) and do as many native operations on the primitive types as possible instead of incurring the cost of a function call to do simple things like integer addition. This allows you to have the flexibility of the dynamic language and the speed of a static compiled language.

    7. Re:Dynamic languages? by Waffle+Iron · · Score: 1

      Yes, I'm well aware of those issues. I guess I just assumed that nobody would jump to the conclusion that I was talking about writing a slow compiler.

    8. Re:Dynamic languages? by Glock27 · · Score: 1
      Dynamic language usually means "dynamically typed".

      The definition I've always used is "a dynamic language permits a program to dynamically change it's behavior at runtime". Here is the best reference I could find. Dynamic typing is a separate (but related) issue.

      Note that Objective-C and Dylan both have efficiency as a major priority, including native compilation. Also Scheme (Bigloo is one example) has several implementations that generate native code.

      Java is dynamic (despite what the above link claims at the bottom;) and uses a static (strong) type system.

      --
      Galileo: "The Earth revolves around the Sun!"
      Score: -1 100% Flamebait
    9. Re:Dynamic languages? by Anonymous Coward · · Score: 0

      > Compiling a dynamic language to machine code is usually a challenging problem.

      Be that as it may, CMUCL, SBCL, and OpenMCL are all examples of compiled to machine language Common Lisp implementations. Allegro, LispWorks, and MCL would be examples of commercial Common Lisp implementations that compile to native code.

      In fact, CMUCL & SBCL do not even have interpreters. Every expresion is compiled before it is evaluated.

  29. PHP 5 Tutorials by aint · · Score: 3, Informative

    For a list of PHP 5 related tutorials and articles check out this faqt or simply look around the faqts PHP 5 section.

  30. "Student Suspended OverSuspected use of PHP" by Dr.Dubious+DDQ · · Score: 4, Funny
    Imagine, hordes of young, glassy-eyed kids stealing stuff like...video games and movies just to fund their PHP habit.

    Too late...

  31. PHP 5 Section on Zend.com by andig · · Score: 5, Informative

    If you'd like to see what's new in PHP 5, we got some of the leading PHP developers to write about new extensions they developed.
    I also posted the first chapter of my PHP 5 book in that section which gives an overview of what's new in PHP 5. This book will be part of the Bruce Perens series of Prentice-Hall and will therefore be open-source and freely accessible to anyone.

  32. the past is the future - give us a brake! by ongeboren · · Score: 1

    yes

    I am particularily excited about Scheme.. a language that do not support loops like while and for loops in C.

    But wait! Scheme understands a tail-recursion!! An infinite self-calling function that will reuse it's memory and never run out of it!

    Great! Writing meta-circular evaluators with Scheme used to be a didactic masterpiece of annoyance. Now we get it in production for real work!

    What's next? Perl compiler in Prolog?

    --
    First I wanted to be a chef. Then I wanted to be Napoleon. My ambitions have continued to grow ever since.
  33. Compatible? by mattwarden · · Score: 1

    Anyone have information on how PHP5 handles code written for PHP4 and below? And, just to be clear, I'm talking about first-hand knowledge.

    Thanks,

    1. Re:Compatible? by Jellybob · · Score: 2, Informative

      In almost all cases PHP4 code will run fine under PHP5.

      The only situations where you're likely to hit problems are in reassigning $this in OO code, for example if you had constructors which would go

      $this = new My_Error_Class();

      Which is no longer supported.

    2. Re:Compatible? by Shaklee39 · · Score: 1

      Supposedly it is backwards compatible if you turn on the php4 compatibility mode in php.ini. This is not always true however. I tested php5 on a website with hundreds of php classes/scripts and it crapped out with many errors in the logs. That was about 3 months ago however during RC1, maybe things have changed.

    3. Re:Compatible? by womby · · Score: 1

      any docs on how to correct that, I have read nothing about php5 but I do know that my use of memcached is similar to your example.

      --
      **** lying is wrong even for sleeping dogs
    4. Re:Compatible? by Trifthen · · Score: 4, Informative

      Uh... no. They also changed the object inheritance rules so that overloaded child methods have to have the exact same number of parameters as the original class. So, now you can't have multiple constructors *or* have child constructors that assume certain values and reduce the amount of paramters accordingly.

      Yuck.

      As a person who codes entire 20,000+ line application libraries in PHP and has been watching the development of PHP 5 very closely, there are a lot of decisions the PHP developers have made that make me very hesitant about going anywhere near the new PHP version.

      As an aside, the PHP developers have decided to make SQLite, a light file-based database engine, the default session handler. Even with all file locking turned off, this is at least 4 times slower than the current system used by PHP 4. Of course you can change this setting back to flat session files, but the fact this is their default should say something about other decisions they've made. This setting itself makes especially no sense to me, as all session variables go into the $_SESSION superglobal as associative array keys - there is absolutely no benefit to using a database-enabled flat file for this, as opposed to a regular flat file. It's as if the PHP group were excited about sqlite and tried shoving it into everything.

      Just read the changelog very carefully. If you're already using PHP, and have gone deeper than casual use, your applications *will* break - especially if you turn on PHP's strict mode which kills backwards compatibility with PHP 4.

      --
      Read: Rabbit Rue - Free serial nove
    5. Re:Compatible? by g_dancer · · Score: 1

      SQLite is *not* the default session handler, although you may use SQLite to store your session data.

  34. Yahoo Store, of course, is in LISP by Animats · · Score: 4, Informative
    LISP is a good match for operating on HTML and XML, both of which are really tree structures. Operating on trees works very well in LISP. That's what it's good at. Perl, PHP, and Java don't do trees well. You have to hammer the tree into an object paradigm, which doesn't help all that much. Perl's representation of a tree is rather inefficient, too. I do considerable parsing of large documents into trees in Perl. It works, it's portable, it's slow, and Perl is badly matched to the task. PHP is worse.

    LISP's parentheses turn everybody off, including me, but the data structures really are a win for tree-like applications.

  35. The future of programming languages: LabView by heyitsme · · Score: 2, Interesting

    Dynamic languages the future? Unlikely. The future of programming is more likely in code that isn't written, but rather "drawn"

    Many people haven't heard of LabView, even though it has been around since the late 80s. It runs on Windows, Mac OS, and Linux. The premise behind LabView is there is no such thing as written code. Instead of code, applications are literally drawn by dragging variables (controls, indicators) onto the block diagram and wiring them together. For instance, if I wanted to add 1 and 2, I would create two integer objects with respective values, find the addition function, and wire them together to an output (indicator - think text box). I have written entire graphical application suites/analysis tools in a matter of days and weeks instead of months (had I written them in, say, C or Java or $your_texT_based_language_of_choice).

    The only issue many will have with LabView is that it is expensive. It is also closed source, but hey, so is Java. Anyone interested in rapid application prototyping/development or digital/analog instrumentation should check out LabView.

    1. Re:The future of programming languages: LabView by XunilOS · · Score: 1

      As long as you're working with National Instruments equipment, and doing things "the NI way", etc., I'm sure it's great. I have a friend who works for a prominent (in the LabView community) engineering firm, has experience in C, C++, Perl, Java, and a few other languages, and absolutely abhors LabView. Getting some of the simplest tasks accomplished in this "language", from what I have seen, is far from trivial and can actually take significantly longer for even a skilled LabView programmer to produce than a skilled programmer of a more "traditional" - i.e. text-based - language.

      --
      -- -R
    2. Re:The future of programming languages: LabView by t_allardyce · · Score: 2, Insightful

      The problem is i can type "x = 1 + 2;" allot quicker than i can click to create two objects, click on each and give it a value, create a 3rd object and draw two lines to wire it together. Also whenever i use a block system (spent some time with simulink/matlab at uni) i always start trying to make the boxes line up and look neat, where as coding is just a matter of pressing tab a couple of times.

      --
      This comment does not represent the views or opinions of the user.
    3. Re:The future of programming languages: LabView by darnok · · Score: 1

      Never heard of this before, so I checked out the site.

      My first reaction to it is that it looks very Star Trek. I can imagine Geordy/Scotty/etc. using version 697 of this to reroute more power to the engines.

      My second reaction is that the price isn't that much. Once you've committed to buying e.g. VS.NET, the cost of this is pretty comparable and you seem to be getting something well beyond what VS.NET provides.

      3rd reaction: documentation of any reasonably complicated system must be a challenge. For most complex apps, you need documentation at many layers: from architectural overview of how it all hangs together, down to documentation of object internals, plus a bunch of stuff "in the middle". How do you do this with LabView? If the answer is something like "you look at the pretty pictures and drill up/down to suit", they've lost me as a potential customer.

      4th reaction: how well does this work for non-instrumentation/reporting applications? I can see it could be ideal for those types of apps, and the site doco definitely focuses on those. Does it work well for other stuff as well?

      All up, an interesting link. Thanks for the info

    4. Re:The future of programming languages: LabView by Anonymous Coward · · Score: 0

      That doesnt sound as a good idea. Its like we were dropping english/spanish/french/german to start "talking" by drawing stuff. It doesnt sound like a good idea, does it?

    5. Re:The future of programming languages: LabView by tehcyder · · Score: 1
      They have the web site that says "ni"!

      Sorry.

      --
      To have a right to do a thing is not at all the same as to be right in doing it
    6. Re:The future of programming languages: LabView by warrax_666 · · Score: 2, Insightful
      Many people haven't heard of LabView, even though it has been around since the late 80s.

      Maybe, just maybe, there's a reason for that.

      While "graph" programming may be useful for data flow programming, it's absolutely useless for general purpose programming. For general purpose programming the devil's in the details and introducing a "graph" programming language just moves you further away from the details without actually giving you control of the details (see Joel Spolsky's article about "leaky abstractions" as to why this is a bad idea).
      --
      HAND.
    7. Re:The future of programming languages: LabView by Anonymous Coward · · Score: 0

      I do not know.

      Someone proficient with a keyboard should be able to write $a = $a + $b faster, than someone who has to drag three variables and a function from somewhere, even if the commands were already on the screen...

      It would be a nice and helpful feature, but command line is still around with GUIs prevalent. So i guess its part of the future but not the inevitable destination.

      - coward flees and hides

    8. Re:The future of programming languages: LabView by Anonymous Coward · · Score: 0

      Future of programming languages?

      What you are describing is not a programming language. It's a toy.

    9. Re:The future of programming languages: LabView by Anonymous Coward · · Score: 0
      Dynamic languages the future? Unlikely. The future of programming is more likely in code that isn't written, but rather "drawn"


      Ahhh, that's so cute. Here's a lollipop.
    10. Re:The future of programming languages: LabView by horza · · Score: 2

      Dynamic languages the future? Unlikely. The future of programming is more likely in code that isn't written, but rather "drawn".

      This has been coming up regularly since the 80s. I've seen apps like this, and even tried writing my own version, and recently there was a fad for UML->code compilers. The fact is that it's not going to happen. It's far quicker to type than it is to draw. Also you can fit a lot of code on one page making it easier to debug, as opposed to scrolling through vast screens of visual representation. The saying may go "a picture is worth a thousand words" but it certainly doesn't apply to coding.

      Phillip.

    11. Re:The future of programming languages: LabView by scrytch · · Score: 1

      > For instance, if I wanted to add 1 and 2, I would create two integer objects with respective values, find the addition function, and wire them together to an output (indicator - think text box)

      Awesome. I on the other hand would use a dedicated peripheral with buttons I can press in short sequences to compose graphical symbols, and the relative position of these graphical symbols to each other would create the relation between them and their operators.

      Here's an example: 1 + 2

      Isn't that awesome? Here's another example: sqrt(x**2+y**2)

      I've heard you can really pack a lot of these graphical thingies onto a screen.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    12. Re:The future of programming languages: LabView by Anonymous Coward · · Score: 0

      Even people who work with NI equipment hate it.

      Most of it's use is by non-programmer scientists and engineers who want to collect data or control and experiment or process, but don't want to learn programming. Usually, after a time they get an intern, summer college student, or grad student who can program, and then either keep the guy or learn to program themselves, using the various interface libraries.

      My brother has made a lot of money re-writing LabView stuff.

    13. Re:The future of programming languages: LabView by Anonymous Coward · · Score: 0

      Dynamic languages the future? Unlikely. The future of programming is more likely in code that isn't written, but rather "drawn"

      Every so often, someone posts a comment like this, claiming that "drawing" is the way to go, or "creating a spatial tree" is the way to go, or is the way to go. It's a predictable comment, much like the "Bah, you're just re-inventing LISP" comments. Unfortunately, these "GUI-based software development methodology" comments generally provide little supporting information to substantiate their claim that it should be used for all programming, which makes them little more than unsupported bold assertions that are best ignored. Your "I developed X app really quickly" comment doesn't hold any water, sorry. Personally, I can see how graphical development might work well for software components that are graphical in nature, but I can't see how it is better for software components that have no logical graphic equivalent, unless the GUI interface for development were severely limited when compared to the programming languages that we use today.

  36. Compilation by trifakir · · Score: 1
    finally there is a complete compiler

    What does it mean finally and complete?

    The Zend compiler is quite complete and AFAIR for flat-fee. Do you mean that it does not produce binaries but byte-code? Then neither Java nor CMUCL have compilers...

    The biggest issues developers have with the PHP compilation:

    1. They don't want to sell their sources unobfuscated;
    2. They want to gain some optimization speed eliminating the parsing (this can also be achieved by caching);
    You have all this since 2000.
    1. Re:Compilation by NetCow · · Score: 1

      Then neither Java nor CMUCL have compilers...
      Don't know about CMUCL, but Java has a lot of compilers (both source -> binary, and bytecode -> binary ones).

    2. Re:Compilation by aled · · Score: 1

      Sun Java Virtual Machine called Hotspot compiles bytecode to machine language on the fly.

      --

      "I think this line is mostly filler"
    3. Re:Compilation by Anonymous Coward · · Score: 0

      CMUCL compiles to machine instructions. You probably meant to say CLISP, which compiles to bytecode. It's the only CL implementation I've heard of that does so. All other fairly complete implementations (ACL, LCW, SBCL, CMUCL, MCL, SCL, and GCL via gcc) compile to native code. A new implementation being developed, Armed Bear Common Lisp, compiles to java bytecode and runs under the java VM, I believe.

  37. I'm coding in php right now by markan18 · · Score: 1

    I have to convert an old oracle 8i database on Windows NT with a client written in visual basic+ to Mysql on Gentoo linux. I use php to write a web interface to that database.

    Now, with php5, my classes will get private and protected members which i missed with php4. I'm wondering about try/catch style error handling, will php5 have those? I'm looking at changelog right now, if you know anything about the goodness of php5, please let me know

    1. Re:I'm coding in php right now by GabboFlabbo · · Score: 1

      PHP5 Definetly has Try / Catch. I've been using php5 a lot for the past 4 months and it's exception handling (so far) is great.

      Beats the stupid return error checks!

      And here's a page that lists in great detail all the changes:

      http://www.php.net/zend-engine-2.php

  38. Re:holy shit batman! by XO · · Score: 1
    c'mon, be more efficient..
    <?="hello, world!"?>
    there you go. much better.

    --
    "Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
  39. Why Perl is still the Regex king by einhverfr · · Score: 4, Insightful

    First of all having PCRE support and having regular expressions heavily integrated into the language the way Perl does are completely different things. So when I need to do log parsing, I do it in Perl, not Python, not PHP. It is simply easier and things fit more nicely for me (I use Python and PHP for at least as much development as I do Perl, but Perl still has its uses).

    Second Perl has some nice features that PHP and Python lack. Of course PHP has some nice features that Perl and Python lack, and Python has some nice features that..... You get the point.

    Even Javascript has some nice features if you are scripting other components (i.e. in a XUL application) but the next time I ask someone how to itterate through a hash table in Javascript, they had better not say "you don't..."

    --

    LedgerSMB: Open source Accounting/ERP
    1. Re:Why Perl is still the Regex king by Distinguished+Hero · · Score: 1, Informative

      Have you looked at Ruby? Regular expressions are very well integrated, and it seems like a far more elegant language (to me).

      --
      Uttering logically derived and empirically supported truths to the disciples of the orthodox establishment.
    2. Re:Why Perl is still the Regex king by AstroDrabb · · Score: 2, Insightful

      Ruby? Ruby? Do you know why I haven't spent the time to learn Ruby? Because I have learned too many dang language. C, C++, Java, Perl, PHP, Python, C#, VB, Bash, SQL, PL/SQL, not to mention all the other stuff like JavaScript, HTML, etc. Does Ruby offer anything that all of these language together do not? If so, maybe I will get off my butt and give Ruby a whirl.

      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    3. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 5, Interesting

      Ruby is basically a superset of Python and Perl.

      If you've ever been programming Python and wished it was cleaner and less "arbitrarily verbose", you'd like Ruby. If you wonder why Python arbitrarily makes you say "len(str)" instead of "str.len()", you'll like Ruby. If you wonder why Python makes you type "def foo(self)" instead of just "def foo", you'll like Ruby. If you wonder why you should type verbose hard-to-read stuff like "[f for f in n if f < 4]" instead of something like "n.each { |f| f<4 }", the give Ruby a whirl.

      If you ever programmed Perl and wished it had an actual object model, so you don't have to do stuff like "UNIVERSAL::isa($val, 'FooClass')", but can just treat each variable the exact same way like "foo.kind_of? Integer" you'll like Ruby. If you hate how Perl lets you make objects that are hashrefs OR arrayrefs OR scalarrefs, making extension of existing classes utter madness, you'll like Ruby.

      If you like adding your own methods to base types like Arrays, Hashes, Integers, etc., you'll just go nuts with Ruby.

      If you like distributed programming you'll get a kick out of DRb (comes with Ruby).

      Do you need extended your languages with external C libraries? You will positively, absolutely shit yourself three times when you try out Ruby/DL, which lets you extend Ruby with arbitrary C libraries at run time without any compiling or setup.

      If you wonder why Java takes 3-5 lines of code just to parse an XML file or set up a loop you will find Ruby quite a change. And REXML is the most lightweight easy to use XML parser I've ever used (PHP5's new parser comes *close*.. but PHP is not Ruby).

      If you like writing code FAST without worrying about heavy syntax or arbitrary design choices, you'll like Ruby. If you like passing anonymous code blocks to your functions like SmallTalk, you'll get a kick out of Ruby (and if you don't do that, learn, it will make your programs tighter). If you are into agile programming and merciless refactoring, you'll like Ruby (unless you are a lover of lisp macros, then you'll find Ruby blocks a little limiting, can't help you there).

      If you use a Mac you'll like it because Ruby is pre-installed.

      If you do MVC-type web apps, your mouth will hang open when you use the highly dynamic Ruby on Rails (how do you add a new object to your app when you add a new database table? ONE LINE OF CODE. How do you add a new field to your object when you add a new column to the database? DO NOTHING.)

      Ruby is the only language I can say with a straight face is "beautiful" AND useful.

      So unlearn a couple of those languages and try Ruby! ;-)

    4. Re:Why Perl is still the Regex king by 19thNervousBreakdown · · Score: 1

      Somebody with mod points please mod this up, anybody who's wondering about Ruby needs to see this.

      --
      <xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
    5. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 1, Informative

      I could be way off since it's been a while, but if I recall correcly, iterating over a collection (such as a hash table) in javascript was something like "for (item in collection) { stuff; }". (I last touched javascript for anything serious ~5 years ago writing a bugtracking system in jscript-based ASP for this startup I was working for at the time, because they Really Need NT *sigh* and were too cheap to buy a real bug tracking system *double sigh*. Yes, totally stupid, but welcome to '99...)

    6. Re:Why Perl is still the Regex king by wtd · · Score: 5, Informative

      The only thing I would add is that Mac OS X users should install Ruby themselvesbefore making any judgements on it. The version shipped with Panther is a bit dated, and if I recall correctly lacks some of the features you get from installing it yourself.

    7. Re:Why Perl is still the Regex king by fucksl4shd0t · · Score: 2, Insightful

      If you know all those other languages, you probably don't need much to learn one more. Come on! The first one's tricky, the second one's annoying, all the rest are easy.

      Hell, I can't remember the last time it took me more than 15 minutes before I could code a new language (and I'm not talking 'hello, world' either).

      Wait a minute, you count VB, Bash, and SQL as programming? Maybe that explains it all. Some of us consider those UI.

      --
      Like what I said? You might like my music
    8. Re:Why Perl is still the Regex king by AstroDrabb · · Score: 1
      Wait a minute, you count VB, Bash, and SQL as programming?
      No, I count them as yet another syntax to learn.
      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    9. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 0

      "Some may say Ruby is a bad rip-off of Lisp or Smalltalk, and I admit that." -- Matz

      We are far past the point where inventing a new language will bring anything to the party.

    10. Re:Why Perl is still the Regex king by rolling_bits · · Score: 1

      Ruby's goal was never to re-implement Lisp nor Smalltalk, then I think that that statement can be misinterpreted. Ruby stealed the best ideas that Matz found interesting to include in his language to make his life easier when programming. Later Ruby was released, and it became everyones' language, but, we use Ruby and love Ruby because of the unique features that Matz chose, many of which have been stolen by Python and Perl6, but you can't bend an existing language too much, or you lose backward compatibility. So, Python and Perl will never surpass Ruby, unless they break backward compatibility. It doesn't mean that a newer language won't do what Ruby does and much else, so we can switch language. ;-) Many Smalltalkers and Lispers admire Ruby, for whatever reason. Cheers

    11. Re:Why Perl is still the Regex king by farmer11 · · Score: 1
      Even Javascript has some nice features if you are scripting other components (i.e. in a XUL application) but the next time I ask someone how to itterate through a hash table in Javascript, they had better not say "you don't..."
      this is one way to do it, (try pasing this in you address bar) :P

      javascript:var o = new Object(); o.a = 'first'; o.b = 'second'; for (var att in o) { alert(att); }
    12. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 2, Interesting

      If you need decent Unicode support, don't try Ruby, 'cos it's author arbitrarily dislikes Unicode and refuses to implement it. Hint: you probably either do need it or will do soon.

      If you want your programs to run at a decent speed, don't try Ruby, because for the amount of money you'd have to spend on hardware fast enough to run Ruby at anything above a toe-curling crawl, you could afford to hire so many extra programmers that they could write your code in hand-tuned ASM just as quickly as you can write it now in PHP.

      At this point I'm supposed to round out the post by recommending Lisp or Smalltalk over their bastard offspring, but I can't be bothered.

    13. Re:Why Perl is still the Regex king by rolling_bits · · Score: 1

      Leave Ruby for you only, right? ;-)

      "If you need decent Unicode support, don't try Ruby, 'cos it's author arbitrarily dislikes Unicode and refuses to implement it. Hint: you probably either do need it or will do soon."

      Matz has said that Ruby will have support for Unicode (utf8) and other formats beyond that. If you are on a hurry, code it yourself and share it with the community.

      "If you want your programs to run at a decent speed, don't try Ruby, because for the amount of money you'd have to spend on hardware fast enough to run Ruby at anything above a toe-curling crawl, you could afford to hire so many extra programmers that they could write your code in hand-tuned ASM just as quickly as you can write it now in PHP."

      One could use one of the several ways to load the interpreter as seldom as possible, and leave it at the memory answering the requests. If you distribute the requests among many machines, you could use the machines just like Google uses 10,000s of machines. Beat that.

      "At this point I'm supposed to round out the post by recommending Lisp or Smalltalk over their bastard offspring, but I can't be bothered."

      I doubt you use Lisp or Smalltalk as your main language, then. So why bother mentioning them.

    14. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 0

      If you ever wondered why you can still understand your Python code a month after you wrote it, try Ruby. : P

    15. Re:Why Perl is still the Regex king by metamatic · · Score: 1

      The minute Ruby supports Unicode, at least as far as having UTF8 as its native string type, I'm gonna switch to Ruby. Until then, I already know Perl...

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    16. Re:Why Perl is still the Regex king by NEURORAT · · Score: 1

      I think Ruby's biggest drawback is the lack of a full-fledged IDE, but that's because I came up through the Borland C++ Builder and Object Pascal ranks.

      I know a lot of Perl guys are in the "real men don't need IDE" camp, but if I don't have one I really miss it. That's why I spend more time with PHP (gasp!) because of the Zend Professional IDE, even though I know Perl's function libraries and internal processing capabilities are superb.

      In Python you have WingIDE and their 2.0 version is looking very sweet (just a customer).

      As soon as Ruby has a solid IDE I'll spend more time with it (really would like to do something soon with DRB).

      Thanks.

      --
      NeuroRat -- Fully modified brain implants to steer the rodent population.
    17. Re:Why Perl is still the Regex king by SilentMajority · · Score: 1

      A quick google search for "ruby ide" found: FREE http://freeride.rubyforge.org/wiki/wiki.pl?HomePag e http://homepage2.nifty.com/sakazuki/rde_e.html NOT-FREE http://www.ruby-ide.com/ There are probably many others that support multiple languages including ruby. For example: http://www.zeusedit.com/ruby.html ... IMHO, nothing beats Source Insight (too bad it only runs in Windows tho). My head will explode if Source Insight ever comes out for Linux and supports vi/Vim keybindings. Language bindings files makes it able to support any language. And yes, I've used Multi-Edit and Visual SlickEdit on a few project. Also tried "Understand for C++" which is nice.

    18. Re:Why Perl is still the Regex king by SilentMajority · · Score: 1

      Oops. Forgot to preview.

      A quick google search for "ruby ide" found:
      FREE http://freeride.rubyforge.org/wiki/wiki.pl?HomePag e
      http://homepage2.nifty.com/sakazuki/rde_e.html

      NOT-FREE
      http://www.ruby-ide.com/

      There are probably many others that support multiple languages including ruby. For example:

      http://www.zeusedit.com/ruby.html ...

      IMHO, nothing beats Source Insight (too bad it only runs in Windows tho). My head will explode if Source Insight ever comes out for Linux and supports vi/Vim keybindings. Language bindings files makes it able to support any language. And yes, I've used Multi-Edit and Visual SlickEdit on a few project. Also tried "Understand for C++" which is nice.

    19. Re:Why Perl is still the Regex king by srussell · · Score: 1
      If you need decent Unicode support, don't try Ruby, 'cos it's author arbitrarily dislikes Unicode and refuses to implement it.

      The dislike isn't arbitrary. There is considerable resistance in Japan and China to Unicode, in part due to the fact that the ordering of characters is different than the order of established standards. The same is true for East Indian languages (although the objections are rather different).

      Unicode is western-centric, a bias that can be seen in the fact that 7-bit ASCII maps one-to-one to UTF-8. Imagine, if you will, if -- rather than a clean 1-1 mapping of ASCII-7 to UTF-8 -- UTF-8 rearranged the characters, so they were ordered:

      P e g 6 u l o G K x 1...

      These aren't the only objections, but they illustrate that any dislike of Unicode is far from arbitrary.

      Ruby does have Unicode support; granted, Ruby strings are not UTF-8 by default, like they are in Java, and you can't write Ruby programs using UTF-8 characters for variable names, and so on, like you can in Java. But Ruby does have basic support for dealing with UTF-8 strings, sufficient for most purposes.

    20. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 0

      Don't use any of the Arachno language editors(Arachno Ruby, Arachno Python).

      They all suck!

      The guy who maintains it spams every forum and the mailing lists. It would be best if no one used it, that idiot Lothar just won't shut up.

      Someone should really release a crack to his trial software to spoil his business like attitude.

      Lothar Scholz is a real dumb jerk. He doesn't even use any of those languages. He has never helped once on any mailing list.

      He will copy and paste past Q&As

    21. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 0

      If you are on Windows you can try Arachno Ruby, from http://www.ruby-ide.com .

      The new 0.2.5 has the best and fastest debugger available at the moment. And a release for Linux/Mac OS will come in a few weeks.

    22. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 0

      Don't use any of the Arachno language editors(Arachno Ruby, Arachno Python).

      They all suck!

      The guy who maintains it spams every forum and the mailing lists. It would be best if no one used it, that idiot Lothar just won't shut up.

      Someone should really release a crack to his trial software to spoil his business like attitude.

      Lothar Scholz is a real dumb jerk. He doesn't even use any of those languages. He has never helped once on any mailing list.

      He will copy and paste past Q&As

    23. Re:Why Perl is still the Regex king by lothar_is_nitwit · · Score: 1

      Don't use any of the Arachno language editors(Arachno Ruby, Arachno Python).

      They all suck! There are better and faster editors out there to use. Just search FreshMeat, RubyForge, and even google.

      The guy who maintains it spams every forum and the mailing lists. It would be best if no one used it, that idiot Lothar just won't shut up.

      Someone should really release a crack to his trial software to spoil his business like attitude.

      Lothar Scholz is a real dumb jerk. He doesn't even use any of those languages. He has never helped once on any mailing list.

      He will copy and paste past Q&As

    24. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 0

      Lothar's mailing list contributions have been very informative and obviously from good experience.

      Ruby list comments on the IDE have been only positive as far as I recall.

      Of course the childish nature of the above posting probably caused you to discount it anyhow.

    25. Re:Why Perl is still the Regex king by einhverfr · · Score: 1

      Maybe that works better than itterating through the index using

      for (var in array)

      Which was a method I found by mistake, and it seems to work on all platforms.

      --

      LedgerSMB: Open source Accounting/ERP
    26. Re:Why Perl is still the Regex king by einhverfr · · Score: 1

      That is exactly what I found to work. Is it in the spec or is this just an unsupported kludge? lol

      --

      LedgerSMB: Open source Accounting/ERP
    27. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 0

      Sorry i think you have a huge problem.

      Seems that you don't like it that someone makes money with something that seems to become a very good product in the future.

      That you post your childisch text twice here shows me that you are the real dumb jerk.

    28. Re:Why Perl is still the Regex king by NEURORAT · · Score: 1

      SilentMajority, I have not looked at some of the IDE's you mentioned, but my experience with the others I have seen is that they are more along the lines of an EMACS editor with code following and a few other bells and whistles. If you ever used one of Borland's IDE's you would know the pleasure of advanced Intellisense (auto-completion of class methods, functions, etc.), a truly integrated debugger with conditional watchpoints and other perks, a full-fledged class and module browser, and a WYSIWIG form (GUI) builder. The IDE's I have seen for Ruby haven't been up to that level. In Python WingIDE performs at that level (the new beta 2.0) minus the WYSIWIG form builder. If anyone has knowledge of a Ruby IDE at that level of sophistication then I will check it out immediately. Thanks.

      --
      NeuroRat -- Fully modified brain implants to steer the rodent population.
    29. Re:Why Perl is still the Regex king by lothar_is_nitwit · · Score: 1

      Well, you must be Lothar then, because he certainly bugs everyone else with his clueless postings. ice talking to you lothar

    30. Re:Why Perl is still the Regex king by rffrff · · Score: 1

      well, it does handle utf-8 quite nicely:

      $KCODE is the character coding system Ruby handles.
      If the first character of $KCODE is `e' or `E', Ruby handles EUC.
      If it is `s' or `S', Ruby handles Shift_JIS.
      If it is `u' or `U', Ruby handles UTF-8.
      If it is `n' or `N',Ruby doesn't handle multi-byte characters.
      The default value is "NONE".

      I mean, matz is japanese and people wants to teach them how to handle kanji? :)

    31. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 0

      True.

      Ruby 1.8.0 has a great deal of improvements and was released around August 2003. I believe 1.8.2 is about to be released sometime this month (July 2004).

      Here's a nicely written list what's new/changed in Ruby 1.8.0:

      http://dev.faeriemud.org/changes-1.8.0.html

      And here's an article written about new features in Ruby 1.8.0:

      http://www.whytheluckystiff.net/articles/rubyOne Ei ghtOh.html

      Apple's Webobjects fans might be interested in checking out these two ruby projects:

      http://www.spice-of-life.net/cgikit/en/userguide /C GIKitUserGuide.html
      http://www.starware.one.pl/so ftware/sws/index.html

      Other general Ruby resources (stolen from a post on comp.lang.ruby):

      1. RUBY BOOKS/GUIDES ONLINE
      http://www.ruby-doc.org/docs/ProgrammingRu by/
      http://www.ruby-doc.org/docs/Tutorial/
      http: //www.ruby-doc.org/docs/UsersGuide/rg/index.h tml
      http://poignantguide.net/ruby/

      2. RUBY CLASS/API REFERENCE
      http://www.ruby-doc.org/stdlib/
      http:/ /www.ruby-doc.org/docs/rdoc/1.9/
      http://www.kiteb ird.com/articles/ruby-dbi.html
      http://www.kitebir d.com/articles/ruby-mysql.html

      3. RUBY CODE SNIPPETS
      http://pleac.sourceforge.net/pleac_ruby/ t1.html
      http://www.rubygarden.org/ruby?CodingInRu by
      http://yagni.com/rosetta-stone/index.php

      4. RUBY AND C/C++ INTEGRATION
      http://www.zenspider.com/ZSS/Products /RubyInline/
      http://www.swig.org/Doc1.3/Ruby.html

      5. RUBY FOR WEB SERVERS (MOD_RUBY, ETC.)
      http://www.rubydoc.org/books/modruby/book1. htm
      http://modruby.net/doc/
      http://www.spice-of- life.net/cgikit/en/userguide/C GIKitUserGuide.html
      http://dev.rubycrafters.com/a rrow-manual/index.htm l

      6. RUBY APPLICATIONS AND LIBRARIES
      http://www.rubyforge.org
      http://raa.ru by-lang.org
      http://rubygems.rubyforge.org/wiki/wi ki.pl

      And for Windows users who want a one-click installer for Ruby:

      http://rubyforge.org/frs/?group_id=167

    32. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 0

      Even Javascript has some nice features if you are scripting other components (i.e. in a XUL application) but the next time I ask someone how to itterate through a hash table in Javascript, they had better not say "you don't..."


      I do it like this:
      var hash = Hash.fromArray([["one", "eins"], ["two", "zwei"], ["three", "drei"]])
      hash.each(function(value, key) {
      alert(key + " => " + value)
      })

      Of course I first need to load ruby.js, an implementation of some of Ruby's standard library in JavaScript...

    33. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 0
      'cos it's[sic] author arbitrarily dislikes Unicode and refuses to implement it. Hint: you probably either do need it or will do soon.

      Unless English suddenly starts adding funny squiggly characters to the alphabet, I don't and I won't. If computers had been meant to work with heiroglyphics, they'd have been invented by the ancient Egyptians.

    34. Re:Why Perl is still the Regex king by Anonymous Coward · · Score: 0
      There is considerable resistance in Japan and China to Unicode, (snip) The same is true for East Indian languages [iitm.ac.in] (although the objections are rather different). (snip) Unicode is western-centric

      let me get this right. Some politically-correct faggots come up with a system that gives me no benefit other than making all my files 4 to 8 times as big as they need to be, and yet the slants and packie's arent grateful? Let the fuckers learn english then.

  40. Haha what a stupid commercial... by Anonymous Coward · · Score: 0

    The best thing is that the road_at_its_end compiler does not work with PHP5 scripts.

  41. Re:holy shit batman! by tintub · · Score: 1

    Seeing as php just passes on anything not contained within

    <?php ?> or <? ?>
    tags, surely the best Hello World script is the following

    Hello, World!
    --
    sig under construction...
  42. Re:PHP - ASP Showdown by Anonymous Coward · · Score: 1, Insightful

    Except the multithreading argument every point in your list is wrong...

  43. Re:PHP - ASP Showdown by andig · · Score: 1

    So how do you explain PHP's install base overtaking ASP according in April last year (according to Netcraft)?
    I'll tell you why:
    a) Most people feel more comfortable running their web sites on UNIX based systems.
    b) PHP is cross-platform which is a big advantage for companies who want to create off-the-shelf applications.
    c) It is much easier to find libraries on the Internet which will do exactly what you want.

    I am sure there are some other reasons. I'm not a Microsoft basher but let's just say that PHP is doing pretty well for good reasons.

  44. Dynamic Languages by Anonymous Coward · · Score: 0

    Is this another sign that dynamic languages are the future?

    I would have to say yes, but the real reason I posted was to point out a Dynamic Interpreter I know of. I recently took a Compilier Design class at my College and the teacher teaches using an Interpreter that he wrote in Java.

    The interesting part about his interpreter is that it creates production tables on the fly (linear time) where the latest production is used when there are duplicate entries. Thus it could be that as a production rule fires it could in fact change the meaning or syntax of another production as they are encountered.

    For those interested the site is:
    A Java-based interpreter of context-free languages with user-defined semantics.
    http://www.csupomona.edu/~carich/gi/

    1. Re:dynamic languages by StrawberryFrog · · Score: 1

      Java and C# have more complete and better defined dynamic features than Lisp

      Could you elaborate on that? It doesn't seem correct to me. Java/C# (at least in C# 1.0, the current version) do not have closures. Neither C# or java will ever have the code/data unity that Lisp has.

      --

      My Karma: ran over your Dogma
      StrawberryFrog

    2. Re:dynamic languages by dekeji · · Score: 1

      Could you elaborate on that? It doesn't seem correct to me. Java/C# (at least in C# 1.0, the current version) do not have closures. Neither C# or java will ever have the code/data unity that Lisp has.

      Well, just telegraphically...

      Java has a pretty close approximation to closures (nested classes).

      Both Java and C# can be extended with closures without changes to the runtime.

      I think support for lexical closures is planned for the CLR (I don't know about C#).

      Closures are probably not a necessary part of being a dynamic language (PHP doesn't have them, neither did many versions of Lisp).

      Both Java and C# have full dynamic type information and full reflection; the reflection system of standard CommonLisp has some limitations in comparison (although individual CommonLisp implementations often provided implementation-specific workarounds).

      Both Java and C# have full dynamic code generation and full reflection of existing, compiled code (you can analyze code from other methods/classes); Lisp's dynamic code generation and code reflection are more limited.

      Lisp syntax is nice, and you can program the JVM and CLR with Lisp syntax. But while I fully believe that Lisp syntax is great for programming, I think for data structures, it is a compromise, and XML and similar standard representations fulfill similar functions for other languages.

      So, Java and C# aren't exactly like Lisp--they have made different choices, and you may or may not like the overall package. They are clearly not "dynamic" in the important sense of being "interactive" by default (although bsh helps). But in some ways (reflection, dynamic code generation, etc.), I think they are arguably better dynamic languages than Lisp ever was.

      If the Lisp community ever got its act together and actually learned from Java/C#, they could produce a great response, something that combines the best of Java/C# and Lisp. But I doubt that's going to happen any time soon.

    3. Re:dynamic languages by StrawberryFrog · · Score: 1

      I think support for lexical closures is planned for the CLR (I don't know about C#).

      Yes it will. The whidbey whitepaper is online somewhere. The functionality will of course be in C#, since C# is the .NET crown jewel. C# 2.0 will have anonymous methods with "environment capture" of visible variables.

      Lisp is and will always be a better functional language than Java/C# - the syntax is just better for it - but I take the point that it not the same thing as a dynamic language.

      If the Lisp community ever got its act together and actually learned from Java/C#, they could produce a great response, something that combines the best of Java/C# and Lisp. But I doubt that's going to happen any time soon.

      Possibly the ML/CAML/OOCAML/Haskel crowd would be more open to innovation.

      --

      My Karma: ran over your Dogma
      StrawberryFrog

    4. Re:dynamic languages by Anonymous Coward · · Score: 0

      The well-defined and standard reflection facilities are indeed a big plus for Java and C#, but can you elaborate on what is it that Java and/or C# have that is better than (compile name definition) ??

    5. Re:dynamic languages by Anonymous Coward · · Score: 0

      The well-defined and standard reflection facilities are indeed a big plus for Java and C#, but can you elaborate on what is it that Java and/or C# have that is better than (compile name definition) ??

      In Java and C#, you can load, inspect, and manipulate the code associated with existing methods. In Lisp, you could never do that.

      If you wanted to do something similar in Lisp, you had to hook into compilation somehow, since once something was compiled, it was completely opaque. Even if you managed to hook into things in the right way, the results of invoking COMPILE for anything not in a top level environment were flaky in practice in those systems I tried it in, and I don't think they were even particularly well defined by the standard.

      Let me put it more personally: I tried to do these things in Lisp and I never quite got them to work completely. I tried to do these things in Java, the documentation and APIs were straightforward and well-defined, and dynamic code generation has always worked as expected for me.

    6. Re:dynamic languages by dekeji · · Score: 1

      Lisp is and will always be a better functional language than Java/C#

      I agree, and I prefer Lisp syntax myself. I hope one can eventually come up with a Lisp-like system that combines the advantages of Lisp syntax with the practicality and completeness of the C# runtime, libraries, and specification. Since Lisp syntax has been used even for C-like languages, it seems like it should be fairly easy. Also, I believe Microsoft is even thinking about improving support for fully dynamically typed languages (like Scheme and Smalltalk), so then one would really have the best of both worlds: full support for Lisp styles with full acess to C#-like syntax and semantics.

    7. Re:dynamic languages by Anonymous Coward · · Score: 0

      You are totally off base in your comparison of Java/C# to Lisps. For one thing, all lisps from McCarthy's original onward have had closures (Lisps had dynamic rather than lexical scoping rules until Scheme came along but that's a different story); Lisp doesn't make sense without them. Lisps also invented the notion of dynamic type information and the simple C-ish type systems Java and C# have are totally clobbered by, for instance, the static typing add-ons for PLT Scheme that will do full type inference including polymorphic types.

      And when you say "Both Java and C# have full dynamic code generation and full reflection of existing, compiled code (you can analyze code from other methods/classes); Lisp's dynamic code generation and code reflection are more limited" I really can't take you seriously. Have you actually used the systems in question? Saying that Java's or C#'s dynamic code generation and reflection are in any way comparable to Common Lisp's is just ridiculous. I've written programs making heavy use of Java reflection and programs that use the equivalent stuff in Scheme; eval and macros (or higher-level stuff built with them like PLT Scheme's dynamic-require) are so much simpler and easier than Java's system it's absurd. Common Lisp is all about writing programs that write programs; in some sense it's what the language is for. And when I read "If the Lisp community ever got its act together and actually learned from Java/C#, they could produce a great response ..." I know you must be trolling. Look up what James Gosling and Guy Steele were known for before Java; in some way Java is an attempt to bring the otherwise C++ guys halfway to the benefits of Lisp (paraphrasing Steele). So, err, I guess I have been trolled.

    8. Re:dynamic languages by frank_adrian314159 · · Score: 1
      But while I fully believe that Lisp syntax is great for programming, I think for data structures, it is a compromise.

      In what way? All Common Lisp implementations have structures, arrays, hashtables, and CLOS objects as part of the standard. These are just as usuable in Lisp (perhaps more so, because of the common syntax) as in any other language. The days of Lisps using lists as their main data structures (in anything but the prototyping phases of coding) are long gone.

      --
      That is all.
    9. Re:dynamic languages by Anonymous Coward · · Score: 0

      Lisps also invented the notion of dynamic type information and the simple C-ish type systems Java and C# have are totally clobbered by,

      C# and Java have complete, well-defined dynamic type systems: you can determine the type of everything at runtime, you can even access and invoke every field and method if you like. Those features are syntactically cumbersome to use, but they are there.

      And when you say "Both Java and C# have full dynamic code generation [...] eval and macros (or higher-level stuff built with them like PLT Scheme's dynamic-require) are so much simpler and easier than Java's system it's absurd

      I didn't make a statement about things being simpler in Java, or that I like Java, or that Java is good, or any of the other things your one-track mind may imagine. I simply said that Java has complete dynamic type information, a well-defined reflection system, and well-defined mechanisms for dynamic code generation and code manipulation. CommonLisp and Scheme tried but never got those areas quite right.

      As for EVAL and Macros, they have nothing to do with dynamic code generation.

      For one thing, all lisps from McCarthy's original onward have had closures (Lisps had dynamic rather than lexical scoping rules until Scheme came along but that's a different story)

      From context, it should be clear that I was talking about lexical closures; I was just using the terminology that the parent poster was using.

      Look up what James Gosling and Guy Steele were known for before Java; in some way Java is an attempt to bring the otherwise C++ guys halfway to the benefits of Lisp (paraphrasing Steele).

      Well, how nice that you actually realize that. Now, think about what that means: Lisp guys were actually responsible for the evolution of Java.

      Now, what did they do? Steele and Gosling didn't change the things they couldn't change without breaking backwards compatibility: scoping, syntax, and macros, where Java still sucks to this day compared to Lisp. That's the half they didn't change.

      But they changed the things they could change without breaking backwards compatibility. That's why Java got high quality dynamic type information, dynamic code generation, and reflection: they brought their decades of Lisp experience to bear on that problem and improved over what Scheme and CommonLisp did before. All of those could be implemented in the runtime and libraries, without changing the libraries. That's the half they did change.

      Because they changed things that weren't very visible and didn't break compatibility (much) is why C/C++/Java programmers didn't notice how much Java changed and improved. Of course, for people like you, the profound changes to Java were apparently too subtle, too.

      So, err, I guess I have been trolled.

      No, you simply wallow in your ignorance and you have a one-track mind. Sadly, a lot of the Lisp community has behaved like a convention of teenage Perl hackers over the years, unwilling to even consider the possibility that other languages or systems might occasionally have something one might learn from. That's particularly ironic in the case of Java because the few things that Java does well are actually things designed by Lisp users, as you point out yourself, and you still rant and rave against them. Look no further than to your own behavior (which is pretty standard among Lisp users) for why the language has died.

    10. Re:dynamic languages by Anonymous Coward · · Score: 0

      without changing the libraries

      Make that "without changing the language or most existing APIs".

    11. Re:dynamic languages by voodoo1man · · Score: 1
      Both Java and C# have full dynamic code generation... Lisp's dynamic code generation... [is] more limited.
      This is BS. Neither Java nor C# have the equivalents of read, eval, compile, or even change-class as language primitives.

      Common Lisp doesn't specify reflection facilities for generated code because it doesn't specify anything about the implementation of the language. The reason C# and Java can offer generated code reflection as part of the language is that their code generation is tied to a single VM bytecode specification. It is also unfair to call it "compiled" code reflection, since the reflection capabilities are defined over VM bytecode. The downside to the Smalltalk approach (Smalltalk was the first language to integrate the language and implementation in such a way) is exactly the downside of the VMs. With parallel processing coming back in vogue, I suspect that pretty soon we'll be seeing the same idiocy of the 80s (trying to squeeze parallelism out of 'for' loops in C, trying to make a parallel Fortran) repeated in a mountain of research on parallelising stack-based virtual machines. Guy Steele added 3 primitive constructs to the specification of Common Lisp to make Connection Machine Lisp, and those ideas are still the best approach for implementing an efficient data-driven parallel language.

      --

      In the great CONS chain of life, you can either be the CAR or be in the CDR.

    12. Re:dynamic languages by dekeji · · Score: 1

      All Common Lisp implementations have structures, arrays, hashtables, and CLOS objects as part of the standard.

      I didn't say CommonLisp lacked data structures. I said that I think Lisp syntax is a compromise for representing data structures.

      The days of Lisps using lists as their main data structures (in anything but the prototyping phases of coding) are long gone.

      Yes, and that's why Lisp syntax has also become somewhat less important. Lisp syntax is a huge advantage as long as almost everything is lists. But the more diverse and complicated the set of data structures you use becomes, the more Lisp syntax loses its advantage.

    13. Re:dynamic languages by dekeji · · Score: 1

      This is BS. Neither Java nor C# have the equivalents of read, eval, compile,

      No, they don't have them "as primitives", but they have the primitives that let you implement those. For example, if you want Lisp-like read and eval functionality, you can use Beanshell.

      As I was saying, you may not like the way Java provides dynamic features, but it does provide lots of dynamic features.

      or even change-class as language primitives.

      I believe the Java debugging interface specifies that, and it works about as well (take that as you like).

      Common Lisp doesn't specify reflection facilities for generated code because it doesn't specify anything about the implementation of the language.

      Well, neither does Java, really. Java specifies an intermediate level representation, somewhat below the source, but way above machine code.

      The reason C# and Java can offer generated code reflection as part of the language is that their code generation is tied to a single VM bytecode specification. [...] t is also unfair to call it "compiled" code reflection, since the reflection capabilities are defined over VM bytecode.

      Well, the situation is a little more complex. You don't reflect over machine code, but the VM dynamically maintains a one-to-one correspondence between VM code and machine code.

      The downside to the Smalltalk approach (Smalltalk was the first language to integrate the language and implementation in such a way) is exactly the downside of the VMs. With parallel processing coming back in vogue, I suspect that pretty soon we'll be seeing the same idiocy of the 80s (trying to squeeze parallelism out of 'for' loops in C, trying to make a parallel Fortran) repeated in a mountain of research on parallelising stack-based virtual machines.

      Sorry, but that's not how the JVM or CLR work. They are not arbitrary stack machines, they impose restrictions that make them basically just binary representations of the macro-expanded and canonicalized source code using postfix notation. You compile them using the same high-performance compilation strategies you might use with a C, Fortran, or Lisp source compiler. They are no harder and no easier to parallelize than any other representation of an imperative language.

      As for "the" Smalltalk approach, there is no such thing. The original Smalltalk used a stack-based bytecode interpreter, recent versions of Smalltalk (and Self) are using the same JIT approach as Java. I don't know of any Lisp system using a high-performnce JIT (other than those based on the JVM or CLR, of course), and I think that's a major problem with Lisp.

      Java's choice of "binary postfix program representation after canonicalization" instead of Lisp's "weakly parsed uncanonicalized symbols-plus-lists" seems to be a winning combination: manipulating code at that level is slightly less intuitive, but it avoids many of the complexities and limitations of Lisp code walkers. As a result, people have been able to implement things in bullet proof was in Java that ended up being at best flaky using code walkers.

      Let me just be clear again: I'm not saying that Java is "better" than Lisp, or worse than Lisp, In fact, I'm pretty neutral on the matter: I think both systems have some brilliant ideas, and both systems have some absolutely awful design flaws. Neither language meets my standards for careful language design or good taste. But I do appreciate the good points each has to offer and I believe both languages and systems have contributed significantly to progress in the state of the art.

    14. Re:dynamic languages by frank_adrian314159 · · Score: 1
      But the more diverse and complicated the set of data structures you use becomes, the more Lisp syntax loses its advantage.

      And that's why we use XML?

      --
      That is all.
    15. Re:dynamic languages by dekeji · · Score: 1

      And that's why we use XML?

      XML seems to be largely a more cumbersome form of Lisp syntax, and both have many of the same strengths and weaknesses.

      Fortunately, "we" have lots of other choices for representing data. "We" should use the best syntax and tools for each job.

    16. Re:dynamic languages by voodoo1man · · Score: 1

      As I was saying, you may not like the way Java provides dynamic features, but it does provide lots of dynamic features.

      Maybe read was a poor example. External representations aside, eval has nothing to do with interactivity or dynamic features, but everything to do with being able to construct and then execute programs with the regular abstract data structures and operators of the language, without any regard for it's implementation.

      As for "the" Smalltalk approach, there is no such thing. The original Smalltalk used a stack-based bytecode interpreter, recent versions of Smalltalk (and Self) are using the same JIT approach as Java.

      Well, you yourself just stated that the relationship between the generated code and the bytecode is one-to-one. JIT is nothing more than another way to interpret the intermediate code. The point I was trying to make was that Smalltalk was the first system to specify a common, platform-neutral binary representation for program and data and an interpretation mechanism for that representation.

      I don't know of any Lisp system using a high-performnce JIT (other than those based on the JVM or CLR, of course), and I think that's a major problem with Lisp.

      What's the point? To be popular? Cross-platform? High performance? Persistence? Lisp won't be any more popular if there's a bytecode JIT implementation. C is currently the most portable language available, so the cross-platform argument doesn't hold much water (especially considering that the CLR is controlled by Microsoft). Many Common Lisp implementations (Allegro, CMUCL, SBCL) come with native-code compilers that can match or beat G++, so going the JIT way will only be a penalty to performance. Neither Java nor .NET take advantage of the persistence possibilities of a VM like Smalltalk does, but most Common Lisp implementations can already dump a non-portable memory image executable.

      There were several Lisp dialects based on virtual machines in the 70s and 80s, the most prominent being Lisp/370 from IBM and Interlisp. Both used the capabilities provided by the VM quite heavily (Lisp/370 for performance (there's a paper on the subject in the proceedings of the Lisp conference 80 or 82), Interlisp for most everything, especially the exploitation of the sphaghetti stack for control structures). Lisp/370 died for commercial reasons, but Interlisp lived well into the early 90s. It may have been that the system wasn't particularly well structured or architected (which is perfectly excusable considering that Interlisp continually evolved as a single system since the mid 60s), but Interlisp was not easy to port or high performance. The Orbit T compiler showed that source code transformations could produce a more portable, efficient compiler than the alternatives - it was written by four or five undergraduates over the course of two summers, but it was faster than many commercial implementations using either the traditional native-code or VM approaches. Starting with Lucid's Common Lisp, pretty much all the commercial and non-commercial Lisp systems have used the same approach. JIT may alleviate some of the performance penalties for using a VM, but as I've pointed out, there are other disadvantages to tying a language down to interpretation strategies.

      Java's choice of "binary postfix program representation after canonicalization" instead of Lisp's "weakly parsed uncanonicalized symbols-plus-lists" seems to be a winning combination: manipulating code at that level is slightly less intuitive, but it avoids many of the complexities and limitations of Lisp code walkers. As a result, people have been able to implement things in bullet proof was in Java that ended up being at best flaky using code walkers.

      The problem with doing manipulations at the intermediate representation is that the transformation between the high and mid-lev

      --

      In the great CONS chain of life, you can either be the CAR or be in the CDR.

  45. Re:PHP - ASP Showdown by Anonymous Coward · · Score: 0

    It was supposed to be technology comparision. It's true that PHP is popular, but VB is more popular than PHP. Does that make VB better? 8P

  46. Already have a dynamic language ... by quarkscat · · Score: 1

    It is called Forth.
    (extensible, embedible, and cross-platform)

    But is is nice to see a major new release of
    PHP, especially with a compiler, and cross
    platform as well. Congratulations, PHP Team!

  47. Re:PHP - ASP Showdown by andig · · Score: 1

    You are right, but the technology comparison was far from accurate. For example, PHP on Windows supports COM and it can be extended by both COM and dlls.
    A more thorough technology comparison would be a bit more accurate, but in any case, not only do you have to do a technology comparison but also a TCO comparison and that's where PHP wins. Not because it's free but because the development time is so much faster than with ASP.

  48. Unicode Any Better? by ThatDamnMurphyGuy · · Score: 2, Interesting

    PHP is dead. Long live PHP!

    Now that I have that out of my system. Does anyone know if PHP5 Unicode is any better than PHP4?

    Admittedly I've done about 10 total minutes of PHP coding in my entire life, but I do follow it as closely as possible when I'm not thinking about Perl. I always got the impression the Unicode working in PHP4 was a little lacking compared to the latter versions of Perl.

    For example: PHP does have limited unicode support and Joel on Software.

    1. Re:Unicode Any Better? by Vlion · · Score: 1

      And Joel is a bit arrogant and French about the whole affair: as far as I'm concerned, the Internet basically runs on English.

      --
      /b
      |f(x)dx = F(b) - F(a)
      /a
    2. Re:Unicode Any Better? by fatphil · · Score: 1

      I program (PHP) for a small, but international, company which sells GSM gimicks (ringtones/logos/games/services). Presently we sell content to Germans, Danes, Norwegians, Swedes, Estonians, and other countries whose character sets are a subset of the above (Finland, UK, etc).

      And we "blithely" use 8-bits to represent the characters, no doubt much to Joel's chagrin. And everything works. Perfectly. If Joel is unable to get things to work without using UTF, then maybe, just maybe, he should stop pretending that he's a competant coder. Most of our coders are newbs, but are all from places with wacky character sets, and do not make the same assumptions that UK or US programmers would. It's not PHP that's at fault, it's false assumptions that are the problem.

      Joel, as always, is full of false assumptions.
      And arrogant, but that's almost his middle name.

      Oh, and someone needs to tell him that "This platonic A is different than B" makes him sound like an ignorant hick. Different _from_, not different _than_.

      For reference, I don't like PHP, but I criticise it for its real faults (of which there are many) not its imagined ones.

      FP.

      --
      Also FatPhil on SoylentNews, id 863
    3. Re:Unicode Any Better? by J.+J.+Ramsey · · Score: 1

      "And we 'blithely' use 8-bits to represent the characters, no doubt much to Joel's chagrin. And everything works. Perfectly. If Joel is unable to get things to work without using UTF, then maybe, just maybe, he should stop pretending that he's a competant coder."

      Or maybe, just maybe, he is working with language that can't be coded with 8-bit character sets, like, say, Chinese?

    4. Re:Unicode Any Better? by fatphil · · Score: 1

      In which case his argument is little more than "you can't do the chinese character set in 8-bits" which is barely worthy of mention, let alone a whole article.

      FP.

      --
      Also FatPhil on SoylentNews, id 863
  49. Re:PHP - ASP Showdown by Anonymous Coward · · Score: 0

    You mean that the multithreading is the only point that is arguable. Feel free to prove me wrong.

    Oh I forgot:
    + ASP has better code security because of the lack of the "register_globals" option.

    And one point in favor of PHP:
    + The Apache Server is more likely to be set up in a secure configuration than IIS.

  50. Re:holy shit batman! by XO · · Score: 1

    While technically correct, there is nothing there (except perhaps file extension) to denote that it is actually PHP, and I'd argue that you have to at least use one statement/command out of a language to actually make something count as being written IN that language. Otherwise, it's just written in English.

    --
    "Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
  51. Re:PHP - ASP Showdown by Gnpatton · · Score: 0, Flamebait
    except that ASP is run by the evil empire!
    </joke>
  52. Re:holy shit batman! by Dreadlord · · Score: 1
    It should be:
    <?php echo "Hello, World!"; ?>
    If you want your code to be XML-compatible.
    --
    The IT section color scheme sucks.
  53. Let us not forget... by Anonymous Coward · · Score: 0

    Let us not forget that they also released PHP 4.3.8 which closes a remote backd ^H^H^H vulnerability.

    So happy upgrading...

  54. Scheme? by ari_j · · Score: 1

    I didn't check whether it translates PHP to Scheme or implements a bytecode in Scheme or whatever other possibilities exist, but this definitely seems like an extension of Greenspun's Tenth Rule of Programming:

    Every sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.

    Scheme is a small Lisp, compared to Common Lisp, so presuming we throw out bugs and speed because there's an open admission to using a Lisp (whereas gcc, for example, makes no such admission) as well as the "C or Fortran" limitation, the Rule applies.

  55. OS X? by HitByASquirrel · · Score: 2, Informative

    I guess those of us who do not know how to make our own binaries just have to wait for Marc Liyanage to port this thing.

    thanks Marc.

    I cant wait to play with the final XML/DOM-3 libs.

    1. Re:OS X? by martinX · · Score: 1

      Nahh. Just wait for Tiger. I hope.

      --
      When they came for the communists, I said "He's next door. Take him away. Goddam commies."
    2. Re:OS X? by medazinol · · Score: 1

      Marc does a gret job for the Mac community. I'm proficient in UNIX so I'm compiling it as I type on my G5 running Panther. If testing on this system works out for my dev sites than I'll go and try it out on my live Fedora Core 1 server.

  56. Re:PHP - ASP Showdown by Anonymous Coward · · Score: 0

    Yeah, I'll keep that TCO argument in mind the next time I see a site slashdotted because it ran out of database connections.

  57. I hate to say it.... by Anonymous Coward · · Score: 3, Informative

    ...but Microsoft really did get there lightyears ahead of this, with a far more complete class library and a standardized language, as well as a scripting engine that supported true seperation of code, presentation and so forth.

    Just to clarify this, consider the following:- ASP.net's been precompiled since the 2000 beta, and it's been production ready for years. The C# language is also fully documented and is a public standard ratified by the EMCA.

    PHP5, however nice, is treading old water, and in terms of functionality is still lagging behind even Java/JSP. The whole reason I'm assuming people stuck with PHP4, rather than move to something more robust that provides this kind of capability, is that:-

    1) They're apathetic about new technology.
    2) If the old language does what they want, why upgrade. It's *Personal* Home Page, after all, not corporate homepage.
    3) Why make things more complex, for very little benifit.

    Performance wise, the compiled version advantages are fairly insubstantial, and 99.9% of the new stuff they've added could have been done in other ways using the existing language.

    The whole thing seems pretty stagnant, and I'm guessing there's a small chance that the PHP guys are stuggling to find their own space between the land of true pre-compiled OO languages and the interperated world that lay behind it.

    I've worked with PHP4 and ASP.net since both of them were betas, and if PHP wants to be a serious consideration for large scale development, it'd better decide which side of the OO fence its on, and stay there.

    1. Re:I hate to say it.... by a_karbon_devel_005 · · Score: 2, Informative

      Just to clarify this, consider the following:- ASP.net's been precompiled since the 2000 beta, and it's been production ready for years. The C# language is also fully documented and is a public standard ratified by the EMCA.

      ASP.NET is a completely different class of thing. Of course it's been pre-compiled, because just like the other .NET languages, it gets turned in to MS's CLR, which is of course a byte-soup. PHP is not compiled at all, which makes it more flexible to develop... no compile time, just write-test-write-test-write-test ad nauseum.

      There's no real advantage in compiling most PHP code because the life cycle of a script is so short, compiling really wouldn't make much difference. If you're going to be doing so much processing with a script that it requires compiling most people have either:

      1) written the script in another language
      2) compiled some C code and then exposed it to the PHP interpreter (using swig or somesuch).

      But the issue doesn't come up that often because if you're writing things well, php is usually fast enough.

      The whole thing seems pretty stagnant, and I'm guessing there's a small chance that the PHP guys are stuggling to find their own space between the land of true pre-compiled OO languages and the interperated world that lay behind it.

      Stagnant? Have you seen the RAW amount of libraries available for PHP? Have you seen the language changes that have been going on for 5? Obviously not. You're spewing marketing BS with no knowledge.

      1) Modules are constantly written for PHP because it's such a simple language to extend.
      2) The changes in 5 are very significant for those who actually have to USE PHP, and that should be apparent to ANYONE who takes time to read the changelog.


      I don't know where you come up with "stagnant" other than what it "feels like" to you.

      PHP5, however nice, is treading old water, and in terms of functionality is still lagging behind even Java/JSP.

      Examples Mr. ASP? Sounds like more marketing style bs. Post some examples. ( and watch them be refuted in no time flat )

      I've worked with PHP4 and ASP.net since both of them were betas, and if PHP wants to be a serious consideration for large scale development, it'd better decide which side of the OO fence its on, and stay there.

      1) Why the fuck work with ASP.NET when C# is out there?
      2) As much smarter people out there have commented, there is not necessarily a correlation between OO and "scaleability".

      ...but Microsoft really did get there lightyears ahead of this, with a far more complete class library

      Just because PHP doesn't have a large "class library" doesn't mean that it's immense functional library is irrelevant. Far from it.

      The whole reason I'm assuming people stuck with PHP4, rather than move to something more robust that provides this kind of capability, is that:

      Care to mention WHAT kind of capabilities you're talking about?

      Personally I think PHP is good for a great many things, though I like other languages like Python, C#, C++, and Java better for my own stuff. Why don't you post some specific examples though instead of just getting a woody for ASP.NET?

    2. Re:I hate to say it.... by gabe · · Score: 1

      Performance wise, the compiled version advantages are fairly insubstantial, and 99.9% of the new stuff they've added could have been done in other ways using the existing language.

      You'll have to discuss the performance advantages with the Roadsend folks. They're not the ones that make PHP, just this compiler. And no, the new stuff the PHP Group has added could not have been done in other ways, that's why it was added.

      The whole thing seems pretty stagnant, and I'm guessing there's a small chance that the PHP guys are stuggling to find their own space between the land of true pre-compiled OO languages and the interperated world that lay behind it.

      PHP is a web solution. They're not trying to take on general purpose languages at all. Heck, it's not even the "PHP guys" that made this compiler, it's a third-party product. PHP is also very obviously not stagnant.

      --
      Gabriel Ricard
    3. Re:I hate to say it.... by Synn · · Score: 2, Informative

      1) They're apathetic about new technology.
      2) If the old language does what they want, why upgrade. It's *Personal* Home Page, after all, not corporate homepage.
      3) Why make things more complex, for very little benifit.


      You forgot:

      4) Because it works.

      I've been the admin for Apache/PHP servers for close to 6 years now and I've not ever had PHP cause a single crash. You can have complete idiots writing PHP scripts and you don't have to worry about them taking down you're entire server with a bad piece of code.

      The truth of the matter is that people like me don't care which side of the OO fence PHP is on, we just want something that works and we don't want to get phone calls on our off hours about something crashing. PHP is a solid solution for that.

    4. Re:I hate to say it.... by Alioth · · Score: 1

      The drawback of course is earlier versions of PHP were insecure by default (register globals on, no strict mode, no built-in taint checking). It was easy to write PHP code with serious security flaws (and I nearly had my server rooted thanks to one - the script kiddie exploited a bug in a user's PHP script, and used that exploit to run the local root ptrace_kmod exploit that existed in Linux 2.4.19 kernels). It was just fortunate I had patched that particular local root exploit - as far as I'm concerned local root exploits are potential remote root holes given an otherwise fairly harmless exploit in other code.

      I prefer to call PHP "Pretty Hopeless Privacy" as a consequence. I still use it - it's a useful tool to rapidly write a site which doesn't burn too much CPU time - but I've had to write my own taint checking code and fastidiously make sure I use it.

  58. Can this be a JIT compiler? by Theovon · · Score: 2, Interesting

    This makes me wonder if the PHP programs have to be manually compiled, if they can be compiled JIT, or if a compiled version can be cached and only recompiled if the original PHP source changes....

  59. Re:PHP - ASP Showdown by mabinogi · · Score: 3, Insightful

    Ok, apart from the fact that you're obviously trolling, I don't really have a comment on most of your points as I've never used ASP, and I've used PHP enough to know that I hate it and everything it stands for, but I still have to question at least one of your points - "ASP includes database connection pooling, something that costs many thousands of dollars on Unix"

    That sounds like you're quoting a marketing guy with no idea what you're talking about.
    Sure, ASP may contain DB connection pooling, and sure, PHP may not have it, but "Costs many thousands of dollars on Unix" is the most ridiculous thing I've ever heard.

    Show me this many thousands of dollars worth of "Database Connection Pooling On Unix".

    Unix has nothing whatsoever to do with it. PHP runs in IIS quite nicely. And even if PHP was a Unix specific thing, there's nothing hard or expensive about connection pooling, and there are free libraries implementing it in just about any language that can access a database.

    --
    Advanced users are users too!
  60. Woohoo! Now only 3 years out of date! by LoveMe2Times · · Score: 1, Interesting

    Not to be flaimbait (really!), but after reading over the new features in PHP 5, my reaction is, "you mean you haven't had this all along?" Sure, all this is great for existing PHP users, but I don't think users of other languages will care much. New XML support? Now you can define constructors with __constructor() instead of the name of the class!!! Umm... Try/Catch? Overall, it seems they're just Java-fying PHP, in which case you might as well use Java, so it seems to me (unless, of course, you are already a PHP programmer). Perl programmers will just keep waiting for Perl 6, which makes these "new" features seem kinda like your 6 year old nephew threating to kick your ass. People who are looking for a new, hip, language all seem to be going for Ruby, and I can't blame them (heck, I would too if I had time for such things). Hey, can you hold on a sec... 1999 just called, they want their features back...

  61. Sorry, what are you saying? by CaptainPinko · · Score: 1

    I really cannot understand your post. Please don't mod me as troll, but are you saying that instead of writing the compiler in scheme they should just write in Scheme? I can't tell if you are looking down on Scheme/LISP or up at it. I don't consider this OT since I'm just asking the original poster for clarification.

    --
    Your CPU is not doing anything else, at least do something.
    1. Re:Sorry, what are you saying? by ari_j · · Score: 1

      I look up to Lisp and hope one day to be adept at it. My comment is more along the lines of "Way to go, guys! You're making use of a very powerful underlying language to make a powerful language accessible to people with an IQ less than 200." This is a Good Thing (TM). Sorry for the confusion.

  62. Re:PHP - ASP Showdown by Anonymous Coward · · Score: 0

    Which has nothing to do with PHP! I'll bear your ASP comparisons in mind next time I see a site crumble because someone used a MS access database as backend, notice a IIS powered site down on patchday, when counting all the hits in my weblogs from infected IIS machines and when the next IIS security problem shows how stupid Microsoft were intgrating a web server into their OS kernel. Basically, your comparisons will be on my mind - constantly.

  63. Don't you mean "Goodbye PHP"? by markv242 · · Score: 3, Interesting
    Seriously, I'm looking at http://www.php.net/zend-engine-2.php and all that the eye can see is a nearly-identical syntax to Java. Classes, object cloning, Throwables, destructors, exceptions (albeit weak ones), statics... holy crap people, why not just switch to Java? It's all that PHP5 has and more.

    (Hurray for being modded as flamebait!)

    1. Re:Don't you mean "Goodbye PHP"? by AstroDrabb · · Score: 1
      (Hurray for being modded as flamebait!)
      Is this the secret to get people to _not_ mod you as flamebait? Seriously, I love Java and it is a much better language then PHP IMO. Though one thing I cannot stand about Java are the exceptions! Why can't Java exception be more like Mono/C# exeptions. I don't want to have to deal with every exeption that I am not interested in!
      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    2. Re:Don't you mean "Goodbye PHP"? by Anonymous Coward · · Score: 1, Insightful

      I don't want to have to deal with every exeption that I am not interested in!

      Sure... just ignore the errors... it'll never happen anyway, right?

      Senior Programmer
      Davenport, FL USA


      "What company do you work for?"
      "A major one"

      ...

    3. Re:Don't you mean "Goodbye PHP"? by Anonymous Coward · · Score: 0

      Uh, you don't have to compile PHP to run it?

      Why is Groovy so popular with the Java crowd.

      Go dynamic my man, you'll never go back.

    4. Re:Don't you mean "Goodbye PHP"? by base_chakra · · Score: 2, Informative

      why not just switch to Java? It's all that PHP5 has and more.

      Except for speed. :)

    5. Re:Don't you mean "Goodbye PHP"? by Daniel+Dvorkin · · Score: 1

      What irritates me is that they seem to have copied Java's useless interface model. What the hell is the point of interfaces that only allow you to put the signature, not the implementation, in the interface, anyway? (Okay, I know what the point is, but IMO it's still absurdly limiting.) In both Java and PHP, I'd really like a way to put implementation code in interfaces that are shared by multiple classes -- this would offer much of the power of multiple inheritance, without most of its problems.

      --
      The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
    6. Re:Don't you mean "Goodbye PHP"? by addaon · · Score: 1

      How would making interfaces into classes avoid any of the problems of multiple inheritance?

      --

      I've had this sig for three days.
    7. Re:Don't you mean "Goodbye PHP"? by AstroDrabb · · Score: 1

      Multimple inheritence can get ugly, while multiple interfaces can stay much cleaner. Yes, interfaces seem dumb since they do not offer any of the implementation, though then can be powerful. MS's COM is based on interfaces and does have some nice features. I don't see how you could do multiple interfaces with implementatation without the problems of multiple inhertitence. Do you have any suggestions? : )

      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    8. Re:Don't you mean "Goodbye PHP"? by Daniel+Dvorkin · · Score: 1

      Well, okay, now that I think about it, interfaces-with-implementation do have many of the same problems as multiple inheritance, although at least with i-w-i you don't have to worry about the constructor and variables. But anyway. My point is that I've never seen the use of Java-style interfaces (what does COM do with them?) and would really, really like to see i-w-i, or multiple inheritance for that matter, in PHP -- and, come to that, in Java. I've had to resort to some ugly hacks in both languages to get around this lack.

      --
      The correlation between ignorance of statistics and using "correlation is not causation" as an argument is close to 1.
    9. Re:Don't you mean "Goodbye PHP"? by dekeji · · Score: 1

      and all that the eye can see is a nearly-identical syntax to Java.

      The fact that PHP has the same bracket-and-semicolons style as Java and the C family doesn't mean that the languages are all that similar.

      why not just switch to Java? It's all that PHP5 has and more.

      It's the "and more" part that is a problem: PHP is a much simpler language to learn and use, and for most people who create web applications, that's important.

      Another problem with Java is the license; PHP not only has an unrestricted and open specification, it also has a good, open source implementation, both things that Java lacks.

      exceptions (albeit weak ones)

      Good. In addition to being more cumbersome for simple tasks, Java has a number of design problems, its exception system being one of them.

    10. Re:Don't you mean "Goodbye PHP"? by BigNumber · · Score: 1

      It all depends on where you want the processing to take place. PHP processes on the server side. Java processes on the client side (generally speaking of course).

    11. Re:Don't you mean "Goodbye PHP"? by Khazunga · · Score: 1

      Interfaces with implementations are called "abstract classes", and PHP has them. And they don't support multiple inheritance, which is one of the raison d'être for interfaces.

      --
      If at first you don't succeed, skydiving is not for you
    12. Re:Don't you mean "Goodbye PHP"? by scrytch · · Score: 1

      > Except for speed. :)

      Go grab a copy of Resin and set it up to use Jikes for the autocompilation, and then you can tell me Java is slow. Hell, with Resin it's not even all that cumbersome -- except of course for the Java language itself.

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    13. Re:Don't you mean "Goodbye PHP"? by elemental23 · · Score: 1

      1998 called, they want their Java craplets back.

      Client-side Java is dead, and good riddance. Java is much bigger server-side than it ever was on the client (think JSP, Servlets, etc).

      --
      I like my women like my coffee... pale and bitter.
  64. You are hopelessly behind the times by Anonymous Coward · · Score: 1, Funny

    Is this another sign that dynamic languages are the future?

    Umm, let's see, this is slashdot, you probably think C is where it's at, right?

  65. Microsoft heard you by thinkerdreamer · · Score: 1

    I hear that Microsoft is working on something like this. You can punch holes into their ideas of security, but they have the money to make wise choices in research.

  66. PHP is powerful, but weak in some aspects by apia · · Score: 2, Informative
    I use PHP to develop a p2p application (CLI mode), the project name is called "apia", I develop it for more than two years.

    In my experience, the memory management in PHP is not good. Coding should be very careful, or the memory will be usually exhausted.

    Another problem is the speed. Well, it is inevitable that interpreter execution is slow. However, I think PHP can run at least twice than current version if the inner architecture of PHP could be carefully rewritten.

    Additional, I hope PHP could be multithreaded. When develop a serious application, multithreading or multitask can help programmer lots. And also the efficiency of application could be higher.

    I hope these problems could be solved in PHP 5 or later versions.

    If you are interested in apia, check : http://clonefab.net/, but there is no English web site yet, sorry for this. It is developed in Chinese language initially. The English document will be ready ASAP. As for apia package itself already support english. You can download it in : http://clonefab.net/apiaDownload.php

    1. Re:PHP is powerful, but weak in some aspects by Anonymous Coward · · Score: 1, Insightful
      I need to reply to this.
      Coding should be very careful, or the memory will be usually exhausted.
      Coding should *always* be very careful. You should *always* know where your memory is, by design. Having a convenient environment manage it for you is fine, but it doesn't indemnify you from knowing exactly what it's doing, and when it's doing it. I've seen too many lumps of useless code that are just thrown together, with the expectation that it will "just work" because the programmer doesn't have to explicitly worry about allocation/deallocation. I haven't checked to see what guarantees the Zend Engine makes about memory management, so I'll stop there...
  67. As long as there is a need to maximize speed by KalvinB · · Score: 1

    dynamic languages are going to be just another tool in the toolbox. Not *the* tool.

    For dynamic web-sites I can't think of any reason not to use PHP. I even use PHP when I could just as well use server side includes. I just like using PHP so that the pages are future proof in case I want to add some dynamic content later.

    But for real time computing you need fast compiled languages. I'm working on tutorials to teach the basics of software rendering using JavaScript. The final set of lessons deobfuscates and fully explains how Wolf5K works. From there it's on to PHP to teach the core concepts behind raytracing. And from there it's on to C to do real time raytracing and finally it's on to ASM to teach optimization tricks to enhance the quality of the graphics while still retaining acceptable frame rates.

    It's going to be a very very long time before something like Anti-Planet could be written in PHP.

    I'd like to get in the ballpark of what Anti-Planet is doing with my own tutorials.

    Ben

  68. Re:PHP - ASP Showdown by Anonymous Coward · · Score: 0

    You'll find connection pooling buried in expensive 'application server' products (maybe 10s of thousands of dollars is more accurate). Call your oracle salesman. You can also get it through JBoss or something, but that's not PHP.

    > PHP runs in IIS quite nicely
    Last I checked it runs as a CGI, ISAPI isn't supported, and neither is MTS. So, no.

  69. Re:PHP - ASP Showdown by Anonymous Coward · · Score: 0

    Oh, andig. Apache 2.1 supposedly WILL have DB connection pooling. Strange that you aren't aware of it.

  70. Re:PHP - ASP Showdown by andig · · Score: 1

    It is not only a matter of Apache but also a matter of PHP. Currently it is not recommended to run PHP in multi-threaded web servers. The main problem isn't the core of PHP but the dozens of PHP extensions and third-party libraries which they use. You can never be sure those are really thread-safe. So even if you're using Apache 2, best to stick to pre-fork MPM. Anyway, there are other ways to tackle connection pooling and these solutions might appear at some stage.

  71. Parens don't turn everybody off by brlewis · · Score: 2, Informative

    A lot of folks have no problem migrating from f(a, b) to (f a b). In fact, a lot of people don't find the migration from 2+2 to (+ 2 2) all that hard. I use Scheme all the time and like it.

    1. Re:Parens don't turn everybody off by Anonymous Coward · · Score: 0

      I concur. Nobody else seems to have commented that this PHP compiler is written in scheme! That in itself is most impressive.

      My problem now is that the lack of parens in other languages turns me off. I can't code in scheme very well at all, and it's quite annoying having to define a read_line from read_char (recursively, too!), but damn is it a beautiful language. If I have something which doesn't need doing quickly, I try to do it in scheme first.
      Really I oughta pick the right tools for the job, mind.

  72. Thread Safe yet? by bmzf · · Score: 2, Interesting

    Is php 5 thread safe? More specifically, is it safe to use in a production environment with Apache 2?

    1. Re:Thread Safe yet? by andig · · Score: 5, Informative

      The problem isn't the core of PHP, but the dozens of PHP extensions and third-party libraries they use. Even if a library claims thread-safety, it is not always so. Therefore, we (as in the PHP development team) recommend to use PHP with the pre-fork MPM of Apache 2 or with Apache 1.3.

    2. Re:Thread Safe yet? by dave420 · · Score: 1
      Yes, and yes :)

      Watch your PHP libraries, though. I use the basic ones (curl, gd2, mssql (ugh)), and they work fine. I've been using it for a while now (I like to live dangerously), and they've worked fine toghether for months.

  73. Re:holy shit batman! by tintub · · Score: 1

    While technically correct, there is nothing there (except perhaps file extension) to denote that it is actually PHP, and I'd argue that you have to at least use one statement/command out of a language to actually make something count as being written IN that language. Otherwise, it's just written in English.

    Your example was:
    <?="hello, world!"?>

    While technically correct, there is nothing there (except perhaps file extension) to denote that it is actually PHP ;)

    How about:

    #!/usr/bin/php
    Hello, World!
    --
    sig under construction...
  74. How do they know it uses Bigloo Scheme? by toomuchPerl · · Score: 1

    Paul Graham's site makes no mention of using Bigloo Scheme. On the contrary, he mentions Scheme-48 and PLT Scheme.

    Also, how do they know it uses Bigloo Scheme? I find no mention of this on the Roadsend website.
    -toomuchPerl

    1. Re:How do they know it uses Bigloo Scheme? by Habbie · · Score: 2, Informative

      $ rpm -qlp roadsend-pcc-prereqs-beta2-1.i386.rpm | grep bigloo
      /usr/bin/bigloo
      /usr/lib/bigloo
      /usr/lib /bigloo/2.6c
      /usr/lib/bigloo/2.6c/bigloo.h
      /usr/ lib/bigloo/2.6c/bigloo.heap
      /usr/lib/bigloo/2.6c/ bigloo_config.h
      <snip>
      /usr/lib/libbigloo_s-2.6c .so
      /usr/lib/libbigloo_u-2.6c.so
      /usr/lib/libbig loofth_s-2.6c.so
      /usr/lib/libbigloofth_u-2.6c.so
      /usr/lib/libbigloogc-2.6c.so
      /usr/lib/libbigloog c_fth-2.6c.so

  75. SOAP by Tobias+Luetke · · Score: 2, Interesting

    Its definatly an awesome release. I'm thrilled by the native SOAP support.
    Hard to imagine what the OS crowd will do with a blockbuster feature like this generally available. SQLite will improve the xcopy deployment compatibilities of simpler apps and SimpleXML is the best xml API i have seen so far in any language. On the OOP front we get exceptions which will finally unmangle the error systems of most complex php web apps which usually accounted for a big chunk of the code.

    Anyways, php is cutting edge again.

    1. Re:SOAP by Anonymous Coward · · Score: 0

      you're aware that ruby comes with a standard ultrasimple completely OO SOAP library since last december, don't you?
      Also, did you tried REXML as an xml processing library? did you noticed that you can't handle any tagname that has a character not in [_a-z] with XMLSimple?

  76. Long Answer by Anonymous Coward · · Score: 0

    Fuck Yes.

  77. Re:Woohoo! Now only 3 years out of date! by rycamor · · Score: 2, Insightful

    As a long-time PHP developer, I have to agree with you somewhat. PHP5--Woohoo!! Ohh, wait... No namespace support? (Arggh... of all features to leave out...)

    All the new features are sort of the stuff you would call a 'given' for object-oriented programming. Nice to have, but nothing to get really excited about.

    Really the things that I found more interesting about PHP were all the system-oriented capabilities developed from version 4.3 onward, such as streams, sockets, direct I/O, etc... Of course, all these are givens in some languages too ;), but at least PHP puts them all together easily at your fingertips.

    The other cool things about PHP are the really dynamic things you can't do in Java, such as variable variables ($$varname), variable function calls ($function_name()), and the extended features for variable interpolation in strings. Also, features like array_map, create_function, and the overload extension are quite cool.

    But yes, it looks like Perl 6 is going to up the ante big-time. Interesting to see where PHP goes in the interim, though.

  78. i like the taste by POds · · Score: 1

    I remember looking at PHP5 notes on a microsoft slide one evening at work and thinking i cant wait till this comes out.. Now that it is, kewl! :) Even better news is that you can not compile binaries... Thats Awsome!! I'd like to see some statistics... Surly the php binaries must be slower, but just how slow is interesting. Also, Dynamic language i feel will be huge in years to come. I believe they'll be the future. But i dont know how a php compiler fits into that, by dynamic i mean languages that are interpretured, not compiled into machine language. Interpretured languages have some many advantages such as being portable, which will be very important. Cool, i'll have to start brushing up on it, havnt used php seriously since the 4.(1|2|3) days?

    --


    Giving IE users a taste of their own medicine since 2005 - http://pods.-is-a-geek.net/
  79. Perl2Exe, PAR... Perl rocks.. by keepper · · Score: 2, Insightful


    I see so many posts about how this would make them switch from perl to php.. but perl has had this for ages...



    http://www.indigostar.com/perl2exe.htm

    http://par.perl.org/

    HEH!!!
    1. Re:Perl2Exe, PAR... Perl rocks.. by juhaz · · Score: 2, Informative

      No, perh has not had it, and still does not.

      Those are not compilers, they just bundle the interpreter and needed libraries into package.

    2. Re:Perl2Exe, PAR... Perl rocks.. by fatphil · · Score: 1

      Mitä?

      http://fi2.php.net/manual/fi/function.eval.php

      So are you claiming there's no PHP interpreter in the compiled PHP?

      If so, then you do realise that this means that the authors of the compiler have solved the halting problem?

      FP.

      --
      Also FatPhil on SoylentNews, id 863
  80. This could be so exciting... by FoboldFKY · · Score: 5, Interesting

    ...but for some reason I'm rather disinterested.

    Don't get me wrong; I've been doing PHP coding for a while. But the fact of the matter is that the more I code in PHP, the more I dislike it.

    Granted, the new OOP features in PHP5 are a good thing; hell, they should've been in there a LONG time ago. And exception support has me jumping for joy.

    But where for the love of all that is holy is support for namespaces? I mean, sure PHP has a ton of really handy extensions, but I am getting so sick to death with typing underscores that I'll be happy man if the world suddenly decided that underscores were bad and removed them from all character sets (oh, and keyboards) entirely.

    And I've also come to the conclusion that the standard PHP api can't quite make up it's mind whether it's supposed to be emulating C, or maybe some other language. Some array functions are prefixed by array_. Some aren't. Some have their arguments in the reverse order that almost all the others do. It's a mess.

    PHP is a nice language, good for beginners. But it's complete lack of namespaces, half-arsed support for functional constructs (damn I hate having to write callback functions out seperately when they're one liners!), and schizophrenic api are slowly pushing me towards more well thought-out languages like Python.

    Sure, Python's "thou shalt indent" system annoys me a lot of the time, but other then that it's just a clean, logical language. Unfortunetly, support for it on web hosts seems to be all but non-existant.

    Seriously, if the PHP devs really want to bring PHP up a few notches, they need namespaces, and to standardize the API naming conventions. I shouldn't have to constantly open up the PHP manual to work out whether the array sorting function has array_ out the front or not.

    Still, it's a nice set of improvements, so credit where credit is due. Kudos to the PHP team.

    --
    We're geeks... We're the sorcerers of the modern-day world. --
    1. Re:This could be so exciting... by r3m0t · · Score: 0

      They also need to decide whether the array functions return the new array or transform the array passed. This is what really always pisses me off.

    2. Re:This could be so exciting... by JimDabell · · Score: 1

      PHP is a nice language, good for beginners. But it's complete lack of namespaces, half-arsed support for functional constructs (damn I hate having to write callback functions out seperately when they're one liners!), and schizophrenic api are slowly pushing me towards more well thought-out languages like Python.

      I completely agree. The standard Python libraries are inconsistent in places, but nowhere near as bad as PHP's. PEAR alleviates this a little, but you might want to check out PiP (Python in PHP). It lets you use objects written in Python from within a PHP script.

    3. Re:This could be so exciting... by douthat · · Score: 1
      (damn I hate having to write callback functions out seperately when they're one liners!)


      You don't have to explicitly define functions for callbacks.
      When you're using a function that requires a callback function, instead of defining the function elsewhere, use create_function() like so:

      eg: the function array_filter(input, callback) uses a callback as its second parameter.

      $myArray = array(123, 456, 789, 'abcd', 'defg');
      $numerics = array_filter($myArray, 'mycallback');

      function mycallback($value) {
      if(is_numeric($value))
      return $value*2;
      else return NULL;
      }

      using create_function(), you could replace the above with:

      $myArray = array(123, 456, 789, 'abcd', 'defg');
      $numerics = array_filter($myArray, create_function('$value', ' if(is_numeric($value)) return $value*2 else return FALSE'));

      --
      She loves me: 09F911029D74E35BD84156C5635688C0 She loves me not: 09F911029D74E35BD84156C5635688BF ...
    4. Re:This could be so exciting... by harborpirate · · Score: 1

      Don't get me wrong; I've been doing PHP coding for a while. But the fact of the matter is that the more I code in PHP, the more I dislike it.

      I couldn't agree more. A friend of mine and I have been working with PHP off and on for several years now. We've both got more than 10 other languages under our belts, and we've really drawn the same conclusion about PHP: it produces "hacky" code.

      Now, I'm not trying to rip PHP here. I think its a great language for small projects, and has some niche features that make it an outstanding choice for developing certain peices of functionality. Uploading images to a MySQL database comes immediately to mind as an example of something that PHP excels at.

      The problem with PHP really arises when a project begins to reach a higher level of complexity. Lack of OOP, difficulty of separating out display code, and namespaces are some of the biggest problems. The result is that larger projects end up with rediculously complex code. Couple this with the fact that PHP is not the most reader friendly syntax, at least in my opinion, and you have a receipe for disaster.

      Does this mean you can't code large projects in PHP? No, not at all. It just means that large projects are more difficult than they should be, and that programmers must be very disciplined in order to avoid creating code complexity issues.

      The introduction of object oriented programming will help. The question is whether that will allow it to overcome its other weaknesses and allow it to become a language appropriate for large projects as well as small.

      Good luck to the developers of PHP, I hope they succeed fulfilling their goals. In my opinion, having lots of languages to fill specific niches is a boon to the computer science world.

      --
      // harborpirate
      // Slashbots off the starboard bow!
  81. Re:PHP - ASP Showdown by ryanmfw · · Score: 1

    Jeez, you're a bad troll. I've been running it as SAPI for a while now. So, when did you last check? 1995? If the rest of your info is that old, why do you think anyone would believe you? You're as bad as the trolls on alt.sci.physics that deny GR and SR.

    --
    Hurricane Ivan: A 17th century prison collapsed. All of the inmates escaped.
  82. PHP and Unicode by UnConeD · · Score: 3, Informative

    The basic summary is, PHP does not support Unicode or any other encodings properly. PHP strings are 8-bit-per-character and do not have any explicit encoding. Sure, there is a multibyte string extension available, but when you look at the big picture, it's worthless.

    The reason is that PHP's biggest strength is that these days, you can get a PHP-enabled host for virtually no money. However, most of these installs run a standard PHP, some even a locked down one.

    The consequence is that anyone who wants to develop PHP software for a large audience cannot use any non-standard stuff (except /maybe/ the popular graphical extensions like GDlib). Which means that for those developers, PHP does not do Unicode at all.

    I don't see why they won't do native Unicode, when Perl, Python, Java and all the other popular web languages support Unicode with all the bells and whistles.

    1. Re:PHP and Unicode by metamatic · · Score: 1

      Neither Perl nor Python support Unicode, if by "support Unicode" you mean "allow use of Unicode strings like you'd use ASCII strings". They all require hackery involving library calls, which means all your code needs to be rewritten.

      Java does support Unicode. It's one of the things that Sun got right. Java programs are Unicode, Java's standard strings are Unicode, so if you suddenly need to use Unicode, you don't need to rewrite everything.

      If Ruby supported Unicode, I'd switch to Ruby. If Python supported Unicode and didn't suffer tab damage, I'd switch to Python. As it is, if I'm doomed to using a broken scripting language, I'll stick with the one I already know, Perl.

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  83. Why not get your feet wet? by gabe · · Score: 1

    Download the source
    tar -zxf php-5.0.0.tar.gz
    cd php-5.0.0
    ./configure
    make all install

    --
    Gabriel Ricard
  84. Re:PHP - ASP Showdown by Anonymous Coward · · Score: 0

    "Currently it is not recommended to run PHP in multi-threaded web servers"

  85. Re:Yahoo Store, of course, is in LISP by Anonymous Coward · · Score: 1, Informative

    Yes, because it's exceedingly difficult to write a general tree or graph algorithm in a language that has arrays of arrays and references.

    I can't believe you got a +4, Informative for a completely inaccurate comment. Congratulations.

  86. dynamic languages by dekeji · · Score: 2, Interesting

    Benchmarks say that performance is pretty good. Is this another sign that dynamic languages are the future?"

    No more and no less so than they have ever been: dynamic languages are a good choice for many, but not all applications. And dynamic languages have been enormously popular for decades, with far programmers using them than using static languages; PHP just follows in that tradition.

    What is more interesting is the emergence of dynamic languages which use static type systems by default: in their runtimes, Java and C# have more complete and better defined dynamic features than Lisp, but they still give the user a simple static type system by default. It remains to be seen whether that gives you the best of both worlds or the worst. Fortunately, their runtimes are well-defined enough that one isn't limited to the specific choices that the currently popular languages running on top of them have made.

  87. Re:holy shit batman! by XO · · Score: 1
    <?
    denotes the start of a PHP code block, and "=" is a shorthand for "echo", kinda like "?" was the shorthand for PRINT back in the BASIC days :D

    --
    "Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
  88. Of course Java Interfaces are usable! by Philosomatographer · · Score: 1
    Java Interfaces have perfectly good uses, and you, sir, may simply naver have encountered the need for them. For example, we have a wide variety of class in a quite elaborate class library built up over years. We recently sought a better way to configure applications, and their sub-components: Simple, create a
    Configurable
    interface, with a
    public void configure(Properties configuration)
    method, and voila: The start of a really flexible configuration framework. All interested components simply implement this interface, and apps can manage the configuration of their child components. I can think of a million reasons why Interfaces, as they are implemented now, are an excellent mechanism for clean decoupling of code.
    1. Re:Of course Java Interfaces are usable! by gbjbaanb · · Score: 1

      No-one is criticising the idea of inheritance - just that whilst your model of simple, single inheritance is fine, when you try to inherit off 2 interfaces, you have problems. Sure, every one of your objects are accessible through the Configurable method, but the code that does stuff to them has to be written each time for each object. You cannot have a common class that is inherited for managing the core of the configuration whilst also inheriting off another class.

      The reason this is done was not becuase of any problems with MI, but because implementing single inheritance in a language is much, much easier.

      Interfaces are good, but frankly, you could just cut and paste the same method signatures into your classes and end up with the same result.

    2. Re:Of course Java Interfaces are usable! by PantsWearer · · Score: 1
      The grandparent's example was really not the best. One of the best I've ever seen is from the standard Java Collections API itself. It's the Comparable interface.

      Basically, it allows you to toss a bunch of objects of the same type in a bucket designed to hold any type of objects and still allow you to sort them. You have to implement the Comparable interface on your object to get it to work.

      Of course, alternately, you could implement this method on the Object object at the root of the object tree. This is how Smalltalk handles the problem. The only problem with this is that this method will exist for every instance of any object and you can call the compareTo method on any object. So if you happen to have a couple of objects of the same type and you compare them, but they don't have any kind of order? You suddenly can sort anything you want, but the order you get out of it means nothing. And you'll still have to overwrite the parent method to get a correct ordering anyway, so we're back to the same problem.

      Interfaces are good, but frankly, you could just cut and paste the same method signatures into your classes and end up with the same result.

      You don't get the same result because interfaces allow for some advantages of multiple inheritance. In other words, if you need to see if something is Comparable, you just check if it's an "instance" of the Comparable interface. If you just toss in the methods you want, you'll have to go in and check if those methods of that signature exist and then hope that they were actually implemented as you hoped.

      --
      Be glad life is unfair, otherwise we'd deserve all this.
    3. Re:Of course Java Interfaces are usable! by gbjbaanb · · Score: 1

      I know, you can check for an interface and if true - you know the right methods are implemented. I think its a bit like adding methods in a 'strongly typed' way.

      However, each class still has to write its own implementation of the interface methods. That's the problem with interface inheritance, compared with implementation inheritance, and its just a shame that SI is the only way to get that with many languages nowadays.

      eg. if you have the comparable interface, for objects that are all vehicles.. then you can compare cars to vans (by weight say), stick the Comparable interface on the '4-wheeled-chassis' base class and you'll be fine. Until you want to stick bikes in the collection, where you'll have to re-implement the code that compares weight when you inherit the '2-wheeled-chassis' class with Comparable.

      Then, one day, the business decides that vehicles are to be sorted according to model, and now you have to change 2 methods (the interface on 4-wheeled and 2-wheeled), instead of 1 (if you used implementation inheritance).

      Sure, for the Java API, having it as an interface makes sense, as they don't know what you'll be sorting on, so you'll always write new code. In your own code though, often you don't want to reimplement the same methods all the time.

      That's the biggest problem with interface inheritance compared with implementation. However, it is easier for the language writers to put it in their language..... hrmpf.

    4. Re:Of course Java Interfaces are usable! by Steveftoth · · Score: 1

      That example is not so great IMO, because for sorting with the comparable interface, most of the time it's not a good idea to make the objects actually know how to compare between all the different types. AKA if 2-Wheeled and 4-Wheeled vehicles both extend Vehicle, then 2-Wheeled shouldn't know about 4-Wheeled. Instead you should make a Comparator that can sort between 2 and 4 wheeled vehicles, and when your new 3-wheeled vehicle comes along then you modify your ONE comparator. For convienence sake, I usually stick the comparator instances in the base class (Vehicle) and name them such that nobody is confused as to what they can actually compare (getAllVehicleComparatorByWheels, getCarComparatorByColor, get2And4WheelComparatorByWeight, ... )

      Interfaces are great, but most people don't know how to use them.

      MI simply doesn't work, when casting the same object to a different type causes different methods to be called with the same signature, then you have problems...
      aka
      Object o = new MI();
      ((Type1)o).call(); // returns 1
      ((Type2)o).call(); // returns 2
      This shouldn't happen because it's confusing, to the API designer, to the user of an object etc.

  89. php 5 by chrisranjana.com · · Score: 0

    good for php and developers need to learn and keep abreast with latest changes etc..

    --
    Chris ,
    Php Programmers.
  90. More proof . . . by peachpuff · · Score: 2, Insightful
    . . . that it's mostly in the eye of the beholder:
    If you wonder why you should type verbose hard-to-read stuff like "[f for f in n if f < 4]" instead of something like "n.each { |f| f<4 }", the give Ruby a whirl.
    --
    -- . . ramblin' . . .
  91. Re:PHP - ASP Showdown by mcrbids · · Score: 1

    ASP includes database connection pooling, something that costs many thousands of dollars on Unix

    Oh yeah? Or, perhaps you meant this one?

    Perhaps you forgot to mention persistent, shared memory objects, which ASP cannot do, but PHP CAN? Get a clue, dude.

    PHP is aweseome. It's powerful, reasonably fast, allows for incredibly rapid development, lets you get alot done FAST, and it's free.

    What's to argue with? I use PHP for

    1) client application development with PHP-GTK

    2) Exensive server based development a la LAMP .

    3) Shell/other scripting with its CLI interface.

    I've written daemons with PHP. It's clean, simple, and powerful. My best is a large, 50,000+ line application in it. Write a clean codebase with consistent error-handling, and it's a breeze.

    It's downright fun to take the contents of a file, turn it into an array with a single line, loop thru it with 1 more line, do a few if statements, and process a 500 MB file in 5 minutes flat.

    I *love* replacing a large, complex mini-applet with 12 lines of PHP code - I've done it time and time again.

    And, to write in it all day long?! Pure heaven.

    I'll be watching PHP5 - I've not deployed it anywhere, and probably won't even start until PHP-GTK 2 (with PHP5, GTK2.X) is out.

    BTW, I'm also using Apache 1.3...

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
  92. Well, not really by Julian+Morrison · · Score: 1
    The python syntax is un-python-ish, it looks like it was cloned straight out of some other programming language.

    The ruby syntax is dead standard:
    n.each <== method call
    { |f| <== create a closure with one formal parameter
    f<4 <== lt operator, obviously
    } <== and end the closure, passing it as a parameter to the method "n.each"
    1. Re:Well, not really by Anonymous Coward · · Score: 0

      But Ruby is still verbose. Why do I have to declare a formal parameter at all in a closure? Haven't you people heard of partial application?

      Try Haskell for elegance: filter (.

    2. Re:Well, not really by Anonymous Coward · · Score: 0

      Gah, damn Slashdot's stupid code. The Haskell example should have read filter (< 4).

      No, Slashdot, I am not a cowboy. I'm trying to correct a fucking mistake in my previous post. I guess that's something Slashdot editors don't really do very often though, isn't it?

  93. PHP becoming *very* interesting by Qbertino · · Score: 1

    I do a lot of professional web and internet developement, but never thought of PHP being the cream of software technologies. Mostly due to the fact that it is 'just' a SSI language which mangles content and code to much for my taste. And for SSI stuff, Zope's TAL extension still is the most interessting imho.

    Yet me, and everyone else in the field allways has been well aware of the fact that PHP is the 400 lb. Gorilla of SSI technologies and web developement platforms. And one of those OSS technologies that lead the field in their league. Feature and library laden, performant, well documented and with something like a bazillion active Inet and www related projects using it as primary PL.

    What is begining to show now is that the libs and features are growing more and more dense and specialized for tasks that are known to be the most common way of doing things right. Such as extensive use of XML for content, object orientedness in developement and optimized acceleration for the languages primary field of use.
    PHP is more and more becoming a one-size-fits-all primary choice for web related stuff, finaly completely dismissing ASP.NET, JSP and Cold Fusion as mere also-ran candidates. Even for those who initially consider using them.

    Even though PHP isn't by far the cleanest of modern PL's - I would even say it's somewhat ugly compared to, let's say, Python - I'm begining to expect it to become an all time classic like C or C++.

    --
    We suffer more in our imagination than in reality. - Seneca
  94. Alternatives to compiling Perl to native code? by dotnetwolf2003 · · Score: 2, Interesting

    Lucky PHP guys.. Too bad that support for compiling Perl code into executables is almost non-working.. The only viable alternative I know of is using Stunnix Perl-Obfus for obfuscation/scrambling, and turning output into executable with PAR or Perl2Exe. Does anybody knows a better alternative?

  95. Why not using Lisp instead? by stesch · · Score: 1
    The Roadsend compiler produces standalone, native executables, and supports the entire PHP language (but not all extensions). It uses Bigloo Scheme to do its job, a variant of Lisp, the language that Paul Graham writes about.

    OK, Lisp is cool enough to compile PHP5. Why not switching to Lisp and skip this part?

  96. The Roadsend compiler is dog slow by Habbie · · Score: 1

    I don't care what those benchmarks say, for me the Roadsend compiler is magnitudes slower than native PHP, on several benchmarks and some real world code..

  97. Re:Woohoo! Now only 3 years out of date! by Anonymous Coward · · Score: 0

    Instead of $$varname, please consider abusing a namespace of your own. Make an associative aray $foo, and use $foo[$varname] instead.

    Remember, an associative array can work as a namespace, so every time you type $$, please write "foo[" between the $$s.

    This same argument applies over $bar(...) style function calls. You ought to be able to type it as $foo[$bar](), but I'm not sure of PHP's level of support. I know this works in Python and Perl, at least. This has the added benefit of constraining the amount of functions callable by this construct: only those in $foo can be called. It should be a good thing for security-conscious people.

    Variable interpolation in string tends to get ugly, for anything more complex than "bar $foo baz". Please use sprintf-style calls instead.

  98. Hey! by geordie_loz · · Score: 1

    I'm a geek and I get some... my geek code proves it! -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d- s: a- C+@$ UL+++>++++ P+>+++ L++>+++ E--- W+++ N+ o? K- w-- O- M+ V- PS--- PE Y PGP>+++ t- 5+ X- R- tv b++>+++ DI D+ G e++ h--- r+++ y+++ ------END GEEK CODE BLOCK------ (r+++ y+++)

  99. Re:Yahoo Store, of course, is in LISP by letalis · · Score: 1

    You can do similiar data structures with PHP, for example a tree can be created with arrays containing leafs and other arrays mixed.

  100. No it wasn't... by Phil+John · · Score: 2, Informative

    ...Dmitri who wrote Turck mmcache was offered a job at Zend and, shock horror, took it. However, as mmcache is GPL'd it lives on at sourceforge, with a new cvs commiter appointed (IIRC) and dev work continuing. To be honest though, it's pretty much feature complete so all they need to do is sure up support for PHP5 (still beta at the moment).

    --
    I am NaN
    1. Re:No it wasn't... by Anonymous Coward · · Score: 0

      Actually, you don't remember correctly. Development seems to have ground to a halt.

  101. Re:Woohoo! Now only 3 years out of date! by LoveMe2Times · · Score: 1

    Now, admittedly, I'm *not* a PHP programmer. I only peruse annoucements like this periodically in case someday the choice of whether to use PHP or "technology X" lays before me. I don't use scripting languages much, using Perl when I do. But the things you mention as plusses *seem to me* to be pretty common amoungst the scripting languages (as you even say :). Seeing as how you're already a PHP developer, I expect these OOP features to be a great boon for your development. I guess I'm just hard pressed to see the long term PHP niche. Java's got most of the enterprise market and tool/vendor support, Perl 5's probably still got the most hacker/sysadmin users, while Perl 6 is just this side of vaporware they've at least mapped out a clear path to the future, and Ruby and Python have fancy shmancy language features and are pretty mature by now. So is the magic in the secret sauce or what?

  102. wrong by solidox · · Score: 4, Informative

    i'm not quite sure where you're getting this from.
    i've been using php5 since the first beta and afaik it has never required overloaded child methods to require the same number of arguments as the parent class.

    <?
    error_reporting(E_ALL|E_STRICT);
    class SomeParent
    {
    function __construct($var1, $var2)
    {
    echo "Parent: $var1, $var2\n";
    }
    }
    class SomeChild extends SomeParent
    {
    function __construct($var1,$var2,$var3)
    {
    echo "Child: $var1, $var2, $var3\n";
    }
    }
    $x = new SomeParent(1,2);
    $y = new SomeChild(3,4,5);
    $z = new SomeParent(6,7,8); /* outputs:
    Parent: 1, 2
    Child: 3, 4, 5
    Parent: 6, 7
    */
    ?>

    as for sqlite as session handler, it is not the default, nor has it ever been the default.
    there was a patch to ALLOW it to be used as a session handler, by setting session.save_handler = sqlite in php.ini
    but if we look at the php.inis in the php5 distribution:
    [solidox@server150 php-5.0.0]$ cat php.ini-*|grep "session.save_handler"
    session.save_handler = files
    session.save_handler = files

    both dist and recommended use flat files as the default session handler.

    --
    1. Re:wrong by Trifthen · · Score: 1

      I've been following the PHP developers mailing list. The comments I've made have come up in discussion in that list quite a few times, with many ensuing flame-wars. Maybe some of that got quietly dropped, but that would be odd. Here are a couple links that illustrate what I've been watching over the past few months:

      Method Overloading and Sqlite Session Handler.

      I didn't make any of this up, nobody could. Maybe it was finally decided off list to drop these things, but some pretty big developers were involved in these conversations. I'm just stating what I last knew to be the direction they were going with certain decisions and giving people warning that things may not be as compatible as they think.

      --
      Read: Rabbit Rue - Free serial nove
    2. Re:wrong by Anonymous Coward · · Score: 0

      by default == compiled by default, not activated by default.

  103. Re:PHP - ASP Showdown by mabinogi · · Score: 1

    You also get logging in those application servers, are you telling me that logging is something that costs many thousands of dollars?

    Database connection pooling is trivial to implement.
    It's definitely not the thousand dollar feature of those application servers.

    --
    Advanced users are users too!
  104. Why don't you use something free like... by Phil+John · · Score: 1

    ...Turck mmcache, which is completely 100% free OSS (GPL) software, works as a zend extension and not only compiles to zend engine byte-code but also caches the result in ram or a mmapped file? It beats all of the other encoder/loader combo's for speed (probably one of the reasons Dmitri (the guy who wrote it) got offered a job at Zend).

    We've been running it on two of our production servers as a test over the past few months, and apart from having to recompile every new PHP release it's been rock solidly available 100% of the time - and has reduced server load to negligible levels. These are high traffic servers too, doing ~900 gigs to a terrabyte per month of traffic- all highly dynamic sites.

    --
    I am NaN
  105. What about Perl6/Parrot? by wildjim · · Score: 1

    I'm a huge fan of Ruby, and have been using it for years, however I still use Perl a lot, mostly because more people know how to use it at my work, and fewer people understand objective programming here, too.

    But another reason I still use Perl is 'Perl 6', and the fact it seems to be incorporating a lot of the things I like about Ruby, plus a couple of other interesting ones, but also because the Parrot VM is supposed to allow you to write different parts in Perl or Ruby (or Python, etc?) or *whatever* is appropriate at the time.

    I really like the idea of your HTML developer being able to use their polished PHP/HTML skills to suck the data through the nicely objectified RubyOracle libs your DB Developer wrote (instead of the rubbish method(s) PHP insists on now for accessing SQL-ised data...) which can also interact with the more up-to-date Perl6/LDAP libs, all because Parrot lets them work together at the code-level.

    1. Re:What about Perl6/Parrot? by Anonymous Coward · · Score: 0

      If it ever gets released...

  106. PHP5 Looks great by ElliotMadHatter · · Score: 1

    I can't wait untill it is fully possible to write object orientated windows programs in PHP... it will happen, one day!

  107. Re:PHP - ASP Showdown by ryanmfw · · Score: 1

    Sure, but that doesn't mean that it doesn't run on SAPI. You're a true idiot, you know that? Sure, it might be running in multithreaded mode, but andig already answered why you shouldn't, because of the third part packages and the like. So, just shutup, you're obvious trolling just proves how stupid you are.

    --
    Hurricane Ivan: A 17th century prison collapsed. All of the inmates escaped.
  108. debugging by mgkimsal2 · · Score: 2, Interesting

    If memory serves, PHP3 had built-in debugging output capabilities. When Zend became 'official' and PHP4 was released, debugging was suddenly nowhere to be found. BUT, lo and behold, you can get debugging capabilities if you purchase the Zend Studio and server extensions. Yes, there are open source debugging extensions now too, but that move was the one that made me start thinking like you're doing. Again, nothing inherently WRONG with it, but it was something that seemed to be held out of the core system to help fund the development by selling it separately.

  109. Some small questions... by WWWWolf · · Score: 2, Interesting

    Have they fixed the most annoying thing about PHP4? Specifically, if I put <?xml version="1.0" encoding="iso-8859-1"?> quite normally outside of PHP code, PHP4 barfs. (Which is quite annoying if the recommended way to put PHP code in is to use <?php ... ?<, specifically for XML/XHTML compliance. A savage hypocrisy.) And before you ask, no, I can't mess around with PHP configuration or anything.

    Also, what about componentization? Any news on that front? I'm quite fond of Perl's HTML::Mason and sort of like JSP tag library ideas - can I clearly separate the code and the page, or do I still need to mess them together?

    News of a new XML parser sound good, though. PHP4's idea of XML parsing is... ugly. =)

    1. Re:Some small questions... by KirkH · · Score: 1

      I'm no PHP expert, but there are several ways to embed PHP code. The ?php method is called XML style, but you can also just use ? (called SGML style). Sounds like you're having a conflict with that latter style. The machine's admin can turn it off in the php.ini file.

      IMO, no one should use anything but ?php for portability reasons.

  110. Re:Yahoo Store, of course, is in LISP by IamTheRealMike · · Score: 1

    Yahoo Store *used* to be in LISP. As far as I know, it was rewritten some time ago, partly because nobody knew the language and partly because the way it was done meant they had to have stupid warnings telling the user not to hit the browsers back button.

  111. Where's this guy been? by NathanE · · Score: 1

    Is this another sign that dynamic languages are the future?

    Is this guy serious? Where's he been the last 7 years? hehe.

    1. Re:Where's this guy been? by be-fan · · Score: 1

      What's happened in the last 7 years? As far as I can see, it's static languages (Java, C#) that have been hogging the spot-light in that time.

      --
      A deep unwavering belief is a sure sign you're missing something...
  112. loops like for and do/while by brlewis · · Score: 1

    There isn't any loop construct in C that can't be done easily with named let in Scheme. You really don't have to learn recursion if you don't want to.

  113. read-line by brlewis · · Score: 1

    Don't use R5RS as your reference doc. Use the docs that come with your Scheme implementation. I'd be surprised if you're using an implementation that doesn't come with a read-line function.

  114. Re:Woohoo! Now only 3 years out of date! by rycamor · · Score: 1

    Well... hehe. You have pretty well described the lay of the land, except for your last question. I still wonder myself sometimes, but there is definitely something about PHP that just makes it sooo easy to get things going with it. It's by no means the most elegant language out there (I have actually been toying with Python, although I find some things about it very irritating too).

    In fact, I think PHP's previous simplicity and 'under-featuredness' with regards to OOP are actually what made it so popular. It's not like Java, where you have to not only understand language syntax, but absorb a large piece of documentation on the "foundation classes", and who knows what other standard libs. It's not like Perl, where you have to get all kinds of oddness firmly fixed in your head in order to really be proficient (not that Perl isn't fun--its probably the most fun scripting language out there).

    Also, there are people, like me, who are just a little skeptical of the grand benefits of OOP, especially when you are doing applications which can express business logic in a database like PostgreSQL. IMHO relational logic is the ultimate way to handle the business needs of an organization, and I don't buy the whole object-relational mapping thing. So in that sense, I don't depend on PHP to handle the grand scheme of things, but to handle the messy details of displaying data, taking user input, dynamically buidling HTML, etc... PHP tends to make messy details easy, which again is because of it's "bad" features like weak typing, using the same prefix on all variables (unlike Perl), easy array access and manipulation, etc...

    Also, I have recently been doing some serious client-side scripting in PHP (sockets, Unix system stuff, etc..), and it is quite nice. The only oddity there is the need to enclose all PHP code in the tags, but I'm sure that will be an optional thing sooner or later.

    Oh, and the other part of the 'secret sauce' is that PHP is so easy to install on just about any operating system out there. Can't complain about that.

  115. Ruby is not a superset of python nor perl by cout · · Score: 1

    The Ruby interpreter will not run python code, nor will it run perl code.

    Ruby borrows features and ideas from perl, scheme, and smalltalk. From perl it gets powerful regular expressions and other features that are generally useless but are great for one-liners. From scheme it gets continuations and lambdas. From smalltalk it gets blocks, which are a very powerful way to represent acquiring and releasing of resources.

    I don't know what ruby might borrow from python, but I'm sure there's something. The syntax is similar, at any rate.

    All this borrowing is a good thing. It means that Ruby can take the best of what's out there and combine it into a single package. But when it does that, it loses something in the process. Ruby isn't good for purely functional-style programming; use scheme for that. In ruby almost everything is an object, but if you want everything to be an object (even your control structures) you should consider smalltalk. And ruby isn't the fastest interpreter out there; if you want something faster, determine your requirements and write some benchmarks to find something that suits your needs.

    Ruby is a great language, but what's even better is its community. It's a small community right now, and with a small community comes a quaintness and a friendliness that is generally not found in larger communities. Unfortunately, a side efefect of ruby's small community is that there are fewer libraries available for ruby than for, say, perl or python. Plus a nice small community is something that cannot last; as ruby gains in popularity, it will attract trolls and garbage library writers.

    Give ruby a try, but don't expect it to solve all your problems. It will not make breakfast for you in bed or greet you with a kiss.

    1. Re:Ruby is not a superset of python nor perl by Beale · · Score: 1

      Give ruby a try, but don't expect it to solve all your problems. It will not make breakfast for you in bed or greet you with a kiss.

      So, where can I find a programming language that will?

    2. Re:Ruby is not a superset of python nor perl by einhverfr · · Score: 1

      Try the one called Word Instruction Formula Emulator (WIFE). Or if you are female, Hash-Uniform Symbol Bridging Algorythm Name Development (HUSBAND).

      --

      LedgerSMB: Open source Accounting/ERP
    3. Re:Ruby is not a superset of python nor perl by Beale · · Score: 1

      I hear the syntax for those is nigh impossible to learn, though.

  116. Swedish chef: on PHP 5 by elwell642 · · Score: 1

    It'll be scary to find systems borken because of version updates.

    De system's borken! Borken borken borken!

    --

    <insert witty linux comment here>

  117. my experience with php by scrytch · · Score: 3, Interesting

    I remember putting a CMS together with PHP4, something like Midgard, but pure PHP with multiple backends. It's not entirely a bad design even now, though I think Zope has a better answer.

    I ran into some awesomely dumb stuff. I mean "what are they smoking" stuff.

    Brain dead parser: First of all, this requirement to put everything in tags or whatever brackets you have defined. What is this, javascript? (and even javascript doesn't need it if you use src="foo.js"). That alone, not so bad, but the parser would easily choke on any end bracket construct ANYWHERE -- in a string, in a comment, etc.

    Flat namespace. OOP completely unused in extensions. Since PHP can easily call functions dynamically by name, and we have PEAR now, I consider the problem solved. No worse a hack than perl's OOP implementation, really. But I had other problems with OOP...

    Pass-by-value: PHP4 would pass objects by value. Which is actually great if I want such value-type, but 99.9% of the time, I don't. What made matters worse was PHP's twisted notion of object identity -- it had no operator to test it. Equality comparison operators were always by value, and either "shallow" or "deep". I had to explain the concept of object identity, and for my trouble, got the '===' operator ... which did exactly the WRONG thing and implemented even DEEPER comparison. That was the point where I went over the edge and wrote off PHP. I hear this behavior has mercifully changed to a sane one in PHP5.

    Second-class-language attitude: I got choice responses from Zeev himself about how PHP is never intended to be more than a "web language" (apparently meaning limited to trivial scripting, because the web apps I use sure aren't trivial). PHP can be and has been used for powerful things, but I don't see writing a caching bulk DNS lookup service that tests against multiple RBL's using PHP if I can't get a serious contender to Net::DNS because PHP is "merely a web language" after all. I used Perl for that, then switched it to Python (stackless was ideal for this job) and then dropped it into the object publisher in mod_python. Painless. There is no such thing as a "web language", behind every web app there should be a *real* language.

    Error handling: Nonexistent. Got an error, it would print a traceback to the output if you were lucky. Syntax errors would simply die without any useful diagnostic. No eval (well there is, but it would also just die on syntax errors). I've seen structured exceptions in C, but PHP's was awful. Awesomely brittle.

    Hopefully PHP5 is migrating most of these warts away from PHP4. Perl certainly still has its own problems (mod_perl 2.0 is still not in a stable release state) so it's not too late for PHP among current perl users.

    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
    1. Re:my experience with php by zeev1 · · Score: 1

      Just to set the record straight, when I meant that the primary of focus of PHP is going to stay the Web, it's very different from saying that it will remain 'just' a Web language.

      Considering the importance of the Web which is already high and just growing, being *THE* language (with a capital D) is a lot. Hoping to take the entire computer language world in storm just makes no sense.

      PHP 5 does not try to become a general-purpose language any more than PHP 4 has. The focus is still, and will remain, the be the best Web language on the planet.

      And yes, it does mean that I completely disagree with you as to whether there exists such a thing as a Web language (or as I would put it, a language designed/optimized for the Web), and it does come at a certain cost.

  118. PEAR is extremely limited by Anonymous Coward · · Score: 0

    I like PEAR, but its module offerings are very limited compared to what CPAN offers as the original poster pointed out.

  119. Try perl's IO::Socket and IO::Select by cquark · · Score: 1

    I love perl's IO::Socket and IO::Select classes for writing socket-based applications. Python's socket and select classes are quite nice too.

  120. Perl/Linux PHP/Linux by Anonymous Coward · · Score: 0

    so there is now a Perl/Linux:
    http://perllinux.sourceforge.net

    is PHP complete enough to create PHP/Linux?

  121. Re:PHP - ASP Showdown by dave420 · · Score: 1

    PHP is much faster than ASP running on a comparable system. Oh, and ASP and IIS are connected at the hip, and anyone running an IIS webserver needs to be strung out in the desert somewhere. :-P

  122. mod_python by Anonymous Coward · · Score: 0

    is still my weapon of choice; I haven't yet run across a scripting language I like better than python.

  123. Ruby, get a Unicode clue! by pjacobi · · Score: 1

    Unlike Perl and Python, Ruby hasn't accepted yet, that it is important to have good, integrated Unicode support.

    This is the single point stopping me to switch over to Ruby.

    1. Re:Ruby, get a Unicode clue! by Anonymous Coward · · Score: 0
      Unlike Perl and Python, Ruby hasn't accepted yet, that it is important to have good, integrated Unicode support.
      Unicode is the devil's own acidic jism. If plain ascii was good enough for Shakespeare, Cicero & Jesus Christ, it's good enough for you.
  124. Another PHP encoder by Anonymous Coward · · Score: 0

    Turck MMCache is another PHP encoder (not compiler). The project is seeking a skilled C/C++ programmer, and if you are one, please take a look if you would like to join.

    URL: http://sourceforge.net/projects/turck-mmcache/

  125. MOD PARENT DOWN by LittleDan · · Score: 0, Flamebait

    I can't believe this has a 5 rating; it's obviously just an advertizement for Ruby. Before I begin rebutting what the Anonymous Coward wrote, line by line, I'd like to say that I'm *not* a Pythonista, my favorite language is Kogut, or Scheme for real development.

    "Ruby is basically a superset of Python and Perl."
    I have no idea where that statement came from. Ruby is a completely different paradigm than Python or Perl, with completely different syntax.

    "'len(str)' instead of 'str.len()'"
    For historical reasons, really, but it can still be overloaded with the __len__ method.

    "'[f for f in n if f 4]' instead of something like 'n.each { |f| f4 }'"
    You find the Python way less readable? It only has one more character, and I'm not sure they actually do the same thing. Either the Python version should be changed to
    [f4 for f in n]
    or the Ruby version should be changed to
    n.select { |f| f4}
    or something like that. Either way, now the Python version has fewer characters. I can read both of them easily. I prefer the Ruby approach slightly, because it's more flexible, but you can't say the Python way looks bad.

    "If you ever programmed Perl..."
    Well, I can't really defend Perl, but I don't see why you're doing UNIVERSAL:: when you'd usually just import that and have the line be
    isa $val, "FooClass"
    which fits fairly well into the Perl syntax. Besides, when Perl6 comes out in 2025, they should have a real object model.

    "If you like adding your own methods to base types"
    I have to admit, this is a major shortcomming of Python, but you can do this in Perl5 if you're using multimethods and also in Perl6 whether or not you're using them. Also, most functional languages can do this too, and have the functions be scoped in a module.

    "If you like distributed programming you'll get a kick out of DRb"
    I'm supposed to choose a language because there's this one library that it has? Is there something in Ruby that makes it the only language capable of wielding the awesome power of DRb?

    "Do you need extended your languages with external C libraries? You will positively, absolutely shit yourself three times when you try out Ruby/DL, which lets you extend Ruby with arbitrary C libraries at run time without any compiling or setup."
    Using C without compiling? What the hell?
    For making it easier to use C, nothing beats being able to freely embed C code and be able to compile programs the same way you always do.

    "If you wonder why Java takes 3-5 lines of code just to parse an XML file or set up a loop you will find Ruby quite a change. And REXML is the most lightweight easy to use XML parser I've ever used (PHP5's new parser comes *close*.. but PHP is not Ruby)."
    And REXML, like DRb, is so powerful that no other language can do anything like it? Have you compared REXML in Ruby with SXML in Scheme? It's really easy with SXML.

    "If you like writing code FAST without worrying about heavy syntax or arbitrary design choices, you'll like Ruby."
    What are you talking about? Syntax is completely a personal preference issue, and not everybody likes Ruby syntax the best. I personally like sexprs and Kogut syntax (which is kinda like a cross between C and ML), even though you would probably say they're really ugly. Design decisions are rarely arbitrary, and if you would name one, then I'll refute it. Everything has a reason.

    "If you like passing anonymous code blocks to your functions like SmallTalk, you'll get a kick out of Ruby"
    I have to agree with you here, except it's really annoying how in order to make a block that can be stored in a variable, you have to write lambda, and then to use it you have to prefix it with an ampersand. The functional way of just sending an ordinary function as an argument (and making convienent syntax for that) is much better, IMHO

    "If you are into agile programming and merciless refactoring, you'll like Ruby"
    I'm not really into meaningless buzzwords like "agile programming", and I don't se

  126. Operating on XML and HTML efficiently by Black+Perl · · Score: 1

    LISP is a good match for operating on HTML and XML ... Perl, PHP, and Java don't do trees well. You have to hammer the tree into an object paradigm, which doesn't help all that much.

    I'm sorry, but DOM is a standard tree representation. DOM works well in this regard, and it is a fairly standard API across most languages. You should never have to build your own data structures.

    Perl's representation of a tree is rather inefficient, too. I do considerable parsing of large documents into trees in Perl.

    I do too, and I know it doesn't have to be inefficient. How are you currently doing it? If absolute efficiency is what you want, use a stream-based API like SAX, TokeParser, etc. If a tree-based approach is what you want (such as for conveniences like XPath queries) use XML::LibXML, which uses libxml, the most efficient and fastest parser available. It is written in C, and is fast, fast, fast. There are language bindings for not only Perl, but PHP, Python, Ruby, and many other languages.

    --
    bp
    1. Re:Operating on XML and HTML efficiently by Animats · · Score: 1
      I'm always amused that you have to break out of Perl into C to parse HTML and XML. And even more amused that it doesn't bother the Perl fanatics. What's wrong with this picture?

      I really should upload my XML/SGML/HTML parser to CPAN. It's all in Perl, and uses HTML::Element as the representation. It's written for robustness, not speed; it can parse ill-formed XML/SGML/HTML, producing good trees for the valid parts. This is necessary to parse the material that appears in SEC filings.

    2. Re:Operating on XML and HTML efficiently by Black+Perl · · Score: 1

      Oops, noticed this reply a little bit late.

      I'm always amused that you have to break out of Perl into C to parse HTML and XML. And even more amused that it doesn't bother the Perl fanatics. What's wrong with this picture?

      Nothing at all. Most of the Perl fanatics I know operate on the Principle of Least Effort. If a hand-optimized C program is available that does exactly what you want, use it! That's why we have Inline::C and XS. That's why Perl has the `backtick` operator.

      I really should upload my XML/SGML/HTML parser to CPAN. It's all in Perl, and uses HTML::Element as the representation.

      Sounds cool. I'd like to see it.

      It's written for robustness, not speed;

      Hmm... yet you were complaining about inefficiency...

      it can parse ill-formed XML/SGML/HTML, producing good trees for the valid parts. This is necessary to parse the material that appears in SEC filings.

      Very interesting. Tag-based balanced text parsing (like HTML/XML) is very difficult when you have to recover from sloppyness that makes it invalid.

      I have had incredibly good luck with XML::LibXML's recover() option. I use it to parse arbitrary web sites (yes it can do HTML too), many very broken, and so far it has been able to create a DOM from them all (knock on wood). I love being able to use XPath to extract stuff from HTML. Makes virtually all extractions one-liners.

      In fact I proposed a Perl Lightning Talk on using XML::LibXML to parse HTML at OSCON 2004. Don't yet know if it has been accepted, but if not, I'll still give it at the Perl CFTs (community forum talks).

      --
      bp
  127. Re:Woohoo! Now only 3 years out of date! by LoveMe2Times · · Score: 1

    I think PHP's previous simplicity and 'under-featuredness' with regards to OOP are actually what made it so popular

    You know what, I can respect that. It's not for me, but that's cool. See, I'm primarily a C++ and Java coder. And while C++ is more complex, I find it's complexity *useful*, while Java's is just infuriating (J2EE is a nightmare). Now what I dream about is the day when you can use your choice of language on your choice of VM-Mono, JVM, or Parrot, including libraries etc. Being able to choose your libraries and language independantly would eliminate a lot of language wars, IMHO.

    Well, I'm gonna mark you as friend since you seem level-headed and un-fanboyish :)

  128. Casual hobbyists can use the interpreter by dananderson · · Score: 1
    Casual hobbyists don't need the compiler. They can use the interpreter. Myself, I use the interpreter on a production site (PHP 4.x with Apache 2). You only need the compiler if you have a heavily-hit, CPU-intensive website (or sites).

    I'm not brave enough to try PHP 5 yet, just because of possible regression with PHP packages (Phorum and SymPoll).

  129. Re:PHP - ASP Showdown by AliasTheRoot · · Score: 1

    Running PHP on multithreaded webservers on Win32 is fine, it's only an issue on Unix.

  130. Until you posted it on /. by kikta · · Score: 1
    Me for one. My site is now running it!

    Was. Was running it...
    1. Re:Until you posted it on /. by maxdamage · · Score: 1

      Its not slashdot actualy (my logs recorded only about 400 hits from /. since I posted that), the last few days zapto.org has been hit by DDoS attacks and its been carying over to its clients, aka me. Its back up for now, the attacks have subsided.

  131. And this thread was about .... by Anonymous Coward · · Score: 0

    What has any of this to do with the original thread? This looks like a Microsoft patch release to a patch release to a patch release :lol:

  132. Re:Woohoo! Now only 3 years out of date! by rycamor · · Score: 1

    Ditto ;)

    And I completely agree on the concept of "useful complexity". That's what it really comes down to, and it depends on the type of work you are doing. For example, many developers use MySQL because of its simplicity, while I find the relative complexity of PostgreSQL *extremely* useful, to the point that I pretty much can't live without it. It's all about choosing your battles.

  133. Re:PHP - ASP Showdown by Anonymous Coward · · Score: 0

    > Oh yeah? Or, perhaps you meant this one?

    First link is pretty half-assed. You still need to write all the glue to manage the connections. Second link is Java. Nuff said.

    > persistent, shared memory objects, which ASP cannot do

    Umm, ASP can do this, and it offers transaction isolation to boot. It's called MTS/COM+.

  134. Re:PHP - ASP Showdown by Anonymous Coward · · Score: 0

    Google on PHP ISAPI and you will only find a bunch of people telling you not to do it.

    PS: when Open Sourcers say "run fine" they usually means "sorta works".

  135. C# and Java have Better dynamism??? Wrong! by Paradox · · Score: 1
    Both Java and C# have full dynamic type information and full reflection; the reflection system of standard CommonLisp has some limitations in comparison (although individual CommonLisp implementations often provided implementation-specific workarounds).
    I suspect you haven't worked much with Lisp. Lisp's syntax (or lack thereof) means that macros, which are code generation specifications, are so much more powerful than lexical macros its not even a fair comparison. Further, they are safer and easier to code. So easy, in fact, that nearly every Lisp project includes dozens of macros (which in turn can generate the equivalent of thousands of lines of code). Can you say this about most Java or C# projects, where Code Generation is still considered a design smell?

    Further, because the (same) Lisp image is running for the compile and run cycless, it's significantly easier to degenerate and compile and load code even late in a life cycle.

    Both Java and C# have full dynamic type information and full reflection; the reflection system of standard CommonLisp has some limitations in comparison (although individual CommonLisp implementations often provided implementation-specific workarounds).
    Again, you haven't worked with Lisp enough recently. In every way that could possibly matter, Lisp's facilities are superior. Especially now that the Meta-Object Protocol has seen widespread adoption, the facilities of Lisp are so far superior to C# and Java that it's not fair to compare them. It's possible to do Smalltalk-style metaclass programming, to dynamically update and reflect upon classes (and update all running instances transparently, try that in Java!), and to completely change classes dynamically.
    Lisp syntax is nice, and you can program the JVM and CLR with Lisp syntax. But while I fully believe that Lisp syntax is great for programming, I think for data structures, it is a compromise, and XML and similar standard representations fulfill similar functions for other languages.
    Given your inexperience with Lisp-like languages (which shows quite plainly), you might want to consider looking into it more before making such a bizzare statement. One of the reasons lispniks get so grumpy about XML is that XML is a more verbose version of S-expressions, but gets a lot of hype in the press (where Lisp suffers a lot).

    When it comes down to it, they're practicaly equivalent except:

    • S-expressions are more convenient for human use and parsing.
    • XML is more convenient for computer use and parsing.
    Otherwise, they're essentially the same and represent things in a similar fashion. Please update your mental database accordingly.
    So, Java and C# aren't exactly like Lisp--they have made different choices, and you may or may not like the overall package. They are clearly not "dynamic" in the important sense of being "interactive" by default (although bsh helps). But in some ways (reflection, dynamic code generation, etc.), I think they are arguably better dynamic languages than Lisp ever was.

    If the Lisp community ever got its act together and actually learned from Java/C#, they could produce a great response, something that combines the best of Java/C# and Lisp. But I doubt that's going to happen any time soon.
    Lisp DID listen. They came up with CLOS and the MOP (meta-object protocol). If you bothered to understand what they did, you'd see they beat C# and Java to the punch by nearly a decade, and they're still ahead in every way that matters to programmers.

    To even complain that "Lisp isn't dynamic compared to C#/Java," is actually hard for me to understand. Please, name one operation that you can do in C# but cannot do in Lisp (that makes sense to do in Lisp and C#). I know Java and Lisp pretty well, and I can't think of one.

    It's great to see such a mainstream product as PHP being powered by a Lisp dialect(even if it is a Lisp-1).

    --
    Slashdot. It's Not For Common Sense
  136. Re:Woohoo! Now only 3 years out of date! by LoveMe2Times · · Score: 1

    Whoa boy, another flame war unto itself! I'm not a DB guy, but I like Postgres. I'm anxiously awaiting bugzillia 2.20 I think it is, with Postgres support. Then, when postgres 7.5 comes out with native Win32 support, life'll be grand. Not that that's what's holding me up, mind you, I have a couple linux servers running, but bugzilla's install looks intimidating and it's not pressing and I have a gazillion other jobs. It was enough for me to get Subversion running, and I failed getting samba configured properly. Now I'm waiting for all the tools (like IDEs especially) to have Subversion integration. Guess that's why I'm a coder and project manager, I'm a lousy admin! I know enough apache and tomcat to be dangerous, enough linux to get around, but diddley about sendmail, bind, and countless other programs. Hell, I can't get the ftp server configured to set permissions the way I want them (whatever the default ftp server is on FC1).

    Fortunately Mono looks to have Postgres support. Now, if they would just ditch monodevelop and work on Netbeans, Eclipse, and KDevelop integration... I mean, competition is good and all, but I don't want to switch to monodevelop just to develop .Net stuff, you know? I want to stick with my IDE of choice, which right now means Netbeans or VC++.Net. BTW, I think VC++ 6 was an amazing product for its time, but I don't really like VC++.Net the IDE, although I do appreciate compiler advancements (better code and more standards compliant). Anyway, I intend to get around to playing with Mono sometime; I'm especially interested in the OSX version.

    About choosing your battles, amen, that's why I do use Java--it's the right tool for the job in the places where I use it. Which has nothing to do with Java, but the fact that 3rd party products provide java libraries/interfaces. Perl would actually be better for what I'm doing, but toss in an obscure commercial database with only JDBC and a few java libraries, and poof, there you have it (the Netbeans angle helped a lot too, to be fair).

    However, I really really like JSPs/Servlets. I *want* to like JSF, but but but... And EJBs are enought to make a grown man cry. I'm following the MyFaces list, and it looks like good things are coming. MyFaces will become an Apache project, and will integrate smoothly with Struts soon, and there's talk in the air about portlets. I figure that by next spring (march say), a lot of my frustrations with Java-land will be cleared up. Java 1.5 err I mean 5.0, Netbeans 4, hopefully a new JSF spec to clean up probs, and Struts-MyFaces harmony, all given some time to stabalize. Maybe even the commercial Java guys will get their acts together by then--I was dismayed to find that IBM's latest offering only supports old JSP/Servlets, BEA has their own proprietary nastiness, and Sun's proprietary versions of Netbeans (Java Studio Creator, I think) and Tomcat (Sun Web App Server?) are steaming piles of poo when I tried them a couple months ago. Granted, they were beta, but wtf??

    Alright, enough chewing your ear off. Later.

  137. Why the PHP bigotry? by Synistar · · Score: 1

    Looking at the responses to this article with a low threshold is really disheartening. PHP is a powerful language/library set. But PHP has some core design issues that still need addressing. And every intelligent post that points this out gets modded as a troll.

    I guess I shouldn't be suprised at this anymore here on slashdot. But I would not ditch other languages in favor of (non-free) compiled PHP until they address *ALL* the problems listed in these articles:

    Using PHP in large websites

    PHP in contrast to Perl