bloom-lang / bud

Prototype Bud runtime (Bloom Under Development)
http://bloom-lang.net
Other
854 stars 60 forks source link

Rescan logic for channels/terminals is broken #292

Open neilconway opened 11 years ago

neilconway commented 11 years ago

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.