I have found what appears to be a bug in LockingTransaction, albeit one
that probably wouldn't occur often. But, I suppose that's a given for a
previously undiscovered problem in oft-used code that hasn't changed for
some while. :)
I'm using the Clojure 1.4 library strictly from Java code and
Alex Fowler alex.murataev at gmail.com writes:
As for your question, the answer is: absolutely suitable. From my personal
experience, http://www.luminusweb.net/ gives a good start. People say that
Pedestal is gonna be great too, but I did not use it yet.понедельник, 9
сентября 2013 г.,
Something that I've always wondered - why is ClojureDocs not updated? I've
never tried to contribute to it - is it particularly difficult? Is it
impossible for users to add support for new Clojure versions? If so, who
runs it? Could it be turned over to the community?
On 11 September 2013 17:55,
jvisualvm has an innocuous button called Dump Memory or something.
You'd expect it to write out a core dump or something, but actually it
opens up a GUI which lets you interactively explore all of the objects on
the heap. It is pretty amazing. Much better than jhat, which I've found
to be really
I've just picked up on this thread but I've spent quite a bit of time
barking up this tree.
There are three repos that power the old version of the site
https://github.com/zk/clojuredocs - the Rails 2 frontend
https://github.com/zk/clojuredocs-analyzer - the clojure analyzer that
extracts data
Hello.
I'm trying catch exception from cheshire.core/decode (or parse-string). But
it didn't work
user= (require ['cheshire.core :as 'json])
user= (try (json/decode [{\id\:ty\:1}]) (catch Throwable _ (println
I catched exception)))
JsonParseException Unrecognized token 'ty': was expecting
at
Is json/decode returning a lazy seq? If so, you're constructing it inside
the try and then realizing it outside the try, and the exception may be
coming from the realization step.
On Wed, Sep 11, 2013 at 4:56 AM, Алексей Александров
alexeyaleksand...@gmail.com wrote:
Hello.
I'm trying catch
On Wed, Sep 11, 2013 at 6:00 AM, Brian Craft craft.br...@gmail.com wrote:
(defmacro transaction
[ body]
`(transaction* (fn [] ~@body)))
I'm not sure how to avoid that. The anonymous function created here
doesn't take parameters.
The fix for this is:
(defmacro transaction
[ body]
Hi,
I really badly need this patch in one of my project. But rather than
patching clojure's genclass.clj I implemented external utility generating
the class with varargs using your patch.
I'd like to publish it as an open-source micro utility. I know that you'd
just added additional meta
Yes, json/decode return clojure.lang.LazySeq.
I added (doall ) to force calculation.
Thank you.
2013/9/11 Cedric Greevey cgree...@gmail.com
Is json/decode returning a lazy seq? If so, you're constructing it inside
the try and then realizing it outside the try, and the exception may be
Having clojuredocs updated would be a fantastic thing. As a website,
it's really nicely done, and very usable. But, it will become
increasingly irrelevant if it remains out of date.
Even better would be to have clojuredocs support additional libraries,
perhaps with some selector so that the
+1
On Sep 11, 2013, at 10:42 AM, xavriley wrote:
I've just picked up on this thread but I've spent quite a bit of time barking
up this tree.
There are three repos that power the old version of the site
https://github.com/zk/clojuredocs - the Rails 2 frontend
I have not gone to look at the code but the description certainly sounds
like a recipe for a bug.
If you can a) create a reproducible case and b) check that it happens on
1.5 as well we would greatly appreciate a ticket:
Create a jira account
-
Hey all,
Lee Hinman (dakrone) is the current primary maintainer. There was a good
discussion about clojuredocs last year at the conj unsessions and I think
the primary driving note that came out of that was that it would be useful
to have the concept of version in the database (that is,
On Wed, Sep 11, 2013 at 2:47 AM, Brandon Ibach brandon.l.ib...@gmail.comwrote:
I have found what appears to be a bug in LockingTransaction, albeit one
that probably wouldn't occur often. But, I suppose that's a given for a
previously undiscovered problem in oft-used code that hasn't changed
I have gone the dynamic var before, played well with ring handlers.
Why ?
Because I wanted to ensure consistency between reads to the
configuration map for the duration of the ring handler call.
So just having the configuration and read the root value at different
times would not suffice.
I
I like the dynamic var approach. It even allows to enforce that submodules
won't see some keys (using select-keys or dissoc). It tests nicely too.
Christophe
--
On Clojure http://clj-me.cgrand.net/
Clojure Programming http://clojurebook.com
Training, Consulting Contracting
2013/9/11 Alex Miller a...@puredanger.com
I talked to him recently about the state of clojuredocs. I know he's been
pretty busy lately with a new job. I believe he thinks the service API and
doc extractor are in pretty good shape. The major areas that need work are
figuring out how to store
On Wednesday, September 11, 2013 1:55:45 AM UTC-4, Steven Degutis wrote:
One of my assumptions was that people don't use wikis simply because
it's Yet Another Account to sign up for, {snip}
I don't think that's it. Public wikis can be alright if assiduously
maintained... Ok, I'll stop
As far as possible, I think it is best to try and minimise mutable global
state (like mutable configuration data) and implicit context (like dynamic
vars). My preferred approach is to pass the configuration data (as a value)
to a higher order function that constructs the configurable object /
ugh. Can't find documentation for this. What does it do?
On Wednesday, September 11, 2013 2:22:56 AM UTC-7, Christophe Grand wrote:
On Wed, Sep 11, 2013 at 6:00 AM, Brian Craft craft...@gmail.comjavascript:
wrote:
(defmacro transaction
[ body]
`(transaction* (fn [] ~@body)))
I'm
^:once on fn* (not fn, the fn macro doesn't propagate metadata) instructs
the commielr to clear closed-overs ASAP. It follows that you can't call
such a function twice because it forgets its closed-overs.
On Wed, Sep 11, 2013 at 4:36 PM, Brian Craft craft.br...@gmail.com wrote:
ugh. Can't find
I think that Clojure should switch to a better license with similar spirit like
Apache 2.0, BSD, or MIT.
While the EPL doesn't have the evil copyleft requirement of GPL, and
therefore allows and encourages commercial uses of the code, it has a
requirement that makes it incompatible with the
AFAICT it has been chosen carefully, but you are of course free to
think otherwise
2013/9/11 Kalinni Gorzkis musicdenotat...@gmail.com:
I think that Clojure should switch to a better license with similar spirit
like Apache 2.0, BSD, or MIT.
While the EPL doesn't have the evil copyleft
Hi,
without having a clear solution and without pinpointing to the exact issue,
I remember seeing this before. Also in unit tests from Java. The person
back then came up with the following solution.
He created a class from Clojure.
(ns your.app.CljApi
(:gen-class))
(defn -init [])
And
It may have been chosen uncarefully. Other permissive licenses better
fulfill Rich Hickey's spirit.
https://groups.google.com/forum/#!topic/clojure/TuojEIsu1G4
Rich Hickey choose the license himself. While you may disagree whether he
made the right choice, it is highly unlikely that Rich did
We load configuration data once from zookeeper and conceal it in a name space.
Changing the context is quite simple, we reload resources in this name space
using a minimal list of properties which says where the configuration data
should be
pulled from in zookeeper.
This is doable from the
2013/9/11 Softaddicts lprefonta...@softaddicts.ca:
We load configuration data once from zookeeper and conceal it in a name space.
Changing the context is quite simple, we reload resources in this name space
using a minimal list of properties which says where the configuration data
should be
Hi
As a clojure noob I constantly find myself browsing through various API
docs to see what's available in a library. While this data is available in
a REPL it's not easy to look for it if you don't know what you're looking
for. I first saw a namespace browser concept in Relevance's
Euh... our local config would require loading a top level map with more than
twenty keys and a dozen levels deep of maps.
I am not sure I would like to carry a local copy in all workers.
Freezing the app somehow when a config change occurs is mandatory.
Each node in the cluster runs at least a
Here are some thoughts about versioning and examples that were driving
my github-wiki idea:
- Incompatibilities between Clojure versions are getting fewer and smaller.
- This suggests that jumping from 1.4 to 1.6 will probably be a lot
smaller than a jump from 1.2 to 1.3.
- This implies that
The GPL incompatibility comes from the choice of law clauses I think.
It is worth mentioning though, that you can combine GPL code and
Clojure, since GPL has an exception for a standard interface of a
programming language. You can write GPL code in most languages, and this
does not require that
Hi everyone,
I'm interested in jumping into this project. Lee and others have already
written some great tools and an API for importing and searching
documents--it's mostly a matter of building a web app that uses them. You
can find them in the Clojuredocs group https://github.com/clojuredocs
(started lein with LEIN_JVM_OPTS=-Xmx10M lein repl, to make it easy to see
a full heap)
On Wednesday, September 11, 2013 8:59:50 AM UTC-7, Brian Craft wrote:
This appears to have no effect on the problem. I tested with
jdbc/transaction, and with Sean's simple example:
user= (defn f [g]
I have nothing to add for the problem itself (sorry) but am very interested
in the *process* of answering this question. Presuming there are things to
document here, I would love to see someone create a wiki page (on
http://dev.clojure.org/display/community/Home) or a clojure-doc note or
some
There are no plans to change the license.
On Wednesday, September 11, 2013 8:41:04 AM UTC-5, Kalinni Gorzkis wrote:
I think that Clojure should switch to a better license with similar spirit
like Apache 2.0, BSD, or MIT.
While the EPL doesn't have the evil copyleft requirement of GPL, and
This appears to have no effect on the problem. I tested with
jdbc/transaction, and with Sean's simple example:
user= (defn f [g] (g))
#'user/f
user= (defn t1 [n c] (f (fn [] (dorun (map identity c)
#'user/t1
user= (t1 0 (range 100))
java.lang.OutOfMemoryError: Java heap space
On Wednesday, September 11, 2013 5:29:39 AM UTC-5, Алексей Александров
wrote:
Yes, json/decode return clojure.lang.LazySeq.
I added (doall ) to force calculation.
This bit me on a project yesterday. I also added a doall, but I haven't
had time to investigate whether any of the interior
I did start with visualvm. I posted a screenshot in an earlier thread.
However I'm unable to make sense of its output. jhat pointed straight to
the closure with the reference. visualvm gave me a thousand cascading
widgets to expand with names that were meaningless to me, none of which
pointed
Correct, I forgot to paste that part. ;)
On Wednesday, September 11, 2013 10:57:09 AM UTC-7, Sean Corfield wrote:
Just to confirm, (t2 0 (range 100)) -- using doseq instead of
dorun -- does NOT run out of memory, correct?
On Wed, Sep 11, 2013 at 8:59 AM, Brian Craft
Looks nice!
Alan
On Fri, Sep 6, 2013 at 12:29 PM, David Nolen dnolen.li...@gmail.com wrote:
SWEET!
On Fri, Sep 6, 2013 at 3:26 PM, Joel Holdbrooks cjholdbro...@gmail.comwrote:
Hi everyone,
I put together a small library for wrapping the JavaScript console API
available here:
Perhaps a more productive way to approach this issue would have been
to ask if the group could point you to a discussion of why Clojure is
under the EPL instead of starting from a point of criticism, and
challenging the care with which the license was selected?
Searching the archives would have
Attaching a screenshot. Is this reference chain useful somehow? I can
recognize the contents of the string from the input file. The input file is
4G, and apparently lines from line-seq are lingering, so I'm still blowing
the heap.
On Wednesday, September 11, 2013 11:20:18 AM UTC-7, Brian Craft
Just to confirm, (t2 0 (range 100)) -- using doseq instead of
dorun -- does NOT run out of memory, correct?
On Wed, Sep 11, 2013 at 8:59 AM, Brian Craft craft.br...@gmail.com wrote:
This appears to have no effect on the problem. I tested with
jdbc/transaction, and with Sean's simple
Considering that Rich himself chose the license more than 5 years ago, as you
can see on github looking at files under the 1.0 tag (not counting pre 1.0
releases)
and that you did not get him to lay down on a couch nearby while taking notes,
I think that your assumptions about his spirit are
I don't get the same results:
$ LEIN_JVM_OPTS=-Xmx20M lein repl
nREPL server started on port 61221 on host 127.0.0.1
REPL-y 0.2.1
Clojure 1.5.1
Docs: (doc function-name-here)
(find-doc part-of-name-here)
Source: (source function-name-here)
Javadoc: (javadoc
Great stuff!
Unfortunately, README doesn't say anything about license and contributing,
so I've sent a pull request to check it :) If you accept contributing
tests/examples, I would send a lot more.
вторник, 10 сентября 2013 г., 5:39:46 UTC+4 пользователь Alex Engelberg
написал:
I agree with Corfield and approaching things that seem wrong from a spirit
of curiosity, rather than defaulting to criticism is a better way to
improve understanding. You miss wonderful opportunities to learn when you
approach things like that.
On Wednesday, September 11, 2013 10:54:36 AM
No. I think you missed the part that I want to be able to sort either
ascending or descending on each key:
(array-map :name 1 :age -1)
On Saturday, 31 August 2013 15:04:44 UTC+2, Leonardo Borges wrote:
Would this help?
(sort-by (juxt :key1 :key2) your-list-of-maps)
On 31/08/2013 7:57
Interesting. You used recursion, where I tried to see it as a sequence. Any
other differences?
My solution was:
(defn compare-many [comps]
(fn [xs ys]
(if-let [result (first (drop-while zero? (map (fn [f x y] (. f (compare
x y))) comps xs ys)))]
result
0)))
(- [{:name zack
Hi, I'm (once again) despairing over some issues trying to integrate
one macro with another. Both are supposed to be used together to
generate a bunch of deftypes. Firstly, here's the one working
correctly (stripped out error checking for simplicity):
(defmacro swizzle*
Takes a class name,
No - I honestly missed that version of yours the first time. I like
that solution, and prefer it to the sort-by-map final solution.
Probably just a style pref though.
On Wed, Sep 11, 2013 at 6:07 PM, ulsa ulrik.sandb...@gmail.com wrote:
Interesting. You used recursion, where I tried to see it as
1878 went out today, the only change was fixing a bug introduced by 1877
that caused spurious warnings when incrementally compiling.
On Mon, Sep 9, 2013 at 9:50 PM, Brandon Bloom brandon.d.bl...@gmail.comwrote:
a (very) temporary workaround is to use the old code
Why not just switch (k
Hi Karsten,
It looks to me like you're trying to define some small fixed-size numeric
double vectors and related operations? For graphics, games or physical
modelling perhaps?
Perhaps you've already evaluated all the options and decided that a bunch
of custom deftypes is the best way go, but
Thanks for sharing the various options you guys are using, much appreciated.
I'm thinking I'm going to go with a function returning a map of configs
(potentially memoized) with the option to overwrite certain keys from a
separate map for testing etc. Should be good enough for my use cases.
On
At Prismatic, we do this using Graph:
https://github.com/Prismatic/plumbing
I really try to avoid global vars, but passing through the seven parameters
or resources you need through four layers of intermediate functions is also
a hassle. Graph makes it easier to define your service in a
56 matches
Mail list logo