clojure testing

2014-03-13 Thread Ashutosh Varshney
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
 true
 (valid? "ashutosh" "a...@gmail.com" "99" "tesxt message"))

  act-msg: exception in actual: (valid? "ashutosh" "a...@gmail.com" 
"99" "tesxt message")
threw: class java.lang.ClassCastException - clojure.lang.Var$Unbound 
cannot be cast to java.util.concurrent.Future
   noir.validation$get_errors$doInvoke (validation.clj:94)
   noir.validation$errors_QMARK_$doInvoke (validation.clj:140)
   on (contact.clj:34)
   on (contact.clj:32)

Ran 1 tests containing 1 assertions in 76 msecs
0 failures, 1 errors.

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help a Startup use Clojure!

2014-03-13 Thread Savas Alparslan
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,  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, so it
> should be extremely relevant.
>
> P.S. If the company I work doesn't make the switch I plan on looking for a
> new position.  So hit me up if you're in need of another Clojure developer.
>
> David
>
>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Clojure programs Implemented to DaCapo benchmark harness??

2014-03-13 Thread Spyros Ts
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 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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


XOR two arrays into a third on Clojure

2014-03-13 Thread Ignacio Corderi
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 

(def out-mb (byte-array (* 1024 1024)))

;; question is... how do you code this guy, so that it doesn't take forever

(defn inplace-xor [a b out]
  (def ln (count a))
  (loop [x 0]
(if (< x ln)
  (do 
(aset-byte out x (bit-xor (nth a x) (nth b x)))
(recur (+ x 1))


;; checking the time 

(time (inplace-xor one-mb another-mb out-mb))

;; takes about ~400ms which is well... A LOT

;; I'm happy to receive a solution that involves calling some java 
library...

Thanks in advance!
-Ignacio

 

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Walter van der Laan
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 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 
>
> (def out-mb (byte-array (* 1024 1024)))
>
> ;; question is... how do you code this guy, so that it doesn't take forever
>
> (defn inplace-xor [a b out]
>   (def ln (count a))
>   (loop [x 0]
> (if (< x ln)
>   (do 
> (aset-byte out x (bit-xor (nth a x) (nth b x)))
> (recur (+ x 1))
> 
>
> ;; checking the time 
>
> (time (inplace-xor one-mb another-mb out-mb))
>
> ;; takes about ~400ms which is well... A LOT
>
> ;; I'm happy to receive a solution that involves calling some java 
> library...
>
> Thanks in advance!
> -Ignacio
>
>  
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Michael Gardner
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 and b 
are. Once you silence those with type hints like in Walter's example, you get 
roughly a 2x speedup (in my tests).

BTW, I'd write it like this:

(defn inplace-xor [^bytes a ^bytes b ^bytes out]
(dotimes [i (alength a)]
(aset-byte out i
(bit-xor (aget a i) (aget b i)

On Mar 13, 2014, at 00:26 , Ignacio Corderi  wrote:

> 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 
> 
> (def out-mb (byte-array (* 1024 1024)))
> 
> ;; question is... how do you code this guy, so that it doesn't take forever
> 
> (defn inplace-xor [a b out]
>   (def ln (count a))
>   (loop [x 0]
> (if (< x ln)
>   (do 
> (aset-byte out x (bit-xor (nth a x) (nth b x)))
> (recur (+ x 1))
> 
> 
> ;; checking the time 
> 
> (time (inplace-xor one-mb another-mb out-mb))
> 
> ;; takes about ~400ms which is well... A LOT
> 
> ;; I'm happy to receive a solution that involves calling some java library...
> 
> Thanks in advance!
> -Ignacio
> 
>  
> 
> -- 
> 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 be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: expectations 2.0 has been released

2014-03-13 Thread Jochen
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) : sample-test
 >> (expect (more-> false identity AssertionError assert) false)
 >>exp-msg: exception in expected: (more-> false identity 
AssertionError assert)
>> threw: class java.lang.AssertionError - Assert failed: x__653__auto__
>>on (sample_test.clj:4)
>> Ran 1 tests containing 1 assertions in 55 msecs
 >> 0 failures, 1 errors.

, but 

(expect AssertionError (assert false))

still works.

Ciao

...Jochen


Am Mittwoch, 12. März 2014 02:28:37 UTC+1 schrieb Jay Fields:
>
> expectations is a minimilist's unit testing framework 
>
> website: http://jayfields.com/expectations/ 
> github: https://github.com/jaycfields/expectations 
>
> changelog: 
> https://github.com/jaycfields/expectations/blob/master/CHANGELOG.md 
>
> some large changes that will hopefully result in even more concise and 
> maintainable tests. 
>
> feedback always welcome. 
>
> Jay 
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: expectations 2.0 has been released

2014-03-13 Thread Gal Dolber
Looks great! thanks for sharing


On Thu, Mar 13, 2014 at 6:25 AM, Jochen  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
> AssertionError assert)
> false)
>
> fails with reporting
>
> >> failure in ( sample_test.clj:4) : sample-test
>  >> (expect (more-> false identity AssertionError assert) false)
> >>exp-msg: exception in expected: (more-> false identity
> AssertionError assert)
> >> threw: class java.lang.AssertionError - Assert failed:
> x__653__auto__
> >>on (sample_test.clj:4)
> >> Ran 1 tests containing 1 assertions in 55 msecs
> >> 0 failures, 1 errors.
>
> , but
>
> (expect AssertionError (assert false))
>
> still works.
>
> Ciao
>
> ...Jochen
>
>
> Am Mittwoch, 12. März 2014 02:28:37 UTC+1 schrieb Jay Fields:
>
>> expectations is a minimilist's unit testing framework
>>
>> website: http://jayfields.com/expectations/
>> github: https://github.com/jaycfields/expectations
>>
>> changelog: https://github.com/jaycfields/expectations/blob/master/
>> CHANGELOG.md
>>
>> some large changes that will hopefully result in even more concise and
>> maintainable tests.
>>
>> feedback always welcome.
>>
>> Jay
>>
>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: core.async is very slow for some cases, what to do?

2014-03-13 Thread Jörg Winter
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 operation. For the cases 
> when your async
> values are immediately available (e.g. from cache), or when you designed 
> an async
> API just because your operations may block for a long but not necessary 
> do, those are huge numbers.
>
> For example, I recently worked on a dependency injection 
> container which 
> supports async computations.
> Asynchrony in one place means that all you API will be async everywhere. 
> Natural way to go with implementation is to just
> wrap everything in a go block. However, after doing that I found that 
> container became 50 times slower. 5 us overhead for a
> typical task turned into 250 us.
>
> As a solution I forked  core.async 
> and replaced channels with lightweight promises and removed thread pool 
> dispatch from
> everywhere. Now async container implementation is only 5 times slower than 
> its sync version, which is probably acceptable.
>
> I'd like to hear what others think about this issue, especially members of 
> the core team. 
>
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: jquery/$ in cljs

2014-03-13 Thread Herwig Hochleitner
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.

https://github.com/webnf/webnf/blob/master/cljs/src/webnf/util.clj#L29
https://github.com/webnf/webnf/blob/master/cljs/src/webnf/util.cljs#L46


2014-03-12 20:30 GMT+01:00 t x :

> @Timothy, James: Everything works now. Thanks!
>
> On Wed, Mar 12, 2014 at 10:38 AM, James Reeves 
> wrote:
> > Take a look at jayq: https://github.com/ibdknox/jayq
> >
> > - James
> >
> >
> > On 12 March 2014 17:14, t x  wrote:
> >>
> >> Hi,
> >>
> >>   Consider
> >>
> https://github.com/extend/bullet/blob/master/examples/clock/src/toppage_handler.erl#L50-L57
> >>
> >>   I want to know how to express "$.bullet" in cljs (when compiled with
> >> optimiztaions: advanced).
> >>
> >>   I know how to use things like
> >>
> >>
> >>   (js/console.log ... )
> >>   (js/MathJax ... )
> >>
> >>   However, what I'm stuck on here is how to use "$" in cljs land.
> >>
> >> Thanks!
> >>
> >> --
> >> 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 be patient with
> >> your first post.
> >> To unsubscribe from this group, send email to
> >> clojure+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >> http://groups.google.com/group/clojure?hl=en
> >> ---
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Clojure" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to clojure+unsubscr...@googlegroups.com.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > 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 be patient with
> your
> > first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "Clojure" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to clojure+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: expectations 2.0 has been released

2014-03-13 Thread Jochen
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 1 error
(expect AssertionError (from-each [a ["1" 2]] (assert (string? a ;; 
still all pass but should signal 1 error
(expect AssertionError (from-each [a ["1" "2"]] (assert (string? a ;; 
shows both errors

Ciao

...Jochen

Am Mittwoch, 12. März 2014 02:28:37 UTC+1 schrieb Jay Fields:

> expectations is a minimilist's unit testing framework 
>>
>> website: http://jayfields.com/expectations/ 
>> github: https://github.com/jaycfields/expectations 
>>
>> changelog: 
>> https://github.com/jaycfields/expectations/blob/master/CHANGELOG.md 
>>
>> some large changes that will hopefully result in even more concise and 
>> maintainable tests. 
>>
>> feedback always welcome. 
>>
>> Jay 
>>
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: expectations 2.0 has been released

2014-03-13 Thread Jay Fields
Thanks for all the examples, I'll look today at getting these fixed up.

On Thursday, March 13, 2014, Jochen  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 (string? a ;; all
> pass as intended
> (expect AssertionError (from-each [a [1 "2"]] (assert (string? a ;;
> still all pass but should signal 1 error
> (expect AssertionError (from-each [a ["1" 2]] (assert (string? a ;;
> still all pass but should signal 1 error
> (expect AssertionError (from-each [a ["1" "2"]] (assert (string? a ;;
> shows both errors
>
> Ciao
>
> ...Jochen
>
> Am Mittwoch, 12. März 2014 02:28:37 UTC+1 schrieb Jay Fields:
>
>> expectations is a minimilist's unit testing framework
>>>
>>> website: http://jayfields.com/expectations/
>>> github: https://github.com/jaycfields/expectations
>>>
>>> changelog: https://github.com/jaycfields/expectations/blob/master/
>>> CHANGELOG.md
>>>
>>> some large changes that will hopefully result in even more concise and
>>> maintainable tests.
>>>
>>> feedback always welcome.
>>>
>>> Jay
>>>
>>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/exQyg9YUUas/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[GSoC] Proposal: persistent probabilistic data structures

2014-03-13 Thread Matteo Ceccarello
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 how to improve it, or if you have any 
request, please tell me :)

I'm really looking forward to work with Clojure for this year's GSoC: I 
want to learn it really well, since
my long term goal is to make more and more people at my University use it. 
Working on an open source project
under the guidance of an expert mentor seems to me the best way to achieve 
this.

Bests
Matteo

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Leif
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 longs) and 
got close to java for-loop speed:

https://github.com/Prismatic/hiphip

They are focused on numerics, so they don't have support for bytes/shorts, 
but it looks like you could add that fairly easily.  Or maybe someone has 
already written a equivalent library for bit-twiddling.  I would look/ask 
around.

If you're interested, the main slowdown in the above suggestions is 
probably the extra work from safe typecasts clojure does.  The hiphip 
library uses the unsafe equivalents from clojure.lang.RT.

Cheers,
Leif

On Thursday, March 13, 2014 1:26:33 AM UTC-4, Ignacio Corderi wrote:
>
> 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 
>
> (def out-mb (byte-array (* 1024 1024)))
>
> ;; question is... how do you code this guy, so that it doesn't take forever
>
> (defn inplace-xor [a b out]
>   (def ln (count a))
>   (loop [x 0]
> (if (< x ln)
>   (do 
> (aset-byte out x (bit-xor (nth a x) (nth b x)))
> (recur (+ x 1))
> 
>
> ;; checking the time 
>
> (time (inplace-xor one-mb another-mb out-mb))
>
> ;; takes about ~400ms which is well... A LOT
>
> ;; I'm happy to receive a solution that involves calling some java 
> library...
>
> Thanks in advance!
> -Ignacio
>
>  
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ClojureScript] Re: Test G.Closure lib release 0.0-20140226-71326067

2014-03-13 Thread David Nolen
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  wrote:

> Stuart,
> Did you ever get any response to this? I made the changes as suggested in
> the gist and ran into problems. With a simple [goog.events :as events] in
> the ns and optimizations :none I get the attached errors on a simple
> project from a lein new mies... optimizations :simple appears to work fine
> for this and more complicated setups.
>
> Thanks,
> Andrew
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Alex Miller
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 (aget a i) (aget b i)))
(recur (inc i))

In this scenario loop/recur will use a primitive long for i.  And then I 
would look at the bytecode to verify no boxing is occurring.

On Thursday, March 13, 2014 3:36:14 AM UTC-5, Michael Gardner wrote:
>
> 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 
> and b are. Once you silence those with type hints like in Walter's example, 
> you get roughly a 2x speedup (in my tests). 
>
> BTW, I'd write it like this: 
>
> (defn inplace-xor [^bytes a ^bytes b ^bytes out] 
> (dotimes [i (alength a)] 
> (aset-byte out i 
> (bit-xor (aget a i) (aget b i) 
>
 

>
> On Mar 13, 2014, at 00:26 , Ignacio Corderi 
> > 
> wrote: 
>
> > 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 
> > 
> > (def out-mb (byte-array (* 1024 1024))) 
> > 
> > ;; question is... how do you code this guy, so that it doesn't take 
> forever 
> > 
> > (defn inplace-xor [a b out] 
> >   (def ln (count a)) 
> >   (loop [x 0] 
> > (if (< x ln) 
> >   (do 
> > (aset-byte out x (bit-xor (nth a x) (nth b x))) 
> > (recur (+ x 1)) 
> >  
> > 
> > ;; checking the time 
> > 
> > (time (inplace-xor one-mb another-mb out-mb)) 
> > 
> > ;; takes about ~400ms which is well... A LOT 
> > 
> > ;; I'm happy to receive a solution that involves calling some java 
> library... 
> > 
> > Thanks in advance! 
> > -Ignacio 
> > 
> >   
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Clojure" group. 
> > To post to this group, send email to clo...@googlegroups.com 
> > Note that posts from new members are moderated - please be patient with 
> your first post. 
> > To unsubscribe from this group, send email to 
> > clojure+u...@googlegroups.com  
> > For more options, visit this group at 
> > http://groups.google.com/group/clojure?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups "Clojure" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to clojure+u...@googlegroups.com . 
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Michael Gardner
On Mar 13, 2014, at 07:34 , Alex Miller  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 slower?

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: core.async is very slow for some cases, what to do?

2014-03-13 Thread Timothy Baldridge
>> Instead (! channel val) you do ( wrote:

> 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 operation. For the cases
>> when your async
>> values are immediately available (e.g. from cache), or when you designed
>> an async
>> API just because your operations may block for a long but not necessary
>> do, those are huge numbers.
>>
>> For example, I recently worked on a dependency injection 
>> container which
>> supports async computations.
>> Asynchrony in one place means that all you API will be async everywhere.
>> Natural way to go with implementation is to just
>> wrap everything in a go block. However, after doing that I found that
>> container became 50 times slower. 5 us overhead for a
>> typical task turned into 250 us.
>>
>> As a solution I forked  core.async
>> and replaced channels with lightweight promises and removed thread pool
>> dispatch from
>> everywhere. Now async container implementation is only 5 times slower
>> than its sync version, which is probably acceptable.
>>
>> I'd like to hear what others think about this issue, especially members
>> of the core team.
>>
>>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
“One of the main causes of the fall of the Roman Empire was that–lacking
zero–they had no way to indicate successful termination of their C
programs.”
(Robert Firth)

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Jozef Wagner
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
aset-byte takes int index), as there is no byte variant of
clojure.lang.Numbers/xor.

Also you cannot detect it without advanced profiler or bytecode analysis.

Best,
Jozef


On Thu, Mar 13, 2014 at 1:34 PM, Alex Miller  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.
>
> (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 (aget a i) (aget b i)))
> (recur (inc i))
>
> In this scenario loop/recur will use a primitive long for i.  And then I
> would look at the bytecode to verify no boxing is occurring.
>
> On Thursday, March 13, 2014 3:36:14 AM UTC-5, Michael Gardner wrote:
>>
>> 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
>> and b are. Once you silence those with type hints like in Walter's example,
>> you get roughly a 2x speedup (in my tests).
>>
>> BTW, I'd write it like this:
>>
>> (defn inplace-xor [^bytes a ^bytes b ^bytes out]
>> (dotimes [i (alength a)]
>> (aset-byte out i
>> (bit-xor (aget a i) (aget b i)
>>
>
>
>>
>> On Mar 13, 2014, at 00:26 , Ignacio Corderi 
>> wrote:
>>
>> > 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
>> >
>> > (def out-mb (byte-array (* 1024 1024)))
>> >
>> > ;; question is... how do you code this guy, so that it doesn't take
>> forever
>> >
>> > (defn inplace-xor [a b out]
>> >   (def ln (count a))
>> >   (loop [x 0]
>> > (if (< x ln)
>> >   (do
>> > (aset-byte out x (bit-xor (nth a x) (nth b x)))
>> > (recur (+ x 1))
>> > 
>> >
>> > ;; checking the time
>> >
>> > (time (inplace-xor one-mb another-mb out-mb))
>> >
>> > ;; takes about ~400ms which is well... A LOT
>> >
>> > ;; I'm happy to receive a solution that involves calling some java
>> library...
>> >
>> > Thanks in advance!
>> > -Ignacio
>> >
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Clojure" group.
>> > To post to this group, send email to clo...@googlegroups.com
>> > Note that posts from new members are moderated - please be patient with
>> your first post.
>> > To unsubscribe from this group, send email to
>> > clojure+u...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/clojure?hl=en
>> > ---
>> > You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an email to clojure+u...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


declare and def

2014-03-13 Thread Plínio Balduino
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 members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: declare and def

2014-03-13 Thread Ambrose Bonnaire-Sergeant
No difference, but declare can take multiple vars as arguments.

Thanks,
Ambrose


On Thu, Mar 13, 2014 at 9:51 PM, Plínio Balduino wrote:

> 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 members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: declare and def

2014-03-13 Thread Gal Dolber
#'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:

https://github.com/galdolber/clojurefast/commit/649672baede3e0f1cc8b3e9e42b6e899927a9c09


On Thu, Mar 13, 2014 at 10:57 AM, Ambrose Bonnaire-Sergeant <
abonnaireserge...@gmail.com> wrote:

> No difference, but declare can take multiple vars as arguments.
>
> Thanks,
> Ambrose
>
>
> On Thu, Mar 13, 2014 at 9:51 PM, Plínio Balduino wrote:
>
>> 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 members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: declare and def

2014-03-13 Thread Ambrose Bonnaire-Sergeant
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  wrote:

> #'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:
>
>
> https://github.com/galdolber/clojurefast/commit/649672baede3e0f1cc8b3e9e42b6e899927a9c09
>
>
> On Thu, Mar 13, 2014 at 10:57 AM, Ambrose Bonnaire-Sergeant <
> abonnaireserge...@gmail.com> wrote:
>
>> No difference, but declare can take multiple vars as arguments.
>>
>> Thanks,
>> Ambrose
>>
>>
>> On Thu, Mar 13, 2014 at 9:51 PM, Plínio Balduino wrote:
>>
>>> 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 members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> 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 be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adatx - Test driven development... literally.

2014-03-13 Thread Ludwik Grodzki
Not yet.

On Thursday, 13 March 2014 03:29:52 UTC, Alex Baranosky wrote:
>
> There goes my job...
>
>
> On Wed, Mar 12, 2014 at 8:00 PM, Timothy Washington 
> 
> > wrote:
>
>> This looks interesting. I was hammocking a solution that could use that. 
>> But on Infoq, I recently 
>> watchedWilliam
>>  Byrd, describing just this feature in MiniKanren. 
>>
>> As such, I expect to see this feature will be in core.logic. Did you 
>> explore that path? Was there something missing that prompted Adatx ? 
>>
>> Many thanks. 
>>
>>
>> Tim Washington 
>> Interruptsoftware.com  
>>
>>
>> On Sun, Mar 9, 2014 at 3:13 PM, Ludwik Grodzki 
>> > wrote:
>>
>>> ... and here's an example of how it works:
>>>
>>> (def workings
>>>  (adatx/prob-solve
>>>   {
>>>   :symvec['+ '- '* '/ 'x1 'x2]
>>>   :prog-holder   '(fn [x1 x2] :adatx.prog-hold/prog)
>>>   :in-out-pairs  [{:in [1 2] :out 4}
>>>   {:in [1 3] :out 5}
>>>   {:in [2 3] :out 7}
>>>   {:in [4 3] :out 11}]
>>>   :sandbox :none}))
>>> (adatx/get-solution workings); => (fn [x1 x2] (+ x1 x1 x2))
>>>
>>>
>>>
>>>
>>>
>>> On Saturday, 8 March 2014 21:30:56 UTC, Ludwik Grodzki wrote:

 Hello Clojure Group.

 I've put together a little library that writes clojure code for you... 
 given test input/output examples and a heuristic of relevant functions.

 https://github.com/LudoTheHUN/adatx

 Feedback + contributions very welcome.

 Regards.

 Ludwik.

  -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with 
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com 
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to clojure+u...@googlegroups.com .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Leif
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 guessing java is your only 
option.

Again, you saw how fiddly this all is: even with a library taking care of 
most of it, there was still tweaking to do (for the simplest possible 
operation).  That's why I think you should consider building on what 
Prismatic (or someone else with a byte-munging specific library, if that 
exists) has done.

--Leif

On Thursday, March 13, 2014 7:42:35 AM UTC-4, Leif wrote:
>
> 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 longs) and 
> got close to java for-loop speed:
>
> https://github.com/Prismatic/hiphip
>
> They are focused on numerics, so they don't have support for bytes/shorts, 
> but it looks like you could add that fairly easily.  Or maybe someone has 
> already written a equivalent library for bit-twiddling.  I would look/ask 
> around.
>
> If you're interested, the main slowdown in the above suggestions is 
> probably the extra work from safe typecasts clojure does.  The hiphip 
> library uses the unsafe equivalents from clojure.lang.RT.
>
> Cheers,
> Leif
>
> On Thursday, March 13, 2014 1:26:33 AM UTC-4, Ignacio Corderi wrote:
>>
>> 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 
>>
>> (def out-mb (byte-array (* 1024 1024)))
>>
>> ;; question is... how do you code this guy, so that it doesn't take 
>> forever
>>
>> (defn inplace-xor [a b out]
>>   (def ln (count a))
>>   (loop [x 0]
>> (if (< x ln)
>>   (do 
>> (aset-byte out x (bit-xor (nth a x) (nth b x)))
>> (recur (+ x 1))
>> 
>>
>> ;; checking the time 
>>
>> (time (inplace-xor one-mb another-mb out-mb))
>>
>> ;; takes about ~400ms which is well... A LOT
>>
>> ;; I'm happy to receive a solution that involves calling some java 
>> library...
>>
>> Thanks in advance!
>> -Ignacio
>>
>>  
>>
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ClojureScript] Re: Test G.Closure lib release 0.0-20140226-71326067

2014-03-13 Thread Andrew Keedle
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 all of 
the wonderful things you create that I get to use everyday.

Andrew

On Thursday, 13 March 2014 12:32:37 UTC, David Nolen  wrote:
> 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  wrote:
> 
> Stuart,
> 
> Did you ever get any response to this? I made the changes as suggested in the 
> gist and ran into problems. With a simple [goog.events :as events] in the ns 
> and optimizations :none I get the attached errors on a simple project from a 
> lein new mies... optimizations :simple appears to work fine for this and more 
> complicated setups.
> 
> 
> 
> 
> Thanks,
> 
> Andrew
> 
> 
> 
> 
> 
> --
> 
> Note that posts from new members are moderated - please be patient with your 
> first post.
> 
> ---
> 
> You received this message because you are subscribed to the Google Groups 
> "ClojureScript" group.
> 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojurescrip...@googlegroups.com.
> 
> To post to this group, send email to clojur...@googlegroups.com.
> 
> Visit this group at http://groups.google.com/group/clojurescript.

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Om-powered HTML slide-decks

2014-03-13 Thread Manuel Paccagnella
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 
appropriate lib(s)?).

Thanks for sharing!

Il giorno domenica 9 marzo 2014 10:45:01 UTC+1, Malcolm Sparks ha scritto:
>
> There are some HTML-based tools out there (reveal.js, slidy, impress.js, 
> deck.js ...) for building slide-based presentations for conference talks.
>
> But you usually have to write your slides in raw HTML. This feels 
> cumbersome when you're used to writing LISP s-expressions with paredit. And 
> if you want to build in more interactivity, you have to be proficient in 
> JavaScript.
>
> Last week I gave a presentation at QCon in London for which I built a 
> slide-deck in Om. This proved (far) easier than my previous failed attempts 
> with other technologies (including vanilla ClojureScript).
>
> I've found that ClojureScript + Om/RevealJS + core.async (go-blocks) also 
> makes a great platform for browser-based interactive SVG diagrams and 
> animations. Not quite Flash, but almost, and in some ways better.
>
> Anyway, I've uploaded the slides, code, instructions and everything to 
> here: https://github.com/juxt/qcon2014. in case anyone else wants to try 
> building an Om-based slide-deck at a future event.
>
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help a Startup use Clojure!

2014-03-13 Thread Nando Breiter
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 from Clojure, while still leveraging the fast and easy development
that CFML provides. My long term plan is to look at leveraging Clojure's
strengths within the current codebase I'm developing. The short-term plan
is to rapidly get the app to a stage where it is feature complete using
CFML only.

CFML has its legacy warts (as I'm sure PHP has as well), which can be
simply avoided when writing code. But it will be very easy for a developer
coming into CFML to get up to speed with the language. With the proper
guidance, a developer new to the language can be productive in several days
to a week's time.

http://github.com/framework-one/cfmljure



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia


On Thu, Mar 13, 2014 at 8:13 AM, Savas Alparslan  wrote:

> 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,  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, so it
>> should be extremely relevant.
>>
>> P.S. If the company I work doesn't make the switch I plan on looking for
>> a new position.  So hit me up if you're in need of another Clojure
>> developer.
>>
>> David
>>
>>  --
>> 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 be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: declare and def

2014-03-13 Thread Andy Fingerhut
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 explicit signal to the human reader that you do not
intend to give this var a value now, but you plan to later, either because
of mutual recursion in definitions, or for a preferred order of definitions
in the file that you believe is clearer.

Andy


On Thu, Mar 13, 2014 at 7:14 AM, Gal Dolber  wrote:

> #'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:
>
>
> https://github.com/galdolber/clojurefast/commit/649672baede3e0f1cc8b3e9e42b6e899927a9c09
>
>
> On Thu, Mar 13, 2014 at 10:57 AM, Ambrose Bonnaire-Sergeant <
> abonnaireserge...@gmail.com> wrote:
>
>> No difference, but declare can take multiple vars as arguments.
>>
>> Thanks,
>> Ambrose
>>
>>
>> On Thu, Mar 13, 2014 at 9:51 PM, Plínio Balduino wrote:
>>
>>> 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 members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> 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 be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help a Startup use Clojure!

2014-03-13 Thread Alan Thompson
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,  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, so it
> should be extremely relevant.
>
> P.S. If the company I work doesn't make the switch I plan on looking for a
> new position.  So hit me up if you're in need of another Clojure developer.
>
> David
>
>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


STM and persistent data structures performance on mutli-core archs

2014-03-13 Thread Andy C
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 feel puzzled.

He seems to have a point but really does not back it with any details.
There is also a claim that STM does not cooperate well with GC. Is it true?

Thanks,
Andy

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Om-powered HTML slide-decks

2014-03-13 Thread Laurens Van Houtven
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 that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: STM and persistent data structures performance on mutli-core archs

2014-03-13 Thread Timothy Baldridge
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
throughput trading systems. In these systems you will often see small
messages (50 bytes or so) and the the goal is to process them as quickly as
possible.

This means that almost everything is secondary to throughput. So let's take
that generalization and apply it to the more common work I or people like
me do...here we care mostly about programmer productivity, and making
simpler systems. Here immutability and STM like concepts (I'm dumping STM
in with atoms here) work pretty well.

At one point in our conversation Martin mentioned that he was able to get
about 100,000 messages through his system a second. That's awesome! How
often do you have 100k messages in your system?

Everything has tradeoffs. One more example was when Martin explained how he
was able to get a 10x performance boost by pinning a JVM to each socket in
a server, then pinning that JVM's memory to the RAM sockets closest to that
CPU socket. Then he carefully setup shared memory message passing via
burning one core on each CPU to monitor the queues, and moving messages
only in the directions directly supported by the Hyper Transport bus. Once
again, that's amazing...once again I've never needed that to ship a
product.

Sadly, other parts of that talk are very true. Many programmers I've talked
to don't understand the difference between a hash map and a list, let alone
understand when they would use them. So I'll fight that battle, and Martin
can fight his, and I'll apply his work to my problems as the solution fits.

So that's the way I view it. I don't claim to know much at all about
Martin's work, I just know enough to know that I don't deal with those
problems. Most servers I work on are idle at least 50% of the time. And
when they do get overloaded I can just startup more machines.

Timothy


On Thu, Mar 13, 2014 at 10:58 AM, Andy C  wrote:

> 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 feel puzzled.
>
> He seems to have a point but really does not back it with any details.
> There is also a claim that STM does not cooperate well with GC. Is it true?
>
> Thanks,
> Andy
>
>
>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
"One of the main causes of the fall of the Roman Empire was that-lacking
zero-they had no way to indicate successful termination of their C
programs."
(Robert Firth)

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help a Startup use Clojure!

2014-03-13 Thread Sean Corfield
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 (instead of Adobe's 
commercial product), and they are desperate to use Clojure _as well_ rather 
than _instead_.

I'm working on a new version of cfmljure that will be MUCH easier to use but 
I'm wrestling with classloader issues (due to quirks in how both Railo and 
Clojure deal with classloaders).

And good luck persuading anyone that a startup, with some PHP and some Clojure 
experience, should consider CFML / Railo instead :)

Sean

On Mar 13, 2014, at 8:49 AM, Nando Breiter  wrote:

> 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 from Clojure, while still leveraging the fast and easy development 
> that CFML provides. My long term plan is to look at leveraging Clojure's 
> strengths within the current codebase I'm developing. The short-term plan is 
> to rapidly get the app to a stage where it is feature complete using CFML 
> only.
> 
> CFML has its legacy warts (as I'm sure PHP has as well), which can be simply 
> avoided when writing code. But it will be very easy for a developer coming 
> into CFML to get up to speed with the language. With the proper guidance, a 
> developer new to the language can be productive in several days to a week's 
> time.
> 
> http://github.com/framework-one/cfmljure




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Help a Startup use Clojure!

2014-03-13 Thread Nando Breiter
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 slowly integrate and learn Clojure as skills and a real
need develop.



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia


On Thu, Mar 13, 2014 at 7:58 PM, Sean Corfield  wrote:

> 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 (instead of Adobe's commercial product), and they are desperate to
> use Clojure _as well_ rather than _instead_.
>
> I'm working on a new version of cfmljure that will be MUCH easier to use
> but I'm wrestling with classloader issues (due to quirks in how both Railo
> and Clojure deal with classloaders).
>
> And good luck persuading anyone that a startup, with some PHP and some
> Clojure experience, should consider CFML / Railo instead :)
>
> Sean
>
> On Mar 13, 2014, at 8:49 AM, Nando Breiter  wrote:
>
> 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 from Clojure, while still leveraging the fast and easy development
> that CFML provides. My long term plan is to look at leveraging Clojure's
> strengths within the current codebase I'm developing. The short-term plan
> is to rapidly get the app to a stage where it is feature complete using
> CFML only.
>
> CFML has its legacy warts (as I'm sure PHP has as well), which can be
> simply avoided when writing code. But it will be very easy for a developer
> coming into CFML to get up to speed with the language. With the proper
> guidance, a developer new to the language can be productive in several days
> to a week's time.
>
> http://github.com/framework-one/cfmljure
>
>
>
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Alex Miller
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 0]
  (when (< i len)
(aset-byte out i (bit-xor (aget a i) (aget b i)))
(recur (*unchecked-*inc i))

As someone mentions later in this thread, it really pays to read the 
compiled bytecode for this stuff and check for boxing.

On Thursday, March 13, 2014 7:39:01 AM UTC-5, Michael Gardner wrote:
>
> On Mar 13, 2014, at 07:34 , Alex Miller > 
> 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 
> slower?

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: shenandoah

2014-03-13 Thread James Reeves
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 allow one to gain additional speed without altering the
structure of your application. I suspect that a different GC might have
some effect, but not a substantial one in the majority of cases.

How was your asteroids clone designed? Does it happen to create a lot of
objects that might be later GCed? Do you have the code up online anywhere?

- James


On 12 March 2014 23:19, Jacob Goodson  wrote:

> Let me state that, as long as it is a asteroids clone, it is fine.
> However, compared to Java, the performance was much worse(when just playing
> with it and drawing tons of asteroids in opengl).  Also, I do not know what
> you mean when you say that you have tested it... the
>
> pure way or the mutate objects in place way?  I can get great performance
> with clojure, no doubt about it, by violating the shat out of functional
> programming.  I can not get great performance with the beautiful, pure,
> composable, clojure that I desire!  I have seen many game
>
> examples in "clojure" where, basically, clojure is just a scripting
> language that wraps java.  It is no problem if this is the case, my
> question has jack crap to do about getting good performance writing
> asteroids.  My question is: Will clojure(the immutable composable side)
>
> benefit from shenandoah(blasted font) at all?  Can someone who knows a
> good bit about clojure tell me if a more powerful garbage collector would
> allow us clojurians to be more pure or is it something else inherently in
> immutable land that will "never"(it will take a long time) get fixed.
>
>
> On Wednesday, March 12, 2014 6:53:43 PM UTC-4, James Reeves wrote:
>
>> I've done a fair bit of experimentation with writing games in Clojure,
>> and I haven't noticed any major performance issues. If you're getting
>> issues on a 2D asteroids clone, I suspect there might be something
>> inefficient in your code. I find Criterium useful for benchmarking parts of
>> my code in isolation to get an idea of how its running.
>>
>> - James
>>
>>
>> On 12 March 2014 21:53, Jacob Goodson  wrote:
>>
>>> How many people have heard of this GC?  http://www.jclarity.com/2014/
>>> 02/19/shenandoah-a-new-low-pause-garbage-collection-
>>> algorithm-for-the-java-hotspot-jvm/
>>>
>>> I want to know if this would benefit clojure.  I wrote a small asteroids
>>> game in clojure and the performance was not good.  I stuck to purity when
>>> writing the game, only "mutating" my data after it had passed through a
>>> bazillion pure functions.  I was wondering, would a GC like this one(or
>>> Azul's) make a significant impact so that I, or others, could make games in
>>> a more pure fashion?  I WANT MY EFFIN PURITY!
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com
>>>
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+u...@googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: shenandoah

2014-03-13 Thread Raoul Duke
(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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Ignacio Corderi
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 can't get the ~2ms you have, I'm probably missing some extra flag 
to achieve the extra order of magnitude drop. 
~2ms would be acceptable and comparable to my python implementation, I'm 
sure java would be somewhere in the vicinity of that too. 


Thanks to everyone for the replies!
-Ignacio


-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: shenandoah

2014-03-13 Thread Dennis Haupt
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 and generating the next version into the other, and vice versa.
similar to double buffering.
as long as you can guarantee that objects in the "working copy" are just
data that is not referenced anywhere, you can pretend that an "initAll"
method on an object is nothing else than a fully working constructor - just
that the object you initialize is initially filled with random data instead
of not yet existing.
you can pretend it's new, and pretend your algorithms are functional^^


2014-03-13 0:19 GMT+01:00 Jacob Goodson :

> Let me state that, as long as it is a asteroids clone, it is fine.
> However, compared to Java, the performance was much worse(when just playing
> with it and drawing tons of asteroids in opengl).  Also, I do not know what
> you mean when you say that you have tested it... the
>
> pure way or the mutate objects in place way?  I can get great performance
> with clojure, no doubt about it, by violating the shat out of functional
> programming.  I can not get great performance with the beautiful, pure,
> composable, clojure that I desire!  I have seen many game
>
> examples in "clojure" where, basically, clojure is just a scripting
> language that wraps java.  It is no problem if this is the case, my
> question has jack crap to do about getting good performance writing
> asteroids.  My question is: Will clojure(the immutable composable side)
>
> benefit from shenandoah(blasted font) at all?  Can someone who knows a
> good bit about clojure tell me if a more powerful garbage collector would
> allow us clojurians to be more pure or is it something else inherently in
> immutable land that will "never"(it will take a long time) get fixed.
>
>
> On Wednesday, March 12, 2014 6:53:43 PM UTC-4, James Reeves wrote:
>
>> I've done a fair bit of experimentation with writing games in Clojure,
>> and I haven't noticed any major performance issues. If you're getting
>> issues on a 2D asteroids clone, I suspect there might be something
>> inefficient in your code. I find Criterium useful for benchmarking parts of
>> my code in isolation to get an idea of how its running.
>>
>> - James
>>
>>
>> On 12 March 2014 21:53, Jacob Goodson  wrote:
>>
>>> How many people have heard of this GC?  http://www.jclarity.com/2014/
>>> 02/19/shenandoah-a-new-low-pause-garbage-collection-
>>> algorithm-for-the-java-hotspot-jvm/
>>>
>>> I want to know if this would benefit clojure.  I wrote a small asteroids
>>> game in clojure and the performance was not good.  I stuck to purity when
>>> writing the game, only "mutating" my data after it had passed through a
>>> bazillion pure functions.  I was wondering, would a GC like this one(or
>>> Azul's) make a significant impact so that I, or others, could make games in
>>> a more pure fashion?  I WANT MY EFFIN PURITY!
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@googlegroups.com
>>>
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+u...@googlegroups.com
>>>
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+u...@googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> 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 be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You re

Re: [GSoC] Proposal: persistent probabilistic data structures

2014-03-13 Thread Nicola Mometto

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 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 how to improve it, or if you have any
> request, please tell me :)
>
> I'm really looking forward to work with Clojure for this year's GSoC: I
> want to learn it really well, since
> my long term goal is to make more and more people at my University use it.
> Working on an open source project
> under the guidance of an expert mentor seems to me the best way to achieve
> this.
>
> Bests
> Matteo

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: XOR two arrays into a third on Clojure

2014-03-13 Thread Ignacio Corderi
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 I'm guessing something 
inside hiphip is not warmed up, but I can live with that.

Thanks again!
-Ignacio


-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help a Startup use Clojure!

2014-03-13 Thread Jarrod Swart
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.

While ClojureScript is interesting I think the overhead of learning 
ClojureScript + NodeJS + functional thinking in a callback oriented world a 
tall order.  I will already have enough to overcome that a new "stack" is 
likely not a good choice.  

The benefits to Clojure are known and my primary interest is in how to 
express that to business types.  With the resources in this post I think I 
have that.

Thanks again for all the feedback!

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: clojure debugging repl

2014-03-13 Thread Paul Reidy
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 
> > 
> wrote: 
>
> > 
> > I'd love to be able to set breakpoints in a running clojure application, 
> step through the code and inspect locals and the referencing environment. 
> Anything that gets me off of the time-consuming process of adding 
> timbre/clojure.tools.trace statements would be really welcome. Is vim-redl 
> the closest I can get to that, or is ritz the way to go? Any other 
> recommendations? 
> > 
>
>
>

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[GSoC 2014] Looking for mentors: cljs graphics package (in the spirit of p5.js / quil / three.js)

2014-03-13 Thread Omer Shapira
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 learning Clojure's abstractions, I have been programming in 
Scheme for a long time.

Anyone who wants to mentor me / chat about some ideas can reply here or 
find me at http://omershapira.com

Thanks!
Omer

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: STM and persistent data structures performance on mutli-core archs

2014-03-13 Thread Andy C
On Thu, Mar 13, 2014 at 11:24 AM, Timothy Baldridge wrote:

> 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 context of Martin's work - I did not know that
it was so advanced. I did some research back in good times on
http://en.wikipedia.org/wiki/Connection_Machine (via telnet 56kb/s telnet
connection from east Europe to US - that was super cool back then) and can
only atest to what he says in the presentation. You can achieve amazing
levels of performance provided that patterns of data flow and control in
software match exactly parallel nature of given architecture.

However his point is somewhat more serious. He directly "attacks" a premise
that using immutable data is inherently mutli-core friendly which comes
from the deduction that writing reactive software reduces the use locks and
guards hence enables more flow and less waiting. Now his point is that GC
acts a super GIL which effectively kills all the hard work done on the
language and application design level.

Now, I wish Marin eats his own dog food and as pointed out numerous times
in the presentations, he backs up his points with a real experiments and
data. At least it was not apparent wether his conclusions were purely
theoretical or grounded in some experience.

I am in the process of transitioning from Scala to Clojure ecosystem (just
finished SICP videos and have some hard 4clojure problems behind me, but a
lot of to learn) so not yet fluent in all aspects of the language but I
think at some point I will try to write some simulations of STM performace
following some of Martin's intuitions. I think that it will be very cool.

Best,
Andy

-- 
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 be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.