On Feb 20, 6:07 am, Jack Fang wrote:
> Suppose the transfer-money and print-info are run in different
> thread. With the current Clojure STM, is it possible that print-info
> prints the old source-account information and modified dest-account
> information?
Yes.
> Do I need to add a dosync
What would the post-patch result be of that operation?
On Feb 20, 10:25 am, Stuart Halloway
wrote:
> Current results vary based on arg order:
>
> (def xes (iterate #(str % "x") "x"))
> => #'user/xes
>
> ; infinite first ok
> (= xes ["x" "xx"])
> => false
>
> ; finite first boom
> (= ["x" "xx"] xe
On Sat, 20 Feb 2010 17:27:34 -0800 (PST)
"sailormoo...@gmail.com" wrote:
> Hi :
>
> Say, I have a (def *a (ref {:b [{:c 5}]})) .
> I want to add 1 to the :c inside, how would I write?
> (Note: the value 5 is in (:b 0 :c), while 0 is the array index)
>
> (dosync (alter *a __ )) ; ple
Hi :
Say, I have a (def *a (ref {:b [{:c 5}]})) .
I want to add 1 to the :c inside, how would I write?
(Note: the value 5 is in (:b 0 :c), while 0 is the array index)
(dosync (alter *a __ )) ; please help me fill the blank.
Someone mention I can use the zipper library or the walker
Hi,
I am a web developer and would like to write a small Desktop UI
application in Clojure for the popular Simplenote app.
http://simplenoteapp.com/
I was wondering what UI framework I should use. Anyone out there care
to suggest one that works best with Clojure?
--
You received this message beca
On Feb 18, 6:45 pm, Brian Wolf wrote:
> I use it all the time. And its a gentle introduction to emacs
Ok. So Clojure box installs the clojures on windows?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure
On Feb 18, 11:32 pm, Sean Devlin wrote:
> Do you need to do a lot of Java work as well? If so, take a look at
> Enclojure (Netbeans) or Counter Clockwise (Eclipse).
>
No. I just want to install Clojure and start with some tutorials. I
was wondering about the installation process of clojure on win
Hi,all
I am new to clojure. Now I hava a problem about read
transcation.
Suppose now I write some code about bank transfer. So this is
the source-account and destination-account
//The code
(def source-account (ref 1000))
(def dest-account (ref 0))
And I have a function to do the
Brian Wolf wrote:
Is there something like a (stop-server) I don't see anything here
Are you just looking for compojure/stop?
$ cat hello.clj
(ns hello)
(use 'compojure)
(defroutes rts
(GET "/"
(html [:h1 "Hello World"]))
(ANY "*"
(page-not-found)))
(defserver srv {:port 8080} (
On Sat, Feb 20, 2010 at 3:59 PM, Joop Kiefte wrote:
> I read this part...
>
> http://www.reddit.com/r/programming/comments/b3sb1/golisp_a_lisp_interpreter_in_go/
>
> and thought, would someone be able to do that for clojure? (the
> Clojure in Clojure stuff might make this easier :))
>
> Is this a
I read this part...
http://www.reddit.com/r/programming/comments/b3sb1/golisp_a_lisp_interpreter_in_go/
and thought, would someone be able to do that for clojure? (the
Clojure in Clojure stuff might make this easier :))
Is this a weird idea?
I like a lot of ideas in go, and it's speed, but Cloj
> >When you perform the installation, you will see warnings related to the
> >byte-compilation of the packages. This is normal; the packages will work
> >just fine even if there are problems compiling it upon installation
>
> Since elisp can work in either compiled or interpreted mode,
> compila
On Sat, Feb 20, 2010 at 9:41 AM, Paul Tarvydas
wrote:
> I tried to install clojure today using these instructions
>
> http://github.com/technomancy/swank-clojure
>
> (after first wasting a couple of hours trying to follow these instructions
> linked to by clojure.org
> http://en.wikibooks.org/wi
Current results vary based on arg order:
(def xes (iterate #(str % "x") "x"))
=> #'user/xes
; infinite first ok
(= xes ["x" "xx"])
=> false
; finite first boom
(= ["x" "xx"] xes)
=> java.lang.OutOfMemoryError: Java heap space (NO_SOURCE_FILE:0)
It looks as if this particular case could be fixe
On Feb 20, 8:38 am, Johnny Kwan wrote:
> The specific problem I'm trying to solve is to see if two sequences of
> strings "=" each other. If one sequence is shorter, the "=" comparison stops
> at the end of the shorter sequence. So I've been trying to do a simple
> (reduce and (map = seq1 seq
I tried to install clojure today using these instructions
http://github.com/technomancy/swank-clojure
(after first wasting a couple of hours trying to follow these instructions
linked to by clojure.org
http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started#Installing_a_JAR)
and I se
On Feb 20, 8:38 am, Johnny Kwan wrote:
> Hi,
>
> This is a very basic question, but I can't find the answer anywhere. How do
> you take the "and" or "or" of sequence?
Try using every? and some, respectively.
--
You received this message because you are subscribed to the Google
Groups "Clo
And while we are at it:
(defn f-or
[s]
(loop [s (seq s)]
(when s
(if-let [f (first s)]
f
(recur (next s))
On Sat, Feb 20, 2010 at 06:24:53PM +0100, Meikel Brandmeyer wrote:
> (defn fand
> [s]
> (loop [s (seq s)
> l nil]
> (if s
> (when-let
Hi,
here a "short-circuiting" (in sense of realising only needed values from
the passed seq) version of a "function and".
(defn fand
[s]
(let [s (seq s)
l nil]
(if s
(when-let [f (first s)]
(recur (next s) f))
l)))
clojureql.sql=> (fand (map = [:a :b :c] [:a :
OK, I should have just tried passing in 'and at the REPL before posting. Of
course, it works. Is this the idiomatic way? I'm still curious about
short-circuiting.
On Feb 20, 2010, at 11:38 AM, Johnny Kwan wrote:
> Hi,
>
> This is a very basic question, but I can't find the answer anywhere.
Hi,
This is a very basic question, but I can't find the answer anywhere. How do
you take the "and" or "or" of sequence? They are defined as macros and can't
be passed into "apply" or "reduce". Is there some reader macro character to
force it? Also, how does one write it so that it will shor
21 matches
Mail list logo