freenode/#lisp - IRC Chatlog
Search
5:27:09
White_Flame
that's their normal object store, not their triple store, right? I believe you manually remove
5:28:43
White_Flame
"Once the deleted object is garbage collected out of Lisp's memory any future persistent values that are read from the database that contain a reference to the deleted object will have that reference replaced by nil."
5:29:03
White_Flame
so certainly smells like no propagation of reference tracking, just deletion of individual objects
5:30:38
White_Flame
ORMs in general suck, though. Programmatic use of objects is almost never a good mesh with serialization needs
5:36:57
fiddlerwoaroof
Most of the issues with ORMs are that the simulation is a very leaky abstraction
7:47:11
earl-ducaine
I'm revisiting my knowlege of eval-when. My rule-of-thumb is: use it when you have a macro that's dependant on a function that's defined in the same file. Is that a reasonable summary? Any other considerations that should be raised to the level of rule-of-thumb?
7:48:04
beach
If you have an initial value of a variable that is required at compilation time later in the same file.
7:51:45
phoe
earl-ducaine: you have (defun foo () 2) (defmacro bar () (foo)) in the same file - this is going to fail, most likely
7:53:14
earl-ducaine
Oh, and a style question. How bad of form is to always use the full set of situations (:load-toplevel :compile-toplevel :execute) even one one's not needed...
7:55:56
phoe
you should not need to use other combinations unless you're meddling with the Lisp compiler or seriously play with how Lisp compiles files in general.
8:17:51
earl-ducaine
No meddling in the dark arts tonight. Learned my lesson with the pail and broom. Thanks for the help!
12:31:36
Thetabit_
I'm having some trouble with Emacs + Slime + SBCL. I have a fairly bare bones setup because I have to do my development on a windows box. But SBCL keeps crashing and locking Emacs up. I don't experience the crashing in a linux environment so I am wondering if Emacs + SBCL + Slime are the best when working in Windows. What do you guys think?
13:29:32
thetabit
I'm reading PCL and going thru the function section. I am trying to 'call' each function in a list which using a loop, instead I am looking to (apply #'funcall (list fn1 fn2 fn3)) but this does not seem to work. What am I missing
13:31:36
phoe
(defun fn1 () (print "hello")) (defun fn2 () (print "allo")) (defun fn3 () (print "hola")) (apply #'funcall (list #'fn1 #'fn2 #'fn3))
13:43:52
phoe
and in the inner list, you have a plist, and you want to iterate over a set of plist key/value pairs, correct?
16:50:13
slark
Hello, i learnt how to create closures in the gigamonkeys tutorial, but i am not sure how and why to use them.
16:50:52
beach
slark: Suppose you want, for a given X, find the first element in a list that is greater than X.
16:51:26
beach
slark: You could do (defun find-greater (x list) (find-if (lambda (y) (> y x)) list))
16:54:08
slark
beach: yeah sorry.. i mean when i am designing code, in general, where should i use closure ?
16:59:27
nosefouratyou_
wow I completely don't understand (defun find-greater (x list) (find-if (lambda (y) (> y x)) list))
17:00:51
Bike
find-if finds the first element of list that satisfies the predicate (lambda (y) (> y x))
17:01:39
nosefouratyou_
because initially x is a number, but the inner find-if call passes a function as x, right?
17:03:20
nosefouratyou_
Bike: my bad, I thought find-greater/find-if were the same function. I was misreading it.