News for hackers. Stuff that matters.
Re:PHP vs. Lisp? by jrockway on Monday September 22, 2008 @11:09AM (#311195)
+1

I think I am going to have to write a sarcastic reply to this post. "PHP is much simpler! First, you have to setup Apache just to get 'Hello world' working with PHP. That's OK though, because installing and configuring a web server is fun and exciting. After that, you can start work. Of course, you have no libraries, so you get to write everything from scratch. While you're doing that, be sure not to use $i as your loop iterator, because there is no lexical scope! Do you need closures? They don't exist! You don't need that for web pages, though; web pages require you to write spaghetti because it's just plain easier! Anyway, eventually you will want an editor with decent syntax highlighting and perhaps a REPL for prototyping. Oh wait, PHP has neither. That's OK though, because PHP is clearly better!!11!"

I could go on, but I'd rather summarize this with one word: "blub".

Oh, let me add one other thing. He says MySQL is a single apt-get away, but installing SLIME and Emacs was "too hard"? On my Debian, emacs22, slime, and cl-swank are all an apt-get away. In fact:

    $ apt-cache search '^php5' | wc -l
    51

    $ apt-cache search '^cl-' | wc -l
    168
That's OK, though. If you know PHP and have no ability to program or learn anything new, CL probably isn't for you.
Re:PHP vs. Lisp? by nuclear_eclipse on Monday September 22, 2008 @01:29PM (#311380)
Not that I disagree with your point, but as a PHP developer myself:

1 - PHP does not require Apache. There is a command-line PHP interpreter: `apt-get install php5-cli` allows you to do `php <filename>` and such just fine.

2 - PHP has a lot more libraries available than just what you find in your Apt repositories, such as PEAR, which is PHP's equivalent of CPAN.

3 - Just about every editor I know of has excellent syntax highlighting for PHP; some even go so far as to contextually highlight HTML/CSS/SQL code as it appears in the middle of your PHP code.

4 - As for a REPL, check out [phpsh](http://www.phpsh.org).

5 - Your point of not using $i for an iterator is absurd, although your point of scoping is not. Using $i for iterators is perfectly fine and sane, assuming the obvious act of not using iterator variables outside hte scope of what they're iterating, which IMO should be standard proctice anyways just for the purpose of clarity...

Re:PHP vs. Lisp? by jrockway on Tuesday September 23, 2008 @03:28PM (#312723)
1 - PHP does not require Apache. There is a command-line PHP interpreter: `apt-get install php5-cli` allows you to do `php <filename>` and such just fine.

Sure, but there is no "./server" that I can run in a directory of PHP files to bring up a testing server. You can run tests from the command-line, which is good, but you can't see web pages without a web server. What a pain.

Re:PHP vs. Lisp? by nuclear_eclipse on Wednesday September 24, 2008 @07:27AM (#313382)
I still don't see how that's any different than any other language. Something somewhere has have a web server implemented in order for you to test things in your browser. And if you don't like Apache, there's always Lighttpd and other web server options.

Probably the best thing for PHP though is that once you set up your trivial testing server, you never have to touch it again. You just keep refreshing the page, or pointing the browser at new pages, no matter how much code you write or file structures you change. It just works.

Re:PHP vs. Lisp? by jrockway on Wednesday September 24, 2008 @09:38AM (#313465)
Yeah, but every time you get a new machine you have to install Apache and setup the httpd.conf. That is a lot of work for a non-production environemnt.

Anyway, PHP is the only langauge that does this. Catalyst, Rails, Django, etc. all have their own server. CL has Hutchentoot. It's just PHP that requires a production environment for testing "hello world".

Re:PHP vs. Lisp? by Maascamp on Monday September 22, 2008 @04:30PM (#311590)
Not to mention that if you're on windows you can just download the Wamp stack executable and you're done. One click.
Re:PHP vs. Lisp? by whatusername on Monday September 22, 2008 @08:37PM (#311833)
Or you can go to Dreamhost / insert your favourite cheap hosting site here - and throw up your files for $5 a month. Try that with lisp.