Re: [Chicken-users] Lowdown sxml-serializer not working together

2013-08-25 Thread Jim Ursetto
On Aug 24, 2013, at 5:25 PM, Jim Ursetto zbignie...@gmail.com wrote:

 Unfortunately it doesn't declare the default namespace for html.  You can 
 work around this by providing a default namespace prefix *and* using the 
 actual prefix (below, xhtml:) on your elements.  This is kind of ugly.  
 However, the stock serializer didn't even support default namespaces (!) so I 
 may have simply overlooked this case when adding support.  I'll see if I can 
 look into it further.

I've added support for the default (unqualified) namespace ID in the source 
SXML now; the code is available at https://github.com/ursetto/sxml-serializer 
while I run a couple more tests.  Formerly, you could render to unqualified 
names but not use them properly in the source.

[Note: below, unqualified names are rendering to the xhtml: namespace, because 
there is a list of default namespace URI - ID mappings, called 
conventional-ns-prefixes.  To override this and render them without 
qualification, add *default* as the 3rd arg of the namespace association (as 
the original prefix).  The word original is used as if the XML document was 
the original source and you had parsed it to SXML; the SXML prefix and XML 
prefix are permitted to differ.]


(use sxml-serializer)

(print
 (serialize-sxml
 '(*TOP*
   (@ (*NAMESPACES*
   (*default* http://www.w3.org/1999/xhtml;)
   (cvt http://xmlns.therebetygers.net/civet/0.1;)))
   (*PI* xml version=\1.0\ encoding=\utf-8\)
(html
 (@ (xml:lang en) (lang en))
 (cvt:template
  (cvt:head
   (cvt:locale (@ (lang en) (country US) (encoding utf-8
(cvt:block (@ (name headerContent))
 #\ Single #\space (#\a #\r #\t #\i #\c #\l #\e)
 #\space page
  ))

?xml version=1.0 encoding=utf-8?
xhtml:html xmlns:xhtml=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
  cvt:template xmlns:cvt=http://xmlns.therebetygers.net/civet/0.1;
cvt:head
  cvt:locale lang=en country=US encoding=utf-8 /
/cvt:head
cvt:block name=headerContentlt;Single article pagegt;/cvt:block
  /cvt:template
/xhtml:html


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] (seemingly) random disconnects of zmq sockets

2013-08-25 Thread Kristian Lein-Mathisen
Hi Karsten,

It's a little hard to figure out why that socket all of a sudden just dies.
Perhaps you could make a smaller example where this bug is reproducable?

There is a branch where we're trying to update the bindings to work against
zmq version 3.2:
https://bitbucket.org/DerGuteMoritz/zmq/commits/branch/3.2

In this version, the glue-code has been simplified quite a lot and perhaps
that solves your problem. You could try against this zmq egg-version and
let us know if that helps!

K.


On Mon, Aug 19, 2013 at 10:20 PM, Karsten Gebbert karsten.gebb...@gmail.com
 wrote:

  Hi List,

 I'm having a strange problem with the zmq egg with the following program:

 http://paste.call-cc.org/paste?id=1c0c94e23600b68e8100d6c5913f58368c01f02c

 Basically, I have two sockets, one 'push for sending to a node.js process
 (with the zmq module compiled against 2.1 series, too) and one 'pull for
 getting data from the same node.js process. After a while of fiddling
 around, the CHICKEN process quits with this error:

 *Warning (#thread: thread4): in thread: (receive-message) Socket
 operation on non-socket: 88**
 **
 **Call history:**
 **
 **seq-ipc.scm:31: loop  **
 **seq-ipc.scm:29: with-input-from-string**
 **seq-ipc.scm:30: update-track  **
 **seq-ipc.scm:19: alist-ref **
 **seq-ipc.scm:20: alist-ref **
 **seq-ipc.scm:21: alist-ref **
 **seq-ipc.scm:21: alist-update! **
 **seq-ipc.scm:31: zmq#receive-message*--**
 **
 **Error: (send-message) Socket operation on non-socket: 88**
 **
 **Call history:**
 **
 **main.scm:32: modulo   **
 **main.scm:39: g224 **
 **main.scm:40: alist-ref**
 **main.scm:41: alist-ref**
 **main.scm:41: alist-ref **
 ****
 **main.scm:53: thread-sleep!**
 **main.scm:54: midi#bar-in-ms   **
 **main.scm:56: main-loop**
 **main.scm:32: midi#sixteenth-by-bpm**
 **main.scm:32: modulo   **
 **main.scm:34: midi#bar-in-ms   **
 **main.scm:36: number-string   **
 **main.scm:36: zmq#send-message   --**
 **
 *

 It seems as though the sockets have been disconnected as *errno* is 88,
 which grep tells me is defined as such:

 /usr/include/asm-generic/errno.h:61:#define ENOTSOCK88  /*
 Socket operation on non-socket */

 I wonder what could cause the sockets to magically close on me. Anyone an
 idea? I'd really appreciate any hints how to debug this best, it does seem
 a little intractable :/

 Cheers,

 Karstn

 ___
 Chicken-users mailing list
 Chicken-users@nongnu.org
 https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users