The rescan/invalidation code for terminals/channels is different than that for scratches; it probably shouldn't be. e.g., this program:
require 'rubygems'
require 'bud'
class Phooey
include Bud
state do
table :truth, []=>[:val]
end
bootstrap do
truth <+ [[true]]
end
bloom do
stdio <~ truth {|t| ["foo"]}
end
end
p = Phooey.new
3.times { p.tick }
produces only a single "foo", rather than 3. If you redirect truth through a scratch, it produces the correct output.
The rescan/invalidation code for terminals/channels is different than that for scratches; it probably shouldn't be. e.g., this program:
produces only a single "foo", rather than 3. If you redirect
truth
through a scratch, it produces the correct output.