freenode/lisp - IRC Chatlog
Search
9:18:33
ecraven
is there a library that automatically handles reading and writing xml based on clos classes or structs/records?
9:21:14
ecraven
I just looked at that (for 15 seconds), didn't see anything about directly parsing to CLOS objects
9:22:06
ecraven
aye, but I'm looking for some way to "declare" a clos class that will magically work
9:22:15
ecraven
I want something like (def-xml-class game (id attribute) (name attribute) (description element)...)
9:22:18
phoe
also, what do you mean, parsing into CLOS objects? how do you teach it how it should parse a given XML?
9:29:50
loke`
Poorly named function, but it takes a DOM node and creates an instance of the class and initialises it based ont he XPATH definitions in the defclass.
9:30:23
loke`
Here's how it's defined: https://github.com/lokedhs/status-net/blob/master/src/status-net.lisp#L75
9:34:03
loke`
ecraven: The code is a bit specialised for the Atom format (especially when it comes to names :-) ), but you can use it as a template.
9:46:18
loke`
I willing to take the risk, since I'm generally using it to temporarily comment out code.
10:44:53
easye
No CDR for package-local https://common-lisp.net/project/cdr/final.html ? This is where post-ANSI standards are currently best ratified.
10:48:06
jackdaniel
yes, ecl develop branch has package local nicknames, but it's not in any release yet
10:48:45
jackdaniel
regarding CDR, see comments under commit: https://github.com/nikodemus/SBCL/commit/3c11847d1e12db89b24a7887b18a137c45ed4661
11:12:15
jackdaniel
regarding compatibility - application using package-local-nicknames won't work on implementation not supporting it. but application using ffi won't work on implementation not supporting it either.
13:31:36
|3b|
easye, phoe: i think the consensus before it was added to sbcl was that specifying package local nicknames well enough for a proper spec/CDR was too hard for the available resources and usage experience, but the informal spec from my prototype was enough to be useful
13:33:54
|3b|
pillton: i use package local nicknames, but only in "end product" type things, not general libraries intended for other people to use
13:42:05
|3b|
ACTION 's original spec is at https://github.com/3b/package-local-nicknames/blob/master/docs.org
13:43:44
|3b|
at this point, probably would be best to just write up what SBCL does as a CDR if someone has the interest and time
13:49:01
jackdaniel
SBCL specifies some of its internal quirks (like interaction with package locks) - I think that this part should be skipped for CDR
13:50:16
|3b|
unless someone wants to write a CDR for those too, and then specify the interaction in terms of that :)
13:50:57
jackdaniel
that could hinder the adoption. for instance ECL lock slighly different set of things in packages afair, same thing may go for ABCL and CCL
13:51:24
|3b|
well, if they didn't match the description in the locking CDR, it wouldn't apply to them
13:55:15
|3b|
would be nice to see local nicknames implemented more widely though, so it would have a chance of actually solving the original problem (libs nicknamed JSON and GL)
14:49:41
fourier
i've seen here: http://cl-cookbook.sourceforge.net/os.html but just want to get some library instead of copy-pasting
15:57:24
fiddlerwoaroof
I guess I'd use compute-effective method or something to get the method I want?
15:58:05
fiddlerwoaroof
Yeah, this is for testing purposes: I want to be able to test the primary method independently of any :around, :before or :after methods that are defined
17:06:16
epipping
phoe: I don't know what your application is and thus whether you have any control over the choice of format but I wanted to share this link with you in case you hadn't seen it: http://lzip.nongnu.org
17:07:29
epipping
phoe: I find the arguments he (A. D. D.) makes quite convincing and have switched to lzip wherever I can.
17:57:48
hjudt
PuercoPop: lately i got into using uikit (https://getuikit.com). one problem i have with it and spinneret is that it uses div attributes like <div uk-drop> (example here: https://getuikit.com/docs/drop). any idea how one can produce something like that with spinneret?
18:02:41
hjudt
:div :uk-drop doesn't work, as it requires a value for the keyword uk-drop, and t doesn't do it (result: <div uk-drop=true>) while nil removes the attribute