[Haskell-beginners] Re: Beginners Digest, Vol 23, Issue 13
Tim Sears
tim at timsears.com
Tue May 11 15:16:19 EDT 2010
Thanks. Here you go. --Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trans-mark5.model
Type: application/octet-stream
Size: 45146 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/beginners/attachments/20100511/bdaaf393/trans-mark5-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trans-mark5.xmodel
Type: application/octet-stream
Size: 730677 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/beginners/attachments/20100511/bdaaf393/trans-mark5-0003.obj
-------------- next part --------------
On May 11, 2010, at 12:00 PM, beginners-request at haskell.org wrote:
> Send Beginners mailing list submissions to
> beginners at haskell.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://www.haskell.org/mailman/listinfo/beginners
> or, via email, send a message with subject or body 'help' to
> beginners-request at haskell.org
>
> You can reach the person managing the list at
> beginners-owner at haskell.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Beginners digest..."
>
>
> Today's Topics:
>
> 1. Re: Haskell Serialization (Ashish Agarwal)
> 2. Re: Problem installing Haskell platform on Ubuntu Karmic
> (Ashish Agarwal)
> 3. Re: Haskell Serialization (Daniel Fischer)
> 4. Re: Haskell Serialization (Stephen Tetley)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 10 May 2010 15:00:14 -0400
> From: Ashish Agarwal <agarwal1975 at gmail.com>
> Subject: Re: [Haskell-beginners] Haskell Serialization
> To: Stephen Tetley <stephen.tetley at gmail.com>
> Cc: beginners at haskell.org
> Message-ID:
> <AANLkTikt2LTvCM-QH37ec0FJgsgCjUw2JhUxDcpFwdEG at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
>> the Binary class as it is specialized to serializing values for
>> Haskell
> only
>
> Can you please expand on this? I've been using Data.Binary to
> (de)serialize
> messages for some networking protocols, and have made all my types
> instances
> of Binary. Non-Haskell programs will be receiving and sending
> messages on
> one end, but I didn't think that mattered since my get and put
> functions are
> written to adhere to the protocol's definition. Is there some issue
> I'm
> missing?
>
>
> On Mon, May 10, 2010 at 6:18 AM, Stephen Tetley <stephen.tetley at gmail.com
> >wrote:
>
>> Hi Tom
>>
>> If you are interfacing with non-Haskell binary objects - you will
>> want
>> binary parsing / writing rather than simple serialization as the
>> format will be determined by the foreign objects.
>>
>> You can still use Data.Binary (indeed its probably the best choice),
>> but you will want to use the modules Data.Binary.Get and
>> Data.Binary.Put directly and probably avoid the Binary class as it is
>> specialized to serializing values for Haskell only.
>>
>> There are probably quite a few libraries on Hackage that you can look
>> at for examples, though there might be more packages that supply
>> parsers only and don't do writing, e.g:
>>
>> http://hackage.haskell.org/package/pecoff (Parser only)
>>
>> There will be more among the packages this list that directly
>> depend on
>> Binary:
>>
>> http://bifunctor.homelinux.net/~roel/cgi-bin/hackage-scripts/revdeps/binary-0.5.0.2#direct
>>
>>
>> Best wishes
>>
>> Stephen
>> _______________________________________________
>> Beginners mailing list
>> Beginners at haskell.org
>> http://www.haskell.org/mailman/listinfo/beginners
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://www.haskell.org/pipermail/beginners/attachments/20100510/a2c53f1c/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Mon, 10 May 2010 15:23:54 -0400
> From: Ashish Agarwal <agarwal1975 at gmail.com>
> Subject: Re: [Haskell-beginners] Problem installing Haskell platform
> on Ubuntu Karmic
> To: Kim Stebel <kim.stebel at googlemail.com>
> Cc: beginners at haskell.org
> Message-ID:
> <AANLkTiktDWVd23yA6jXOFaEyBCZ5Tnz8ks-qjOEMo2RM at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Try: "ghc-pkg unregister parsec". I think this will cause parsec to
> get
> recompiled. I had a similar problem and recall having to do this
> with a few
> libraries, although this was during compilation of cabal.
>
>
> On Sun, Apr 4, 2010 at 2:20 AM, Kim Stebel
> <kim.stebel at googlemail.com>wrote:
>
>> Hello List,
>>
>> I can't compile the haskell platform. I followed this guide
>> http://davidsiegel.org/haskell-platform-in-karmic-koala/ and
>> downloaded
>> http://hackage.haskell.org/platform/2010.1.0.0/haskell-platform-2010.1.0.0.tar.gzas
>> suggested in comment 5. configure runs fine, but when I try to
>> "make" it,
>> it fails to compile the network package.
>>
>> Preprocessing library network-2.2.1.7...
>> Building network-2.2.1.7...
>> [1 of 5] Compiling Network.URI ( Network/URI.hs,
>> dist/build/Network/URI.o )
>> [2 of 5] Compiling Network.Socket.Internal (
>> dist/build/Network/Socket/Internal.hs, dist/build/Network/Socket/
>> Internal.o
>> )
>> [3 of 5] Compiling Network.Socket ( dist/build/Network/Socket.hs,
>> dist/build/Network/Socket.o )
>> [4 of 5] Compiling Network.BSD ( dist/build/Network/BSD.hs,
>> dist/build/Network/BSD.o )
>> [5 of 5] Compiling Network ( Network.hs, dist/build/
>> Network.o )
>>
>> Network.hs:274:15:
>> Warning: Pattern match(es) are overlapped
>> In a case alternative: a -> ...
>>
>> Network/URI.hs:108:7:
>> Could not find module `Text.ParserCombinators.Parsec':
>> Perhaps you haven't installed the profiling libraries for package
>> `parsec-2.1.0.1'?
>> Use -v to see a list of the files searched for.
>>
>> Error:
>> Building the network-2.2.1.7 package failed
>> make: *** [build.stamp] Error 2
>>
>>
>> I'd really appreciate any help.
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners at haskell.org
>> http://www.haskell.org/mailman/listinfo/beginners
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://www.haskell.org/pipermail/beginners/attachments/20100510/e937a1ce/attachment-0001.html
>
> ------------------------------
>
> Message: 3
> Date: Mon, 10 May 2010 21:28:01 +0200
> From: Daniel Fischer <daniel.is.fischer at web.de>
> Subject: Re: [Haskell-beginners] Haskell Serialization
> To: beginners at haskell.org
> Message-ID: <201005102128.01509.daniel.is.fischer at web.de>
> Content-Type: text/plain; charset="utf-8"
>
> On Monday 10 May 2010 21:00:14, Ashish Agarwal wrote:
>>> the Binary class as it is specialized to serializing values for
>>> Haskell
>>
>> only
>>
>> Can you please expand on this? I've been using Data.Binary to
>> (de)serialize messages for some networking protocols, and have made
>> all
>> my types instances of Binary. Non-Haskell programs will be
>> receiving and
>> sending messages on one end, but I didn't think that mattered since
>> my
>> get and put functions are written to adhere to the protocol's
>> definition. Is there some issue I'm missing?
>>
>
> I think the point was that
>
> derive (.., Binary)
>
> isn't a good idea when communicating with the Non-Haskell part of the
> world. If you write serialisation functions adhering to a specified
> protocol, defining a Binary instance for your types with those
> functions
> isn't going to do harm.
> Only it might give rise to confusion if somebody wants to transmit
> those
> types according to another protocol.
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 10 May 2010 22:49:45 +0100
> From: Stephen Tetley <stephen.tetley at gmail.com>
> Subject: Re: [Haskell-beginners] Haskell Serialization
> Cc: beginners at haskell.org
> Message-ID:
> <m2k5fdc56d71005101449k5f5884b1vadb562525d735de4 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Ashish
>
> Daniel has largely answered this for me (thanks Daniel!).
>
> If you define Binary instances for your data types to match a protocol
> - then as Daniel says you can only use them for that protocol.
> Similarly the all the regular Haskell types - Int, Word8, Float, etc.
> - have Binary instances ready-made which you may not want when dealing
> with anything non-Haskell [*]: numbers are always big-endian, the
> encodings for Integers, Floats and the like are sparsely documented
> and may well handle signs differently to an equivalent C / Java / ...
> representation.
>
> [*] Personally I'd go as far as saying, as saying you should avoid
> them entirely except for writing other instances of the Binary class.
>
> Best wishes
>
> Stephen
>
>
> ------------------------------
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
> End of Beginners Digest, Vol 23, Issue 13
> *****************************************
More information about the Beginners
mailing list