Search found 94 matches
- Sun Oct 09, 2011 3:37 pm
- Forum: Emacs
- Topic: start emacs, load slime and one .lisp file
- Replies: 3
- Views: 24592
Re: start emacs, load slime and one .lisp file
It depends on your SLIME setup, but you usually don't need to use the load function at the REPL. Try opening your file in Emacs with SLIME loaded and hitting either C-c C-l (slime-load-file) or C-c C-k (slime-compile-and-load-file). Regarding automatic Emacs session setup on startup, Emacs' desktop-...
- Sat Oct 08, 2011 4:28 pm
- Forum: Emacs
- Topic: Error loading Slime
- Replies: 1
- Views: 16576
Re: Error loading Slime
(setq slime-lisp-implementations '((sbcl ("sbcl") :coding-system utf-8-unix) (cmucl ("cmucl") :coding-system iso-latin-1-unix))) Assuming that SBCL is installed in /usr/local, try replacing this with (setq slime-lisp-implementations '((sbcl ("/usr/local/bin/sbcl") :cod...
- Mon Sep 26, 2011 12:30 pm
- Forum: Common Lisp
- Topic: Hunchentoot sessions
- Replies: 2
- Views: 4765
Re: Hunchentoot sessions
You're setting the expiration date of the cookie to 172800, which is sometime on January 3rd in the year 1900. Try something like (+ (get-universal-time) 172800) instead.pseudo-cat wrote:Code: Select all
(setf (hunchentoot:cookie-expires (hunchentoot:cookie-out "hunchentoot-session")) 172800)
- Sat Aug 27, 2011 3:12 am
- Forum: Common Lisp
- Topic: Require commands only work when compiled in separate buffer?
- Replies: 2
- Views: 9067
Re: Require commands only work when compiled in separate buffer?
To clarify, the file compiler does compile each top-level form separately. If you want the compiler to evaluate the require forms during compilation, you can tell it to do so using eval-when : (eval-when (:compile-toplevel :load-toplevel :execute) (require 'cl-who) (require 'parenscript)) (Strictly ...
- Thu Aug 04, 2011 11:17 am
- Forum: The Lounge
- Topic: get/set dilemma
- Replies: 2
- Views: 7687
Re: get/set dilemma
Does your Lisp dialect have a Common-Lisp-style package system? If so, one solution would be to make the slot names symbols in some package rather than keywords. If your dialect uses a module system based on bindings rather than one based on symbols, there's still a way: Instead of using symbols as ...
- Sat Jul 30, 2011 6:31 am
- Forum: Common Lisp
- Topic: How can I play the game "guess.lisp"?
- Replies: 1
- Views: 3052
Re: How can I play the game "guess.lisp"?
How can I play the game? By repeatedly typing one of (guess-my-number) , (smaller) , and (higher) , depending on whether the current guess is too large or too small. [7]> (guess-my-number) 50 [8]> (smaller) 25 [9]> (bigger) 37 [10]> (bigger) 43 [11]> (smaller) 40 [12]> (bigger) 41 [13]> (bigger) 42...
- Fri Jul 29, 2011 12:41 am
- Forum: Common Lisp
- Topic: Macro to construct function names dynamically
- Replies: 4
- Views: 14585
Re: Macro to construct function names dynamically
(do-expand-functions '(first second third fourth fifth) '(a b c) (list foo bar baz quux)) Since it looks like you want the arguments to be evaluated at run-time, you may want a function rather than a macro. In that case, you can do it basically the same way as in Bash, except without using eval . I...
- Wed Jul 13, 2011 12:28 pm
- Forum: Common Lisp
- Topic: What does clisp do behind the scene if you give it (* 2 2 2)
- Replies: 10
- Views: 10283
Re: What does clisp do behind the scene if you give it (* 2 2 2)
If (* 2 2 2) is somehow converted to (* (* 2 2) 2), then that extra step used in the conversion would mean that technically it would take slightly longer for the CPU to compute right? That's not what happens: [1]> (disassemble (lambda (x y z) (* x y z))) Disassembly of function :LAMBDA ... 5 byte-c...
- Mon Jun 27, 2011 2:59 pm
- Forum: Common Lisp
- Topic: Literal Lists
- Replies: 19
- Views: 16546
Re: Literal Lists
Ah, sharp-dot! I completely forgot about that one. It may well prevent REPLs from doing anything disruptive here.Paul wrote:Oops...REPL just put *x* in read-only memory...Code: Select all
(quote #.*x*) ; anything involving #.*x* here
You win. I guess.
- Sun Jun 26, 2011 2:52 am
- Forum: Common Lisp
- Topic: Literal Lists
- Replies: 19
- Views: 16546
Re: Literal Lists
But you're reading the spec as if it has some mystical powers. The spec says that because it's true, but it's not true in every instance; the fact that the spec says it doesn't make otherwise well-defined (by that same spec) operations magically behave differently. Good point. :) even if a Lisp imp...