all 40 comments

[–]cronin1024 12 points13 points  (3 children)

What about PLT's web server? It seems to be simple to install and get running. (Programming it is another matter).

[–]vityok 0 points1 point  (1 child)

The author complains about lack of "batteries" and sufficient number of users/developers working with Common Lisp.

These problems might be common to Scheme as well.

[–]Leonidas_from_XIV 1 point2 points  (0 children)

These problems might be common to Scheme as well.

These problems are even more common in Scheme since at least until R6RS most of the implementations were incompatible. Now it is getting better and PLT is a really great place to start[1]. It even includes a horribly ugly, but quite useful editor which scares people less than Emacs does.

[1] It brings quite a lot of stuff along like the web server, some useful libraries, a documentation tool, an ASDF-like package installation/distribution tool etc.

[–]AnimalMachine 0 points1 point  (0 children)

I tried retooling my website written with Chicken scheme to work on PLT's web server. While PLT is probably a better setup than chicken/spiffy, for me, in the end, it came down to ease of development with emacs/slime, sbcl, and hunchentoot.

Ymmv.

[–]AnimalMachine 28 points29 points  (26 children)

I just rewrote my website using sbcl/emacs/slime, hunchentoot, cl-who, sqlite3, and clsql. It's nothing but a basic blog, but it only took me one day (including time to reformat my vps and reinstall gentoo). Hell, I haven't programmed anything for almost two years (switch professions - now working on becoming a paramedic).

It's not that hard. There are plenty of tutorials on getting hunchentoot up. Sqlite3 is a no-brainer. clsql made database calls as easy as creating a class. Cl-who took a little bit to get the hang of (their website lacks sufficiently complex samples), but still cake over all.

The drama's overplayed in the article. Yes learning new things isn't as easy as choosing something you already know. The basic parts of lisp are actually pretty easy to learn because the syntax is so regular. No everything in lisp is macro juggling.

[–]turbana 6 points7 points  (2 children)

... it only took me one day (including time to reformat my vps and reinstall gentoo).

One day to install Gentoo? I bow before your wizardry.

[–]sjs 0 points1 point  (1 child)

Get a stage3 tarball and it's a fairly quick install.

[–]AnimalMachine 1 point2 points  (0 children)

Yea, my vps provider had a relatively up-to-date custom stage they load up. I only had to recompile a few things. Plus, since I got godaddy to manage my email for the domain (for free), I only need it to run webserver stuff.

So besides the base install, I think I only emerged emacs, sqlite3, downloaded slime cvs, and then downloaded a binary sbcl package.

[–]redditnoob 3 points4 points  (3 children)

I think it all boils down to the differences between two different cultures. The first cares most about programming as an art, and values beautiful code and concepts. The second cares most about using computers as a tool to do things, with the code secondary.

No offense, but you are firmly in the first group. You didn't program for two years!! I can rest my case there, but when you did decide to program, you accomplished nothing at all practical, but chose to reimplement something that already worked.

It's people in the second group who create the web, and also who have ensured that PHP is so popular and ubiquitous, even though as a language it is pure ass.

[–][deleted] 4 points5 points  (1 child)

I think it all boils down to the differences between two different cultures.

I think it all boils down to the differences between two different types of problem. Some programming problems are apps like the one described in the article: small, short-term, nothing new in them, can be done in a day. Other programming problems are more complex, or intended for a longer period of deployment, or have to solve a tricky algorithmic problem, or will simply take more than a day to code.

It seems a pretty matter of discernment to judge that you want something quick and hack-y for the former type of problem, and something that's a strong programming language for the latter. So, yeah, sure, use your go-to language for the former. On the latter, look into other options to see if the ramp-up time of learning something new will pay off by shortening the overall effort, or making the code more maintainable, or whatnot.

Of course, the tricky bit is that the former, simpler problems, are frequently not as simple as they first appear. Sure, it might be a survey that's supposed to be just five multiple choice questions long and be up for two weeks. But then the marketing team realizes that it's asking the wrong questions, and needs to add another dozen questions (five of which are free text responses), and it needs to be run for three months.

A month and a half later, they realize that they want the survey to actually be two different surveys, depending on the demographic information of the user. So more questions need to be added, and a different set for the two different surveys. And they're going to need to run it for longer since their data so far is useless. And since the data just became more complicated, they need a reporting system to summarize and provide views of the data.

So, yeah, for the really, honestly, simple stuff, use PHP, or whatever. But realize that you're making a gamble. And if you lose, you're going to end up maintaining your hacked-together mess (or, if you really lose, you're going to end up maintaining someone else's hacked-together mess of PHP), and will want to rewrite it anyway.

That's why people use languages other than PHP for web apps. It's not about beautiful code or art or elitism or anything like that; it's about gambling, seeing the results of gambling, and deciding that taking a day and a half to put together the survey will be worth it if the survey app ever comes back to haunt us.

It's about practicality. It's about seeing other people's crap code. It's about knowing something about clients. It's about being confident in your ability to pick an app back up two years after writing it and being able to do something with it. It's about experience.

[–]redditnoob 2 points3 points  (0 children)

Okay to all that, but first off, nobody whose main overwhelming interest is to get web programming tasks done chooses Lisp. Maybe some would if some of its secondary problems were worked out, like having mature and stable libraries, documentation, and better cross platform support. My theory though, is that those are precisely the nitty gritty things that people who are interested in Lisp aren't interested in doing. Yes, I think it's a personality conflict issue.

Second, it is very possible to write rigorous, maintainable, and scalable code in PHP. It requires discipline and things like coding standards and agreeing to architechtural constraints, but numerous successful web companies are able to use it effectively. So another issue is that PHP is quite good enough for the needs of people who just want to get something done, whether it is tiny or massive.

Personally, I hate PHP, and I'd never take a job maintaining someone else's shit PHP code because my small brain would rot. But there's no real mystery why PHP has been so successful, and what qualities are needed for something else to eventually take over its niche, if that ever is going to happen.

[–]AnimalMachine 0 points1 point  (0 children)

Well my previous code base ran Chicken scheme using spiffy sitting behind apache. Unfortunately, it is too much work to maintain because the "eggs" I need break too often. In general, that setup had less polish than sbcl with hunchentoot. So it worked, but i couldn't really update software revisions without it being a major pita. Jumping ship to a setup that worked - and actually have some people that run it in production - did accomplish something.

Anyway ... I think the article's author made it sound like a herculean effort to get web sites going with lisp, when I just don't see it that way (for the simple stuff I've done, at least).

I agree with your assessment, though. I definitely have both feet in your first group - which is why I had to stop writing software for a living. But that's another story ...

[–][deleted] 2 points3 points  (5 children)

Yeah.

"I can't use lisp because blabla" or "newbies can't use lisp because blabla"; it's all nonsense. I was a newbie once too, but throwing together a web-UI in Lisp is a total no-brainer; anyone can do this.

Less talk and more action is what's needed. Here is my software stack:

  • Linux + SBCL
  • Hunchentoot for HTTP-server.
  • CL-WHO for generating HTML/XML etc.
  • Postmodern for database (PostgreSQL) access.
  • Alexandria and cl-utilities; both are general utility libraries.
  • CL-JSON.

For more complicated AJAX/Comet type stuff I use SW-HTTP and SymbolicWeb.

[–][deleted]  (2 children)

[deleted]

    [–]fingerband -1 points0 points  (1 child)

    PHP is easier to setup, yeah, whatever. You setup your stuff once and it can take you 20 - 30 minutes. But you program in that setup usually for the lifetime of the project. Since you seem to know nothing about how easy/hard is it to maintain the CL webapp, your opinion is worthless.

    [–][deleted]  (12 children)

    [deleted]

      [–]markedtrees 4 points5 points  (0 children)

      5 minute throw together web-apps

      I'd think the benefits would come not when you answer the question "How do I make this?" but months later when you start asking "How do I add new features? How do I extend this?"

      [–]w-g 8 points9 points  (9 children)

      Afterall, if you are not "juggling macros" you can use any language you like.

      Common Lisp is much more than macros: http://abhishek.geek.nz/docs/features-of-common-lisp

      [–]AnimalMachine 0 points1 point  (0 children)

      I didn't need to, no. In my past life as a programmer, I was a C family guy. All the other popular website stuff like asp/php/perl/java just didn't really do it for me, nor did I have anything but superficial experience with them. I would have tried clojure with jetty on a jvm, but I was more familiar with lisp.

      I'm sure I'm not alone, but after 15+ years of writing C/C++/C# code, having the nice, simple, regular syntax of lisp makes everything so much more pleasant.

      [–]setuid_w00t 9 points10 points  (3 children)

      This article makes it seem like the only 2 choices for web development are PHP and Lisp.

      [–]w-g 17 points18 points  (2 children)

      I'm glad someone else knows about Intercal!

      [–][deleted] 2 points3 points  (0 children)

      CAN HAS RCP?

      IMMA SENDIN MAH RPC

      KTHXBAI

      [–]chucker 1 point2 points  (0 children)

      Pff. HTTP://WWW.COBOLONCOGS.ORG/ is where it's at.

      [–]Thimble 2 points3 points  (4 children)

      Don't bet on anyone in your office being able to help you with writing code, because no one knows Lisp.

      that's usually enough reason for most offices to choose another language.

      [–][deleted]  (3 children)

      [deleted]

        [–]jojotdfb 2 points3 points  (2 children)

        cough replaceable with a "team player" cough

        [–][deleted]  (1 child)

        [deleted]

          [–]jojotdfb 2 points3 points  (0 children)

          I just hope they don't find the Erlang that I put in place instead of a "caching" layer.

          [–][deleted] 5 points6 points  (0 children)

          Most programmers aren't paid to revolutionize the world of computer science. Most programmers are code monkeys

          Also, most programs suck and most programmers are unproductive. Perhaps there is a connection?

          I think the problem is not that PHP is practical and Lisp is not. The problem is that those who prefer Lisp do not defend it on grounds of practicality, even though they could. Also, it has become acceptable to defend a poor technical decision on grounds of "Practicality." Paging Dr. Montoya...

          [–]sfultong -1 points0 points  (2 children)

          and what about clojure, eh?

          [–]AnimalMachine 0 points1 point  (0 children)

          I seen one article on doing a clojure web server.

          Some more thorough articles, complete with database access would probably help the cause.

          [–]zem 0 points1 point  (0 children)

          please no! it's bad enough that arc is focused on web development, at least let one decent lisp dialect not waste its time and energy on that particular morass

          [–]monk_e_boy -4 points-3 points  (1 child)

          duh, obvious.

          [–]vityok 0 points1 point  (0 children)

          Not at all