Arc Forumnew | comments | leaders | submitlogin
A succinct method for sharing Arc libraries (github.com)
16 points by CatDancer 5759 days ago | 6 comments


3 points by Darmani 5757 days ago | link

Only problem is if your library is more than just a few files (e.g.: Ruby's RMagick requires you separately install ImageMagick; any Arc bindings to ImageMagick would require similar). Still, this is absolutely great! It seems so obvious and easy I'm surprised no other languages (that I know of) have it.

-----

3 points by CatDancer 5757 days ago | link

Browser-side Javascript is like this in a way, for example to include the JQuery library all you need to say is

  <script
    type="text/javascript"
    src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"
    />
and the browser doesn't need to download it again if it is already in the browser's cache. This was one of my inspirations as I've been doing a lot of browser Javascript lately. The addition I made was to avoid getting the latest version automatically, as I imagined people might be nervous about that. (I know I would be. After all, Javascript in the browser runs in a sandbox, but Arc on your server can call (system "rm -rf /") etc...)

-----

1 point by listic 5754 days ago | link

What prevents lib from working on Windows?

-----

1 point by CatDancer 5754 days ago | link

Presumably forward slashes in URL's would need to be changed to backslashes to store the library file in the lib directory with the corresponding path. (MzScheme has some platform-independent path manipulation procedures that could be used if they turn out to be convenient).

Also, is there a version of wget for Windows? What are the instructions for installing it that should be added to the lib documentation? Would the lib code need to invoke wget differently?

There may be some other things too, those are the ones that occur to me off the top of my head.

-----

1 point by eds 5744 days ago | link

There is a version of wget for Windows; you can get it from either Cygwin (http://www.cygwin.com/) or GnuWin32 (http://gnuwin32.sourceforge.net/). You can download the wget binary by itself at http://gnuwin32.sourceforge.net/packages/wget.htm .

I don't normally have any problems with forward/backward slashes on Windows (but I use Cygwin a lot, so my perspective may be biased).

-----

1 point by CatDancer 5744 days ago | link

So does the current version of lib work as it is with Cygwin and wget installed on Windows? Or is Cygwin even needed?

(I said that "Windows is not supported" but it would be more accurate to say that I haven't tried it with Windows).

-----