I've got a little experience with Python (enough to where I can do if/else/elif and some random number generation), but I've always had a weird fascination with the Lisp languages. I downloaded some scheme source code to look at the syntax but it was pretty much gibberish to me.
For a programmer with only a little programming experience...
I have read McCarthy's 1960 paper on LISP and found no reference to anything that's similar to user-defined macros or normal order evaluation. I was wondering when marcos first appeared in programming language history (and also in Lisp history):
When was the idea of user-defined code transformation (before interpretation or compilation...
Can you name language with Static Type checking(like Java) and where Code is Data(like in LISP)?
I mean both things in one language.
...
I'm trying to learn common lisp currently and I've been using sbcl (I hope that's a decent implementation choice.)
Coming from ruby and irb I find the automatic moved to a debugger on every mistake a little annoying at this time. Is there a way to turn it off temporarily when I'm playing around.
...
If you want to make CLOS objects in common lisp printable (print readably), how do you go about doing this without using anything but print and read.
...
The full text of "Practical Common Lisp" used to be easily available from APress in PDF format, but not anymore. Does anyone know where I can (legally) find it?
...
I have about two macros (and climbing) in my codebase that look like this:
(defmacro def-stat-method (method-name stat)
`(progn
(defmethod ,method-name ((monster monster))
(getf (stats monster) ,stat))
(defmethod (setf ,method-name) (value (monster monster))
(setf (getf (stats monster) ,stat) value))))
and th...
Here's the SymbolType package that adds symbols to Python. Can those who have done anything useful with Lisp/Scheme tell me what how can I take advantage of this type in Python?
Can it be used to isolate strings coming from outside (from the web) from internal code?
$ sudo easy_install SymbolType
$ ipython
Unfortunately, you can't us...
Hi all.
The platform i'm working with is DrScheme.
I've seen that a pair (a b) [constructed by (cons a b)] is implemented within the language like a procedure that looks like this:
(define (cons a b)
(lambda(pick)
(cond ((= pick 1) a)
((= pick 2) b))))
and the selectors:
(define (car x) (x 1))
(define (cdr x) (x 2))...
I decided to learn LISP today, and have been playing around with it for a bit. I wrote a simple baby function just to test my understanding, and now understand that my understanding doesn't understand as much as I had understood it to understand. :D
Anyway, here is the function. The idea is that when it is called, e.g. (esexp base x) it...
Hello, all!
I can't use auto indentation function on emacs + slime + sbcl when I define my function and so on.
My .emacs file configuration is this:
(setq inferior-lisp-program
"D:/emacs/sbcl_1.0.37/sbcl.exe"
lisp-indent-function 'common-lisp-indent-function
slime-complete-symbol-function 'slime-fuzzy-complete-symbol
...
Hello,
I was trying to parse simple Lisp/scheme-like code
E.g. (func a (b c d) )
and build a tree from it,
I could do the parsing in C without using bison (i.e, using only
flex to return tokens and building the tree with recursion).
But, with bison grammar, I am not sure where to add the code to
build the list (i.e, which rule to...
Hello, all!
I got following error message in Common Lisp.
What does || mean in CL?
CL-USER> (write-to-string 5e)
The variable |5E| is unbound.
[Condition of type UNBOUND-VARIABLE]
...
Common Lisp HyperSpec says that require and *modules* are deprecated.
But I still see we use require all the time. What should we use?
...
OK, I understand pretty well how to use both function and macros.
What I'm curious about is why the compiler can't be a bit more clever when integrating the two, e.g. consider the Clojure code:
(defmacro wonky-add [a b] `(+ ~a (* 2 ~b)))
(defn wonky-increment [a] (apply wonky-add a 1))
=> Error: can't take value of a macro
Yes, I kn...
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?
...
Hi all,
I am confused as to how car and cdr work on lists. Here is an example of what I have tried:
(define sample (read))
(display sample)
(display (car sample))
(display (cdr sample))
(display (car (cadr sample)))
(display (cdr (cdr sample)))
On entering the value '(A B C D E F), here is what I get:
'(a b c d e f)
quote
((a b c d...
I recently discovered that some of my favorite libraries have been removed from Debian, e.g., Hunchentoot:
For a while now most Common Lisp projects do not do releases anymore,
our plan is to move to proving a cl-build like environment inside debian
I've looked at the mailing lists and Debian Common Lisp homepage and not found an...
I've a partially finished interpreter for a lexically scoped 'pure Lisp' (no set!) that uses a call-by-need evaluation model which comes down to call-by-name with simple caching, the interpreter naturally uses an environment-based evaluation model.
The standard way of evaluating lambda abstractions, as in, constructing a new environment...
I've been reading through a number of Emacs Lisp packages and have come across the convention of some functions being declared with -- after the library prefix, e.g.:
(defun eproject--combine-regexps (regexp-list)
I'm wondering if this a convention for declaring "private" functions to the library but so far I haven't found anything in...