libera/#commonlisp - IRC Chatlog
Search
22:03:27
kakuhen
the nice part about quicklisp is not only that it's widely used nowadays, but also lets you quickly test your projects on other cl implementations, assuming you added it to your implementation's init file (i.e. your .sbclrc, .eclrc, and so on)
4:39:49
hayley
So, The Art of the Metaobject Protocol turns 30...today or perhaps yesterday depending on time zone.
8:36:42
lisp123_
Can I redefine standard functions within this package and they will shadow the standard ones (but where I don't specify them, they will fall back to the standard ones)?
8:39:45
lisp123_
I am getting an error "Lock on package COmmon-Lisp violated) - is there a way to suppress this?
8:45:59
pjb
(defpackage "YOUR-CL" (:use "CL") (:export . #.(let (clsyms) (do-external-symbols (s "CL" clsyms) (push (string s) clsyms)))) (:shadow "DEFUN"))
8:47:14
pjb
(in-package "YOUR-CL") (defmacro defun (name lambda-list &body body) `(CL:defun ,name (,@lambda-list &aux (,(gensym) (print '(entering ,name)))) ,@body))
8:47:40
pjb
mind using the qualified name when you want to refer to the CL symbol, instead of yours.
9:02:05
kakuhen
I am thinking of something like (let ((etc (make-instance 'standard-class))) ...) and using 'etc as a type
9:13:07
kakuhen
yeah this is good -- just now I found a solution involving ccl:ensure-class, but it is not portable enough
9:34:09
kakuhen
something that compiles fine literally everywhere else is fine but sbcl must spam nearly 1,000 lines at my repl with a dozen style warnings
9:38:03
pjb
kakuhen: c2mop is a portability layer for the MOP, allowing you to use it the same way on all implementations providing some level of MOP.
9:40:03
pjb
The CL (CLOS) standard doesn't impose much introspection/retrospection; just a minimum. This allows to write batch compilers and perform a lot of compilation-time optimizations. The MOP goes 100% Smalltalk: you can redefine everything.