On Mar 17, 7:28 am, Ben Armstrong <synerg...@gmail.com> wrote:
> I am new to clojure and functional programming, but not to programming
> in general, having been in the profession for a quarter of a century.  
> I'm trying to stretch myself a bit by learning clojure, but some of the
> threads here go beyond mere stretching to verge on head-exploding.  In
> my offline reading of this list this morning, I tried using the tools
> available to me at the time (dict client and a few dictionaries like
> foldoc) to make sense of words like:  http://foldoc.org/monad.  I
> survived to write this post, but only barely.
>
> What I would like to have is some sort of lexicon to at least help
> explain the terminology in a way that doesn't require three years of
> academic exposure to functional programming to read.  Is there such a
> reference?  Or should I just ignore threads like "Why do functions in
> the state monad only accept one value?" and be happy that at least
> somebody cares about this stuff, so that I don't have to?
>
> Ben


Ben,
You can do a LOT with just a basic level of Clojure. I'm writing a
database
loader to help support an iPhone app I'm writing, and got done in just
a few
hours whilst only scratching the surface of what's available. No
paralleism,
no monads, no macros, no refs.
My opinion, and it may only be valid for me, is learning a language
works
best when you have a definite task, and you can build code, then
better
code, then even better code in the language you're trying to learn.
I have a couple of the books, but as yet, the best method for
learning
seems to be google and example code.
Tim Bray has a Clojure Wide Finder series that makes interesting
reading.
The best thing about Clojure is the immediacy and ability to syntax
check
as you go. I'm using TextMate with the Clojure bundle and it's working
great,
just hit clover-R on hightlighted text and the result comes right
back...
In short don't worry about monads... The terminology is awful, and
they make
my head explode too.
Here's a nice little piece of code that sucks in a file and inserts it
into a SQL
table. This is the sort of conciseness I love about Clojure.

(defn load-records [table-name file-name]
        (doseq [line (-> file-name java.io.FileReader.
java.io.BufferedReader. line-seq)]
                (let [fields (map #(.replace %1 "~" "") (seq (.split #"\^" (str 
line
"~"))))]
                        (sql/insert-rows table-name fields))))

If this sucks as code, someone jump in and tell!

Best Wishes,
Jonathan

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to