New Framework: ningle

In the new update of Quicklisp, new framework which based on Clack is available. It's name is "ningle".

ningle is a super micro web application framework.

;; Make application
(defvar *app* (make-instance 'ningle:<app>))

(setf (ningle:route *app* "/")
      "Welcome to ningle!")

(setf (ningle:route *app* "/login" :method :POST)
      #'(lambda (params)
          (if (authorize (getf params :|username|)
                         (getf params :|password|))
            "Authorized!"
            "Failed...Try again.")))

;; http://localhost:5000/
(clack:clackup *app*)

That's all of ningle. Pretty small.

I have been thinking that some kind of macros such as "defile-route" aren't always required for routing. ningle proved it.

Are you interested? See it's website for more details.

Caveman 12.03 Released (with an important note)

We released Caveman v12.03. In this version, one backward incompatible change has done with some trivial improvements. I'm afraid but your project need to change.

It changes a lambda-list of caveman.project:build. If you have a project created by v12.02 or before, you have to change the lambda-list of build in "src/{yourproject}.lisp". Here is the summary to migrate.

  • Emit "&optional app"
  • Emit "@ignore app"
  • Don't call call-next-method in build
  • Add <clack-middleware-session> if you need.

See this part for the detail.

Of course, we think the backward compatibility as an important thing, but this change was really needed to make Caveman concise. Sorry for the inconvenience.

This version will be available in the next Quicklisp update in April with the new Clack! Wait the update patiently.

Clack 12.03 Released

We released Clack v12.03 at 3/25. From this version, Clack finally supports FastCGI as its backend!

If your application is running like this,

(clackup #'(lambda (env)
             '(200 nil ("ok")))
         :port 9000)

You can also run it as a FastCGI server by only adding :server to the argument.

(clackup #'(lambda (env)
             '(200 nil ("ok")))
         :server :fcgi
         :port 9000)

Then, Clack loads Clack.Handler.Fcgi instead of Clack.Handler.Hunchentoot.

FastCGI handler also provides another feature -- streaming. When you return a function instead of the three-element list, Clack responds immediately, keeps the connection being alive, and writes the body intermittently.

(clackup #'(lambda (env)
             (declare (ignore env))
             #'(lambda (responder)
                 (loop with writer = (funcall responder
                                              '(200 (:content-type "application/json")))
                       for event = (get-new-event-as-json)
                       while event
                       do (funcall writer event)
                          (sleep 10)
                       finally (funcall writer "" :close t))))
         :server :fcgi
         :port 9000)

For example, this feature would be effective in the case that you want to notify a client in real-time or to deliver a movie file streamingly.

This version also fixes some problems. See issues for the detail.

Clack 12.02 Released

We released Clack v12.02 a few days ago. This release made some changes on API about uploading files. If you use Clack.Request, you may need to change your code. Continue reading.

Clack.Request had been providing a function uploads to access uploaded files until now. However it is now removed and merged into body-request.

<form action="/" method="POST" enctype="multipart/form-data">
  <input type="text" name="name" value="fukamachi" />
  <input type="profile-icon" name="profile-icon" />
  <input type="submit" value="Send" />
</form>

(body-parameter (make-request env))
;=> (:name "fukamachi" :profile-icon (#p"/tmp/hunchentoot/hunchentoot-1" "profile-icon.png" "image/png"))

And this version also fixes some problems. See issues for the detail.

This version will be available on the next Quicklisp update in March. Wait the update patiently.

Clack 12.01 Released

We released Clack v12.01 today. A few minor changes were done.

From this version, Clack depends on trivial-types. trivial-types provides a set of useful type definitions, such as property-list.

We are really thinking about how our code will be read by other people. trivial-types helps us to write readable codes.

This version will be available on Quicklisp in the next month. Wait the update patiently.

Clack 11.12 Released

We released Clack v11.12 a few days ago.

In this version, we separated Clack Handlers as other 2 systems, clack-handler-hunchentoot and clack-handler-apache. As the result, Clack doesn't depend on Hunchentoot and cl-modlisp now.

Though you need Hunchentoot if you choose Hunchentoot as a backend of Clack, the loading of handlers will be delayed until "clackup". This change allows us to make handlers which only for particular environments.

This version will be available on Quicklisp within a few weeks. Wait the update.

This is the last release in this year. Clack was born in March of this year, and released June. We have made 7 releases for each months so far. I know we don't success yet, but I think we've done well. Let's keep it :)

By the way, ILC 2012 will be held in Kyoto, Japan. I live in Kyoto. Clack & Caveman were made in Japan. I'm looking forward to see you all there.

Then, I hope Lispers a happy new year!

Clack & Caveman 11.11 Released

We released Clack v11.11 and Caveman v11.11 today. This version fixes some trivial bugs.

The notable thing is that Clack depends on CL-Syntax from this release. CL-Syntax makes it easy to treat read macros more, and solves a problem related to SLIME.

This version will be available on Quicklisp within a few weeks. Please wait the update patiently.

Clack 11.10 Released (Compatible with Hunchentoot 1.2.0)

A few days ago, Hunchentoot v1.2.0 was out. Though Hunchentoot is originally written by Edi Weitz, he hasn't released it for a long time. I don't know how it started, but it seems the community decided to fork it on GitHub. This is the first release of it by them.

Zach, the Quicklisp author, announced he replaces it by the new one in the next update of Quicklisp. And he also warned that it will break some libraries which uses Hunchentoot. Oh, Clack is it.

We released Clack v11.10.1 which is compatible with Hunchentoot 1.2.0, today. So Clack API isn't changed, it doesn't break existing applications which uses Clack. However, be aware that it doesn't work with older Hunchentoot. If you have any problems about this release, please report it to Clack mailing-list or GitHub issues.

Continuous Clack Testing with Jenkins

Jenkins-logo
Clack source code is nearly 5000 lines in total. And the quality is assured by some unit tests that is 900 lines.

So far, Clack developers were able to catch most of bugs to only run the tests. But the whole tests take over 2 minutes to end. When we think that we have many CL implementation to run the tests on, it is hard to test Clack perfectly.

Then, we decided to test Clack on Jenkins, a famous CI server. That tests Clack automatically when the source code is changed. It is ready on the following URL.

As far as I know, Clack is the first CL product tested on Jenkins :)

We aim at the practical use of Common Lisp. That is not only for source codes, but for our development cycle.

This is the first step of it.