On Mon, Jan 21, 2013 at 2:05 PM, Armando Blancas <abm221...@gmail.com> wrote: > > Not yet. I've decided that first the library must get really good at parsing > text. Once I have more experience writing and using this library, that'd be > a good goal to have. But for now it's about text.
Fair enough, though it strikes me that the combinators themselves are pretty much agnostic as to what they recognize---it would be trivial to create combinators to recognize Clojure data for this library (as I did with parsatron, and in much the same way). The less trivial part is making the position-tracking more flexible. But perhaps that's contained within "parsing text" for you. >> Or to make your parser an honest monad (i.e. to implement the >> algo.monads interface)? >> > > I have my own project for monoids, functors and monads, based on protocols, > which I think is much faster than algo.monads, yet I decided against > implementing Kern with a monad transformer for performance reasons. > Furthermore, though I think algo.monads it's pretty good, I don't believe > it's been so widely adopted as to require Kern users to learn it and use it > to structure their own programs. The fact that Kern is monadic is to be > transparent to its users. I see---also fair enough. How do you implement things like return (for monads) or mempty (for monoids) with protocols? I assume it's the perceived desirability of not having to pass in a parameter corresponding to some concrete monad/monoid/whatever to be able to get the right function for m-return or whatever. A protocol for functors does seem more straightforward to implement. I asked for self-interested reasons; I have a macro (arguably a silly one) for writing monadic code in a style I prefer to domonad (and would also prefer to your bind macro) [1] and would like to be able to use it with arbitrary things that are monadic. That can't really happen if everyone has his own monad interface. [1] here: https://github.com/bwo/macroparser/blob/master/src/macroparser/monads.clj#L88 -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also offer numerous other occasions to consume drinks for pleasure." [Larousse, "Drink" entry] -- 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