-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use with mito or other db package? #4
Comments
i tried adding
I was able to create a I'm also not sure if this is the right rabbit hole to wander down. |
i think i got something at least roughly working: |
While we're waiting for maintainers' response: yes, your approach is good—especially so given that metaclass should be added to every class separately. I'm pretty sure that one can monkey-patch the metaclass into the class via Closer MOP or Moptilities, but I can't reclass which function/macro does that. As an alternative monkey-patching solution that I'm not sure even makes sense is redefining a class with new metaclass in your code instead of altering the library code. |
thanks for your response! i'm fairly new to CLOS, so happy just to have something hackable working. i also wondered about new class with the mito metaclass and then some inheriting for here or somesuch, but i didn't get my head around it yet. i can't see (by name at least) any closer-mop function regarding metaclasses. but can check the docs later. i think i'll have to patch the library anyway to handle instantiating objects not just from incoming JSON data but also from the database/locally. btw, aren't you the author/maintainer of this cool package? |
Neither can I, so I'm clueless 🙈 But there are many ways to hack the functionality into a CL library, so I believe in you 🖤
I am the author, but I no longer am a maintainer. Refer to Atlas Engineer people for maintenance 😜 |
i thought my rough hacks were ok, but alas, as is i can't work with any linked objects and the database (duh). so i'm not at all sure how to make this package play with a database. it seems like i would either have to reimplement everything in parallel as db friendly (mito) objects (everything separate, no nested objects/lists of objects, then define relationships), or somehow magically add that functionality to nactivitypub. i managed to implement collection items and init them to a collection's "Items" slot, and same with webfinger with webfinger links in a slot, but that's just baby steps. and it gets confusing implementing the same phenomenon as an AP object and then a separate db one. do you have any sense about how one might ideally go about it? i don't know this package's code well enough to know if it's realistic to try to do it all in there. no sweat if you have no thoughts at all. |
Random suggestion: maybe use nactivitypub classes as mix-ins? But I'm
absolutely clueless otherwise, sorry.
|
hi, thanks for this package.
i'm using it while playing around with a toy AP server in CL, to learn stuff, and starting to look at storage. i assumed i would use mito, but it requires that classes are of its own metaclass. is it possible to add a metaclass to nactivitypub classes, or is there a better way to go about handling database interactions generally?
The text was updated successfully, but these errors were encountered: