Arc Forumnew | comments | leaders | submitlogin
Libraries support
2 points by d0m 5225 days ago | 1 comment
First, sorry for my newbie question. I'm willing to give Arc a try but each time I'm stuck because I don't have external libraries (smart time parser, sockets, mysql, etc.)

Of what I've seen, there is jArc that support java .. which kind of fix my problem. However, I find the jarc documentation missing. I.e. How do I import package, where do I start ? I know it might be obvious to you.. but I'm kinda lost there.

The other way is to use the underlying mzscheme..? Is that what PG had in mind when he created Arc? To supply a minimal language but to be able to use external libraries in the underlying interpreter..?

Finally, concerning webapps, is there a way to use arc a little bit more like I would use Django? I.e. a simple routing to functions and a built-in template engine instead of mixing arc code with html and javascript..?

Thanks for your help, it's appreciated.



2 points by evanrmurphy 5224 days ago | link

> First, sorry for my newbie question.

No need to apologize. :)

> stuck because I don't have external libraries (smart time parser, sockets, mysql, etc.)

Well, I would consider html.arc, srv.arc, app.arc, strings.arc and even some of arc.arc to be libraries. And if you include Anarki's lib/ directory along with all the resources from places like http://awwx.ws/, http://github.com/rocketnia/lathe and this forum, I think we've got a sizable collection going. Granted a lot of it is scattered and not as developed as in some other languages, and we also don't have a standard module system yet. :P

> Is that what PG had in mind when he created Arc? To supply a minimal language but to be able to use external libraries in the underlying interpreter..?

You might be interested (if you haven't already read them) in what pg has written about arc at http://www.paulgraham.com/arc.html. My impression is he thinks it's too soon to get focused on libraries because he's still working on the core language. (http://arclanguage.org/item?id=12127 is a relevant exchange too.)

> a little bit more like I would use Django? I.e. a simple routing to functions and a built-in template engine instead of mixing arc code with html and javascript..?

Maybe you could elaborate on this a bit? If I understand correctly, then I'd respond that html.arc is not unlike Django's templating engine, and you're welcome to separate your code into different files if you prefer it that way. (You're just not forced to.)

> Thanks for your help, it's appreciated.

I hope this was of some help. Thanks for your post!

-----