freenode/#lisp - IRC Chatlog
Search
22:11:28
ckonstanski
Having an issue running a lisp process inside a docker container. Using SBCL. As soon as the lisp image is done loading and comes to rest at the REPL, the container dies. If I run the container interactively I cannot reproduce the behavior. Is there a trick to running a lisp image in docker?
22:18:26
rdh
is there good documentation and examples for OO? i'm reading Practical Common Lisp, and i'm not really grasping generic functions and how methods are "connected" to classes.
22:21:59
Xach
rdh: it can help not to think of generic functions as the primary thing, and classes as a convenient way to implement some concrete behavior.
22:22:23
edgar-rft
Fundamentals of CLOS -> http://cl-cookbook.sourceforge.net/clos-tutorial/index.html
22:22:30
no-defun-allowed
GFs are not connected to classes (except that they have a class, standard-generic-function) but they dispatch on classes (and eql values)
22:22:39
rdh
ohhhhhhhhhhhhh, methods are not really part of class objects... so i'm defining a generic way to use my object using methods
22:23:33
Xach
rdh: methods are not part of classes, classes are a way for a generic function to select what methods apply to a given set of arguments.
22:26:17
Xach
rdh: a generic function is like a thingy to which you attach methods. when you call a generic function, some (or none!) of the methods are selected to run if they match the arguments in some way.
22:29:22
Xach
if you define a method and it is selected, your object will be one of the arguments processed in some way by the code in the method. there can be many objects involved too - it's not helpful to think of an object as the "owner" of a method, it's just a participant in the selection of a method.
22:32:57
Xach
well, there are some good resources out there. try to avoid something that puts objects/classes first. it inhibits real understanding.
22:50:17
moldybits
i don't know if this is better, but at least it's more natural in clos to distinguish actions by how you name the function as opposed to letting the objects provide the context. (concatenate "a" "b") => "ab" (+ "19" "23") => "42"
2:45:40
aeth
Missing commas are pretty annoying. You wind up trying to access a variable that doesn't exist because the macro author only tested the macro with outer variables having the same name as the macro variable.
2:54:01
Bike
so like if a standard function "should signal an error" in some circumstance, if a call to it is safe an error will be signaled
3:12:36
Xach
Hmm, I thought change-class involved :default-initargs, but it doesn't seem to from my reading of the spec and experiments.
4:36:48
beach
asarch: If you find yourself using RETURN-FROM a lot, it might be that your programming style is not that great.
4:38:17
beach
Occasionally, in a loop, when the final value becomes known, it can be a good solution.
4:39:58
asarch
If a function need something like (foo ... (lambda (x y) ...)), how could I put (lambda ...) in a function and the pass that function to (foo ...)?