clisp

Lisp Executable

I've just started learning Lisp and I can't figure out how to compile and link lisp code to an executable. Im using clisp and "clisp -c" produces two files .fas and .lib, what do I do next to get an exeutable? ...

Keeping CL and Scheme straight in your head

Depending on my mood I seem to waffle back and forth between wanting a Lisp-1 and a Lisp-2. Unfortunately beyond the obvious name space differences, this leaves all kinds of amusing function name/etc problems you run into. Case in point, trying to write some code tonight I tried to do (map #'function listvar) which, of course, doesn't ...

Apache + mod_lisp + clisp

How to to configure apache + mod_lisp + clisp and set up a "Hello World!"? I couldn't find any complete howto on the subject. Thanks. Edit: Vebjorn's solution works, but then I don't how to code the "hello world!". Can anyone tell me how to proceed? There's something like SWANKing the clisp, then connect to it with SLIME, but then when ...

Which IDE are CLISP Programmers using?

I noticed how SLIME (lisp development package for Emacs) does not come with a frame-source-location function for CLISP, so you can't automagically jump to a source location when inside the debugger. Given that, I figured CLISP users must be using some other IDE (though I guess IDE is a little bit misleading here, maybe they're just using...

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"): ...

Looking for (c)lisp examples of mini-languages, that is, DSLs.

Reading well-written code seems to help me learn a language. (At least it worked with C.) [deleting the 'over-specified' part of the question] I'm interested in particular in lisp's reputation as a language suited to creating a mini-language or DSL specific to a problem. The program ought to be open-source, of course, and available o...

How can I improve clisp error messages?

I have been dabbling a little with clisp. It is a little perplexing that it doesn't print out the line number an error is at. Or, at least a general hint where the error is located. In some cases that must be possible, right? Is there any way I can get better error messages? ...

Lisp code called from Java

Hello, Long story: I am doing a project for my functional programing class, and I thought of writing an AI controller in Lisp, for the Mario AI competition. I was looking over frameworks/libraries/ways of calling Lisp code from Java, or even better Lisp-Java intercommunication. I have looked at Jacol, but it is old, and it does not ...

How to get (/ 7 2 ) => 3, do I need some sort of typecast?

When I do (/ 7 2), what should I do to get the result 3? If I do (/ 7 2.0), I get 3.5, which is as expected. ...

Lisp simple question

Hi! I have some not understanding actions from gnu clisp Suppose, I have some code like (let ((x "Hi!"))(print x)). If I execute it from console (like, clisp fileName.lisp) I see Hi! But, when I execute it from interpreter, I see this text twice. Why? Help me, please. ...

Help With Lisp Code for a Binary Tree

I have (setq l2 '(1 (2 b (c 1 b))(a (1 2) d))) (defun drumuri (l3) (cond ((atom l3) (cons l3 nil)) (t (append (cons (car l3) nil) (drumuri (cadr l3)) (cons (car l3) nil) (drumuri (caddr l3)))))) (drumuri l2) and it gives me: Break 2 [4]> DRUMURI Break 2 [4]> (1 2 B 2 ...

help with multiplying polynomials in lisp

for example: (3x2 - 5x + 2)(7x + 1) and you simplify it like this: ((3 2)(-5 1)(2 0))((7 1)(1 0)) ((21 3)(3 2)(-35 2)(-5 1)(14 1)(2 0)) (21 3)(32 2)(9 1)(2 0) and you get this answer: 21x3 + 32x2 + 9x + 2 i need this solution in lisp please help ...

What can be done with CLISP

I started learning CLISP. Should I improve my self. What can be done with this programming language? What's it for. I'd appreciate your answers and comments. Thanks. ...

running shell commands with gnu clisp

I'm trying to create a "system" command for clisp that works like this (setq result (system "pwd")) ;;now result is equal to /my/path/here I have something like this: (defun system (cmd) (ext:run-program :output :stream)) But, I am not sure how to transform a stream into a string. I've reviewed the hyperspec and google more than ...

CLISP overflow after multiplication

i'm trying to get a first lisp program to work using the CLISP implementation, by typing (print (mod (+ (* 28433 (expt 2 7830457) 1)) (expt 10 10)))) in the REPL. but it gives me *** - overflow during multiplication of large numbers. i thought lisp features arbitrary size/precision. how could that ever happen then? ...

Turning off the result printing in common lisp

I am working with a reasonably large dataset in GNU clisp. It would be really nice if I could turn off the P of the REPL. Having thousands of results spew across my screen really isn't very useful. I rummaged through the docs and couldn't find out how to turn it off. I assume it's one of the variables. ...

How big is a class in memory?

How do I figure out how many bytes a defclass object has in Common Lisp? ...

How to unload a lisp file in CLisp REPL?

Am able to load and call the functions but I would like to reload the file after making some corrections. Cant find either an unload or reload function? ...

How to make and use library with lisp (clisp)?

In C/C++, I can make a library, and make it static one or dll using #include "" in source code, and -labc when linking. How do I have the same feature in lisp? As an example of util.lisp in directory A. I define a library function hello. (defpackage "UTIL" (:use "COMMON-LISP") (:nicknames "UT") (:export "HELLO")) (in-package ut...

Is there a way to get the CLISP compiled with dynamic FFI support on Mac OS?

I use clisp 2.48 (2009-07-28) on Mac OS X 10.6.4. I downloaded the clisp with 'sudo port install clisp'. After installing quick lisp, I installed some packages, and most of them are OK. However, when I tried to install "sqlite", I got the following error. [1]> (ql:quickload "sqlite") To load "sqlite": Load 1 ASDF system: sql...