lisp

LET versus LET* in Common Lisp

I understand the difference between LET and LET* (parallel versus sequential binding), and as a theoretical matter it makes perfect sense. But is there any case where you've ever actually needed LET? In all of my Lisp code that I've looked at recently, you could replace every LET with LET* with no change. Edit: OK, I understand why so...

Is it feasible to do (serious) web development in Lisp?

It obviously is possible to write almost any kind of application in almost any programming language, especially in such a powerful one as Lisp (be it Scheme or Common Lisp). But is it practical to use it for web development? If so, what should be a good starting point? Where can be found the proper resources (tools, libraries, documentat...

How thoroughly should one learn languages like C, ASM, Lisp, Haskell?

Languages like C, Haskell, Lisp, Smalltalk, and assembly language are often touted as things every programmer should know for their effect on the way one thinks about programming, even if they're used very little in real world situations. However, to really learn a language in depth to the point where you know not only the syntax and se...

How to include "port" package under CLISP in Ubuntu

I'm trying to follow this tutorial: http://cl-cookbook.sourceforge.net/sockets.html And I cannot get it working because of the port package. First the "(in-package :port)" did not work, it said the package could not be found. So I changed it to "(clc:clc-require :port)" but this causes another error: "INTERN("STRUCTURE-KCONSTRUCTOR"): ...

Which Lisp should I learn?

To piggyback on http://stackoverflow.com/questions/59428/learning-lisp-scheme-interpreter, O gods of StackOverflow: Which Lisp (dialect) should I learn, and why? The fragmentation between CL and Scheme slows uptake (at least for me!). So give me the True Answer, please. I have tried to read feature comparisons, and they seem to get...

What are the best practices for functional programming and database interaction?

I know that in pure object-oriented languages like Java it usually makes sense to use ORMs like Hibernate. But what would I do when writing a CRUD-type functionality in Clojure or Common LISP? Passing around SQL as the first-order functions? But isn't having SQL in HTML-generating code very ugly? Thanks, Olek ...

SBCL and clisp

When I started learning CL from Practical Common Lisp, as is preached in the book, I started off with Allegro CL compiler. I stopped using it, since its commerical, yet free bit didn't impress me. It needed a connection to its remote server for some licensing stuffs. I switched to 'clisp' and am using it. Now, I have been hearing about ...

Common Lisp equivalent to C enums

I'm trying to learn some Lisp (Common Lisp) lately, and I wonder if there is a way to give constant numbers a name just like you can do in C via enums. I don't need the full featureset of enums. In the end I just want to have fast and readable code. I've tried globals and little functions, but that always came with a degration in perf...

How can ECL include ASDF dependencies in an executable?

I have this ecl-make.lisp: (asdf:oos 'asdf:compile-op :stumpwm) (defun system-objects (system) (loop for component in (asdf:module-components (asdf:find-system system)) for pathname = (asdf:component-pathname component) for directory = (pathname-directory pathname) for name = (pathname-name pathname) when (equal "lis...

What are "downward funargs"?

Jamie Zawinski uses that term in his (now ten years old) article "java sucks" as if you should know what it means: I really hate the lack of downward-funargs; anonymous classes are a lame substitute. (I can live without long-lived closures, but I find lack of function pointers a huge pain.) It seems to be Lisper's slang, and I coul...

How to trace in Common Lisp using gcl??

Is there some way to print out all the calls of your function to debug recursive programs? Thanks. ...

Porting Common Lisp code to Clojure

How practical is it to port a Common Lisp application to Clojure? To be more specific, what features exist in Common Lisp that do not exist in Clojure, and would have to be re-written? ...

Which tutorial on Clojure is best?

I'm interested in learning Clojure. The Getting Started page on Clojure.net is pretty minimal. Is there a good language introduction or tutorial out there? Which would you recommend? Answer: I have watched the videos on youtube called Intro to Clojure. I don't recommend those. They are a little too brief and don't give a lot of back...

Option or Command key as Meta key for LispBox on Macintosh

I'm new to emacs and have just downloaded LispBox (from the Practical Common Lisp page) with SBCL to my Macintosh. I do know enough to realize I want either the option or Command key to be the meta key. The emacs version delivered with LispBox doesn't pay attention to .emacs in my home directory. Emacs as delivered with LispBox fires ...

Self-referential data structures in Lisp/Scheme

Is there a way to construct a self-referential data structure (say a graph with cycles) in lisp or scheme? I'd never thought about it before, but playing around I can find no straightforward way to make one due to the lack of a way to make destructive modification. Is this just an essential flaw of functional languages, and if so, what a...

How do I get a list of Emacs lisp non-interactive functions?

How do I get a complete list of non-interactive functions that I can use in Emacs Lisp? The interactive ones are easy enough to find in the help system, but I want a complete list of all the other functions I can use. For example concat, car, cdr, etc. (And preferably with documentation). Thanks Ed Edit: Answered thanks to Jouni. ...

How do I access the contents of the current region in Emacs Lisp?

I want to access the contents of the current region as a string within a function. For example: (concat "stringa" (get-region-as-string) "stringb") Thanks Ed ...

How do I get my brain moving in "lisp mode?"

My professor told us that we could choose a programming language for our next programming assignment. I've been meaning to try out a functional language, so I figured I'd try out clojure. The problem is that I understand the syntax and understand the basic concepts, but I'm having problems getting everything to "click" in my head. Doe...

Linearly recursive list-difference function in Common Lisp.

I was going through this tutorial for fun, and got stuck on the very last thing he says, "Exercise: Give a linearly recursive implementation of union and difference." (for a list) Union, no sweat. Difference, sweat. An attempt looks like this. . . (defun list-diff (L1 L2) (cond ((null L1) L2) ((null (member (first L1) L2...

let vs def in clojure

I want to make a local instance of a Java Scanner class in a clojure program. Why does this not work: ;gives me: count not supported on this type: Symbol (let s (new Scanner "a b c")) but it will let me create a global instance like this: (def s (new Scanner "a b c")) I was under the impression that the only difference was scope...