libera/#commonlisp - IRC Chatlog
Search
17:52:37
mfiano
bollu: Structs are a hinderance in most cases. They do not complement the interactive development nature of Common Lisp, and there is only single inheritance.
17:53:20
Alfr
bollu, assuming you have a function foo. After (setf (fdefinition 'bar) (fdefinition 'foo)), what should the function-name of #'bar be?
17:53:30
mfiano
You should always start out with classes, and optimize later if need be. Class slots having generic accessors makes it very easy to perform additive programming practices.
17:53:37
White_Flame
bollu: I have used alists for csv, as well as plain lists and column-name->index lookups
17:55:24
bollu
White_Flame because I don't want to pull out *all* slots into a CSV, only *most* of them
17:56:07
bollu
so it's nice that when I store the functions that access the struct slots, I know that they're typed in right, because auto-complete and SBCL complains if you refer to an non-existing function via #'non-existent-function
17:56:20
White_Flame
ok, I've done that, too. generated a function which filtered the columnby index, based on the column names to include in order
17:56:25
bollu
while I won't have this if I just store a list of slot names like (def fields-to-write (list :a :b :c :d))
17:58:18
mfiano
I would also say that you should even think carefully before optimizing from standard-objects to structure-objects. Additive programming is very important for modularity and overall good software architecture.
17:58:47
mfiano
I value additive programming much more than the wee bit of performance and refactoring trouble I will get by switching to a struct.
18:44:33
Shinmera
it is still the best, but could do with a new revision. I think seibel talked about something like that last year (?)
18:47:38
mfiano
I might be mistaken but I might recall phoe wanting to take on that responsibility after he does CLR.
19:58:42
trev
i guess i didn't want to take such a deep dive into the language without seeing what it has to offer
21:22:12
Bike
mfiano: think i have reached a stopping point with my conspack fork (https://github.com/Bike/cl-conspack)
21:22:35
Bike
mfiano: unfortunately i realized that not only have i not actually been running the tests, i can't actually figure out how to, so i might need to ask about that at some point
21:24:07
Bike
i also got it working with my actual program, and now the serialization is a fifth of the space as my non-conspack solution, so that's cool
21:24:28
mfiano
Well he hangs out in #bufferswap as I mentioned. Usually around earlier than now though. Might have left for the day
21:30:41
Bike
most of the changes relate to objects. i might try (later) putting in some mop magic so you don't need a defencoding form for each class you want to serialize
21:33:04
Bike
or at least so you can skip all the slot names. i already put something in so defencoding forms kind of work with inheritance
21:36:09
mfiano
I mostly used it for serializing a bunch of octet vectors with a lisp dsl index at the head to find things. game assets and such
5:39:40
drmeister
I dug through the filename/pathname text in the CLHS and I can't find anything that disallows it.
5:45:46
drmeister
The answer may be in this issue: http://www.lispworks.com/documentation/HyperSpec/Issues/iss265_w.htm
5:47:21
drmeister
"even (NAMESTRING (MAKE-PATHNAME :TYPE "LISP")) constructs a plausible looking pathname, ..."