Re: [julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-07-10 Thread Femto Trader
Just a little comment here about these 2 repositories https://github.com/femtotrader/PubSub.jl A very basic Julia implementation of pub-sub (publish/subscribe) pattern https://github.com/femtotrader/SignalSlot.jl A very basic Julia implementation of signal slot pattern It's a work in

Re: [julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-06-04 Thread Tim Holy
I've sometimes also wished for an imperative version of Reactive, but Shashi has pointed out some pretty serious advantages of a declarative approach. My favorite is `throttle`, which allows you to make many separate updates to various `Signal`s and yet allow some operation that depends on all

Re: [julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-06-03 Thread Penn Taylor
Femto Trader, I came up with a way to get emit to work the way you wanted: https://gist.github.com/penntaylor/a4dd1ed268b2401e54a72705954180c5

Re: [julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-06-03 Thread Penn Taylor
I commented on https://github.com/JuliaLang/Reactive.jl/issues/99 with some information about slots not being executed twice unless there's a delay. The disconnect problem is a type error on your first parameter. I think you meant to have this: function disconnect(signal::Reactive.Signal,

Re: [julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-06-02 Thread Femto Trader
Thanks Penn... Here is my implementation on top of Reactive That I post also https://github.com/JuliaLang/Reactive.jl/issues/99 using Reactive Signal() = Reactive.Signal(Bool, false) typealias Slot Function function emit(signal::Reactive.Signal, args...; kwargs...) push!(signal,

Re: [julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-06-02 Thread Penn Taylor
Sampling only happens with Reactive if you explicitly use the `sampleon` function. Otherwise, you just map a function onto a Signal to get a new Signal. When the first Signal changes, the second Signal changes too. There's no sampling or polling going on in the normal case. I'm in no way

Re: [julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-06-02 Thread Bart Janssens
Hello, I would also be interested to know how and if this kind of functionality relates to Reactive.jl. Looking at the docs for Reactive, it seems it was designed for "continuous" signals. In Reactive, sampling seems to be needed, while in a classical signal/slot implementation (such as in Qt)

Re: [julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-05-31 Thread Femto Trader
Here is my very basic implementation #= A very basic signal / slot library Usage: function myslot01(args...; kwargs...) println("myslot01 with $args and $kwargs") end function myslot02(args...; kwargs...) println("myslot02 with $args and $kwargs") end function myslot03(a,b; x=-1,

Re: [julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-05-30 Thread Steven G. Johnson
Reactive.jl?

Re: [julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-05-29 Thread Femto Trader
I don't need something socket based. It's just to exchange messages between same thread, same process. Here is an example API Define signal stop_modified = Signal() Emit signal emit(stop_modified, args) Define slot function slot_on_stop_modified(args) println("stop was modified o $args")

Re: [julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-05-29 Thread Jacob Quinn
ZMQ.jl? Or maybe you don't need something socket based. -Jacob On Sun, May 29, 2016 at 1:25 PM, Femto Trader wrote: > Hello, > > I'm looking for a Julia library which implements one of these design > pattern: > > - signal / slot > - publish / subscribe > > Python have

[julia-users] Signal / slot (or publish-subscribe) libraries in Julia

2016-05-29 Thread Femto Trader
Hello, I'm looking for a Julia library which implements one of these design pattern: - signal / slot - publish / subscribe Python have many libraries for this purpose for signal / slot signalslot https://github.com/Numergy/signalslot smokesignal https://github.com/shaunduncan/smokesignal