Andrew Cowie | 28 Jan 00:06 2014

Builder vs Builder

Does anyone know whether blaze-builder is deprecated in favour of
bytestring's new Builder module, or are they the same, or...

I know Simon is the evil wizard cackling in his dank lair in both cases,
and I do remember him saying he was trying to get his work "upstream"
into bytestring, but I haven't heard anyone suggesting we should be
using Data.ByteString.Lazy.Builder instead of Blaze.ByteString.Builder

I can only imagine the integration with the allocation routines is much
better now that it's in bytestring, but on the other hand it's hard to
upgrade bytestring — it being so low in the stack — so perhaps the
original blaze remains the right choice from a bugfix and stability
perspective.

Thoughts?

AfC
Sydney

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Johan Tibell | 28 Jan 08:21 2014
Picon

Re: Builder vs Builder

Simon's work have made it into bytestring, so you should use that one if you can.


On Mon, Jan 27, 2014 at 3:06 PM, Andrew Cowie <andrew <at> operationaldynamics.com> wrote:
Does anyone know whether blaze-builder is deprecated in favour of
bytestring's new Builder module, or are they the same, or...

I know Simon is the evil wizard cackling in his dank lair in both cases,
and I do remember him saying he was trying to get his work "upstream"
into bytestring, but I haven't heard anyone suggesting we should be
using Data.ByteString.Lazy.Builder instead of Blaze.ByteString.Builder

I can only imagine the integration with the allocation routines is much
better now that it's in bytestring, but on the other hand it's hard to
upgrade bytestring — it being so low in the stack — so perhaps the
original blaze remains the right choice from a bugfix and stability
perspective.

Thoughts?

AfC
Sydney


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Kazu Yamamoto | 28 Jan 08:41 2014
Picon

Re: Builder vs Builder

Hi Andrew,

> Does anyone know whether blaze-builder is deprecated in favour of
> bytestring's new Builder module, or are they the same, or...

Recently I supported both blaze-builder and bytestring's Builder in
"fast-logger". So, I would like to share my experience.

bytestring is tightly bound to GHC's version. GHC version 7.6.x is
shipped with bytestring 0.10.0.2 while GHC version 7.8.x will be
shipped with bytestring 0.10.4.0.

To my impression, bytestring's APIs are stable and good enough in
bytestring 0.10.4.0.  For instance, while bytestring 0.10.4.0 provides
Data.ByteString.Builder and .Extra, bytestring 0.10.0.2 does not.
(Please don't confuse them with Data.ByteString.Lazy.Builder.)

So, I think switching blaze-builder to bytestring's Builder is too
early at this moment. But if you are interested, you can get ready for
bytestring's Builder. You can use the following C's macro:

#if MIN_VERSION_bytestring(0,10,4)

For more information, please see the source of fast-logger.

--Kazu
Gregory Collins | 28 Jan 09:30 2014
Picon

Re: Builder vs Builder

If you want to try to support the last two or three haskell platform versions, you're committing to supporting GHC 7.4.x and bytestring 0.9.2.1 still. Debian stable still has 7.4.1. Plus there are one or two things that are in blaze-builder that people use that didn't make it into bytestring. So I agree with Kazu, I'm not ready to switch to bytestring builder yet --- especially since 0.10.0.2 was kind of botched.

I don't like preprocessor tricks here. If the public haddock docs on Hackage are built on a new machine but the user's machine is old, confusion is sure to result. You're forcing your downstream users to put in all of the same #ifdefs you used, too.

Sad though it may be I think we just have to wait a year until everyone's on a capable version of bytestring, then deprecate blaze-builder and make the switch as quickly as possible.

G


On Tue, Jan 28, 2014 at 8:41 AM, Kazu Yamamoto <kazu <at> iij.ad.jp> wrote:
Hi Andrew,

> Does anyone know whether blaze-builder is deprecated in favour of
> bytestring's new Builder module, or are they the same, or...

Recently I supported both blaze-builder and bytestring's Builder in
"fast-logger". So, I would like to share my experience.

bytestring is tightly bound to GHC's version. GHC version 7.6.x is
shipped with bytestring 0.10.0.2 while GHC version 7.8.x will be
shipped with bytestring 0.10.4.0.

To my impression, bytestring's APIs are stable and good enough in
bytestring 0.10.4.0.  For instance, while bytestring 0.10.4.0 provides
Data.ByteString.Builder and .Extra, bytestring 0.10.0.2 does not.
(Please don't confuse them with Data.ByteString.Lazy.Builder.)

So, I think switching blaze-builder to bytestring's Builder is too
early at this moment. But if you are interested, you can get ready for
bytestring's Builder. You can use the following C's macro:

#if MIN_VERSION_bytestring(0,10,4)

For more information, please see the source of fast-logger.

--Kazu
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



--
Gregory Collins <greg <at> gregorycollins.net>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe <at> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Erik Hesselink | 28 Jan 09:34 2014
Picon

Re: Builder vs Builder

I've never had any problems installing newer bytestring versions.
Unless you're using the GHC API, what is the problem?

Regards,

Erik

On Tue, Jan 28, 2014 at 9:30 AM, Gregory Collins
<greg <at> gregorycollins.net> wrote:
> If you want to try to support the last two or three haskell platform
> versions, you're committing to supporting GHC 7.4.x and bytestring 0.9.2.1
> still. Debian stable still has 7.4.1. Plus there are one or two things that
> are in blaze-builder that people use that didn't make it into bytestring. So
> I agree with Kazu, I'm not ready to switch to bytestring builder yet ---
> especially since 0.10.0.2 was kind of botched.
>
> I don't like preprocessor tricks here. If the public haddock docs on Hackage
> are built on a new machine but the user's machine is old, confusion is sure
> to result. You're forcing your downstream users to put in all of the same
> #ifdefs you used, too.
>
> Sad though it may be I think we just have to wait a year until everyone's on
> a capable version of bytestring, then deprecate blaze-builder and make the
> switch as quickly as possible.
>
> G
>
>
> On Tue, Jan 28, 2014 at 8:41 AM, Kazu Yamamoto <kazu <at> iij.ad.jp> wrote:
>>
>> Hi Andrew,
>>
>> > Does anyone know whether blaze-builder is deprecated in favour of
>> > bytestring's new Builder module, or are they the same, or...
>>
>> Recently I supported both blaze-builder and bytestring's Builder in
>> "fast-logger". So, I would like to share my experience.
>>
>> bytestring is tightly bound to GHC's version. GHC version 7.6.x is
>> shipped with bytestring 0.10.0.2 while GHC version 7.8.x will be
>> shipped with bytestring 0.10.4.0.
>>
>> To my impression, bytestring's APIs are stable and good enough in
>> bytestring 0.10.4.0.  For instance, while bytestring 0.10.4.0 provides
>> Data.ByteString.Builder and .Extra, bytestring 0.10.0.2 does not.
>> (Please don't confuse them with Data.ByteString.Lazy.Builder.)
>>
>> So, I think switching blaze-builder to bytestring's Builder is too
>> early at this moment. But if you are interested, you can get ready for
>> bytestring's Builder. You can use the following C's macro:
>>
>> #if MIN_VERSION_bytestring(0,10,4)
>>
>> For more information, please see the source of fast-logger.
>>
>> --Kazu
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe <at> haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
>
>
> --
> Gregory Collins <greg <at> gregorycollins.net>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
Kazu Yamamoto | 28 Jan 09:42 2014
Picon

Re: Builder vs Builder

Erik,

> I've never had any problems installing newer bytestring versions.
> Unless you're using the GHC API, what is the problem?

I don't remember in detail. But when I installed the new bytestring to
the current HP, I hit upon many dep hells. So, I gave up and
uninstalled the new bytestring.

--Kazu
Andrew Cowie | 29 Jan 00:12 2014

Re: Builder vs Builder

On Tue, 2014-01-28 at 09:34 +0100, Erik Hesselink wrote:
> I've never had any problems installing newer bytestring versions.
> Unless you're using the GHC API, what is the problem?

Yeah, as Kazu said, right after installing the current **bytestring**
cabal announced it would be downgrading it back to 0.10.0.2. Bit of a
waste of my Saturday that. I think it was **text** but no need to point
fingers, really; the end result was Cabal being quite uncompromising
about it.

AfC
Sydney
Johannes Waldmann | 30 Jan 16:01 2014
Picon

Re: Builder vs Builder

Erik Hesselink <hesselink <at> gmail.com> writes:

> I've never had any problems installing newer bytestring versions.
> Unless you're using the GHC API, what is the problem?

Template Haskell.

(I guess this counts as "using the GHC API" somehow.
But even if you are not, one of your dependencies may be doing it.)

See http://www.haskell.org/pipermail/ghc-devs/2014-January/003835.html

- J.W.
Erik Hesselink | 30 Jan 16:11 2014
Picon

Re: Builder vs Builder

On Thu, Jan 30, 2014 at 4:01 PM, Johannes Waldmann
<waldmann <at> imn.htwk-leipzig.de> wrote:
> Erik Hesselink <hesselink <at> gmail.com> writes:
>
>> I've never had any problems installing newer bytestring versions.
>> Unless you're using the GHC API, what is the problem?
>
> Template Haskell.
>
> (I guess this counts as "using the GHC API" somehow.
> But even if you are not, one of your dependencies may be doing it.)
>
> See http://www.haskell.org/pipermail/ghc-devs/2014-January/003835.html

Template haskell doesn't depend on bytestring, and bytestring doesn't
depend on template-haskell, so I don't see how that situation applies.

Erik
Kazu Yamamoto | 28 Jan 09:41 2014
Picon

Re: Builder vs Builder

Greg,

> I don't like preprocessor tricks here. If the public haddock docs on
> Hackage are built on a new machine but the user's machine is old, confusion
> is sure to result. You're forcing your downstream users to put in all of
> the same #ifdefs you used, too.

In the case of fast-logger, Builder is hidden in an abstract data
type. I hope that users of fast-logger would not be confused.

--Kazu

Gmane