Skip to content

Instantly share code, notes, and snippets.

require 'ffi-rzmq'
class ZMQTest
def initialize(addr)
@ctx = ::ZMQ::Context.create
@socket = @ctx.socket(::ZMQ::ROUTER)
warn "setting option ::ZMQ::ROUTER_MANDATORY (#{::ZMQ::ROUTER_MANDATORY}) to 1"
@socket.setsockopt(::ZMQ::ROUTER_MANDATORY, 1)
@socket.bind(addr)
end

Keybase proof

I hereby claim:

  • I am paddor on github.
  • I am paddor (https://keybase.io/paddor) on keybase.
  • I have a public key whose fingerprint is 150A 811C 4B01 DA76 EBB3 57D3 9E19 CE30 326F 8815

To claim this, I am signing this object:

@paddor
paddor / nvim -v
Last active November 22, 2015 06:49
NeoVim crash dumps
NVIM v0.1.0-81-g1fbb567 (compiled Nov 20 2015 22:56:23)
Commit: 1fbb56795d16783f9a97e25e3b71ab3ac2a644dc
Build type: Dev
Compilation: /usr/local/Library/ENV/4.3/clang -Wconversion -O2 -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim20151120-26550-uosd0i/build/config -I/tmp/neovim20151120-26550-uosd0i/src -I/tmp/neovim20151120-26550-uosd0i/deps-build/usr/include -I/tmp/neovim20151120-26550-uosd0i/deps-build/usr/include -I/tmp/neovim20151120-26550-uosd0i/deps-build/usr/include/luajit-2.0 -I/tmp/neovim20151120-26550-uosd0i/deps-build/usr/include -I/tmp/neovim20151120-26550-uosd0i/deps-build/usr/include -I/tmp/neovim20151120-26550-uosd0i/deps-build/usr/include -I/tmp/neovim20151120-26550-uosd0i/deps-build/usr/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim20151120-26550-uosd0i/build/src/nvim/auto -I/tmp/neovim20151120-26550-uosd0i/build/include
diff --git a/include/zarmour.h b/include/zarmour.h
index 12dbd10..8aff6af 100644
--- a/include/zarmour.h
+++ b/include/zarmour.h
@@ -18,26 +18,24 @@
extern "C" {
#endif
+// @warning THE FOLLOWING @INTERFACE BLOCK IS AUTO-GENERATED BY ZPROJECT!
+// @warning Please edit the model at "api/zarmour.xml" to make changes.
#! /usr/bin/env ruby
require 'benchmark/ips'
require 'ffi'
module CZMQ
module FFI
module LibC
extend ::FFI::Library
ffi_lib ::FFI::Platform::LIBC
@paddor
paddor / hang.txt
Created December 24, 2015 10:25
CZMQ: Hang when destroying Zactors
$ ./zactor_issue.rb
CZMQ::FFI::Zactor
new Zactor
main thread: #<Thread:0x007fb5208bc3b0 run>
zactor thread: #<Thread:0x007fb52087e678 run>
nil: processing messages
nil: waiting for next message ...
#<FFI::Pointer address=0x007fb52059e860>: zactor created.
instanciates
libcallback_bug.dylib: callback_bug.h callback_bug.c
clang -dynamiclib -std=gnu99 callback_bug.c -o $@
@paddor
paddor / Makefile
Last active December 27, 2015 09:04
Rubinius: can't spawn a Thread from within an FFI::Function if the FFI::Function is called from another thread
libcallback.dylib: callback.h callback.c
clang -dynamiclib -std=gnu99 callback.c -o $@
@paddor
paddor / Makefile
Last active December 27, 2015 09:16
Rubinius: FFI::Function doesn't return break value
libcallback.dylib: callback.c
clang -dynamiclib -std=gnu99 callback.c -o $@
@paddor
paddor / Makefile
Created December 27, 2015 14:27
JRuby/Rubinius: doesn't abort C function when FFI::Function breaks
libcallback.dylib: callback.c
clang -dynamiclib -std=gnu99 callback.c -o $@