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:  Linux install walkthrough (Adrian Adshead)
   2. Re:  Linux install walkthrough
      (Stephen Blackheath [to Haskell-Beginners])
   3.  [OT] Haskell-inspired functions for BASH (Patrick LeBoutillier)
   4. Re:  [OT] Haskell-inspired functions for BASH (Tommy M. McGuire)
   5. Re:  consing an element to a list inside a file ([email protected])
   6. Re:  consing an element to a list inside a file (Daniel Fischer)


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

Message: 1
Date: Wed, 17 Feb 2010 19:48:47 +0000 (GMT)
From: Adrian Adshead <[email protected]>
Subject: Re: [Haskell-beginners] Linux install walkthrough
To: Lakshmi Narasimhan <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Hi Lakshmi,
I've had two attempts at getting it going, the first I didn't get very far 
beforedeciding to give other, more up to date, linuxes a go, but had little 
luck onthat front. Next time around I got further but ran out of time. The 
problem isthat I want to spend my time writing software (and I have a windows 
systemup and running) not trying to fight to get the system working. I really 
didn'tthink it would be too much to ask that a simple install script would 
exist,or at least a HowTo for one of the more popular linuxes (RedHat).
I will have another look at it this weekend and see how far I get. If I 
manageto succeed I will document the process and post it to the wiki. Haskell 
seemsto be a great language and there are lots of helpful people in the 
communitywho are willing to help newbies like myself get off the ground, 
but when the'system' fights back as much as it does I'm not surprised that 
not many peopleuse haskell, it's just easier to use something else.
--- On Wed, 17/2/10, Lakshmi Narasimhan <[email protected]> wrote:

From: Lakshmi Narasimhan <[email protected]>
Subject: Re: [Haskell-beginners] Linux install walkthrough
To: [email protected]
Cc: [email protected]
Date: Wednesday, 17 February, 2010, 13:30

Hi Adrian,

Were you able to get the installation of Leksah done ? I haven't tried 
installing leksah from cabal in centos myself but it would be good to know 
whether it is possible to get leksah built without having to upgrade gtk and 
glib in Centos 5.4. In that case, we might be able to use some rpms from fedora 
haskell platform.


On Wed, Feb 17, 2010 at 6:34 PM, Stephen Tetley <[email protected]> 
wrote:

Hi Adrian



Is Centos close enough to RedHat to use Fedora packages?



The Haskell-Platform seemingly is available as a package:



https://admin.fedoraproject.org/pkgdb/users/packages/haskell-sig



Leksah has a fairly large set of dependencies so installing it might

take some work - particularly where it depends on packages outside the

Haskell Plaform (GTK, etc...) you might well want versions from

Hackage rather than ones prepackaged for Fedora. It might be worth

asking on the Fedora-Haskell-devel mailing list for better advice.



Best wishes



Stephen

_______________________________________________

Beginners mailing list

[email protected]

http://www.haskell.org/mailman/listinfo/beginners




-- 
Regards
Lakshmi Narasimhan T V




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20100217/ce6e48b4/attachment-0001.html

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

Message: 2
Date: Thu, 18 Feb 2010 11:14:58 +1300
From: "Stephen Blackheath [to Haskell-Beginners]"
        <[email protected]>
Subject: Re: [Haskell-beginners] Linux install walkthrough
To: Adrian Adshead <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

Adrian,

The Haskell Platform is still relatively new, and therefore binary
support is not so good for Linux yet.  But you don't actually lose much
from what the Platform would give you if you use the GHC 6.10 binary
releases from http://haskell.org/ghc/  The fact that this old-fashioned
way works so well has also slowed adoption of the Platform on Linux.

This worked nicely for me on Ubuntu before the Haskell Platform existed.
 Once GHC is installed, you then install cabal-install by hand using its
bootstrap script.  Add $HOME/.cabal/bin/ to your PATH, and then you can
install any package easily with the 'cabal install' command.  There is
no essential difference between this setup and the Platform, except you
start with fewer packages.

Give that a try - You should find it works without fuss.  I suggest you
use 6.10 (not 6.12) as it's the most stable at present.  There are two
Linux binary variants - depending on what libraries are present on your
system (one RedHat flavoured and one Debian flavoured).  This is
explained on the download page.


Steve

Adrian Adshead wrote:
> Hi Lakshmi,
> 
> I've had two attempts at getting it going, the first I didn't get very
> far before
> deciding to give other, more up to date, linuxes a go, but had little
> luck on
> that front. Next time around I got further but ran out of time. The
> problem is
> that I want to spend my time writing software (and I have a windows system
> up and running) not trying to fight to get the system working. I really
> didn't
> think it would be too much to ask that a simple install script would exist,
> or at least a HowTo for one of the more popular linuxes (RedHat).
> 
> I will have another look at it this weekend and see how far I get. If I
> manage
> to succeed I will document the process and post it to the wiki. Haskell
> seems
> to be a great language and there are lots of helpful people in the community
> who are willing to help newbies like myself get off the ground, but when the
> 'system' fights back as much as it does I'm not surprised that not many
> people
> use haskell, it's just easier to use something else.
> 
> --- On *Wed, 17/2/10, Lakshmi Narasimhan /<[email protected]>/*
> wrote:
> 
> 
>     From: Lakshmi Narasimhan <[email protected]>
>     Subject: Re: [Haskell-beginners] Linux install walkthrough
>     To: [email protected]
>     Cc: [email protected]
>     Date: Wednesday, 17 February, 2010, 13:30
> 
>     Hi Adrian,
> 
>     Were you able to get the installation of Leksah done ? I haven't
>     tried installing leksah from cabal in centos myself but it would be
>     good to know whether it is possible to get leksah built without
>     having to upgrade gtk and glib in Centos 5.4. In that case, we might
>     be able to use some rpms from fedora haskell platform.
> 
>     On Wed, Feb 17, 2010 at 6:34 PM, Stephen Tetley
>     <[email protected] </mc/[email protected]>>
>     wrote:
> 
>         Hi Adrian
> 
>         Is Centos close enough to RedHat to use Fedora packages?
> 
>         The Haskell-Platform seemingly is available as a package:
> 
>         https://admin.fedoraproject.org/pkgdb/users/packages/haskell-sig
> 
>         Leksah has a fairly large set of dependencies so installing it might
>         take some work - particularly where it depends on packages
>         outside the
>         Haskell Plaform (GTK, etc...) you might well want versions from
>         Hackage rather than ones prepackaged for Fedora. It might be worth
>         asking on the Fedora-Haskell-devel mailing list for better advice.
> 
>         Best wishes
> 
>         Stephen
>         _______________________________________________
>         Beginners mailing list
>         [email protected] </mc/[email protected]>
>         http://www.haskell.org/mailman/listinfo/beginners
> 
> 
> 
> 
>     -- 
>     Regards
>     Lakshmi Narasimhan T V
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners


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

Message: 3
Date: Thu, 18 Feb 2010 11:31:33 -0500
From: Patrick LeBoutillier <[email protected]>
Subject: [Haskell-beginners] [OT] Haskell-inspired functions for BASH
To: beginners <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Hi all,

I've been studying Haskell for about a year now, and I've really come
to like it. In my daily work I write a lot of BASH shell scripts and I
thought I'd try add some of the haskell features and constructs to
BASH to make my scripting life a bit easier. So I've been working on a
small BASH function library that implements some basic functional
programming building blocks.

Note: There is no actual Haskell code involved here.

All this is very prototypical, but here is an example of some of the
stuff I've got so far (map, filter, foldr):

$ ls data
1.txt  2.txt

# basic map, argument goes on the command line
$ ls -d data/* | map basename
1.txt
2.txt

# map with lambda expression
$ ls -d data/* | map '\f -> basename $f .txt'
1
2

# simple filter, also works with lambda
$ ls -d data/* | map basename | filter 'test 1.txt ='
1.txt

# sum
$ ls -d data/* | map '\f -> basename $f .txt' | foldr '\x acc -> echo
$(($x + $acc))' 0
3


Before I continue with this project, I'm looking for a bit of feedback/info:
- Does anyone know if there are already similar projets out there?
- Does anyone find this interesting?
- Any other comment/suggestion/feedback


Thanks a lot,

Patrick LeBoutillier


-- 
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada


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

Message: 4
Date: Thu, 18 Feb 2010 10:46:27 -0600
From: "Tommy M. McGuire" <[email protected]>
Subject: Re: [Haskell-beginners] [OT] Haskell-inspired functions for
        BASH
To: Patrick LeBoutillier <[email protected]>,      beginners
        <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

Patrick LeBoutillier wrote:
> Hi all,
> 
> I've been studying Haskell for about a year now, and I've really come
> to like it. In my daily work I write a lot of BASH shell scripts and I
> thought I'd try add some of the haskell features and constructs to
> BASH to make my scripting life a bit easier. So I've been working on a
> small BASH function library that implements some basic functional
> programming building blocks.
> 
> Note: There is no actual Haskell code involved here.
> 
> All this is very prototypical, but here is an example of some of the
> stuff I've got so far (map, filter, foldr):
> 
> $ ls data
> 1.txt  2.txt
> 
> # basic map, argument goes on the command line
> $ ls -d data/* | map basename
> 1.txt
> 2.txt
> 
> # map with lambda expression
> $ ls -d data/* | map '\f -> basename $f .txt'
> 1
> 2
> 
> # simple filter, also works with lambda
> $ ls -d data/* | map basename | filter 'test 1.txt ='
> 1.txt
> 
> # sum
> $ ls -d data/* | map '\f -> basename $f .txt' | foldr '\x acc -> echo
> $(($x + $acc))' 0
> 3
> 
> 
> Before I continue with this project, I'm looking for a bit of feedback/info:
> - Does anyone know if there are already similar projets out there?

Once upon a time, there was the es shell, based on the Unix version of Tom
Duff's Plan 9 rc shell, IIRC. It was intended to provide a functional language
for shell programming. Never caught on at all, as far as I know, but it might
be interesting.

http://192.220.96.201/es/es-usenix-winter93.html

Looks like there is a Google project for it:

http://code.google.com/p/es-shell/

> - Does anyone find this interesting?

Yep. :-) Looks pretty cool to me.

> - Any other comment/suggestion/feedback


-- 
Tommy M. McGuire
[email protected]


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

Message: 5
Date: Fri, 19 Feb 2010 00:25:18 +0100
From: [email protected]
Subject: Re: [Haskell-beginners] consing an element to a list inside a
        file
To: Daniel Fischer <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

ok, now I did it by just calling from the original function by to a new one 
with an empty list at the beginning.

How can I add the date at the end of the list? By creating a new list from the 
new date and using concat or is there a simpler way?

-------- Original-Nachricht --------
> Datum: Fri, 12 Feb 2010 23:18:06 +0100
> Von: Daniel Fischer <[email protected]>
> An: [email protected]
> CC: [email protected]
> Betreff: Re: [Haskell-beginners] consing an element to a list inside a file

> Am Freitag 12 Februar 2010 20:15:26 schrieb [email protected]:
> > the exercise looks like that:
> >
> > readMyCal :: IO MyCalendar
> > readMyCal = do putStr "day: "
> >                d <- readInt
> >                putStr "month: "
> >                m <- readMonth
> >                putStr "year: "
> >                y <- readInt
> >                let mydate = (d,m,y)
> >                if not (legalDate mydate) then
> >                    do putStrLn "wrong"
> >                    --COMPLETE-1--
> >                else
> >                    --COMPLETE-2--
> >
> > COMPLETE-1: the user can give in a new date. I did it by simple calling
> > the function again
> 
> Reasonable.
> 
> > COMPLETE-2: the user can choose if he wants to enter
> > a new. If not, all dates the user has put in should be put out as a
> > calendar (a list of dates)
> >
> 
> Okay, that's not nice. But since you have no global variables to store the
> list of dates entered in (yes, there are ways to have global variables,
> but 
> it's not a good idea unless you really have to), call
> 
> readMoreDates :: [MyDate] -> IO MyCaledar
> readMoreDates previous = do ...
> 
> (code duplication where it isn't really necessary, but what the heck).

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01


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

Message: 6
Date: Fri, 19 Feb 2010 00:41:56 +0100
From: Daniel Fischer <[email protected]>
Subject: Re: [Haskell-beginners] consing an element to a list inside a
        file
To: [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain;  charset="iso-8859-1"

Am Freitag 19 Februar 2010 00:25:18 schrieb [email protected]:
> ok, now I did it by just calling from the original function by to a new
> one with an empty list at the beginning.
>
> How can I add the date at the end of the list? By creating a new list
> from the new date and using concat or is there a simpler way?
>

Better stick it to the front by (:) and reverse the list just before 
printing.


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

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


End of Beginners Digest, Vol 20, Issue 28
*****************************************

Reply via email to