when i write (expect true (if (valid? ashutosh a...@gmail.com 99
message1) true false)) for testing the function(valid?) i found
lein test clojuregeek.test.contact
Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
failure in (contact.clj:32) : clojuregeek.test.contact
(expect
Bad mouthing PHP only leads to more resistance.
This video would help.
Master Plan for Clojure Enterprise Mindshare Domination
http://www.youtube.com/watch?v=2WLgzCkhN2g
On Wed, Mar 12, 2014 at 11:00 PM, da...@dsargeant.com wrote:
I just spent the day writing this document for my boss,
Hello all,
I am trying to find some good and big programms in Clojure, since I want to
implement them in the DaCapo harness for my dissertation.
If someone can give me some links to download such programs I would be
really grateful.
Spyros
.
--
You received this message because you are
Hey guys, here is a huge performance problem I'm trying to figure out:
;; Say you have 2 data arrays sitting out there of 1 MB
(def one-mb (byte-array (* 1024 1024)))
(def another-mb (byte-array (* 1024 1024)))
;; and another one that should have the byte-by-byte XOR of the previous
two
Try this:
(defn inplace-xor [^bytes a ^bytes b ^bytes out]
(let [ln (count a)]
(loop [x 0]
(if ( x ln)
(do
(aset-byte out x (bit-xor (aget a x) (aget b x)))
(recur (inc x)))
On Thursday, March 13, 2014 6:26:33 AM UTC+1, Ignacio Corderi wrote:
Hey
Might be slow because of the polymorphic nature of nth. If you replace nth with
aget (and turn on *warn-on-reflection*, which is a good idea when
performance-tuning), you'll get reflection warnings because Clojure doesn't
know what Java method to use since it doesn't know what type of objects a
Hi Jay...
thanks for all the great new features.
There is just one strangeness I have, exceptions seem not to work with
more-, but did with given.
E.g.
(expect (more- false identity
AssertionError assert)
false)
fails with reporting
failure in ( sample_test.clj:4) :
Looks great! thanks for sharing
On Thu, Mar 13, 2014 at 6:25 AM, Jochen joc...@riekhof.de wrote:
Hi Jay...
thanks for all the great new features.
There is just one strangeness I have, exceptions seem not to work with
more-, but did with given.
E.g.
(expect (more- false identity
You could also try out:
http://docs.paralleluniverse.co/pulsar/
Am Dienstag, 11. März 2014 18:39:54 UTC+1 schrieb Эльдар Габдуллин:
Each go block is executed via thread pool. On a channel side, producers
and consumers are also decoupled.
Such decoupling costs around 10-20 us per async
FWIW, here is some helper code, to conveniently call jquery and other
object-method style libraries under advanced compilation without needing
externs or wrap the possible methods beforehand.
Macros can be called with plain symbols.
Hi Jay
unfortunately I found another one, again on AssertionErrors but this time
with for-each:
(expect AssertionError (from-each [a [1 2]] (assert (string? a ;; all
pass as intended
(expect AssertionError (from-each [a [1 2]] (assert (string? a ;;
still all pass but should signal
Thanks for all the examples, I'll look today at getting these fixed up.
On Thursday, March 13, 2014, Jochen joc...@riekhof.de wrote:
Hi Jay
unfortunately I found another one, again on AssertionErrors but this time
with for-each:
(expect AssertionError (from-each [a [1 2]] (assert
Hello everybody,
I just submitted my proposal for this year's GSoC. I already introduced the
topic on this mailing list.
Here you can find the complete proposal:
http://www.google-melange.com/gsoc/proposal/public/google/gsoc2014/matteo_ceccarello/5778586438991872
So, if you have suggestions on
Hi, Ignacio.
Performance tuning in clojure being somewhat complicated, I would look for
prior art here. For instance, the suggestions above give me a 6x speedup,
but it's still *way* slower than the equivalent java code. So I used
Prismatic's hiphip (array)! library on your problem (but with
Andrew,
I've tried the new JARs on a couple of projects and I have not encountered
these issues. Did you make sure to run a `lein cljsbuild clean`?
Thanks.
David
On Wed, Mar 12, 2014 at 8:19 PM, Andrew Keedle akee...@gmail.com wrote:
Stuart,
Did you ever get any response to this? I made
Agreed with all the comments on this so far. I would also say that dotimes
is slower than loop for stuff like this so I would also make that change.
(defn inplace-xor [^bytes a ^bytes b ^bytes out]
(let [len (alength a)]
(loop [i 0]
(when ( i len)
(aset-byte out i (bit-xor
On Mar 13, 2014, at 07:34 , Alex Miller a...@puredanger.com wrote:
Agreed with all the comments on this so far. I would also say that dotimes is
slower than loop for stuff like this so I would also make that change.
The dotimes version is slightly faster on my hardware. Why would it be
Instead (! channel) (! channel val) you do (! (take! channel)) (!
(put channel val)).
That would make channels even slower, not to mention that it would probably
completely break interaction with alts!.
I'm not saying it absolutely couldn't be done, I just don't see a need for
it. core.async is
Note that looping with primitive int is faster than with long, and native
array functions accepts/returns int instead of long for their index and
length.
It is very hard to eliminate boxing without dropping to java. In you
example, calling bit-xor does 2 autoboxing (and 1 long to int cast as
Hi there
Is there any difference between declare and def when I'm making a forward
declaration?
Thanks
Plínio
--
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
#'declare adds extra meta to the var {:declared true}
I don't think it's being used right now, but it can be specially handled by
the compiler, for example, to ignore the #'declare stataments from the
emitted bytecode, I'm experimenting with this here:
Wasn't aware of that.
Looks like it's being used here
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L401
Thanks,
Ambrose
On Thu, Mar 13, 2014 at 10:14 PM, Gal Dolber g...@dolber.com wrote:
#'declare adds extra meta to the var {:declared true}
I don't
Based on what Jozef said, I could write
(defn inplace-xor-hh [^bytes a ^bytes b ^bytes out]
(hiphip.array/afill! Byte/TYPE [_ out x a y b] (bit-xor (long x) (long
y
It took 2 ms on my machine, vs. 80 ms for the 'dotimes' solution.' I think
that matches java's speed, but if not, I'm
Huge apologies Stuart and David. In one of my projects I have a :hook for
leiningen.cljsbuild. In the one I was testing and on a lein new mies ... it
doesn't; so my lein clean was not doing a lein cljsbuild clean. Doh!!!
Sorry for wasting your precious time and thanks for all your efforts on
Wonderful! I was looking for something like this for a while. I've managed
to make it work following the instructions (after creating a symlink from
qcon2014 to qcon), and I plan to use it for my next presentation. It'd be
very useful a way to easily create blank slide decks (lein template and
I'm developing applications in CFML, which runs on the JVM. If you use the
open source Railo version, it is possible to run Clojure and CFML side by
side, sharing data structures between them, which should allow you to
refactor, or initially build, those parts of the application that would
benefit
The Clojure lint tool Eastwood (https://github.com/jonase/eastwood) uses
this {:declared true} metadata to distinguish between a declare followed
later by a def on the same var (no warning) from a def followed later by
another def on the same var (when it issues a warning).
declare is also an
Hey, I love your write-up! You should put that in a blog post so more
people can read it share it.
Alan
On Mar 12, 2014 2:00 PM, da...@dsargeant.com wrote:
I just spent the day writing this document for my boss, called The case
for Clojure. I hope it helps. We are in exactly the same boat,
Hi,
So the other day I came across this
presentation:http://www.infoq.com/presentations/top-10-performance-myths
The guy seems to be smart and know what he talks about however when at
0:22:35 he touches on performance (or lack of thereof) of persistent data
structures on multi-core machines I
Hi Malcolm,
Love the code, excited about the talk as well. Will it eventually end up on
infoq.com/Clojure?
thanks in advance
lvh
--
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
I talked to Martin after a CodeMesh, and had a wonderful discussion with
him about performance from his side of the issue. From his side I mean
super high performance. You have to get a bit of background on some of his
work (at least the work he talks about), much of what he does is high
As the author of cfmljure, it's not something I'd recommend anyone to use in
its current form and combining CFML and Clojure (as we do at World Singles) is
a bit of a dark art that I wouldn't encourage others to attempt, unless they're
already up to their eyeballs in CFML, and running on Railo
Ah, that's a pity cfmljure isn't as easy to use as I thought it was. In the
tradeoff between skilled Clojure developers being a rare and perhaps
expensive commodity and the need to rapidly develop an app
to fulfill business goals (and keep your job), cfmljure seems like it could
offer a means to
My best guess would be that I've used the loop version in places where I
had (set! *unchecked-math* true) - I see that dotimes uses unchecked-inc so
that might explain it. See what happens with this version.
(defn inplace-xor [^bytes a ^bytes b ^bytes out]
(let [len (alength a)]
(loop [i
I believe Clojure does tend to use the JVM GC more than idiomatic Java
does, but I haven't really noticed any slowdown related to this.
My guess is that it really depends on what you're doing. Clojure data
structures are pretty fast, and there are optimisation like transient
collections that
(related: asteroids in cal, by way of haskell.
http://s3.amazonaws.com/ns999/cal.html)
--
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 - please
This is a lot messier than I thought it would be.
So far the fastest code is from @Michael_Gardner with the dotimes (~100ms)
Once I add :jvm-opts ^:replace [] on my profile and (set! *unchecked-math*
true) several examples drop to ~80ms
but @Leif example using hiphip drops to ~30ms.
@Leif I
i also did an asteroid game in clojure. i don't think you can ever achieve
the performance of hackedyhack-mutablility with pure functional algorithms
- my approach to get the best performance while staying as clean as
possible would be to keep two copies of the game world, using one as source
data
Matteo,
best of luck with your proposal, all of those seem like good potential
additions to the clojure data-structure landscape.
BTW I'm too a fellow UniPD clojure user so you can inc the counter :)
Nicola
Matteo Ceccarello writes:
Hello everybody,
I just submitted my proposal for this
Ok so,
This is what i got of running @Lein code example using hiphip 4 times in a
row,
performance is now acceptable add I'm happy about it
Elapsed time: 9.096 msecs
Elapsed time: 1.707 msecs
Elapsed time: 1.493 msecs
Elapsed time: 0.839 msecs
Turning :aot on didn't fix the first outlier, so
Oh wow, thanks for all the responses!
I'm certainly not making it a PHP vs. Clojure all or nothing debate.
Anything other than PHP would be helpful, not simply because I want to bad
mouth PHP. After 2 years working with it I know firsthand its shortcomings
for building actual applications.
Did anyone ever get this working ?
On Saturday, January 25, 2014 10:42:27 AM UTC-5, Magomimmo wrote:
On Jan 25, 2014, at 2:12 AM, Alexandr Kurilin
al...@kurilin.netjavascript:
wrote:
I'd love to be able to set breakpoints in a running clojure application,
step through the code and
Hey,
I'm applying to GSoC this year, and I'm looking for mentors.
I want to create a cljs-idiomatic web graphics package. I have graphics
programming experience, being a member of the Processing and openFrameworks
communities, and a researcher at Ken Perlin's lab at NYU.
While I'm still
On Thu, Mar 13, 2014 at 11:24 AM, Timothy Baldridge tbaldri...@gmail.comwrote:
I talked to Martin after a CodeMesh, and had a wonderful discussion with
him about performance from his side of the issue. From his side I mean
super high performance.
[...]
Hi Tim,
Thanks for explaining the
44 matches
Mail list logo