Jim Snow wrote:
I guess a pov importer wouldn't necessarily be all that difficult, or
an exporter, for that matter. (Supporting every single primitive
type, texture, and rendering feature would be a daunting challenge,
but just supporting the basics might be relatively simple.) The
problem
Jan-Willem Maessen wrote:
Just to clarify: divide and conquer splits one tree on the root value of
the other (possibly avoiding enforcing the balance metric until after
joining trees, though not obvious how / if that's useful)? The
definition of divide and conquer on trees without a fixed
Hi,
I'm trying to implement an alarm in Haskell and wrote the following code:
http://hpaste.org/7201
But it doesn't work as expected.
The expected behaviour is: The user enters a time in minutes. If the time is
reached, a bell
rings. If, before the time is reached, he press enter, the program
Hi all
I was wondering if anyone has or knows of a Finite Difference or
Finite Element Implementation in pure haskell. I would like to write
this myself, but my haskell skills is not that good.
I did a bit of google search I've seen it bieng discussed, but did not
point to an actual code.
On Apr 27, 2008, at 10:05 AM, Jake Mcarthur wrote:
On Apr 27, 2008, at 9:36 AM, Conal Elliott wrote:
I think we *do* want unsafeNewEmptyTMVar inlined. Here's a
convenient caching wrapper:
cached :: STM a - TIVal a
cached m = TIVal m (unsafePerformIO newEmptyTMVarIO)
Yes, this is
Hello,
How about defining the types like this:
data PVal a = Unit a | Array [a]
data Val = IntVal (PVal Int) | BoolVal (PVal Bool) -- | etc
instance Serialize Int where ...
instance Serialize a = Serialize (PVal a) where ...
instance Serialize Val where ...
Hope this helps.
-Iavor
On Sun,
On 4/27/08, Paul Johnson [EMAIL PROTECTED] wrote:
I'm trying to write an AMQP framing layer. AMQP has two very similar union
types: there is a variant that contains a single item, and an array
which consists of a list of elements of the same type. So I thought I could
define a Unit type
consider
class FD a b | a - b
instance CFD a b = FD a b
class CFD a b
instance CFD Bool Char
and the constraint 'CFD Bool c'.
logically, we know that if we have 'CFD Bool c', we also have 'FD Bool c',
which implies that 'c' is uniquely determined, which implies that 'c~Char'.
In GHC there's a GHC.Unicode library, but for a string such as ΧΑΟΣΣ, a
GHC compiled program prints it as a string of unknown characters, and in the
interpreter, the string evaluates to a string of escape sequences instead of
displaying properly.
Is there a way to get/activate unicode support in
On Sun, Apr 27, 2008 at 1:02 PM, Don Stewart [EMAIL PROTECTED] wrote:
GHC supports unicode internally, and String and Char are all unicode.
To do unicode IO however, you need to use the utf8-string package:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-string
Just
zefria:
On Sun, Apr 27, 2008 at 1:02 PM, Don Stewart [EMAIL PROTECTED] wrote:
GHC supports unicode internally, and String and Char are all unicode.
To do unicode IO however, you need to use the utf8-string package:
On Sun, Apr 27, 2008 at 12:29:34PM -0700, Donald Bruce Stewart wrote:
Ian Lynagh wrote a pure haskell readline implementation a while ago,
I think that was Malcolm Wallace.
Thanks
Ian
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
ah ha, yes. I seem to have found it here:
http://www.haskell.org/pipermail/glasgow-haskell-bugs/2001-April/000401.html
I'll use this as a base. Many thanks to the both of you. I'll be sure
to submit it to Hackage for others to enjoy if I end up adding some
capability to it.
zefria:
ah ha, yes. I seem to have found it here:
http://www.haskell.org/pipermail/glasgow-haskell-bugs/2001-April/000401.html
I'll use this as a base. Many thanks to the both of you. I'll be sure
to submit it to Hackage for others to enjoy if I end up adding some
capability to it.
yeah, a
In case you missed it the first time here is my query again:
Hi
I know we've already looked at the topic of function type calculation
though last time I didn't have the chance to go through it
thoroughly. So here it is again. Apologies for the repetition. I've
had a try at calculating function
On Apr 27, 2008, at 12:16 , David F. Place wrote:
Thanks for the tip. I edited the collections.cabal file to add
bytestring to the Build-depends. It also needed containers and
array! The build gave streams of warnings and finally failed, so
I guess this library is not ready for use.
[1]
funk f x = f (funk f) x
f :: a
x :: b
funk f x :: c
therefore funk :: a - b - c
RHS
f (funk f) x :: c
f (funk f) :: d - c
x :: d
f :: e - d - c
funk :: h - e
f :: h
Ian Lynagh wrote a pure haskell readline implementation a while ago,
I think that was Malcolm Wallace.
... and it is part of the readline package! See
System.Console.SimpleLineEditor. Needless to say, it is far from
perfect, but does give some basic facilities. There are lots of ways
On Sun, 2008-04-27 at 21:44 +0100, Malcolm Wallace wrote:
Ian Lynagh wrote a pure haskell readline implementation a while ago,
I think that was Malcolm Wallace.
... and it is part of the readline package! See
System.Console.SimpleLineEditor. Needless to say, it is far from
David F. Place wrote:
Thanks for the tip. I edited the collections.cabal file to add
bytestring to the Build-depends. It also needed containers and
array! The build gave streams of warnings and finally failed, so I
guess this library is not ready for use.
I don't think anyone is
By picking points randomly from a square one can calculate pi. Keep
track of how many points from the square you pick lay in the inscribed
circle. Supposing the square's edges are length 2, then the inscribed
circle has radius 1. Thus the area of the circle is pi*r^2 = pi. The
area of the square
ry:
By picking points randomly from a square one can calculate pi. Keep
track of how many points from the square you pick lay in the inscribed
circle. Supposing the square's edges are length 2, then the inscribed
circle has radius 1. Thus the area of the circle is pi*r^2 = pi. The
area of the
Don Stewart writes:
Ry Dahl:
By picking points randomly from a square one can calculate pi.
...
What is the best way to express this algorithm in Haskell?
Using a random generator, such as System.Random or
System.Random.Mersenne, generate random numbers in your range,
testing if they're
On Mon, 2008-04-28 at 02:54 +0200, [EMAIL PROTECTED]
wrote:
Don Stewart writes:
Ry Dahl:
By picking points randomly from a square one can calculate pi.
...
What is the best way to express this algorithm in Haskell?
Using a random generator, such as System.Random or
Hello, all.
After quite a bit of collaboration with Edward Kmett over the past few days,
I've rolled up a new release of category-extras. Perhaps the most significant
addition is the generalized hylomorphism he first blogged about here:
Assuming the square had 100 pixels per side, on the average, approximately how
many random pixels should be plotted in the square before obtaining a
reasonably good estimate of pi?
Benjamin L. Russell
--- On Mon, 4/28/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
From: [EMAIL PROTECTED]
26 matches
Mail list logo