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

2013-08-26 Thread Karsten Gebbert
Thanks for your answer Kristian!

I tried a patch I got from Mortiz, compiled against the zeromq package in
the ArchLinux tree (3.2 I believe) and saw the same problems as well, but
I'll give this branch a spin later today and will create a sample program
to reproduce the error.

Cheers,

k


On Mon, Aug 26, 2013 at 12:52 AM, Kristian Lein-Mathisen 
kristianl...@gmail.com wrote:


 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


Re: [Chicken-users] ANN: eping

2013-08-26 Thread Michele La Monaca
On Sat, Aug 24, 2013 at 11:28 AM, Jörg F. Wittenberger
joerg.wittenber...@softeyes.net wrote:
 On Aug 22 2013, Michele La Monaca wrote:

 How can I check if a symbol is bound to a value?


 Oleg Kiselyov's receipe might be helpful here:
 http://okmij.org/ftp/Scheme/macro-symbol-p.txt

Intriguing reading material, thanks. But isn't my proposed approach a
much simpler solution?

(define-syntax symbol??
  (syntax-rules ()
((_ x) (if (symbol? 'x) #t #f

It passes all Kiselyov's  tests.

Michele

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