Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  All-in-one package? (Henk-Jan van Tuyl)
   2. Re:  All-in-one package? (Kyle Murphy)
   3. Re:  All-in-one package? (Kyle Murphy)
   4.  The Haskell IRC Channel (Matthew J. Williams)
   5.  Trying to read a bitmap with hOpenGL
      ([email protected])
   6.  Transforming (State s a) to (StateT s m a) (Toby Murray)
   7. Re:  Transforming (State s a) to (StateT s m a) (Yitzchak Gale)
   8. Re:  Trying to read a bitmap with hOpenGL (Peter Verswyvelen)


----------------------------------------------------------------------

Message: 1
Date: Sun, 02 Aug 2009 13:38:38 +0200
From: "Henk-Jan van Tuyl" <[email protected]>
Subject: Re: [Haskell-beginners] All-in-one package?
To: "Kyle Murphy" <[email protected]>, [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; format=flowed; delsp=yes;
        charset=iso-8859-15

On Sun, 02 Aug 2009 05:50:53 +0200, Kyle Murphy <[email protected]> wrote:

> (in my case I'm running XP 64 bit which apparently does not play nice  
> with the wxHaskell library as as soon as I mouse over any wxWidget  
> objects it crashes with a seg fault)

Does this happen with a compiled program or only in GHCi?

-- 
Regards,
Henk-Jan van Tuyl


--
http://functor.bamikanarie.com
http://Van.Tuyl.eu/
--




------------------------------

Message: 2
Date: Sun, 2 Aug 2009 16:04:34 -0400
From: Kyle Murphy <[email protected]>
Subject: Re: [Haskell-beginners] All-in-one package?
To: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Both. I just ran the BouncingBalls.hs example included with wxHaskell-0.11.0
and it seg. faulted in both GHCi and the compiled exe with the message:
Segmentation fault/access violation in generated code

This is with GHC-6.10.1, and wxHaskell-0.11.0.

Looking at the GHC and wxHaskell pages I notice that both GHC and wxHaskell
are a few minor releases out of date, so I'm going to download the latest
versions on my windows box and see if that takes care of the issues.

On Sun, Aug 2, 2009 at 7:38 AM, Henk-Jan van Tuyl <[email protected]> wrote:

> On Sun, 02 Aug 2009 05:50:53 +0200, Kyle Murphy <[email protected]> wrote:
>
>  (in my case I'm running XP 64 bit which apparently does not play nice with
>> the wxHaskell library as as soon as I mouse over any wxWidget objects it
>> crashes with a seg fault)
>>
>
> Does this happen with a compiled program or only in GHCi?
>
> --
> Regards,
> Henk-Jan van Tuyl
>
>
> --
> http://functor.bamikanarie.com
> http://Van.Tuyl.eu/
> --
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20090802/1b066867/attachment-0001.html

------------------------------

Message: 3
Date: Sun, 2 Aug 2009 16:19:03 -0400
From: Kyle Murphy <[email protected]>
Subject: Re: [Haskell-beginners] All-in-one package?
To: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Just installed the latest versions of GHC and wxHaskell and that seems to
have cleared up the seg faults. Seeing some odd behavior where it claims it
can't find some dlls (cleared up one by copying the dll out of the system32
directory into the directory the exe is in which strictly speaking should
not have been necessary), but I suspect I may just need to reboot or
something. The good news is, the sample programs appear to run more or less
correctly, and even when they error off trying to load some shared libraries
they don't seg fault and continue to function to the best of their ability,
which is really all you can ask of a program.

On Sun, Aug 2, 2009 at 4:04 PM, Kyle Murphy <[email protected]> wrote:

> Both. I just ran the BouncingBalls.hs example included with
> wxHaskell-0.11.0 and it seg. faulted in both GHCi and the compiled exe with
> the message:
> Segmentation fault/access violation in generated code
>
> This is with GHC-6.10.1, and wxHaskell-0.11.0.
>
> Looking at the GHC and wxHaskell pages I notice that both GHC and wxHaskell
> are a few minor releases out of date, so I'm going to download the latest
> versions on my windows box and see if that takes care of the issues.
>
>
> On Sun, Aug 2, 2009 at 7:38 AM, Henk-Jan van Tuyl <[email protected]>wrote:
>
>> On Sun, 02 Aug 2009 05:50:53 +0200, Kyle Murphy <[email protected]> wrote:
>>
>>  (in my case I'm running XP 64 bit which apparently does not play nice
>>> with the wxHaskell library as as soon as I mouse over any wxWidget objects
>>> it crashes with a seg fault)
>>>
>>
>> Does this happen with a compiled program or only in GHCi?
>>
>> --
>> Regards,
>> Henk-Jan van Tuyl
>>
>>
>> --
>> http://functor.bamikanarie.com
>> http://Van.Tuyl.eu/
>> --
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20090802/52f4a3a8/attachment-0001.html

------------------------------

Message: 4
Date: Mon, 03 Aug 2009 20:57:41 +0100
From: "Matthew J. Williams" <[email protected]>
Subject: [Haskell-beginners] The Haskell IRC Channel
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"; format=flowed

Dear all,

          Does the list recommend a particular TUI IRC client for windows?

        Apologies for the off topic post.

Sincerely,
        MJW



------------------------------

Message: 5
Date: Mon, 03 Aug 2009 19:51:51 +0000
From: [email protected]
Subject: [Haskell-beginners] Trying to read a bitmap with hOpenGL
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Hi All,

I have been following an OpenGL book which has its examples in cpp, but  
using haskell instead. I have a problem when trying to read a bitmap, I  
haven't managed to render the file to the buffer, I did a little parser  
based on the one in RWH for the bmp file, and apparently everything seems  
to work well, but when I call drawPixels I don't get a clear image. The  
code that I'm using is here :
http://gist.github.com/160787

What am I doing wrong ?



Thanks in advance for any help.

abuiles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20090803/27660a84/attachment-0001.html

------------------------------

Message: 6
Date: Tue, 4 Aug 2009 12:36:07 +0100
From: Toby Murray <[email protected]>
Subject: [Haskell-beginners] Transforming (State s a) to (StateT s m
        a)
To: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Hi all,

Am very new to Haskell, apologies in advance.

Suppose I have a transformer A of type State s a.

Suppose I have other state transformers of type StateT s m a. These
are similar to the first kind but e.g. might throw errors or perform
IO or whatever.

I can manually convert A to be of the second kind as follows:

-- | Used to invoke a "pure" state transformer
--   from a context in which other effects may occur.
pure :: (Monad m) => State s a -> StateT s m a
pure func = StateT (\arg -> (return (runState func arg)))

This seems like something one might want to do often. For instance, I
might have a state type that I want to operate on, call it System.
Then

type PureSystemTransformer a = State System a

defines a type for "pure" System transformers that return results of type a.

However, other system transformers might need to throw errors. So I might define

type SystemTransformer a e = StateT System (Either e) a

for the type of system transformers that return results of type a or
throw errors of type e.

'pure' is then used to convert a PureSystemTransformer to a SystemTransformer.

I wonder whether there is something in the standard libraries that
achieves the same thing as 'pure' above.
i.e. Is there a more standard way to do this?

Cheers

Toby


------------------------------

Message: 7
Date: Tue, 4 Aug 2009 16:09:32 +0300
From: Yitzchak Gale <[email protected]>
Subject: Re: [Haskell-beginners] Transforming (State s a) to (StateT s
        m a)
To: Toby Murray <[email protected]>
Cc: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Hi Toby,

Toby Murray wrote:
> Suppose I have a transformer A of type State s a...
> Suppose I have other state transformers of type StateT s m a...
> I can manually convert A to be of the second kind as follows...
> pure :: (Monad m) => State s a -> StateT s m a
> pure func = StateT (\arg -> (return (runState func arg)))

Yes, this does come up from time to time. It could be
useful to give it a standard name in the libraries.

But "pure" is not a good name - that is firmly entrenched
to mean other important things in Control.Applicative
and Control.Arrow.

Perhaps liftT?

liftT :: (Monad m) => State s a -> StateT s m a
liftT (State f) = StateT $ return . f

You can submit your proposal by following this
procedure:

http://www.haskell.org/haskellwiki/Library_submissions

Regards,
Yitz


------------------------------

Message: 8
Date: Tue, 4 Aug 2009 17:54:15 +0200
From: Peter Verswyvelen <[email protected]>
Subject: Re: [Haskell-beginners] Trying to read a bitmap with hOpenGL
To: [email protected]
Cc: [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

You didn't provide the smiley.bmp image, so I made my own 24-bit bitmap.
When loading it and printing the width/height in your bmp loader, I get
twice a zero, so your loader seems incorrect.
I don't have the time to dig deeper into your loader function, but maybe you
can find some inspiration using this code:

http://code.haskell.org/ANUPlot/ANUPlot-HEAD/

A BMP loader can be found in
http://code.haskell.org/ANUPlot/ANUPlot-HEAD/src/Graphics/Plot/

<http://code.haskell.org/ANUPlot/ANUPlot-HEAD/src/Graphics/Plot/>Cheers,
Peter


On Mon, Aug 3, 2009 at 9:51 PM, <[email protected]> wrote:

> Hi All,
>
> I have been following an OpenGL book which has its examples in cpp, but
> using haskell instead. I have a problem when trying to read a bitmap, I
> haven't managed to render the file to the buffer, I did a little parser
> based on the one in RWH for the bmp file, and apparently everything seems to
> work well, but when I call drawPixels I don't get a clear image. The code
> that I'm using is here :
> http://gist.github.com/160787
>
> What am I doing wrong ?
>
>
>
> Thanks in advance for any help.
>
> abuiles
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20090804/9091633d/attachment.html

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 14, Issue 3
****************************************

Reply via email to