Arc Forumnew | comments | leaders | submitlogin
4 points by almkglor 5891 days ago | link | parent

The return value of 'system is always nil I think.

I'm not sure if wrapping it in a (tostring ...) form will work

Edit: It does:

  arc> (system "echo foo")
  foo
  nil
  arc> (tostring (system "echo foo"))
  "foo\n"


3 points by almkglor 5891 days ago | link

Probably better formatted this way:

  (tostring:system "perl whatever")

-----

1 point by wfarr 5891 days ago | link

That did it. Thanks greatly!

-----

2 points by almkglor 5891 days ago | link

Welcome, I'm glad you actually bothered to put me up in your blog ^^

That said it would probably be a good project to build some sort of decent parsing in Arc. It might be good to use raymyer's parser combinator library, which although intended to work on lists will probably also work on string scanners. That said while I have a general knowledge of parser combinators I haven't actually used them (although I did write a value-change-dump (.vcd) file parser which I suspect used parser combinator concepts before I even learned about parser combinators - it was plenty slow though).

The other concern is the real problem of namespace pollution, raymyers' code uses some very short names - alt, lit. Fortunately they're not macros; raymyers specifically introduced optional laziness via delay-parser in order to reduce macro namespace collision.

-----

1 point by wfarr 5891 days ago | link

I'd be more than glad to help in what (little) ways I can to get Arc's string libraries up to par so that Markdown could be truly reimplemented in it.

-----