New to Lisp and a bit confused...

Whatever is on your mind, whether Lisp related or not.

New to Lisp and a bit confused...

Postby cryptogeist » Tue Apr 12, 2016 6:52 am

Hi folks, this is my first post here, and I am kind a new to Lisp, so apologies for any daft or dumb-seeming questions :) Before I ask about what I is currently baffling me, I should probably give a bit of background so you know where I'm coming from. I've been a professional programmer for more than twenty years, beginning with Visual Basic (in my defense, back then I didn't know any better..) and ASP (again VB based - activeX controls and whatnot) when the company moved towards web development. Since then, most of my programming experience has been internet based, mainly Perl and PHP on the server-side, Javascript
for client stuff, and more recently Python.
A few years ago I was lucky enough to spend a few months working with a VERY good Lisp programmer, who introduced me to this weird language that until then I had heard of but never actually even seen an example of. He also introduced me to Emacs and various tools to make coding in Lisp easier, like SLIME.Unfortunately my contract ended before I could learn much more than the absolute basics, but since then I have had an interest in Lisp - the code that I could understand was outstandingly elegant, and the idea of a beautifully organic language based almost purely on mathematical principles was and is very appealing. Unfortunately I never got around to building on this experience, until I recently decided to bite the bullet, get my head down, and actually learn to program, if not fantastically, the at least reasonably well, in Lisp.

So, that's pretty much where I'm at now - I have found many books and other resources to help, some of which are awful, but many of which are very well written and surprisingly humorous and entertaining for a programming textbook.

My current issue is Lambda functions - I have read as much as I could find on this subject, including going back to Alonzo Church's papers on Lambda Calculus (which pretty much all went waaaaay over my head). I get the idea of anonymous functions, and I know that they are kind of crucial to the power of Lisp (and according to some papers I've read, effectively ARE Lisp)...but I just really don't get why. Why, when and where would Lambda functions be used...I know this is a problem with my thinking, probably a result of my previous programming experience, and I also know that experienced Lispers will probably wonder why I'm having such a problem with this, but...I am. To be honest I don't know what I expect as an answer to this post...obviously some miracle suggestion would be great :) I know if I carry on writing Lisp programs I'll probably find I grok it without actually realising how or I guess maybe I'd just like to know if this is a problem that other people have come across and hopefully worked through - it'd be nice to know I'm not alone in finding this hard to comprehend....

I hope that all makes sense - it's a lot longer than I'd planned, but I'd like to think that in the future I may be able to contribute to this forum, if only in supporting other baffled new-Lispees. Thanks in advance to anyone who takes the time to read this, and double-plus thanks for anyone who replies.

Posts: 1
Joined: Tue Apr 12, 2016 6:13 am

Re: New to Lisp and a bit confused...

Postby David Mullen » Wed Apr 13, 2016 1:45 pm

If you come to Lisp with the stance of trying to find a use for this or a use for that, you're bound to be confused. Common Lisp—never mind the implementation-specific stuff—has a shit-ton of features. So the short answer is that each feature got added at some point because somebody needed it—perhaps as scaffolding in order to implement yet another feature of Common Lisp.

Take anonymous functions. I don't use them much myself. But if a macro expansion, under the hood, needs to save the lexical environment, then that's the way to do it. If you've ever defined a class, you know that a slot can have a default value form (an "initform"). The standard says, "The lexical environment in which this form is evaluated is the lexical environment in which the defclass form was evaluated." This means the initform needs to be in a function that's captured the environment.
David Mullen
Posts: 56
Joined: Mon Dec 01, 2014 12:29 pm

Re: New to Lisp and a bit confused...

Postby pard » Tue Oct 04, 2016 5:29 am

Hi. Anyone familiar with EPIC ? Having problems compiling and loading it Tried sbcl, clisp, cmucl but no luck.

Here is the error:

[1]> (load "compile-all.lisp")
;; Loading file compile-all.lisp ...
;; Loading file epi.lisp ...
#<PACKAGE SYSTEM> has no external symbol with name

I search google for help but nothing useful was found to support.

Help is appreciated
Posts: 7
Joined: Sun Sep 11, 2016 6:19 am

Return to The Lounge

Who is online

Users browsing this forum: No registered users and 3 guests