'uberwar' is not a task. See 'lein help'.
Did you mean this?
uberjar
Are you using this https://github.com/alienscience/leiningen-war maybe?
On Tue, Jan 22, 2013 at 11:25 PM, larry google groups
lawrencecloj...@gmail.com wrote:
I know very little about the JVM eco-system. I have
now I'm confused, which one is the right memoize to use?
and is that true about dosync? the nesting property of dosync: a nested
transaction merges with the surrounding one. or did it change in the past
almost 3 years since?
On Wed, Jan 23, 2013 at 12:08 PM, David Powell
Hi.
There are a bunch of calls to Util.runtimeException(msgHere) which can be
replaced with Util.runtimeException(msgHere, e); where e is the exception
just caught (aka the cause), for example here:
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L4570
and here's
Here are some more: (which I'm getting from my old gist from here
https://gist.github.com/3895312 after I recheck those and tell you only the
ones relevant to this subject)
1. This one has to do with namespace expected format for :import
looks like you denied outgoing for java.exe in your firewall
the java.exe that's in your path(or in JAVA_HOME if set)
in my case:
ie. cmd.exe
C:\Users\userjava -version
java version 1.7.0_09
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02,
I wonder how the double posting happens (I've seen others do it), and I've
sent that from gmail. (I'll assume something causes the send email to
happen twice)
On Fri, Jan 25, 2013 at 6:08 AM, AtKaaZ atk...@gmail.com wrote:
looks like you denied outgoing for java.exe in your firewall
I've also seen a case of that(context classloader changing so that calling
clojure will work) here [1], if anyone's into Minecraft bukkit server tests
this would be somewhat easy to understand if you can test it:
[1] -
Hi. Check this out: https://github.com/CmdrDats/clj-minecraft
On Fri, Jan 25, 2013 at 11:14 PM, Ryan Cole r...@rycole.com wrote:
Hi all, beginner here,
I'm trying to write a Minecraft plugin in Clojure, and use AOT so that the
Minecraft server can load it right up. I've got this much going,
so, wait, are you having any trouble with eclipse+counterclockwise ? it
seems to be pretty straight forward, considering that I actually failed to
use emacs myself (although I did get emacs-live working, i prefer
eclipse+ccw for now)
On Sat, Jan 26, 2013 at 12:24 PM, sampson.jo...@googlemail.com
although I'm sure everybody's seen this, I believe it is relevant here,
this clojureconj by Chris Granger
https://www.youtube.com/watch?v=V1Eu9vZaDYw
maybe only applies to clojurescript(that is, being slow in this case)
the important stuff is at from 13:59
On Mon, Jan 28, 2013 at 1:53 AM, Mark
= (are [ x y ] (= x y) ((fn[x] x) 1) 1)
StackOverflowError clojure.lang.PersistentArrayMap.containsKey
(PersistentArrayMap.java:158)
= (dorun (map #(println (.toString %)) (take-last 100 (.getStackTrace *e
clojure.lang.RestFn.invoke(RestFn.java:408)
maybe he needs to :reload-all for each use in foo.care? ie.
(ns foo.core
(:use [runtime.q :as q] :reload-all)
(:use [datomic.api :only (q db) :as d])
(:use [runtime.util :as u] :reload-all)
)
so that it will also reload whatever foo.core is using, in this example
it's only going to reload
well this should explain it:
= (are [ x y ] (= x y) ((fn[x] x) 1) 1)
StackOverflowError clojure.core/partial/fn--4209 (core.clj:2396)
= (are [ x y ] (= x y) ((fn[a] a) 1) 1)
true
On Mon, Jan 28, 2013 at 4:37 PM, John Lawrence Aspden
aspd...@googlemail.com wrote:
Hi, am I doing something
sorry, James Xu already said that (didn't want to steal any credit, but
I've just realized that he said the same thing)
On Mon, Jan 28, 2013 at 5:25 PM, AtKaaZ atk...@gmail.com wrote:
well this should explain it:
= (are [ x y ] (= x y) ((fn[x] x) 1) 1)
StackOverflowError clojure.core
try using this vm arg:
-XX:-UseCompressedOops
more info here:
https://groups.google.com/d/msg/clojure/MIKccMX9gvk/gZYA_24d0BwJ
On Mon, Jan 28, 2013 at 6:59 PM, larry google groups
lawrencecloj...@gmail.com wrote:
I have a small clojure app (maybe 700 lines of code). I start it at the
and
reducers to traverse tree of moves deeper than 6...It doesn't happen always
but most of the times! If i don't use ^:const it seems to not happen.
Notice that this is irrelevant to disabling CompressedOops...
LIke larry I'm running the latest jdk..
Jim
On 28/01/13 18:02, AtKaaZ wrote
try my code with some alpha
clojure 1.5 ( I remember having no problems whatsoever) and I'l egt back to
you probably tomorrow morning...This seems really serious and since someone
else is encountering it there is no reason to hold back investigating...
Jim
On 28/01/13 18:29, AtKaaZ wrote
. I have
been using these options:
:jvm-opts [-Xmx1000m]
I will switch to:
:jvm-opts [-Xmx1000m -XX:-UseCompressedOops]
W dniu poniedziałek, 28 stycznia 2013 13:02:48 UTC-5 użytkownik AtKaaZ
napisał:
try using this vm arg:
-XX:-UseCompressedOops
more info here: https
I would use (map :keyword) myself, for that exact reason(because I'm into
fail-fast), but only when I know the map is expected to never be nil at
this point(but likely I'll do the program in such a way that this point
won't be reached with a nil map in the first place), so that if it happens
that
(read only what's in *bold*, to save your time, read everything if you're a
consistency maniac xD)
*While I have a knack*(and enjoy) *for finding bugs*(and I take them
personally[as ideas, so I don't hate the person who introduced it(or at
least I'd like to believe that I don't, but let's be
) it will not work.
---
Joseph Smith
j...@uwcreations.com
@solussd
On Jan 28, 2013, at 8:31 PM, AtKaaZ atk...@gmail.com wrote:
I would use (map :keyword) myself, for that exact reason(because I'm into
fail-fast), but only when I know the map is expected to never be nil at
this point(but likely
On Tue, Jan 29, 2013 at 8:03 AM, larry google groups
lawrencecloj...@gmail.com wrote:
Maybe someone can tell me where I went wrong on this one.
I have an app. Written with Clojure 1.4.
At first the app was very small, so I put all the code into core.clj.
When I got to about 500 or 600
On Tue, Jan 29, 2013 at 8:11 AM, James Xu xumingming64398...@gmail.comwrote:
Don’t know the exact reason for your issue, but for your question:
How can a
class be present at compile time but not at runtime?
I find this to be relevant:
It might be something like this(pasting here):
The problem is the hyphen in the namespace.
From the *Joy of Clojure*
HYPHENS/UNDERSCORES If you decide to name your namespaces with hyphens, à
la my-cool-lib, then the corresponding source file must be named with
underscores in place of the
,
but only errs after a while, in which case that would be weird.
On Tue, Jan 29, 2013 at 8:38 AM, AtKaaZ atk...@gmail.com wrote:
It might be something like this(pasting here):
The problem is the hyphen in the namespace.
From the *Joy of Clojure*
HYPHENS/UNDERSCORES If you decide to name
just guessing here, but is it maybe that one of the deps of your project
was (also?) updated and it's using that clojure ? I'm thinking just in case
you have something like version x.y.z-SNAPSHOT of a dep, if nothing with
SNAPSHOT then it's probably not the case. I couldn't reproduce this with a
if you put that on youtube, let me know, currently I cannot see the slides
or they are simply stuck on the first slide and never change (the video
works though)
On Fri, Feb 1, 2013 at 5:31 AM, Alex Miller a...@puredanger.com wrote:
The video of the talk on Graph from Strange Loop just came
, Baishampayan Ghose b.gh...@gmail.comwrote:
Try Firefox. ~BG
On Fri, Feb 1, 2013 at 10:08 AM, AtKaaZ atk...@gmail.com wrote:
if you put that on youtube, let me know, currently I cannot see the
slides
or they are simply stuck on the first slide and never change (the video
works though
amalloy, inspirational as always! thank you
On Fri, Feb 1, 2013 at 11:08 AM, Alan Malloy a...@malloys.org wrote:
(max-key :power mario luigi)
On Thursday, January 31, 2013 6:08:21 PM UTC-8, Leandro Moreira wrote:
Running through this problem I also faced the weird situation, so:
Given
there are some examples here:
http://clojuredocs.org/clojure_core/clojure.core/slurp
http://clojuredocs.org/clojure_core/clojure.java.io/reader
On Fri, Feb 1, 2013 at 1:44 PM, Baishampayan Ghose b.gh...@gmail.comwrote:
clojure.core/slurp
Sent from phone. Please excuse brevity.
On 1 Feb
seems a bit similar to https://github.com/Prismatic/plumbing
On Sat, Feb 2, 2013 at 1:12 AM, Ben Wolfson wolf...@gmail.com wrote:
ReadyForZero is open-sourcing our library for easily gathering data
and computing summary measures in a declarative way:
https://github.com/ReadyForZero/babbage
he's in RC4
= *clojure-version*
{:major 1, :minor 5, :incremental 0, :qualifier RC4}
= (time (dotimes [n 1000] (hash {:x a :y 3})))
Elapsed time: 70.037502 msecs
= (time (dotimes [n 1000] (hash (A. a 3
Elapsed time: 5307.93947 msecs
On Sun, Feb 3, 2013 at 8:22 AM, Leonardo Borges
, Feb 3, 2013 at 8:26 AM, AtKaaZ atk...@gmail.com wrote:
he's in RC4
= *clojure-version*
{:major 1, :minor 5, :incremental 0, :qualifier RC4}
= (time (dotimes [n 1000] (hash {:x a :y 3})))
Elapsed time: 70.037502 msecs
= (time (dotimes [n 1000] (hash (A. a 3
Elapsed time
: 1812.016478 msecs
nil
= (time (dotimes [n 1000] (hash (memoize (A. a 3)
Elapsed time: 1847.244062 msecs
nil
On Sun, Feb 3, 2013 at 8:29 AM, AtKaaZ atk...@gmail.com wrote:
= (def m {:x a :y 3})
#'runtime.q_test/m
= (time (dotimes [n 1000] (hash m)))
Elapsed time: 154.650091 msecs
of anonymous functions, and would be
expected to be more time-consuming.
The other examples you posted are interesting, though.
On Sat, Feb 2, 2013 at 11:31 PM, AtKaaZ atk...@gmail.com wrote:
ok i like this variant:
= (def r (memoize (A. a 3)))
#'runtime.q_test/r
= (time (dotimes [n 1000] (hash
Thank you for this(I'm now looking into dgraph), I am very interested in
such things, though you should look at me like a I'm a newbie in both this
and clojure. Whatever I end up doing will unavoidable use such concepts:
graph, dependencies... I imagine that a properly implemented system like
so,
works for me:
= (*let [^java.io.BufferedReader a
(clojure.java.io/readerc:\\windows\\setupact.log)] (println (. a
readLine)))
*
AudMig: No audio endpoint migration settings found 0x2
nil
= *(let [a (clojure.java.io/reader c:\\windows\\setupact.log)] (println
(. a readLine)))*
Reflection warning,
On Mon, Feb 4, 2013 at 12:13 PM, Paul Stadig p...@stadig.name wrote:
On Sunday, February 3, 2013 9:56:49 PM UTC-5, puzzler wrote:
In these examples, the map/record is freshly created each time through
the loop, so caching should not be a factor.
Good point. So maybe it's not the caching
so, something like this?
= (sorted-map-by (fn [key1 key2] (compare (Integer/parseInt key1)
(Integer/parseInt key2)))
1 A 2 B 11 C 3 D)
{1 A, 2 B, 3 D, 11 C}
On Mon, Feb 4, 2013 at 3:55 PM, Feng Shen shen...@gmail.com wrote:
Hi, 11 2 if string,
11 2 if integer.
Your keys are
in other words:
this:
(let [in (clojure.java.io/reader src)
out (clojure.java.io/writer dest)
becomes this:
(let [^java.io.BufferedReader in (clojure.java.io/reader src)
^java.io.BufferedWriter out (clojure.java.io/writer dest)
and it works for me too. (but I wasted some time
you can release that on LGPL License ?
does that work with the EPL of clojure ? or is it only an issue when lein
uberjar-ed ?
On Tue, Feb 5, 2013 at 5:57 PM, Phillip Lord
phillip.l...@newcastle.ac.ukwrote:
Tawny-OWL is a clojure library which provides a DSL for the construction
of OWL
.
Kanwei
On Monday, February 4, 2013 12:36:51 PM UTC-5, AtKaaZ wrote:
in other words:
this:
(let [in (clojure.java.io/reader src)
out (clojure.java.io/writer dest)
becomes this:
(let [^java.io.BufferedReader in (clojure.java.io/reader src)
^java.io.BufferedWriter out
Thank you.
On Wed, Feb 6, 2013 at 4:52 AM, John Gabriele jmg3...@gmail.com wrote:
On Tuesday, February 5, 2013 12:08:43 PM UTC-5, AtKaaZ wrote:
you can release that on LGPL License ?
does that work with the EPL of clojure ? or is it only an issue when lein
uberjar-ed ?
LGPL just means
without looking, I'm thinking maybe it's like thrown? when using it for
the is macro
(is (thrown? ArithmeticException (/ 1 0)))
where thrown? is not defined anywhere and it only has meaning inside is
( actually it's *(defmethod assert-expr 'thrown? [msg form]* ... )
On Wed, Feb 6, 2013 at 7:02
maybe this one:
https://github.com/frenchy64/typed-clojure/blob/a5944e7c11fa8fe27a86f781feab63a0d218868f/src/typed/parse.clj#L184
On Wed, Feb 6, 2013 at 7:02 AM, James Xu xumingming64398...@gmail.comwrote:
e.g.
(ann test1 (All [x y] [x y - x]))
where is the 'All' defined?
--
Github:
Hi. Thank you.
On Wed, Feb 6, 2013 at 10:50 AM, Christophe Grand christo...@cgrand.netwrote:
Hi
On Mon, Feb 4, 2013 at 2:29 PM, AtKaaZ atk...@gmail.com wrote:
= (class {:x a :y 3})
clojure.lang.Persistent*Array*Map
= (def m {:x a :y 3})
#'runtime.q/m
= (class m
Hello.
https://github.com/Prismatic/plumbing/blob/master/test/plumbing/graph_examples_test.clj#L148
Why do they return in a map instead of maybe a set ? do we ever get {:key
false} ?
Thanks.
On Thu, Feb 7, 2013 at 7:22 PM, Jason Wolfe ja...@w01fe.com wrote:
We've just posted a blog post with
I think it's an illusion from being lazy ?
= (def k (pr-str (vec (for [x (range 5)]
(do (pr x)
x)
01234
#'datest1.ret/k
= k
[0 1 2 3 4]
On Sat, Feb 9, 2013 at 7:30 PM, Conrad drc...@gmail.com wrote:
I tested this in the
actually replacing vec with dorun or doall, would've been a better example
:)
On Sat, Feb 9, 2013 at 7:42 PM, AtKaaZ atk...@gmail.com wrote:
I think it's an illusion from being lazy ?
= (def k (pr-str (vec (for [x (range 5)]
(do (pr x
here's a simpler example:
= (map println '(1 2 3))
(1
2
nil 3
nil nil)
= (dorun (map println '(1 2 3)))
1
2
3
nil
On Sat, Feb 9, 2013 at 7:44 PM, AtKaaZ atk...@gmail.com wrote:
actually replacing vec with dorun or doall, would've been a better example
:)
On Sat, Feb 9, 2013 at 7:42 PM
that suggests this would happen.
Also, it would be technically relatively easy to change this.
On Saturday, February 9, 2013 12:46:08 PM UTC-6, AtKaaZ wrote:
here's a simpler example:
= (map println '(1 2 3))
(1
2
nil 3
nil nil)
= (dorun (map println '(1 2 3)))
1
2
3
nil
On Sat
On Sat, Feb 9, 2013 at 8:22 PM, AtKaaZ atk...@gmail.com wrote:
do you mean that, when the string it outputted like:
= (println k)
(012340 1 2 3 4)
nil
= (prn k)
(012340 1 2 3 4)
nil
the side effects of evaluating k being mixed into the output could affect
you (other than just
On Sat, Feb 9, 2013 at 8:25 PM, AtKaaZ atk...@gmail.com wrote:
On Sat, Feb 9, 2013 at 8:22 PM, AtKaaZ atk...@gmail.com wrote:
do you mean that, when the string it outputted like:
= (println k)
(012340 1 2 3 4)
nil
= (prn k)
(012340 1 2 3 4)
nil
the side effects of evaluating k
\n3nothing\r\n4nothing\r\n0 1 2 3
4) k)
true
This is so bad :)
On Sat, Feb 9, 2013 at 8:26 PM, AtKaaZ atk...@gmail.com wrote:
On Sat, Feb 9, 2013 at 8:25 PM, AtKaaZ atk...@gmail.com wrote:
On Sat, Feb 9, 2013 at 8:22 PM, AtKaaZ atk...@gmail.com wrote:
do you mean that, when the string
Hi Stu. All I see is
beta13http://search.maven.org/#artifactdetails%7Corg.clojure%7Cclojure%7C1.5.0-beta13%7Cjaras
being last (9 feb), and RC6 05-Feb-2013
On Sat, Feb 9, 2013 at 9:13 PM, Stuart Halloway
stuart.hallo...@gmail.comwrote:
Clojure 1.5 RC 14 (fourteen) will be available soon from
-RC14.jar from
sonatype-oss-public
On Feb 9, 2013, at 3:29 PM, AtKaaZ atk...@gmail.com wrote:
Hi Stu. All I see is
beta13http://search.maven.org/#artifactdetails%7Corg.clojure%7Cclojure%7C1.5.0-beta13%7Cjar
as being last (9 feb), and RC6 05-Feb-2013
--
--
You received this message
Hi, does anyone see anything wrong with this?
= (source clojure.java.io/delete-file)
(defn delete-file
Delete file f. Raise an exception if it fails unless silently is true.
{:added 1.2}
[f [silently]]
(or (.delete (file f))
silently
(throw (java.io.IOException. (str Couldn't
maybe jvm arg would help
-XX:MaxPermSize=256m
On Sat, Feb 9, 2013 at 11:17 PM, Aaron Bedra aaron.be...@gmail.com wrote:
I just pulled it down locally and got the dreaded PermGen…
[java] java.lang.OutOfMemoryError: PermGen space
[java] at
these examples to illustrate what you are saying:
= (= (debug 1\r\n2 nil 3) (pr-str (lazy-seq (list 2 (println debug 1)
3
true
= (= (1\r\n) (pr-str (lazy-seq (println 1
true
On Sat, Feb 9, 2013 at 10:57 PM, Conrad drc...@gmail.com wrote:
For those reading this, the issue is NOT
nothing
2
nothing
3
nothing
4
nothing
#'user/k
user= k
(0 1 2 3 4)
On Saturday, February 9, 2013 2:41:23 PM UTC-8, AtKaaZ wrote:
these examples to illustrate what you are saying:
= (= (debug 1\r\n2 nil 3) (pr-str (lazy-seq (list 2 (println debug
1) 3
true
= (= (1\r\n) (pr-str
, AtKaaZ atk...@gmail.com wrote:
maybe jvm arg would help
-XX:MaxPermSize=256m
On Sat, Feb 9, 2013 at 11:17 PM, Aaron Bedra aaron.be...@gmail.comwrote:
I just pulled it down locally and got the dreaded PermGen…
[java] java.lang.OutOfMemoryError: PermGen space
[java
thanks, done here [1] after a search for delete-file yielded nothing
[1] http://dev.clojure.org/jira/browse/CLJ-1159
On Sun, Feb 10, 2013 at 8:40 PM, Wolodja Wentland babi...@gmail.com wrote:
On Sun, Feb 10, 2013 at 18:59 +0100, AtKaaZ wrote:
could you maybe also fix clojure.java.io/delete
)
:not-deleted
Thank you for this
On Sun, Feb 10, 2013 at 9:13 PM, Sean Corfield seancorfi...@gmail.comwrote:
You can call (clojure.java.io/delete-file some-file :not-deleted) and
you'll get true if the delete succeeds and :not-deleted if it fails.
On Sat, Feb 9, 2013 at 1:32 PM, AtKaaZ atk
someone posted this [1] earlier, I think it might help you
[1]
http://clojure-doc.org/articles/language/concurrency_and_parallelism.html
On Mon, Feb 11, 2013 at 5:50 PM, Ari ari.brandeis.k...@gmail.com wrote:
Hi,
I'd like my web application to process uploaded text files in the
background;
this is awesome!
there is some format issue on this page:
http://titanium.clojurewerkz.org/articles/getting_started.html
search for this twice to see both: clojurewerkz.titanium.elements/merge!
On Mon, Feb 11, 2013 at 6:37 PM, Michael Klishin
michael.s.klis...@gmail.com wrote:
Titanium [1]
a small typo here:
http://titanium.clojurewerkz.org/articles/getting_started.html
at
Removing Edges
(tg/remove-edge e))
should be:
(tg/remove-edge g e))
should I be reporting any of these somewhere else?
On Mon, Feb 11, 2013 at 6:37 PM, Michael Klishin
michael.s.klis...@gmail.com
thank you, this was an easy read even for me
On Mon, Feb 11, 2013 at 7:32 PM, Andy Fingerhut andy.finger...@gmail.comwrote:
And just in case it gets edited by someone else before you have a chance
to read it, I've copied and pasted the current version below for reference.
what would this do:
(let [a 1, a 2] a)
becomes:
(let [a 1, a123 2] a)
or
(let [a 1, a123 2] a123)
or
exception[I prefer]
On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
abonnaireserge...@gmail.com wrote:
Processing a hygienic AST relieves the burden of worrying about shadowing
of
seems similar to this concept with new:
=* (new java.lang.RuntimeException msg)* ;works this way
#RuntimeException java.lang.RuntimeException: msg
= *(def a java.lang.RuntimeException)*
#'runtime.q/a
= *a*
java.lang.RuntimeException
= *(new a msg)* ;nope
CompilerException
be tough to track down
On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood esiot...@gmail.com wrote:
On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote:
what would this do:
(let [a 1, a 2] a)
becomes:
(let [a 1, a123 2] a)
or
(let [a 1, a123 2] a123)
or
exception[I prefer
wow that's pretty epic!
= (def f (call-fn java.lang.String substring startpos endpos))
#'runtime.q/f
= (f abcdef 2 4)
cd
= (f (str 123 45) (+ 1 1) 4)
34
Thank you Meikel
On Tue, Feb 12, 2013 at 1:51 PM, Meikel Brandmeyer (kotarak)
m...@kotka.dewrote:
Hi,
if you want to resort to eval
is there a way to use nested transactions, yet?
I am looking at [1] and [2]
[1] https://github.com/thinkaurelius/titan/wiki/Multi-Threaded-Transactions
[2] https://github.com/tinkerpop/blueprints/wiki/Graph-Transactions
On Mon, Feb 11, 2013 at 6:37 PM, Michael Klishin
/hermes
On Tue, Feb 12, 2013 at 6:39 PM, AtKaaZ atk...@gmail.com wrote:
is there a way to use nested transactions, yet?
I am looking at [1] and [2]
[1]
https://github.com/thinkaurelius/titan/wiki/Multi-Threaded-Transactions
[2] https://github.com/tinkerpop/blueprints/wiki/Graph-Transactions
of the graphs likely to be
encountered. I expect it will be formally announced once I figure out some
neat things about the linux kernel.
On Wednesday, February 13, 2013 12:16:15 AM UTC+4, AtKaaZ wrote:
I did not look at hermes, wasn't aware of it, but I'll look, thanks.
On Tue, Feb 12, 2013 at 8
Hi.
Suppose you want to make an abstraction on top of two similar but
different libraries (hermes and titanium), so that I could switch between
using either of them(or both of them) at compiletime or runtime, how would
you do something like that?
Thanks.
--
Please correct me if I'm wrong or
Let's say I want to override clojure.core/sorted?
(ns random.learning.clojure.overridex
(:refer-clojure :exclude [sorted?]))
(defn sorted? [coll]
{:pre [ (coll? coll)]}
(clojure.core/sorted? coll))
I'm using Eclipse+counterclockwise, so loading this namespace(Ctrl+Alt+L)
first time gives
just use :require and qualify
the namespace.
On Thursday, February 14, 2013 10:04:55 AM UTC-8, AtKaaZ wrote:
Let's say I want to override clojure.core/sorted?
(ns random.learning.clojure.**overridex
(:refer-clojure :exclude [sorted?]))
(defn sorted? [coll]
{:pre [ (coll? coll
The goal is to can write this form:
= *(let [a java.lang.RuntimeException]
(new a)
)*
CompilerException java.lang.IllegalArgumentException: Unable to resolve
classname: a, compiling:(NO_SOURCE_PATH:2:3)
attempt with macro:
=* (defmacro mew [cls restt]
`(new ~(eval cls) ~@restt)
it's impossible, at least by using new it is
On Thu, Feb 14, 2013 at 10:34 PM, Andy Fingerhut
andy.finger...@gmail.comwrote:
On Feb 14, 2013, at 1:27 PM, AtKaaZ wrote:
The goal is to can write this form:
= *(let [a java.lang.RuntimeException]
(new a)
)*
CompilerException
someone could suggest another way? clojure.reflect ?
On Thu, Feb 14, 2013 at 10:40 PM, AtKaaZ atk...@gmail.com wrote:
thanks for the reply,
= *(defmacro mew [cls args]
`(new ~cls ~@args))*
#'runtime.q/mew
=* (let [a java.lang.RuntimeException]
(mew a)
)*
CompilerException
ok looks like it's not impossible:
= *(defmacro mew [cls restt]
(let [c a]
`(eval (new ~a ~@restt))
)
)*
#'runtime.q/mew
= *(let [a java.lang.RuntimeException]
(mew a)
)*
#RuntimeException java.lang.RuntimeException
On Thu, Feb 14, 2013 at 10:53 PM, AtKaaZ atk
and I forgot to mention that I already had another a defined
= a
java.lang.RuntimeException
hence why it worked
On Thu, Feb 14, 2013 at 11:01 PM, AtKaaZ atk...@gmail.com wrote:
ah I tricked myself... I used ~a inside the macro instead of ~c or
~cls
so back to still impossible
= (defmacro
Hi.
It would maybe help if you'd post some test code (deftest for the macro?),
if not also that macro that you have so far.
But, if you want to force evaluation you could maybe use *eval* but this
may not need apply in your case,
ie. maybe you want this:
= (def a '(1 3 9))
#'runtime.q/a
= a
(1 3
On Sun, Feb 17, 2013 at 6:12 AM, Jacob Goodson
submissionfight...@gmx.comwrote:
You need to know something... it's a dialect of LISP, *the only*limitation is
you.
though it is certainly exerting its limitations on me
On Thursday, February 14, 2013 5:08:57 PM UTC-5, AtKaaZ wrote:
Thank
it's about time, now let's see that in 3d and with clojure structures :)
On Sun, Feb 17, 2013 at 7:40 PM, Rich Morin r...@cfcl.com wrote:
Some folks here may enjoy this:
λ machine as a d3 tree, parsed with PEG
http://brycec.github.com/vizlamb/
-r
--
http://www.cfcl.com/rdm
and in the case of String, this happens:
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L547
else if(o instanceof CharSequence)
return ((CharSequence) o).length();
= (dorun (map println (supers (class a string here
java.lang.Object
Was there a library or some other way to pass ie. maps to functions
so that the order of the params isn't predefined, just in case I want to
skip some passing parameters without actually having to pass some value for
them, I could just refer to which params I'm passing by identifying them
with a
For *or*
= *(set! *warn-on-reflection* true)
(def ^Integer a 1)
(java.awt.Color. 0 0 ^Integer (or ^Integer a 0) 0)
*clojure-version**
true
#'cgws.notcore/a
Reflection warning, NO_SOURCE_PATH:3:1 - call to java.awt.Color ctor can't
be resolved.
#Color java.awt.Color[r=0,g=0,b=1]
{:major 1,
, AtKaaZ wrote:
For *or*
= *(set! *warn-on-reflection* true)
(def ^Integer a 1)
(java.awt.Color. 0 0 ^Integer (or ^Integer a 0) 0)
*clojure-version**
true
#'cgws.notcore/a
Reflection warning, NO_SOURCE_PATH:3:1 - call to java.awt.Color ctor can't
be resolved.
#Color java.awt.Color
no sense around doseq since doseq returns nil and
dorun operates on a lazy seq.
On Monday, February 18, 2013 8:16:16 PM UTC+1, AtKaaZ wrote:
= (time (dorun (doseq [x (take 1000 (range))]
(java.awt.Color. 0 0 *(int a)* 0
Elapsed time: 7352.883635 msecs
--
--
You received
, vemv v...@vemv.net wrote:
fn's keyword arguments feature provide unrolled, optional key-value args:
(defn foo [ {:keys [a b c]}]
[a b c])
(foo :c 4) ;; [nil nil 4]
On Sunday, February 17, 2013 10:06:13 PM UTC+1, AtKaaZ wrote:
Was there a library or some other way to pass ie. maps
I think we solved this once on irc and it was something in your project*s*.clj
but I can't remember exactly, if you want you can post its contents...
Cheers
On Tue, Feb 19, 2013 at 5:49 PM, larry google groups
lawrencecloj...@gmail.com wrote:
Thanks for the suggestion. I run lein deps :tree
also check this:
https://groups.google.com/d/msg/clojure/xlhDSPZGrL4/C9EGFvlqOZ8J
On Tue, Feb 19, 2013 at 7:13 PM, Alex Nixon a...@swiftkey.net wrote:
Hey Peter,
On 19 February 2013 17:55, Peter Taoussanis ptaoussa...@gmail.com wrote:
Hi Alex,
This is a problem because the print-method
get how I could do that, yet I feel I'm missing something
pretty basic.
I've also made a gist for this: https://gist.github.com/AtKaaZ/4988320
But this is the best that I can do without errors:
= (defmacro x [a] `~a )
= (*x `*{:a (+ 1 2) :b ~(+ 1 3)})
{:a (clojure.core/+ 1 2), :b 4}
But I don't
bbloom on irc suggested this: https://github.com/brandonbloom/backtick
and looks like *template *is the macro I was looking for
= (template {:a (+ 1 2) c d :b ~(+ 1 3)})
{:a (+ 1 2), :b 4, c d}
Totally awesome!
On Tue, Feb 19, 2013 at 7:35 PM, AtKaaZ atk...@gmail.com wrote:
I am trying
its contents...
I have never been on the irc channel, so that wasn't me.
On Feb 19, 12:09 pm, AtKaaZ atk...@gmail.com wrote:
I think we solved this once on irc and it was something in your
project*s*.clj
but I can't remember exactly, if you want you can post its contents...
Cheers
ok I found the log:
http://www.raynes.me/logs/irc.freenode.net/leiningen/2013-02-01.txt
On Tue, Feb 19, 2013 at 8:05 PM, AtKaaZ atk...@gmail.com wrote:
could've been someone else with the same problem, sorry for implying.
I do remember something about ring having an ) for clojure 1.5.0
dependencies left their
version of Clojure unspecified, then lein will download all the poms
and then decide which jar to use?
On Feb 19, 2:15 pm, AtKaaZ atk...@gmail.com wrote:
ok I found the log:
http://www.raynes.me/logs/irc.freenode.net/leiningen/2013-02-01.txt
On Tue, Feb 19
On Tue, Feb 19, 2013 at 8:31 PM, AtKaaZ atk...@gmail.com wrote:
if they have their dependency like this:
org.clojure:clojure:[1.2,1.5)
notice the ) at the end, instead of ]
which was(maybe still is?) the case of i18n
j18n not i18n, typo
But one way you can know if it's a dep in your
you could include a :reload to your :use ns2 in ns1 but I don't recommend
it. (it did bit me even with defonce when I wanted to keep some global
state but clear it after deftest tests)
(ns somewhere.namespace1
(:use [somewhere.namespace2 :as ns2] :reload)) ;;or maybe :reload-all
I'm sure
1 - 100 of 300 matches
Mail list logo