Computer Science Canada

Just do it

Author:  wtd [ Fri Sep 01, 2006 3:32 pm ]
Post subject:  Just do it

Learn a functional programming language.

Take a few hours and just throw yourself into a functional programming language. O'Caml, SML/NJ, Lisp, Scheme, Erlang... just pick one and learn the basics. For the most part, these language have small conceptual bases, so you can learn more in that amount of time than you might think.

It's worth it, but I don't know that I can explain the benefits more than I already have. You'll just have to see for yourselves.

Smile

Author:  cool dude [ Fri Sep 01, 2006 3:40 pm ]
Post subject: 

which one would you say is the easiest to learn? are all those free and if so any links for download? also you said you explained the benefits before, mind providing the link where u posted that?

Author:  wtd [ Fri Sep 01, 2006 3:54 pm ]
Post subject: 

Which is easiest to learn? They're all fairly easy to learn, with good REPLs.* They're all possible for anyone here to learn, if you go in with an open mind.

http://caml.inria.fr
http://www.smlnj.org/
http://clisp.cons.org/ (http://www.cygwin.com/ - Cygwin provides the easiest way to install on Windows)
http://www.drscheme.org/
http://www.erlang.org/

I've posted about the fun and advantages of functional programming many many times. I really don't feel like hunting all of it down. Try using the site' search function with some of the language names I've mentioned.

* REPL = Read-Eval-Print Loop: an interactive interpreter

Author:  cool dude [ Sat Sep 02, 2006 12:35 pm ]
Post subject: 

i tried installing clisp but i don't know how Embarassed any help? also is this like a programming language where there's a window where i write code and then compile and run it?

Author:  cool dude [ Sat Sep 02, 2006 1:03 pm ]
Post subject: 

nevermind i think i did it. any good tutorials?

P.S. wats the difference between Clisp and lisp?

also is there a way to save things?

Author:  wtd [ Sat Sep 02, 2006 1:23 pm ]
Post subject: 

For Common Lisp, I highly reccomend reading through Practical Common Lisp. It's available online for free.

http://www.gigamonkeys.com/book

Author:  cool dude [ Sat Sep 02, 2006 6:56 pm ]
Post subject: 

Thanks a lot for the link. 2 questions

1) a bit confused what is the language called lisp or clisp??? Confused

2) since its a functional programming language can u get user input?

Author:  [Gandalf] [ Sat Sep 02, 2006 7:55 pm ]
Post subject: 

I assume that "what" should be a "why"? In that case...

1) Lisp is a shortened form of List Processing, and Clisp is short for Common Lisp. I suggest you do some reading if you want to find out more, since that's usually the first big step in learning.
2) Yes it can, and many many other things as well.

Author:  wtd [ Sat Sep 02, 2006 11:41 pm ]
Post subject: 

It should be noted that none of the languages I mentioned are what are considered "pure" functional programming languages. Pure functional programming languages guarantee referential integrity.* As such they can make things like IO cumbersome or require advanced knowledge to fully understand.

However, all of the languages mentioned provide significant levels of support for other concepts considered central to functional programming.

* In short - a function given the same arguments always returns the same value.

Author:  bugzpodder [ Mon Sep 04, 2006 8:11 pm ]
Post subject: 

i learnt scheme once upon a time. didnt find any use for it so i hardly remembers now

Author:  wtd [ Tue Sep 05, 2006 12:29 pm ]
Post subject: 

Those wishing for help in approaching functional programming, please see the Conceptual Bridge thread.

It is, however, a work in progress. Revisit it and you will probably find new material.

Author:  1of42 [ Sat Sep 30, 2006 5:25 pm ]
Post subject: 

wtd: what languages are purely functional? haskell?

Author:  wtd [ Sat Sep 30, 2006 5:30 pm ]
Post subject: 

Haskell is, yes.

I do not necessarily suggest you try to make your first foray into functional programming using such a language.

Author:  rdrake [ Sat Sep 30, 2006 8:03 pm ]
Post subject: 

1of42 wrote:
wtd: what languages are purely functional? haskell?
Haskell and o'caml are two big ones. Step into the IRC channel some time, wtd can often be seen cleaning up the brains off the floor Wink.

Author:  wtd [ Sat Sep 30, 2006 10:30 pm ]
Post subject: 

rdrake wrote:
1of42 wrote:
wtd: what languages are purely functional? haskell?
Haskell and o'caml are two big ones. Step into the IRC channel some time, wtd can often be seen cleaning up the brains off the floor Wink.


O'Caml, nifty though it is, is not a purely functional programming language.

Author:  Aziz [ Sat Sep 30, 2006 10:45 pm ]
Post subject: 

I have a question: what are the actual uses of a functional language. Such as real-world examples, and even not-so-real-world examples. Perhaps look at this as a simple "why functional?" question.

Author:  wtd [ Sun Oct 01, 2006 10:49 pm ]
Post subject: 

Real world examples, eh? Well, just to list a few...

Microsoft's F# project, which is a dialect of O'Caml designed to work with the .NET platform. Also from Microsoft, C# 3.0 incorporates several aspects of functional programming languages (or at least most commonly found in functional programming languages).

Erlang is probably the most widely commercially used functional programming language.

Author:  Clayton [ Tue Oct 10, 2006 7:35 am ]
Post subject: 

Is functional programming used more for applications? Is it possible to create graphics and such using functional programming languages? Or am I just deluded and need to go back to school Surprised

NOTE: Nice, a forum just for Functional Programming, who decided on that?

Author:  rdrake [ Tue Oct 10, 2006 8:03 am ]
Post subject: 

Freakman wrote:
Is functional programming used more for applications? Is it possible to create graphics and such using functional programming languages? Or am I just deluded and need to go back to school Surprised
Dig a little deeper, or just click here.

Author:  Tony [ Tue Oct 10, 2006 12:03 pm ]
Post subject: 

Freakman wrote:
NOTE: Nice, a forum just for Functional Programming, who decided on that?

Myself (as announced on the blog, with Dan's nod of approval of course.

The rule of thumb is to just keep on creating threads in [GD] until a topic becomes popular enough to be moved to a dedicated forum. At 47 topics / 271 posts it's actually larger than some of the already existing areas.

Author:  Lazy [ Tue Nov 07, 2006 4:16 am ]
Post subject: 

Hi all,

I'm a hobbyist programmer who recently dug in two functional programming languages, Scheme and Haskell. It was not an easy start, but as I'm beginning to grasp these languages, I'm more and more certain it was worth it.

So, why functional languages?

Well designed functional languages, such as Haskell or Scheme, really provide nothing more than what all high-level languages should: powerful abstraction mechanisms in a safe environment, so complex programs are simple to write and easy to maintain. The underlying mathematical model provides robustness and elegance, while the interpreter takes care of optimization and memory management.

Historically, FLs were used a lot in academic research, such as expert systems, planning, language comprehension etc. The famous robot simulation, SHRDLU, was written in LISP. The famous modern example includes Perl 6, which is being written in Haskell. Basically, any complex project can benefit from a functional approach.

And, which language to choose?

I picked Haskell and Scheme because they are well documented - and also because they are complementary to each other, so learning them both at once gives me a good picture of the underlying paradigm. The classic programming textbook, <a href="http://mitpress.mit.edu/sicp/"> SICP </a> uses Scheme for examples and exercises throughout, so it's worth knowing Scheme just to read to book (and the book's well worth reading.)

Anyway, I hope this helps... and wasn't too long for the first post.

Best, L.

Author:  Tony [ Tue Nov 07, 2006 9:37 am ]
Post subject: 

it was a rather good post Smile

why don't you also introduce yourself in our Hello World thread. I'm rather interested in your current location (we are mostly from Canada here, so it's exciting to learn about the other parts of the world) Wink


: