Arc Forumnew | comments | leaders | submitlogin
1 point by evanrmurphy 4980 days ago | link | parent

stderr is now officially shunted! :P

I use a variation of waterhouse's eval-w/stdout [1] that is essentially the original wrapped in an on-err:

  ; don't especially like name

  (def eval-w/stderr/out (expr)
    (tostring:let result nil
      (on-err (fn (c) (pr "Error: " #\" (details c) #\"))
              (fn ()  (let output (tostring (= result (eval expr)))
                        (unless (empty output)
                          (pr output))
                        (write result))))))
Let me know what you think next time you're at http://tryarc.org/.

[1] http://arclanguage.org/item?id=12214