8 ms·
Lisp Web Tales
- taeric 13y agoI'm really looking forward to taking a closer look at this. Huge thanks to whoever posted it! As an aside, are there any good rundowns of using a LISP for web development? I don't personally see it recommended/done a lot. Curious if that is just my exposure, or if it gels with reality.
- mike_ivanov 13y agoIt's definitely good for prototyping. However, the real question is whether you're going to build it alone or have any plans to build a team around it and such. If the latter is the case, think twice.
- taeric 13y agoIs this feeling just because there is a larger pool of choices that know other options? Or do you feel LISP is actually a bad choice for large teams?
- mike_ivanov 13y agoLisp is a good choice for any team, as long as your team agrees with your choice. It's all about attitude. With Ruby/Python/PHP people rarely express strong sentiments over the language choice. Typically, you can easily convince the team going this or that way, depending on the task. Everybody understands those are just tools. However, when it comes to non-mainstream languages such as Lisp, people become more galvanized. Negative sentiments are likely to shift from 'meh, whatever' to 'you must be mad'. That's why I say think twice. You might alienate some people -- if that's something you care about.
- cgag 13y agoBut then the people you do hire are super into it. I can't imagine there are many people using a lisp at work begrudgingly when there are so many people who'd love to get to use it professionally.
- adwf 13y agoI think it's partly to do with the extreme flexibility of the language. When you have a large team programming in Java, you pretty much know that they're all going to be programming in roughly the same style. eg. They'll obviously be object oriented, they'll use the same major libraries, they'll be focusing on the design patterns, etc... Whereas in the Lisp world, you have so much flexibility that you can end up with all sorts: some people doing pure functional code, some OO, some using tail recursion wherever possible vs. some preferring more explicit representations, some going heavy on the macros, some using LOOP, some preferring recursive mappings of anonymous functions, etc... Ultimately, this can be fixed by using a decent style guide. Google has a good example since they acquired ITA: http://google-styleguide.googlecode.com/svn/trunk/lispguide.xml http://google-styleguide.googlecode.com/svn/trunk/lispguide.... In other languages it isn't so much of a problem - eg. I'm thinking of Python as an example where you are strongly encouraged that there is "only one way to do it". However, if you recognise from the beginning that you need to enforce a decent style guide, then I see no reason why large Lisp teams couldn't work.
- fractallyte 13y agoI think this demonstrates just how much the growth of real software engineering has been stunted by half-solutions (like Java, and other mainstream languages). It's exciting! In the case of Lisp, it's not just about enforcing styles, but (as a team) coming up with the appropriate DSL for the task at hand. The classic 'bottom-up' paradigm (http://www.paulgraham.com/progbot.html http://www.paulgraham.com/progbot.html), but done collaboratively. The analog has been done to death in object oriented languages, with concepts such as design patterns and frameworks. I'd love to see similar developments in a meta-language like Lisp, and with all the (potential) power that entails...
- AndreasFrom 13y agoClojure has done a lot in this area on both the server- and client-side.
- pekk 13y agoSuppose one does not want to marry the JVM. Why not Lisp?
- danneu 13y agoIf you're interested in Clojure but want to avoid the JVM, then I would think Scheme would be the better choice than Common Lisp since it's functional like Clojure.
- twism 13y ago... or ClojureScript and NodeJS EDIT: Actually the JVM is still involved but just for compilation.
- wes-exp 13y agoOf course, if you want lispyness while retaining the freedom to choose an imperative style or a functional style, Common Lisp is better.
- jdale27 13y agoBoth Scheme and Common Lisp support imperative and functional programming styles. The Scheme community has historically been perhaps more dogmatic about sticking to functional programming, and so Common Lisp has built up more tools and idioms around imperative (and object-oriented) programming. But as someone who has used both Scheme and Common Lisp a fair bit, this doesn't seem like one of the dominant criteria for choosing between them for practical programming work.
- pnathan 13y agoAFAICT, Clojure has a big following in the big data & web areas. I'm working on a side project, using Common Lisp for a webapp. So far it's nice. General reports indicate that current open source Lisp systems works reasonably well under smaller load.
- danneu 13y agoClojure has been my go-to web dev language for a less than a year. My Clojure workflow is much better than my Ruby workflow. It's easier to glue things together. My feedback loops are faster (like being able to eval code in my source file). The domain is simpler. So are APIs. You don't hear about people using lisps because the communities are small. There's a self-fulfilling barrier to entry. And it certainly is a smaller world. The good part is that the quality/intelligence per capita is high. But the bad part is that I'm bringing the average down. I definitely feel it in #clojure.
- invalidOrTaken 13y ago> But the bad part is that I'm bringing the average down. I definitely feel it in #clojure. Me too, my friend, me too.
- 147 13y agoI tried Clojure out for a while. It's my favorite language. But I went back to Ruby and Rails for my recent projects and I'm just way faster at it. It's so much easier to use and the way the gems glue themselves and integrate with my projects saves so much time. If there was a way to get something like this in Clojure or Common Lisp (I haven't tried Common Lisp) then I'd go back to it.
- danneu 13y agoYeah, at first it's much faster to bang out a prototypical CRUD app with Rails. `gem install devise`, a few more incantations, and now you've got a full authentication/forgot-password/email-verification system up and running within 5 minutes. CSRF protection is included with a `protect_from_forgery` link in the ApplicationController and you don't need to know what CSRF is. But at a point I find myself at the whim of Devise's Github Wiki to expose the method I need to override to make a trivial change. And as I diverge from the base-case of the gems in my Gemfile, I'm spending my time credentializing in gem source code to do trivial things. I need to make what should be a 5 second change to an API endpoint, but we used RABL because it was easy and now I'm back on its Github page hunting down its API doc. Those chickens had never really come home to roost until I was a full-time Rails developer working on a monolithic app where my days became squandered to pay back technical debt by specializing in the intersection of codebases that were not my own. That's what brought me to Clojure which I was pretty much sold on after reading about Ring (https://github.com/ring-clojure/ring/wiki/Concepts https://github.com/ring-clojure/ring/wiki/Concepts). A request is just map. Your app is just a series of functions that transform that map. And a response map comes out the other side. In Rails, to reset a session, you call a magical method `reset_session`. With Ring, you return the response map with its `:session` key set to `nil`. Implementing features is much more obvious now. The hard part is figuring out how to structure and fit together the app. Especially since Rails made most of those decisions for me. I started building a forum with Clojure and Datomic: https://github.com/danneu/clj-forum https://github.com/danneu/clj-forum My goal is to eventually arrive at a webapp structure that I can replicate in future Clojure webapps. I don't really know how to use Datomic or how to organize my code or what abstractions will work, but I have a clay-ball approach to it all where I just do what's good enough now and refine it later. But it's coming together. If you start in the handler (https://github.com/danneu/clj-forum/blob/master/src/clj/forum/handler.clj https://github.com/danneu/clj-forum/blob/master/src/clj/foru...), you can get a sense of what's going on. - Here's an attempt at recreating some of the Ruby CanCan authorization lib: https://github.com/danneu/clj-forum/blob/9c0d2b8f17acc06da9a59db72f6f63d73cc18b26/src/clj/forum/cancan.clj https://github.com/danneu/clj-forum/blob/9c0d2b8f17acc06da9a... - And here are the tests for it: https://github.com/danneu/clj-forum/blob/9c0d2b8f17acc06da9a59db72f6f63d73cc18b26/test/forum/cancan_test.clj https://github.com/danneu/clj-forum/blob/9c0d2b8f17acc06da9a... Yeah, that was a longer post than I thought I'd write but I've been alone in my Clojure cave for a while now, complecting.
- e12e 13y agoI find it a little ironic that no-one's mentioned Arc yet: http://arclanguage.org/ http://arclanguage.org/ Personally, I've never quite "gotten started" with lisp (neither cl or scheme) -- and while I don't know if I'd recommend Arc -- the system on which it is built, which has evolved into racket: http://www.racket-lang.org http://www.racket-lang.org Is as far as I can tell, really, really good. Both the implementation, the tooling, the documentation and the community. For more on racket and web: http://docs.racket-lang.org/web-server/ http://docs.racket-lang.org/web-server/ See also: http://stackoverflow.com/questions/4285617/how-do-i-install-arc-to-get-a-hacker-news-clone-website http://stackoverflow.com/questions/4285617/how-do-i-install-... The hype definitely seems to be on the side of clojure, and clojure+leiningen (the build system) gains quite a few advantages from running on top of the jvm. My guess is that you'll find a lot more libraries and code for using clojure for web programming than probably any other lisp -- and code that people are invested in at that (code that people depend on for running their own projects/businesses etc).
- georgismilyanov 13y agoi would be curious to learn more about you, Pavel. what do you study? are you from Bulgaria?
- tambourine_man 13y agoUnreadable on the iPhone (iOS 7)
- osivertsson 13y agoUnfortunately unreadable on my Android-based Sony PRS-T1 too. Text is aligned too far to the left, leading to some of it being cropped. Interesting topic though, I'll revisit it when I have access to my workstation again. Thank you for posting.
- nhlx2 13y agoTry reloading the page with the phone in landscape orientation.
- e12e 13y agoOn the subject of clojure -- is my impression correct in that most (all?) web framework/templating frameworks for clojure insist on having the templates be some clojure dsl, rather than "just" "proper" templates (like: eg zope tal)? All the (admittedly quick, todo-app style) clojure web code I've seen always seemed fragile in how the template code was interwoven with the rest of the app (rather than building up a set of values in an environment and compilling a template with that). I prefer to have my templates as far separate from the application as makes sense... edit: Looks like there's at least laser: https://github.com/Raynes/laser https://github.com/Raynes/laser Which seems more like what I want than what I've seen elsewhere.
- cgag 13y agoMaybe something like this? https://github.com/yogthos/Selmer https://github.com/yogthos/Selmer
- juanre 13y agoYou don't have to go all the way to full Common Lisp server-side development. At http://greaterskies.com http://greaterskies.com I wrote in CL the engine that computes and creates the personalized PDF maps of the sky, then built an sbcl custom core that's kept listening to a socket. I then manage the httpd communication with rather simple Python and AJAX, relying in flat files and static HTML. I am quite happy with the maintainability, and I got to use Lisp in the part where I could really take advantage of its power and speed.