Graham,

That's exactly what it is. I used the continuation monad from
clojure.contrib.monads. After I get the code out, I'll be writing a
tutorial on how it works which will also explain the continuation
monad. I found that monad to be the most difficult to get my head
around, but it's hugely powerful. Using it, that library only took
about 50 lines of code to write. Having to account for browser history
took another 30. However, those 50 lines of code will turn your brain
to mush if you don't have a handle on the continuation monad. :)

Jim

Graham Fawcett wrote:
> Hi Jim,
>
> On Tue, Nov 24, 2009 at 11:21 PM, jim <jim.d...@gmail.com> wrote:
> > Evening all,
> >
> > I've been working on a library for writing web applications for
> > compojure. I've got it written and (I think) working. First thing
> > tomorrow is to write a sample app and post it along with the library.
> >
> > But in the meantime, I thought I'd let you all read about it if you're
> > having trouble sleeping. :)
> >
> > http://intensivesystems.net/tutorials/web_sessions.html
>
> Neat. It looks like you're writing what's usually called a
> "continuation-based web framework". When I read your title and first
> couple paragraphs, I thought you were writing a session-management
> library (e.g. setting cookies, keeping server-side state, etc.). You
> might consider mentioning continuations somewhere in your article, if
> only to attract Googling continuation-based fans.
>
> You might already be familiar with other continuation-based
> frameworks. If not, consider looking at projects like Wee (for Ruby)
> and Seaside (for Smalltalk) to steal some ideas. :)
>
> Best,
> Graham
>
> >
> > One thing I love about FP in general and Clojure specifically is the
> > density of code that is possible. This library is only about 80 lines
> > of code.
> >
> > Jim
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> > Note that posts from new members are moderated - please be patient with 
> > your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to