I'm calling the clojure.lang.Ref and LockingTransaction classes
directly from Java (as suggested by Rich above).
Yes, as Daniel says you to need to segregate side effects from the
code that runs in a transaction. I'm using some lightweight wrappers
around Ref and LockingTransaction to store a que
It's worth considering how *nested* accessors would work in the
context of immutability.
The nested maps approach works really nicely, due in part to functions
like assoc-in:
; From Mark Volkmann's tutorial
(assoc-in person [:employer :address :city] "Clayton")
What would the above update look
Thanks Meikel, this is really useful!
I noticed that the and key bindings used for the
history navigation work fine in MacVim.app, but not from the terminal
in OS X.
So for any VimClojurians on OS X with the same problem, suggested
workarounds:
- use MacVim.app, or
- add alternative mappings i
> Environment: ... contrib r1312 ...
Sorry, that should be clojure-contrib r545 (the latest revision)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@goo
I had the same problem with the Vim Repl, but rebuilding Gorilla fixed
the problem.
Build instructions are in the README, but to paraphase:
$ cd /path/to/gorilla-1.1.1
$ vi local.properties
$ cat local.properties
clojure.jar=/path/to/clojure.jar
clojure-contrib.jar=/path/to/clojure-contrib.jar
$
+1! That'd be really useful.
--~--~-~--~~~---~--~~
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+unsub
For those looking to get this working on Mac OS X, this worked for me:
(Tested using revision 22594, IDEA 8.1, 32-bit Macintel with Java 1.5
and Mac OS X 10.5.6)
- $ mkdir ~/clojure-build-dir
- $ cd ~/clojure-build-dir
- $ mkdir ~/clojure-build-dir/fake-idea-home
- $ cd ~/clojure-build-dir/fake-
+1 for pipe and let-> as above, with the non-seq => (non-seq local)
translation.
--~--~-~--~~~---~--~~
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 unsubs
You might want to check out zippers, which give you the ability to
navigate and 'edit' a tree structure, but using immutable data
structures.
There are some good explanations on this thread:
http://groups.google.com/group/clojure/browse_thread/thread/d8871da625420b71/1bce7c6d9def2031
--~--~--
"Plus a macro makes for shorter syntax, which is part of its purpose."
Yeah the shorter syntax becomes even more apparent when you're piping/
threading through one-arg functions where it also saves on
parenthesis, as the "->" and "pipe" macros expand to a list if
necessary.
E.g. this code in a c
The pipe macro is definitely not a new idea btw. It's taken from a
thread posted on another lisp group.
Someone posted a silly inflammatory attack on lisp, contrasting unix:
"cat a b c | grep xyz | sort | uniq"
to how they'd imagine it in lisp:
"(uniq (sort (grep xyz (cat a b c"
A poster c
Hi,
I want to suggest a "pipe" macro for dealing with collection streams,
as a one-line variation on the built in "->" macro.
Instead of writing a nested stream like this:
; "Take the first 3 elements of the odd numbers in the range 1 to
20"
(take 3 (filter odd? (range 1 20)))
you can write
12 matches
Mail list logo