libera/#commonlisp - IRC Chatlog
Search
17:40:00
White_Flame
if it's all driven from one slot specification list, then evertyhing will stay aligned
17:40:03
mfiano
Bike: Great. I'm sure he will accept a PR when you're done. He is just hesitant of added complexity.
17:40:19
Bike
having implemented compile-file before, i already know all kinds of weird trickery that comes up with circular lisp bullshit
17:41:36
easye`
contrapunctus: Just a friendly wave earlier. Thanks again for the resolving link to Rhodes' _Extensible Sequences_ paper for ABCL.
17:41:36
mfiano
Oh, yeah looks like it needs a bit more work then. I'm glad you're hacking that to make it better. I use that project from time to time.
17:41:42
White_Flame
this is why a more dynamic structure even if just alists might be a better option if you're doing stuff liek this
17:44:25
mfiano
Bike: Please let me know when you're done hacking on it so I can update my sources (if you don't get a PR merged).
17:45:13
Bike
Need to make sure it actually works for what I want it to do first. Also maybe add some tests
17:46:55
White_Flame
bollu: structs are strongly size/space optimized datastructures, not flexible abstract things
17:47:59
White_Flame
realign your source code to make your list of slots a first-class data item that the other things use
17:48:20
White_Flame
well, I don't know either. It's certaily possible as the implementation printer does it
17:48:28
jackdaniel
(mapcar #'c2mop:slot-definition-name (c2mop:class-direct-slots (find-class 'a))) ; while not explicitly portable, I think that it should work on all implementations
17:48:37
White_Flame
but that's only if it finds that it's a named defun, and not any other type of function object
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.