Arc Forumnew | comments | leaders | submitlogin
1 point by shader 4999 days ago | link | parent

I definitely think that shunting stderr to stdout, or any other method of displaying errors would make a huge difference.

Other than that, it's really rather cool. Great job!



1 point by evanrmurphy 4981 days ago | link

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

-----

1 point by evanrmurphy 4998 days ago | link

I definitely think that shunting stderr to stdout, or any other method of displaying errors would make a huge difference.

I agree with you and am working on it. The only reason I've hesitated with that feature is that certain errors reveal information about the sandboxing mechanism I'm not sure I want people to have.

  arc> (system "ls")
  subprocess: `execute' access denied for /bin/sh
Maybe it's not really an issue at all, but it is something I've worried about. I could probably hedge my bets by displaying more generic error messages than the ones the sandbox provides.

Other than that, it's really rather cool. Great job!

Thanks for that.

-----