Hi! Often through the software development I bump into structures defining specification/manifest/configuration of some Unit (service/process/transformation/configuration). >From my observation I've noticed the repeating pattern in software development for consuming above. We star with a
structure > (then go to) slurp > (then) morph to indexed structures > (for final) retrieve (during algorithms executions) What bothers me is the slurp and morph steps. These always seem to be big effort which is not particular functional from the algorithm use (these are internal steps not produced by Business Analytics and not consumed by Program Algorithms). It would be nice if there was a method to make slurp and morph as one step in declarative (because it is most natural way to express statement) manner. Now lets dive to example and make some assumptions. Let assume that structure can be any tree structure. For example let say it will be XML which can have parent node, child nodes with attributes. <node> <events> <event name="foo"/> <event name="bar"/> <events> <transformations> <transformation name="transfoo" source="fooxu" dest-event="foosa"/> <transformation name="transfer" source="barxu" dest-event="barsa"/> </transformations> <node/> This can be for example specification of node which has declared group of events and group of transformations. So it can easily fit in memory and is read only once at startup. Now it would be nice to make slurp of that structure (and it's pretty easy in clojure - the only true language in which you express the algorithms in terms of thoughts - only if there are built of lists ;-) ) and next get the structure of which we could make farther retrieves. For example we could ask for all incoming events or ask if we can expect the event of name "foo" in that spec. Or we can ask for transformation of name "transfoo". As you can see, to be able to ask such questions, I would have to index above structure for given predicates. First I thought about indexing every data. For example I make inverted index of all terminal nodes. So I got indexes like: transformation, name, events, event, node, source, dest-event, from which I could just ask for (query example) #{transformation [ :name %1 ]} to get all transformation which match the %1 argument. Latter I noticed that in fact, Datomic does that, but the indexing and query language would be not so easy. Nevertheless do you know any piece of code/software/library which allow for such functionality? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.