Arc Forumnew | comments | leaders | submitlogin
3 points by aw 5197 days ago | link | parent

For documentation, see Ken's arc2 documention (http://arcfn.com/doc/index.html) and "what's new in arc3" (http://arcfn.com/2009/06/whats-new-in-arc3.html)

Compile into binaries: what's the end result you care about?

To run code without the interactive console, in pure arc3.1 one way to do it is to add calls to load your own code in libs.arc. Iirc some people have also made extensions that allow you to run Arc code from the command line, I don't have a reference in front of me but you might try searching the forums or looking in Anarki.



1 point by alimoeeny 5197 days ago | link

I mean 1) if I want to run a web app I don't want my server to depend on an interactive console, I want to run it (them) in the back and stop and start them and ... 2) if I want to run something on a host or a cluster (neither usually have the interactive console, so a binary could help there In other words, can you give me some use cases that I can understand how you develop and deploy arc apps?

By the way the documentation link in arcfn.com is what I was missing, thanks.

-----

2 points by aw 5197 days ago | link

I like using the "screen" program (available on most servers, try typing "man screen"), which lets me pop in and see any error messages.

For an automated startup, you might try something like this shell script (after modifying libs.arc to load your code):

  #!/bin/sh
  cd /location/of/arc/directory
  nohup mzscheme -f as.scm >log 2>&1 &
a caveat here is that "nohup" redirects stdin to /dev/null which in turn will cause Arc to go into an infinite loop if it gets to its REPL, a trick is to have the last thing called in libs.arc be "(serve)" (or "(asv)" etc.), which doesn't return and thus Arc won't get to the REPL prompt.

-----

2 points by alimoeeny 5197 days ago | link

Thanks, I use screen all the time, still I fill there is a lot fundamental differences between ways of arc and ways of "bulb" (python for me) that I need to learn. By the way the idea behind Anarki is that people come and fork and if they did something worthwhile it could be merged back, right?

-----

3 points by shader 5196 days ago | link

Yes, the main purpose of Anarki is as a place for people to share the work they've done on/for arc. Since arc itself is easily modified, a lot of the code on Anarki actually changes the language. There is also a fair amount of library developed there as well, though since most important library functions can be lifted from Racket that's not so much of an issue.

However, beyond simple bug fixes pg hasn't ever discussed much about changing the language itself with the community. As far as I know, none of even the truly good, simplifying and useful features of Anarki are planned to be lifted to arc.

-----