This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Best way to start on Windows : need advices

14 posts · 13691 views

Hi,

I'm new to Common Lisp, but setting up a good Lisp environment under my OS seems to me the major problem.

In fact, I've installed Slime + SBCL 1.0.13 on Emacs 22.
Now, I wanted to use some external libs, like vecto or cl-pdf. I've seen I have to use asdf-install, but how to install it on Windows ? [I've read this useful post, but I did not understood the last point in the additional notes section ]

When I look at projects like PLT-Scheme, there's a great multiplateform IDE, and no problems to install it: you just have to code.
Now, going to Common Lisp, you either have a choice between Emacs+Slime and you'll have to spent hours on to configure them for a newbie, and proprietary tools like Allegro or LispWorks (yes, with restricted free versions) why ?

Nothing to the above, but maybe that can help some of you. Here's a Firefox plugin (working with version 3) that brings a BBCode bar for forums like this one : BBCode bar

See you,

Kib.

Re: Best way to start on Windows : need advices

I'm just a dabbler, but I've found SLIME+SBCL to be a pretty nice environment. I don't bother with ASDF-install. I just unzip the archives I need into the sbcl directory. It's slightly annoying, but still easier than getting ASDF-install working under Windows.

Re: Best way to start on Windows : need advices

I currently use xemacs on windows to connect to sbcl running on linux, but had reasonable luck a few years ago using xemacs / slime / clisp on windows. I had followed some old Bill Clemenson articles, and had eventually got cl-sdl working. I made made a simple zombie simulation with a grid showing zombies infecting people and everyone moving around, it was pretty fun. I no longer use that setup, I bought an EEEPC and run sbcl / emacs / slime off that little guy.

These more recent windows tutorials looked pretty good to me:
The question of CLISP vs SBCL is an active debate, but for now on windows I think they give comparable features.

I've also seen a lot of people suggesting getting the free VMWare tools and just running linux on your windows, and do your lisp in there, that could be easier if your hardware can handle the VM.

Re: Best way to start on Windows : need advices

Candera :
thanks, I was not aware that I can just unzip the asdf file inside my sbcl directory. That works fine, even if I suppose that's not the best solution.

ryepup :
Thanks for those links, I'll check them as soon as possible.

dmgenp:
This seems really interesting, I need to check this solution too.

Re: Best way to start on Windows : need advices

I've started a google project last year called CLOW - Common Lisp On Windows, but haven't got time to further put more into it.

As it's now, it's just a bunch of bat files, and list of files from the net - where stuff is going to be installed on your machine. My idea was to have different lisps running for Windows, but nowadays I'm more sticking to one lisp at a time.

http://code.google.com/p/clow
or directly http://clow.googlecode.com/files/clow.zip

But SVN contains a little more up-to date.

Now my plans are to rewrite these batch files in some small lisp distribution like ECLS and distribute with it. Probably I'm taking the wrong approach anyway, but my experience from 20+ years using C, Pascal, Makefiles, etc. could be hard to change...

Re: Best way to start on Windows : need advices

I use this function (stolen from the internet) and it works with both clisp and sbcl:
(defun register-asdf-systems (&key (verbose nil))
  "Registers packages in asdf-registry directory with the asdf central registry"
  (dolist (dir-candidate (directory "/path/to/site-systems/*/"))
    (let ((asd-candidate (merge-pathnames "*.asd" dir-candidate)))
      (when (directory asd-candidate)
        (when verbose
          (format t "Registering ~A ...~%" dir-candidate))
        (pushnew dir-candidate asdf:*central-registry* :test #'equal)))))
Then, I just call (asdf:operate 'asdf:load-op :cl-something). The problem is that you have to manually download and unpack all libraries you need (including dependencies) to /path/to/site-systems/ . But once you've done that, you only need to call (register-asdf-systems) when you start your lisp image.

Re: Best way to start on Windows : need advices

Hi.

Have you tried Lisbox yet? It is a fully configured lisp/emacs package for windows (allegro, clisp) , linux (allegro, clisp, sbcl) and os x (allegro, sbcl, openmcl, clisp). http://gigamonkeys.com/lispbox/

Also take a look at Peter Seibel's book Practical Common Lisp Book http://gigamonkeys.com/book/, if you haven't already.

Cheers.

Re: Best way to start on Windows : need advices

fbern :

I have already tried LispBox and it works quiet well, but not with adsf-install, taht's why I asked the question here.
And I bought my first Lisp book 2 month ago "Practical Common Lisp". It is worth a look, for sure!

Re: Best way to start on Windows : need advices

kib2 wrote:When I look at projects like PLT-Scheme, there's a great multiplateform IDE, and no problems to install it: you just have to code.
Now, going to Common Lisp, you either have a choice between Emacs+Slime and you'll have to spent hours on to configure them for a newbie, and proprietary tools like Allegro or LispWorks (yes, with restricted free versions) why ?
..i don't think anyone has answered this.. the reason is that very few SBCL users and developers use Windows so things will not work as good (or at all) there as they do on Linux

..assuming you're not working on OpenGL or something like that; when Lisp/SBCL software needs to target Windows users/customers i create portable web front ends .. works great

if you don't have access to a Linux machine, you can setup a virtual one using VirtualBox:
http://www.virtualbox.org/ ..edit: apparently coLinux also works by the way

then, when you have your killer application ready; dump an executable SBCL core from it, compress the core (about ~10MB or so) and upload it to a cheap Linux VPS .. it runs for months and months; stable as a rock in my experience

Re: Best way to start on Windows : need advices

I am on Windows and do not use asdf-install too. It is not that difficult to unpack the library somewhere.
After loading asdf do:
(pushnew "path/to/the/library/dir/" asdf:*central-registry* :test #'equalp)
Now the library is registered in asdf can find it.

I have a file 'setup-asdf-registry.lisp' that does it for all the installed libraries. Also it loads
asdf.

So the first line when I start coding is
(load "c:/usr/unpacked/lisp-libs/setup-asdf-registry.lisp")
After this all the libraries are registered in asdf.

'setup-asdf-registry.lisp' contents looks approximately like this:
;; load asdf
#+(or ecl sbcl) (require 'asdf)
#-(or ecl sbcl)
(load "/usr/unpacked/lisp-libs/asdf/asdf")

;; register all the libraries
;; provided that all them are unpacked
;; into directory "/usr/unpacked/lisp-libs/"
(flet
    ((reg (relative-path)
       (pushnew (concatenate 'string "/usr/unpacked/lisp-libs/"
                             relative-path) 
                asdf:*central-registry*
                :test #'equalp)))
  (reg "alexandria/")
  (reg "anaphora-0.9.3/")
 ...
  (reg "zip/"))
As you see, this setup is not tied to particular lisp and allows to freely switch between SBCL and CLISP.