Hi Jan!
First, thanks for sharing this code.
I've tried, it's sweet that I love it!
And I'm looking forward to someone could finish it as a complete
project just like IPython notebook or similar.
On Fri, 2016-06-24 at 12:43 +0100, Jan Wedekind wrote:
(post "/"
(lambda (rc)
(let* [(session (cookie-ref (rc-cookie rc) "sid"))
(post-data (map dot (generate-kv-from-post-qstr (rc-
body rc))))
(line (uri-decode (assoc-ref post-data
"line")))]
(repl session line)
(editor session))))
It is embarrassing when I'm trying to point out the fancy "shortcut"
for saving code, but finally I realized there're bugs. ;-(
Anyway, they're just syntax sugar for convenience, it won't be harm if
you dismiss it. I'm working on the server core of Artanis, so I may fix
it next release.
But I still put my code here to shed some light. ;-P
=========================code=================================
(post "/" #:from-post #t #:cookie '(name repl)
(lambda (rc)
(let [(session (:cookies-ref rc 'repl "sid"))
(line (uri-decode (:from-post rc 'get "line")))]
(repl session line)
(editor session))))
=========================end==================================
Best regards.