From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: Re: [Code for fun] Announce my generic server Ragnarok Date: Wed, 4 Apr 2012 11:09:45 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1333508999 1012 80.91.229.3 (4 Apr 2012 03:09:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Apr 2012 03:09:59 +0000 (UTC) Cc: guile-devel To: Noah Lavine Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Apr 04 05:09:58 2012 Return-path: Envelope-to: guile-devel@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 1SFGba-0002ka-Qe for guile-devel@m.gmane.org; Wed, 04 Apr 2012 05:09:55 +0200 Original-Received: from localhost ([::1]:55812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFGba-0005pn-0S for guile-devel@m.gmane.org; Tue, 03 Apr 2012 23:09:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFGbW-0005pi-RP for guile-devel@gnu.org; Tue, 03 Apr 2012 23:09:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFGbU-0006t7-Jd for guile-devel@gnu.org; Tue, 03 Apr 2012 23:09:50 -0400 Original-Received: from mail-vx0-f169.google.com ([209.85.220.169]:43563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFGbU-0006p5-Cg for guile-devel@gnu.org; Tue, 03 Apr 2012 23:09:48 -0400 Original-Received: by vcbfk14 with SMTP id fk14so307536vcb.0 for ; Tue, 03 Apr 2012 20:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=WmVsey+Z/RQUT6h0LXuySYeqfGV7P6LVkNwIPvoC2to=; b=R6mXgyy+FQPiUCEwKgDiHsPEmycCG8GMJoXxbzp/46eDSmMUkuet732PEMB/rgDFil +NOj5eTPgs8n3z5jXCJaCv8exExylt4tmI6QcfGeh0zASinimARZdw8kzCySxc+DUxne quVxPEFezU65HzxiTYXmrvQFd/uvK6FqDrli2qt+OstNj7wqBMG2Z6Qs/Ha8epV/0yw/ T64UBqjTUV5rvCepvy0Wax+76z0Jeot42GH8WIdo6Y7anAB5I02fwTYXJVfGeZEbtB9v Nfsxrwn7f05ENmMSi9t2r2S73W4oosyE9jhnrMk1n3oYwsLSWqt7vzPhCeG5L33UTIq0 sNdw== Original-Received: by 10.52.37.102 with SMTP id x6mr5953156vdj.72.1333508985892; Tue, 03 Apr 2012 20:09:45 -0700 (PDT) Original-Received: by 10.52.158.138 with HTTP; Tue, 3 Apr 2012 20:09:45 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.220.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14210 Archived-At: Thanks for reply! The answer is definitely yes! And I'll find a proper web hosting and build a simple site for it soon if someone is looking for more details or documents. I saw Geiser is put onto www.nongnu.org. Is it a proper place to build Ragnarok's site? I'm not sure about what the word "non-gnu" means. On Wed, Apr 4, 2012 at 10:42 AM, Noah Lavine wrot= e: > Oh, a quick followup - could we post a link to this on the Guile web > page? I don't know who is maintaining that now, but it claims to have > a list of projects using Guile, and I think a multi-protocol server is > certainly interesting enough to go there. > > Noah > > On Tue, Apr 3, 2012 at 10:41 PM, Noah Lavine wr= ote: >> That looks excellent! Thanks for posting it. >> >> On Mon, Apr 2, 2012 at 12:23 PM, Nala Ginrut wrot= e: >>> hi falks! >>> Many guys believe Guile-2.0 is powerful, me too. But we need more and m= ore >>> guile projects to prove that. >>> Here's a toy of my coding game. A generic server named "Ragnarok". The >>> keyword "generic" implied it's not only a http-server, but easy >>> to add new protocols without considering the common features for a serv= er >>> such as config/logger/concurrent... >>> If you checkout its code, you may find that it may didn't use web API y= ou >>> thought in Guile lib, and it's bother to implement epoll though Andy is >>> making effort to writing nio/ethread now. Well, the reason is simple, >>> because that API/epoll did exist or not stable at the time I wrote Ragn= arok. >>> I think it's easy to port it to our future nio/ethread for a higher >>> concurrency. >>> It's here:=C2=A0git://gitorious.org/glow/ragnarok.git >>> I'll make a main page for it if I find a proper web hosting. >>> >>> Features: >>> * GPLv3 (of course) >>> * Object oriented >>> =C2=A0(yes, I'm the=C2=A0minority in Guile community who try to program= with GOOPS, >>> though FP features may cancel out most of OO features) >>> * =C2=A0HTTP/1.1 >>> * =C2=A0Multi-protocols >>> * =C2=A0Multi-languages >>> =C2=A0(Guile is actually a dynamic compiler collection against the GCC = who's the >>> static one according to Andy's free speech. So multi-language >>> must be the most=C2=A0fascinating=C2=A0feature.) >>> * =C2=A0Guile/Scheme Template >>> * =C2=A0Configurable >>> * =C2=A0MIME >>> * =C2=A0Unified epoll/select/kqueue interface >>> * =C2=A0Logger >>> * =C2=A0Standard CGI >>> * =C2=A0Static page and binary downloading service (of course) >>> >>> These days I'm on my vacation and gave a free speech to Chengdu Linux U= ser >>> Group for a topic about Guile. Many guys are interested in >>> using Scheme for web framework. But they thought it's very clumsy to wr= ite >>> Scheme in web development, they love PHP more. >>> For such a misunderstanding, I showed them one of the features in Ragna= rok, >>> the Guile template: >>> ---------------------------------cut---------------------------------- >>> >>> <% (if (=3D 1 1) (begin %> >>>

asdf: <%=3D (+ 1 1) %>

>>> <% )) %> >>> >>> <% (let ((test-me (expt 3 8))) %> >>>

<%=3D test-me %>

>>> <% ) %> >>> >>> ----------------------------------end------------------------------- >>> >>> If you get this dynamic page from Ragnarok server, the result will be: >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> >>>

asdf: 2

>>>

6561

>>> >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> Or open it from any web-browser you like. >>> >>> Well, it's an interesting feature and easy to implement for most guys i= n >>> Lisp world. >>> The point is, I'm telling them the template is not a big deal for Guile= . We >>> have it. >>> >>> After the free talking, an audience ask me: why not release it? >>> I must confess it's just a toy of my coding game. I didn't know if peop= le >>> will be interested in it. >>> And many guys here know much than me, so I'm=C2=A0hesitating. >>> But the sentence on Geiser[1] site struck me: "No hacker is an island".= Then >>> I believe I must share it to the world and get more help. >>> Anyway, it's buggy but it really works! >>> If you're in trouble with running it directly, you may try to use it's >>> class for debugging or working with it: >>> --------------------------------------------cut------------------------= ----------- >>> (use-modules (ragnarok server)) >>> (server:run (make #:name "first-http")) >>> --------------------------------------------end------------------------= ---------- >>> Then you get a http server listen in 8080 in default. >>> Happy hacking! >>> >>> >>> [1]=C2=A0http://www.nongnu.org/geiser/ >>>