06:02:29 <plat0> What do people use for CSS generation in happstack?
14:46:56 <donri> i've used these packages: css, shakespeare-css, language-css
14:47:16 <donri> none is "just right" and each have their own strengths
14:48:36 <donri> plat0: ^
15:02:06 <donri> i kinda want something like jmacro for css, which lucius kinda is but "not quite"... splices are value-level, not AST-level
15:02:59 <donri> (and then i want both jmacro and that to work as and with monad transformers)
15:54:32 <donri> stepcut: so how do you set custom attributes on reform-hsp elements?
15:54:47 <stepcut> one moment
15:55:28 <donri> mapView and <@ perhaps?
15:55:40 <stepcut> http://www.happstack.com/docs/reform-hsp-0.1.1/doc/html/reform-hsp/Text-Reform-HSP-String.html#v:setAttrs
15:55:58 <stepcut> it's in the wrong section, I should fix that
15:56:18 <donri> oh, missed that one
15:56:30 <stepcut> yeah, because it is in the 'layout' section. which makes no sense
15:56:57 <stepcut> it basically does mapView and <@
15:57:21 <donri> yea i see
15:58:14 <donri> y u put space before /> :( looks so unbalanced
15:58:28 <donri> like [1,2,3 ]
15:58:37 <donri> ACTION nitpicky
15:59:49 <donri> plus people seem to do that to get html parsers to accept xhtml which is Just Wrong :)
16:03:46 <stepcut> that is where I picked up the habit. But I am firmly against  sending xhtml to html parsers
16:03:57 <stepcut> "If an element has an EMPTY content model DO use the minimized tag syntax permitted by XML (e.g., <br />). DO NOT use the alternative syntax (e.g., <br></br>) allowed by XML, since this may be unsupported by HTML user agents. Also, DO include a space before the trailing / and >."
16:04:26 <donri> where's that from
16:04:31 <stepcut> http://www.w3.org/TR/xhtml-media-types/
16:04:39 <stepcut> section A.2
16:04:57 <stepcut> it's only relevant if you are doing something stupid in the first place (trying to serve xhtml as html)
16:05:03 <donri> if xhtml is truely parsed as xml, the space is meaningless
16:05:05 <donri> <br/> is fine
16:05:07 <stepcut> with HSP, we write XML, and then transform it to html
16:05:09 <donri> it's also fine in hsx :)
16:05:27 <stepcut> like I said, it is just a habit
16:05:36 <donri> bad habit!
16:05:57 <stepcut> maybe.. I don't mind the way it looks
16:05:58 <donri> i see heist people do it too
16:06:19 <donri> which is even more fun because heist .tpl templates are html not xml
16:07:23 <stepcut> :)
16:08:40 <stepcut> are they? I thought there were problems at one point because the contents of <script> tags were not treated as the right cdata vs pcdata
16:09:25 <donri> last i checked, which may not be recent enough :)
16:09:31 <donri> mightybyte?
16:10:29 <stepcut> well, I am thinking about ages ago
16:12:06 <donri> i have this crazy idea of doing transformations on hsx XML instead of splices for some things... similar to heist and xslt
16:12:37 <donri> i think hsx becomes ugly when you start to use splices for refactoring xml itself, such as container divs
16:13:47 <stepcut> ?
16:13:52 <stepcut> what sort of transformations?
16:14:39 <donri> i'd rather have, <yui:unit size=(7%24)><p>Hi</p><p>There</p></yui:unit>, than <% unit (gridUnit 7 24) <%><p/><p/></%> %>
16:15:17 <stepcut> ah
16:15:21 <stepcut> HaRP?
16:15:26 <donri> (which both then eventually become something like <div class="yui3-u-7-24"><div class="unit"><p...></div></div>)
16:15:32 <donri> yea, maybe
16:16:42 <donri> i'm also thinking for "widgets", like appTemplate but instead of function parameters, lift the data out of a complete html doc and put it back in inside the layout template
16:17:21 <donri> btw did you see my question the other day about harp and hsx-qq
16:17:26 <stepcut> no
16:17:48 <donri> so quasiquotes can appear as patterns
16:17:53 <stepcut> a different approach would be to use a custom XMLGen instance where genElement does something special for elements in the yui namespace
16:17:54 <donri> QuasiQuoter { quotePat }
16:18:10 <stepcut> yeah
16:18:12 <donri> so i'm wondering if you think hsx-qq could implement quotePat
16:18:25 <stepcut> sounds interesting
16:19:34 <stepcut> http://code.google.com/p/happstack/issues/detail?id=203
16:19:56 <stepcut> when Niklas gets back I'll ask him
16:20:06 <donri> cool!
16:20:07 <stepcut> the new hsx will have qq built-in
16:20:14 <donri> i see
16:21:42 <donri> i suspect maybe harp is preprocessed into something that isn't purely pattern matching, in which case quotePat might not be enough? i guess we'll se
16:21:44 <donri> see
16:22:49 <stepcut> well. he has to change HaRP to support Text.. so maybe he can also think about how to support QQ patterns at the same time
16:24:09 <donri> $ trhsx <(echo "isImg <img/> = True")
16:24:10 <donri> isImg (Element (Nothing, "img") _ []) = True
16:24:15 <donri> maybe after all...
16:24:45 <stepcut> what would the qq version look like?
16:24:58 <donri> isImg [hsx| <img/> |] = True
16:25:19 <stepcut> neat
16:25:39 <donri> can even quasiquote in types, but no idea what that could be used for
16:26:44 <stepcut> :)
16:28:25 <donri> $ trhsx <(echo 'imgSrc <img src=a/> = a')
16:28:26 <donri> imgSrc (Element (Nothing, "img") hsx_attrs0 [])
16:28:26 <donri>   | (Just a, _) <- extract (Nothing, "src") hsx_attrs0 = a
16:28:36 <donri> so then again perhaps not
16:31:00 <donri> but maybe it could implement quoteDec such that you could write [hsx| imgSrc <img src=a/> = a |] at the top-level