Friday October 14, 2011

[Time] NameMessage
[00:00] CIA-79 pyzmq: 03MinRK 07 * r0efdbe3 10/ zmq/eventloop/ : upstream tornado fix for PeriodicCallback ...
[00:44] mikko hmm, any windows users about?
[00:49] jhawk28 <-
[00:49] jhawk28 mikko: whatcha need?
[00:52] mikko
[00:52] mikko can you see if those windows snapshots are ok
[00:52] mikko it should contain dll for 32 and 64 bit
[00:52] mikko first build using visual studio express 2010
[00:52] mikko was a bit of a pain to get 64bit working
[00:52] jhawk28 hehe
[00:53] jhawk28 64bit under VS 2008 isnt too bad
[00:53] mikko express or pro?
[00:53] jhawk28 pro
[00:53] mikko i couldn't get express working
[00:53] mikko under 2008
[00:54] mikko works out of the box in pro
[00:54] jhawk28 yes
[00:54] mikko but express 2010 with SDK 7.1 seems to work reasonably well
[00:55] jhawk28 what VC++ dist did it use?
[00:55] mikko 2010
[00:55] jhawk28 need to be specific
[00:55] mikko sec
[00:56] jhawk28 VC++ 2008 has 3 different ones, the first one, SP1, and SP1 ATL
[00:57] jhawk28 2010 has 2
[00:57] mikko 10.0.30319
[00:57] mikko it seems
[00:59] jhawk28 not sure if that is VC++ 2010 or VC++ 2010 SP1
[01:00] jhawk28
[01:00] jhawk28 or
[01:01] mikko does one need to have specific runtime?
[01:01] jhawk28 yes
[01:01] mikko non SP1 ones wont run with SP1 runtime?
[01:01] jhawk28 I don't think so
[01:02] mikko that sounds a bit messy
[01:02] jhawk28 it wasn't for me when I was doing the 2008 (but that was a long time ago)
[01:02] mikko if service pack breaks backwards compatibility
[01:02] jhawk28 yes, its a pain
[01:02] jhawk28 they just install both....
[01:02] mikko i wish i had a clean windows machine to test this out
[01:02] mikko but this local vm is a mess
[01:03] jhawk28 mine isn't clean so it wont do much good
[01:03] jhawk28 but, you can detemine which one is correct by looking at your about page
[01:03] jhawk28 in VS 2010
[01:04] mikko
[01:05] jhawk28 my guess is SP1
[01:05] mikko it just says Microsoft Visual C++ 2010
[01:06] jhawk28 yes, but its after SP1 was released
[01:06] mikko yes
[01:06] mikko downloaded today
[01:13] mikko i gotta get to bed
[01:13] mikko good night
[04:49] CIA-79 pyzmq: 03MinRK 07 * rd350ca4 10/ (57 files in 6 dirs): update docs to 2.1.10 -
[05:01] aroman1 anyone using zmq with Twisted/a Python event loop?
[13:33] CIA-79 libzmq: 03Martin Lucina 07 * r8045901 10/ (8 files in 3 dirs): Added dns:// resolver ...
[13:33] CIA-79 libzmq: 03Martin Lucina 07 * r5ccfbca 10/ : [temporary] Disable -pedantic -Werror ...
[13:55] CIA-79 libzmq: 03Martin Lucina 07 * rc17f7a0 10/ : This branch uses ABI version 3 ...
[15:30] mato cremes: Hi, are you around? We're trying to get ffi-rzmq working with 4.x (master), need some help working out how the gem build works...
[15:30] cremes mato: yep, i'm around
[15:31] cremes how far have you gotten?
[15:32] mikko mato: you are back!
[15:32] cremes btw, i've only tested the gem against 2.1x and 3.x... i haven't tried compiling 4.x yet
[15:32] cremes it didn't seem worthwhile based on the latest ML discussions...
[15:33] mato cremes: well, i tried with what "gem install" gave me
[15:33] mato cremes: but that has problems with error_check not looking for the correct return code (zmq_recv)
[15:33] cremes ok
[15:33] mato mikko: oh, i'm always here, just lurking :)
[15:33] cremes the last released gem (version 0.8.2) doesn't work with 3.x or 4.x
[15:34] mato ah, right
[15:34] mato ok
[15:34] cremes the gem needs to be built from master (as of today... i'm getting a release out today/tomorrow)
[15:34] mato i figured that
[15:34] cremes so, clone it, and run "ruby -S gem build ffi-rzmq.gemspec" to build the gem
[15:34] cremes and then install the resulting *.gem
[15:34] mato cremes: so, what do i need to do to use master directly w/o bulding the gem? can this be done?
[15:35] cremes mato: um... yes, the specs and examples will run without any gem installed
[15:35] cremes "rake spec" should be sufficient to run the specs
[15:35] mato i tried this: ruby -I../ffi-rzmq/lib ./console.rb tcp://dezo:5557
[15:35] mato which gives
[15:35] mato /home/mato/src/ffi-rzmq/lib/ffi-rzmq/context.rb:102:in `rescue in socket': uninitialized constant ZMQ::Context::SocketError (NameError) from /home/mato/src/ffi-rzmq/lib/ffi-rzmq/context.rb:100:in `socket' from ./console.rb:12:in `<main>'
[15:36] cremes ok
[15:36] cremes gist me the contents of console.rb and i'll try it here
[15:38] mato cremes:
[15:38] mato cremes: i may just be making a trivial mistake :)
[15:39] cremes mato: ah, you've been bitten by my api change in the latest version
[15:40] mikko cremes: how does one run ffi-rzmq tests?
[15:40] mikko
[15:40] cremes mato: try this:
[15:40] mikko the build doesnt do much atm
[15:41] cremes mikko: "rake spec" should be sufficient to run the specs
[15:42] cremes mato: i got rid of most of the Exceptions in the latest ffi-rzmq iteration to more closely mimic the C API
[15:42] mato cremes: the problem is elsewhere; the complaint is from line #12
[15:42] mato cremes: which is monitor_sock = ctx.socket(ZMQ::SUB)
[15:42] cremes ok, let me try running it here
[15:43] mato cremes: woudln't using exceptions be more Ruby-like?
[15:44] cremes mato: yes, but i think that's the job of a higher-level wrapper that provides idiomatic ruby (like czmq is to the c api)
[15:44] cremes plus, i really hate exceptions :)
[15:45] cremes btw, that console.rb runs okay here against 2.1.10
[15:45] mato mikko: i have a small paid project, which involves using dns for a zmq name service, and automagically interjecting monitoring components into a topology
[15:45] cremes mato: are you trying to test this against 4.x right now? if so, i'll need to build that first to see if i can dupe your error
[15:46] mato mikko: and i need a clickable console of some sort, so i thought a sinatra webapp would be the easiest way to go
[15:46] mato cremes: i have sustrik sitting next to me here and he says v3 vs v4 shouldn't matter
[15:46] mato cremes: but you're welcome to try with libzmq master if you want to be sure
[15:46] cremes i will
[15:47] mato cremes: is the ruby -Ipath/to/ffi-rzmq/lib way legit if i want to use the Git master directly w/o installing the gem?
[15:47] cremes mato: yes
[15:50] mato cremes: hang on, if i build from git it looks to me like i have no equivalent of zmq.rb
[15:50] mato cremes: is that generated?
[15:50] cremes mato: one sec, pls
[15:54] pieterh mato: hey, hi!
[15:54] cremes mato: i built & installed 4.x master and i get a bunch of errors running my specs that
[15:54] cremes i don't see against 3.x
[15:57] mato cremes: let me try building and using the gem to see if anything changes
[15:57] mikko cremes: ?
[15:57] cremes mato: btw, i pushed a small fix for that SocketError exception you were seeing
[15:57] mikko mato: so it's finally paying off
[15:57] mikko :)
[15:58] cremes mikko: ha! :)
[15:58] cremes mato: to run the specs, you need to install the rspec and bones gems
[15:58] cremes those are dev-only dependencies
[15:58] mato mikko: lol, not really, this is just a small thing...
[15:58] mato mikko: i wish ....
[16:00] mato cremes: where are those constants it's complaining about supposed to be defined? (ZMQ::Context::SocketError etc)
[16:00] cremes mato: i am fixing bugs for the 4.x lib... i'll ping you in 15m
[16:00] mikko cremes: whats this error /usr/bin/ruby1.8: No such file or directory -- rspec (LoadError) ?
[16:00] mato cremes: ok, thx!
[16:00] mato mikko: gem install rspec
[16:00] mikko mato: done
[16:00] cremes mikko: you need to "gem install rspec bones"
[16:01] mikko cremes: i did that
[16:01] mikko it doesnt complain about bones anymore
[16:01] mikko it seems to check bones at the start of the rakefile
[16:02] mikko 2 gems installed
[16:02] mikko still same result
[16:02] cremes mikko: the gem isn't really compatible with MRI 1.8.x... use MRI 1.9.2, rubinius or jruby
[16:02] mato "rake spec" works for me (MRI 1.9.2)
[16:07] mikko cremes: debian doesn't seem to have rubygems 1.9
[16:08] cremes fucking package managers...
[16:08] cremes it's only been out for 4 years now :\
[16:09] cremes i usually avoid package managers and use "rvm" ( to manage my ruby installations
[16:09] mato mikko: yeah, i'm on debian and i have ruby 1.9.2 built from source in /usr/local
[16:09] cremes it's very up-to-date
[16:10] mikko it looks like gem is bundled with ruby 1.9.1 package
[16:11] mikko cremes: now i'm in the same situation with ruby1.9.1
[16:11] mikko
[16:14] cremes mikko: take a look at the "quick install" section here:
[16:14] cremes use that to install ruby for you
[16:14] cremes 1.9.1 is years out of date and quite buggy
[16:15] mikko but that's still what ships on debian stable by default
[16:15] cremes what can i say? debian sucks... :)
[16:15] mikko most likely a lot older in redhat5
[16:15] cremes no one in their right mind is going to run 1.9.1 in production when better alternatives exist
[16:15] cremes so i don't see the point in testing against an old version like that
[16:16] mato mikko: you can also just apt-get build-dep libruby1.9.1, get the ruby source and build it in /usr/local, that's what i do on debian stable, works fine for me.
[16:18] mikko i will look a bit more in the evening whether it would be possible to get this to work with default versions
[16:18] mikko it would give a bit more comprehensive view on what users might be seeing
[16:19] cremes just discoverd that 4.x drops DEALER sockets
[16:19] cremes so 3.x and 4.x are *not* the same
[16:20] mato cremes: yes, that's correct
[16:20] mato cremes: but it doesn't explain that NameError I'm getting.
[16:22] mato cremes: where/how do the individual ZMQ:: constants get defined? grepping the source reveals nothing obvious.
[16:22] cremes mato: they get defined in constants.rb :)
[16:23] mato cremes: ah, ok, and ZMQ::Context::SocketError? that should be an exception class, right?
[16:24] cremes yes, but it has been removed
[16:24] cremes do a git pull to get the latest
[16:24] cremes i'm delivering near-instant bug fixes people!
[16:26] mato cremes: woot!
[16:26] mato cremes: all works :)
[16:26] mato cremes: thank you very much :-)
[16:26] cremes i still have a bunch of failures in my nonblocking_recv_spec though
[16:26] mato cremes: i'll give you free beer if we meet up somewhere :)
[16:26] cremes looking at it now
[16:26] cremes mato: and i'll drink it!
[16:27] mato cremes: and free feedback on the api now that i have a project to use it on :)
[16:27] cremes even better!
[16:27] cremes i am going to start a new project that provides a more idiomatic api that wraps this guy up
[16:27] cremes but i haven't pushed it to github yet
[16:28] mato why the layering? not that layering is bad, but i'd assume that ruby programmers would prefer an idiomatic api to a low-level C-like one
[16:29] cremes mostly because sustrik & friends have been iterating like mad on the c api and there was no
[16:30] cremes way to prevent ffi-rzmq from breaking with every change, so a higher level abstraction (like czmq)
[16:30] cremes makes sense to wrap up the lower-level api and provide some api *consistency*
[16:30] pieterh cremes: you saw MinRK's pyzmq release? we're starting to get consistent higher level abstractions
[16:31] mato yeah, i've used pyzmq and it's nice
[16:31] cremes pieterh_: i just saw a tweet on it earlier today
[16:31] pieterh yeah
[16:31] cremes i haven't looked at it yet
[16:31] pieterh Benjamin is a machine
[16:31] mato cremes: any gotchas i should be aware of if i want to use ffi-rzmq in a sinatra app?
[16:31] cremes mato: make sure to check all return codes :)
[16:31] mato :)
[16:32] pieterh cremes: hey, any interest in a meetup in Chicago this month?
[16:32] cremes seriously, don't use threads + MRI
[16:32] pieterh I am in Dallas and have some air miles to waste
[16:32] cremes if you need threads, use rubinius or jruby
[16:32] cremes pieterh_: always interested!
[16:32] pieterh would a random Friday work?
[16:33] cremes unfortunately, no, not in Oct
[16:33] pieterh like 21/10 or 28/10?
[16:33] pieterh hmm
[16:33] cremes the 21st i am doing a "birthday bash" and the 28th i am out of town
[16:33] cremes and the 4th - 6th i am out of town too
[16:33] pieterh midweek should be doable, it's not such a long flight
[16:33] cremes but i am available almost any other day :)
[16:34] pieterh maybe next week, 20th?
[16:34] pieterh I might be sent off to Korea randomly the weeks after
[16:34] cremes pieterh: sure, that works
[16:35] pieterh ok, I'll check flights, let's provisionalize that
[16:35] cremes it's on my calendar
[16:35] pieterh say 7pm in some random downtown location
[16:37] cremes done
[16:37] cremes pieterh: hackfest or general discussion?
[16:44] cremes mato: i am seeing several failures in my nonblocking_recv_spec.rb
[16:44] cremes the first two have to do with a known issue with PUB/SUB when PUB is the socket binder
[16:44] cremes but the other failures are for XREQ and have to do with multipart messages
[16:45] cremes i think these might be legitimate 4.x errors
[16:45] cremes mato: can you double-check me and see if you agree? if you do, i'll write up some C repos
[16:45] mato cremes: sustrik says don't worry about it for now
[16:45] mato cremes: 4.x is unstable/experimental
[16:45] cremes okay
[16:45] mato cremes: as long as the basics work, we're fine
[16:46] cremes mato: great; then the latest code on github should be working with 2.x, 3.x and 4.x
[16:48] pieterh cremes: ok, booked :-) I'll be in ORD at 4.30 or so, so downtown by 5.00 or later
[16:49] cremes pieterh: very good! so, hackfest or talkfest?
[16:51] pieterh hmm, anything people want
[16:51] pieterh unconf style with alcohol, usually works
[16:51] pieterh let's avoid the Chicago dessert tray this time tho
[16:51] pieterh that was insane
[16:57] cremes :)
[16:57] cremes i'll throw up a post on the ML with a time & venue for the meetup
[17:02] pieterh yay
[17:02] pieterh I'll add an entry to the events wiki
[17:08] mato pieterh: so, we have working endpoint resolution using dns:// in zmq as a proof of concept, took about a day to get it working
[17:08] mato pieterh: using my old proposal with TXT records
[17:15] taotetek heya pieterh
[17:24] IPCMAN I just started ZMQ. I am getting an error saying "Operation cannot be accomplished in current state" when I call zmq_connect. What does this error mean?
[17:28] sustrik IPCMAN: are you sure you get it from zmq_connect()?
[17:29] sustrik it's supposed to be returned from send or recv
[17:30] IPCMAN Yes..getting the error @ zmq_connect using ZMQ_REQ with IPC.
[17:30] sustrik Can you provide a minimal test case?
[17:31] IPCMAN Do you need the endpoint to be opened?
[17:41] cremes IPCMAN: no; show us the code
[17:42] cremes IPCMAN: and tell us what version of 0mq you are using
[17:45] IPCMAN #include <zmq.hpp>
[17:45] IPCMAN #include <string.h>
[17:45] cremes IPCMAN: please use or
[17:46] cremes don't paste your code into the channel
[17:46] IPCMAN ok..sorry
[17:46] cremes no problem... now you know :)
[17:47] przemek Hi, I've downloaded zmq and jzmq and build using VS2010. I'm at the point where I'm supposed to add the zmq.jar to the system path but I cannot find the .jar file anywhere on my system
[17:47] IPCMAN git clone git:// gist-1287798
[17:47] przemek i add the bin, include and lib folders to my Path
[17:48] przemek and I guess all I'm missing are the classpath and ld_library_path variables
[17:49] przemek but I'm not sure where they are supposed to point to on a Windows machine
[17:51] cremes IPCMAN: add the error message output to your gist, pls
[17:51] sustrik IPCMAN: tried with 0MQ/2.1
[17:51] sustrik no error
[17:52] sustrik what do you see actually?
[17:52] sustrik an exception being thrown?
[17:54] IPCMAN git clone git:// gist-1287806 error to gist
[17:54] IPCMAN terminate called after throwing an instance of 'zmq::error_t' what(): Operation cannot be accomplished in current state
[17:55] cremes IPCMAN: fyi, we don't want to clone the gist... providing the URL is sufficient, e.g.
[17:56] IPCMAN ok
[17:57] sustrik ok, no luck reproducing it here
[17:57] sustrik what's the 0mq version you are using?
[17:57] sustrik what OS?
[18:00] IPCMAN Linux Ubuntu 11.10 0MQ 2.1
[18:01] sustrik almost the same config here, no error though
[18:03] sustrik can you run the process in the debugger and place the breakpoint at each occurent of "errno = EFSM"?
[18:03] sustrik there should be 4 of them
[18:03] sustrik then report which one was hit
[18:05] przemek Has anyone here been successful running the jzmq on Windows?
[18:16] cremes przemek_: i can't speak to the java lib, but i have built & run 0mq with mingw on windows without any problems
[18:17] przemek ya I got it working on linux
[18:17] przemek but I need to have it work on Windows as well since I need these two machines to talk to each other
[18:18] przemek like the instructions for getting it work on windows don't make sense
[18:18] przemek there is alot of hand waving there and I'm too much of a newb at zeromq to fill in the blanks myself
[18:23] przemek so the first problem I'm having is that the instructions say:
[18:23] przemek make sure that you have set the Java classpath to the directory where ØMQ classes reside.
[18:24] przemek so on linux i set my CLASSPATH=/usr/local/share/java/zmq.jar:.
[18:24] przemek on windows the zmq.jar file doesn't exist anywhere so I don't know what they mean by 'where 0MQ classes reside'
[18:26] cremes przemek_: i wish i could help; sorry :(
[18:33] pieterh mato: was out at lunch
[18:34] pieterh taotetek: hi!
[19:17] cremes quick question for all of you lurkers...
[19:17] cremes has anyone seen a non-blocking zmq_recv() on a sub socket return -1
[19:17] cremes but when you check errno, it is 2 (No such file or directory) ?
[19:17] cremes this is against 2.1.x
[19:55] Steve-o Downloading Win8 to see how 0mq fairs on that, although mainly just for the interface changes
[20:22] cremes hmmm, i think it's a bad idea to share a context amongst several threads due to a
[20:22] cremes race condition that exists in the library
[20:22] cremes follow my thinking here...
[20:23] cremes main thread creates context, creates 2 new threads and passes them the context
[20:23] cremes each new thread creates a SUB socket and subscribes to all messages
[20:23] cremes some other program starts publishing messages that the SUB sockets will recv
[20:24] cremes SUB1 reads a message, then check getsocksopt(RCVMORE)
[20:25] cremes (sometimes zmq_getsockopt() sets zmq_errno even when the return code is 0!)
[20:26] cremes <sigh> this will be easier in a message to the ML where i can edit my thoughts before publishing :)
[20:36] jhawk28 cremesw: context is supposed to be thread safe
[20:40] cremes jhawk28: maybe it's a bug
[20:41] jhawk28 yep. sustrik has been busy, he would know
[20:41] jhawk28 best to post to the mailing list
[20:44] cremes done
[20:44] cremes i think we need an errno *per* socket
[20:44] cremes rather than sharing one errno amongst several sockets from one context
[20:45] cremes to me, there is a clear race condition here on that variable
[20:45] cremes we need:
[20:45] cremes int zmq_errno(void *socket);
[20:59] przemek \list
[21:30] sustrik cremes: hi
[21:30] sustrik zmq_errno simply returns value of system errno
[21:31] sustrik errno is a per-thread variable
[21:31] sustrik ie. each thread has its own instance of errno
[21:48] jhawk28 sustrik: thats creative
[21:52] mato sustrik: see my email to the list, it's worth checking if cremes is building his code with the correct flags
[21:52] mato if you don't build everything with -D_REENTRANT and link with -lpthread you *may* get problems on some systems
[22:47] wehriam Hi all, I'm using ZMQ in Twisted ( I have two Twisted processes, and each one establishes several dealer sockets and several router sockets. After successfully sending and receiving a few hundred messages (the number varies), the dealer stops receiving messages. I'm stumped.
[22:48] wehriam If I send 30 messages sequentially no messages are received at all. If I space them by a second a few hundred go through.