Evaluating Clojure

Started by itistoday, October 12, 2009, 12:08:54 PM

Previous topic - Next topic

itistoday

Hi guys, just wanted to let my fellow newLISPers know why I haven't been able to post here recently.



Over the past several months I've been trying to get a project lifted off the ground, and there have been difficulties in doing this. I first wanted it to be written in newLISP, but the guy I hired to help with the project wasn't able to continue it for various reasons.



Now I'm currently on my own, and I'm not sure whether I should choose newLISP or Clojure to do it. The project itself involves writing a pretty sophisticated web application and a backend to power it, with lots of database stuff.



There are three principle reasons I'm considering using Clojure:

[*] There are more libraries for databases available for it, and they're better tested and well established.
  • [*] There's a larger community of Clojure developers than there are newLISP developers, if I need to hire some help, it might be easier to find a Clojure developer.

  • [*] Clojure has some interesting ideas when it comes to concurrency issues.
  • [/list]

    I've only just begun to learn it, and here's what I can tell you so far about the experience]
  • [*] Unlike newLISP, it's taking me a *lot* longer to learn it.

  • [*] The documentation is absolutely dreadful compared to newLISP's. I cannot underscore this point enough. It's terrible to the point of shamefulness. newLISP's documentation is truly better and something to marvel at and be proud of.

  • [*] I'm generally uneasy about it.
  • [/list]

    However, I'm not going to give up on it yet. Besides the 3 reasons mentioned earlier, I generally like what I hear when I hear Rich Hickey speak. He's obviously put a lot of thought into the language, and it will be an interesting exercise for me to learn the Clojure way of development, which is very different from how newLISP programs are written because of how functional it is: anything that involves changing values requires special attention to it. This is both interesting and frustrating, but I wonder if I'll eventually see the light.



    I'm also learning it for comparison's sake. I'd like to be able to eventually write a post comparing newLISP to Clojure. I'd like to know which one better suits my needs and which one I personally feel is the superior development model. I'll keep you guys updated on what I find, but if you have any opinions of your own please share them!
    Get your Objective newLISP groove on.

    Jeff

    #1
    newlisp's new send/receive functions to communicate between processes are very nice. They let you write coroutines between processes.



    Also check out the news forum. I just wrote a module wrapping eventlib, which adds event-based processing for sockets.
    Jeff

    =====

    Old programmers don\'t die. They just parse on...



    http://artfulcode.net\">Artful code

    itistoday

    #2
    Quote from: "Jeff"newlisp's new send/receive functions to communicate between processes are very nice. They let you write coroutines between processes.


    Yes, I was very happy to see that Lutz implemented the actor stuff. It's essential in this day and age, and I personally think that Clojure's approach is overkill. Sure, you could make Clojure massively parallel and do something with it that will chew up all the CPU on an infinite number of cores, but the only thing about that is that most programs will never need more than about 10 threads maximum, and usually they're sitting idle. I'll have more to say on this later as I understand Clojure better...


    QuoteAlso check out the news forum. I just wrote a module wrapping eventlib, which adds event-based processing for sockets.


    I did, and I was delighted to see that. libevent is awesome, and it's great to know there's a newLISP wrapper over it.



    BTW, *if* you are interested in working on a certain project that would involve newLISP & backend development, and (here's the clincher that'll make you smile), are OK with a relatively small monetary compensation for it in return for a 50-50 stake in the end product (which will be awesome), let me know! :-)
    Get your Objective newLISP groove on.

    itistoday

    #3
    One neat thing about Clojure though is it's well thought out design for data structures and its use of sequences and interfaces to interact with them. Clojure also has convenient syntax for declaring arrays, sets, and maps, and it uses arrays frequently where newLISP would use lists. And in some places that really does make sense, for example when doing implicit indexing.
    Get your Objective newLISP groove on.

    cormullion

    #4
    Good luck with the project, whichever tool you choose!



    From a brief look at the web site, Clojure looks to be a much larger, complex and ambitious project. I don't think ease of use is its major selling point... :)

    itistoday

    #5
    Quote from: "cormullion"Good luck with the project, whichever tool you choose!



    From a brief look at the web site, Clojure looks to be a much larger, complex and ambitious project. I don't think ease of use is its major selling point... :)


    Thanks, and yes that is true, and I suppose that's the trade-off, I may have just been spoiled by newLISP. ;-)
    Get your Objective newLISP groove on.

    TedWalther

    #6
    Viz compensation, how small is small, and how much time per day will it take?  You can phone me at 208-310-7032.



    Ted


    Quote from: "itistoday"
    Quote from: "Jeff"newlisp's new send/receive functions to communicate between processes are very nice. They let you write coroutines between processes.


    Yes, I was very happy to see that Lutz implemented the actor stuff. It's essential in this day and age, and I personally think that Clojure's approach is overkill. Sure, you could make Clojure massively parallel and do something with it that will chew up all the CPU on an infinite number of cores, but the only thing about that is that most programs will never need more than about 10 threads maximum, and usually they're sitting idle. I'll have more to say on this later as I understand Clojure better...


    QuoteAlso check out the news forum. I just wrote a module wrapping eventlib, which adds event-based processing for sockets.


    I did, and I was delighted to see that. libevent is awesome, and it's great to know there's a newLISP wrapper over it.



    BTW, *if* you are interested in working on a certain project that would involve newLISP & backend development, and (here's the clincher that'll make you smile), are OK with a relatively small monetary compensation for it in return for a 50-50 stake in the end product (which will be awesome), let me know! :-)
    Cavemen in bearskins invaded the ivory towers of Artificial Intelligence.  Nine months later, they left with a baby named newLISP.  The women of the ivory towers wept and wailed.  \"Abomination!\" they cried.

    TedWalther

    #7
    Quote from: "itistoday"One neat thing about Clojure though is it's well thought out design for data structures and its use of sequences and interfaces to interact with them. Clojure also has convenient syntax for declaring arrays, sets, and maps, and it uses arrays frequently where newLISP would use lists. And in some places that really does make sense, for example when doing implicit indexing.


    If we ever get reader macros (which it looks like Lutz is working on) it should be possible to leapfrog Clojure in all of the ways you mention here.



    It should also make it possible to shrink the binary; syntax like ' could be done as reader macros instead of being in the C interpreter.
    Cavemen in bearskins invaded the ivory towers of Artificial Intelligence.  Nine months later, they left with a baby named newLISP.  The women of the ivory towers wept and wailed.  \"Abomination!\" they cried.

    itistoday

    #8
    Quote from: "TedWalther"Viz compensation, how small is small, and how much time per day will it take?  You can phone me at 208-310-7032.


    Check PMs. If anyone else is interested feel free to PM me.
    Get your Objective newLISP groove on.

    itistoday

    #9
    OK, after about 3 days I think I'm done evaluating Clojure. I've decided that it's a very interesting language with lots of great things about it, and things that I wish newLISP had, but the Java-ness of it repulses me.



    In looking for a web framework that I could use with it I checked out Compojure and decided that it was handicapped in much of its design decisions, and its necessary dependence on Java crap. It needs a "Java servlet container" to run (doesn't that phrase already make you sick?), and that essentially means getting rid of Apache (you can run Apache, but it must send the requests through Jetty/Tomcat, and thus you have two servers running). You can't just edit files and be done with it, no you need to re-run the server, or connect to it through a REPL and re-load the functions/files you've changed. It spends a lot of effort on creating its own pointless alternative to HTML (that no designer on the planet will use), and developing for the thing is a nightmare of sludging through Java crap.



    This is just not worth it. By the time I'd learned all the tools (Maven, ant, NetBeans, Emacs, SLIME, XML config garbage, Jetty/Tomcat) I could have a powerful web framework already finished in newLISP that runs distributed on multiple apache servers spread across different machines.



    Which, BTW, is exactly what I'm going to do.  I got a chance to chat with hilti, and I'm going to help him develop Dragonfly into an *awesome* web framework by bringing in the work that I already have and improving upon it, in my favorite LISP. :-)
    Get your Objective newLISP groove on.

    xytroxon

    #10
    Great news!



    Ever since Oracle recently bought out Sun, even though Java is now open source, I wonder if Oracle will support Java as vigorously as Sun has up to now?



    Java was suppose to be the be-all and end-all of web development (and to keep Sun relevant as people moved away from the closed house computer center to the internet model). Java, except at the corporate level, has never really caught on.



    Instead, PHP and Ruby are the domain of the start-up net-boyz.  So why not also newLISP :)



    -- xytroxon
    \"Many computers can print only capital letters, so we shall not use lowercase letters.\"

    -- Let\'s Talk Lisp (c) 1976