Send Beginners mailing list submissions to
        beginners@haskell.org

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
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

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


Today's Topics:

   1. Re:  PHP vs Haskell... a challenge! (Sean Charles)
   2.  Lazy vs Strict ponderings... (Sean Charles)
   3. Re:  PHP vs Haskell... a challenge! (Patrick Lynch)
   4. Re:  PHP vs Haskell... a challenge! (Sean Charles)
   5. Re:  PHP vs Haskell... a challenge! (Brian Shannon)
   6. Re:  PHP vs Haskell... a challenge! (Sean Charles)
   7. Re:  PHP vs Haskell... a challenge! (Patrick Lynch)
   8.  Getting Gtk2Hs working in windows (Kyle Murphy)


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

Message: 1
Date: Fri, 18 Mar 2011 11:34:14 +0000
From: Sean Charles <s...@objitsu.com>
Subject: Re: [Haskell-beginners] PHP vs Haskell... a challenge!
To: beginners@haskell.org
Message-ID: <4d834336.10...@objitsu.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Thank you everybody for your responses, I am going to print them out and 
study them hard, particularly the use of left folds. I think I skipped 
that in RWH book... .I need to go back and re-cover the basic again I 
think... it's a tendency of mine to graze through stuff picking up what 
I need and sometimes you just can't beat learning the basics.

As a still beginner after about eight months of (somewhat intermittent) 
usage I would say that in order to truly get to grips with Haskell as a 
concept let alone a language you need to know and understand ...

* currying, which helped me to truly understand the signature notation 
used, a -> b -> c etc. I have used haXe, which is written in ocaml, and 
the notation is the same but now makes more sense!

* function composition leading to point-less notation, this is better 
understood the currying penny has dropped

* lazy versus strict evaluation and the concept of lazy I/O and why it 
can sometimes leave you scratching your head for a while!! LMAO! :)

* monads: of course, for me the best video I've seen is this one.


As a reluctant Drupal/PHP developer and wannabe FP developer for about 
six years now, each time I find myself coding some rubbish or other in 
PHP I have lots of 'ahah!' moments as I think that it would be nice to 
be able to express some idiom or form more succinctly in PHP and then I 
realise what X Y or Z is for in Haskell... that's the upside, the 
downside is I then have to continue the job in PHP!


Thanks again,
Sean.




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

Message: 2
Date: Fri, 18 Mar 2011 12:29:59 +0000
From: Sean Charles <s...@objitsu.com>
Subject: [Haskell-beginners] Lazy vs Strict ponderings...
To: beginners@haskell.org
Message-ID: <4d835047.4060...@objitsu.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I *think* I understand  about lazy evaluation and its effects on I/O and 
that it can internally create thunks, promises, continuations etc. 
whatever you want to call them, and then at some point there will be a 
sudden spike in memory and CPU loads as something triggers a whole chain 
of promises to be fulfilled but what I don't have a feel for is just how 
serious a problem that might be today in say, a simple desktop application.

For example, let's just say I write a simple application in 'C' and a 
comparable one in Haskell both running on the same hardware, but not 
concurrently! Would the Haskell one ever find itself running out of 
memory given the same input sequence as the 'C' program because of the 
way it works ?   I know that the 'C' one could also run out of memory 
but I hope that the sentiment of my question is clear; what are the 
ramifications, gotchas and other considerations that using a purely 
functional lazy language like Haskell you need to be aware of when 
coming from an imperative / scripted background ?

Notwithstanding the fact that there are strict flavours of functions 
that can be used.... but only if you are truly aware of the reasons for 
their existence in the first place, is this a real design issue to 
consider when coding an application in Haskell or is it only for certain 
'groups' of applications. I guess the nature of the application would be 
the governing factor.

Is it something one needs to worry about at all or should one just code 
away and write the application and then worry!?

I think that having a clearer understanding of what 'types' of problems 
and their implementations have on CPU/RAM would be a good one to have!

:)
Thanks
Sean Charles.




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

Message: 3
Date: Fri, 18 Mar 2011 08:44:13 -0400
From: "Patrick Lynch" <kmandpjly...@verizon.net>
Subject: Re: [Haskell-beginners] PHP vs Haskell... a challenge!
To: "Sean Charles" <s...@objitsu.com>,  <beginners@haskell.org>
Message-ID: <2666B4DBCC224CD8AB4F076C60B04ECB@UserPC>
Content-Type: text/plain; format=flowed; charset=iso-8859-1;
        reply-type=response

Good morning,
...hang in there, it's a long learning curve...I too am trying to figure out 
if you can make money with Haskell or F#...[I'm an independent software 
consultant]...
...I picked up a copy of  "Category Theory" by Steve Awodey - it supposedly 
is geared to Computer Scientists and not Mathemeticians - but I couldn't 
understand it and my math is pretty good
[...and  I've had 4 years of college math]
...btw: did you neglect to include the link for 'monad:...the best video 
I've seen is this one' - could you please provide it.
Good weekend

----- Original Message ----- 
From: "Sean Charles" <s...@objitsu.com>
To: <beginners@haskell.org>
Sent: Friday, March 18, 2011 7:34 AM
Subject: Re: [Haskell-beginners] PHP vs Haskell... a challenge!


> Thank you everybody for your responses, I am going to print them out and 
> study them hard, particularly the use of left folds. I think I skipped 
> that in RWH book... .I need to go back and re-cover the basic again I 
> think... it's a tendency of mine to graze through stuff picking up what I 
> need and sometimes you just can't beat learning the basics.
>
> As a still beginner after about eight months of (somewhat intermittent) 
> usage I would say that in order to truly get to grips with Haskell as a 
> concept let alone a language you need to know and understand ...
>
> * currying, which helped me to truly understand the signature notation 
> used, a -> b -> c etc. I have used haXe, which is written in ocaml, and 
> the notation is the same but now makes more sense!
>
> * function composition leading to point-less notation, this is better 
> understood the currying penny has dropped
>
> * lazy versus strict evaluation and the concept of lazy I/O and why it can 
> sometimes leave you scratching your head for a while!! LMAO! :)
>
> * monads: of course, for me the best video I've seen is this one.
>
>
> As a reluctant Drupal/PHP developer and wannabe FP developer for about six 
> years now, each time I find myself coding some rubbish or other in PHP I 
> have lots of 'ahah!' moments as I think that it would be nice to be able 
> to express some idiom or form more succinctly in PHP and then I realise 
> what X Y or Z is for in Haskell... that's the upside, the downside is I 
> then have to continue the job in PHP!
>
>
> Thanks again,
> Sean.
>
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
> 




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

Message: 4
Date: Fri, 18 Mar 2011 12:50:56 +0000
From: Sean Charles <s...@objitsu.com>
Subject: Re: [Haskell-beginners] PHP vs Haskell... a challenge!
To: Patrick Lynch <kmandpjly...@verizon.net>
Cc: beginners@haskell.org
Message-ID: <4d835530.1000...@objitsu.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 18/03/11 12:44, Patrick Lynch wrote:
> Good morning,
> ...hang in there, it's a long learning curve...I too am trying to 
> figure out if you can make money with Haskell or F#...[I'm an 
> independent software consultant]...
Me too. When I am working. I am still figuring out if I can make money 
period!

> ...I picked up a copy of  "Category Theory" by Steve Awodey - it 
> supposedly is geared to Computer Scientists and not Mathemeticians - 
> but I couldn't understand it and my math is pretty good
> [...and  I've had 4 years of college math]
I bought "Purely function data structures" by Chris Okasaki and "The 
Road to Logic..." and the yare both now i nthe bookshelf impressing 
visitors.  LMAO

>
> ...btw: did you neglect to include the link for 'monad:...the best 
> video I've seen is this one' - could you please provide it.

Curses, the link!
Yes, the video is called "Don't fear the Monad"
http://channel9.msdn.com/Shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads

His method of explanation, reasoning and re-visiting the previous 
concepts is really really good. It helped me a lot, that's not to say I 
don't fnid myself fighting the compiler a lot but at least I know *why* 
I goofed if not how to fix it yet.

Understanding monads is so important in Haskell, I would say that it is, 
IMO, the single biggest reason that it will never become truly 
mainstream as it's too far up the BLUB scale for most people who cut 
code for a living.

I was thinking of rewriting the Boom Town Rats song "I don't link 
Mondays" to "I don't like Monads" to see if it could help reinforce some 
concepts. Then I sobered up! ;)





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

Message: 5
Date: Fri, 18 Mar 2011 13:44:16 +0000
From: Brian Shannon <teapot.philosop...@googlemail.com>
Subject: Re: [Haskell-beginners] PHP vs Haskell... a challenge!
To: Sean Charles <s...@objitsu.com>
Cc: beginners@haskell.org
Message-ID:
        <aanlktikgrt_qj67fidj90g376vwaxnzrthgczvg09...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

> Understanding monads is so important in Haskell, I would say that it is,
> IMO, the single biggest reason that it will never become truly mainstream as
> it's too far up the BLUB scale for most people who cut code for a living.

I see you have your crystal ball out. Those have always been so reliable. ;)



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

Message: 6
Date: Fri, 18 Mar 2011 14:00:00 +0000
From: Sean Charles <s...@objitsu.com>
Subject: Re: [Haskell-beginners] PHP vs Haskell... a challenge!
To: Brian Shannon <teapot.philosop...@googlemail.com>
Cc: beginners@haskell.org
Message-ID: <4d836560.5010...@objitsu.com>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 18/03/11 13:44, Brian Shannon wrote:
>> Understanding monads is so important in Haskell, I would say that it is,
>> IMO, the single biggest reason that it will never become truly mainstream as
>> it's too far up the BLUB scale for most people who cut code for a living.
> I see you have your crystal ball out. Those have always been so reliable. ;)
Yeah. I also predicted last weeks lottery numbers which is why I now 
only work for fun.

Not.

:(

I always ask people this question when money comes up,
"If your physical needs were met (house,food etc.), what would you do 
for the rest of your life ?"

I suspect that a very long time ago back in the dark ages, we discovered 
that human life is ultimately pointless and so 'money' was invented to 
create a bias and then 'consumerism' gives most western people something 
to take their minds of the futility of it all.

IMHO anyway.

:)




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

Message: 7
Date: Fri, 18 Mar 2011 11:13:10 -0400
From: "Patrick Lynch" <kmandpjly...@verizon.net>
Subject: Re: [Haskell-beginners] PHP vs Haskell... a challenge!
To: "Sean Charles" <s...@objitsu.com>
Cc: beginners@haskell.org
Message-ID: <21A6C8C5460745049A8EA633B8E7C087@UserPC>
Content-Type: text/plain; format=flowed; charset=iso-8859-1;
        reply-type=response

Good morning,

Thanks for the link 
http://channel9.msdn.com/Shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads
I saw it a while back but forgot about it...
I viewed it again and it made a lot more sense...
I'm sure I'll view it a dozen more times now...it is exactly what I am 
looking for...

Category Theory itself has, so far, defeated me...but I'm starting to 
understand Monads...
I tried reading "Category Theory" by Steve Awodey, which is aimed at 
Computer Scientists, etal and not Mathemeticians - but found it to be too 
abstract...
I ordered the following - they have all been highly recommended...I'll let 
you know:
  "Types and Programming Languages" by Benjamin C. Pierce
  "Basic Category Theory for Computer Scientists (Foundations of Computing)" 
by Benjamin C. Pierce
  "Categories and Computer Science (Cambridge Computer Science Texts)" by 
R. F. C. Walters

As mentioned, I am a long-time software consultant [30+ years] and I now 
have the luxary of taking off some time and doing some independent research 
on FP...
I've been studying Haskell and have implemented Hugs and Ghci on Windows and 
on an Imac...
Surprisingly, I found the Windows installations to be significantly 
easier...On Windows I'm using WinGhci and WinHugs...and WinVi32...
I wish that there was a Haskell editor but WinVi32 works well...
I was able to install the DB on Windows and got it to work, using "Real 
World Haskell" as a reference...
I've been unable to get TK installed on Windows...spent about a week trying 
and finally gave up...

I got interested in Haskell while working with an off-shore group that was 
implementing a Asp VB.Net and C# project and another Ruby on Rails project 
[it used Lamda Calculus and referenced Haskell].

I don' think that I'm going to make any money using Haskell but I suspect 
that there is a developing market for F# and LINQ - which utilize Visual 
Studio...
...so, I'll finish my Haskell study and hopefully will crack Monads and 
possibly Category Theory and then switch over to F# and LINQ...
I took a quick look at F# and its syntax looks a bit rough...

I'll start my marketing effort in a few months and pass on any leads to you 
that I find...

Good luck [to both of us]

----- Original Message ----- 
From: "Sean Charles" <s...@objitsu.com>
To: "Patrick Lynch" <kmandpjly...@verizon.net>
Cc: <beginners@haskell.org>
Sent: Friday, March 18, 2011 8:50 AM
Subject: Re: [Haskell-beginners] PHP vs Haskell... a challenge!


> On 18/03/11 12:44, Patrick Lynch wrote:
>> Good morning,
>> ...hang in there, it's a long learning curve...I too am trying to figure 
>> out if you can make money with Haskell or F#...[I'm an independent 
>> software consultant]...
> Me too. When I am working. I am still figuring out if I can make money 
> period!
>
>> ...I picked up a copy of  "Category Theory" by Steve Awodey - it 
>> supposedly is geared to Computer Scientists and not Mathemeticians - but 
>> I couldn't understand it and my math is pretty good
>> [...and  I've had 4 years of college math]
> I bought "Purely function data structures" by Chris Okasaki and "The Road 
> to Logic..." and the yare both now i nthe bookshelf impressing visitors. 
> LMAO
>
>>
>> ...btw: did you neglect to include the link for 'monad:...the best video 
>> I've seen is this one' - could you please provide it.
>
> Curses, the link!
> Yes, the video is called "Don't fear the Monad"
> http://channel9.msdn.com/Shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads
>
> His method of explanation, reasoning and re-visiting the previous concepts 
> is really really good. It helped me a lot, that's not to say I don't fnid 
> myself fighting the compiler a lot but at least I know *why* I goofed if 
> not how to fix it yet.
>
> Understanding monads is so important in Haskell, I would say that it is, 
> IMO, the single biggest reason that it will never become truly mainstream 
> as it's too far up the BLUB scale for most people who cut code for a 
> living.
>
> I was thinking of rewriting the Boom Town Rats song "I don't link Mondays" 
> to "I don't like Monads" to see if it could help reinforce some concepts. 
> Then I sobered up! ;)
>
>
> 




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

Message: 8
Date: Fri, 18 Mar 2011 18:49:37 -0400
From: Kyle Murphy <orc...@gmail.com>
Subject: [Haskell-beginners] Getting Gtk2Hs working in windows
To: beginners@haskell.org
Message-ID:
        <aanlktin4w3w71jenrhy0sdjfylgajgnbs2ur8d-1_...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I'm trying to follow the instructions provided on
http://www.haskell.org/haskellwiki/Gtk2Hs to install Gtk2Hs in Windows 7 (64
bit) and running into problems.
Originally I was trying to get wxHaskell installed, but it kept crashing
trying to build the monolithic library due to an apparent bug in the latest
port of GCC, so after talking with some of the people in #haskell I was
advised that Gtk2Hs was better supported and might be easier to get working.
For the most part, that appears to be true but I (as well as several others
it seems) am running into a problem where cabal can't seem to find quite a
few of the Gtk+ libraries (specifically z, cairo, gobject, glib, and intl).
Near as I can tell everything should be functioning, and running pkg-config
--modversion glib-2.0 outputs "2.20.3" so at least pkg-config seems to be
able to find glib. Looking in the Gtk+\lib\pkgconfig folder I see pc files
for everything but z and intl listed. Running cabal install
gtk2hs-buildtools also succeeds, it's only when I get to the cabal install
gtk step that things fail.

cmd console output for the usual environment variables:

INCLUDE: C:\libxml\include;C:\Program Files (x86)\Gtk+\include
LIB: C:\libxml\lib;C:\Program Files (x86)\Gtk+\lib
PKG_CONFIG_PATH: C:\libxml\lib\pkgconfig;C:\Program Files
(x86)\Gtk+\lib\pkgconfig

I trimmed the PATH output below for everyones sanity. The vast majority was
stuff in the Windows folder or one of dozens of entries dumped in there by
some version or other of Java.

PATH:
C:\Program Files (x86)\Haskell\bin;
C:\Program Files (x86)\Haskell Platform\2011.2.0.0\lib\extralibs\bin;
C:\Program Files (x86)\Haskell Platform\2011.2.0.0\bin;
C:\MinGW\bin;
C:\Users\Kyle\AppData\Roaming\cabal\bin;
C:\Program Files (x86)\Haskell\bin;
C:\Program Files (x86)\Gtk+\bin

The exact error I'm getting when building is the following:
C:\Users\Kyle>cabal install gtk
Warning: The package list for 'hackage.haskell.org' is 23 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\Gtk2HsSetup.hs:25:2:
warning: #warning Setup.hs is guessing the version of Cabal. If
compilationof Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal version
1.x.0 when building (prefixed by --ghc-option= when using the 'cabal'
command)
[1 of 2] Compiling Gtk2HsSetup      (
C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\Gtk2HsSetup.hs,
C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\dist\setup\Gtk2HsSetup.o
)
[2 of 2] Compiling Main             (
C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\Setup.hs,
C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\dist\setup\Main.o
)
Linking
C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\dist\setup\setup.exe
...
Configuring cairo-0.12.0...
setup.exe: Missing dependencies on foreign libraries:
* Missing C libraries: z, cairo
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\Gtk2HsSetup.hs:25:2:
warning: #warning Setup.hs is guessing the version of Cabal. If compilation
of Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal version 1.x.0 when
building (prefixed by --ghc-option= when using the 'cabal' command)
[1 of 2] Compiling Gtk2HsSetup      (
C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\Gtk2HsSetup.hs,
C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\dist\setup\Gtk2HsSetup.o
)
[2 of 2] Compiling Main             (
C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\Setup.hs,
C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\dist\setup\Main.o
)
Linking
C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\dist\setup\
setup.exe ...
Configuring glib-0.12.0...
setup.exe: Missing dependencies on foreign libraries:
* Missing C libraries: gobject-2.0, glib-2.0, intl
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
cabal: permission denied


-R. Kyle Murphy
--
Curiosity was framed, Ignorance killed the cat.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110318/198a5cc1/attachment.htm>

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

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 33, Issue 22
*****************************************

Reply via email to