I am new to lisp and am writing a few simple programs to get more familiar with it. One of the things I am doing is writing a recursive and iterative version of a factorial method. However, I have come across a problem and can't seem to solve it.
I saw a similar error at
http://stackoverflow.com/questions/1187262/lisp-char-is-neither...
It was very easy to use Apache CXF to develop a client for a SOAP web service. All I had to do was call wsdl2java and all the required classes were present. Is there such a client for lisp? If not, what can I do to write a soap client for lisp? The only restriction is that I don't have access to commercial implementations such as franz/l...
I just started using LISP, coming from a background in C. So far its been fun, although with an incredible learning curve (I'm an emacs newbie too).
Anyway, I'm having a silly issue with the following code to parse include statements from c source - if anyone can comment on this and suggest a solution, it would help a lot.
(defun inclu...
I'm using OpenMCL on Darwin, and I'd like to do something like:
(loop for f in (directory "somedir")
collect (some-per-file-processing f))
But I can't get directory to return anything other than NIL, and I can't seem to find any good explanation online (other than "its different for each system").
Any pointers?
...
Hi folks,
I'm trying to create a "dictionary" type - ie hash table with a string as a key. Is this possible or wise in Lisp?
I noticed that this works as expected:
> (setq table (make-hash-table))
#<HASH-TABLE :TEST EQL size 0/60 #x91AFA46>
> (setf (gethash 1 table) "one")
"one"
> (gethash 1 table)
"one"
However, the following does ...
If I want to learn Clojure, should I start by learning Scheme or Common Lisp?
Or is Clojure different enough from both of these, that I should just start learning Clojure by itself?
...
The JVM already had three Lisps before Clojure arrived on the scene: Kawa, Armed Bear and SISC.
What gap does Clojure fill that was left by those Lisps?
...
I want to write code (using recursive function) to unnest the parentheses in a LIST in Lisp language. Example:
(unnest '(1 (2 (3)) (4 5))) ==> (1 2 3 4 5)
Thanks. Any help is appreciated!
...
I am reading "On lisp" and encounter this code (I simplified a bit).
CL-USER> (defun foo ()
'(a b c))
FOO
CL-USER> (foo)
(A B C) ...
How to reverse a list such that every sublist is also reversed? This is what I have so far:
(defun REV (L)
(cond
((null L) nil)
((listp L)
(append
(REV (cdr L))
(list (car L))))
(t
(append
(REV (cdr L))
(list (car L))))))
...
Anyone have any ideas on how to do this... reverse is too slow, and I want to avoid using the function.
Basically I want to be able to return true if something like '(a b b a) comes up or '(a b c d c b a)
and false for something not symmetrical
...
When defining a database access object for use in cl-postmodern, what should the :col-type be for a Many to Many field?
...
Are there any beautifiers for (e)lisp? Online preferred
...
Hello I need to check if two lists have same elements in same order but I wasn't able to achieve as it seems like scheme eq? and eqv? checks by reference so giving false to such:
> (eq? (list 1 2 3) (list 1 2 3))
#f
> (eqv? (list 1 2 3) (list 1 2 3))
#f
How to achieve this ?
...
How do you emulate Python style generators in your favorite language? I found this one in Scheme. It must be interesting to see other implementations, especially in those languages that don't have first-class continuations.
...
I am familiar with Common Lisp and trying to learn some Scheme, so I have been trying to understand how I'd use Scheme for things I usually code in Common Lisp.
In Common Lisp there's fboundp, which tells me if a symbol (the value of a variable) is bound to a function. So, I would do this:
(let ((s (read)))
(if (fboundp s)
(app...
Is there any functionality in Emacs Lisp that behaves similar to PHP's strtotime function? (Actually AFAIK it implements relative items of the GNU date input formats.)
In PHP I can write
echo strtotime("+2 months"); //1258891352
echo strtotime("-3 months +2 weeks"); //1246952239
which return the corresponding UNIX timestamps.
...
So I wrote a Python program to handle a little data processing
task.
Here's a very brief specification in a made-up language of the computation I want:
parse "%s %lf %s" aa bb cc | group_by aa | quickselect --key=bb 0:5 | \
flatten | format "%s %lf %s" aa bb cc
That is, for each line, parse out a word, a floating-point number, an...
What are some examples of a dynamically scoped language? And what are the reasons for choosing that design? Is it because it is easy to implement?
...
Is it legal to call a C compiler written in C or a PHP interpreter written in PHP metacircular? Is this definition valid only for languages of a specific type, like Lisp? In short, what are the conditions that an interpreter should satisfy for being called Metacircular?
...