|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 - 3 - 4 | Next > |
|
|
Re: Binary serialization, was Re: Abstraction leakOn Jul 5, 2007, at 9:52 AM, Paul Moore wrote:
> You're changing the problem from finding a Haskell library (which only > needs to be installed on the development machine at compile time) to > finding a 3rd party utility, which has to be installed at runtime ... > Not a good trade-off. The intersection of Linux and Mac OS X is a pretty amazing standard library, that beats any single scripting language. I'd forgotten how dismal Windows is, sorry. Still, if you stick to non-GPL'd licenses, there's no way to build single file deliverables? I'd think someone would have written "Unix as a static library", the way e.g. many languages can be embedded in apps. Then only you would have to maintain the Unix tools you want to use, and you'd be done. If no one has, someone who cares about Windows should. Unix rocks. On Jul 5, 2007, at 9:54 AM, Philip Armstrong wrote: > Presumably you mean http://macromates.com/ ? Yup. Sorry. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@... http://www.haskell.org/mailman/listinfo/haskell-cafe |
|
|
Binary serialization, was Re: Abstraction leak>
>> (Bonus points for being able to parse ASN.1 and generate appropriate >> Haskell datatypes & serialization primitives automatically :-) ) > > I think there's at least an ASN.1 definition in the crypto library. > Dominic might be able to enlighten us on that. > No bonus points I'm afraid. There is an embryonic ASN.1 library here http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ASN1-0.0.1 You can take an ASN.1 definition such as FooBar {1 2 0 0 6 1} DEFINITIONS ::= BEGIN Journey ::= SEQUENCE { origin IA5String, stop1 [0] IA5String OPTIONAL, stop2 [1] IA5String OPTIONAL, destination IA5String } Odyssey ::= SEQUENCE { start Journey, trip1 [0] Journey OPTIONAL, trip2 [1] Journey OPTIONAL, trip3 [2] Journey OPTIONAL, end Journey } END And then create abstract Haskell representations of the ASN.1 types journey = "Journey" ::= AbsSeq Universal 16 Implicit [ Regular (Just "origin" :>: (Nothing :@: absIA5String)), Optional (Just "stop1" :>: (Just 0 :@: absIA5String)), Optional (Just "stop2" :>: (Just 1 :@: absIA5String)), Regular (Just "destination" :>: (Nothing :@: absIA5String)) ] odyssey = "Odyssey" ::= AbsSeq Universal 16 Implicit [ Regular (Just "start" :>: (Nothing :@: journey)), Optional (Just "trip1" :>: (Just 0 :@: journey)), Optional (Just "trip2" :>: (Just 1 :@: journey)), Optional (Just "trip3" :>: (Just 2 :@: journey)), Regular (Just "end" :>: (Nothing :@: journey)) ] The library then allows you to decode BER representations of these types. It's good enough to decode X.509 identity and attribute certificates. There's no encoding routines currently as I didn't need them. I'll try and make some documentation more easily available if I get time at the weekend. I'm working on PER at the moment both encoding and decoding using GADTs. I will extend it at some point for BER but that won't be for some time. I thought I read that someone was working on parsing ASN.1 so I'll try and follow that up (again it will have to be at the weekend). Dominic. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@... http://www.haskell.org/mailman/listinfo/haskell-cafe |
|
|
Re: Binary serialization, was Re: Abstraction leakp.f.moore:
> On 05/07/07, Jonathan Cast <jcast@...> wrote: > >Can't say I agree. I've been learning Python, and have been very > >un-impressed > >so far with its library coverage, which I would rate no better than (in > >terms > >of the POSIX bindings, worse than) Haskell. > > It probably depends on your perspective. I've found lots of tasks that > would be a simple library call in Python, but which require me to > write the code myself in Haskell. Examples: > > * Send an email Sounds like a job for MissingH? > * Parse an ini file Probably have to write your own Parsec-based parser here. > * Gzip compress a data stream We have a wonderful library for this! http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zlib-0.3 > * Calculate the MD5 checksum of a file In the Crypto library, or use the openssl binding posted a couple of days ago: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/24165/focus=24170 > > (Of course, I may just not have found the relevant library - that says > something about discoverability rather than coverage, I guess). Find more libraries on hackage: http://hackage.haskell.org/packages/archive/pkg-list.html > For bindings, Python's Windows bindings (pywin32) are superb, where > Haskell's are minimal and unmaintained. Of course, that won't matter > to you if you use POSIX... > > >The one thing off the top of my head that Python had was Base64, but > >that's 20 > >lines of Haskell tops. Aside from that, nothing. > > But that's 20 lines of code I don't want to write, and more, I don't > know how to write (without looking up the definition of Base64). > Having lots of these seemingly trivial helpers available "out of the > box" is what library coverage means to me. (And Python does have lots > of these - I don't know how Haskell fares in practice). > > I'm not trying to start (or fan) a flamewar, but it's interesting how > different people's perspectives on libraries can be... -- Don _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@... http://www.haskell.org/mailman/listinfo/haskell-cafe |
|
|
Re: Re[2]: Binary serialization, was Re: Abstraction leakOn Thu, 2007-07-05 at 18:08 +0100, Duncan Coutts wrote:
> > > - Found that on hackage, downloaded and built OK. Lots of scary > > > warnings about happy, greencard etc, not being found during configure, > > > but let's go on. > > I've complained about these before, although I don't think anyone > > considered doing anything about it. > We know what needs to change, but it's not a trivial change. > The problem is that currently .cabal files to not specify what build > tools they need, A possible stop-gap might be to only report the build tools that were actually found? The way it is now, it looks too much like an error message. -k _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@... http://www.haskell.org/mailman/listinfo/haskell-cafe |
|
|
Re: Re[2]: Binary serialization, was Re: Abstraction leakOn Fri, 2007-07-06 at 08:26 +0200, Ketil Malde wrote:
> On Thu, 2007-07-05 at 18:08 +0100, Duncan Coutts wrote: > > > > > - Found that on hackage, downloaded and built OK. Lots of scary > > > > warnings about happy, greencard etc, not being found during configure, > > > > but let's go on. > > > > I've complained about these before, although I don't think anyone > > > considered doing anything about it. > > > We know what needs to change, but it's not a trivial change. > > > The problem is that currently .cabal files to not specify what build > > tools they need, > > A possible stop-gap might be to only report the build tools that were > actually found? The way it is now, it looks too much like an error > message. Mmm, good point. Perhaps we could just change the verbosity of that message for now, so that it doesn't appear at the default verbosity level. Duncan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@... http://www.haskell.org/mailman/listinfo/haskell-cafe |
| < Prev | 1 - 2 - 3 - 4 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |