libera/#commonlisp - IRC Chatlog
Search
13:23:18
moon-child
so I do not find fault with that part, unless you limit yourself to _only_ symbols and lists
13:25:18
semz
but if you'd put the object into a form and evaled that, the object would self-evaluate
13:26:14
phoe
the question is whether this is a value that is already read or if it is text meant to be turned into a Lisp value by the Lisp reader
13:27:05
jackdaniel
since we're talking about "objects" not "source code text" there is no such a question, that's what I've confused.
13:27:13
semz
we clearly need LISPRC so we can pass objects to the channel instead of serializing them to text
13:40:17
_death
semz: your "only exceptions" question reminded me of sb-kernel:make-unbound-marker... (eval (sb-kernel:make-unbound-marker)) => #<unbound> hmm ok.. but then, (eval *) => ; Evaluation aborted :)
13:42:01
semz
_death: (eval (sb-kernel:make-unbound-marker)) works for me, as does (let ((x (sb-kernel:make-unbound-marker))) (eval x))
20:08:29
foxfromabyss
1) is it possible to extend existing methods(?), such as `+` or `eq` for new classes, without jumping through too many hoops?
20:08:29
foxfromabyss
2) let's say I have 2 classes. Class A and Class B. Class B has a field with value of Class A. I have written a comparator for Class A. Is it possible to piggyback on that comparator for `sort`?
20:11:13
pjb
foxfromabyss: yes: (shadow '+) (defgeneric + (a b)) (defmethod + (a b) (cl:+ a b )) (defmethod + ((a string) (b string)) (+ (parse-integer a) (parse-integer b)))
20:12:42
foxfromabyss
too many hoops is just me being lazy, and shadowing feels like smth that would break a lot of stuff, but maybe not
20:13:54
foxfromabyss
unrelated, is there an example somewhere of how people use SLIME/SLY? So far i've been just pasting stuff from the source file and testing it there, but it feels like I am underutilizing a lot of features
20:18:51
contrapunctus
foxfromabyss: `M-x slime` -> `(ql:quickload :my-project)` -> edit code in buffer -> `M-x slime-eval-defun`
20:20:38
pjb
foxfromabyss: you can avoid shadowing, by using symbols with a different name: (defgeneric plus (a b)) …
20:25:45
frodef
Hi all, is there some package that provides a compatibility layer for the MOP? Such that I can call e.g. sb-mop:class-slots without relying explicitly on sbcl/sb-mop ?
20:27:00
jackdaniel
c2cl supplements implementation-specified operators like defmethod with wrappers when the implementation doesn't implement fully the mop protocol and that can be fixed with a wrapper
22:01:29
yottabyte
why would one use flat instead of let? you can define functions (lambdas) with let, no?
22:03:03
semz
If you define a function with (let ((f (lambda ...))) ...) you have to call it with (funcall f ...) rather than being able to use (f ...)