Hi, all.
I am reading Clojure in Action.
In the scope section of Chapter3, there are examples like this:
defn twice [x]
(println original function)
(* 2 x))
(defn call-twice [y]
(twice y))
(defn with-log [function-to-call log-statement]
(fn [ args]
Could you please recommend a book that's more up-to-date?
On Wednesday, October 31, 2012 11:26:48 AM UTC+8, Sean Corfield wrote:
Yes, it's very unfortunate that Manning released Clojure in Action
without a final pass to make it Clojure 1.3 compatible. I talked to
them about it when they
to
annotate that it is a dynamic var, like so:
(defn ^:dynamic twice [x]
(println original function)
(* 2 x))
With that change, it works in Clojure 1.3 and later.
Andy
On Oct 30, 2012, at 5:42 PM, Satoru Logic wrote:
Hi, all.
I am reading Clojure in Action.
In the scope section
Thanks
On Wednesday, October 31, 2012 12:41:24 PM UTC+8, Sean Corfield wrote:
On Tue, Oct 30, 2012 at 8:38 PM, Satoru Logic
sator...@gmail.comjavascript:
wrote:
Could you please recommend a book that's more up-to-date?
Clojure Programming http://www.clojurebook.com/ would be my first
Hi, all.
Every time I type `*lein repl*`, several line of log get printed out:
Could not find artifact org.clojure:clojure:pom:1.+ in central
(http://repo1.maven.org/maven2)
Could not find artifact org.clojure:clojure:pom:1.+ in clojars
(https://clojars.org/repo/)
Could not find artifact
+1 schrieb Satoru Logic:
Hi, all.
Every time I type `*lein repl*`, several line of log get printed out:
Could not find artifact org.clojure:clojure:pom:1.+ in central (
http://repo1.maven.org/maven2)
Could not find artifact org.clojure:clojure:pom:1.+ in clojars (
https://clojars.org/repo
On Friday, November 2, 2012 4:23:01 PM UTC+8, Meikel Brandmeyer (kotarak)
wrote:
Hi,
Am Freitag, 2. November 2012 08:50:09 UTC+1 schrieb Satoru Logic:
My ~/.lein/profiles.clj contains one line only:
{:user {:plugins [[lein-minnow 0.1.4]]}}
Is it the case that this plugin requiring
Hi, all.
I read the following description of `sequence` in the book Clojure
Programming:
* Obtaining the length of a seq carries a cost.
* The contents of sequences may be computed lazily and actually realized
only when the value involved are accessed.
So a sequence is something lazy,
the worst case which is a traversal of the whole
sequences -- plus if the sequence is lazy (and not yet realized) the
traversal will cause its realization.
hth,
Christophe
On Fri, Nov 2, 2012 at 1:34 PM, Satoru Logic sator...@gmail.comjavascript:
wrote:
Hi, all.
I read the following
Hi, all.
I am trying to install Noir following instructions
on http://www.webnoir.org/.
With the latest lein I installed, `lein plugin install lein-noir 1.2.1`
simply won't work.
So I add a line of requirement into `~/.lein/profiles.clj`:
[lein-noir 1.2.1]
Then I follow the Noir
On Saturday, November 3, 2012 12:07:02 PM UTC+8, Sean Corfield wrote:
On Fri, Nov 2, 2012 at 8:15 PM, Satoru Logic
sator...@gmail.comjavascript:
wrote:
So I add a line of requirement into `~/.lein/profiles.clj`:
[lein-noir 1.2.1]
You should not need that.
Thanks.
I
Hi, all.
I am following an example demonstrating that `transient` can help optimize
mass updates to data structures:
First, a function is defined, which doesn't use transient collection:
(defn naive-into
[coll source]
(reduce conj coll source))
This is supposed to run slower than the
I restart the repl and run the two versions, still `into` is slower:
user= (time (do (into #{} (range 1e6)) nil))
Elapsed time: 4913.818 msecs
nil
user= (time (do (naive-into #{} (range 1e6)) nil))
Elapsed time: 5599.32 msecs
nil
user=
user= (time (do (naive-into #{} (range 1e6)) nil))
Hi, I'm using Clojure1.4.0, Java1.6 on MacOS.
user= (clojure-version)
1.4.0
~ satoru$ java -version
java version 1.6.0_35
Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811)
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
On Sunday, November 4, 2012
can't use `doc` on it.
Cheers,
Marko
On Sunday, November 4, 2012 8:36:19 AM UTC+1, Satoru Logic wrote:
Hi, I'm using Clojure1.4.0, Java1.6 on MacOS.
user= (clojure-version)
1.4.0
~ satoru$ java -version
java version 1.6.0_35
Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428
BTW, I can't even reproduce the examples here:
http://clojure.org/Transients#toc5
On Sunday, November 4, 2012 6:49:50 PM UTC+8, Marko Kocić wrote:
On Sunday, November 4, 2012 11:41:23 AM UTC+1, Satoru Logic wrote:
On Sunday, November 4, 2012 6:20:37 PM UTC+8, Marko Kocić wrote:
I get
time: 399.972445 msecs
Clojure 1.4.0
java version 1.6.0_26
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
Cheers.
Marek.
On Sunday, November 4, 2012 3:41:14 AM UTC+1, Satoru Logic wrote:
Hi, all.
I am following
Hi, all.
When I try to run the following `macro` in `lein repl` (with clojure1.3 and
clojure1.4):
(defmacro ^{:private true} defoperator
[operator] (def ^{:const true} ~(symbol (str operator)) ~(str
operator)))
But a `CompilerException` is raised:
CompilerException
, Satoru Logic wrote:
Hi, all.
When I try to run the following `macro` in `lein repl` (with clojure1.3
and clojure1.4):
(defmacro ^{:private true} defoperator
[operator] (def ^{:const true} ~(symbol (str operator)) ~(str
operator)))
But a `CompilerException` is raised
Hi, all.
I notice that in every directory that I have runed `lein repl`, a file
named `repl-port`is generated.
I wonder if it's possible to set things up so that this file is not
generated, or maybe I can set up some directory for these files.
--
You received this message because you are
Cool! Thanks.
On Saturday, November 10, 2012 10:20:14 AM UTC+8, Phil Hagelberg wrote:
This is a bug that's been fixed on master. A new release is just around
the corner.
-Phil
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this
HI, all.
I read in a `leiningen` tutorial that we can use `clojuredocs` to get docs
and examples.
But when I try, it failed with an `EOFException`:
user= (clojuredocs pprint)
EOFException Unexpected end of ZLIB input stream
java.util.zip.InflaterInputStream.fill
On Saturday, November 10, 2012 1:34:20 PM UTC+8, Sean Corfield wrote:
On Fri, Nov 9, 2012 at 8:50 PM, Satoru Logic
sator...@gmail.comjavascript:
wrote:
But when I try, it failed with an `EOFException`:
user= (clojuredocs pprint)
EOFException Unexpected end of ZLIB input
Hi, all.
I am playing with the `ring` library in `repl`.
After using `run-jetty` to start a server,
I typed `ctrl+c` to send the SIGINT signal,
this ended the `run-jetty` function, but it didn't kill the server:
user= (require '[ring.adapter.jetty :refer [run-jetty]])
user= (require
On Wednesday, November 14, 2012 12:38:55 PM UTC+8, Sean Corfield wrote:
On Tue, Nov 13, 2012 at 8:33 PM, Satoru Logic
sator...@gmail.comjavascript:
wrote:
BindException Address already in use sun.nio.ch.Net.bind (Net.java:-2)
user= 2012-11-14 11:44:21.370
wrote:
On Tue, Nov 13, 2012 at 8:33 PM, Satoru Logic
sator...@gmail.comjavascript:
wrote:
BindException Address already in use sun.nio.ch.Net.bind (Net.java:-2)
user= 2012-11-14 11:44:21.370:WARN:oejuc.AbstractLifeCycle:FAILED
SelectChannelConnector@0.0.0.0:3000
-server command in terminal, be it `python
manage.py runserver` or `lein run`, I would use ctrl-C to stop the process.
`run-jetty` is just like other functions, it returns the server object.
On Wed, Nov 14, 2012 at 4:33 AM, Satoru Logic sator...@gmail.comjavascript:
wrote:
Hi, all.
I am
HI, all.
I'm following the instructions
on http://clojurescriptone.com/getting-started.html,
and run `lein bootstrap` in the `one` directory, but `lein` complains that
*'bootstrap'
is not a task*.
How can I install this `bootstrap` task?
--
You received this message because you are
Got it.
Thanks.
On Thursday, November 22, 2012 3:12:53 PM UTC+8, Sean Corfield wrote:
ClojureScript One still requires Leiningen 1.x - it hasn't been updated to
Leiningen 2.x yet.
On Wed, Nov 21, 2012 at 10:06 PM, Satoru Logic
sator...@gmail.comjavascript:
wrote:
HI, all.
I'm
29 matches
Mail list logo