unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Nala Ginrut <nalaginrut@gmail.com>
To: Jan Wedekind <jan@wedesoft.de>, guile-user@gnu.org
Subject: Re: Artanis web REPL
Date: Sat, 25 Jun 2016 01:20:13 +0800	[thread overview]
Message-ID: <1466788813.1489.61.camel@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1606241239490.29787@wedemob>

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.




  reply	other threads:[~2016-06-24 17:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-24 11:43 Artanis web REPL Jan Wedekind
2016-06-24 17:20 ` Nala Ginrut [this message]
2016-06-24 21:40   ` Jan Wedekind
2016-06-24 21:51   ` Jan Wedekind
2016-06-25  1:14     ` Nala Ginrut
2016-06-25 20:09       ` Jan Wedekind

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466788813.1489.61.camel@gmail.com \
    --to=nalaginrut@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=jan@wedesoft.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).