Re: [Chicken-users] (seemingly) random disconnects of zmq sockets
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
[Chicken-users] (seemingly) random disconnects of zmq sockets
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] Medea Egg: nested lists/pairs
Hi, I'm using the medea egg, installed via chicken-install, and I'm encountering a problem unparsing lists that contain pairs with more list/pairs. To my understanding of the source code, write-json should just call itself on the cdr of the pair, but I get an error: #;2 #;2 (write-json '((one . 1) (two . '((three . 3) (four . 4) Error: (car) bad argument type: quote Call history: syntax (write-json (quote ((one . 1) (two quote ((three . 3) (four . 4)) syntax (quote ((one . 1) (two quote ((three . 3) (four . 4) syntax (##core#quote ((one . 1) (two quote ((three . 3) (four . 4) eval (write-json (quote ((one . 1) (two quote ((three . 3) (four . 4)) Do I need to provide my own unparser in order to be able to create nested objects or is there a different approach I have overlooked? Best, Karsten ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Medea Egg: nested lists/pairs
On 03/26/2013 02:47 PM, Moritz Heidkamp wrote: Hi Karsten, Karsten Gebbert karsten.gebb...@gmail.com writes: #;2 (write-json '((one . 1) (two . '((three . 3) (four . 4) the problem here is the inner quote. Your expression is read as: (quote ((one . 1) (two . (quote ((three . 3) (four . 4)) Which evaluates to ((one . 1) (two . (quote ((three . 3) (four . 4) As you can see, that is not what you intended. The inner quote gets quoted, too. So just leave it off and it should work as expected! Moritz blushI *could* have gotten this/blush Thanks Moritz! ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Parsing EMail
Hi List, I'm relatively new to chicken and this list, so bear with me :) My aim is to parse EMails (for using with procmail, for instance) but I'm a little stuck/confused by my options. I've been playing with hato-mime.scm (hg cloned from google source project), and I also looked at internet-message, but without trying to sound like I'm complaining, the docs are somewhat meager for the beginner that I definitely am :) So my question is: could somebody point me to some example code for either one or the other library that can get me started? I basicall would like to be able to parse message into they parts (different bodies for content-types, attachments..) and play with them in chicken. Thanks in advance! Karsten ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Parsing EMail
On 03/25/2013 11:55 AM, Andy Bennett wrote: Hi. I'm relatively new to chicken and this list, so bear with me :) My aim is to parse EMails (for using with procmail, for instance) but I'm a little stuck/confused by my options. I've been playing with hato-mime.scm (hg cloned from google source project), and I also looked at internet-message, but without trying to sound like I'm complaining, the docs are somewhat meager for the beginner that I definitely am :) Hato is definitely the suite you want if you need to dip into the MIME sections, but the docs are somewhat sparse. Cool, thanks, thats quite helpful! Which version did you clone? http://code.google.com/r/datenhobel-hato-egg-update/ that one :) ...has some updates which allow it to compile for later Chickens but not all the modules are included. A few weeks back I got some help with getting this install by some friendly schemers on the IRC :) So my question is: could somebody point me to some example code for either one or the other library that can get me started? I basicall would like to be able to parse message into they parts (different bodies for content-types, attachments..) and play with them in chicken. I've not used Hato before but I've taken a quick look at http://code.google.com/r/datenhobel-hato-egg-update/source/browse/hato-mime.scm ...and it strikes me that calling (mime-message-sxml) and passing it a message on the current-input-port should get you a data structure that you can explore. Ah I overlooked this, thank you. It seems It does indeed just do what I need :) Alternatively, there is this example in the source: http://code.google.com/r/datenhobel-hato-egg-update/source/browse/examples/user.filter I don't understand though: is the parsing explicitly invoked, or are these rules matched against an already parsed message? Thanks for your swift reply! k Regards, @ndy ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users