It sounds to me that you forgot to run 'lein clean' at work, leaving
certain classfiles present in 'target'. This would explain why you got
your uberjar at work but not at home (presumably .class files are being
ignored by git)
Jim
On 16/04/13 13:59, larry google groups wrote:
I have a Mac
Nice talk :)
http://skillsmatter.com/podcast/scala/clojure-at-nokia-entertainment/wd-23
Jim
--
--
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
Note that posts from new members are moderat
On 10/04/13 14:03, Simon Katz wrote:
Second, Clojure supports namespace-qualified keywords, presumably
because it's possible that different libraries might want to use the
same keyword for different purposes.
I don't think that is the reason for having namespace-qualified
keywords...different
Hey Mark, don't get paranoid :)... this is all Cedric did!
user=> (def .3 0.4)
#'user/.3
user=> (+ .3 1.7)
2.1
Jim
On 09/04/13 10:46, Mark Engelberg wrote:
What version are you running?
As far as I know, .3 isn't even a valid representation for a number --
you'd have to write it as 0.3. S
aaa Laurent beat me to it! :)
it seems we both understood the same thing so fnil is indeed your friend...
Jim
On 05/04/13 12:29, Jim foo.bar wrote:
if I understood correctly you're looking for 'fnil' :
=>(update-in {} [:foo :bar] (fnil conj []) :a :b :c)
{:foo {:bar [:a
if I understood correctly you're looking for 'fnil' :
=>(update-in {} [:foo :bar] (fnil conj []) :a :b :c)
{:foo {:bar [:a :b :c]}}
Jim
On 05/04/13 12:25, Simon Katz wrote:
Hi.
Is there an idiomatic way to have update-in create a vector when the
supplied keys do not already exist? (Or maybe
On 27/03/13 03:13, Michael Klishin wrote:
Complain loudly to maintainers on this list that their documentation
has gaps and they should
clarify this and that. The idea that people should read the source to
get reasonably straightforward
stuff done is wrong and does a lot of long term damage to
Cool, thanks guys :)
Jim
On 25/03/13 15:34, David Powell wrote:
On Mon, Mar 25, 2013 at 3:24 PM, Jim foo.bar <mailto:jimpil1...@gmail.com>> wrote:
On 25/03/13 15:22, Ben Wolfson wrote:
The 94th fibonacci number is greater than Long/MAX_VALUE, so it
overflo
On 25/03/13 15:22, Ben Wolfson wrote:
The 94th fibonacci number is greater than Long/MAX_VALUE, so it
overflows. It is using longs.
I seeshouldn't Clojure auto-promote it to a BigInt then?
Jim
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
I've literally tried all the variations of fibonaci sequences i could
find! all of them throw an ArithmeticException integer overflow
clojure.lang.Numbers.throwIntOverflow (Numbers.java:1388)
as soon as I try more than 94 elements!
my favourite version is this (from Christophe Grand ):
(defn
On 25/03/13 12:55, Michael Klishin wrote:
Take a look at https://blogs.oracle.com/jrose/entry/value_types_in_the_vm,
it indicates that there is interest in "true value types" on the JVM
but at best they will
make it in JDK 9 in 2015.
thanks for thisvery interesting stuff indeed... :)
Jim
On 25/03/13 12:50, Shantanu Kumar wrote:
However, I'd consider they are just implementation details and
intended for idiomatic use from within the Clojure language.
I think you meant "*not* intended for idiomatic use from within the
Clojure language."
Jim
--
--
You received this message bec
On 25/03/13 12:45, Michael Klishin wrote:
Not sure how strings and numerical types fit into this discussion
about collection mutability.
I only asked because you said there is no 100% immutability on the JVM.
I also found this blog-post where Doug Lea joined in for a discussion...
http://w
On 25/03/13 12:28, Michael Klishin wrote:
There is no absolute immutability on the JVM, .NET, in JavaScript.
There is always a backdoor to mutability.
But 99.9% of projects won't use it.
Andy hinted this last night as well...is this true? if I declare a
Integer/String object as private & fina
On 25/03/13 12:08, Michael Klishin wrote:
How often do you see implementation details such as
PersistentVector#tail used in Clojure code?
That is what matters.
I've never seen that in Clojure code but is 'how responsible a
programmer is' what really matters? In other words, are clojure's
co
On 24/03/13 22:59, Andy Fingerhut wrote:
It might not be obvious at first, but Clojure's "immutable" types are
*not* immutable in the sense of "they cannot be modified in place from
within the JVM", but only in the sense of "they cannot be modified in
place by using Clojure's functions alone on
thanks guys! I enjoyed this.. :)
Jim
On 21/03/13 08:32, Mark Derricutt wrote:
Hey all,
We couldn't let everyone at Clojure/West have all the fun so our
latest podcast is an awesome chat with Ambrose Bonnaire Sergeant all
about Typed Clojure.
http://illegalargument.com/illegal-argument-epi
Could it be that you're using lein1 instead of lein2? Is lein1 still
actively maintained? In any case I suggest you upgrade to lein2...
Jim
On 14/03/13 12:48, Nico Swart wrote:
The Leiningen project file I use include these dependancies:
(defproject fb20try "1.0.0-SNAPSHOT"
:description "F
there was a memory leak hence the 1.5.1 release the next day...
Jim
On 13/03/13 14:12, Paul Butcher wrote:
On 13 Mar 2013, at 14:05, "Jim foo.bar" <mailto:jimpil1...@gmail.com>> wrote:
how come your project depends on the problematic version 1.5.0?
1.5.0 is problemati
how come your project depends on the problematic version 1.5.0?
Jim
On 13/03/13 14:03, Paul Butcher wrote:
Thanks Stuart - my Contributor Agreement is on its way.
In the meantime, I've published foldable-seq as a library:
https://clojars.org/foldable-seq
I'd be very interested in any feedbac
On 11/03/13 15:08, Dave Kincaid wrote:
I'm with you. I don't like it personally. Every time I come across it
reading code I have to stop and think about what exactly it does.
I didn't use to like it either but after coding rubik's cube I've come
to appreciate it more...imagine this:
(-> cub
I don't think you will be able to do a parallel fold on a lazy-seq which
is what clojure.data.xml/parse returns. Vectors are the only persistent
collection that supports parallel fold and something tells me it's
because they are NOT lazy...
why can't you 'vec' the result of xml/parse and then
On 28/02/13 15:36, Softaddicts wrote:
Hi,
can you post the JVM used, maybe a snippet of the code around line 68,
the dependencies tree (lein deps :tree) and your project.clj ?
With these we can probably find the root cause of this.
Luc P.
Hi Luc,
thanks for your interest but I think I've cr
threw)... hehe :)
Jim
On 28/02/13 15:21, Marko Topolnik wrote:
Nondeterministic behavior -> suspect race conditions. Maybe
compilation was happening concurrently on several threads and the
resulting bytecode got mangled.
On Thursday, February 28, 2013 4:17:52 PM UTC+1, Jim foo.bar wrote:
On 28/02/13 15:12, Alex Robbins wrote:
Maybe you are already doing this, but as soon as I get into "This
doesn't seem possible" territory, I run a "lein clean". That has
resolved the problem for me several times.
I've got nothing in "/target"...I am not AOT-compiling anything!
I think i found
On 28/02/13 14:34, Marko Topolnik wrote:
So it makes sense that it blows up only when you try to actually run
the code.
It doesn't low up when I try to run the code...as I said, I can easily
navigate into any namespace from the repl and run any code that I
wantso there is no problem compi
I've got a project
1. I can /'lein2 repl'/ in it and navigate to any namespace - no problem
2. I can /'lein2 check'/ it and it compiles everything - no problem
3. I can /'lein2 test'/ or /'lein2 test some-namespace'/ and BOOM! -
*PROBLEM! *
*Exception in thread "main" java.lang.VerifyE
On 27/02/13 13:10, Marko Topolnik wrote:
A side note: since /spans?/ is a constant within the /map/ transform,
it would pay to decide up-front which function to use:
nice catch!
Jim
ps: thanks a lot for your comments :)
--
--
You received this message because you are subscribed to the Google
On 27/02/13 12:52, Marko Topolnik wrote:
In this line:
(map (if even? (fn [num _] (identity spans)) str) some-seq1 some-seq2)
you appear to involve /identity/ in a way that makes no sense since
(identity spans) is just spans. You also don't involve the
/num/ argument at all; but maybe you me
On 27/02/13 12:35, Marko Topolnik wrote:
it is a function that transforms its argument into itself. It is
useful in the context of higher-order functions where it plays the
role of a no-op
that is exactly what I'm trying to do..a no-op based on some
condition...Though, I can see why it would
thinking about it a bit more, it would certainly make sense to return a
seq with all the identities. Then I can just ask for the first...hmm
interesting :)
Jim
On 27/02/13 12:20, Jim foo.bar wrote:
On 27/02/13 12:12, Chris Ford wrote:
Can you give an example use case?
sure... sometimes I
On 27/02/13 12:12, Chris Ford wrote:
Can you give an example use case?
sure... sometimes I do something this:
(map (if even? (fn [num _] (identity spans)) str) some-seq1 some-seq2)
but I'd like to write this instead:
(map (if even? identity str) some-seq1 some-seq2)
Personally, I would be
I often find myself asking for identity of something but identity takes
a single argument! Why not have it take as many as one likes but only
return the identity of the first? I find that very handy...do people agree?
(defn identity
"Returns its argument or its first argument when there are mor
ave expected. Try putting something before the assert
to log if that point was ever reached.
On Thu, Feb 21, 2013 at 3:29 PM, Jim foo.bar <mailto:jimpil1...@gmail.com>> wrote:
oops major typo! the correct is:
(defmacro defcomponent [name co]
`(let [c# ~co]
(a
Moreover, now the exception thrown when the validation fails is not very
informative!
IllegalStateException Invalid reference state clojure.lang.ARef.validate
(ARef.java:33)
assert let's you speciy the message you want that is why I preferred it...
Jim
On 21/02/13 14:56, Jim fo
Yes you're right, this does the trick...However now I've ended up
unquoting 'name' 3 times! I'm pretty sure this not a good practice in
general, is it? On the other hand I cannot use 'gensym' cos I want the
name intact or later access...hmmm...I never expected this would be so
confusing!
Jim
Hi Meikel,
This seems to work but returns nil and so you can't see that a new var
has been defined!
cluja.core=> (defcomponent maxent-person maxent)
nil
cluja.core=> maxent-person ;;was it defined?
# ;;yes it was!
Jim
On 21/02/13 14:42, Meikel Brandmeyer (kotarak) wrote:
(defmacro defcompo
unbound at the
end! strange stuffI may end up using 'eval' as I used to...
Jim
On 21/02/13 14:20, Jim foo.bar wrote:
I settled for:
(defmacro defcomponent [name co]
`(let [c# ~co]
(assert (component? c# "Not a valid IComponent"))
(def ~name c#)))
Jim
On 21/
hough,
=> (defmacro a []
`(println 1)
`(println 2)
)
#'runtime.q/a
=> (a)
2
nil
=> (defmacro a []
`(do
(println 1)
(println 2)
)
)
#'runtime.q/a
=> (a)
1
2
nil
On Thu, Feb 21, 2013 at 3:14 PM, Jim foo.bar <mailto:jimpil1...@gmail.com>&
alid IComponent
(runtime.q/component? "a") runtime.q/eval6572 (NO_SOURCE_FILE:1)
=> (defcomponent a 1)
#'runtime.q/a
=> (defcomponent a (+ 1 3))
#'runtime.q/a
On Thu, Feb 21, 2013 at 3:11 PM, AtKaaZ <mailto:atk...@gmail.com>> wrote:
or you could place
name ~co))
it looks ugly doesn't it?
Jim
On 21/02/13 14:11, AtKaaZ wrote:
or you could place the assert inside the backquote
On Thu, Feb 21, 2013 at 3:10 PM, Jim foo.bar <mailto:jimpil1...@gmail.com>> wrote:
On 21/02/13 14:07, Jim foo.bar wrote:
Hi all,
On 21/02/13 14:07, Jim foo.bar wrote:
Hi all,
I''d like to have a macro like the following but preferably without
the 'eval' inside the assertion form:
(defmacro defcomponent [name co]
(assert (component? (eval co)) "Not a valid IComponent")
`(def ~n
Hi all,
I''d like to have a macro like the following but preferably without the
'eval' inside the assertion form:
(defmacro defcomponent [name co]
(assert (component? (eval co)) "Not a valid IComponent")
`(def ~name ~co))
If I don't use eval, everything works as long as I pass a var
in...H
'keycollect-partition' looks sensible and idiomatic to me... perhaps
juxt can come into play here? Of course, both versions will only work
with keys as keywords and non-keys as non-keywords. If you use anything
else other than a keyword for a key or a keyword for an item, both will
break...
J
I know that using a bare :use in the ns macro is generally frowned upon
as it provides no hints about what is actually being used...
However, I 've got 2 namespaces 'abstractions.clj' and
'concretions.clj'...concretions.clj will eventually use all the
protocols defined in abstractions.clj...at
Couldn't the compiler infer that the 2 expressions are identical with
identical arguments and perform the reduce only once? Basically what the
programmer would do in a let statement? Would that be too expensive?
Jim
On 05/02/13 15:21, Herwig Hochleitner wrote:
Clojure has a feature called lo
I do hate writing code on thunderbird!!! '(< counts 1)' should
obviously be '(> ~counts 1)'...
Jim
On 05/02/13 15:03, Jim foo.bar wrote:
Hi all,
I 'm a bit confused with this - I'm trying to think but I can't!!!
Probably cos I've not h
Hi all,
I 'm a bit confused with this - I'm trying to think but I can't!!!
Probably cos I've not had any food yet!
Up till now I thought I could construct matrices with 'for'...So (for [i
(range 3)] i) gives us a 1d structure (a list)...
(for [i (range 3) j (range 4)] [i j]) gives us a 2d struc
Hi all,
I realise this may be a slightly naive question and my implementation is
certainly naive, however I'd like to see if anyone else has attempted
anything similar. Of course, by 'dynamic-programming' I 'm not referring
to dyncamic scope but to the statistical technique which divides
prob
On 15/01/13 13:49, Marko Topolnik wrote:
It's not about futures, but about the way the ExecutorService is
configured. Clojure's /future-call/ apparently uses the /agent
send-off pool/, which is an unbounded thread pool executor. So you can
use the same thing with /Executors/newCachedThreadPool/
On 15/01/13 12:57, Marko Topolnik wrote:
The tasks are waiting in the queue, they are not being executed at
all. And the time they spend waiting cannot theoretically be a
function of the time they will take to execute, once they get their
chance.
a so Java Futures are not the same as Cloj
On 15/01/13 09:25, Marko Topolnik wrote:
The order in which you are polling is not very relevant given the fact
that /doall/ won't return until *all* futures are realized. It's just
an internal detail.
I finally fully grasped what you were saying...So yes you're right - as
long as I'm forcing
e macro is called? i.e.:
user=> (def somename 17)
user=> (testabc somename) ; <- in this macro, I need to take the
'somename' symbol and retrieve value 17 from above - is this possible
at all?
Thanks for your help,
wujek
On Mon, Jan 14, 2013 at 4:25 PM, Jim foo.bar
t with a function, I would of course prefer it, but
I am not sure if it can work.
wujek
On Mon, Jan 14, 2013 at 3:41 PM, Jim foo.bar mailto:jimpil1...@gmail.com>> wrote:
Why does this have to be a macro? Why can't it be a
first-class function ins
Why does this have to be a macro? Why can't it be a first-class function
instead?
(defn with-obj [ob]
(if-let [obj-meta (meta ob)] name
(throw (IllegalArgumentException. (str ob " seems not be our
object")
Jim
On 14/01/13 14:34, Jim foo.bar wrote:
Of course you s
Of course you should know that built-in java types do not support
meta-data...You need to implement IObj in order to provide meta-data
support to your own types...otherwise use records...
Jim
On 14/01/13 14:32, Jim foo.bar wrote:
On 14/01/13 14:27, wujek.sru...@gmail.com wrote:
(defmacro
On 14/01/13 14:27, wujek.sru...@gmail.com wrote:
(defmacro with-obj [name]
(let [obj-meta (meta name)]
(if (or (nil? obj-meta)) ; (not (::my-obj obj-meta)))
(throw (IllegalArgumentException. (str name " seems not be our
object")
`(println "nice"))
Try this:
(defmacro with-obj [
Hi everyone, I hope you're all well!
I recently faced a problem when i needed to receive some piece of code
and replace all the invalid symbols in it with the proper (existent)
ones. Imagine for example you have the following map from made-up
characters to real characters:
(def reserved-char
On 10/01/13 12:57, Jonathon McKitrick wrote:
Excellent stuff, guys. Thanks for the help.
I just got 'Joy of Clojure' and 'Clojure Programming' in the mail
yesterday so hopefully I'll be up to speed quickly.
no worries...happy reading! :-)
Jim
--
You received this message because you are su
Hi all,
I often find myself wanting to attach meta-data to built-in Java classes
and particularly to the 'String' class. In a text-mining and NLP
context, it is very useful for example to have a dictionary of strings
where each string 'knows' its synonyms...Of course one can get around
that
On 12/12/12 00:16, Mark Engelberg wrote:
I would much prefer to have some sort of core function that serves as
a polymorphic constructor. This way users don't need to require the
concrete implementations individually.
I faced the same sort of issue a couple of months ago. Just like you, I
wa
There is an easy solution to your problem...Just hange the fn definition
slightly. For example I am regularly using this:
(defn un-capitalize [^String s]
(let [Cfirst (subs s 0 1)
Crest (subs s 1) ]
(str (.toLowerCase Cfirst) Crest)))
It is pretty obvious what you need to do to convert the abo
Apologies...I did not realise this had already been answered... oops! :-)
On 11/12/12 13:32, Jim foo.bar wrote:
If you're looking for some truly unintuitive equality behavior check
this out:
user=> (def pred (Boolean. false)) ;;not a primitive but an object
#'user/pred
user=&g
#x27;t print
nil
Jim
On 11/12/12 13:19, Jim foo.bar wrote:
From the docs:
Equality. Returns true if x equals y, false if not. Same as
Java x.equals(y) except it also works for nil, and compares
numbers and collections in a type-independent manner. Clojure's
immutable data
structures def
ntity*,
comparison.
hope that helps...
Jim
On 11/12/12 13:17, Jim foo.bar wrote:
I disagree...
One of the nice things about clojrue is that, at tis hear, lies the
'equiv' operator which is basically the 'egal' fn as defined by Baker
[1993] [Equal rights for functional objects or th
I disagree...
One of the nice things about clojrue is that, at tis hear, lies the
'equiv' operator which is basically the 'egal' fn as defined by Baker
[1993] [Equal rights for functional objects or the mroe things change
the more they stay the same]. When using '=' with data-structures you
ar
Ooops!!!
No, Mark asked this in his first post...
sorry for the confusion!
Jim
On 26/11/12 14:31, Philip Potter wrote:
On 26 November 2012 14:27, Jim foo.bar wrote:
On 26/11/12 14:19, Philip Potter wrote:
Has anyone compiled a little table of what things satisfy which
predicates?
I
On 26/11/12 14:19, Philip Potter wrote:
Has anyone compiled a little table of what things satisfy which predicates?
I'm not 100% sure, but I think "Clojure Programming " has a table like
this...I can confirm as soon as I get back home...
Jim
--
You received this message because you are subs
My understanding is that everything (all data-structures) is coll?
(obviously not strings)
lists and vectors are sequential? (and coll?)
sets are only coll?
maps are map? (and coll?)
All seq? are sequential?
Yes and also coll?
All sequential? are coll?
Well yeah but not only...all persisten
On 22/11/12 16:25, David Nolen wrote:
core.logic has lazy-run.
ooo thanks a lot!!!
Jim
--
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
Note that posts from new members are moderated - p
Hi all,
this question may sound stupid but I've got to ask it
given a fn like the one below, how would one make it lazy (assuming that
it can be done)?
also if it can, I'd like to make it fully-lazy (instead of
chunked-lazy)...any ideas? I remember something about restoring '1 at a
time' l
On 21/11/12 11:47, Dick Davies wrote:
Also, is it possible to 'override' a given dependency to favour a local JAR
over the 'official' maven one?
just install the jar into your local maven repo (~/.m2/) (with
identifiable name) and then pull it from whatever project you want. I
think Leininge
Hi all,
I discovered yesterday that records cannot be deserialised from the EDT
using the normal way (prn/read-string)...
NoClassDefFound Exception
trying the same thing from a bare repl (no swing), works just fine!!!
Googling "deserialisng clojure records" pointed me to [1] where Stuart
I was just wondering...we have a 'defsomething' macro for almost
everything...
How come there is no 'defpromise'? It is very easy to write one and
since we always initialize promises like this: (def x (promise)), I
don't see any reason why not...
(defmacro defpromise [name]
`(def ~name (pr
The problem with that is that it will only work if there are no external
dependencies! As long as your code depends only on clojure 1.4 it's all
good...this is very unlikely though for a descent sized project...
Jim
On 20/11/12 16:14, Nenad Seke wrote:
You can write your clojure code in some
You can't convert to keyword simply by (str ":" (str (first
components))...you need the (keyword (first components))...also why is
your argument (symbol "obj")? I'd prefer obj# or (gensym obj)...
Jim
On 13/11/12 10:06, Johannes wrote:
Hi,
I define a record
(defrecord point [x y])
and the fo
Thank you Bronza...this is exactly what I meant! when using reducers
'into' is the norm isn't it?
Couldn't kibit parse the ns declaration before it starts suggesting
things? It seems that at least for namespaces that use core.logic or
reducers kibit's suggestions will break your code! For exampl
sorry 'set' will convert from a coll to a set...use 'hash-set' ,
'sorted-set' etc etc...
Jim
On 12/11/12 13:22, Jim foo.bar wrote:
Yes, this has been discussed extensively in the pastI think the
convention is to use the ctor functions if you're pass
Yes, this has been discussed extensively in the pastI think the
convention is to use the ctor functions if you're passing data
dynamically, otherwise if dealing with constants the literals should be
just fine...In the case just replace the set literal with (hash-set ...)
or (set ...).
hop
the general idiom with-some-resource means that resources will be
cleared after leaving its scope. JUst like with 'with-open' which has a
try/finally in order to .close() any closable resource upon exit. I've
not used clojure.java.jdbc but I suspect the same rationale applies for
with-connecti
I thought 'definline' addresses exactly that...cases where one might
want to pull out small pieces of first class functionality without
sacrificing performance and without macros (which are not
first-class)...am I mistaken?
Jim
ps: the only similarly big function that I've ever written (still
exactly the point I was trying to make! However, other peoples'
experiment seem not to agree with that!
Jim
On 09/11/12 15:09, Cedric Greevey wrote:
In the real world, it's more complicated than that, and N could end up
not only depending on which transient operations and on vector vs. map
b
On 25/10/12 18:01, larry google groups wrote:
(:require clojure.string clojure.java.io who-is-logged-in.memory_display
[clojure.data.json :as json])
I don't like this line...
try:
(:require [clojure.string :as st]
[clojure.java.io :as io]
[clojure.data.json
On 25/10/12 16:59, Brian Craft wrote:
I have a fairly common scenario where I have a set of operations that
need to work on two types of data (not "data types" in the clojure
sense) that have different internal structure (i.e. maps with
different keys). I could write a generic function that ope
are you aot compiling? If yes delete all the calss files and
re-compile...also there is no reason to require it unless you alias it
to something... a common one would be (:require [clojure.java.io :as
io])...personally, for clojure.java.io, I just use the fully qualified
name most of the times
aaa sorry I can see from a previous post that you already tried that!
this is strange!
Jim
On 24/10/12 14:48, Jim foo.bar wrote:
On 24/10/12 14:41, AtKaaZ wrote:
The error doesn't help you solve the problem... which is: don't pass
a seq to :import
You can easily pass seqs
On 24/10/12 14:41, AtKaaZ wrote:
The error doesn't help you solve the problem... which is: don't pass a
seq to :import
You can easily pass seqs to :import...this works fine for me (importing
3 classes from the same package):
(:import [encog_java.customGA CustomNeuralGeneticAlgorithm
CustomG
On 22/10/12 16:45, JvJ wrote:
The reason it starts with def (and ends in -fn) is because it is a
function used by a macro, which has a global effect.
well, if you mean that the macro (which you've not shown) is the one
that creates the top-level form, then macro's name should be the one
start
well not quite!
you need (-> form
var
meta
:test)
or the same thing written differently (:test (meta (var form)))
Hope that helps,
Jim
ps: basically the meta-data sit with the var not the function
On 22/10/12 16:33,
If I've understood correctly all you need is (meta form)...
Jim
On 22/10/12 15:30, Mamun wrote:
Hi All,
I've a application with following structure. Now I would like to
access meta data of f1 and f2 within process function.
(defn ^{:test true} f1 []
(println "call f1 fn"))
(defn ^{:tes
a pre-condition attached to your fn would be a nice and clean way to
check for upper/lower case without 'polluting' the fn itself with if
statements...just a thought ... :-)
Jim
On 22/10/12 16:16, Jim foo.bar wrote:
A couple of issues:
1) 'name' is a fn in core so it
A couple of issues:
1) 'name' is a fn in core so it's almost never a good idea to shadow it
like this...
2) also it is not a good idea for a fn to start with 'def' unless it
actually defines a top-level form inside it like in macros
3)If you need all your keys in capital I think it would be fas
On 18/10/12 16:27, Sunil S Nandihalli wrote:
Hi Everybody,
class name clashes on importing same named classes from different
java-packages into same clojure namespace. Is this expected. I think
that it should be possible to import them and can be used by
completely qualifying the class name w
On 17/10/12 15:41, Timothy Baldridge wrote:
So thank you Rich...thank you for ruining all other languages for me.
+1
very well put...
Jim
--
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
WOW! Has it been 5 years already? Thanks a lot Rich for this beautiful
gift to all of us...You rock and Clojure rules!!!
Jim
On 17/10/12 02:54, Rich Hickey wrote:
I released Clojure 5 years ago today. It's been a terrific ride so far.
Thanks to everyone who contributes to making Clojure, and
On 16/10/12 13:25, Zhitong He wrote:
another way to solve this, from
http://users.utu.fi/machra/posts/2011-08-24-2-reddit-clojure.html
(ns myapp.app
(:require [clojure.java.io :as io]))
(defn copy [uri file]
(with-open [in (io/input-stream uri)
out (io/out
On 16/10/12 13:20, Michael Gardner wrote:
On Oct 16, 2012, at 5:16 AM, Jim foo.bar wrote:
so you're saying that if I write a for-loop in Java that populates an array
with constants from 1-1 and then a 2nd loop to add them up, it would happen
at compile-time and i would get the
On 16/10/12 11:49, Tassilo Horn wrote:
One example that does things like constant-folding like macrology is the
unit conversion macro in Let Over Lambda that compiles to constants if
both value and unit are given literally (recursively).
unit conversion! this is exactly what i had in mind!!! wh
On 16/10/12 03:50, Michael Gardner wrote:
On Oct 15, 2012, at 7:45 PM, Andy Fingerhut wrote:
For the case of arithmetic on compile-time constants, I believe that many C,
Java, etc. compilers already perform the arithmetic at compile time.
Known as "constant folding", yes.
so you're saying
p slurping?
Jim
On 12/10/12 15:28, Adam wrote:
Have you tried running jconsole to monitor the memory usage? It
sounds like maybe you're running out of heap space and you're mainly
seeing the garbage collector doing it's thing vs your actual program.
~Adam~
On F
1 - 100 of 118 matches
Mail list logo