[Time] Name | Message |
[00:20] lt_schmidt_jr
|
Hello
|
[00:20] lt_schmidt_jr
|
anyone here familiar with cross compilation?
|
[00:20] lt_schmidt_jr
|
I would like to compile for mutliple unix platforms from mac OSX
|
[00:21] lt_schmidt_jr
|
ubuntu and centos both x64
|
[00:21] lt_schmidt_jr
|
Windows x64 would be a nice bonus, but I am not expecting it
|
[01:04] ctrlc-root
|
im trying to make an application with ZeroMQ on Windows XP using VS2010 and the server code (http://tinypaste.com/e2187a) throws an exception when I call "zmqSocket.recv(...)". What am i doing wrong?
|
[01:06] ctrlc-root
|
it says something like "Operation cannot be completed because socket isn't in the correct state" i think
|
[01:16] ctrlc-root
|
nevermind, i figured it out
|
[01:44] lt_schmidt_jr
|
anyone has tips on cross-compiling?
|
[01:46] cremes
|
lt_schmidt_jr: cross-compiling is typically done with mingw
|
[01:46] cremes
|
there is a thread on the mailing list and an open issue
|
[01:46] lt_schmidt_jr
|
thanks cremes
|
[01:46] cremes
|
regarding the inability for 0mq to cleanly compile using mingw-w64 (64-bit mingw
|
[01:46] lt_schmidt_jr
|
ah
|
[01:46] cremes
|
i suggest you compare notes and experiences with the folks who
|
[01:46] cremes
|
have already indicated interest
|
[01:46] lt_schmidt_jr
|
that would really be a nice-to-have
|
[01:46] cremes
|
honestly, in about a month this is going to be important to me too :)
|
[01:47] lt_schmidt_jr
|
but just cross-compiling for unix is what I am really after tonight
|
[01:47] lt_schmidt_jr
|
I am sort of a java weenie so this is all a bit overwhelming
|
[01:47] cremes
|
ok, then there are various guides on the 'net on how to do it
|
[01:47] lt_schmidt_jr
|
ok, thanks
|
[01:47] cremes
|
sorry that it's a google-is-your-friend answer but... ;)
|
[01:47] cremes
|
check out mingw.org
|
[01:48] cremes
|
and also lookup the site for mingw-w64
|
[01:48] cremes
|
they have FAQs on this stuff
|
[01:48] lt_schmidt_jr
|
hey, if someone had just done it, it would save me some time
|
[01:48] lt_schmidt_jr
|
thanks
|
[01:48] cremes
|
yeah, unfortunately i don't think anyone has yet
|
[01:48] cremes
|
if you figure it out, put up a page on the wiki!
|
[01:49] lt_schmidt_jr
|
:) I'll try
|
[06:14] andrewvc
|
cremes: around?
|
[06:22] engwan
|
hi andrewvc, got another problem with my rails app.. it might not be related to zeromq / mongrel2 but related to the threading problem
|
[06:23] andrewvc
|
engwan: yo
|
[06:23] engwan
|
now im getting this
|
[06:23] engwan
|
Unhandled exception when trying to join handler #<ThreadError: deadlock; recursive locking>.
|
[06:23] engwan
|
/opt/palmade/development/rvm/gems/ruby-1.9.2-p136/gems/actionpack-2.3.11/lib/action_controller/reloader.rb:31:in `lock'
|
[06:23] engwan
|
/opt/palmade/development/rvm/gems/ruby-1.9.2-p136/gems/actionpack-2.3.11/lib/action_controller/reloader.rb:31:in `run'
|
[06:23] engwan
|
/opt/palmade/development/rvm/gems/ruby-1.9.2-p136/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:108:in `call'
|
[06:23] engwan
|
/opt/palmade/development/rvm/gems/ruby-1.9.2-p136/gems/thin-1.2.7/lib/rack/adapter/rails.rb:74:in `call'
|
[06:23] engwan
|
on every other request
|
[06:23] engwan
|
so when i open up the page, it works fine
|
[06:23] andrewvc
|
hmmm, i'm not familiar with that one
|
[06:23] engwan
|
when i refresh it
|
[06:23] engwan
|
that error
|
[06:23] engwan
|
then my master process respawns the dead process
|
[06:23] engwan
|
then repeat..
|
[06:23] engwan
|
hehe
|
[06:24] andrewvc
|
hmmm
|
[06:24] andrewvc
|
btw, have you set Thread.abort_on_exception = true
|
[06:25] andrewvc
|
looks like the magic class reloading in rails is having issues
|
[06:25] engwan
|
yeah, that reloading class has wrapper locking / unlocking mechanism
|
[06:27] andrewvc
|
well, it looks like there's an exception somewhere
|
[06:27] andrewvc
|
that gets rescued, question is, what's the exception
|
[06:27] engwan
|
hmm.. isnt the exception #<ThreadError: deadlock; recursive locking>?
|
[06:28] engwan
|
related to mutex?
|
[06:29] engwan
|
:w
|
[06:29] andrewvc
|
hmmm
|
[06:30] engwan
|
i solved the problem
|
[06:30] engwan
|
the lock was actually not unlocked
|
[06:31] andrewvc
|
well, yeah
|
[06:31] engwan
|
its a bug in rack-mongrel2.. it should call close on the response body of the rack app
|
[06:31] andrewvc
|
cool
|
[06:31] engwan
|
as rails hooks the unlock into that method
|
[06:31] andrewvc
|
so, the other question is
|
[06:32] andrewvc
|
it looks like exceptions that don't get handled cause mutex to complain that it now won't get unlocked.
|
[06:32] andrewvc
|
does that sound right, or am I misunderstanding this?
|
[06:32] engwan
|
no, its just that the mutex was locked twice
|
[06:32] engwan
|
without getting unlocked
|
[06:32] engwan
|
so it gave out that exception
|
[06:33] andrewvc
|
ohhhhhhh, gotcha
|
[06:33] andrewvc
|
I was thinking what I said didn't quite made sense
|
[06:33] andrewvc
|
btw
|
[06:34] andrewvc
|
we're making a rather significant change to ffi-rzmq
|
[06:34] engwan
|
what would that change be?
|
[06:35] andrewvc
|
well, it won't affect you if you use Socket#send_string
|
[06:35] andrewvc
|
but if you use Socket#send directly, instantiating zmq objects
|
[06:35] andrewvc
|
it will
|
[06:35] andrewvc
|
we're going to require that you manually close any sent messages after the send
|
[06:35] andrewvc
|
#send won't manually close the message for you any more
|
[06:36] andrewvc
|
and #send will likely be renamed as well, just be on the look out for it, we'll likely bump it this week
|
[06:36] engwan
|
any reason for the change?
|
[06:36] andrewvc
|
yeah
|
[06:36] andrewvc
|
basically, here's the deal
|
[06:37] andrewvc
|
lets say you're sending a multi-part message
|
[06:37] andrewvc
|
and its got 4 parts
|
[06:38] andrewvc
|
and it fails on part 2
|
[06:38] andrewvc
|
then lets say you try and resend the message, starting from part 1
|
[06:39] andrewvc
|
well, #send has modified those Message objects, they've been closed, so you can't resend part 1 and 2
|
[06:39] andrewvc
|
you have to recreate the Message objects
|
[06:39] andrewvc
|
what you really want to do is send all 4, then close all 4, not send each, closing them one at a time as you go
|
[06:39] engwan
|
ohh.. yeah, that makes sense..
|
[06:39] andrewvc
|
though, something still seems odd about it to me, maybe there's a better way
|
[06:40] andrewvc
|
though, the other thing we discussed was renaming send, as it conflicts with Object#send
|
[06:40] andrewvc
|
though the proper zmq api uses #send
|
[06:40] andrewvc
|
anyway, it's late and I'm rambling
|
[06:40] andrewvc
|
looking forward to your M2 handler btw
|
[06:41] engwan
|
sure, i'll post it up on github when ready
|
[08:08] guido_g
|
good morning
|
[08:20] guido_g
|
pieter_hintjens: http://www.inspirel.com/yami4/ <- competitors ahead -- and thy have a book already!!! ,)
|
[08:22] siggimoo
|
zmq has a better name and license, imo
|
[08:27] Steve-o
|
it's a lulu book
|
[08:27] Steve-o
|
plus they don't have a good multicast protocol :)
|
[08:30] guido_g
|
*shhh*
|
[08:31] guido_g
|
i wanted to persuade pieter to publish the guide as book
|
[08:37] Steve-o
|
mmm, odd,
|
[08:37] guido_g
|
what?
|
[08:37] Steve-o
|
Windows and Linux PGM is working perfectly fine now
|
[08:37] Steve-o
|
but I get double the performance number on Windows
|
[08:38] Steve-o
|
out of the box, ~100mb/s Linux and ~200mb/s Windows
|
[08:39] guido_g
|
odd indeed
|
[08:40] Steve-o
|
i think it's supposed to default to 100kb/s too :D
|
[08:40] guido_g
|
at least this is the default rate set by ømq
|
[08:41] guido_g
|
afair
|
[08:45] pieter_hintjens
|
re
|
[08:46] guido_g
|
wb
|
[08:46] pieter_hintjens
|
0MQ doesn't really have competitors
|
[08:47] guido_g
|
the former nokia ceo said the same once...
|
[08:47] pieter_hintjens
|
It's still true, Nokia tyres are the best in the world
|
[08:48] pieter_hintjens
|
as for the Guide as a book, I thought that was the obvious goal from the start
|
[08:48] guido_g
|
yeah, unfortunately i've no use for them
|
[08:48] pieter_hintjens
|
yeah, they insist on Windows 7...
|
[08:49] pieter_hintjens
|
"yet another messaging interface, version 4"?
|
[08:50] pieter_hintjens
|
anyhow, 0MQ is above all a community of experts
|
[08:51] pieter_hintjens
|
guido_g: thanks for the feedback on Ch4, I'm making those fixes now
|
[08:51] guido_g
|
no problem
|
[08:51] guido_g
|
the titanic idea is nice
|
[08:56] pieter_hintjens
|
guido_g: do you know http://lmgtfy.com/?q=spinning+rust ?
|
[08:56] pieter_hintjens
|
too sarcastic for a serious book on messaging?
|
[08:56] guido_g
|
pieter_hintjens: not when reading a book or article
|
[08:57] guido_g
|
you've to admit that the term is not that widely known
|
[08:58] mikko
|
good morning
|
[08:58] pieter_hintjens
|
it isn't? I thought it was pretty standard
|
[08:58] pieter_hintjens
|
hi mikko
|
[08:58] guido_g
|
howdy mikko
|
[09:06] Steve-o
|
erk, local_thr.exe is crashing
|
[09:07] mikko
|
Steve-o: win64?
|
[09:08] Steve-o
|
win32 on 2008 r2 sp1
|
[09:09] Steve-o
|
remote_thr.exe runs fine
|
[09:09] Steve-o
|
and of course linux doesn't crash
|
[09:20] Steve-o
|
one guess is that zeromq is sending as two threads, which matches the double bandwidth
|
[09:27] stimpie
|
does any one has a clue what could cause /cm/shared/apps/gcc/4.3.4/lib/../lib/libstdc++.so: could not read symbols: File in wrong format?
|
[09:28] stimpie
|
aha I do, It should use lib64
|
[09:41] stimpie
|
anyone knows howto specify from which location libstdc++.so is linked (for jzmq)?
|
[09:45] pieter_hintjens
|
stimpie: sorry,... nope
|
[09:46] stimpie
|
I will try to link 'manualy'
|
[09:46] mikko
|
stimpie: i would assume that's based on runtime linkers config
|
[09:46] mikko
|
stimpie: or compilers
|
[09:47] mikko
|
stimpie: echo | g++ -v -x c -E -
|
[09:49] stimpie
|
mikko, strange that gives X86_64 as the first option
|
[09:50] mikko
|
i wonder if adding -m64 to compiler flags would help
|
[09:56] stimpie
|
-m64 appears to have no effect, output of g++ -v -x c -E posted at http://pastebin.com/aumWMsxT
|
[10:05] sejo
|
can you have multiple PULL receivers ? (PUSH sender)
|
[10:06] sejo
|
the guide states yes :p
|
[10:06] sejo
|
nvm
|
[10:09] Steve-o
|
doh, 2.1.2 drops txw_max_rte so there is no rate limiting
|
[10:30] Steve-o
|
oh yay, doesn't crash now, fruity compiling
|
[10:34] stimpie
|
my libstdc++ issue appears to be a very old bug in libtool http://lists.gnu.org/archive/html/libtool/2005-08/msg00041.html
|
[13:09] Steve-o
|
living on the bleeding edge gives bleeding wounds
|
[13:10] Steve-o
|
nice /feature/ of MSVC release mode and local scope __restrict
|
[13:10] Steve-o
|
randomly makes pointers appear as NULL unless they are used a lot
|
[13:41] mikko
|
https://build.zero.mq/job/code-coverage-test/2/cobertura/_default_/
|
[13:41] CIA-103
|
zeromq2: 03Brett Cameron 07master * rb00be26 10/ (5 files in 2 dirs):
|
[13:41] CIA-103
|
zeromq2: Different fixed to make OpenVMS port work.
|
[13:41] CIA-103
|
zeromq2: Signed-off-by: Martin Sustrik <sustrik@250bpm.com> - http://bit.ly/g79MvJ
|
[13:41] mikko
|
zeromq2 code coverage
|
[13:44] Steve-o
|
mikko: so the win64 updates and solaris x86 fixes can be found in the new 5.1.113 tarball
|
[13:44] Steve-o
|
I hope nothing else appears too soon
|
[13:45] mikko
|
Steve-o: will carry on testing those
|
[13:46] Steve-o
|
cmake on win64 is odd, it doesn't produce makefiles by default
|
[13:46] Steve-o
|
at least the packager works reasonably well
|
[13:50] cremes
|
hmmm, yami4 has a wireshark plugin for inspecting frames on the wire
|
[13:50] cremes
|
that's a pretty good idea (pretty good ideas are usually worth stealing)
|
[13:52] Steve-o
|
PGM has been in Wireshark a lot longer :P
|
[13:52] Steve-o
|
not forgetting tcpdump
|
[13:53] Steve-o
|
you could chain the decoders all the way through to your data format
|
[14:08] Clement
|
Hello
|
[14:08] Guest85177
|
I've a problem inside ZMQ DLL
|
[14:08] Guest85177
|
Somebody can help me?
|
[14:09] Steve-o
|
which socket type and binding?
|
[14:09] Guest85177
|
I use CLRZMQ as input
|
[14:09] Guest85177
|
for publishing
|
[14:09] Guest85177
|
I've a memcopy problem
|
[14:10] Guest85177
|
I've used the ZMQ source code
|
[14:10] Guest85177
|
in VS 2010
|
[14:10] Guest85177
|
and I've found this problem
|
[14:10] Guest85177
|
I use TCP binding
|
[14:11] Steve-o
|
k, is it reproducible with a small example?
|
[14:11] Guest85177
|
Badly I don't think so
|
[14:11] Guest85177
|
I reproduce this problem
|
[14:12] Steve-o
|
and have you tried 2.1. or is this 2.0?
|
[14:14] Steve-o
|
have you followed the c# examples in the guide?
|
[14:14] Guest85177
|
I use the 2.1
|
[14:15] Guest85177
|
The problem is that run with few data
|
[14:15] Guest85177
|
and when data rate is bigger
|
[14:16] Guest85177
|
It failed with a C++ exception
|
[14:16] Steve-o
|
out of memory?
|
[14:16] Guest85177
|
No
|
[14:17] Guest85177
|
memcopy
|
[14:17] Steve-o
|
k, sounds like you need one of the C# binding guys to help
|
[14:18] Steve-o
|
stick around for a bit or post more detail on the mailling list
|
[14:18] Guest85177
|
I dont think that it comes from C# bindings
|
[14:18] Guest85177
|
because I've used two wrappers and twice failed
|
[14:20] mikko
|
Guest85177: have you got any debug info?
|
[14:20] mikko
|
backtrace or similar
|
[14:21] Guest85177
|
encoder.hpp line 115
|
[14:21] Guest85177
|
It failed at this line
|
[14:22] Guest85177
|
I use VS with the source code
|
[14:22] Guest85177
|
and pdb
|
[14:24] Guest85177
|
write_pos is designated as a bad pointer
|
[16:34] andrewvc
|
cremes: ping
|
[17:27] pieter_hintjens
|
guido_g: have a new RFC, if you want to review it: http://rfc.zeromq.org/spec:9
|
[17:30] guido_g
|
will do
|
[17:30] pieter_hintjens
|
guido_g: :-)
|
[17:41] guido_g
|
and changes on spec:7
|
[17:42] private_meta
|
Is there any good reason to use a pointer to std::string in the zhelpers for c++? I'm just curious if anyone of you knows
|
[17:42] private_meta
|
in s_recv that is
|
[17:42] guido_g
|
link?
|
[17:43] private_meta
|
sec
|
[17:43] private_meta
|
https://github.com/imatix/zguide/blob/master/examples/C%2B%2B/zhelpers.hpp Line 59
|
[17:46] guido_g
|
it's just because the string is allocated on the heap
|
[17:48] private_meta
|
I'd rather have it on the Stack and not having to handle pointers
|
[17:50] guido_g
|
then you need to pass it to the function
|
[17:51] private_meta
|
I'd use a return value
|
[17:51] guido_g
|
the stack is gone after the return
|
[17:53] guido_g
|
one could return a std::string and rely on the c++ copy semantics, but this might be a problem when optimization is on
|
[17:53] private_meta
|
Why would that be a problen?
|
[17:53] private_meta
|
*problem
|
[17:53] private_meta
|
I do that all the time
|
[17:53] guido_g
|
then it might work ,)
|
[17:55] private_meta
|
doing "std::string func();" just copies the string from the stack of the function to the stack of the function caller
|
[17:55] guido_g
|
right
|
[17:55] private_meta
|
It makes it easier and you don't have to think about dealing with pointers and deletes
|
[17:55] guido_g
|
true
|
[17:55] private_meta
|
It's an advantage in convenience and clean code, but it has a small advantage that you, in fact, do copy code
|
[17:55] private_meta
|
*small disadvantage
|
[17:56] private_meta
|
erm
|
[17:56] private_meta
|
copy data
|
[17:56] guido_g
|
it should be noted that references are not allowed
|
[17:56] private_meta
|
Well, references in return values are problematic anyway
|
[17:57] private_meta
|
References are to be used in parameters
|
[17:59] guido_g
|
const std::string& res = fnc(); <- that would be a problem, right?
|
[18:00] private_meta
|
Well, you are referencing a temporary variable
|
[18:01] private_meta
|
so, yes
|
[18:01] private_meta
|
You could make the value you return static, but that wouldn't work well for multiple threads
|
[18:01] pieter_hintjens
|
private_meta: you can't return references to (a) static values or (b) stack values
|
[18:03] private_meta
|
private_meta: why wouldn't you be able to return static values?
|
[18:04] private_meta
|
int & test() { static int test1 = 5; return test1; }
|
[18:04] private_meta
|
int main() { int blubb = test(); return 0; }
|
[18:04] private_meta
|
theoretically, this works in C++
|
[18:05] pieter_hintjens
|
private_meta: ... reference to A is not the same as value of A
|
[18:06] private_meta
|
I return test1 by reference
|
[18:06] pieter_hintjens
|
int & test()... ok
|
[18:08] pieter_hintjens
|
so you return reference to value on the stack, stack is now unwound, value no longer exists...
|
[18:09] pieter_hintjens
|
sorry, my C++ fu is too limited, /me sits down and shuts up
|
[18:09] private_meta
|
Well, that's what static would be for
|
[18:09] private_meta
|
static means the value remains and isn't killed once the function is done.
|
[18:10] private_meta
|
The problem with that is that you get troubles with threads, so concurrent access of the function
|
[18:10] pieter_hintjens
|
yes, but then it's not thread safe
|
[18:10] private_meta
|
Yes
|
[18:10] private_meta
|
As I said
|
[18:11] private_meta
|
So, basically you have some ways to return values. As a reference to a static value, but that is not thread safe. as a pointer, but you always have to delete the pointer afterwards.
|
[18:11] pieter_hintjens
|
ok, so you *shouldn't* return references (or pointers, in C) to static items or items on the stack
|
[18:11] private_meta
|
It's pretty much the same with everything in C++
|
[18:11] private_meta
|
You can use it if you really know what you are doing and you REALLY need it that way
|
[18:12] pieter_hintjens
|
you can *safely* return a value (1, 'c') or a newly allocated buffer
|
[18:12] private_meta
|
continuing: Why I don't like returning a pointer to std::string: You use the return mechanism. Returning it, immediately being able to use it further, let's say in a different function
|
[18:12] private_meta
|
but as you have to DELETE the value to avoid memory leaks, you have to store it somewhere
|
[18:13] private_meta
|
which makes the entire mechanic of returning by "return;" kindof useless
|
[18:13] private_meta
|
If you do it like that, you can also return it as an in/out parameter
|
[18:14] pieter_hintjens
|
afaik 0MQ does this for new messages, allocates them on the stack if small, heap if large
|
[18:14] private_meta
|
Example: you want to transform clock time into a string. The clean C++ Way is to push it into a stringstream.
|
[18:14] private_meta
|
Now You receive the message, push it into the stringstream and extract an integer
|
[18:16] private_meta
|
For me "sstream.str(s_recv(endpoint)); ss >> number;" looks way better than "std::string * string = s_recv(endpoint); ss.str(*string); ss>>number; delete string;"
|
[18:16] private_meta
|
Don't know if I bring across my point properly
|
[18:17] private_meta
|
So, it's for neatness of code, and for the fact that I would like any and all possibilities to safeguard against memory leaks
|
[18:31] pieter_hintjens
|
the neater the better
|
[18:32] pieter_hintjens
|
it was unclear what you were asking, tbh
|
[18:37] andrewvc
|
cremes: ping
|
[18:38] private_meta
|
pieter_hintjens: is it clearer now, or is it still unclear?
|
[18:38] cremes
|
andrewvc: pong
|
[18:38] pieter_hintjens
|
private_meta: it's clear and my opinion, fwiw, is that neatness is always worth it
|
[18:38] pieter_hintjens
|
IMO the original code was a straight conversion of the C code
|
[18:39] pieter_hintjens
|
cremes: wireshark is a great idea, want to add it to the wiki (GSoC page?)
|
[18:39] private_meta
|
pieter_hintjens: Then I'll change the receive method for zhelpers.hpp and update all the already translated files
|
[18:39] private_meta
|
pieter_hintjens: is that ok?
|
[18:39] pieter_hintjens
|
for sure...
|
[18:39] pieter_hintjens
|
you're not using git, right?
|
[18:39] private_meta
|
No
|
[18:40] private_meta
|
I could try to start using it, but I'm absolutely not knowledgeable about it
|
[18:40] pieter_hintjens
|
it's unsafe to send full modified versions of files
|
[18:40] pieter_hintjens
|
patches are better
|
[18:40] pieter_hintjens
|
if you want, I'll walk you through an instant git course
|
[18:40] pieter_hintjens
|
it'll take a few minutes
|
[18:41] private_meta
|
Which OS are you using?
|
[18:41] pieter_hintjens
|
Linux
|
[18:41] private_meta
|
kk
|
[18:41] pieter_hintjens
|
you are on?
|
[18:41] private_meta
|
Well, my coding environment is Ubuntu in a virtual machine, my host system is Windows, so I pretty much have both
|
[18:41] cremes
|
pieter_hintjens: i'll add it!
|
[18:42] private_meta
|
Wireshark is a fine tool
|
[18:42] pieter_hintjens
|
private_meta: ok, either Windows or Ubuntu is fine, first install git and make sure it works from the command line
|
[18:42] pieter_hintjens
|
apt-get install git-all
|
[18:43] pieter_hintjens
|
hmm, or just the 'git' package, git-all may be large
|
[18:43] private_meta
|
"Couldn't find package git-all" :D
|
[18:44] private_meta
|
Neither git or git-all are in my repos
|
[18:44] pieter_hintjens
|
'sudo apt-get dist-upgrade' :-)
|
[18:44] pieter_hintjens
|
'sudo apt-get git<TAB>'
|
[18:44] private_meta
|
I do that regularily
|
[18:45] pieter_hintjens
|
sorry... 'sudo apt-get install git<TAB>'
|
[18:45] private_meta
|
I got git-core
|
[18:45] pieter_hintjens
|
install it
|
[18:45] private_meta
|
apt-get doesn't have autocomplete
|
[18:47] pieter_hintjens
|
installed?
|
[18:48] pieter_hintjens
|
configure git so we know who you are:
|
[18:48] pieter_hintjens
|
git config --global user.name "Your Name"
|
[18:48] pieter_hintjens
|
git config --global user.email you@example.com
|
[18:48] private_meta
|
There is no git-all
|
[18:48] pieter_hintjens
|
'sudo apt-get install git-core' was what I meant...
|
[18:48] pieter_hintjens
|
by 'install it'
|
[18:48] pieter_hintjens
|
sorry
|
[18:49] private_meta
|
I'm using my nickname for username
|
[18:50] pieter_hintjens
|
you need to use your real name and email for contributions
|
[18:50] private_meta
|
meh
|
[18:51] pieter_hintjens
|
it's about being able to reuse what you make
|
[18:51] private_meta
|
sure,doen
|
[18:51] private_meta
|
*done
|
[18:51] pieter_hintjens
|
if you are (e.g.) prohibited by your company from making FOSS contributions, etc. etc.
|
[18:51] pieter_hintjens
|
ok, next, http://www.zeromq.org/docs:contributing
|
[18:51] private_meta
|
We're in academic research, it should be ok :p
|
[18:52] pieter_hintjens
|
Read the 'Contributing to 0MQ Core' part
|
[18:52] private_meta
|
Ah yeah... github blocked me
|
[18:52] pieter_hintjens
|
we'll clone the Guide:
|
[18:52] pieter_hintjens
|
git clone git://github.com/imatix/zguide.git
|
[18:53] pieter_hintjens
|
this gives you a full fork of the main repository, history and everything
|
[18:53] pieter_hintjens
|
that is the main difference between SVN and git, lots of copies of the whole repository, all over the place
|
[18:54] private_meta
|
ok, so my username on github is still taken
|
[18:54] private_meta
|
but none of my email addresses are still connected to that account
|
[18:54] private_meta
|
As far as I've heard is that the main point of it is using forks all over
|
[18:55] private_meta
|
pieter_hintjens: it's odne
|
[18:55] pieter_hintjens
|
we can forget github at this point except as a URI to clone off
|
[18:55] private_meta
|
*done
|
[18:55] pieter_hintjens
|
ok, now you can 'cd zguide' and look around
|
[18:56] pieter_hintjens
|
cd examples/C++
|
[18:57] pieter_hintjens
|
git log --name-only .
|
[18:57] private_meta
|
yeah, got the files there
|
[18:57] pieter_hintjens
|
now you make any changes you want, build, test (:-)) and then...
|
[18:57] pieter_hintjens
|
git add .
|
[18:58] pieter_hintjens
|
git commit -s -m "Explain what you fixed"
|
[18:58] pieter_hintjens
|
git format-patch origin/master
|
[18:58] private_meta
|
Doing it like that is somewhat annoying... I'm using eclipse cdt, and as every file has a main (almost), compiling is a hassle in eclipse
|
[18:59] pieter_hintjens
|
open a console, use './build all'
|
[18:59] private_meta
|
I don't want console build logs
|
[18:59] private_meta
|
I'm not using an IDE to build like that
|
[18:59] private_meta
|
at least I don't want to
|
[18:59] pieter_hintjens
|
console build logs?
|
[19:00] pieter_hintjens
|
perhaps try what I suggest before explaining why you don't want to use it... ?
|
[19:02] private_meta
|
Yeah, I did, but it's exactly what i don't like
|
[19:02] pieter_hintjens
|
how do you intend to start/stop these examples?
|
[19:02] private_meta
|
Eclipse has integration (duh, [I]DE), i can jump to error lines by click, error lines are neatly formatted, I don't want to compile by command line
|
[19:03] private_meta
|
I build/debug within eclipse, but I either use different projects for different files, or I use build targets
|
[19:03] pieter_hintjens
|
sorry, I can't help you, your 'Easier to use environment' is making your life harder
|
[19:03] private_meta
|
and, I know you can do /build <examplename>, but imho that's not my point
|
[19:04] pieter_hintjens
|
there's a reason I can produce 300-500 *tested* and documented lines of C code in a day
|
[19:04] private_meta
|
Well, wasn't before ;)
|
[19:04] private_meta
|
What editor do you use?
|
[19:04] pieter_hintjens
|
Kate
|
[19:05] private_meta
|
I don't want to use that, I got used to autocomplete and other stoff
|
[19:05] private_meta
|
*stuff
|
[19:05] pieter_hintjens
|
exactly
|
[19:05] pieter_hintjens
|
ok, make the changes, test, any way you feel happy, not my world
|
[19:06] pieter_hintjens
|
'git diff' at any point to show the differences
|
[19:06] pieter_hintjens
|
and once you have the formatted patch, email it to the zeromq-dev list
|
[19:06] private_meta
|
hmm... how do you debug?
|
[19:06] pieter_hintjens
|
that's the official contribution process
|
[19:06] pieter_hintjens
|
debug?
|
[19:06] pieter_hintjens
|
don't make errors
|
[19:06] pieter_hintjens
|
:-)
|
[19:06] pieter_hintjens
|
just kidding...
|
[19:07] private_meta
|
Don't worry, didn't take it seriously
|
[19:07] pieter_hintjens
|
first, if you write methods, test them explicitly
|
[19:07] pieter_hintjens
|
so anything abstracted has its own selftests
|
[19:07] private_meta
|
You don't answer my question with that
|
[19:08] private_meta
|
(how) do you debug?
|
[19:08] pieter_hintjens
|
second, I use printfs
|
[19:08] pieter_hintjens
|
optional verbose tracing
|
[19:08] pieter_hintjens
|
message dumps
|
[19:08] pieter_hintjens
|
never debuggers
|
[19:08] private_meta
|
I didn't get into perl to avoid exactly THAT
|
[19:08] pieter_hintjens
|
never stepping through code, fgs
|
[19:09] private_meta
|
fgs?
|
[19:09] pieter_hintjens
|
expression of hope
|
[19:10] private_meta
|
"for gods sake"?
|
[19:10] pieter_hintjens
|
indeed
|
[19:10] private_meta
|
kk
|
[19:11] pieter_hintjens
|
how to debug? it depends on the kind of problem you're facing
|
[19:11] private_meta
|
no, don't worry, your kind of "debugging" isn't what I would want to do
|
[19:12] private_meta
|
it's ok
|
[19:12] pieter_hintjens
|
if you know a faster way to produce perfect code, please tell me
|
[19:12] pieter_hintjens
|
always keen to learn
|
[19:13] pieter_hintjens
|
anyhowl y
|
[19:13] pieter_hintjens
|
anyhow, you have git working
|
[19:13] pieter_hintjens
|
stay away from branches, merges, etc. for a few weeks
|
[19:13] private_meta
|
If it works for you, just do it that way, it's ok, as I said
|
[19:14] private_meta
|
I couldn't do it that way, it would drive me insane
|
[19:14] private_meta
|
Don't worry, I won't use it for anything other than this for quite some time I guess
|
[19:15] pieter_hintjens
|
cremes: random question
|
[19:15] cremes
|
pieter_hintjens: then you won't mind a random answer?
|
[19:15] pieter_hintjens
|
that'll do fine
|
[19:16] pieter_hintjens
|
hang on, you answered with a question, doesn't count
|
[19:16] cremes
|
heh
|
[19:16] pieter_hintjens
|
so I'm wondering, do I make a massive Ch4 with all reliability, all patterns
|
[19:17] pieter_hintjens
|
or split it up, so reliable request-reply in Ch4, reliable pubsub Ch5
|
[19:17] cremes
|
split 'em
|
[19:17] pieter_hintjens
|
excellent, thanks
|
[19:18] pieter_hintjens
|
BTW I have full disconnected acknowledged persistent disk-based reliability working
|
[19:18] pieter_hintjens
|
I'm kind of afraid to measure its performance
|
[19:18] cremes
|
very nice
|
[19:18] cremes
|
don't worry, you can always improve perf by throwing a memory cache in between
|
[19:18] cremes
|
;)
|
[19:18] pieter_hintjens
|
lol
|
[19:37] moore
|
hey any one else have issues with the easy install?
|
[19:37] moore
|
I get a trace back with debian
|
[19:37] moore
|
err
|
[19:37] moore
|
ubuntu
|
[19:37] moore
|
IndexError: list index out of range
|
[19:42] private_meta
|
pieter_hintjens: how do i update for new changes?
|
[19:42] guido_g
|
easy install of what?
|
[19:42] guido_g
|
moore: you need to tell at least what you did
|
[19:43] pieter_hintjens
|
private_meta: you mean if the repository you cloned is updated?
|
[19:43] pieter_hintjens
|
i.e. with your patches...?
|
[19:43] private_meta
|
no. let's say I have 5 files I work on, 15 files I don't, and I want those 15 files updated with the master repo
|
[19:43] guido_g
|
private_meta: you might want to try egit w/ eclipse, seems to work fine
|
[19:44] pieter_hintjens
|
guido_g: hang on, let'
|
[19:44] pieter_hintjens
|
let's see what private meta wants to achieve...
|
[19:44] guido_g
|
ok
|
[19:44] pieter_hintjens
|
the 15 files you don't touch, you just don't touch...
|
[19:44] private_meta
|
Well, ok
|
[19:44] private_meta
|
I have my offline cloned repository
|
[19:44] pieter_hintjens
|
yes
|
[19:44] private_meta
|
I take your files and translate them to C
|
[19:44] private_meta
|
let's say you add a new file
|
[19:45] pieter_hintjens
|
to C?
|
[19:45] private_meta
|
Yes
|
[19:45] pieter_hintjens
|
you take my C code and translate to C?
|
[19:45] private_meta
|
and you add the stubs to C++
|
[19:45] private_meta
|
how do I get your C versions and the C++ stub to my repostiory
|
[19:45] private_meta
|
repository
|
[19:45] pieter_hintjens
|
so you spoke about making a change to zhelpers.hpp and matching changes to programs that used it
|
[19:46] private_meta
|
Well, that's ok, i do my diff, and blah...
|
[19:46] private_meta
|
but suppose you add a file and I wanna get that into my repo
|
[19:46] pieter_hintjens
|
ah, ok
|
[19:46] pieter_hintjens
|
so I have added two new files for the Titanic pattern
|
[19:47] pieter_hintjens
|
so you will update your repo by pulling the latest version from mine
|
[19:47] pieter_hintjens
|
that is, 'git pull origin master'
|
[19:47] pieter_hintjens
|
this fetches the master branch from 'origin', which is where you cloned your repo from
|
[19:48] pieter_hintjens
|
and it then merges that into your repo
|
[19:48] private_meta
|
Does it merge with files I modified?
|
[19:48] pieter_hintjens
|
if the merge fails, you have conflicts etc.
|
[19:48] pieter_hintjens
|
the main problem with the files you modified is that if I apply your formatted patch, you'll get a bunch of conflicts
|
[19:49] pieter_hintjens
|
basically, this is why github pull requests are safer & easier (if you can get your github account working)
|
[19:49] private_meta
|
So if I want to get new files, I have to pull all changes from the master
|
[19:49] pieter_hintjens
|
you can take individual changes if you want, but it's more hassle
|
[19:50] pieter_hintjens
|
in order for me to *safely* merge your changes into my repo, I have to set-up your repo as a remote, and do 'pull' from it
|
[19:50] pieter_hintjens
|
which isn't possible in this case
|
[19:50] private_meta
|
Why so?
|
[19:51] pieter_hintjens
|
you have a git server running?
|
[19:51] private_meta
|
No. That seems to be the kind of stuff to set up that made me think normal git is complicated to setup
|
[19:51] pieter_hintjens
|
I mean, it's not very difficult, but unless you have that, your repository is not going to respond to my git pull requests
|
[19:51] pieter_hintjens
|
even I can set-up a git server
|
[19:51] pieter_hintjens
|
however I *far* prefer to use github
|
[19:52] pieter_hintjens
|
so, after sending me the formatted patch, you reset your repository to where it was before
|
[19:52] pieter_hintjens
|
'git reset --hard <whatever>'
|
[19:52] pieter_hintjens
|
or, reclone the whole thing
|
[19:52] pieter_hintjens
|
or, resolve a bunch of conflicts afterwards
|
[19:53] pieter_hintjens
|
or, just get github working, and send me a pull request
|
[19:53] mikko
|
good evening
|
[19:53] pieter_hintjens
|
hi mikko!
|
[19:53] private_meta
|
I think I prefer the reset
|
[19:53] pieter_hintjens
|
yeah, it's what I do when I send sustrik a zeromq patch
|
[20:31] private_meta
|
pieter_hintjens: do i need to execute those git add and git commit lines even if I don't actually write anything to the server, just to generate a patch?
|
[20:31] pieter_hintjens
|
if you want a signed-off and formatted patch, yes
|
[20:32] pieter_hintjens
|
however you can also run 'git diff' and capture the output
|
[20:32] private_meta
|
and git format-patch origin/master <-- origin is the url with .git at the end?
|
[20:32] pieter_hintjens
|
origin is a 'remote'
|
[20:32] pieter_hintjens
|
try 'git remote -v'
|
[20:33] pieter_hintjens
|
you'd type that command as-is
|
[20:33] private_meta
|
ah ok
|
[20:33] Guthur
|
on linux I seem to be getting a lot interrupt system call errors
|
[20:33] pieter_hintjens
|
all I can say for git is it gets easier and more obvious over time
|
[20:33] private_meta
|
so origin is somewhat of a variable in git, and master is the repo in there
|
[20:33] Guthur
|
anyone noticed this behaviour before
|
[20:33] pieter_hintjens
|
yes
|
[20:34] pieter_hintjens
|
Guthur: you upgraded to a more recent version of 0MQ?
|
[20:34] Guthur
|
I should be on a pretty recent version
|
[20:34] Guthur
|
let me check
|
[20:35] Guthur
|
2.2
|
[20:36] pieter_hintjens
|
source repository, thus
|
[20:36] pieter_hintjens
|
did you recently upgrade from an older version?
|
[20:36] pieter_hintjens
|
e.g. 2.0.10?
|
[20:36] Guthur
|
pieter_hintjens, yep
|
[20:36] pieter_hintjens
|
then presumably interrupt handling changed
|
[20:36] pieter_hintjens
|
have you checked the release notes?
|
[20:37] pieter_hintjens
|
finally, an example of what you are doing would be helpful
|
[20:37] nadime
|
in 2.1.2, we can migrate all sockets between threads (including inproc), right (with full memory barriers)
|
[20:38] nadime
|
?
|
[20:38] pieter_hintjens
|
a minimal example that reproduces an interrupted system call
|
[20:38] pieter_hintjens
|
nadime: don't do it unless you are happy writing full fence memory barriers
|
[20:39] pieter_hintjens
|
slightly imperfect socket migration causes 0MQ to fail with random errors under stress
|
[20:39] nadime
|
don't really have a good choice unless i want to rewrite our threadng libraries
|
[20:39] pieter_hintjens
|
be warned, then, when you get weird assertion failures in 0MQ, and you're moving sockets between threads, this is a major cause
|
[20:39] pieter_hintjens
|
having said that, yes, it works
|
[20:39] nadime
|
yeah i know
|
[20:40] nadime
|
i'm in such a case right now ;)
|
[20:40] Guthur
|
pieter_hintjens, I'll try to get a minimal example
|
[20:40] pieter_hintjens
|
Guthur: ok, pl;ease
|
[20:40] Guthur
|
the same code works fine enough on Win32, just as an FYI
|
[20:40] pieter_hintjens
|
*please post to list, I'm not here all the time
|
[20:40] pieter_hintjens
|
yeah, "it works" is often random
|
[20:42] Guthur
|
I've never seen anything similar on Win32, but it's very frequent on linux (Ubuntu 10.04)
|
[20:42] Guthur
|
but I know what you're going to ask me to do...
|
[20:42] Guthur
|
show a C example, hehe
|
[20:43] pieter_hintjens
|
Guthur: if you want help on an issue, telling me where it works is useless
|
[20:43] Guthur
|
this is C# code
|
[20:43] pieter_hintjens
|
what we need is a *minimal* example in any language
|
[20:43] pieter_hintjens
|
we then translate that to C or C++ to ensure we're not hitting a language binding issue
|
[20:43] pieter_hintjens
|
that lets us triangulate the problem
|
[20:46] private_meta
|
pieter_hintjens: does git also store file permissions, like "executable"? It seems so
|
[20:46] pieter_hintjens
|
private_meta: yes, and it also realizes that text files are... text... automatically
|
[20:47] private_meta
|
pieter_hintjens: in your examples folder, C, "asyncsrv.c" is executable, I doubt that's intended
|
[20:47] pieter_hintjens
|
let me check..
|
[20:47] pieter_hintjens
|
hah! nice catch
|
[20:50] private_meta
|
oy... lruqueue.cpp throws an exception
|
[20:51] private_meta
|
the unmodified one in the repo
|
[20:51] Guthur
|
pieter_hintjens: https://gist.github.com/861018
|
[20:51] Guthur
|
if i remove that sleep I get the error pretty consistently
|
[20:52] pieter_hintjens
|
you get the error *where*?
|
[20:52] pieter_hintjens
|
on the poll?
|
[20:53] Guthur
|
yep
|
[20:54] pieter_hintjens
|
perhaps it's not an error at all
|
[20:54] pieter_hintjens
|
'interrupted system call' means something interrupted the system call
|
[20:54] Guthur
|
errno is set to 4#
|
[20:54] pieter_hintjens
|
shrug
|
[20:54] Guthur
|
and the poll is returning -1
|
[20:55] pieter_hintjens
|
ok, now make a C version, should be easy
|
[20:55] pieter_hintjens
|
the example looks straight-forward so I'd primarily suspect the C# binding
|
[20:55] Guthur
|
I knew you were going to say that, hehe
|
[20:55] pieter_hintjens
|
are you checking what the zmq_poll() call itself returns?
|
[20:56] Guthur
|
yeah
|
[20:56] Guthur
|
that's what I use to throw the exception
|
[20:56] pieter_hintjens
|
hmm
|
[20:56] Guthur
|
if it's less than 0 I throw the exception which checks the errno
|
[20:56] pieter_hintjens
|
the code really looks fine...
|
[20:57] Guthur
|
I know and with the sleep it works
|
[20:57] Guthur
|
well without the sleep it doesn't work then
|
[20:58] pieterh
|
without the "exit" it doesn't work either
|
[20:58] pieterh
|
can you get me a C version then?
|
[20:59] Guthur
|
it'll take a bit of time
|
[20:59] Guthur
|
I've no C dev env setup
|
[20:59] pieterh
|
ok, can you then instead
|
[21:00] pieterh
|
expand your example to actually show the error happening (I don't see any exception handling)
|
[21:00] pieterh
|
and post to the zeromq-dev list?
|
[21:00] Guthur
|
oh yeah I can catch the exception
|
[21:01] Guthur
|
but i'm not sure why I should be getting it in the first place
|
[21:09] pieterh
|
g'night all
|
[21:31] yrashk
|
https://github.com/rigtorp/nanomq heh
|
[21:54] noah
|
does anyone know if it is possible to determine if a bidirectional socket has been closed?
|
[21:55] noah
|
through ZMQ, without pinging and such
|
[21:55] mikko
|
noah: you mean the other end has been closed?
|
[21:55] noah
|
right
|
[21:55] mikko
|
bidirectional being PAIR?
|
[21:55] mikko
|
and to answer your question, not directly
|
[22:02] Guthur
|
can anyone see why the SUB doesn't receive anything?
|
[22:02] Guthur
|
https://gist.github.com/861182
|
[22:03] mikko
|
Guthur: zmq_bind(skt, "tcp://*5555");
|
[22:03] guido_g
|
"tcp://*5555" <- wrong
|
[22:03] mikko
|
missing color
|
[22:03] mikko
|
colon*
|
[22:03] Guthur
|
oh doh
|
[22:03] Guthur
|
never seen that at all
|
[22:03] Guthur
|
cheers mikko
|
[22:03] guido_g
|
use larger font ,)
|
[22:05] guido_g
|
time get some sleep
|
[22:05] guido_g
|
night all!
|
[22:06] mikko
|
night
|
[22:18] Guthur
|
ah this is so frightfully annoying, the errno 4 doesn't happen in the C code
|
[22:18] Guthur
|
but it does using the C# code in Mono
|
[22:18] Guthur
|
but I'm pretty confident the issue isn't with binding
|
[22:41] lt_schmidt_jr
|
Hmm, looks like the latest 2.1.2 tar is failing to compile on centos
|
[22:41] mikko
|
lt_schmidt_jr: which centos?
|
[22:41] mikko
|
and what error message
|
[22:41] lt_schmidt_jr
|
5.5
|
[22:42] mikko
|
hmm, i got i385 centos 5.5
|
[22:42] mikko
|
and it seems to succeed
|
[22:42] mikko
|
what error are you getting?
|
[22:42] lt_schmidt_jr
|
I am getting libtool errors
|
[22:42] lt_schmidt_jr
|
trying to cut and paste here
|
[22:42] mikko
|
can you put them to gist.github.com?
|
[22:44] lt_schmidt_jr
|
https://gist.github.com/861270
|
[22:44] mikko
|
looks very odd
|
[22:45] mikko
|
i just built successfully under centos 5.5
|
[22:45] mikko
|
CentOS release 5.5 (Final)
|
[22:45] mikko
|
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
|
[22:48] lt_schmidt_jr
|
that is what I have as well
|
[22:48] lt_schmidt_jr
|
mikko are you running a VM also?
|
[22:56] mikko
|
lt_schmidt_jr: yes
|
[22:56] mikko
|
lt_schmidt_jr: i got centos 5.5 in the daily build cluster (i386)
|
[22:56] mikko
|
and x86_64 vm locally
|
[22:59] lt_schmidt_jr
|
hmm, I got the ISO files, which were not daily builds
|
[22:59] lt_schmidt_jr
|
not using cluster
|
[23:07] lt_schmidt_jr
|
I am runing 5.5 x86_64 in the vm
|
[23:07] lt_schmidt_jr
|
got the same error on non-vm machine as well
|
[23:07] lt_schmidt_jr
|
builds fine on OSX
|
[23:07] lt_schmidt_jr
|
I was just building the new image for jzmq
|
[23:08] lt_schmidt_jr
|
prev version 2.1.1 was building
|
[23:21] lt_schmidt_jr
|
apparently centos is like windows- a kernel update and a reboot and compiling again
|
[23:22] lt_schmidt_jr
|
strange
|