Yes, I suppose that's not very clear. Fnk attempts to guess the output schema of your function by looking at the body -- if the return value has literal map structure, this is automatically taken as the output schema. Since this analysis is fragile (maps are created programatically, within a let, by a delegate fn, etc), you can also provide explicit ^:output-schema metadata on the argument vector of the fnk.
The previous version of plumbing attempted to be smart and 'merge' these two sources of schema data. Your explicit schema could provide additional details about structure, but if it contradicted the literal map structure an exception was thrown. Unfortunately, this required calling 'eval' on the explicit output schema so that it could be analyzed at compile time, in the case that it was itself not literal. We decided that this was a bad idea, so now when you pass ^:output-schema metadata it's directly used as the output-schema rather than trying to reconcile with the fnk body, obviating the need for 'eval'. Moreover, there used to be a special shortcut syntax that could be used in ^:output-schema, which was undocumented -- this has been removed, so ^:output-schema needs to be an actual schema. Does this make more sense? Do you forsee running into any issues with this change? Thanks, Jason On Thursday, May 2, 2013 12:22:07 AM UTC-7, Las wrote: > > Hi, > > First all congratulations to the new release! > > Looking at the change log, I'm not sure I understand the following: > "Explicit output-schema metadata on a fnk is taken as gold, rather than > being merged with explicit data by analyzing the fnk body, and must be > explicit rather than a spec" > Thx > > Sent from my phone > On May 1, 2013 8:46 PM, "Jason Wolfe" <ja...@w01fe.com <javascript:>> > wrote: > > Version 0.1.0 of Prismatic's Plumbing/Graph has just been released. > > The biggest change is backwards-compatible performance improvements of up > to 40x for eager compilation, brining Graph to within 20% or so of > hand-coded performance for trivial node functions. This was work done by > Leon Barrett on a 'sprintbatical' from the Climate Corp, and he's written a > great blog post about the update [1]. There are also a handful of small > changes and improvements described in the changelog [2]. > > We've also created a mailing list for Plumbing/Graph [3], so feel free to > ask/answer questions, discuss feature requests/bugs, and generally talk > about how you are or would like to use Plumbing/Graph there. > > Cheers, > Jason > > [1] > http://blog.getprismatic.com/blog/2013/5/1/graph-faster-abstractions-for-structured-computation > [2] https://github.com/Prismatic/plumbing/blob/v0.1.0/CHANGELOG.md > [3] https://groups.google.com/forum/#!forum/prismatic-plumbing > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clo...@googlegroups.com <javascript:> > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+u...@googlegroups.com <javascript:> > 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+u...@googlegroups.com <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > > > -- -- 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/groups/opt_out.