From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: [Code for fun] Announce my generic server Ragnarok Date: Tue, 3 Apr 2012 22:42:37 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1333507371 24863 80.91.229.3 (4 Apr 2012 02:42:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Apr 2012 02:42:51 +0000 (UTC) Cc: guile-devel To: Nala Ginrut Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Apr 04 04:42:50 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 1SFGBK-0003em-8i for guile-devel@m.gmane.org; Wed, 04 Apr 2012 04:42:46 +0200 Original-Received: from localhost ([::1]:54076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFGBJ-0003R6-J1 for guile-devel@m.gmane.org; Tue, 03 Apr 2012 22:42:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFGBG-0003R0-89 for guile-devel@gnu.org; Tue, 03 Apr 2012 22:42:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SFGBD-0000uy-Vc for guile-devel@gnu.org; Tue, 03 Apr 2012 22:42:41 -0400 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:57700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SFGBD-0000uj-Mp for guile-devel@gnu.org; Tue, 03 Apr 2012 22:42:39 -0400 Original-Received: by iajr24 with SMTP id r24so599942iaj.0 for ; Tue, 03 Apr 2012 19:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=s6XBd/Yqxuu6A3ovRtIHwRpc8by5m4fSAiDP1hyCr9Y=; b=kqjc8cAsuC99LvgUeLKk9ClSXOQQ4oDB6GwN3jZVQUVbGM264ospdcmU9WHp30mqYY 9NA9N2Cr7QYkjknC8UMbCl/Dc1Oh32rtQfUSOKW5agOvwiS/qT9KufOG7SyOd2pRU3UP bbKShSq+0u+nj4n+lQVZvBhInHZRfjLvmhdkz/1pPyct4yFrfpcf3fs7c6j2Iilc7z72 asSIn6uzDjz5D3vQEqKTfQPVvz8SwcqbAa/kJirO+nFpqS8CDJzxk+dKR1ENkgHpaUMJ CtVZOcab2mo9/U4oExH3hLC7CD0BkOkJ6PPzIihB1PPCgCHOqR2WhY6ni5imQzasikKd E8rw== Original-Received: by 10.50.222.162 with SMTP id qn2mr221420igc.65.1333507358007; Tue, 03 Apr 2012 19:42:38 -0700 (PDT) Original-Received: by 10.42.29.200 with HTTP; Tue, 3 Apr 2012 19:42:37 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: YH83PnI_6Hb0cmInZaHe72ihfTE X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.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:14209 Archived-At: 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 wrot= e: > That looks excellent! Thanks for posting it. > > On Mon, Apr 2, 2012 at 12:23 PM, Nala Ginrut wrote= : >> hi falks! >> Many guys believe Guile-2.0 is powerful, me too. But we need more and mo= re >> 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 serve= r >> such as config/logger/concurrent... >> If you checkout its code, you may find that it may didn't use web API yo= u >> 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 Ragna= rok. >> I think it's easy to port it to our future nio/ethread for a higher >> concurrency. >> It's here:=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 >> =A0(yes, I'm the=A0minority in Guile community who try to program with G= OOPS, >> though FP features may cancel out most of OO features) >> * =A0HTTP/1.1 >> * =A0Multi-protocols >> * =A0Multi-languages >> =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=A0fascinating=A0feature.) >> * =A0Guile/Scheme Template >> * =A0Configurable >> * =A0MIME >> * =A0Unified epoll/select/kqueue interface >> * =A0Logger >> * =A0Standard CGI >> * =A0Static page and binary downloading service (of course) >> >> These days I'm on my vacation and gave a free speech to Chengdu Linux Us= er >> Group for a topic about Guile. Many guys are interested in >> using Scheme for web framework. But they thought it's very clumsy to wri= te >> Scheme in web development, they love PHP more. >> For such a misunderstanding, I showed them one of the features in Ragnar= ok, >> 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 in >> 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 peopl= e >> will be interested in it. >> And many guys here know much than me, so I'm=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]=A0http://www.nongnu.org/geiser/ >>