Hi Haskellers,
I'm trying to generate a random vertex in OpenGL as follows.
genPosition :: IO (Vertex3 GLfloat)
genPosition = do x - getStdRandom $ randomR (-1.6,1.6)
y - getStdRandom $ randomR (-1.0,1.0)
return (Vertex3 x y (-1))
a newtype wrapper for CFloat, which has a Random
instance, I would do:
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
deriving instance Random GLFloat
On Wed, May 2, 2012 at 6:29 PM, Mark Spezzano mark.spezz...@chariot.net.au
wrote:
Hi Haskellers,
I'm
Hi,
Can someone please give me a _lucid_ and _simple_ explanation of exactly how
continuations can be used in Haskell?
I've already had a look at most of the tutorials and explanations on the web,
but I'm still confused. Continuations and CPS have me baffled. (I have most of
the Haskell
Hi Heinrich,
I'm really looking to use the Cont monad itself--but the link you gave me is
also helpful, so thank you.
If anyone else has words of wisdom to add to this thread please feel free to
pitch in.
Thanks,
Mark
On 01/10/2011, at 5:08 PM, Heinrich Apfelmus wrote:
Mark Spezzano
datatypes--enumerations in other words)
How can I index the Array with an instance of a Node. I think I need to make
Node an instance of Ix somehow??
Is this a sensible approach? Sample code of the instance declaration for Ix
would be helpful.
Thanks
Mark Spezzano
approach? Sample code of the instance declaration for Ix
would be helpful.
Thanks
Mark Spezzano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Solved it with your help :)
Thanks for your assistance!
Mark Spezzano
On 14/08/2011, at 8:29 AM, Daniel Fischer wrote:
On Sunday 14 August 2011, 00:41:33, Mark Spezzano wrote:
Hi Antoine,
The first Int field is a unique index, beginning at 1 and increasing by
1 for each unique Node
Hi Ata,
You could write the following
decimalPart :: Float - Integer
decimalPart f = read (tail (tail (show (f :: Integer
This basically says convert f into a String using the show function, and then
get the tail of that String twice to get rid of the leading zero and the
decimal point
be useful.
Also what does shrink do?
Example code of these would be tremendously helpful understanding these
concepts.
Thanks in advance,
Mark Spezzano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
Hi all,
I would appreciate it if someone can point me in the right direction with the
following problem.
I'm deliberately implementing a naive Queues packages that uses finite lists as
the underlying representation. I've already read through Hughes' paper and the
article in The Fun of
(specifically negative number)
Thanks
Mark
On 25/07/2011, at 4:44 AM, Kevin Quick wrote:
On Sun, 24 Jul 2011 07:30:56 -0700, Mark Spezzano
mark.spezz...@chariot.net.au wrote:
Hi all,
I would appreciate it if someone can point me in the right direction with
the following problem.
I'm
and E2 showing exactly why. Personally I think that
there's an error in the book.
You can see the full text on Google Books (page 84)
Thanks for reading!
Mark Spezzano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
those two definitions appear
identical. I could be missing something - I haven't read that book.
Antoine
On Wed, Dec 29, 2010 at 9:05 PM, Mark Spezzano
mark.spezz...@chariot.net.au wrote:
Hi,
Presently I am going through AJT Davie's text An Introduction to Functional
Programming Systems
/somehow)?
Thanks,
Mark
On 30/12/2010, at 1:52 PM, Mark Spezzano wrote:
Duh, Sorry. Yes, there was a typo
the second one should read
If E is a combination E1 E2 then X is bound in E if and only if X is bound in
E1 or is bound in E2.
Apologies for that oversight!
Mark
On 30/12
absolutely nothing. (i.e. the
expected failure was caught)
3. If the error is uncaught (in step 2; for whatever reason) then call
assertFailure somemsg and my _test_ code should fail since the error it was
expecting to occur didn't happen.
Thanks,
Mark Spezzano
to go, but can they be
combined with the Doc type from the ansi-wl-pprint library?
Mark
On 09/11/2010, at 5:37 PM, Ivan Lazar Miljenovic wrote:
On 9 November 2010 17:53, Mark Spezzano mark.spezz...@chariot.net.au wrote:
Hi all,
I want to do the following tasks in this order:
1. Read text
, at 10:24 PM, John Lato wrote:
From: Mark Spezzano mark.spezz...@chariot.net.au
Hi,
I get the following error when doing a 'cabal install hp2any-graph' (the
profiling tool)
Does anyone know why? (I'm running Snow Leopard and I've tried using other
flags suggested...but with no success
Hi,
I get the following error when doing a 'cabal install hp2any-graph' (the
profiling tool)
Does anyone know why? (I'm running Snow Leopard and I've tried using other
flags suggested...but with no success). GLUT is already installed via MacPorts
and via cabal.
Resolving dependencies...
Hi Ivan,
I don't think that these flags work with MacPorts--only with cabal.
Mark
On 08/11/2010, at 7:48 PM, Ivan Lazar Miljenovic wrote:
On 8 November 2010 20:14, Mark Spezzano mark.spezz...@chariot.net.au wrote:
Hi,
I get the following error when doing a 'cabal install hp2any-graph
.
Cheers,
Mark Spezzano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
depending
on the types of the Monads that they are processing. Is this correct? Some
concrete examples would be really helpful.
Even references to some research papers that explain the rationale behind these
(and all the other..?) monad functions would be great.
Thanks in advance,
Mark Spezzano
. If it's a sequence_ [putStrLn hello, putStrLn
goodbye] then this prints out hello and goodbye on separate lines.
It seems to work differently for different types.
Mark
On 30/10/2010, at 3:42 PM, Bardur Arantsson wrote:
On 2010-10-30 07:07, Mark Spezzano wrote:
Hi,
Can somebody please
Hi,
I'm trying to install the Leksah IDE and I've run into the problem that it
requires glib and gtk+.
Whenever I type 'configure' for glib-2.26.0 everything goes fine.
But when I type 'make' it goes through necessary actions and then suddenly
stops halfway through stating the following
: get foo
write foo $= baz
On 4 April 2010 11:03, Mark Spezzano mark.spezz...@chariot.net.au wrote:
Hi
What is the correct way to record custom state when using OpenGL?
By this, I refer to, say, properties of a square--say it's x,y coordinates as
it moves across the screen
Maybe I should ask: If I have many state variables encapsulated in one IO
(StateVar DemoState) how do I go about referencing and updating _one_ without
having to enumerate all of them?
What is the syntax?
Mark
On 09/04/2010, at 12:13 AM, Mark Spezzano wrote:
I sort of understand what people
.
Thanks in advance,
Mark Spezzano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi,
Just wondering whether I can use ShowS or tupling or Difference Lists to speed
up the following code?
It's basic text processing. It takes in a list of Lines where each Line is a
list of Words and intersperses between them then concatenates them into a
longer String. Note that there is
on Discrete maths or Algebra or Set Theory that deal more
with Hom Sets and Hom Functions?
Thanks,
Mark Spezzano.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I should probably add that I am trying various proofs that involve injective
and surjective properties of Hom Sets and Hom functions.
Does anyone know what Hom stands for?
I need a text for a newbie.
Mark
On 02/02/2010, at 9:56 PM, Mark Spezzano wrote:
Hi all,
I'm trying to learn Haskell
I've tried this example and it just lets me type in anything in CAPITALS, which
is nice, but Delete key doesn't delete and the arrow keys unfortunately let me
manoeuvre the cursor all over the screen. Also the biggest problem is that
Enter doesn't terminate the input session.
Isn't there a
in whatever case they were typed. I
want to sneak in a toUpper in before the Chars get echoed.
Thanks
Mark Spezzano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
be misusing them in this context.
Thanks
Mark Spezzano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
on monads?
Or does RT ignore the encapsulated data and just view the “action” performed
by the monad as the “value” of the monad?
Just curious as to the rationale behind referential transparency and how it
applies to monads.
Cheers,
Mark Spezzano
No virus found in this outgoing
recursive” as opposed to
just “recursive”?
Cheers,
Mark Spezzano
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.557 / Virus Database: 270.11.27/2021 - Release Date: 24/03/2009
4:00 PM
___
Haskell-Cafe mailing list
Haskell
should be aware of before changing systems
(i.e. unpleasant surprises).
I want to be able to use the machine for Haskell OpenGL programming.
Cheers,
Mark Spezzano
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.557 / Virus Database: 270.11.20/2012 - Release
reference to `glutgetprocaddr...@4'
collect2: ld returned 1 exit status
What’s happening here? Obviously it’s a linking issue, but I was wondering
whether I need to include some library or file or option to ghc so that it
links correctly.
Cheers,
Mark Spezzano
No virus found
Hi,
Can someone PLEASE help me to understand exactly how to configure
OpenGL on Window using Haskell. I'm using Eclipse IDE.
When I try to run the file Test1.hs in GHCi then I get the following
error:
Loading package syb ... linking ... done.
Loading package base-3.0.3.0 ... linking ... done.
As far as I know, -lSM is to do with XWindows (not windows Vista).How do I
fix this ? What’s going on? I’ve been on this problem now for hours, and all
I wanted to do was get a window up on the screen. Sigh
Mark Spezzano
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.557
everywhere in my PATH but msys won’t find them.
Cheers,
Mark Spezzano
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.557 / Virus Database: 270.11.18/2008 - Release Date: 17/03/2009
4:25 PM
___
Haskell-Cafe mailing list
Haskell
Hi,
I’ve noticed that it’s possible to define map as foldr and foldr as a map.
Would this be sensible to define both in terms of each other in the Prelude?
i.e mutually recursive?
Cheers,
Mark
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.557 / Virus
the “smallest” tuple (according to the above rules and if xs is
a list of tuples)?
Cheers,
Mark Spezzano
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.557 / Virus Database: 270.11.13/2001 - Release Date: 14/03/2009
6:54 AM
got that feeling that [2] would be fast and [3] would be slow. Comment
appreciated on the merits of each.
Cheers,
Mark Spezzano
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.557 / Virus Database: 270.11.12/1998 - Release Date: 12/03/2009
6:23 PM
? Or is generics in Haskell referring to something
completely different.
Cheers,
Mark Spezzano
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.557 / Virus Database: 270.11.9/1993 - Release Date: 10/03/2009
7:19 AM
___
Haskell
again and again to solve problems. If
so, what are they called?
Cheers,
Mark Spezzano
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.557 / Virus Database: 270.11.9/1993 - Release Date: 10/03/2009
7:19 AM
Hi,
I’m an experienced software developer, but a bit of a newbie when it comes
to parallel processing in any language.
I’ve done some multithreading in Java and C++ on a single processor, single
core architecture only.
First, let me define some terms:
Multithreading: this is
Hi,
I’m an experienced software developer, but a bit of a newbie when it comes
to parallel processing in any language.
I’ve done some multithreading in Java and C++ on a single processor, single
core architecture only.
First, let me define some terms:
Multithreading: this is
Hi,
Is there a good book on some of the more advanced or esoteric Haskell
topics, like monads, and morphisms, category theory etc.
Cheers,
Mark
No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.552 / Virus Database: 270.10.12/1910 - Release Date: 22/01/2009
47 matches
Mail list logo