Rant: lisp is not C. Get over it.

Discussion of Common Lisp
gugamilare
Posts: 406
Joined: Sat Mar 07, 2009 6:17 pm
Location: Brazil
Contact:

Re: Rant: lisp is not C. Get over it.

Post by gugamilare » Tue Apr 14, 2009 3:56 pm

Balooga wrote:Newbies are able to install the free implementation of Python or Ruby in Windows in a couple of clicks. The same newbies try to install a free CL implementation in Windows and spend the next day trying to get Emacs working with Slime and SBCL/CLISP.

I have to modify my .emacs file to run SLIME?
An .emacs file? What is that?
OK I've defined one, but Emacs won't load it, why?
It goes in the Emacs home directory? Whats that?
I have one already its called 'My Documents', why can't emacs look there?
Oh, I have to create a new $EMACS_HOME environmental variable as well?
A new directory off of C:\ with no spaces in the folder name?
Why can't Emacs do all of this on installation. What is this, 1993?

... etc etc.
You have a point. Managing to get a free implementation up and running by hand in Windows is almost a nightmare. I tried to do it this weekend and SLIME wouldn't work very well. It is impossible to compile anything easily since you need a working mingw or cygwin environment. The only easy way to get CL in Windows is downloading an evaluation copy of Lispworks (maybe Allegro or Corman). Well, I never tried lispbox, maybe it is a third option, but it gives you a bad feeling since there is a 2005 at the bottom of the page, and lispbox uses clisp version 2.37...

On the other hand, making it work in Ubuntu is just a matter of

Code: Select all

sudo apt-get install emacs slime sbcl
and you will already have asdf and asdf-install. You can also get them manually if you want

Code: Select all

sudo apt-get install asdf asdf-install
There is Weitz's lisp starter pack. But recommending this might give people the feeling that they can't create entirely open source applications - it may depend on the "commercial" Lispworks to function properly, and the free version is limited. This is not a good thing because it will make "GPL fans and commercial licenses haters" to just give up.
I'll this ABLE editor soon. It shouldn't be hard to make an application that works right after installing it. I am saying this because I installed Bunnyslayer for Windows under Wine and it worked... just like that!

jrigler
Posts: 5
Joined: Tue Apr 07, 2009 11:30 am

Re: Rant: lisp is not C. Get over it.

Post by jrigler » Sun Apr 26, 2009 9:35 pm

I think the problem is that most people simply don't care. They code in whatever someone pays them to code in and probably do it rather poorly. It stands to reason that your average programmer is, well average, then you have your below-average programmers... If you are a fan of lisp, do you find other mind-numbingly wonderful things in your life that other people just don't get when you try to explain it to them? Lisp is part of a secret world of excellence that may never catch on. At the end of my street is a discreetly hidden path that leads to a secret beach that only a select few people seem to know about. Let lisp be your secret beach and let the other folks be happy with C# and Java.

jwm-art
Posts: 9
Joined: Wed May 20, 2009 2:24 pm
Location: Canterbury, Kent, England
Contact:

Re: Rant: lisp is not C. Get over it.

Post by jwm-art » Fri May 22, 2009 10:54 am

Hi,

As a complete newcomer to Lisp, and having been programming in C,C++, and PHP I thought I'd share a few thoughts with you about my scant experience so far learning Lisp. I'm not an IT professional nor have ever been employed in the industry, and only have a basic 2yr computer-studies qualification (eurrgh COBOL), so perhaps I'm a slightly atypical Lisp learner.

I'd heard a few things about Lisp like 'if you want to be a better programmer...' and saw a review a year or two ago, in Linux Format of "Practical Common Lisp", rating it highly and recommending it for newcomers and so on impulse I bought it.

I began with Lisp In A Box + Emacs. For me, Emacs is horrible and too confusing, I may as well state that I refuse to ever try using it. I can vaguely remember also, having some trouble getting LispInABox running on Debian Etch too. So I gave up on Lisp pretty quickly and sent a post to a local LUG asking if anybody was interested in buying the book. They weren't.

FFWD to a couple of days ago and I'm perusing the 'net and end up reading http://yosefk.com/c++fqa just for fun. After an initial small feeling of hostility, I started to understand, leading me back to 'Practical Common Lisp' again.

This time I've stuck purely to Debian packages, CLISP was the first I found using Aptitude. I gave Emacs a quick spin and thought 'nah'. I installed SBCL too, just for a quick comparison but CLISP gets my vote because I can use the arrow keys for history and line editing easily - maybe SBCL can too but I'm trying to learn Lisp not configure software. At the moment I'm using Nedit for writing src files. I've used Nedit for a long time (Gedit would be fine but I try to avoid having GNOME on my system (KDE the same)) but unfortunately it does not have a syntax pattern for LISP (I found one for scheme online). From what I've read, perhaps a better editor might be needed?

This time I'm feeling more confident that I can learn Lisp. From having read more online material, I'm also starting to form a few ideas as to what I might actually want to code in it, or at least the possibilities, which is a pretty important target to have when learning a new language, I think (even though now, I'm barely even taking baby steps).

At this point, I've not learned much, but the desire is there. Because of wanting to learn, the parenthesis is not bothering me and to be honest, I can't see what the big deal is anway if(!(thing=malloc(sizeof(thing_t)*count))){. The hyphens I need to get used to. I'm finding it difficult to identify in Lisp code, what is what, it's all just words to me and keep getting this nagging feeling it's not a real language but just a database or something (I know it *is* a programming language). It does bother me that the (shared) server hosting my website does not have any Lisp system on it (but I could always ask, they might oblige), and as mentioned earlier in this thread, the problem with executables etc, but again, these things are not really applicable to me at this stage......

Paul Donnelly
Posts: 148
Joined: Wed Jul 30, 2008 11:26 pm

Re: Rant: lisp is not C. Get over it.

Post by Paul Donnelly » Fri May 22, 2009 1:01 pm

jwm-art wrote:This time I've stuck purely to Debian packages, CLISP was the first I found using Aptitude. I gave Emacs a quick spin and thought 'nah'. I installed SBCL too, just for a quick comparison but CLISP gets my vote because I can use the arrow keys for history and line editing easily - maybe SBCL can too but I'm trying to learn Lisp not configure software.
You'll have an easier time if you're using an environment that integrates with your Lisp to give you a better REPL and debugger access than those.
jwm-art wrote:At the moment I'm using Nedit for writing src files. I've used Nedit for a long time (Gedit would be fine but I try to avoid having GNOME on my system (KDE the same)) but unfortunately it does not have a syntax pattern for LISP (I found one for scheme online). From what I've read, perhaps a better editor might be needed?
Yeah, a better editor will make your life much easier. It will let you load code into your Lisp without doing whatever dance you're doing now (cut/paste? save/load?), provide a full-featured REPL, debugger access, and everything else a Lisper expects. I don't see any point in syntax highlighting, but some people like it, and any decent editor that provides it will do Lisp too. Try Emacs with SLIME.

Jasper
Posts: 209
Joined: Fri Oct 10, 2008 8:22 am
Location: Eindhoven, The Netherlands
Contact:

Re: Rant: lisp is not C. Get over it.

Post by Jasper » Fri May 22, 2009 3:14 pm

Emacs+slime seems to be best, currently to me. Dunno how you're confused with it. Note that C-x puts you in another mode (other things have another meaning then.) Also you might want to remove the toolbar with the icons because sometimes it steals focus and then you can't do anything ><. You probably also want a good ~/.emacs file. (But i guess that is for that subforum.)

There is Able, but it doesn't have enough easy keyboard shortcuts and doesn't have a debugger. (And you can't have multiple buffers on a screen.) As a plus, it is cross platform. I am working on a little lisp editor, also based on ltk, by building upon but mostly scavenging from Able, but i can't promise that will lead anywhere. Also trying an idea there, making it customizable by putting together functions, thinking "Not only code is data, nested (higher order)functions are too."

findinglisp
Posts: 447
Joined: Sat Jun 28, 2008 7:49 am
Location: Austin, TX
Contact:

Re: Rant: lisp is not C. Get over it.

Post by findinglisp » Fri May 22, 2009 5:31 pm

jwm-art wrote: This time I've stuck purely to Debian packages, CLISP was the first I found using Aptitude. I gave Emacs a quick spin and thought 'nah'. I installed SBCL too, just for a quick comparison but CLISP gets my vote because I can use the arrow keys for history and line editing easily - maybe SBCL can too but I'm trying to learn Lisp not configure software. At the moment I'm using Nedit for writing src files. I've used Nedit for a long time (Gedit would be fine but I try to avoid having GNOME on my system (KDE the same)) but unfortunately it does not have a syntax pattern for LISP (I found one for scheme online). From what I've read, perhaps a better editor might be needed?
A couple things:

CLISP has history because it uses the GNU Readline library. This is actually a source of problem because it actually forced CLISP to change its license to GPL because Readline is a full GPL library (not LGPL). As a result, if you develop anything on CLISP that you ever want to release, make sure you understand the CLISP licensing fully. That said, CLISP is a good implementation and I use it on Windows when I want to program something there. I wish its license was a little more clear. SBCL carries an MIT license and thus cannot link with Readline. There are other Lisp-based solutions for that if you really care, but for your needs right now, I'd just stick with CLISP if it's more convenient for you.

As for editors, you can surely use anything you want. I'll tell you that while Emacs can be intimidating, it's very, very powerful. Using something like Nedit is fine, but it's sort of like using a hand saw (Nedit) rather than a chain saw (Emacs). If you really want to be a power Lisp programmer, you'll at least want to use vi with the Limp plugin ( http://mikael.jansson.be/hacking/limp/docs/ ). Once you finally internalize Emacs, you'll never reach for anything else, particularly as a Lisp programmer since Emacs is programmable in its own version of Lisp. But again, don't let editors become a barrier between you and learning Lisp. Paul Graham, a prominent Lisp hacker, uses vi and cuts/pastes code from the editor to the REPL for testing. You can do the same thing in other editors, too (gedit, Kate, etc.).
Cheers, Dave
Slowly but surely the world is finding Lisp. http://www.findinglisp.com/blog/

gugamilare
Posts: 406
Joined: Sat Mar 07, 2009 6:17 pm
Location: Brazil
Contact:

Re: Rant: lisp is not C. Get over it.

Post by gugamilare » Fri May 22, 2009 6:51 pm

There are other editors available as well, if you don't want to learn how to use Emacs, at least for now. Here are some alternatives.

- Eclipse with Cusp plugin
- Able
- Lispworks (commercial Lisp which comes is a fancy editor - you may want to install LW-addons as well).
- Allegro

JamesF
Posts: 98
Joined: Thu Jul 10, 2008 7:14 pm

Re: Rant: lisp is not C. Get over it.

Post by JamesF » Sat May 23, 2009 4:39 am

jwm-art wrote:For me, Emacs is horrible and too confusing, I may as well state that I refuse to ever try using it.
If it helps, I've made several honest efforts to come to terms with emacs, and have drawn the conclusion that it's just not for me. Personally, I'm very fond of Vim and Vilisp, but nedit will certainly do the job to start with.

The uniform syntax can be a bit disorienting, but stick with it - it will all make perfect sense before long.

phil
Posts: 27
Joined: Wed Aug 13, 2008 1:23 pm
Contact:

Re: Rant: lisp is not C. Get over it.

Post by phil » Sat May 23, 2009 1:50 pm

Jasper wrote:There is Able, but it doesn't have enough easy keyboard shortcuts
Could I ask what you mean here as every feature provided by ABLE has an associated keyboard shortcut?
Jasper wrote:and doesn't have a debugger. (And you can't have multiple buffers on a screen.) As a plus, it is cross platform. I am working on a little lisp editor, also based on ltk, by building upon but mostly scavenging from Able, but i can't promise that will lead anywhere.
Interesting! When you have a debugger implemented would you consider contributing it back upstream to ABLE?

jwm-art
Posts: 9
Joined: Wed May 20, 2009 2:24 pm
Location: Canterbury, Kent, England
Contact:

Re: Rant: lisp is not C. Get over it.

Post by jwm-art » Sun May 24, 2009 3:17 am

Hi,

Thanks for the replies and advice. At the moment I'm not doing much code editing so it's not a massive issue but it seems likely I will have to either learn something like Emacs or vi - which I'm not keen to. I thought Cusp sounded great until I discovered it was a plugin for the Eclipse IDE. I've attempted briefly to use Eclipse in the past out of curiosity but got nowhere with it. Cusp also depends on a newer version (of Eclipse) than Debian Lenny provides and I don't want to download the latest (too large/slow) and mess about configuring.

I have been using ABLE a little, and I like how easy it is to transfer code from a file to the repl. Perhaps a menu would be nice for those of us who are more point+clicky though, maybe. I will continue using it along with Clisp on its own for debugging. It's disappointing how limited the IDE choices are. Considering all the great stuff I've read about developing software with CL it seems ironic the one IDE which looked most feature-complete for a non-emacs user, is written in Java!

Incidently, (although I never use it) Anjuta can syntax-highlight CL if you use the Scintilla plugin (as opposed to GtkSourceView).
Cheers,
James.

Post Reply