The structure of the wikibook page has changed and that link doesn't
work any more.
This will:
http://en.wikibooks.org/wiki/Clojure_Programming/Concepts#Mutation_Facilities
On 16 Dez., 20:58, Rowdy Rednose rowdy.redn...@gmx.net wrote:
Can I listen on changes done to refs?
Let's say in a
If Rich adds watchers for refs, would watchers be notified inside the
transaction?
I'm actually trying to get a notification after a transaction
successfully finished. Although there might be use cases for firing
events inside the transaction.
On 17 Dez., 00:37, Stuart Sierra
On Dec 17, 12:43 am, Kevin Martin martink...@gmail.com wrote:
I unfortunately ran into circular requires today. In previous
versions of Clojure a circular require was answered with an
exception. The text of this was something along the lines of Cannot
load 'a' because already loading 'a'.
Hi,
I am trying to write a function that recursively traverses a given
object - applying a function to each node. Something along these
lines:
(defn traverse [f os]
(f os)
(when (coll? os)
(doseq [o os]
(traverse f o
Although this fragment seems to be doing the job, I am not
On Dec 17, 11:34 am, Stuart Sierra the.stuart.sie...@gmail.com
wrote:
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
On Wed, Dec 17, 2008 at 11:34 AM, Stuart Sierra
the.stuart.sie...@gmail.com wrote:
Suggestions, based on common questions in the group:
These are good, Stuart, thanks!
Except...
* Why doesn't #([%]) work?
Answer: Because it expands to (fn [x] ([x])). #() always assumes
that the thing
On Wed, Dec 17, 2008 at 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.
I recently found out about Google Moderator
(http://moderator.appspot.com/), which might be a good fit
On Dec 17, 11:50 am, J. McConnell jdo...@gmail.com wrote:
On Wed, Dec 17, 2008 at 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.
I recently found out about Google
Hi,
Am 17.12.2008 um 18:21 schrieb David Nolen:
You can have unresolved symbols within a macro with:
~'symbol
I don't think this is really an alternative.
(def x 5)
(sql col1 from table1 where col2 = ~x)
(sql `(~'select ~'col1 ~'from ~'table1 ~'where ~'col2 ~'= ~x))
(def *cmd*
On Tue, Dec 16, 2008 at 6:21 PM, Randall R Schulz rsch...@sonic.net wrote:
On Tuesday 16 December 2008 15:05, Allen Rohner wrote:
On Dec 16, 4:32 pm, Stuart Halloway wrote:
Hi all,
I sometimes need to (re)load a library, removing public symbols
from previously loaded version of
As a benefit of moving to Google Code, Clojure has also acquired an
issue tracker:
http://code.google.com/p/clojure/issues/list
Please note the following very carefully:
This is not an invitation to have (now thousands) of people give me a
todo list! Nor is it a collective wishlist.
I would
hi,
Got it working! Removed the overzealous use of dosync in defn do-year.
Might I beg a small summary write-up of your experience and/or
conclusions, recommendations? :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Something flakey there. I clicked the star several times and nothing
happened. I then checked in Firebug that the star is backed by
JavaScript, and when I tried it again it worked. Odd.
Randall, let me know if you need anything else upvoted. :-)
Stuart
On Wednesday 17 December 2008 06:55,
On Monday 15 December 2008 17:58, Randall R Schulz wrote:
Hi,
I've just started using agents and as I've done that, I've noticed
that once you use an agent, exiting the REPL leads to a hang (with
zero CPU usage). As Rich pointed out to me, this is avoided by
calling (shutdown-agents).
So
On Wednesday 17 December 2008 10:57, Randall R Schulz wrote:
On Monday 15 December 2008 17:58, Randall R Schulz wrote:
...
This sequence of evaluations ends in the REPL hanging:
1:1 user= (.. Runtime (getRuntime) (addShutdownHook (new Thread
shutdown-agents))) nil
1:2 user= (def agent-99
Hi,
On 17 Dez., 15:40, Rich Hickey richhic...@gmail.com wrote:
The point of that page is that it is extremely frustrating to get
reports about macros where people haven't taken the simplest steps of
generating the expansions and looking at them.
I cannot identify myself with this point of
On Wed, Dec 17, 2008 at 7:26 AM, Rowdy Rednose rowdy.redn...@gmx.net wrote:
Now before I start working on a small and handy framework to handle
stuff similar to what's called biz objects / biz models in the java
world - has by any chance someone already implemented something in
that
On Dec 16, 5:13 pm, Stephen C. Gilardi squee...@mac.com wrote:
The enclosed patch updates clojure.main to fix a bug and implement
changes discussed here recently. Details below. Feedback welcome.
--Steve
[1] clojure.main no longer calls gen-class. Instead there is now a
stub clojure.main
On Wed, Dec 17, 2008 at 2:10 PM, Randall R Schulz rsch...@sonic.net wrote:
Since Chouser asked on #clojure which REPL (I was using the Contrib
REPL), I tried this with the stock REPL and the hang does not occur.
Specifically, this line causes the JVM to shut down, even if there are
agent
On Dec 17, 2008, at 4:16 AM, Rowdy Rednose wrote:
If Rich adds watchers for refs, would watchers be notified inside the
transaction?
No, only on commit.
Rich
I'm actually trying to get a notification after a transaction
successfully finished. Although there might be use cases for
On Wednesday 17 December 2008 06:21, Meikel Brandmeyer wrote:
Hi Randall,
On 17 Dez., 15:12, Randall R Schulz rsch...@sonic.net wrote:
user= (dcmfail)
java.lang.IllegalArgumentException: Unable to resolve classname:
BufferedWriter (repl-1:2)
This doesn't help, I know, but it works for
I've moved Clojure's source repo to Google Code:
http://code.google.com/p/clojure/
as well as Clojure contrib:
http://code.google.com/p/clojure-contrib/
All new checkins will occur there.
Rich
--~--~-~--~~~---~--~~
You received this message because you are
On Dec 17, 4:30 am, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
I'd like to propose/put up for discussion a change to the unquote
handling.
I basically ran into the following problem:
I'd like to embed a DSL into my system. Using macros it should be
possible
to define a language, which
You can have unresolved symbols within a macro with:
~'symbol
David
On Wed, Dec 17, 2008 at 3:30 AM, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
I'd like to propose/put up for discussion a change to the unquote
handling.
I basically ran into the following problem:
I'd like to embed a DSL
The Clojure FAQ will be here:
http://code.google.com/p/clojure/wiki/FAQ
Suggestions for entries welcome here.
Rich
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email
On Wed, Dec 17, 2008 at 8:14 AM, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
On 17 Dez., 14:55, MikeM michael.messini...@invista.com wrote:
((sorted-map 'a 1 'b 2) a) = ClassCastException
I would think that sorted-maps and hash-maps should both give nil for
this, but perhaps the sorted-map
I'm actually trying to get a notification after a transaction
successfully finished.
Well that's easy. Agent sends are buffered in a transaction, and only
sent upon successful commit. The coolness of this is hard to
overestimate.
--Dave Griffith
Thanks for the idea. Although those are definitely necessary steps,
unfortunately the problem still persists.
On Tue, Dec 16, 2008 at 5:47 PM, Wayne R johnway...@gmail.com wrote:
Have a look at
http://dertompson.com/2007/10/06/connection-to-mssql-server-express-2005-with-jdbc/
Apparently
Hi,
Am 17.12.2008 um 17:34 schrieb Stuart Sierra:
* 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.
There is also Vim.
Sincerely
Meikel
smime.p7s
Description: S/MIME
On Wednesday 17 December 2008 05:48, Rich Hickey wrote:
On Dec 16, 3:52 pm, Randall R Schulz rsch...@sonic.net wrote:
...
Which takes us back to why the dot-suffix notation was not working
in a macro but (new ...) was. ...
Could you please post a short code example (reducing the
On Wed, Dec 17, 2008 at 2:53 PM, Rich Hickey richhic...@gmail.com wrote:
Moving syntax-quote out of the reader might be a big deal. But I think
scenarios like this could be covered if:
~x not in a syntax-quote yielded the form (unquote x) from the reader
unquote would not be defined by
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
On Wednesday 17 December 2008 06:14, Meikel Brandmeyer wrote:
Hi,
On 17 Dez., 14:55, MikeM michael.messini...@invista.com wrote:
((sorted-map 'a 1 'b 2) a) = ClassCastException
I would think that sorted-maps and hash-maps should both give nil
for this, but perhaps the sorted-map
On Dec 17, 9:26 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:
On Wed, Dec 17, 2008 at 8:14 AM, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
On 17 Dez., 14:55, MikeM michael.messini...@invista.com wrote:
((sorted-map 'a 1 'b 2) a) = ClassCastException
I would think that
On Wednesday 17 December 2008 06:26, Mark Volkmann wrote:
...
It appears that you can create a sorted-map where all the keys are
symbols and you can create a sorted-map where all the keys are
strings, but you can't create a sorted-map where some of the keys are
symbols and some are strings.
On Wed, Dec 17, 2008 at 11:00 AM, Scott Jaderholm jaderh...@gmail.com wrote:
Thanks for the idea. Although those are definitely necessary steps,
unfortunately the problem still persists.
Can you get a similar Java program work correctly? i.e. we want to try
and separate if this is specific to
On Dec 17, 8:22 am, Rich Hickey richhic...@gmail.com wrote:
I've moved Clojure's source repo to Google Code:
http://code.google.com/p/clojure/
as well as Clojure contrib:
http://code.google.com/p/clojure-contrib/
All new checkins will occur there.
There's also a read-only list/feed
On Dec 17, 9:38 am, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
On 17 Dez., 15:27, Randall R Schulz rsch...@sonic.net wrote:
user= (macroexpand '(dcmfail))
(new BufferedWriter (FileWriter. stand-back))
I'm guessing it works for you 'cause in the macro expansion context you
have an
Hi,
On 17 Dez., 14:55, MikeM michael.messini...@invista.com wrote:
((sorted-map 'a 1 'b 2) a) = ClassCastException
I would think that sorted-maps and hash-maps should both give nil for
this, but perhaps the sorted-map implementation requires a cast?
Obviously a string is not a symbol. A
Hi Itay,
The only decomposable object which is not a collection (as far as I
know) is a String:
(seq hello)
;= (\h \e \l \l \o)
But usually that's not what you want if you're traversing a data
structure. If you're interacting with Java code that returns
Iterators, Enumerables, or some weird
Hi Randall,
On 17 Dez., 15:12, Randall R Schulz rsch...@sonic.net wrote:
user= (dcmfail)
java.lang.IllegalArgumentException: Unable to resolve classname:
BufferedWriter (repl-1:2)
This doesn't help, I know, but it works for me.
What does macroexpand say for your macros? See below
link for
On Dec 16, 3:52 pm, Randall R Schulz rsch...@sonic.net wrote:
On Tuesday 16 December 2008 12:37, Rich Hickey wrote:
On Dec 16, 2:32 pm, Stuart Halloway stuart.hallo...@gmail.com wrote:
Hi Randall,
The syntactic sugar forms are reader behavior, and occur too soon:
at read time, not
Got it working! Removed the overzealous use of dosync in defn do-year.
--~--~-~--~~~---~--~~
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
Hi all,
First off, thanks for clojure! I've been playing with it for a couple
days now and love it!
Doing ruby in my day job, I've found some quirks I don't really
understand. Most of them are obviously me being new to clojure and a
lisp beginner. But the following keeps bugging me:
user
Hi,
On 17 Dez., 13:45, Rich Hickey richhic...@gmail.com wrote:
I hope to re-enable the detection of the 'mistake' case, just requires
some time to work out how to distinguish from the AOT case.
I'm just guessing now (and maybe this doesn't help in the AOT
case): currently require uses a list
On Wednesday 17 December 2008 06:55, Rich Hickey wrote:
...
Added issue:
http://code.google.com/p/clojure/issues/detail?id=7
Rich
I tried to vote / star this issue, but it seems to have no effect. There
was one star when I entered and that remains the case even after two
attempts to
On Dec 17, 9:31 am, Randall R Schulz rsch...@sonic.net wrote:
On Wednesday 17 December 2008 06:21, Meikel Brandmeyer wrote:
Hi Randall,
...
http://clojure-log.n01se.net/macro.html
That's a long way to go get a macro expansion!
The point of that page is that it is extremely
With SVN 1162,
((hash-map 'a 1 'b 2) a) = nil
((sorted-map 'a 1 'b 2) a) = ClassCastException
I would think that sorted-maps and hash-maps should both give nil for
this, but perhaps the sorted-map implementation requires a cast?
--~--~-~--~~~---~--~~
You received
On Dec 17, 3:43 am, Remco van 't Veer rwvtv...@gmail.com wrote:
Hi all,
First off, thanks for clojure! I've been playing with it for a couple
days now and love it!
Doing ruby in my day job, I've found some quirks I don't really
understand. Most of them are obviously me being new to
I also have found that building with Maven:
java -cp clojure.jar clojure.main
does not work although it does when compiling with ant.
Since Swank-clojure was recently changed to call clojure.main and not
lang.Repl my maven build wouldn't work in slime.
Hi,
On 17 Dez., 15:27, Randall R Schulz rsch...@sonic.net wrote:
user= (macroexpand '(dcmfail))
(new BufferedWriter (FileWriter. stand-back))
I'm guessing it works for you 'cause in the macro expansion context you
have an import in effect. I (use ...) the module bearing the failing
macro
Hi folks,
Just committed (on Google code) some new features to
clojure.contrib.test-is:
* failure reports include source file and line number when possible
* Experimental: (are ...) uses clojure.contrib.template. The old
each= is now (are (= _1 _2) ...). The old all-true is now (are
_ ...)
*
Hello,
* 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.
Sincerely, clojure-dev (Eclipse plugin) is still currently in infancy.
I think it's not fair for the emacs version and
Here's an example from Stuart Halloway's book.
(defmacro chain
([x form] (list '. x form))
([x form more] (concat (list 'chain (list '. x form)) more)))
(macroexpand '(chain arm getHand getFinger getNail) ; I added the getNail part.
The result is (. (. (. arm getHand) getFinger) getNail)
On Dec 17, 2008, at 2:27 PM, Rich Hickey wrote:
Thanks!
You're welcome!
Wow, that's a lot of changes. I'm not sure about this one:
- Exceptions caught by the repl now cause the rest of the input line
to be skipped.
In what way is that the right thing to do?
The idea was that the
Neat challenge on stackoverflow:
http://stackoverflow.com/questions/372668/code-golf-how-do-i-write-the-shortest-character-mapping-program
I added an implementation in Clojure. One that I'm sure could be
greatly improved on. I don't really care for the extremely obfuscated
examples. Sure,
On Dec 17, 8:25 pm, Chouser chou...@gmail.com wrote:
~x not in a syntax-quote yielded the form (unquote x) from the reader
I very much like the sound of this.
+1
I'm for this as well. I've been using keywords as a substitute, but an
unquote would be more intuitive.
- James
I recommended clojure to a dozen friends or so and after a while none
of them stuck with it. I know clojure being a lisp and being at the
current development stage is not for everyone, but after I probed why
people gave up with it I saw the barriers to entry were largely
superficial and can be
How about:
What's the recommended way of getting Clojure up and running?
- Download the latest snapshot with SVN
- Create the Clojure.jar file with Ant
- Test by starting up the REPL with java -cp clojure.jar
clojure.lang.Repl
Kev
On Dec 18, 9:24 am, lpetit laurent.pe...@gmail.com wrote:
On Wed, Dec 17, 2008 at 6:15 PM, rzeze...@gmail.com rzeze...@gmail.com wrote:
Neat challenge on stackoverflow:
http://stackoverflow.com/questions/372668/code-golf-how-do-i-write-the-shortest-character-mapping-program
I added an implementation in Clojure. One that I'm sure could be
greatly
On Dec 17, 2008, at 8:09 PM, Chouser wrote:
But I can't deny that golfing is fun!
Yes it is!
(defn enc[s e](apply str(map(into{}(for[[o _ n](partition 3 4 e)][o
n]))s)))
Nice job as usual, Chouser!
Here's my stroke--now shown to have landed well into the rough:
(defn enc[p t](let[a
On Dec 17, 8:09 pm, Chouser chou...@gmail.com wrote:
I don't think I agree with the premise of the question, that golf
answers help anyone learn about other languages.
But I can't deny that golfing is fun!
(defn enc[s e](apply str(map(into{}(for[[o _ n](partition 3 4 e)][o n]))s)))
I
Good post! I have been going through the same problems myself. It
looks like enclojure is going to have a Netbeans 6.5 release very soon
(still alpha though). I've also tried to figure out the best way to
learn Clojure. After flailing about a bit, last night I printed out
all the documents on
78? I count 72 after you take out all the superfluous spaces. But I
agree that it says nothing significant about the language. It's a fun
optimization puzzle, though, and can help understand whether the
built-in library of functions is fairly rich.
On Wed, Dec 17, 2008 at 9:53 PM, Mark Engelberg
mark.engelb...@gmail.com wrote:
This shaves 14 characters off of Chouser's solution:
(defn enc[s e](apply str(map(apply hash-map(take-nth 2 e))s)))
Very nice!
--Chouser
--~--~-~--~~~---~--~~
You received this
`{0~@(cons 0 (take-nth 2 %2))}
o_O I tried the `...@v} splice in but never imagined doing that!
nice :)
On the subject of splice in, am I alone in thinking
(str ~...@v) is more readable than (apply str v)?
Of course the former doesn't work as there is no preceding syntax-
quote, but bear
66 matches
Mail list logo