Best program to use lisp on?

Discussion of Common Lisp

Best program to use lisp on?

Postby Brew » Fri Aug 01, 2008 6:31 am

Hi im new to using lisp and need to do some assignments, unfortunately ive not got any software on my computer to do so, Im wondering whats the most user friendly software that i could use. As a beginner ive got some pretty complex code to try get my head around, so any links would be greatly appreciated.
Thanks.
Im glad to see a lisp forum, good job.
Brew
 
Posts: 5
Joined: Fri Aug 01, 2008 6:25 am

Re: Best program to use lisp on?

Postby Harnon » Fri Aug 01, 2008 7:32 am

You want a compiler/interpeter right?
I suppose it depends what you want:
the personal edition of lispworks (free, but with limited heap space and 5 hr time limit, among other things) is very easy to use. http://www.lispworks.com/downloads/ In reality, all the 5 hr time limit means is that you have to exit lispworks and then re-load your program, and the time limit resets. So, no big deal.

Another easy one (as in there are binaries available for win32), if you don't mind not having a graphical interface, is clisp. http://clisp.cons.org/

I personally prefer sbcl over lispworks, mainly for the reason that it can use the package :arnesi (code walker), while lispworks can't. HOwever, it's not exactly 'easy to get into, atleast for win32, because you have to compile it yourself. Now, if you know how to compile programs, i guess its no big deal.

Oh, and if you want to use libraries defined by others, the asdf package is a must (it consists of only 1 file). Since i knew i had trouble at first using asdf, just post if you want some handy code that'll make using asdf a breeze (well, atleast on win32. i guess ic ould expand the same to other platforms.)

Edit: oh, and on lispworks, i haven't yet found a way to open multiple lisp files on the personal edition. maybe i'm missing something.
Edit: lol, i just checked, and there is a way. hmm, too hasty
Harnon
 
Posts: 78
Joined: Wed Jul 30, 2008 9:59 am

Re: Best program to use lisp on?

Postby qbg » Fri Aug 01, 2008 8:02 am

Harnon wrote:I personally prefer sbcl over lispworks, mainly for the reason that it can use the package :arnesi (code walker), while lispworks can't. HOwever, it's not exactly 'easy to get into, atleast for win32, because you have to compile it yourself. Now, if you know how to compile programs, i guess its no big deal.

The SBCL website has a link to the binary for 1.0.13 on windows. But there is that "Your Kitten of Death awaits!" thing, which means you can/will get unreproducible GC variant lost, exception access violations, etc. at random points in time.
Edit: oh, and on lispworks, i haven't yet found a way to open multiple lisp files on the personal edition. maybe i'm missing something.

Just use File->Open, the Open button, or C-x C-f. The editor is Emacs based so your files are in different buffers; take a look under the buffers tab, or use C-x b

Anyways, I like the LispWorks Personal Edition for use in windows, though I might also use CLISP or SBCL depending on what I'm doing.

Under GNU/Linux, I have CLISP, but I develop with SBCL+SLIME.
qbg
 
Posts: 64
Joined: Mon Jun 30, 2008 1:05 pm
Location: Minnesota

Re: Best program to use lisp on?

Postby Brew » Fri Aug 01, 2008 9:01 am

Thanks alot guys, i downloaded lispworks
It was the same one i used in college, i just couldnt remember the name of it. Well i must try get some work done now
I'll most likely post here if i need help with code. Can i do that?
Brew
 
Posts: 5
Joined: Fri Aug 01, 2008 6:25 am

Re: Best program to use lisp on?

Postby findinglisp » Fri Aug 01, 2008 9:09 am

Brew wrote:I'll most likely post here if i need help with code. Can i do that?


You bet. That's why LispForum exists.

Personally, I use Emacs/SLIME+SBCL on Linux and Emacs/SLIME+CLISP on Windows. I'm looking forward to the day that SBCL on Windows stabilizes enough to use it all the time there, too. I have nothing bad to say about CLISP. It's a really good implementation with a strong set of standard libraries. For general programming work, I simply prefer SBCL.
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/
findinglisp
 
Posts: 440
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX

Re: Best program to use lisp on?

Postby Brew » Fri Aug 01, 2008 9:28 am

Ok thats great to know thanks a million :D , Thats like a lifesaver to know.
I'll post the following up, perhaps it'll mean more to you guys. Infact im sure it's simple stuff which really could be done in a few lines of code.

For one section anyway , I must write a lisp function "price-order-total" which takes a list representing an order in the form ((item1 quantity1 unit-price1)(item2 quantity2 unit-price2) ... ) and then it returns a total price for the complete order.
Has anyone any experience doing this type of thing, im sure its pretty darn basic but im under some serious pressure with alot of stuff, anything would be GREATLY appreciated.
Thanks in advance.
Brew
 
Posts: 5
Joined: Fri Aug 01, 2008 6:25 am

Re: Best program to use lisp on?

Postby Harnon » Fri Aug 01, 2008 10:15 am

a great learning utility for lisp is http://gigamonkeys.com/book/, practical common lisp.
once you're a little more advanced, i would suggest reading the free book on lisp (Free download)
http://www.paulgraham.com/onlisptext.html

Try
(defun price-order-total (item-list)
(loop for item in item-list
summing (* (second item) (third item))))

or, a little neater
(defun price-order-total (item-list)
(loop for item in item-list
summing (destructuring-bind (item quantity unit-price) item (* quantity unit-price))))
though theres really no use for destructuring bind, the first one is faster

Take a look at 'loop for black belts' in practical common lisp
Just wondering, what is this work for?
Harnon
 
Posts: 78
Joined: Wed Jul 30, 2008 9:59 am

Re: Best program to use lisp on?

Postby Brew » Fri Aug 01, 2008 10:55 am

Harnon wrote:Just wondering, what is this work for?


Well a while back i had some problems at home and unfortunately this is course work which ive to make up over the summer. Ive got pages of it and i was looking into it the past few days with no progression what so ever. So i took a break, reassessed things and thought i'd check online to see if there was something out there that could give me a push start in the right direction. So i really appreciate you helping out there harnon. I hate being a sponge when it comes to askin for help with code. Thanks again.
I had looked at a pdf file with info of paul grahams notes and found it a little clustered, perhaps needing something a bit more basit so That gigamonkeys.com link you sent me was just what i needed, i didnt think there were free tutorials online for this sort of thing, Again, thanks Harnon.
Brew
 
Posts: 5
Joined: Fri Aug 01, 2008 6:25 am

Re: Best program to use lisp on?

Postby qbg » Fri Aug 01, 2008 11:39 am

Harnon wrote:or, a little neater
(defun price-order-total (item-list)
(loop for item in item-list
summing (destructuring-bind (item quantity unit-price) item (* quantity unit-price))))

Or even neater:
Code: Select all
(defun price-order-total (item-list)
  (loop for (item quantity price) in item-list
        sum (* quantity price)))
qbg
 
Posts: 64
Joined: Mon Jun 30, 2008 1:05 pm
Location: Minnesota

Re: Best program to use lisp on?

Postby Harnon » Fri Aug 01, 2008 12:39 pm

Lol, i forgot for a second that the loop macro had a built in destructuring bind. :roll:
Harnon
 
Posts: 78
Joined: Wed Jul 30, 2008 9:59 am

Next

Return to Common Lisp

Who is online

Users browsing this forum: No registered users and 4 guests