Arc Forumnew | comments | leaders | submitlogin
Any way to write standalone scripts?
12 points by offby1 6175 days ago | 6 comments
I've tried fiddling with as.scm, but apparently my mzscheme-fu is but weak.


4 points by parenthesis 6174 days ago | link

In file script.arc :

  (prn "Hello, you know!")
  (quit)
In file script :

  #!/bin/bash
  mzscheme -m -f as.scm  < script.arc
(Putting /.../as.scm if necessary.)

Then

  chmod +x script
And

  ./script

-----

2 points by scav 6173 days ago | link

Hmm. Problem is, that means stdin is your arc script. For many scripting tasks, you want stdin to be the input to your script, e.g. a pipe or console or redirected file.

-----

1 point by offby1 6174 days ago | link

I got no problem with that, if it works! Thanks

-----

2 points by apotheon 6174 days ago | link

Any way to do it that isn't a hideous hack?

-----

1 point by kens 6168 days ago | link

See http://arclanguage.com/item?id=1424

-----

1 point by sarosh 6173 days ago | link

Has anyone thought about using Platypus (on OS X)?

-----