Re: [web-devel] Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-06-03 Thread Jasper Van der Jeugt
On Thu, May 27, 2010 at 8:31 PM, Matt Parker moonmaster9...@gmail.com wrote: will it be possible to easily interleave IO values into the HTML? like instead of the [1,2,3] ul $ forM_ [1, 2, 3] (li . string . show) what if it was a function that returned IO [1,2,3] (maybe 1,2,3 came out of a

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-28 Thread Max Rabkin
On Thu, May 27, 2010 at 2:44 PM, Pierre-Etienne Meunier pierreetienne.meun...@gmail.com wrote: ** Advertisement ** Have you tried the library I have written, Data.Rope ? ** End of advertisement ** The algorithmic complexity of most operations on ropes is way better than on bytestrings : log n

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-28 Thread Pierre-Etienne Meunier
About as much different as a Data.ByteString from an Array Int Char : there are several optimizations over a Data.Sequence.Seq that are specific to characters, for instance file IO using mmap, and the use of blocks (which would have been possible with about any constant size Storable type, of

[Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Jasper Van der Jeugt
Dear all, BlazeHtml started out on ZuriHac 2010. Now, Jasper Van der Jeugt is working on it as a student to Google Summer of Code for haskell.org. His mentors are Simon Meier and Johan Tibell. The goal is to create a high-performance HTML generation library. In the past few weeks, we have been

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Michael Snoyman
Two comments: * The exclamation point seems good enough for attributes. I copied that for Hamlet as well. * If you're standardizing on UTF-8, why not support bytestrings? I'm aware that a user could shoot him/herself in the foot by passing in non-UTF8 data, but I would imagine the performance

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Ivan Miljenovic
On 27 May 2010 17:55, Michael Snoyman mich...@snoyman.com wrote: Two comments: * The exclamation point seems good enough for attributes. I copied that for Hamlet as well. * If you're standardizing on UTF-8, why not support bytestrings? I'm aware that a user could shoot him/herself in the foot

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Michael Snoyman
On Thu, May 27, 2010 at 11:16 AM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: On 27 May 2010 17:55, Michael Snoyman mich...@snoyman.com wrote: Two comments: * The exclamation point seems good enough for attributes. I copied that for Hamlet as well. * If you're standardizing on

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Ivan Miljenovic
On 27 May 2010 18:23, Michael Snoyman mich...@snoyman.com wrote: On Thu, May 27, 2010 at 11:16 AM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: On 27 May 2010 17:55, Michael Snoyman mich...@snoyman.com wrote: Two comments: * The exclamation point seems good enough for attributes. I

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Michael Snoyman
On Thu, May 27, 2010 at 11:28 AM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: On 27 May 2010 18:23, Michael Snoyman mich...@snoyman.com wrote: On Thu, May 27, 2010 at 11:16 AM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: On 27 May 2010 17:55, Michael Snoyman

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Bas van Dijk
Q14: Do you see any problems with respect to integrating BlazeHtml in your favourite web-framework/server? How about also providing an enumerator back-end? http://hackage.haskell.org/packages/archive/iteratee/0.3.5/doc/html/Data-Iteratee-Base.html#t%3AEnumeratorGM Then your library can integrate

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Ivan Miljenovic
On 27 May 2010 18:33, Michael Snoyman mich...@snoyman.com wrote: I don't do any string concatenation (look closely), I was very careful to avoid it. I tried with lazy text as well: it was slower. This isn't surprising, since lazy text- under the surface- is just a list of strict text. And the

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Michael Snoyman
On Thu, May 27, 2010 at 11:40 AM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: On 27 May 2010 18:33, Michael Snoyman mich...@snoyman.com wrote: I don't do any string concatenation (look closely), I was very careful to avoid it. I tried with lazy text as well: it was slower. This isn't

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Jasper Van der Jeugt
Hey Bas, How about also providing an enumerator back-end? http://hackage.haskell.org/packages/archive/iteratee/0.3.5/doc/html/Data-Iteratee-Base.html#t%3AEnumeratorGM Then your library can integrate more easily with the snap framework: http://snapframework.com Sure, I can do that. But I

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Ketil Malde
Michael Snoyman mich...@snoyman.com writes: * If you're standardizing on UTF-8, why not support bytestrings? +1 I'm aware that a user could shoot him/herself in the foot by passing in non-UTF8 data, but I would imagine the performance gains would outweigh this. Wrap them in a (new)type?

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Bas van Dijk
On Thu, May 27, 2010 at 10:48 AM, Jasper Van der Jeugt jasper...@gmail.com wrote: How about also providing an enumerator back-end? http://hackage.haskell.org/packages/archive/iteratee/0.3.5/doc/html/Data-Iteratee-Base.html#t%3AEnumeratorGM Then your library can integrate more easily with the

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Johan Tibell
On Thu, May 27, 2010 at 10:23 AM, Michael Snoyman mich...@snoyman.comwrote: On Thu, May 27, 2010 at 11:16 AM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: Wow, I find it rather surprising that String out-performs Text; any idea why that is? I wonder if you're just using it wrong...

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Michael Snoyman
On Thu, May 27, 2010 at 12:57 PM, Johan Tibell johan.tib...@gmail.comwrote: On Thu, May 27, 2010 at 10:23 AM, Michael Snoyman mich...@snoyman.comwrote: On Thu, May 27, 2010 at 11:16 AM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: Wow, I find it rather surprising that String

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Johan Tibell
On Thu, May 27, 2010 at 10:53 AM, Michael Snoyman mich...@snoyman.comwrote: In other words, here's what I think the three different benchmarks are really doing: * String: generates a list of Strings, passes each String to a relatively inefficient IO routine. * ByteString: encodes Strings

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Alberto G. Corona
As a user, I have too many HTML generators, a few of them with Ajax and none with server-side event handling (like ASPX or JSPX). Ajax is complicated but server side event handling is what I really miss because it is simple from the user point of view, my ervents could be handled in haskell

Re: [Haskell-cafe] Google Summer of Code: BlazeHTML RFC

2010-05-27 Thread Pierre-Etienne Meunier
** Advertisement ** Have you tried the library I have written, Data.Rope ? ** End of advertisement ** The algorithmic complexity of most operations on ropes is way better than on bytestrings : log n for all operations, except traversals, of course. Cheers, PE El 27/05/2010, a las 06:01,