Almost invisible upgrade

LtU's database was upgraded tonight from MySQL version 4 to version 5. The user session table didn't survive the upgrade, and repairing it would have kept LtU offline for hours, so instead it has been zapped. This just means that if you had an active login, you'll need to log in again. Sorry for the inconvenience.

Some other upgrades are still in progress, so there may be periods tonight during which LtU is temporarily unavailable.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Status

An upgrade of server to Debian 4.0 (etch) has been completed. Also, PHP has been upgraded from version 4 to 5.

The PHP5 upgrade caused another problem with user logins not sticking. A temporary patch has been installed to address this, so things should be working again for the most part. A more permanent solution will be installed later tonight.

[Edit: everything should be back to normal now.]

Pushbutton theme problem

Invisibility is relative[*]. If you are using the optional "pushbutton" theme, you will have found that when you log in, only useless template code is displayed, with no content. This is caused by an interaction between the version of Drupal we're running, and PHP5.

Temporarily, I have set all users who were using the pushbutton theme to use the default LtU theme. When we upgrade to a newer version of Drupal, hopefully within a few days, I'll set the affected users back to the pushbutton theme.
[*] Romulan cloaking technology has its limits.

I hope LtU does not mind this question.

I hope LtU does not mind this question: why PHP and not a functional language?

I am not trying to start a flamewar, but I am asking out of sincere curiosity, since FP languages are heavily promoted against imperative ones in this site.

My interest is if using an FP language has been tried in the past, what were the problems, why PHP was chosen etc.

Presumably

Presumably, the choices of mature blog/forum software in a language "promoted" on this site are currently few (non-existant?), let alone at the time LtU switched to this setup. You could just as well ask why LtU doesn't use a webserver, OS, DB, etc. written in a functional language*. Also, now, even if there is appropriate software, migration costs dissuade from that, especially as there doesn't seem to be any problem with the current software.

* You know what's ironic? There are actually probably more of any of OS, DB, webservers written in any particular language "promoted" on this site than "large-scale" blog software.

Presumed correct

I agree with Derek. To expand on the specifics, we didn't choose PHP, we chose Drupal, because of its features, the quality of its code, and the quality and size of the community which uses and develops it. Drupal is implemented in PHP, so we run PHP in order to run Drupal.

Drupal was originally the brainchild of Dries Buytaert, who is currently a computer science PhD student. Dries has an interesting list of publications on his page, many of which would not be out of place on LtU, either on the academic or practical sides. Most of that work, both professional and academic, has had to do with Java, so it's interesting to examine why Dries chose PHP to develop Drupal. At the latter link, he writes:

The web is built by millions of individuals, many of which are amateurs. They continuously update, tweak and rebuild their websites. Scripting languages like PHP lend themselves to that, and are widely available at affordable cost.

PHP began life as a domain-specific language for implementing web pages, and it's been optimized for that job in a multitude of ways, which goes a long way towards explaining why it has thrived against more general-purpose competitors like Python and Perl. There's a lesson for aspiring language developers there (assuming they aspire to popularity for their language, which is certainly not the only interesting goal).

Derek's observation underscores these issues:

* You know what's ironic? There are actually probably more of any of OS, DB, webservers written in any particular language "promoted" on this site than "large-scale" blog software.

I think that's to be expected, because what makes for good blog software is something that's being used by a lot of people (see Dries's comment), and has a lot of details taken care of as a result, from trivial details to major details and everything in between. Tools like webservers are not interacted with by end users in the same way, so it's much easier to write a complete, reasonably full-featured webserver (I've done it myself) than it is to write a complete, reasonably full-featured blog program, where "full-featured" refers to that entire range of trivial to major details that users take for granted.

LtU is not an FP site

...since FP languages are heavily promoted against imperative ones in this site.

LtU does not exist to promote FP - as was previously disclosed to you.

And seeing how you were, at last count, the 13th most prolific poster on the board, I'd say that qualifies you as part of the collective.

Revelations

Anyone who really reads between the lines carefully on LtU would know that our secret agenda really demands that the blog be implemented using a specially-designed blog DSL. The DSL would of course have a formal semantics, and Coq proofs would verify various aspects of the semantics and its implementation. There would, of course, be an automatic translation of these proofs to Twelf, using either Scheme syntax-rules, Camlp4, or maybe MetaOCaml. (Naturally, Oleg's involved somehow.)

So another response to the original question is that since the major multi-institution effort that would be needed to realize this dream has been slow in materializing, we settled on PHP.

Putting on my Opinionated Hat

I believe this post should be deleted immediately. Any comment which starts with "I am not trying to start a flamewar, but..." clearly runs the risk of starting a flamewar, and can be considered a textbook example of trolling. If we don't delete the post immediately, we are definitely going to end up with another long and pointless thread.

[edit: I accidentally made an overstatement about "putting on an admin hat". I did not mean to suggest I have the privileges of admin.]

Putting on my user hat

The first order of business is to thank Anton for doing the work to keep this place running and spending the time improving the infrastructure.

Anything else said in this thread is probably pointless (unless, of course, someone reports a problem with the upgrade).

Hat tipping

Thanks, Chris. But really, all the thanks I need is for people to use LtU the way it's intended to be used. I still get more out of LtU than I put into it.

In any case, the real thanks should go to the contributing editors. Ehud is still the most prolific of those by quite a bit, but we've had some great home page posts since Ehud left on vacation.

"I am not trying to start a

"I am not trying to start a flamewar, but..." clearly runs the risk of starting a flamewar...

But it didn't. Not everything suspicious needs to be subject of a preventive strike, not even in the US, right?

"I am not trying to

"I am not trying to start a flamewar, but..." clearly runs the risk of starting a flamewar...

But it didn't. ...

Oh it hasn't yet, but you're helping to move it closer to one.

Not everything suspicious needs to be subject of a preventive strike, not even in the US, right?

Thanks to everyone for replying.

Thanks to everyone for replying, especially the people that said PHP has been the language of choice for certain reasons. I had considered PHP a toy language, based on what I've read in various sites, but now I will have to reconsider and look at it more closely.

Late to the Party...

...but I wanted to say that I found the question a worthwhile one, agree that maturity is important, and think that the Drupal choice was a wise one.

With that said, the researchy answer probably involves regular expression types as found in, e.g. CDuce or Scala. In particular, I'd keep an eye on Liftweb; see, for example, A lift-based wiki in 70 lines.

Pick a framework?

I think the lift-based wiki mainly demonstrates the power of frameworks. Shiro Kawai, author of Gauche Scheme, suggests that "the point comes down to frameworks, not languages, after all." This impression was a result of implementing Reddit in 50 lines.

(No regular expression types required. ;)

To bad Kahua's documentation is mostly in Japanese

Other then that it looks pretty nice, but documentation is quite important.

My Question

How does expressive power of framework correlate with the language the framework is written in? Loosely, this might be expressed as: how much code does it take to write the framework, and then, using the framework, how much code does it take to write the application?

One of the more credible claims that the dynamic types community has been able to make has been that their systems tend to be more concise than their statically-typed equivalents. Part of the point of liftweb is to be statically-typed, but competitive with Ruby on Rails in the ease-of-development/concision realm. That's the major reason that I'm following it.

Framework power

How does expressive power of framework correlate with the language the framework is written in?

I'm not sure how to answer this in general terms, so I'll use an example which you've mentioned before: the Stripes framework. It exploits and/or abstracts the use of Java features like annotations and reflection in a way which effectively increases the expressive power that applications have available to them. This relies on the language having certain features, but a framework can make it possible to exploit those features much more concisely than would be possible otherwise.

In the Stripes example, the end result (particularly if used in conjunction with some other frameworks) is similar to the power of something like Rails. However, I'd guess that the Rails implementation is probably simpler, because it can exploit dynamic features of the host language.

I imagine the situation with lift(web) is similar.

Correction

Just to avoid a misunderstanding: Scala does not have regular expression types. The only web-specific support in the language are XML literals with holes. There are fairly extensive libraries to deal with XML, though.

My Error

Thanks, Martin! I stand corrected. :-)

Toys for the practically-minded

As a Schemer working professionally with both PHP and Drupal, I have to agree that a) PHP is more or less a toy language, but despite that b) Drupal simply rocks.

Drupal is a widely-used open-source CMS framework built on as clean an architecture as PHP allows (though PHP 5 has changed some of the ground rules, now).

Drupal has a huge and thriving user community and some 1400+ add-on modules, so it's safe to say that whatever kind of site needs to be built, it can be put together without all that much coding by building on all the stuff others have contributed. Very mature open source indeed.

Incidentally, one of the add-on modules happens to be a Lisp dialect - a Lisp script engine running inside the PHP script engine. I know, I know, Greenspun's Tenth at its worst...

Still, if you're practically-minded and need to quickly build a site of even some considerable complexity, Drupal is a pretty darn good solution that can also easily be deployed using almost any hosting provider out there.