libera/#commonlisp - IRC Chatlog
Search
12:14:14
lisp123
shka: https://stackoverflow.com/questions/37638876/how-to-force-quicklisp-to-download-a-library
12:24:41
lisp123
that walks your ASDF directories and deletes anything with a particular system name as part of the file name
16:17:37
kagevf
pdietz: by default a fasl file is generated in the same folder as the original *.lisp, or you can do something like (setq slime-compile-file-options '(:fasl-directory "/tmp/slime-fasls/")) ... from: https://slime-tips.tumblr.com/
16:49:12
dbotton
I created a class in one package and instance of that class in another, I've noticed if I need to access a slot value I need to specify the package for the slot name - (slot-value some-obj 'clog::slot-name)
16:50:30
beach
dbotton: So you need to do whatever it takes to get the right symbol that names the slot.
16:50:56
beach
dbotton: If you import the symbol (not recommended) into that other package, no package prefix is needed.
16:51:27
beach
dbotton: The same goes for any symbol used for any purpose, like the class name, the slot name, a function name, etc.
16:53:01
dbotton
understood, I thought that perhaps slot-value could determine the symbol's package based on the object's class definition
16:55:05
beach
dbotton: It is possible to have two different slots in a class named with two symbols having the same name but different home packages.
16:55:05
shka
but some things are not named, and you can short-circuit to thinking that object must have package "owning" it
16:58:32
shka
other languages have a disturbingly complex behaviors, mixing classes, namespaces, and files
16:59:43
beach
dbotton: Slots are implementation details. You should use functions instead. And the names of those functions should be prefixed with the package name as well, to indicate where the protocol function belongs.
17:04:11
beach
That's not the issue. The issue is that some attribute could be either stored or computed, and client code should not have to care which one, since it may change in future versions of the module.
17:04:17
shka
there is obviously POD, but i would argue that POD type names should not be even exported
17:09:18
shka
regardless, unless you are doing something unusual, you should use slot name just once, when defining class
17:11:01
dbotton
I understood before that likely was the answer, but wanted to be sure as was thinking for oo purposes creates confusion
17:12:01
dbotton
Ada kept the same consistency in Ada95's OO but realized that users expecting the simplicity of Obj.A to work
17:13:36
shka
johnjay: yeah, but doing the wrong thing just to meet some kind of norm is not something i would encourage
17:14:15
dbotton
true, but I think for lisp it makes more sense to be consistent, as it will never "look" like other languages anyways
17:14:26
johnjay
i was thinking along these lines the other day. one of the reasons scheme is embedded in a lot of programs is it's super easy to script with
17:14:55
johnjay
python also strikes that balance well with having easy scripting but also you can shfit to do "serious" stuff as well