Arc Forumnew | comments | leaders | submitlogin
2 points by almkglor 6016 days ago | link | parent

Possibly some mkfifo hackery in Linux?

Possibly do something stupid like:

  mkfifo to_arc
  mkfifo from_arc
  ./arc.sh < to_arc > from_arc
Then just pipe commands through the to_arc and from_arc FIFO's? (this is untested)

Edit: Alternatively, you might want to do this in a thread on an existing arc session, again still using mkfifo hackery:

  (w/infile i "to_arc"
    (w/outfile o "from_arc"
      (w/uniq invalid
        (def foo ()
          (let ip (read i invalid)
            (if (isnt ip invalid)
                (write (eval ip) o)))
          (foo)))))
  (thread (foo))