It may be easier to handle the db connection in a Racket module, and then import that module in Arc (because it may be a bit tricky to provide Racket-style keyword args within Arc).
It's fine being new to stuff. If you try clicking the link, there's installation instructions there:
To download and build rainbow and open a REPL:
git clone git://github.com/conanite/rainbow.git
cd rainbow
ant
ant # yes, twice. The second time uses rainbow to generate optimisations of itself
cd src/arc
java -server -jar rainbow.jar
Interesting! Arc is reading the request one character at the time. I think I see where it's happening, in the handle-request-thread function where readc is called.
So, for Nginx/Apache, are you suggesting Arc might be able to handle uploads if it's sitting behind Nginx/Apache acting as reverse proxy doing buffering?
Or is it more like doing anything with big files in Arc is a no-go, so it's better to have a separate setup of Nginx/Apache (with PHP or whichever) handling file the uploads?
> So, for Nginx/Apache, are you suggesting Arc might be able to handle uploads if it's sitting behind Nginx/Apache acting as reverse proxy doing buffering?
Nope, that won't help.
> so it's better to have a separate setup of Nginx/Apache (with PHP or whichever) handling file the uploads
That's the easiest approach. Not that you'd need PHP, just pop in a module to handle file uploads for you.
> Or is it more like doing anything with big files in Arc is a no-go
Not Arc as such but the implementation in srv.arc isn't designed for large files. You could read the old MZScheme documentation at http://docs.racket-lang.org/mzscheme/index.html and figure out how to read an input stream into a binary buffer, but it would be more work.
Thanks a lot for helping clear that up. Those limitations of Arc are definitely not immediately obvious from reading the docs and essays available on the language.
I love Arc as a language. A friend asked me to set up a web board for artists, so I thought it would be nice to work in Arc, and extend news.arc (instead of just using PHP or whatever) with some basic functionality for handling small-to-medium sized images (<1MB per image). However Arc 3.1 (and Rainbow and Anarki) seem to choke on POST requests larger than ~100KB, and become unresponsive afterwards. Would there be some other, more arcish way handling files over network?