andreaskostler / cl-ring Goto Github PK
View Code? Open in Web Editor NEWcl-ring is a common lisp web applications library inspired by Clojure's Ring
cl-ring is a common lisp web applications library inspired by Clojure's Ring
(in-package :my-app)
(defun handler (request)
'((:status . 200)
(:header . ((:Content-Type . "text/html")))
(:body "Hello World")))
Should be
(in-package :my-app)
(defun handler (request)
'((:status . 200)
(:header . ((:Content-Type . "text/html")))
(:body . "Hello World")))
i.e. the body must be a cons otherwise it wont work.
; SLIME 2012-09-04
CL-USER> (ql:quickload "cl-ring")
To load "cl-ring":
Load 1 ASDF system:
cl-ring
; Loading "cl-ring"
.....
; file: /Users/reb/quicklisp/local-projects/cl-ring/cl-ring-core/util/codec.lisp
; in: DEFMETHOD FORM-ENCODE (CONS)
; (DEFMETHOD CL-RING-UTIL::FORM-ENCODE
; ((CL-RING-UTIL::X CONS)
; &OPTIONAL (CL-RING-UTIL::EXTERNAL-FORMAT :UTF-8))
; (LABELS ((CL-RING-UTIL::ENCODE (CL-RING-UTIL::X)
; (CL-RING-UTIL::FORM-ENCODE CL-RING-UTIL::X
; CL-RING-UTIL::EXTERNAL-FORMAT))
; (CL-RING-UTIL::ENCODE-PARAM (CL-RING-UTIL::K CL-RING-UTIL::V)
; (CL-RING-UTIL::STR # "=" #)))
; (LET ((CL-RING-UTIL::STRINGS #))
; )))
; --> PROGN EVAL-WHEN
; ==>
; (SB-PCL::%DEFMETHOD-EXPANDER CL-RING-UTIL::FORM-ENCODE NIL
; ((CL-RING-UTIL::X CONS) &OPTIONAL
; (CL-RING-UTIL::EXTERNAL-FORMAT :UTF-8))
; ((LABELS ((CL-RING-UTIL::ENCODE #
; #)
; (CL-RING-UTIL::ENCODE-PARAM #
; #))
; (LET (#)
; ))))
;
; caught ERROR:
; (during macroexpansion of (SB-PCL::%DEFMETHOD-EXPANDER FORM-ENCODE ...))
; error while parsing arguments to DESTRUCTURING-BIND:
; invalid number of elements in
; (IF (LISTP V))
; to satisfy lambda list
; (IF SB-WALKER::PREDICATE
; SB-WALKER::ARM1
; &OPTIONAL
; SB-WALKER::ARM2):
; between 3 and 4 expected, but 2 found
;
; caught ERROR:
; READ error during COMPILE-FILE:
;
; unmatched close parenthesis
;
; Line: 110, Column: 28, File-Position: 3920
;
; Stream: #<SB-SYS:FD-STREAM
; for "file /Users/reb/quicklisp/local-projects/cl-ring/cl-ring-core/util/codec.lisp"
; {1005364F43}>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.