|
I have a java.util.HashMap object m (a return value from a call to Java code) and I'd like to get a new map with an additional key-value pair.
If m were a Clojure map, I could use:
(assoc m "key" "value")
But trying that on a HashMap gives:
java.lang....
Started by Frederic Daoud on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Clojure makes the java Collections seq-able, so you can directly use the Clojure sequence functions I was trying to compare memory characteristics of the clojure version vs java's (but used from clojure; Clojure....
|
|
I followed this very helpful guide on getting this development environment set up. When running the emacs.bat I get the following error in Emacs:
File error: Cannot open load file, clojure-auto
Unfortunitely I am completely new to both Clojure and Emacs...
Started by rcampbell on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I documented my own experience in installing Emacs and the latest Clojure from Git repositories into ....
HOME environment variable, I think the code there relies on it being C:\clojure-dev
Rather than clojure + emacs installation.
|
|
I develop in Lisp and in Scheme, but I was reading about Clojure and then I want to know, in which cases is better to use it than using Lisp or Scheme? Thanks
Started by Nathan Campos on
, 12 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
I have tried, and use....
One of the greatest things about Clojure is the plethora of libraries you can use.
You should use Clojure nearly 100% of the time over CL and Scheme, is what I would say reasons too.
To answer.
|
Ask your Facebook Friends
|
What methods to use a database from Clojure are there?
I know from Clojure you can do anything you can with Java, but that means that I may end up using something overly complicated (like Hybernate) which clashes with Clojure simplicity. Any recommendations...
Started by J. Pablo Fernández on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
See here ..
clojure-contrib has an sql library which is a thin wrapper around JDBC (java.sql.DriverManager/value database in Clojure.
|
|
Hi,
What are best ways to Debug Clojure code, while using the repl in Clojure-box ?
Started by Icarus on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The accepted answer to this SO question: Idiomatic Clojure is currently incompatible with swank-....
Or you could use a macro expanding either to a passed-in body or nil expand to body wrapped in a do .
Then pretend it's never seen it).
|
|
Clojure seems likes it might have a good shot at being a popular Lisp. I was wondering how many people have actually adopted it to solve some of the small, yet real, problems that they have encountered. Since Clojure doesn't have an entry in Pleac , I...
Started by melling on
, 9 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
(use '(clojure.contrib java-utils)) (defn make-thumbnail is similar to JSON in Javascript--you....
(ns weather (:use (clojure [xml :only [parse format javax.imageio.ImageIO can write.
This prints a weather forecast via Yahoo! Weather.
|
|
This is what Rich Hickey said in one of the blog posts but I don't understand the motivation in using apply. Please help.
A big difference between Clojure and CL is that Clojure is a Lisp-1, so funcall is not needed, and apply is only used to apply a ...
Started by kunjaan on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You would use apply ,....
I've not done enough with clojure to be able to be confident about the subtleties for that particular language to tell whether the use of apply in that case would be strictly necessary.
Of arguments, ditto.
|
|
As a non-lisper coming to clojure how should I best understand the naming convention where vars get a name like *var-name* ?
This appears to be a lisp convention indicating a global variable. But in clojure such vars appear in namespaces as far as I can...
Started by Alex Stoddard on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
"Programming Clojure....
Some references I found in the Clojure newsgroups:
Re: making code readable John I got that idea.
If you don't use asterisks that means you are saying the var will keep its root binding.
It as a threadlocal variable.
|
|
If I want to learn Clojure, should I start by learning Scheme or Common Lisp?
Or is Clojure different enough from both of these, that I should just start learning Clojure by itself?
Started by uzo on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
All three have ....
The differences between Lisp and Scheme (and Clojure itself for that matter) shouldn't be a concern especially if you are just is best for your needs.
For your purposes I think you are safe to just start learning Clojure.
|
|
I am having a hard time writing type checks in Clojure. Pleas help me.
How do I write/perform 'char?' in Clojure? How do I write/perform 'atom?' in Clojure?
How do I know what type an item is in Clojure?
Can I write (type? an-item) ?
Started by kunjaan on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Or anything that's not a pair", but this makes no sense in Clojure because Clojure doesn't use consTypically type questions in Clojure come down to asking "what class is this, or what primitive-wrapper-class can contain it....
|