

Essential Elisp libraries - rachbelaid
http://www.wilfred.me.uk/blog/2013/03/31/essential-elisp-libraries/

======
gcv
> Previously, elisp package authors would try to make their code self-
> contained.

And I fervently hope that does not change. Moving Emacs to the world of
Gems/Bundler or Maven, where every package depends on two dozen half-assed
libraries (each of which transitively use at least two dozen more), and where
everything breaks all the time because someone decided to "upgrade" to the
JSON parser in vogue this week, hardly strikes me as an improvement.

~~~
wglb
quicklisp for lisp libraries is a smashing success.

Personally, I think the problem in the Ruby world is the blazing pace at which
folks are producing Ruby stuff.

~~~
fabriceleal
In ubuntu, when using the packaged clisp and asdf (installable via apt-get),
i'm unable to install quicklisp without some hacking around (it complains
about the asdf version).

But I agree with you, quicklisp is awesome.

~~~
wglb
Ok, I never use the host os package manager for certain key things, including
Lisp, Ruby. For Lisp, i get from the SBCL site or the proper site (SBCL,
Clisp, Clozure CL) I am using. And i compile the source each time. (Obviously
to bootstrap you gotta pull the binary the first time). After that, everything
is a piece of cake.

I have done less with ruby lately, but as I recall the only way to survive was
to use RVM or apparently now chruby to get everythin and compile it up.

~~~
fabriceleal
> For Lisp, i get from the SBCL site or the proper site (SBCL, Clisp, Clozure
> CL) I am using

I'll try that approach. Never really tried SBCL or Clozure CL.

> And i compile the source each time

You mean that you compile, for instance, Clisp? I tried to do it once, because
FFI usage is dependent of a the flag --with-dynamic-ffi being set in the
./configure step [1][2]. I don't remember exactly why, but I got some
difficulties in the build process, but I managed to do it.

This may be a little out of scope, but does anybody know about a common lisp
implementation that is more FFI-friendly?

[1]: [http://stackoverflow.com/questions/130636/how-to-compile-
cli...](http://stackoverflow.com/questions/130636/how-to-compile-clisp-2-46)
[2]: [http://stackoverflow.com/questions/3901698/is-there-a-way-
to...](http://stackoverflow.com/questions/3901698/is-there-a-way-to-get-the-
clisp-compiled-with-dynamic-ffi-support-on-mac-os)

~~~
aidenn0
I heard that clang is now the default C compiler on OS X? clisp can't be built
reliably with clang on x86_64 (clisp people on irc thought it was likely a bug
in clang).

sbcl doesn't rely on the C compiler so you should have no problems building it
on mac OS. Clozure CL was originally a CL specifically for the mac, so it
_definitely_ should work fine. SBCL seems to be the most popular open-source
implementation, as it can generate extremely good code, often with just
minimal type annotations.

------
minimax
I don't think you need 'cl for dolist†. Unfortunately elisp doesn't have TCO,
so what you would normally do with recursion in other lisps you have to do
with loops in Emacs lisp.

† [http://www.gnu.org/software/emacs/emacs-lisp-
intro/html_node...](http://www.gnu.org/software/emacs/emacs-lisp-
intro/html_node/Loops-_0026-Recursion.html)

~~~
lispm
As a Lisp user I prefer loop constructs over recursion. It makes the iteration
explicit.

------
abecedarius
Worth mentioning that two of these libraries are by the post's author.

------
jfb
make-hash-table is an abomination. Thanks for this.

~~~
lispm
(make-hash-table) is too difficult?

~~~
jfb
Enumerate the keys, please. Oh, no primitives? Well, you can just use maphash.
But wait: maphash _doesn't return values_. So you need your k/v function to
modify some state somewhere.

WAT

Fuck it, I'll just use an alist.

~~~
lispm
Enumerating keys makes (MAKE-HASH-TABLE) hard to use? What?

If you want to enumerate keys, write a function. In Common Lisp I write:

    
    
        (defun hash-table-keys (ht)
          (loop for k being each hash-key of ht collect k))
    

Done. That's Lisp. Need a function? Write it.

~~~
jfb
Cool, thanks. The problem here is in the elisp manual, then.

