12:05:44 <alpounet> stepcut, "hackagebot standalone-haddock 1.0 - Generate standalone haddock documentation for a set of packages  http://hackage.haskell.org/package/standalone-haddock-1.0 (RomanCheplyaka)"
18:38:26 <mm_freak> stepkut: http://hpaste.org/89501
18:38:33 <mm_freak> any comments?
18:39:19 <mm_freak> i'm not entirely happy with the result, but maybe that goes away once i've got more predefined properties
18:39:29 <mm_freak> right now there is only margin*
19:02:29 <donri> mm_freak: i started something in http://hub.darcs.net/dag/web-styles
19:02:29 <lambdabot> donri: You have 1 new message. '/msg lambdabot @messages' to read it.
19:02:37 <donri> been too lazy to finish it ;p
19:02:39 <donri> @messages
19:02:39 <lambdabot> juhp said 9d 17h 33m 43s ago: I wish I could say yes sure but I already broke my promise to backport 7.4.2 to f18... :-/
19:04:22 <donri> mm_freak: working example http://hub.darcs.net/dag/web-styles/browse/src/Web/Styles/Stock.hs
19:04:34 <donri> can render pretty or minified
19:04:50 <donri> my goal was to make the whole thing type safe, enforcing the css spec
19:04:59 <donri> which it mostly does
19:07:56 <mm_freak> mine focusses on practicality + speed
19:08:07 <mm_freak> i don't bother to generate pretty stylesheets
19:08:21 <donri> aye, that's rather incompatible with my goals
19:08:33 <donri> it's using a Text pretty printer so gonna be slower than blaze-builder
19:08:50 <donri> and i wouldn't call the crazy type safety ideals practical ;)
19:08:51 <mm_freak> "practicality" includes that i can set arbitrary properties with arbitrary values, that i can set the same property twice, etc.
19:09:11 <donri> i did add "unsafeProperty" etc
19:09:38 <mm_freak> the trouble starts when you want to do CSS 3 stuff
19:09:43 <donri> yeah
19:09:55 <donri> specs aren't even all done there IIRC
19:10:08 <mm_freak> correct…  and it's practically impossible to guarantee safety there
20:24:05 <PriscilaKarlos1> Hello
20:28:32 <mm_freak> hi
20:40:15 <mightybyte> hello
21:21:24 <stepkut> mm_freak: looks promising. Especially if there were a bunch of predefined functions and CAFs like, fontFamily = "font-family" and stuff
21:21:38 <stepkut> mm_freak: do you convert to an intermediate ADT?
21:21:48 <stepkut> mm_freak: or go straight to Builder?
21:22:03 <mm_freak> stepkut: intermediate ADT
21:22:19 <mm_freak> it boils down to:  Map MediaType [Property]
21:22:35 <mm_freak> where Property is isomorphic to (Selector, PropName, PropValue)
21:23:25 <mm_freak> there is also web-routes integration and happstack integration is easy enough, but belongs into a separate package
21:24:02 <mm_freak> importUrl :: (MonadRoute m, MonadWriter CSS m) => MediaType -> URL m -> m ()
21:25:19 <mm_freak> backgroundImageUrl would have a type like this:  (MonadReader BuildCfg m, MonadRoute m, MonadWriter CSS m) => URL m -> m ()
21:32:27 <stepkut> nice
21:32:57 <stepkut> I would love to see an ADT + a nice eDSL + a parser which could then be used to implement a quasiquoter
21:38:59 <stepkut> being able to do the, mapM margin, thing is nice.. but for the onMedia "print" section, I would rather just write CSS instead of thinking about the CSS I want to write, and then thinking about how to express it using the DSL
21:39:19 <mm_freak> mine is not for reading CSS, only for generating it…  for a CSS parser you need an entirely different ADT
21:40:21 <mm_freak> stepkut: there are only very few primitive functions for CSS sectioning…  they are all in Data.CSS.Build
21:40:32 <mm_freak> getting used to them should be easy enough, and everything else is just convenience
21:40:52 <stepkut> bummer
21:41:13 <mm_freak> in fact all you need is:  onMedia, select, importFrom and local
21:41:14 <stepkut> I really like the idea of being able to intermix a good eDSL with a QQ
21:41:21 <mm_freak> and of course you're already familiar with local ;)
21:41:33 <stepkut> I find that makes it more obvious what parts are 'static' and what parts are doing some sort of generation or interpolation
21:41:44 <mm_freak> you can write a QQ
21:41:53 <stepkut> yeah.. first I need a parser :)
21:42:01 <stepkut> the rest is easy after that ;)
21:42:04 <mm_freak> a CSS parser for doing QQ for this type is easy
21:42:17 <mm_freak> a CSS parser for actually interpreting the stylesheet is much more difficult and needs a different AST
21:42:22 <mm_freak> that's what i meant
21:43:03 <stepkut> ah
21:43:21 <stepkut> I guess your current ADT is not that great for doing transformations?
21:43:57 <mm_freak> what kind of transformations?
21:46:38 <stepkut> not really sure off-hand
21:47:19 <mm_freak> you can do pretty much everything except actually applying the stylesheet to something
21:47:28 <mm_freak> you can do mapping, combining, optimization, etc.
21:48:07 <mm_freak> but optimizing CSS is very difficult, except for trivial things like combining identical property values on identical selectors on identical media types
21:48:18 <mm_freak> also optimizing CSS isn't that important =)
21:53:47 <stepkut> :)
21:54:09 <stepkut> I mostly care about validation I think
21:54:09 <stepkut>  
21:54:15 <stepkut> at the very least, syntax validation
21:56:29 <mm_freak> don't bother
21:56:35 <mm_freak> that's pretty much impossible
21:56:57 <mm_freak> most of the syntax used by browsers isn't even fully specified
21:57:43 <mm_freak> you can validate only the basic structure like at-rules and rulesets
21:57:50 <mm_freak> but the properties themselves you can't really validate
21:59:29 <stepkut> mostly, I am concerned about simple typos and missing semi colons
21:59:41 <stepkut> that is one thing I like about JMacro
22:00:08 <stepkut> it catches a lot of errors because it actually parsers the javascript, even though it doesn't do anything fancy with the parsed ADT
22:01:07 <mm_freak> under one basic assumption my DSL never generates invalid CSS
22:01:16 <mm_freak> the assumption is that property names and values are valid
22:01:28 <mm_freak> s/invalid/structurally invalid/
22:02:27 <mm_freak> the main reason for me to write this is to get lucius-like convenience, haskell syntax, inline actions for URL rendering etc.
22:03:00 <mm_freak> it makes writing invalid CSS more difficult, but certainly not impossible
22:03:45 <stepkut> sure
22:04:07 <stepkut> so, if there was a way to parse CSS into your ADT then that would probably make me happy :)
23:26:44 <mm_freak> certainly
23:27:32 <mm_freak> it's actually very easy to do it
23:27:50 <mm_freak> all you need is a proper tokenizer
23:28:31 <stepkut> make it so!
23:28:33 <mm_freak> keep in mind that CSS has some weird string/escape rules