PostgreSQL was once a collection of C modules called from Common Lisp. Debugging the cross-language implementation proved too difficult so it was ported entirely to C using tools which mostly moved the parens around. Some lisp structures live on inside it to this day.
The original Lisp version was actually running till last fall. When they introduced the C++ version you had to explicitly choose to "upgrade." There were some users, including me, who hadn't. Finally last fall they called me and told me they were going to move us to the C++ version. It's barely different.
It would be nice to have some "cookbooks" for typical applications in LISP or Scheme. Searching for "scheme web development" turns up just one or two hits, all very basic (like this one http://www.scheme.dk/blog/2007/08/introduction-to-web-develo...)
They lack a lot of features one has come to expect from modern web frameworks. Could be that some turn out to be unnecessary, but still. I think I have found good online references for learning the basics of Scheme, but for now, I still don't know if writing full blown web applications is really feasible.
I like that better than creating the whole HTML in S-Expressions, but at the moment I wonder if the best approach would not be the one I know from XMLC: just operate on the dom-tree of the web page, and then serialize the dom?
Where are good places on the web to discuss such things?
Other features of BRL could be implemented in a non-sexpr language. It just seems nobody cares to make languages truly suitable for database-driven web apps. PHP could have done something like define-input to solve their register_globals problem while retaining a lot of the convenience it had become famous for. A ResultSet object in any language could be extended to have a very useful subset of the functionality in BRL's sql-repeat.
Anyway, I'm not sure the best place for discussion. Most lispers and schemers don't seem interested in web development. Maybe you could discuss it here on news.yc.
That's a wonderful stack overflow idea.
It works, haha!So, no, they could not have written it in C.
At first I thought you were leaving out their smarts and technology, but speed and agility were because of the smarts and tech. Then I thought I remembered pg saying they were going to close another round of funding when they got bought instead.
But I totally agree with your main point.
That's just an elaborate way of saying that you can write an interpreter (of size c) for one language in another.
Nevertheless, I have a hard time believing that viaweb could not be written in C short of writing a Lisp interpreter. For that to be true, the runtime compilation of s-expressions would have to be essential to the application; there would have to be no other way to write it.
We had a page description language called RTML that was Lisp underneath. Users created templates in it, which we then executed to generate their pages. It is these page templates that are still stored on disk as s-expressions in the C++ version.
Why not, if the language makes it simple? I am not claiming that Lisp does not have more powerful abstractions than C, just that they are not usually essential to any given feature in the application.
If Lisp is actually part of the user interface, then clearly there is no way to avoid having a Lisp interpreter. This is begging the question though.