[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Functional Programming

benjohn

8/23/2007 5:33:00 PM

I'm interested in functional programming.

I'd really like to read a good book on it. It would have practical stuff
in it, but also cover lots of the neat ideas (through practical
examples), and perhaps areas of open research.

It would be aimed at someone who's very interested in programming, and
does it as their day job, but has not really used a functional language
professionally before.

Ideally it'd be written by Dave Thomas, and would be called "Programming
Functionally: The pragmatic programmers guide" :-)

Any thoughts on this, or other ways to get in to it would be great (good
blogs, wiki, mail groups, etc).

Thanks,
Benjohn


25 Answers

M. Edward (Ed) Borasky

8/23/2007 6:22:00 PM

0

benjohn@fysh.org wrote:
> I'm interested in functional programming.
>
> I'd really like to read a good book on it. It would have practical stuff
> in it, but also cover lots of the neat ideas (through practical
> examples), and perhaps areas of open research.
>
> It would be aimed at someone who's very interested in programming, and
> does it as their day job, but has not really used a functional language
> professionally before.
>
> Ideally it'd be written by Dave Thomas, and would be called "Programming
> Functionally: The pragmatic programmers guide" :-)
>
> Any thoughts on this, or other ways to get in to it would be great (good
> blogs, wiki, mail groups, etc).
>
> Thanks,
> Benjohn
>
>
>
The closest thing (and highly recommended) would be the recent Pragmatic
book "Programming Erlang". Erlang is a functional programming language,
it features built-in message-passing concurrency, *and* the book is very
well written. It wasn't *written* by Dave Thomas, but I'm sure he helped
*edit* it. Dave??

James Gray

8/23/2007 6:31:00 PM

0

On Aug 23, 2007, at 1:22 PM, M. Edward (Ed) Borasky wrote:

> The closest thing (and highly recommended) would be the recent
> Pragmatic
> book "Programming Erlang". Erlang is a functional programming
> language,
> it features built-in message-passing concurrency, *and* the book is
> very
> well written.

No offense intended, but I am working through that book right now and
I would rate it as "good, but not great" writing. The author
explains some things very well and is very knowledgeable about the
topic, but he leaves out a bit much in places.

For example, I don't feel he ever properly covers printing a message
to the screen. You can figure it out from his examples and the man
pages he references, but it would be nice not to need these steps.

That said, I do feel I learned a good deal about functional
programming from it and I am glad I read it.

James Edward Gray II

Brian Adkins

8/23/2007 11:12:00 PM

0

On Aug 23, 1:32 pm, benj...@fysh.org wrote:
> I'm interested in functional programming.
>
> I'd really like to read a good book on it.

If you like Ruby, you may also enjoy Lisp since it influenced Ruby.
I'd recommend "Practical Common Lisp" by Peter Seibel. Or "ANSI Common
Lisp" by Paul Graham. Lastly, the classic "Structure and
Interpretation of Computer Programs" by Abelson and Sussman would be
good.

Or you can just skip the books and simply stop assigning to
variables ;)

Brian Adkins


benjohn

8/24/2007 9:02:00 AM

0

Thanks (everyone) for your suggestions.

*snip*

> Or you can just skip the books and simply stop assigning to
> variables ;)

That's very much my programming style. I wonder if it comes from the
small amount of functional programming that I studied :-)

I guess what I'm intersted in is the techniques or patterns that come up
in functional programs. Program transformation seems to be something
that gets used a lot, for example... I think the ideal for me would be a
reasonably gentle intro to a language (or perhaps a few - there are
quite a lot of those kinds of tutorials on the web though), and then a
series of article like chapters that cover interesting ways of using the
language.




Xavier Noria

8/24/2007 9:29:00 AM

0

On Aug 24, 2007, at 11:01 AM, benjohn@fysh.org wrote:

> That's very much my programming style. I wonder if it comes from the
> small amount of functional programming that I studied :-)
>
> I guess what I'm intersted in is the techniques or patterns that
> come up
> in functional programs. Program transformation seems to be something
> that gets used a lot, for example... I think the ideal for me would
> be a
> reasonably gentle intro to a language (or perhaps a few - there are
> quite a lot of those kinds of tutorials on the web though), and then a
> series of article like chapters that cover interesting ways of
> using the
> language.

I had that same goal, only I already had chosen Haskell.

After reading a few online tutorials I bought "Programming in
Haskell" and I think it is an excellent book. It teaches the basics,
to the point, idiomatic Haskell and functional style. I am just
learning Haskell so I don't have enough perspective, but my
impression so far is that this book is a must-read to learn, you'll
be quickly on the right track.

-- fxn


Robert Dober

8/24/2007 9:37:00 AM

0

On 8/24/07, benjohn@fysh.org <benjohn@fysh.org> wrote:
> Thanks (everyone) for your suggestions.
>
> *snip*
>
> > Or you can just skip the books and simply stop assigning to
> > variables ;)
>
> That's very much my programming style. I wonder if it comes from the
> small amount of functional programming that I studied :-)
>
> I guess what I'm intersted in is the techniques or patterns that come up
> in functional programs. Program transformation seems to be something
> that gets used a lot, for example... I think the ideal for me would be a
> reasonably gentle intro to a language (or perhaps a few - there are
> quite a lot of those kinds of tutorials on the web though), and then a
> series of article like chapters that cover interesting ways of using the
> language.

Well I feel that "Programming Erlang" really is what you are looking,
for. I am not finished with it, but the "gentle introduction" seems to
fit perfectly.
I tried OCaml, Haskell first but I did not find anything like
"Programming Erlang" to walk me into the concepts...

Robert

--
I'm an atheist and that's it. I believe there's nothing we can know
except that we should be kind to each other and do what we can for
other people.
-- Katharine Hepburn

David and Sharon Phillips

8/24/2007 11:55:00 AM

0

> If you like Ruby, you may also enjoy Lisp since it influenced Ruby.
> I'd recommend "Practical Common Lisp" by Peter Seibel.
http://www.gigamonkeys...

> Or "ANSI Common Lisp" by Paul Graham.
http://paulgraham.com/onlisptext...

As for me, I'm still sort of trying Lisp. I'm mustn't be old enough
cause I just can't acquire a taste for emacs. I find it completely
impenetrable and the 'reward' of learning Lisp isn't sufficient for
me to endure it. Every now and then, though, I give it another shot.

Erlang though? Two thumbs up.

Cheers,
Dave

Brian Adkins

8/24/2007 2:09:00 PM

0

On Aug 24, 7:55 am, Sharon Phillips <phillip...@yahoo.co.uk> wrote:
> As for me, I'm still sort of trying Lisp. I'm mustn't be old enough
> cause I just can't acquire a taste for emacs. I find it completely
> impenetrable and the 'reward' of learning Lisp isn't sufficient for
> me to endure it. Every now and then, though, I give it another shot.
>
> Cheers,
> Dave

Emacs may have some advantages for Lisp, but it's not required. I use
vim (as does Graham IIRC). Thanks for the pointers to the free books -
I should've mentioned that.

M. Edward (Ed) Borasky

8/25/2007 3:45:00 AM

0

Sharon Phillips wrote:
>
> As for me, I'm still sort of trying Lisp. I'm mustn't be old enough
> cause I just can't acquire a taste for emacs. I find it completely
> impenetrable and the 'reward' of learning Lisp isn't sufficient for me
> to endure it. Every now and then, though, I give it another shot.

Yeah, you're right. Lisp and Forth are great old languages, but they
were a lot more fun when they (and we) were younger. :) If I hadn't
learned Lisp 1.5 in the 1970s I probably wouldn't attempt it now.

Forth, on the other hand, is something I'd probably learn now if I
didn't already know it. It's an amazing set of concepts that look really
weird until you stare at them long enough. At some point in the process,
you go, "Oh My God -- that's *brilliant*,", at which point you are a
Forth addict. :)

I do want to sit down some day with a good Scheme and learn the
internals, though. Speaking of which, a couple of weeks ago, Amazon.ca
accidentally posted a price of $4 (CDN, IIRC) for "Lisp in Small
Pieces". A bunch of folks from some other mailing lists jumped on it,
and of course, Amazon cancelled their orders, although they felt guilty
enough to give the losers a $10 gift certificate. But I ended up getting
a copy at list price and it was well worth it.

> Erlang though? Two thumbs up.

Definitely!!

M. Edward (Ed) Borasky

8/25/2007 3:49:00 AM

0

Robert Dober wrote:

> Well I feel that "Programming Erlang" really is what you are looking,
> for. I am not finished with it, but the "gentle introduction" seems to
> fit perfectly.
> I tried OCaml, Haskell first but I did not find anything like
> "Programming Erlang" to walk me into the concepts...

There is also the problem with Haskell (and OCaml, Prolog, Eiffel, etc.
for that matter) that they are very much academic constructs, rather
than languages honed by real programmers who get paid to write working
software. Erlang is very much a language for real programmers who get
paid to write working software.