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
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
Femto Trader,
I came up with a way to get emit to work the way you wanted:
https://gist.github.com/penntaylor/a4dd1ed268b2401e54a72705954180c5
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,
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,
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
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)
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,
Reactive.jl?
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")
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
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
12 matches
Mail list logo