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:20:13 +0800 Organization: HFG Message-ID: <1466788813.1489.61.camel@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1466788860 12156 80.91.229.3 (24 Jun 2016 17:21:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2016 17:21:00 +0000 (UTC) To: Jan Wedekind , guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Jun 24 19:20:55 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 1bGUmj-0008Uk-HT for guile-user@m.gmane.org; Fri, 24 Jun 2016 19:20:53 +0200 Original-Received: from localhost ([::1]:45116 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGUmf-0005yB-Da for guile-user@m.gmane.org; Fri, 24 Jun 2016 13:20:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGUmF-0005xu-H4 for guile-user@gnu.org; Fri, 24 Jun 2016 13:20:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bGUmA-0004bL-Fx for guile-user@gnu.org; Fri, 24 Jun 2016 13:20:22 -0400 Original-Received: from mail-pf0-x22f.google.com ([2607:f8b0:400e:c00::22f]:35431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bGUmA-0004bG-7q for guile-user@gnu.org; Fri, 24 Jun 2016 13:20:18 -0400 Original-Received: by mail-pf0-x22f.google.com with SMTP id c2so41114933pfa.2 for ; Fri, 24 Jun 2016 10:20:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:date:in-reply-to:references:organization :mime-version:content-transfer-encoding; bh=MDyNa5FI8sTct7CNn1SMPuQ12xNKKZWo1hUAyvI78N0=; b=CuThkgshjE4VOWC6UrL1C1Z1yRJ9hgPLWfGSucSAD+yClYbHMzsvKDohktNrJwU9TR xLavuyf5mWUbBxwfcl2eVHTTl3rjI1vlrDJnb7yrecT+BPR49QyKS9mGlqI9wLoubnUD iOTniveCOwvey6wujjWvbyaqSU7RFMjKNwM7O5vXfhnjoS5nJUcASItTDmhCPi5uI+8b hOJn2fiks0cCPrsXVXLEegTTnelM+71rFfRCYcNSwFiFXGkVzSfXCWdOBGcXgBTgiZmZ e903OxpI7dq0gsU+JLKPcvuiCnQOjWfY99rCNHSxYw7PfI+mOF51nPmXkqQ6Fud8d4hR xv2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=MDyNa5FI8sTct7CNn1SMPuQ12xNKKZWo1hUAyvI78N0=; b=An257EHsgnJyz/dH6ZVWv+BH+ieaooW6BUXbtGE/nfGJP6A9DNm7czx0d1T2vUMIxG ibddtBVCTzS3CWTYyTkWRYoJJHtWzyW1JtgRylsNY2xN0MK604CQ6Tkhs/iZY3X9arPb tJFrqV4/CYIY+B4/FblQCqj+KWYFFpFRF8oQzyisUgXZZ9eMleLj+21nr0/0T57HRc+6 7kQt6OR/8cAoAxCBKKp5HXCpnKDiQHhzErCLEfJEntuEF3FEs51uEdP5TMUlkbKq78No USu2S5BOlNAmZMBJRS5pMZG/YzE3cqI0GzIY/PllW9hNVHn2MPfyaPjT635vUn70zYPd Jwbg== X-Gm-Message-State: ALyK8tJY92RH14pyHs84vlH1FYiJ0zDfjO61f0BJwBF9wZrBkytaGVYAW/1VeR9f6VfWRQ== X-Received: by 10.98.93.65 with SMTP id r62mr9191344pfb.114.1466788817130; Fri, 24 Jun 2016 10:20:17 -0700 (PDT) Original-Received: from localhost (li88-185.members.linode.com. [74.207.246.185]) by smtp.gmail.com with ESMTPSA id ln4sm1431100pab.38.2016.06.24.10.20.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Jun 2016 10:20:16 -0700 (PDT) In-Reply-To: X-Mailer: Evolution 3.18.5.1-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::22f 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:12699 Archived-At: 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.