Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Getting started with Clojure
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Robin Bhattacharyya  
View profile  
 More options Jan 13 2008, 6:06 pm
From: "Robin Bhattacharyya" <robi...@gmail.com>
Date: Sun, 13 Jan 2008 15:06:24 -0800
Local: Sun, Jan 13 2008 6:06 pm
Subject: Getting started with Clojure

When I was trying to figure out how Clojure differs from Common Lisp,
I walked through Chapter 3 of Practical Common Lisp and re-implemented
things in Clojure.  The simple database example touched on many topics
like fn, vectors, maps, refs, sync, recur, macros, formatted printing,
writing and reading from files.

I attached the file here because maybe it will help someone compare
Clojure and CL side by side.

Robin

  practical_clojure.clj
6K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rich Hickey  
View profile  
 More options Jan 13 2008, 7:13 pm
From: Rich Hickey <richhic...@gmail.com>
Date: Sun, 13 Jan 2008 16:13:02 -0800 (PST)
Local: Sun, Jan 13 2008 7:13 pm
Subject: Re: Getting started with Clojure

On Jan 13, 6:06 pm, "Robin Bhattacharyya" <robi...@gmail.com> wrote:

> When I was trying to figure out how Clojure differs from Common Lisp,
> I walked through Chapter 3 of Practical Common Lisp and re-implemented
> things in Clojure.  The simple database example touched on many topics
> like fn, vectors, maps, refs, sync, recur, macros, formatted printing,
> writing and reading from files.

> I attached the file here because maybe it will help someone compare
> Clojure and CL side by side.

Very neat - thanks! Any impressions after this exercise?

Rich


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robin  
View profile  
 More options Jan 13 2008, 8:00 pm
From: Robin <robi...@gmail.com>
Date: Sun, 13 Jan 2008 17:00:24 -0800 (PST)
Local: Sun, Jan 13 2008 8:00 pm
Subject: Re: Getting started with Clojure

> Very neat - thanks! Any impressions after this exercise?

--Clojure syntax is nice: being a lisp-1 the syntax is simplified.
--Maps are functions of their keys, and keys are functions of maps is
very elegant.
--The auto gensyms are great, but I did not use them since the source
used variable capture.
--In the macros,  '~' is definitely more readable than ',' for
expansion.
--Preventing cd from expanding to user/cd in a macro was a little
tricky: `(fn [~'cd] (and ~@(make-comparisons-list clauses))))
--Commas as whitespace is a nice option.
--The Java integration is pretty seamless and makes it possible to
leverage any Java lib.
--More lispy formatted printing options would be nice.
--A method for doing keyword args would be nice.

If you are on the JVM, then Clojure is a breath of fresh air. :)

Thanks for sharing Clojure with the world,

Robin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »