Ah, thanks Don, Brandon,
I looked at this but neglected to read through and understand the
example enough.
Thanks for the tips, they're a great help.
Don Stewart wrote:
jamie.love:
bmpHeader = runPut $ do
put 'B'
put 'M'
put (0 :: Int32)
put (0 ::
Does anyone know of a library that will handle bytea encodings from
postgres? The bytea field that I need to access contains a jpg file. I
want to retrieve it from the database and write it out for an image display
program.
bytea:
Bytea octets are also escaped in the output. In general, each
Hi,
About 3 weeks ago I reported this bug to Jeff Newbern.
But I got no response - maybe I got filtered out as spam :)
Since it was not fixed I'm trying once more here. Maybe
there is somebody here who has access to the web site
http://www.haskell.org/all_about_monads and cares enough
to
Hi,
I'm playing since a few hours with Parsec and trying to write a small html
(fragment) parser, but I'm stuck in a point which I really can't understand.
The problem seem to be either in parseProperCont or in closing (see code
below). It looks like closing does not work (but it is a very
Hello there,
I have written a trie in Haskell generalized to Eq a = [a] rather than
simply String. I want to make this type an instance of Foldable, but I've
run into a type dilemma. My datatypes look like this:
data TrieElem a = Elem a | Start | End
deriving (Read, Show, Eq, Ord)
Here's a handy simple function I've found very useful. You'll
obviously also need to import Debug.Trace:
pTrace s = pt | return ()
where pt = try $
do
x - try $ many1 anyChar
trace (s++: ++x) $ try $ char 'z'
fail x
It
Ronald Guida wrote:
Hi,
I'm interested in learning how to program games. Since I have to start
somewhere, I decided to write a simple Hangman game. I'm wondering if
anyone can look at my code and give me some feedback.
Nicely written. The design reads very much like a straight translation
2008/1/20 Bryan Green [EMAIL PROTECTED]:
Does anyone know of a library that will handle bytea encodings from
postgres? The bytea field that I need to access contains a jpg file. I
want to retrieve it from the database and write it out for an image display
program.
I'd love to see Don give
Hi,
I'm relatively new to Haskell so please bear with me. I'm trying to
parse Java class files with Data.Binary and I'm having a few problems:
(The class file format is described here:
http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html
and the bytecode instructions are
On Sun, 2008-01-20 at 18:18 +, Lauri Pesonen wrote:
Hi,
I'm relatively new to Haskell so please bear with me. I'm trying to
parse Java class files with Data.Binary and I'm having a few problems:
(The class file format is described here:
Since CPP mode removes newlines in the out macro expansion. It appears
to be impossible to have a macro expand to a function with an INLINE
pragma since it appears to need to be in its own line.
For example:
#define GETHOSTWORD(name, m, type) \
{-# INLINE name #-} \
name :: m type ; \
name =
Hi Paul,
You gave some suggestions of other styles of Haskell programming
that Ronald could try for his program. These styles are definitely
worth knowing, so if Ronald is not familiar with them, he may want
to try them out. However, in most cases, I think what Ronald
already did is nicer than
On Jan 15, 2008 7:33 PM, Adam Langley [EMAIL PROTECTED] wrote:
Ok, no TH ;)
I've just uploaded binary-strict 0.2.2 to Hackage which factors most
of the common code out via CPP. Hopefully I didn't break anything.
AGL
--
Adam Langley [EMAIL PROTECTED]
On Sunday 20 January 2008 21:02:04 [EMAIL PROTECTED] wrote:
On 2008.01.19 19:11:13 +0100, Peter Verswyvelen [EMAIL PROTECTED] scribbled
1.4K characters:
I would find it most useful to get type inference information on the fly,
even when not all of the code compiles correctly yet.
Does that
I'd like to compare the performance of Parsec to other parsers but the only
reference to a benchmark I have found is a dead link from one of the papers
about Parsec:
http://research.microsoft.com/users/daan/download/parsec/parsec.pdf
Are there any surviving Parsec benchmarks?
--
Dr Jon D
On 2008.01.19 19:11:13 +0100, Peter Verswyvelen [EMAIL PROTECTED] scribbled
1.4K characters:
The problem is that this only works when the complete source file compiles
correctly no?
Yes. As I said, it's a very hackish solution - think of it as proof-of-concept.
I would find it most useful to
On Jan 20, 2008 9:54 PM, Jon Harrop [EMAIL PROTECTED] wrote:
I'd like to compare the performance of Parsec to other parsers but the only
reference to a benchmark I have found is a dead link from one of the papers
about Parsec:
[EMAIL PROTECTED] wrote:
Does that make sense? If the code doesn't compile, then how could any
type-inference be trustable?
Why, of course it is trustable, because it's going to fail, and that
means that the code has type a - _|_.
--
(c) this sig last receiving data processing entity.
On Sunday 20 January 2008 22:06:04 Duncan Coutts wrote:
On Sun, 2008-01-20 at 21:02 +, Jon Harrop wrote:
On Sunday 20 January 2008 21:02:04 [EMAIL PROTECTED] wrote:
On 2008.01.19 19:11:13 +0100, Peter Verswyvelen [EMAIL PROTECTED]
scribbled
1.4K characters:
I would find it
On Sun, 2008-01-20 at 21:02 +, Jon Harrop wrote:
On Sunday 20 January 2008 21:02:04 [EMAIL PROTECTED] wrote:
On 2008.01.19 19:11:13 +0100, Peter Verswyvelen [EMAIL PROTECTED]
scribbled
1.4K characters:
I would find it most useful to get type inference information on the fly,
Adam Langley wrote:
Since CPP mode removes newlines in the out macro expansion. It appears
to be impossible to have a macro expand to a function with an INLINE
pragma since it appears to need to be in its own line.
that's because INLINE uses layout like everything else, so you can use
On 20 Jan 2008, at 1:02 PM, [EMAIL PROTECTED] wrote:
On 2008.01.19 19:11:13 +0100, Peter Verswyvelen [EMAIL PROTECTED]
scribbled 1.4K characters:
The problem is that this only works when the complete source file
compiles
correctly no?
Yes. As I said, it's a very hackish solution - think
Adam Langley [EMAIL PROTECTED] writes:
Has anyone a workaround for this, or a way to get the preprocessor to
output a newline?
You can use cpphs with the --layout flag, to preserve newlines in macro
expansion.
http://haskell.org/cpphs
For instance, with ghc you need to add the following
Thanks Isaac and Malcolm. That neatly solves all my problems!
AGL
--
Adam Langley [EMAIL PROTECTED]
http://www.imperialviolet.org 650-283-9641
___
Haskell-Cafe mailing list
This fixed the second example. Thanks.
I think handleConnection should be
handleConnection :: RequestHandler - Handle - IO ()
handleConnection r h =
handleToRequest h = responseSend h . runRequestHandler r
Levi
___
Haskell-Cafe mailing
Since nobody with write access to that page seems to
be responding here, you may wish to try reporting this
bug to the main Haskell mailing list
([EMAIL PROTECTED]).
Posting to that list may get the attention of some
Haskell users who may not regularly read this mailing
list.
Benjamin L. Russell
Hello Math Enthusiast,
IIIT-Hyderabad, India cordially invites you to be a part of Mathematika
'08, an online competition that emphasizes on fusion of mathematics and
computing.
Where: http://felicity.iiit.ac.in/~math
When: 4th February, 2008
This
27 matches
Mail list logo