From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.user Subject: Re: Artanis web REPL Date: Sat, 25 Jun 2016 01:14:00 +0000 Message-ID: References: <1466788813.1489.61.camel@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1466817279 3867 80.91.229.3 (25 Jun 2016 01:14:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jun 2016 01:14:39 +0000 (UTC) Cc: guile-user@gnu.org To: Jan Wedekind Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jun 25 03:14:38 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bGcBB-0005TQ-VS for guile-user@m.gmane.org; Sat, 25 Jun 2016 03:14:38 +0200 Original-Received: from localhost ([::1]:47867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGcBA-0004j9-A9 for guile-user@m.gmane.org; Fri, 24 Jun 2016 21:14:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGcAm-0004iu-Hr for guile-user@gnu.org; Fri, 24 Jun 2016 21:14:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGcAk-0007Wk-7O for guile-user@gnu.org; Fri, 24 Jun 2016 21:14:11 -0400 Original-Received: from mail-yw0-x234.google.com ([2607:f8b0:4002:c05::234]:33825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGcAk-0007WR-1D for guile-user@gnu.org; Fri, 24 Jun 2016 21:14:10 -0400 Original-Received: by mail-yw0-x234.google.com with SMTP id i12so111420666ywa.1 for ; Fri, 24 Jun 2016 18:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7Q2rSbWnRqgmb4IADnfFSmaziya/cea03Q+5WlKBnDg=; b=VErv5hLZP9KuBG7SMeV8AFmcqlyJzoHr0v1xfsZ+qX+WND+FOw6ZMnMSCWkHXLzo34 7NTJ2IcewFWQOlsrjj8JnGN93zBYeCDrPwNcoMNUnZUt7soD6mpEvoz11nf8ZVnusYJM LVlUcc4uOj1L3KSP+x1Fed8PITwHf9B+Vwj8WBZme6c/MEX+XyeFQ7k4XmwglXVj5sMX VYHuzL8hwXRxWHJAw4J6GoNJWUZBj8ZGpuyFUrwH2yPnc8MgwB9x+9USXStzGvz/G49i 7tvbdixTxYrQ9jbYcc1nl85LlNGtU+7rh+E6UjHu7Z/LKg6T8JBAoebleY6lH09a3E4c lzPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7Q2rSbWnRqgmb4IADnfFSmaziya/cea03Q+5WlKBnDg=; b=GGi3oXtUM+XSL9lf9mYdGbm6i9Gp6gtBft62D/rbp4nncpax5iF49qhzYnjgnim99x hK8CmUkrfgHBXsln2+fZNCLZt9hc9LvJncTk4DlSv8LV3TiWk+/NzSAJEOShSOq7CtGy 74bbcFHY+TsVLfa8xuY12XwC4fcu4xKYTDDfSkJc1YG6PVkcJEpk2dkhrGeUYTh1LKj/ Y17q0AygN7/C0jdZlBRhUClDbigUISb9cySjQETkN7QtcBDzaTqKPoN3FCLuE4nbSrsA iQUHrxpUXivth9EMJQSGnEdByyUWR3BdfPjP10qxpxGK/1rgb26X18aiklWpxN6zrRU1 iRiA== X-Gm-Message-State: ALyK8tImg1/jvKUrNbpbJAoI44xeZ9TgJEJJ6wYuyrM0HhHJh5w0mQTBK8DeiiNgNTQI/kFI8Fv/7xJCloBvDg== X-Received: by 10.129.122.15 with SMTP id v15mr4847462ywc.82.1466817249654; Fri, 24 Jun 2016 18:14:09 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::234 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:12702 Archived-At: Yes, that's what I said emberrass bugs. I will fix it next release. Please use the old method for a while. Best regard. Jan Wedekind =E4=BA=8E2016=E5=B9=B46=E6=9C=8825=E6=97=A5= =E5=91=A8=E5=85=AD 05:51=E5=86=99=E9=81=93=EF=BC=9A > Actually I had to revert the ":from-post" code as well, because it was > always giving the same result for "line" after the first post event. > > (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)))) > > On Sat, 25 Jun 2016, Nala Ginrut wrote: > > > 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 > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3Dcode=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > (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)))) > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3Dend=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > > > Best regards. > > > >