           when 'ReplyOpenWindow'    then toBrowser 'open', b64d(getTag 'name', m), b64d(getTag 'text', m), +getTag 'token', m
           when 'ReplyFocusWindow'   then toBrowser 'focus', +getTag 'win', m
           when 'ReplyCloseWindow'   then toBrowser 'close', +getTag 'win', m
-          else console.info 'unrecognised'
+          else log 'unrecognised'
     return
 
   onevent = socket.onevent
   socket.onevent = (packet) ->
-    console.info 'from browser: ' + JSON.stringify(packet.data)[..1000]
+    log 'from browser: ' + JSON.stringify(packet.data)[..1000]
     onevent.apply socket, [packet]
 
   socket.on 'exec', (s) ->

  'index.css'
]

js = css = ''
do jsPrepare = ->
  js = jsFiles.map((f) -> s = fs.readFileSync f, 'utf8'; if /\.coffee$/.test f then coffee.compile s else s).join '\n'
  console.info "prepared js: #{js.length} bytes"
do cssPrepare = ->
  css = cssFiles.map((f) -> fs.readFileSync f, 'utf8').join '\n'
  console.info "prepared css: #{css.length} bytes"
jsFiles.forEach (f) -> fs.watch f, jsPrepare
cssFiles.forEach (f) -> fs.watch f, cssPrepare


  toInterpreter '<?xml version="1.0" encoding="utf-8"?><Command><cmd>Identify</cmd><id>0</id><args><Identify><Sender><Process>RIDE.EXE</Process><Proxy>0</Proxy></Sender></Identify></args></Command>'
  toInterpreter '<?xml version="1.0" encoding="utf-8"?><Command><cmd>Connect</cmd><id>0</id><args><Connect><Token /></Connect></args></Command>'

  client.on 'end', -> log 'interpreter disconnected'; socket.emit 'end'
  socket.on 'disconnect', -> log 'browser disconnected'; client.end()
