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

It should be possible, in theory, to create a wrapper script that executes the arc code, but the problems are:

1. Arc-on-mzscheme startup time is slow

2. Arc-on-mzscheme doesn't support properly launching from any directory other than the installation directory.

If the above problems are fixed (or if problem 2 is fixed and you don't find problem 1 too much of a problem) we could simply use shift-V, select range, then shift-1 and type the script name.



1 point by antiismist 6017 days ago | link

Is there any way to shoot the text over to an already running interpreter and capture the output (to delay startup times..)?

-----

2 points by almkglor 6017 days ago | link

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))

-----