Re: [Haskell-cafe] Parsing binary 'hierachical' objects for lazy developers

2011-04-30 Thread John Obbele
On Wed, Apr 27, 2011 at 09:46:08PM +0200, Maciej Marcin Piechotka wrote: I believe following should work class Serializer ObjectA where get = check = (ObjectA $ get * get * get) where check obj@(ObjectA len id attr) | len 10 id == 0 = return obj

Re: [Haskell-cafe] Parsing binary 'hierachical' objects for lazy developers

2011-04-30 Thread John Obbele
On Wed, Apr 27, 2011 at 10:18:47PM +0100, Stephen Tetley wrote: On 27 April 2011 21:28, Alexander Solla alex.so...@gmail.com wrote: On Wed, Apr 27, 2011 at 11:16 AM, John Obbele john.obb...@gmail.com wrote: Second issue, I would like to find a way to dispatch parsers. I'm not very good

[Haskell-cafe] Parsing binary 'hierachical' objects for lazy developers

2011-04-27 Thread John Obbele
Hi Haskellers, I'm currently serializing / unserializing a bunch of bytestrings which are somehow related to each others and I'm wondering if there was a way in Haskell to ease my pain. The first thing I'm looking for, is to be able to automatically derive Serializable objects, for example:

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-20 Thread John Obbele
On Tue, Apr 19, 2011 at 10:36:50PM +0200, Bas van Dijk wrote: Great! I have wished for an asynchronous implementation since version 0.1 of usb but didn't really had a need for it nor the time to implement it. However recently at work I have begun using my usb library in an application which

[Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-19 Thread John Obbele
I was reading the recent thread about select/poll, events handling and why forkIO is the only thing you should need (sorry if this is a horrible summary ;) and I'm realizing I could use some advice concerning my last project. I'm trying to implement an asynchronous interface to libusb, re-using

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-19 Thread John Obbele
On Tue, Apr 19, 2011 at 08:52:44AM -0500, Antoine Latter wrote: Maybe I'm misunderstanding something, but why why I want to use epoll directly instead of just using forkIO plus threadWaitRead and threadWaitWrite?

Re: [Haskell-cafe] Cairo and Haskell

2011-04-15 Thread John Obbele
On Fri, Apr 15, 2011 at 08:19:02AM -0600, Chris Smith wrote: On Apr 15, 2011 8:17 AM, Chris Smith cdsm...@gmail.com wrote: Haskell has Cairo bindings as part of gtk2hs. The package on Hackage is called 'cairo'. You can certainly preview on the screen, but I'm less sure about exporting to

[Haskell-cafe] ANN: bindings to xfconf-4.8.0.0

2011-04-15 Thread John Obbele
Hi all, I'm very happy to announce my first hackageDB package: xfconf[0], a Haskell binding to the XFCE xfconfd configuration dæmon. It's mainly a pet project I have done to learn Haskell using the FFI and QuickCheck but if someone can find it useful or instructive I would be happy. This

[Haskell-cafe] [ghci] unknown symbol in base-unicode-symbols-0.2.1.2 ...

2011-03-30 Thread John Obbele
Hi everyone ! I'm having a problem in GHCi when loading modules relying on the base-unicode-symbols package. My prompt gives me the following message: ghci $ GHCi, version 7.0.2: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp

Re: [Haskell-cafe] [ghci] unknown symbol in base-unicode-symbols-0.2.1.2 ...

2011-03-30 Thread John Obbele
On Wed, Mar 30, 2011 at 10:37:47PM +0200, John Obbele wrote: I'm having a problem in GHCi when loading modules relying on the base-unicode-symbols package. My prompt gives me the following message: ghci $ Loading package base-unicode-symbols-0.2.1.2 ... linking ... interactive: /home

Re: [Haskell-cafe] Re: Can't install Leksah

2010-11-28 Thread John Obbele
On Sat, Nov 27, 2010 at 10:58:37AM -0500, Albert Y. C. Lai wrote: On 10-11-27 09:20 AM, jutaro wrote: ghc is a package, which exposes Ghc-Api as a library. It gets usually installed, when you install Ghc or Haskell platform. As I remeber , it is usually in a hidden state, but ghc-pkg list