From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Panicz Maciej Godek Newsgroups: gmane.lisp.guile.user Subject: Re: SLAYER announcement and help request for preparing a GNU package Date: Wed, 8 May 2013 00:00:22 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b5d3bd4a59b9f04dc27f1e0 X-Trace: ger.gmane.org 1367964036 12954 80.91.229.3 (7 May 2013 22:00:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 May 2013 22:00:36 +0000 (UTC) Cc: "guile-user@gnu.org" To: Javier Sancho Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed May 08 00:00:36 2013 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 1UZpw4-0002zl-4E for guile-user@m.gmane.org; Wed, 08 May 2013 00:00:36 +0200 Original-Received: from localhost ([::1]:60890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZpw3-0003Ok-Mr for guile-user@m.gmane.org; Tue, 07 May 2013 18:00:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZpvu-0003NK-2H for guile-user@gnu.org; Tue, 07 May 2013 18:00:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZpvs-000458-1X for guile-user@gnu.org; Tue, 07 May 2013 18:00:26 -0400 Original-Received: from mail-ve0-x234.google.com ([2607:f8b0:400c:c01::234]:50865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZpvr-000454-Sf for guile-user@gnu.org; Tue, 07 May 2013 18:00:23 -0400 Original-Received: by mail-ve0-f180.google.com with SMTP id pa12so1127578veb.39 for ; Tue, 07 May 2013 15:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=G4CRUurfuEvWLjPZsokngitnIsplOQ6h7d9y5hAB51k=; b=fGgL08NsW9zNQJcyqhYNmeQ8U7yBxnEuDyX1xduhmA+a6227MmOFbQ9BIEUeexmmag EGiZrzXG1N/SdetVVj9Om0S6n8N0uNyOZrWzWKFNcsF9FWZIUOEUZTNiUfnVcEUa36/L kzBJ+ctlXYSQnvbDx4DNkq8Dkao53tD+hS8d7t5Up3PuGKkmOJkrN18llr6yDzH2qoVv qSNYA7h9hOYRg/eUycxmVQl1rhmlHYWAn56AG61/twd4koxdBWaz2Gre1EJWzyvIxLWx mnKHENt1OFTPP5GdjB61eSB5IADJ1hNEXcESZRsSHYTn4sBNNg5qL8j3uDrGirUONzBl 9Vlw== X-Received: by 10.220.186.137 with SMTP id cs9mr2638048vcb.6.1367964022838; Tue, 07 May 2013 15:00:22 -0700 (PDT) Original-Received: by 10.220.141.10 with HTTP; Tue, 7 May 2013 15:00:22 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c01::234 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 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-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10335 Archived-At: --047d7b5d3bd4a59b9f04dc27f1e0 Content-Type: text/plain; charset=ISO-8859-1 2013/5/7 Javier Sancho > Panicz Maciej Godek wrote: > > I even managed to build it, but for some reasons the demos won't run. I > get > > the following error: > > gacela/video.scm:175:2: In procedure init-gl: > > gacela/video.scm:175:2: In procedure module-lookup: Unbound variable: > > set-gl-hint > > The reason is, oh my god, you are the first who test my code. > :) I guess that's how it begins. I'm trying to build a portable package for slayer, and I must say that in a way it's much more difficult than programming (which is actually a great pleasure) -- there's a lot of reading and figuring out how to 'get it right' When I started this project, I made demos and some documentation, but > I stopped maintaining them because nobody was interested. Makefiles > compile OpenGL and SDL bindings, but now I use Figl and compilation is > not needed. The error with set-gl-hint comes because I have a figl > version with some improvements. I've sent patches to figl maintainers. > I've applied all three patches, and I got a new error: gacela/games/guybrush$ ./guybrush.scm [xcb] Unknown request in queue while dequeuing [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. guile: ../../src/xcb_io.c:178: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed. Abort (core dumped) gacela/games/tetris$ ./tetris.scm XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0" after 129 requests (128 known processed) with 18 events remaining. Currently, Gacela is in a very unstable state. Demos, for example, use > an old version with a more OOP style, because when I wrote them I was > beginning to understand Lisp and functional programming. But actually > I'm reestructuring all the code looking for a more elegant, beatiful, > functional style. > > I don't think those two paradigms rule each other out. I believe that games and user interfaces are the cases where OOP feels at home, but it seems a good practice to avoid mutable variables wherever they're unnecessary. I think John Carmack is quite just in this regard: http://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/ > > If it comes to code, I see that you have a more polling-style approach > for > > processing input. My desire is to get a system that never stops being > > reconfigurable -- to truly separate the user interface from program > logics. > > I don't know if it's achievable, but I have a feeling that such > direction is > > worth exploring > > Yes, your style is more callback style. I personally prefer polling > because then I can read the code sequentially. But it's a personal > consideration. > > > All these concepts sound very interesting, but I'm curious whether they > are > > reflected the code somewhere. > > For the moment, no. But I have a lot of papers :-) > I'm curious where will it go :) regards --047d7b5d3bd4a59b9f04dc27f1e0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
2013/5/7 Javier Sancho <jsf@jsancho.org>
<= div class=3D"gmail_extra">
Panicz Maciej Godek wrote:
> I even managed to build it, but for some reasons the demos won't r= un. I get
> the following error:
> gacela/video.scm:175:2: In procedure init-gl:
> gacela/video.scm:175:2: In procedure module-lookup: Unbound variable:<= br> > set-gl-hint

The reason is, oh my god, you are the first who test my code.

:) I guess that's how it begins.
I'm trying to build a portable package for slayer, and I m= ust say that in a way it's much more difficult than programming (which = is actually a great pleasure) -- there's a lot of reading and figuring = out how to 'get it right'

When I started this project, I made demos and some documentation, but
I stopped maintaining them because nobody was interested. Makefiles
compile OpenGL and SDL bindings, but now I use Figl and compilation is
not needed. The error with set-gl-hint comes because I have a figl
version with some improvements. I've sent patches to figl maintainers.<= br>
=A0
I've applied all three patches= , and I got a new error:
gacela/games/guybrush$ ./guyb= rush.scm=A0
[xcb] Unknown request in queue while dequeuing
[xcb] Most li= kely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
guile: ../../src/xcb_i= o.c:178: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq&#= 39; failed.
Abort (core dumped)

gacela/games/tetris$= ./tetris.scm=A0
XIO: =A0fatal IO error 11 (Resource temporarily = unavailable) on X server ":0.0"
=A0 =A0 =A0 after 129 r= equests (128 known processed) with 18 events remaining.

Currently, Gacela is in a very unstable state. Demos, for example, use
an old version with a more OOP style, because when I wrote them I was
beginning to understand Lisp and functional programming. But actually
I'm reestructuring all the code looking for a more elegant, beatiful, functional style.


I don= 9;t think those two paradigms rule each other out. I believe that games and= user interfaces are the cases where OOP feels at home, but it seems a good= practice to avoid mutable variables wherever they're unnecessary. I th= ink John Carmack is quite just in this regard:=A0http://www.altdevbl= ogaday.com/2012/04/26/functional-programming-in-c/
=A0
> If it comes to code, I see that you have a more polling-style approach= for
> processing input. My desire is to get a system that never stops being<= br> > reconfigurable -- to truly separate the user interface from program lo= gics.
> I don't know if it's achievable, but I have a feeling that suc= h direction is
> worth exploring

Yes, your style is more callback style. I personally prefer polling because then I can read the code sequentially. But it's a personal
consideration.

> All these concepts sound very interesting, but I'm curious whether= they are
> reflected the code somewhere.

For the moment, no. But I have a lot of papers :-)

I'm curious where will it go :)

regards
--047d7b5d3bd4a59b9f04dc27f1e0--