Dougal Stanton [EMAIL PROTECTED] writes:
On 31 May 2007 21:52:33 +0100,
Jon Fairbairn [EMAIL PROTECTED] wrote:
Yes, but you didn't say that it's not only silly but
demonstrates the opposite of expressiveness as it's all
about breaking an abstraction and must be non-portable
code
I'm looking at the XML SYB example
http://www.cs.vu.nl/boilerplate/testsuite/xmlish/Main.hs
I'd like to find a way to pass other type customizations as arguments to
data2content and content2data.
I modified data2Content as follows:
data2content f = element
Hello Andrew,
Thursday, May 31, 2007, 11:47:28 PM, you wrote:
(Otherwise... wasn't there some library somewhere for serialising values
in binary?)
Binary, AltBinary (see latest HCAR), just an example using AltBinary:
main = do
let s = encode (1.1::Float) -- s has type String
Donald Bruce Stewart wrote:
let s = encode (1.1 :: Float)
:t s
s :: Data.ByteString.Lazy.ByteString
s
LPS [\NUL\NUL\140\204\205\255\255\255\255\255\255\255\233]
decode s :: Float
1.1
But doesn't Data.Binary serialise to a guaranteed representation, i.e.
Actually, standalone deriving doesn't really solve the boilerplate
boilerplate problem. My original complaint here is that I don't want to
explicitly declare a deriving (Data,Typeable) for every type used
somewhere inside a larger type I am using. In this particular case, I
am using SYB to
bulat.ziganshin:
Hello Andrew,
Thursday, May 31, 2007, 11:47:28 PM, you wrote:
(Otherwise... wasn't there some library somewhere for serialising values
in binary?)
Binary, AltBinary (see latest HCAR), just an example using AltBinary:
main = do
let s = encode (1.1::Float)
jules:
Donald Bruce Stewart wrote:
let s = encode (1.1 :: Float)
:t s
s :: Data.ByteString.Lazy.ByteString
s
LPS [\NUL\NUL\140\204\205\255\255\255\255\255\255\255\233]
decode s :: Float
1.1
But doesn't Data.Binary serialise to a guaranteed
Claus Reinke wrote:
Actually, standalone deriving doesn't really solve the boilerplate
boilerplate problem. My original complaint here is that I don't want
to explicitly declare a deriving (Data,Typeable) for every type used
somewhere inside a larger type I am using. In this particular case,
On Fri, Jun 01, 2007 at 03:33:41AM +0100,
PR Stanley [EMAIL PROTECTED] wrote
a message of 19 lines which said:
The question, however, still remains: why False = 0 and True 1?
Arbitrary decision? On a similar case, the ISO 5218 standard,
representation of human gender
On Thu, 31 May 2007, Paul Hudak wrote:
PR Stanley wrote:
I think so, too. In Boolean algebra (which predates computers, much less
C), FALSE has traditionally been associated with 0, and TRUE with 1. And
since 1 0, TRUE FALSE.
The question, however, still remains: why False = 0 and
Hi Alex,
The problem with Data.Derive is that I now have a pre-processor cycle as
part of my build process. Automatic and universal Data and Typeable
instance deriving should just be built into Haskell.
Not if you use the template haskell support. We don't currently have a
deriveAll command,
Hello Jules,
Friday, June 1, 2007, 3:02:33 PM, you wrote:
machine-independent? Whereas this (stupid) question explicitly asked for
*your particular hardware's* floating point rep.
there is castSTUArray function which is widely used exactly for this
purpose. look for examples of its usage in
I suppose a deriveAll command from template haskell would work. Is that
really possible?
-Alex-
Neil Mitchell wrote:
Hi Alex,
The problem with Data.Derive is that I now have a pre-processor cycle as
part of my build process. Automatic and universal Data and Typeable
instance deriving should
Andrew Coppin wrote:
Lennart Augustsson wrote:
Why do you seem so in awe of Mathematica?
Oh, well, I guess it is only the most powerful maths software ever
written... no biggie.
No, it is one of several. In very little time I can find 20 things that
Maple does better than Mathematica. In
Henning Thielemann wrote:
On Thu, 31 May 2007, Paul Hudak wrote:
PR Stanley wrote:
I think so, too. In Boolean algebra (which predates computers, much less
C), FALSE has traditionally been associated with 0, and TRUE with 1. And
since 1 0, TRUE FALSE.
The question, however, still remains:
Can you post any code using the monad? The article was interesting but
I think it would make more sense if I saw some working code ...
Justin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
[EMAIL PROTECTED] wrote:
Andrew Coppin cites me and asks:
I find that statement interesting. I have never come across *any*
other package that can perform _symbolic_ mathematics.
(Sure, there are packages that can perform specific operations -
solving certain kinds of equations, transforming
David Roundy wrote:
Note also that you can use unsafePerformIO to safely get pure functions
doing both these operations.
I've always been puzzled by this one... how does unsafePerformIO
circumvent the type system? I don't understand.
___
PR Stanley wrote:
The question, however, still remains: why False = 0 and True 1? I
appreciate that it's so in boolean algebra but why? Why not True = 0 and
False = 1?
A Boolean value denotees veracity whereas an ordered value concerns
magnitude (priority), indeed, order!!
Other members have
[EMAIL PROTECTED] wrote:
PS. Somebody (A. Coppin?) said that Mathematica not without reason costs
1.
Welll, less than 2000, and for students there are much cheaper
possibi-
lities. I am the last to make free ads for Wolfram, I recommend the usage
of Axiom and Maxima to my students, but
On Fri, Jun 01, 2007 at 07:28:07PM +0100, Andrew Coppin wrote:
David Roundy wrote:
Note also that you can use unsafePerformIO to safely get pure functions
doing both these operations.
I've always been puzzled by this one... how does unsafePerformIO
circumvent the type system? I don't
Donald Bruce Stewart wrote:
See also the older NewBinary,
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/NewBinary-0.1
Now that's just ironic...
Incidentally, I've been thinking. You *might* want the binary
representation of things if you were going to, say, compress or
David Roundy wrote:
On Fri, Jun 01, 2007 at 07:28:07PM +0100, Andrew Coppin wrote:
David Roundy wrote:
Note also that you can use unsafePerformIO to safely get pure functions
doing both these operations.
I've always been puzzled by this one... how does unsafePerformIO
Jacques Carette wrote:
Andrew Coppin wrote:
Lennart Augustsson wrote:
Why do you seem so in awe of Mathematica?
Oh, well, I guess it is only the most powerful maths software ever
written... no biggie.
No, it is one of several. In very little time I can find 20 things
that Maple does
On Fri, Jun 01, 2007 at 07:39:32PM +0100, Andrew Coppin wrote:
David Roundy wrote:
On Fri, Jun 01, 2007 at 07:28:07PM +0100, Andrew Coppin wrote:
David Roundy wrote:
Note also that you can use unsafePerformIO to safely get pure functions
doing both these operations.
I've
OK, so... If you were going to forget everything we humans know about
digital computer design - the von Neuman architecture, the
fetch/decode/execute loop, the whole shooting match - and design a
computer *explicitly* for the purpose of executing Haskell programs...
what would it look like?
On Friday 01 June 2007, Andrew Coppin wrote:
David Roundy wrote:
Note also that you can use unsafePerformIO to safely get pure functions
doing both these operations.
I've always been puzzled by this one... how does unsafePerformIO
circumvent the type system? I don't understand.
import
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
David House wrote:
On 31/05/07, Isaac Dupree [EMAIL PROTECTED] wrote:
foo undefined = undefined
That's not true. When you evaluate foo undefined, it matches the first
(irrefutable) pattern immediately, without any deconstruction of the
David Roundy wrote:
On Fri, Jun 01, 2007 at 07:39:32PM +0100, Andrew Coppin wrote:
No, I mean... how could you use unsafePerformIO to perform a typecast? I
don't see a way to do that.
Then I'm confused. What typecast are you talking about?
cast :: a - b
cast x = unsafePerformIO (do
Hello,
Did you see the recently announce reduceron project? (Or perhaps you
are already involved in that project?)
http://www-users.cs.york.ac.uk/~mfn/reduceron/index.html
If you search scholar.google.com for graph reduction machine you
should turn up a bunch of papers about attempts to build a
On Thu, May 31, 2007 at 04:52:57AM +0100, PR Stanley wrote:
What justifies False True?
This way we have only one person asking such question.
If it was done the other way, there would be hundreds... ;-)
BTW, your question provoked an interesting discussion and generated some
nice answers (I
Andrew Coppin [EMAIL PROTECTED] writes:
OK, so... If you were going to forget everything we humans
know about digital computer design - the von Neuman
architecture, the fetch/decode/execute loop, the whole
shooting match - and design a computer *explicitly* for the
purpose of executing
-- Forwarded message --
From: Chaddaï Fouché [EMAIL PROTECTED]
Date: 2 juin 2007 00:00
Subject: Re: [Haskell-cafe] Implementing Mathematica
To: Andrew Coppin [EMAIL PROTECTED]
2007/6/1, Andrew Coppin [EMAIL PROTECTED]:
I looked, I didn't find anything interesting.
Well maybe
P.S.: The question, however, still remains: why False = 0 and True
1? I appreciate that it's so in boolean algebra but why? Why not
True = 0 and False = 1?
A Boolean value denotees veracity whereas an ordered value concerns
magnitude (priority), indeed, order!!
Other members have mentioned
either be slower than mainstream hardware or would be
overtaken by it in a very short space of time.
i'd like to underline the last of these two points, and i'm impressed
that you came to that conclusion as early as the eighties. i'm not
into hardware research myself, but while i was
On 6/1/07, Chaddaï Fouché [EMAIL PROTECTED] wrote:
2007/6/1, Andrew Coppin [EMAIL PROTECTED]:
I looked, I didn't find anything interesting.
Well maybe you should look one more time with your brain on...
Even my years old TI-89 calculator with a paltry Z80 processor and a
few hundred K of RAM
Jon asked:
Where should I go to get started with OpenGL and Haskell?
Don't use the examples here:
http://www.haskell.org/HOpenGL/
They don't work with recent versions of HOpenGL.
But do use the examples here:
http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/GLUT/examples/RedBook/
Hello,
If -fvia-C fixes your problem, then your code has a bug, strictly speaking. If
your foreign call requires some information from a header file, then the right
way to call it is by making a small C wrapper function and calling that.
I tried to do this but couldn't. I could get GHC to
On Fri, Jun 01, 2007 at 10:10:53PM -0400, jeff p wrote:
Hello,
If -fvia-C fixes your problem, then your code has a bug, strictly
speaking. If
your foreign call requires some information from a header file, then the
right
way to call it is by making a small C wrapper function and calling
andrewcoppin:
Donald Bruce Stewart wrote:
See also the older NewBinary,
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/NewBinary-0.1
Now that's just ironic...
Incidentally, I've been thinking. You *might* want the binary
representation of things if you were going
Hello,
No, it sounds like you're using the wrong import syntax.
That linker warning is a dead givaway you should be using ccall, not
stdcall.
Ok. I just tried changing this and now things work fairly well. I
thought stdcall was the correct syntax for windows.
This seems like a strange state
On Fri, Jun 01, 2007 at 10:48:12PM -0400, jeff p wrote:
Hello,
No, it sounds like you're using the wrong import syntax.
That linker warning is a dead givaway you should be using ccall, not
stdcall.
Ok. I just tried changing this and now things work fairly well.
I thought stdcall was
On Saturday 02 June 2007 02:45:48 Dan Piponi wrote:
But do use the examples here:
http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/GLUT/examples/R
edBook/ They worked for me.
Great, thanks. May I just ask, does ShadowMap.hs work on your machine?
--
Dr Jon D Harrop, Flying Frog
43 matches
Mail list logo