[gambit-list] Libraries for day-to-day projects ?

mikel evins mevins at me.com
Tue Jul 8 11:31:40 EDT 2014


On Jul 8, 2014, at 9:59 AM, Álvaro Castro-Castilla <alvaro.castro.castilla at gmail.com> wrote:
> Hi Eric,
> 
> I'm trying to work on that problem with the project http://schemespheres.org
> It is sort of Quicklisp for Gambit, with multiplatform support. It is not "complete" in the sense that some important parts are missing, but the upcoming version brings full support for Linux/OSX/iOS/Android. This version is currently beta (the development branch of the github projects).
> I will work soon also integrating or developing most of the things you mention, although I've been more focused on the general aspects of integrating several libraries/modules and multiplatform support. Most notably, it's lacking database interaction and a web server, but of course it's planned in the future. Most of those things can be found as independent project, and my intention is to merge some of them in the project (with the due credit and licenses). Some times this is straightforward and some times it isn't, and that's one of the reasons of the project. Spheres are fully compatible with Gambit, so you don't have to worry about getting locked into the platform.
> 
> Hope it helps, and I hope the project grows to better provide that what you need.

I'd love to see SchemeSpheres turn into a Quicklisp for Gambit. It might be challenging to achieve that. Some perspective about what Quicklisp is and what it does might be helpful.

The instructions for installing Quicklisp on a supported Common Lisp implementation are:

1. Download this link: http://beta.quicklisp.org/quicklisp.lisp

2. Load that file in your Lisp.

That's it; you're done. All 1,000 or so Quicklisp-supported libraries are now available to use.

If you want, you can add a small blob of code to your Lisp's init file that will automatically initialize Quicklisp any time you start the Lisp. Quicklisp itself can do that for you, if you like: eval (ql:add-to-init-file) and it will detect which Lisp you're running and add its startup code to the appropriate init file.

From some Lisps you can even skip Step 1 above, because they can load quicklisp.lisp directly from the URL.

Once you have Quicklisp, using it is about as easy as it could possibly be. Run ql:system-apropos to find out the exact name of a library you're interested in, then run ql:quickload with the name of the library. Done.

Quicklisp interoperates with ASDF, the system-definition tool, making it equally easy to use its libraries in your projects. All you have to do is add a :depends-on clause to your system definition, mentioning the names of any Quicklisp libraries you want to use, make sure that you've installed them using ql:quickload, and you're done.

Quicklisp doesn't have anything like SchemeSpheres' concept of "spheres". Its collection of libraries is a completely flat list of a thousand or so individual libraries with no sort of hierarchy or organization imposed on them. I haven't found that to be a weakness. On the contrary, it's simply one less thing I need to learn about in order to use it.

If it has a weakness it's that, with over a thousand libraries available and no reliable source of summaries of what they're for, it can take significant time to find out exactly which libraries you might want to use. That's a pretty small quibble in the scheme of things, though. Quicklisp is incredibly useful and convenient. I use it in 100% of my Common Lisp projects, and I miss it whenever I'm working in another language. 

There are pretty good package managers for some other languages, but it's hard to beat Quicklisp for convenience and ease of use. The fact that it works with most Common Lisp implementations is just gravy.






More information about the Gambit-list mailing list