unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Guile XCB
@ 2013-06-18  3:25 mark
  2013-06-18 12:50 ` Ludovic Courtès
  2013-06-18 15:43 ` Stefan Israelsson Tampe
  0 siblings, 2 replies; 5+ messages in thread
From: mark @ 2013-06-18  3:25 UTC (permalink / raw)
  To: guile-user


Hi everyone,

I'm pleased to announce that Guile XCB is, at last, a real thing! I had
to take a couple months off of working on it, but finally had time
recently to go back and get it in pretty good shape.

You can find it at https://github.com/mwitmer/guile-xcb.

In the end I was able to write the whole thing without any C, so maybe
this is a good candidate to include in the Guildhall. I've written a few
simple programs in it but haven't really pushed it too hard. Sometime in
the near-ish future I'd like to write some kind of window manager using
it and I'm sure there will be many bugs found and squashed in the
process!

I also had an interesting time coming up with the necessary autotools
magic to properly compile xml files to go files using the compiler I
wrote and then install them. I'm still not sure if I'm doing it the
right way -- adding new languages is really neat feature of Guile that's
still a little tricky to automate.

Here's the README:

1 Overview
==========

  Guile XCB is an X11 client library written entirely in Guile
  Scheme. It makes use of the Guile compiler and virtual machine to turn
  XML descriptions of the X protocol provided by the XCB project into
  Guile object code files.

  Support is included for the core X protocol and twenty-seven
  extensions. Guile XCB also includes some simple code for running
  asynchronous event loops.


2 Samples and Documentation
===========================

  Samples using Guile XCB can be found in the xcb/xml/samples
  directory. They include:

  - tinywm.scm: A Guile XCB implementation of tinywm 
  - win.scm: A simple demonstration of creating a window and receiving
     events 
  - randr.scm: A subset of the xrandr command line tool's functionality

  More detailed documentation resides in the texinfo manual included in
  this distribution.


3 Installation and Prerequisites
================================

  You can use the typical ./configure, make, make install chain to build
  Guile XCB.

  Guile XCB requires the latest release of Guile (2.0.9).


4 Project Status and Caveats
============================

  - The full XCB stack is implemented; however, many of the extensions
    haven't been extensively tested.

  - Extensions that send large requests are probably going to be too
    slow for practical use. In a future release, void and byte lists
    should be represented as bytevectors, not regular vectors.

  - Guile XCB includes a stripped-down Scheme implementation of Xauth
    that only supports UNIX sockets for now; it doesn't pick the "best"
    authentication method available, just the first.

  - XPRINT is excluded because it's deprecated and its XML file has just
    enough special cases in it that it wasn't worth including. Some
    other deprecated extensions are included simply because there was no
    reason not to.


-- 
Mark Witmer



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Guile XCB
  2013-06-18  3:25 Guile XCB mark
@ 2013-06-18 12:50 ` Ludovic Courtès
  2013-06-18 16:49   ` mark.d.witmer
  2013-06-18 15:43 ` Stefan Israelsson Tampe
  1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2013-06-18 12:50 UTC (permalink / raw)
  To: guile-user

Hello,

mark@markwitmer.com skribis:

> I'm pleased to announce that Guile XCB is, at last, a real thing! I had
> to take a couple months off of working on it, but finally had time
> recently to go back and get it in pretty good shape.
>
> You can find it at https://github.com/mwitmer/guile-xcb.

Excellent!

It seems there’s no tag on the repo.  What about tagging this version,
and perhaps posting a tarball as produced by ‘make dist’?

> I also had an interesting time coming up with the necessary autotools
> magic

It seems that the Makefile.am lacks the magic trick to make sure that
the installed .go files are more recent than the installed .scm files
(to avoid triggering auto-compilation):

  http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html

>   Guile XCB requires the latest release of Guile (2.0.9).

Out of curiosity, what 2.0.9-specific thing does it rely on?

Happy hacking!

Ludo’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Guile XCB
  2013-06-18  3:25 Guile XCB mark
  2013-06-18 12:50 ` Ludovic Courtès
@ 2013-06-18 15:43 ` Stefan Israelsson Tampe
  2013-06-18 16:54   ` mark.d.witmer
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Israelsson Tampe @ 2013-06-18 15:43 UTC (permalink / raw)
  To: mark; +Cc: guile-user

[-- Attachment #1: Type: text/plain, Size: 3655 bytes --]

Hi Mark!

Nice tool!

A bit off topic but maybe something that is perhaps useful in this project,
is there any scheme framework
centered around the scheme xsd specification to validate and translate
data.

If not, I could help. I'm wanting to learn that technology
and could in the mean time code something useful for
all to enjoy

If I would do that I would combine the guile module system and
xml namespaces an look at code that executes to a sxml-similar
representation.

Transfoming xml and parsing xml would mean that one uses syntax-parse,
syntax-rules
etc..

WDYT

/Stefan



On Tue, Jun 18, 2013 at 5:25 AM, <mark@markwitmer.com> wrote:

>
> Hi everyone,
>
> I'm pleased to announce that Guile XCB is, at last, a real thing! I had
> to take a couple months off of working on it, but finally had time
> recently to go back and get it in pretty good shape.
>
> You can find it at https://github.com/mwitmer/guile-xcb.
>
> In the end I was able to write the whole thing without any C, so maybe
> this is a good candidate to include in the Guildhall. I've written a few
> simple programs in it but haven't really pushed it too hard. Sometime in
> the near-ish future I'd like to write some kind of window manager using
> it and I'm sure there will be many bugs found and squashed in the
> process!
>
> I also had an interesting time coming up with the necessary autotools
> magic to properly compile xml files to go files using the compiler I
> wrote and then install them. I'm still not sure if I'm doing it the
> right way -- adding new languages is really neat feature of Guile that's
> still a little tricky to automate.
>
> Here's the README:
>
> 1 Overview
> ==========
>
>   Guile XCB is an X11 client library written entirely in Guile
>   Scheme. It makes use of the Guile compiler and virtual machine to turn
>   XML descriptions of the X protocol provided by the XCB project into
>   Guile object code files.
>
>   Support is included for the core X protocol and twenty-seven
>   extensions. Guile XCB also includes some simple code for running
>   asynchronous event loops.
>
>
> 2 Samples and Documentation
> ===========================
>
>   Samples using Guile XCB can be found in the xcb/xml/samples
>   directory. They include:
>
>   - tinywm.scm: A Guile XCB implementation of tinywm
>   - win.scm: A simple demonstration of creating a window and receiving
>      events
>   - randr.scm: A subset of the xrandr command line tool's functionality
>
>   More detailed documentation resides in the texinfo manual included in
>   this distribution.
>
>
> 3 Installation and Prerequisites
> ================================
>
>   You can use the typical ./configure, make, make install chain to build
>   Guile XCB.
>
>   Guile XCB requires the latest release of Guile (2.0.9).
>
>
> 4 Project Status and Caveats
> ============================
>
>   - The full XCB stack is implemented; however, many of the extensions
>     haven't been extensively tested.
>
>   - Extensions that send large requests are probably going to be too
>     slow for practical use. In a future release, void and byte lists
>     should be represented as bytevectors, not regular vectors.
>
>   - Guile XCB includes a stripped-down Scheme implementation of Xauth
>     that only supports UNIX sockets for now; it doesn't pick the "best"
>     authentication method available, just the first.
>
>   - XPRINT is excluded because it's deprecated and its XML file has just
>     enough special cases in it that it wasn't worth including. Some
>     other deprecated extensions are included simply because there was no
>     reason not to.
>
>
> --
> Mark Witmer
>
>

[-- Attachment #2: Type: text/html, Size: 4749 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Guile XCB
  2013-06-18 12:50 ` Ludovic Courtès
@ 2013-06-18 16:49   ` mark.d.witmer
  0 siblings, 0 replies; 5+ messages in thread
From: mark.d.witmer @ 2013-06-18 16:49 UTC (permalink / raw)
  Cc: guile-user

The following message is a courtesy copy of an article
that has been posted to gmane.lisp.guile.user as well.

ludo@gnu.org (Ludovic Courtès) writes:

> Hello,
>
> mark@markwitmer.com skribis:
>
>> I'm pleased to announce that Guile XCB is, at last, a real thing! I had
>> to take a couple months off of working on it, but finally had time
>> recently to go back and get it in pretty good shape.
>>
>> You can find it at https://github.com/mwitmer/guile-xcb.
>
> Excellent!
>
> It seems there’s no tag on the repo.  What about tagging this version,
> and perhaps posting a tarball as produced by ‘make dist’?

Done. The url is http://www.markwitmer.com/dist/guile-xcb-0.1.tar.gz

>>   Guile XCB requires the latest release of Guile (2.0.9).
>
> Out of curiosity, what 2.0.9-specific thing does it rely on?
>

It uses the keyword argument #:trim-whitespace in xml->sxml, which was
added back in Februrary if I'm not mistaken.

>
>

-- 
Mark Witmer



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Guile XCB
  2013-06-18 15:43 ` Stefan Israelsson Tampe
@ 2013-06-18 16:54   ` mark.d.witmer
  0 siblings, 0 replies; 5+ messages in thread
From: mark.d.witmer @ 2013-06-18 16:54 UTC (permalink / raw)
  Cc: guile-user

The following message is a courtesy copy of an article
that has been posted to gmane.lisp.guile.user as well.

Stefan Israelsson Tampe <stefan.itampe@gmail.com> writes:

> Hi Mark!
>
> Nice tool!
>
> A bit off topic but maybe something that is perhaps useful in this
> project, is there any scheme framework 
> centered around the scheme xsd specification to validate and translate
> data.
>
> If not, I could help. I'm wanting to learn that technology 
> and could in the mean time code something useful for 
> all to enjoy
>
> If I would do that I would combine the guile module system and
> xml namespaces an look at code that executes to a sxml-similar
> representation.
>
> Transfoming xml and parsing xml would mean that one uses syntax-parse,
> syntax-rules
> etc.. 
>
> WDYT
>
> /Stefan
>

That's a cool idea. sxml-match provides a pattern-matching library for
xml with a way of binding variables to values extracted from the
sxml. Unlike xsd, however, it's missing a convenient way to constrain
the number of a particular child-element in some node (beyond specifying
0, 1, or many), and a way to check the type of data stored inside a
node. I had to write a few functions to do that stuff. I could see an
augmented version of sxml-match being useful as Scheme-friendly xsd
alternative.

-- 
Mark Witmer



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-18 16:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18  3:25 Guile XCB mark
2013-06-18 12:50 ` Ludovic Courtès
2013-06-18 16:49   ` mark.d.witmer
2013-06-18 15:43 ` Stefan Israelsson Tampe
2013-06-18 16:54   ` mark.d.witmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).