On Dec 17, 10:32 am, Rich Hickey <richhic...@gmail.com> wrote:
> The Clojure FAQ will be here:
>
> http://code.google.com/p/clojure/wiki/FAQ
>
> Suggestions for entries welcome here.

Suggestions, based on common questions in the group:

* Is there a repository for Clojure libraries?

Answer: Yes, see http://code.google.com/p/clojure-contrib/

* Where can I learn about Java?

Answer: Try the Java tutorials at <http://java.sun.com/docs/books/
tutorial/>, the Java API at <http://java.sun.com/javase/6/docs/api/>,
and Bruce Eckel's free book "Thinking in Java" at <http://
www.mindview.net/Books/TIJ/>

* Where can I learn about Lisp?

Answer: Try Peter Seibel's free book "Pratical Common Lisp" at <http://
www.gigamonkeys.com/book/> or "Structure and Interpretation of
Computer Programs" (Scheme) at <http://mitpress.mit.edu/sicp/full-text/
book/book.html>

* Is there an IDE for Clojure?

Answer: There are plug-ins for Eclipse <http://code.google.com/p/
clojure-dev/> and NetBeans <http://enclojure.net/>.  There's also
Emacs.

* Do I need to know Java to use Clojure?

Answer: Not at first, but it helps to know the standard Java APIs.

* Why doesn't #([%]) work?

Answer: Because it expands to "(fn [x] ([x]))".  #() always assumes
that the thing inside it is a function call.  [x] isn't a function, so
([x]) isn't a valid function call.

* When do I use Atoms / Refs / Agents?

Answer (needs work): Use an Atom when you have a value that is only
used in one place.  Use a Ref when the same value is used by multiple
threads, and you want make sure the value is updated before
continuing.  Use an Agent when the same value is used by multiple
threads but you don't care when updates happen.

* How do I get primitive types like "int"?

Answer: Integer/TYPE

* How do I copy a file?

Answer: Use Apache Commons IO: http://commons.apache.org/io/

* How do I use SLIME?

Answer: See http://bc.tech.coop/blog/081209.html

* Does Clojure support custom reader macros?

Answer: No, and it probably never will.

* How do I call a Java method that takes a variable number of
arguments?

Answer: The variable arguments are actually just an array:
(.method object fixed-args... (into-array type variable-args...))


-Stuart Sierra
--~--~---------~--~----~------------~-------~--~----~
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
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