On Monday 10 September 2007 21:02, apfelmus wrote:
[...]
class Put a endian where
put :: endian - a - Put
[...]
Oh, and the 8,16,32 and 64 are good candidates for phantom
type/associated data types, too.
I think that using any non-H98 feature like MPTC or associated data types for
On Monday 10 September 2007 19:50, Thomas Schilling wrote:
[...]
instance Binary MP3 where
get = MP3 $ getHeader * getData -- [*]
where getHeader = do magic - getWord32le
case magic of
...
Of course this works in the sense that it
sven.panne:
On Monday 10 September 2007 19:50, Thomas Schilling wrote:
[...]
instance Binary MP3 where
get = MP3 $ getHeader * getData -- [*]
where getHeader = do magic - getWord32le
case magic of
...
Of course this works in the
On Tuesday 11 September 2007 08:14, Don Stewart wrote:
sven.panne:
On Monday 10 September 2007 19:50, Thomas Schilling wrote:
[...]
instance Binary MP3 where
get = MP3 $ getHeader * getData -- [*]
where getHeader = do magic - getWord32le
case magic of
On Monday 10 September 2007 19:26, Don Stewart wrote:
Yep, just send a patch. Or suggest what needs to happen.
OK, I'll see what I can do next weekend, currently I'm busy with
packaging/fixing GHC. I have similar code lying around in various places, and
it would be nice if there was a more
sven.panne:
On Monday 10 September 2007 19:26, Don Stewart wrote:
Yep, just send a patch. Or suggest what needs to happen.
OK, I'll see what I can do next weekend, currently I'm busy with
packaging/fixing GHC. I have similar code lying around in various places, and
it would be nice if
* apfelmus wrote:
It's not that related, but I just got struck by an obvious idea, namely
to put the endianness in an extra parameter
data Endianness = Little | Big | Host
putInt32 :: Endianness - Int - Put
Please add the endianess to the state of the monad Put.
setendianess ::
haskell is greate
but i don't know how to start.
2007-09-11
clisper
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Tue, 2007-09-11 at 09:10 +0200, Sven Panne wrote:
foo :: Binary a = ... - a - ...? This should probably mean foo is
using some portable (de-)serialization, but doesn't care about the
actual representation,
I'm probably missing something, but:
How can the format be portable if the
The way I see it as a newcomer, Haskell shifts the typical imperical
programming bugs like null pointers and buffer overruns towards
space/time leaks, causing programs that either take exponentially long
to complete, stack overflow, or fill up the swap file on disc because
they consume
Hi Peter,
The way I see it as a newcomer, Haskell shifts the typical imperical
programming bugs like null pointers and buffer overruns towards
space/time leaks, causing programs that either take exponentially long
to complete, stack overflow, or fill up the swap file on disc because
they
Because I had a background in videogame development, I purchased The
Haskell School of Expression. I found this a great book, but it has a
fast pace, so be prepared.
To me, Haskell was a bit like climbing a mountain which is largely
covered by fog; you don't see anything until you've climbed high
Hello,
I have some questions connected more with the licenses and libraries as the
language itself:
Is it possible to:
- publish Haskell source code under the BSD3 license
- provide an executable binary together with the code including (compiled
e.g. with 'ghc --make') standard (in the ghc
Well, I actually meant more something like the imperative equivalences
of code coverage tools and unit testing tools, because I've read
rumors that in Haskell, unit testing is more difficult because lazy
evaluation will cause the units that got tested to be evaluated
completely different
On 11/09/2007, Peter Verswyvelen [EMAIL PROTECTED] wrote:
To me, Haskell was a bit like climbing a mountain which is largely
covered by fog; you don't see anything until you've climbed high enough,
and then the view is really beautiful ;-)
Either that or: the foothills are glorious, but as
Hi
Well, I actually meant more something like the imperative equivalences
of code coverage tools and unit testing tools,
hpc and HUnit cover these two things pretty perfectly. hpc will be in
GHC 6.8, and its really cool :-)
because I've read
rumors that in Haskell, unit testing is more
Hello Sven,
Tuesday, September 11, 2007, 11:10:17 AM, you wrote:
Haddock docs. The example above means something completely different, so I
propose to add another class (e.g. ExternalBinary, better name needed) to
this looks correct form theoretical POV but don't forget that then you
will
Ketil Malde wrote:
On Tue, 2007-09-11 at 09:10 +0200, Sven Panne wrote:
foo :: Binary a = ... - a - ...? This should probably mean foo is
using some portable (de-)serialization, but doesn't care about the
actual representation,
I'm probably missing something, but:
How can the format be
On Tue, 2007-09-11 at 12:01 +0100, Jules Bean wrote:
How can the format be portable if the representation isn't unambigously
defined? And if it is unabmigously defined, what's wrong with using it
for externally defined data formats?
It's portable because it works on other machines also
Ketil Malde wrote:
On Tue, 2007-09-11 at 12:01 +0100, Jules Bean wrote:
How can the format be portable if the representation isn't unambigously
defined? And if it is unabmigously defined, what's wrong with using it
for externally defined data formats?
It's portable because it works on other
That's a really weird statement, and one that goes completely opposite
to my view of things. Do you have sources for these rumours? In a pure
language, if you evaluate some code it will do exactly the same thing
every time - there is no different behaviour. If you test the code,
Sorry, I did
LOL!
Another problem is that I always have to descend again for my main job which
involves C#/C++, and all that climbing up and down is *very* tiersome.
Peter
-Original Message-
From: Dougal Stanton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 11, 2007 12:44 PM
To: [EMAIL
On Sep 11, 2007, at 7:01 , Jules Bean wrote:
The actual format used by Data.Binary is not explicitly described
in any standard (although in most cases it's moderately obvious,
and anyone can read the code), and it's not formally guaranteed
that it will never change in a later version
Sven Panne wrote:
2. Could we make is so all items are collapsed initially? (Currently
they're all expended initially - which makes it take rather a long time
to find anything.)
Again this depends on the use case: I'd vote strongly against collapsing the
list initially, because that way the
On 9/11/07, clisper [EMAIL PROTECTED] wrote:
haskell is greate
but i don't know how to start.
A good place to start is the Haskell wiki:
http://haskell.org/haskellwiki/Haskell
On the left, look under Learning Haskell -- there's all kinds of great
stuff linked from there. I would also
Thomas Schilling wrote:
However, regarding the modules list. I think it should be easy to have
optional javascript functionality to toggle the visibility of the module
tree. The default visibility could be customized using a cookie.
I don't know how to make cookies work purely in Javascript
Andrew Coppin wrote:
OTOH, I recently discovered that GHCi has the ability to show you what's
defined in a given module without me having to wait 40 seconds for
Firefox to start... Shame you can't scroll its output. (And still no
help if you're not sure of the module name.)
!!!
Run ghci in
Haskellians,
Am i wrong in my assessment that the vast majority of reflective machinery
is missing from Haskell? Specifically,
- there is no runtime representation of type available for
programmatic representation
- there is no runtime representation of the type-inferencing or
On Tue, Sep 11, 2007 at 01:59:40PM +0200, Peter Verswyvelen wrote:
That's a really weird statement, and one that goes completely opposite
to my view of things. Do you have sources for these rumours? In a pure
language, if you evaluate some code it will do exactly the same thing
every time
Hi
there is no runtime representation of type available for programmatic
representation
Data.Typeable.typeOf :: Typeable a = a - TypeRep
there is no runtime representation of the type-inferencing or checking
machinery
Pretty much, no. The GHC API may provide some.
there is no runtime
Neil,
Thanks very much for the detailed response. When we did Rosette, a
reflective actor-based language, back in the late '80's and early '90's, we
were very much influenced by Brian Cantwell Smith's account of reflection in
3-Lisp and similarly by Friedman and Wand's Mystery of the Tower
Greg Meredith wrote:
Haskellians,
Am i wrong in my assessment that the vast majority of reflective
machinery is missing from Haskell? Specifically,
* there is no runtime representation of type available for
programmatic representation
* there is no runtime representation of the
So the answer for persistence is Data.Binary - ASN.1 converter that
can be used in extrema?
On 11/09/2007, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote:
On Sep 11, 2007, at 7:01 , Jules Bean wrote:
The actual format used by Data.Binary is not explicitly described
in any standard
On 9/11/07, Peter Verswyvelen [EMAIL PROTECTED] wrote:
How well and how can a Haskell program be tested to make sure it does
not cause these space/time bugs? What tools are typically used?
I've been fighting this myself. I had an especially nasty
stack-overflow that took me weeks to track
On Sep 11, 2007, Simon Marlow wrote:
Please, please, someone do this for me. I tried, and failed, to
get the
layout right for the contents list in all browsers at the same
time. The
semantics of CSS is beyond my comprehension.
Cheers,
Simon
Hi Simon,
On the page
Jules Bean wrote:
For these reasons, although it is very cool, I don't think it can be
recommended as a basis for long-term file format definitions.
Indeed, the authors have never claimed that this is what it's for.
Unfortunately, because the authors haven't *disclaimed* this as a
purpose,
Bryan O'Sullivan wrote:
(All of the above speaks of the 'high-level' Data.Binary not the
'low-level'.)
Data.Binary *is* the low-level Data.Binary :-)
I was distinguishing between these two levels:
(1) High-level = Binary typeclass. Contains instances for many, many
useful common types, the
Jules,
Thanks for these comments. i wouldn't judge Haskell solely on the basis of
whether it embraced reflection as an organizing computational principle or
as a toolbox for programmers. Clearly, you can get very far without it. And,
it may be that higher-order functional gives you enough of the
clisper clisper at 163.com writes:
haskell is greate
but i don't know how to start.
Don't!
Learning Haskell will change your world! For worse! Really! Don't do that,
you still have time to go back! Or be damned like all of us here...
Referential transparency will suck up your soul.
On Tue, 2007-09-11 at 16:55 +, Gracjan Polak wrote:
clisper clisper at 163.com writes:
haskell is greate
but i don't know how to start.
Don't!
Learning Haskell will change your world! For worse! Really! Don't do that,
you still have time to go back! Or be damned like
On Tue, Sep 11, 2007 at 07:33:54AM -0700, Greg Meredith wrote:
Our analysis suggested the following breakdown
- Structural reflection -- all data used in the evaluation of programs
has a programmatic representation
- Procedural reflection -- all execution machinery used in the
How do I create C-libraries that I can load into GHCi? I am trying to
do some basic FFI, and it's not working.
Here's the background. I created three files, foo.h, foo.cpp, and
test_foo.lhs. (source code below)
Note: I am using MinGW/Msys under Windows XP.
If I compile foo.cpp and then try
When the index is generated with a more recent Haddock, you get a
search field, which does an incremental search, so this might
perhaps be more what you are looking for.
A more aesthetical note: We should really get rid of the ugly
table/CSS layout mixture, the lower part of the page renders
Op 11-sep-2007, om 18:43 heeft Greg Meredith het volgende geschreven:
Thanks for these comments. i wouldn't judge Haskell solely on the
basis of whether it embraced reflection as an organizing
computational principle or as a toolbox for programmers. Clearly,
you can get very far without
bf3:
The way I see it as a newcomer, Haskell shifts the typical imperical
programming bugs like null pointers and buffer overruns towards
space/time leaks, causing programs that either take exponentially long
to complete, stack overflow, or fill up the swap file on disc because
they
bf3:
Well, I actually meant more something like the imperative equivalences
of code coverage tools and unit testing tools, because I've read
rumors that in Haskell, unit testing is more difficult because lazy
evaluation will cause the units that got tested to be evaluated
We have full
Don Stewart wrote:
Just in case people didn't see, the `binary' package lives on
http://darcs.haskell.org/binary/
However, Lennart Kolmodin, Duncan and I are actively maintaining and reviewing
patches, so send them to one (or all) of us for review.
Right. And this is the real
Dougal Stanton wrote:
On 11/09/2007, Peter Verswyvelen [EMAIL PROTECTED] wrote:
To me, Haskell was a bit like climbing a mountain which is largely
covered by fog; you don't see anything until you've climbed high enough,
and then the view is really beautiful ;-)
Either that or: the
On 9/11/07, Andrew Coppin [EMAIL PROTECTED] wrote:
you can fall down a monad and not be able to
escape...
It's not so bad. It's in the nature of monads that after you've fallen
in once, you can never get trapped any deeper.
--
Dan
___
Haskell-Cafe
Dan Piponi wrote:
On 9/11/07, Andrew Coppin [EMAIL PROTECTED] wrote:
you can fall down a monad and not be able to escape...
It's not so bad. It's in the nature of monads that after you've fallen
in once, you can never get trapped any deeper.
But you can climb higher...
(Note: Best viewed in
On 9/11/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Dougal Stanton wrote:
On 11/09/2007, Peter Verswyvelen [EMAIL PROTECTED] wrote:
To me, Haskell was a bit like climbing a mountain which is largely
covered by fog; you don't see anything until you've climbed high enough,
and then the
Jules Bean wrote:
Andrew Coppin wrote:
OTOH, I recently discovered that GHCi has the ability to show you
what's defined in a given module without me having to wait 40 seconds
for Firefox to start... Shame you can't scroll its output. (And still
no help if you're not sure of the module name.)
andrewcoppin:
Don Stewart wrote:
Just in case people didn't see, the `binary' package lives on
http://darcs.haskell.org/binary/
However, Lennart Kolmodin, Duncan and I are actively maintaining and
reviewing
patches, so send them to one (or all) of us for review.
Right. And
h._h._h._:
Hello,
I have some questions connected more with the licenses and libraries as the
language itself:
Is it possible to:
- publish Haskell source code under the BSD3 license
- provide an executable binary together with the code including (compiled
e.g. with 'ghc --make')
As a Hackathon project, I'm thinking of trying to write a Haskell
binding for the GraphicsMagick image manipulation library
(http://www.graphicsmagick.org/). Has anyone done this already? If
not, would anyone else besides me use it? If you think there's a
better library out there that serves a
Hi
take 1000 [1..3] still yields [1,2,3]
I thought it was supposed to return an error.
Any ideas?
Thanks, Paul
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 9/11/07, PR Stanley [EMAIL PROTECTED] wrote:
Hi
take 1000 [1..3] still yields [1,2,3]
I thought it was supposed to return an error.
Any ideas?
No, that's the behavior for take specified in the Haskell 98 report:
http://haskell.org/onlinereport/standard-prelude.html
-- take n, applied to a
On 9/11/07, PR Stanley [EMAIL PROTECTED] wrote:
Hi
take 1000 [1..3] still yields [1,2,3]
I thought it was supposed to return an error.
Any ideas?
Thanks, Paul
If for some reason you want a version that does return an error in that
situation, you could do something like the following:
I suppose I'm thinking of head or tail - e.g. head [] or tail [].
I'm trying to write my own version of the find function. I have a few
ideas but not quite sure which would be more suitable in the context of FP.
Any advice would be gratefully received - e.g. do I use recursion,
list
byorgey:
On 9/11/07, PR Stanley [EMAIL PROTECTED] wrote:
Hi
take 1000 [1..3] still yields [1,2,3]
I thought it was supposed to return an error.
Any ideas?
Thanks, Paul
If for some reason you want a version that does return an error in that
situation,
On 9/11/07, Don Stewart [EMAIL PROTECTED] wrote:
byorgey:
On 9/11/07, PR Stanley [EMAIL PROTECTED] wrote:
Hi
take 1000 [1..3] still yields [1,2,3]
I thought it was supposed to return an error.
Any ideas?
Thanks, Paul
If for some reason you want a
On Tue, Sep 11, 2007 at 07:38:18PM -0400, Brent Yorgey wrote:
On 9/11/07, PR Stanley [EMAIL PROTECTED] wrote:
Hi
take 1000 [1..3] still yields [1,2,3]
I thought it was supposed to return an error.
Any ideas?
Thanks, Paul
If for some reason you want a version that does return an
Let me get this right, are you saying it's unsafe when it returns an error?
Paul
At 00:40 12/09/2007, you wrote:
byorgey:
On 9/11/07, PR Stanley [EMAIL PROTECTED] wrote:
Hi
take 1000 [1..3] still yields [1,2,3]
I thought it was supposed to return an error.
Any
prstanley:
I suppose I'm thinking of head or tail - e.g. head [] or tail [].
I'm trying to write my own version of the find function. I have a few
ideas but not quite sure which would be more suitable in the context of
FP.
Any advice would be gratefully received - e.g. do I use
byorgey:
On 9/11/07, Don Stewart [EMAIL PROTECTED] wrote:
byorgey:
On 9/11/07, PR Stanley [EMAIL PROTECTED] wrote:
Hi
take 1000 [1..3] still yields [1,2,3]
I thought it was supposed to return an error.
Any ideas?
prstanley:
Let me get this right, are you saying it's unsafe when it returns an
error?
Partial functions may crash your program, so that's unsafe by some definitions,
yep.
We have tools that analyse programs for such bugs, in fact (Neil's `catch'
program).
-- Don
Haskellians,
Is there a characterization of prime monads? Here the notion of
factorization i'm thinking about is decomposition into adjoint situations.
For example, are there monads for which there are only the Kleisli and
Eilenberg-Moore decompositions into adjoint situations? Would this be a
On Tue, 2007-09-11 at 16:48 -0700, Don Stewart wrote:
byorgey:
On 9/11/07, Don Stewart [EMAIL PROTECTED] wrote:
byorgey:
On 9/11/07, PR Stanley [EMAIL PROTECTED] wrote:
Hi
take 1000 [1..3] still yields [1,2,3]
I thought it
On Tue, Sep 11, 2007 at 03:41:59PM -0700, Tim Chevalier wrote:
As a Hackathon project, I'm thinking of trying to write a Haskell
binding for the GraphicsMagick image manipulation library
(http://www.graphicsmagick.org/).
please do! this would be a huge asset for us. image/graphicsmagick and
69 matches
Mail list logo