below is a small program that isolates an issue I noticed with notin. when run, :outp has a tuple in two different timesteps, when it should only have one in the first.
note also that if you comment out the notin and replace it with the semantically equivalent "not ... include?" (in comments below), only one tuple is printed.
class AMO
include Bud
state do
scratch :inp, [:payload]
table :delivered, inp.schema
scratch :outp, inp.schema
end
bloom do
outp <= inp.notin(delivered, :payload => :payload)
outp <= inp do |i|
# i unless delivered.include? i
#end
delivered <+ inp
stdio <~ outp{|p| ["#{p} @ #{budtime}"]}
below is a small program that isolates an issue I noticed with notin. when run, :outp has a tuple in two different timesteps, when it should only have one in the first.
note also that if you comment out the notin and replace it with the semantically equivalent "not ... include?" (in comments below), only one tuple is printed.
class AMO include Bud state do scratch :inp, [:payload] table :delivered, inp.schema scratch :outp, inp.schema end
bloom do outp <= inp.notin(delivered, :payload => :payload)
outp <= inp do |i|
end end
alice = AMO.new alice.inp <+ [["foo"]] alice.tick alice.inp <+ [["foo"]] alice.tick alice.inp <+ [["foo"]] alice.tick