Functional Programming

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 T., and would be called “Programming
Functionally: The pragmatic programmers guide” :slight_smile:

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

Thanks,
Benjohn

[email protected] wrote:

Ideally it’d be written by Dave T., and would be called “Programming
Functionally: The pragmatic programmers guide” :slight_smile:

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 T., but I’m sure he helped
edit it. Dave??

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 G. II

On Aug 23, 1:32 pm, [email protected] 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 :wink:

Brian A.

Thanks (everyone) for your suggestions.

snip

Or you can just skip the books and simply stop assigning to
variables :wink:

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

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.

haskell.org has tons of resources on the haskell language. there are
printed
books but they don’t have anything you can’t gather yourself from the
free
tutorials and online books.

On Aug 24, 2007, at 11:01 AM, [email protected] wrote:

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

On 8/24/07, [email protected] [email protected] wrote:

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

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.com/book/

Or “ANSI Common Lisp” by Paul Graham.
http://paulgraham.com/onlisptext.html?asdf

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

On Aug 24, 7:55 am, Sharon P. [email protected] 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.

Sharon P. 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. :slight_smile: 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. :slight_smile:

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!!

Brian A. wrote:

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 :wink:

The graveyards are littered with the bones of programmers who thought
they’d never have to use an imperative language again. And there are
dozens – maybe even hundreds – of dead functional, single-assignment,
dataflow, block-diagram, and other “nifty” little magic bullet
languages.

Functional programming is harder than imperative programming. Recursion
is harder to understand than iteration. Denotational and axiomatic
semantics of programming languages are harder than operational
semantics. And so on.

Anybody here remember SISAL? ID (Irvine Dataflow)? At least Matz
remembered CLU. :slight_smile: I personally think Erlang is the last best hope for
functional programming.

Robert D. 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.

On 8/25/07, M. Edward (Ed) Borasky [email protected] wrote:

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. :slight_smile:

I do want to learn a concatenative at some point - any opinions as to
whether I should start with Forth or jump straight to Joy or Factor?

martin

On Aug 25, 2007, at 2:06 PM, M. Edward (Ed) Borasky wrote:

It does have a GCC dependency,
which might be an issue on Macs or Solaris. I don’t have either so I
can’t answer that – it runs very well on Linux and Windows.

The primary compiler for Macs is gcc.

James Edward G. II

Martin DeMello wrote:

martin

I guess it depends on what you want to do with it. I only briefly looked
at Joy and haven’t even heard of Factor until just now. Joy struck me as
an “academicized” Forth, which I think is a “bad” thing. Forth itself
has a current ANS standard and a working committee building a new
standard, at least two commercial vendors and dozens of open-source
implementations. People actually get paid to write Forth.

I would start with GNU Forth (gforth). It’s available in most Linux
distros and should run anywhere GCC runs. It does have a GCC dependency,
which might be an issue on Macs or Solaris. I don’t have either so I
can’t answer that – it runs very well on Linux and Windows.

James Edward G. II wrote:

Thanks! I thought they had their own compiler.

Robert D. wrote:

I know it is OT but do you share my POV that from all that old
languages the only one that is still ahead of its time is Smalltalk?

Lisp is always ahead of its time, because it is always being reinvented.

On 8/25/07, M. Edward (Ed) Borasky [email protected] wrote:

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!!

I know it is OT but do you share my POV that from all that old
languages the only one that is still ahead of its time is Smalltalk?
And to come back to the issue, How old is Erlang BTW (I did not find a
historical chapter in my book)?
Cheers
Robert

Robert D. wrote:

I know it is OT but do you share my POV that from all that old
languages the only one that is still ahead of its time is Smalltalk?
And to come back to the issue, How old is Erlang BTW (I did not find a
historical chapter in my book)?
Cheers
Robert

Well, I think the Lispniks would claim that Smalltalk is a dialect of
Lisp. :slight_smile: But seriously, Smalltalk is certainly not as “old” as Fortran,
Lisp, or C. Nor is it the first “object-oriented” language – that honor
probably belongs to Simula, a dialect of Algol.

Smalltalk represents a convergence of a number of concepts, including
“everything is an object”, model-view-controller architectures, actors,
graphical user interfaces, and many others. But I don’t think Smalltalk
was ever “ahead of its time.”

I don’t really think the concept of “ahead of its time” has any meaning
where programming languages are concerned. Programming languages are in
a very real sense living creatures – they are born, they evolve, they
cross-breed, and sometimes die.

But I can only think of a few languages that have actually died, in the
sense that they haven’t evolved into something in use today. SLIP and
the IPL family of languages, with a “target market” similar to that of
Lisp, died out. COMIT and SNOBOL, string processing languages, more or
less died out, although their successor, regular expressions, is about
as vital as anything can be.

And a fair number of Algol dialects – JOVIAL, NELIAC, Algol 68 – were
dead-end paths off the main Algol line, today represented by C/C++/C#
and Java. Just off the top of my head, I can’t think of any others that
literally disappeared from the face of the Earth.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs