Cyclic Agents

2014-09-11 Thread Greg MacDonald
Hi Everyone,

So how come two agents can't contain one another? The following code causes 
a StackOverflowError. In the real world things can't contain other things 
cyclically so I suspect that's why, but if someone could explain this 
better to me I'd appreciate it. :) - Greg

(defn test-agents
  []
  (let [a (agent {})
b (agent {})]
(send-off a #(assoc %1 :other %2) b)
(send-off b #(assoc %1 :other %2) a)))

-- 
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: [ANN] Clojure 1.7.0-alpha2

2014-09-11 Thread Arnout Roemers
I can understand why something like a clojure.lang.Volatile can be useful 
for some optimizations in the functions of standard library, but do they 
really need to become part of the public core API? Clojure is such a nice 
language because of the way state is handled at a higher level. Whenever I 
use a library, I _know_ the data I'm given is immutable. And whenever I'm 
given a state container such as an atom, I _know_ exactly how I can use it 
and, more importantly, share it. With a volatile container, I don't[1]. 
It's just a plain-old mutable variable, something Clojure rightfully moved 
away from. Sure, an API that returns a volatile should be considered a very 
bad practice, but I think this is still going to happen[2]. Especially by 
those coming to Clojure in the future with a OO background. Understanding 
and maintaining someone else's code might become harder as well.

Having the volatile function as part of the public core API sends the wrong 
message in my opinion. Could you, Cognitect, consider making the volatile 
related functions private, or move them to their own namespace, in order to 
keep Clojure more true to its nature?

[1] This is also a reason why I think the idea of overloading swap! and 
reset! not desirable.
[2] Transients don't have this problem, as they cannot escape their score.

-- 
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: [ANN] Clojure 1.7.0-alpha2

2014-09-11 Thread Jozef Wagner
FYI transients no longer enforce thread locality, and you may now call
them from any thread [1]. More options for handling mutable state is
not a bad thing (as Clojure is a practical language), though more
discipline will be needed.

Jozef

[1] CLJ-1498

On Thu, Sep 11, 2014 at 9:41 AM, Arnout Roemers
goo...@company.romeinszoon.nl wrote:
 I can understand why something like a clojure.lang.Volatile can be useful
 for some optimizations in the functions of standard library, but do they
 really need to become part of the public core API? Clojure is such a nice
 language because of the way state is handled at a higher level. Whenever I
 use a library, I _know_ the data I'm given is immutable. And whenever I'm
 given a state container such as an atom, I _know_ exactly how I can use it
 and, more importantly, share it. With a volatile container, I don't[1]. It's
 just a plain-old mutable variable, something Clojure rightfully moved away
 from. Sure, an API that returns a volatile should be considered a very bad
 practice, but I think this is still going to happen[2]. Especially by those
 coming to Clojure in the future with a OO background. Understanding and
 maintaining someone else's code might become harder as well.

 Having the volatile function as part of the public core API sends the wrong
 message in my opinion. Could you, Cognitect, consider making the volatile
 related functions private, or move them to their own namespace, in order to
 keep Clojure more true to its nature?

 [1] This is also a reason why I think the idea of overloading swap! and
 reset! not desirable.
 [2] Transients don't have this problem, as they cannot escape their score.

 --
 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: Cyclic Agents

2014-09-11 Thread Carlo Zancanaro
Hey Greg,

On Thu, Sep 11, 2014 at 12:30:11AM -0700, Greg MacDonald wrote:
 So how come two agents can't contain one another? The following code causes 
 a StackOverflowError. In the real world things can't contain other things 
 cyclically so I suspect that's why, but if someone could explain this 
 better to me I'd appreciate it. :) - Greg
 
 (defn test-agents
   []
   (let [a (agent {})
 b (agent {})]
 (send-off a #(assoc %1 :other %2) b)
 (send-off b #(assoc %1 :other %2) a)))

As far as I can tell this works properly, but printing it is a problem
(as it's a structure with a cycle in it: a - b - a - b - ... a).

We can see that it works, though:

  user= (defn test-agents []
   (let [a (agent {:a true}),
 b (agent {:b true})]
 (send-off a assoc :other b)
 (send-off b assoc :other a)
 [a b]))
  #'user/test-agents
  user= (def ag (test-agents))
  #'user/ag
  user= (:a @(first ag))
  true ;; the first one is a
  user= (:b @(:other @(first ag)))
  true ;; a's other is b
  user= (:a @(:other @(:other @(first ag
  true ;; b's other is a


Carlo


signature.asc
Description: Digital signature


Re: [ANN] Clojure 1.7.0-alpha2

2014-09-11 Thread Frantisek Sodomka
Using my timings macro:
https://gist.github.com/fsodomka/5890711

I am getting that:
- creation  derefing is 60% faster
- swapping is 25% faster
- resetting is about the same


;; volatile vs. atom ;;

(report
  (timings 1e7
(deref (volatile! 42))
(deref (atom 42

; |  :expr | :time | :ratio | :perc |
; |+---++---|
; | (deref (volatile! 42)) | 30.688238 |1.0 | 39.81 |
; |  (deref (atom 42)) | 77.081141 |   2.51 | 100.0 |


(report
  (let [v (volatile! 42)
a (atom 42)]
(timings 1e7
  (vswap! v inc)
  (swap! a inc

; |  :expr |  :time | :ratio | :perc |
; |+++---|
; | (vswap! v inc) | 136.052946 |1.0 | 75.08 |
; |  (swap! a inc) | 181.218748 |   1.33 | 100.0 |


(report
  (let [v (volatile! 42)
a (atom 42)]
(timings 1e7
  (vreset! v 10)
  (reset! a 10

; |  :expr | :time | :ratio | :perc |
; |+---++---|
; |  (reset! a 10) | 98.755318 |1.0 | 96.69 |
; | (vreset! v 10) | 102.13944 |   1.03 | 100.0 |



On Thursday, September 11, 2014 6:18:08 AM UTC+2, puzzler wrote:

 I'm curious: how much faster are volatiles than atoms?



-- 
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: Cyclic Agents

2014-09-11 Thread Greg MacDonald
Oh that makes sense. Thanks a lot!

On Thu, Sep 11, 2014 at 1:36 AM, Carlo Zancanaro carlozancan...@gmail.com
wrote:

 Hey Greg,

 On Thu, Sep 11, 2014 at 12:30:11AM -0700, Greg MacDonald wrote:
  So how come two agents can't contain one another? The following code
 causes
  a StackOverflowError. In the real world things can't contain other things
  cyclically so I suspect that's why, but if someone could explain this
  better to me I'd appreciate it. :) - Greg
 
  (defn test-agents
[]
(let [a (agent {})
  b (agent {})]
  (send-off a #(assoc %1 :other %2) b)
  (send-off b #(assoc %1 :other %2) a)))

 As far as I can tell this works properly, but printing it is a problem
 (as it's a structure with a cycle in it: a - b - a - b - ... a).

 We can see that it works, though:

   user= (defn test-agents []
(let [a (agent {:a true}),
  b (agent {:b true})]
  (send-off a assoc :other b)
  (send-off b assoc :other a)
  [a b]))
   #'user/test-agents
   user= (def ag (test-agents))
   #'user/ag
   user= (:a @(first ag))
   true ;; the first one is a
   user= (:b @(:other @(first ag)))
   true ;; a's other is b
   user= (:a @(:other @(:other @(first ag
   true ;; b's other is a


 Carlo


-- 
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: [ANN] Clojure 1.7.0-alpha2

2014-09-11 Thread Frantisek Sodomka
And just creation is about 3x faster:

(report
  (timings 1e7
(do (volatile! 42) nil)
(do (atom 42) nil)))

; |   :expr | :time | :ratio | :perc |
; |-+---++---|
; | (do (volatile! 42) nil) | 22.849963 |1.0 | 31.63 |
; |  (do (atom 42) nil) | 72.237439 |   3.16 | 100.0 |


On Thursday, September 11, 2014 11:06:44 AM UTC+2, Frantisek Sodomka wrote:

 Using my timings macro:
 https://gist.github.com/fsodomka/5890711

 I am getting that:
 - creation  derefing is 60% faster
 - swapping is 25% faster
 - resetting is about the same


 ;; volatile vs. atom ;;

 (report
   (timings 1e7
 (deref (volatile! 42))
 (deref (atom 42

 ; |  :expr | :time | :ratio | :perc |
 ; |+---++---|
 ; | (deref (volatile! 42)) | 30.688238 |1.0 | 39.81 |
 ; |  (deref (atom 42)) | 77.081141 |   2.51 | 100.0 |


 (report
   (let [v (volatile! 42)
 a (atom 42)]
 (timings 1e7
   (vswap! v inc)
   (swap! a inc

 ; |  :expr |  :time | :ratio | :perc |
 ; |+++---|
 ; | (vswap! v inc) | 136.052946 |1.0 | 75.08 |
 ; |  (swap! a inc) | 181.218748 |   1.33 | 100.0 |


 (report
   (let [v (volatile! 42)
 a (atom 42)]
 (timings 1e7
   (vreset! v 10)
   (reset! a 10

 ; |  :expr | :time | :ratio | :perc |
 ; |+---++---|
 ; |  (reset! a 10) | 98.755318 |1.0 | 96.69 |
 ; | (vreset! v 10) | 102.13944 |   1.03 | 100.0 |



 On Thursday, September 11, 2014 6:18:08 AM UTC+2, puzzler wrote:

 I'm curious: how much faster are volatiles than atoms?



-- 
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: [ANN] Clojure 1.7.0-alpha2

2014-09-11 Thread Linus Ericsson
The volatile construct seems very useful in some particular cases! I have
been missing ugly-mutable variables for things such as certain types of
heaps/queues or write-intensive, slightly probabilistic stuff where one
missed write doesn't matter that much.

For people who don't have a Java background, I just want to point the very
useful package java.util.concurrent.atomic, in which one can find gems such
as AtomicLong, which is almost unbeatable as a counter.

An example in which an AtomicLong is about three times quicker than an
atom:

https://gist.github.com/claj/6711556#file-countertest-clj

Javadoc for AtomicLong:

http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html

In the sake of completeness,
Linus

2014-09-11 11:06 GMT+02:00 Frantisek Sodomka fsodo...@gmail.com:

 Using my timings macro:
 https://gist.github.com/fsodomka/5890711

 I am getting that:
 - creation  derefing is 60% faster
 - swapping is 25% faster
 - resetting is about the same


 ;; volatile vs. atom ;;

 (report
   (timings 1e7
 (deref (volatile! 42))
 (deref (atom 42

 ; |  :expr | :time | :ratio | :perc |
 ; |+---++---|
 ; | (deref (volatile! 42)) | 30.688238 |1.0 | 39.81 |
 ; |  (deref (atom 42)) | 77.081141 |   2.51 | 100.0 |


 (report
   (let [v (volatile! 42)
 a (atom 42)]
 (timings 1e7
   (vswap! v inc)
   (swap! a inc

 ; |  :expr |  :time | :ratio | :perc |
 ; |+++---|
 ; | (vswap! v inc) | 136.052946 |1.0 | 75.08 |
 ; |  (swap! a inc) | 181.218748 |   1.33 | 100.0 |


 (report
   (let [v (volatile! 42)
 a (atom 42)]
 (timings 1e7
   (vreset! v 10)
   (reset! a 10

 ; |  :expr | :time | :ratio | :perc |
 ; |+---++---|
 ; |  (reset! a 10) | 98.755318 |1.0 | 96.69 |
 ; | (vreset! v 10) | 102.13944 |   1.03 | 100.0 |




 On Thursday, September 11, 2014 6:18:08 AM UTC+2, puzzler wrote:

 I'm curious: how much faster are volatiles than atoms?

  --
 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: [ANN] Clojure 1.7.0-alpha2

2014-09-11 Thread dennis zhuang
May be the LongAdder in Java8 can beat AtomicLong :D

http://blog.palominolabs.com/2014/02/10/java-8-performance-improvements-longadder-vs-atomiclong/

2014-09-11 17:30 GMT+08:00 Linus Ericsson oscarlinuserics...@gmail.com:

 The volatile construct seems very useful in some particular cases! I have
 been missing ugly-mutable variables for things such as certain types of
 heaps/queues or write-intensive, slightly probabilistic stuff where one
 missed write doesn't matter that much.

 For people who don't have a Java background, I just want to point the very
 useful package java.util.concurrent.atomic, in which one can find gems such
 as AtomicLong, which is almost unbeatable as a counter.

 An example in which an AtomicLong is about three times quicker than an
 atom:

 https://gist.github.com/claj/6711556#file-countertest-clj

 Javadoc for AtomicLong:


 http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html

 In the sake of completeness,
 Linus

 2014-09-11 11:06 GMT+02:00 Frantisek Sodomka fsodo...@gmail.com:

 Using my timings macro:
 https://gist.github.com/fsodomka/5890711

 I am getting that:
 - creation  derefing is 60% faster
 - swapping is 25% faster
 - resetting is about the same


 ;; volatile vs. atom ;;

 (report
   (timings 1e7
 (deref (volatile! 42))
 (deref (atom 42

 ; |  :expr | :time | :ratio | :perc |
 ; |+---++---|
 ; | (deref (volatile! 42)) | 30.688238 |1.0 | 39.81 |
 ; |  (deref (atom 42)) | 77.081141 |   2.51 | 100.0 |


 (report
   (let [v (volatile! 42)
 a (atom 42)]
 (timings 1e7
   (vswap! v inc)
   (swap! a inc

 ; |  :expr |  :time | :ratio | :perc |
 ; |+++---|
 ; | (vswap! v inc) | 136.052946 |1.0 | 75.08 |
 ; |  (swap! a inc) | 181.218748 |   1.33 | 100.0 |


 (report
   (let [v (volatile! 42)
 a (atom 42)]
 (timings 1e7
   (vreset! v 10)
   (reset! a 10

 ; |  :expr | :time | :ratio | :perc |
 ; |+---++---|
 ; |  (reset! a 10) | 98.755318 |1.0 | 96.69 |
 ; | (vreset! v 10) | 102.13944 |   1.03 | 100.0 |




 On Thursday, September 11, 2014 6:18:08 AM UTC+2, puzzler wrote:

 I'm curious: how much faster are volatiles than atoms?

  --
 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.




-- 
庄晓丹
Email:killme2...@gmail.com xzhu...@avos.com
Site:   http://fnil.net
Twitter:  @killme2008

-- 
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: Is Transit / core.async suitable for remote function invocation?

2014-09-11 Thread Shaun Robinson
Check out Sente. It meets all your requirements. EDN is used as a transport 
mechanism, with experimental support for Transit -- but these are really 
implementation details. Values sent from the client shows up in tact on the 
server, and vice versa. 

https://github.com/ptaoussanis/sente

* Sente provides a send function and a core.async channel on both the 
Clojure and Clojurescript sides. 
* Any value sent via the client's send function shows up on the server's 
channel intact, and vice versa
* The server keeps an atom of connected clients, and a message from the 
server can target one or all of them
* The excellent core.match is commonly used for pattern matching messages 
on the client and server sides and dispatching functions
* There is robust support for re-connecting
* The software is mature, and terse (~1000 lines). I've used it as a comms 
layer in several production apps with great success.
* Regarding remote function serialization / invocation, assuming you trust 
your client, you could pass a function from client-server as data, and 
invoke it on the server side. No need for serialization, normal 'quoting' 
would work.

- Shaun

On Wednesday, September 10, 2014 1:39:24 AM UTC-4, Mikera wrote:

 I've encountered a couple of use cases where it would helpful to have some 
 form of remote function invocation in Clojure/ClojureScript with the 
 following characteristics:
 - Arbitrary functions can be effectively serialised and sent to remote 
 machines
 - Remote functions can be invoked either synchronously or asynchronously 
 - Parameters get passed as serialised values, which might in turn be other 
 functions
 - Works across Clojure/ClojureScript boundary
 - Would need to allow for various error conditions (network failure etc.)

 Could this be achieved in a reasonably sane way with some combination of 
 Transit and/or core.async? Has anyone tried this?


-- 
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.


Lein feature to check for updates in dependencies?

2014-09-11 Thread Jonathon McKitrick
I thought for sure I saw this feature, but I can't find it.

Isn't there a way to scan for possible updates to dependencies in a project?

-- 
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: Lein feature to check for updates in dependencies?

2014-09-11 Thread Ray Miller
https://github.com/xsc/lein-ancient

On 11 September 2014 14:41, Jonathon McKitrick jmckitr...@gmail.com wrote:
 I thought for sure I saw this feature, but I can't find it.

 Isn't there a way to scan for possible updates to dependencies in a project?

 --
 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.


(Request) Rich Hickey's EuroClojure 2014 slides

2014-09-11 Thread Leon Grapenthin
Hi,
 I am looking for the slides of this talk because one can't see them in the 
video:

http://vimeo.com/100518968

Thanks,
 Leon.




-- 
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: Lein feature to check for updates in dependencies?

2014-09-11 Thread Softaddicts
lein-ancient plug in
Luc P.


 I thought for sure I saw this feature, but I can't find it.
 
 Isn't there a way to scan for possible updates to dependencies in a project?
 
 -- 
 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.
 
--
Softaddictslprefonta...@softaddicts.ca sent by ibisMail from my ipad!

-- 
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.


Pause a go loop

2014-09-11 Thread Jeremy Vuillermet
Hello,

here is my use case 

(defn replay [history] (go (doseq [millis history] 
  (! (timeout millis)) 
  (prn millis

history is a vector of duration: [1000 2000 4000]

Now I would like to pause this doseq. One way is to use an atom pause?, 
check for the pause and block until a new value in a resume chan.

But there may be an other way with channels only and avoid global/shared 
pause atom.
I was naively thinking of a pause channel and at each loop I check if there 
is a value but I'm not sure it's better and I couldn't manage to do it 
anyway.

-- 
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.


leiningen resources folder

2014-09-11 Thread Joc O'Connor
Hi, when I use (.getPath (clojure.java.io/resource readme.txt)) I get the 
file path to the correct file in the resources folder (or nil if it doesn't 
exist).
However if I pass in an empty string it returns the path to the 'test' 
folder rather then 'resources'. I have tried setting setting the resource 
paths in project.clj with no change in behaviour.

Can anybody work out where I am going wrong?

Joc

-- 
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: leiningen resources folder

2014-09-11 Thread Dave Ray
clojure.java.io/resource isn't specific to the resources folder. It just
scans the classpath. Your classpath probably looks like
test:src:resources or something so test wins. If there was a
test/readme.txt file you'd also get that rather than resources/readme.txt.

Cheers,
Dave

On Thu, Sep 11, 2014 at 5:31 AM, Joc O'Connor johnocon...@fico.com wrote:

 Hi, when I use (.getPath (clojure.java.io/resource readme.txt)) I get
 the file path to the correct file in the resources folder (or nil if it
 doesn't exist).
 However if I pass in an empty string it returns the path to the 'test'
 folder rather then 'resources'. I have tried setting setting the resource
 paths in project.clj with no change in behaviour.

 Can anybody work out where I am going wrong?

 Joc

 --
 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: (Request) Rich Hickey's EuroClojure 2014 slides

2014-09-11 Thread Alex Miller
Usually Rich doesn't release his slides as he prefers for them to be 
consumed in the context of the talk.

On Thursday, September 11, 2014 8:44:47 AM UTC-5, Leon Grapenthin wrote:

 Hi,
  I am looking for the slides of this talk because one can't see them in 
 the video:

 http://vimeo.com/100518968

 Thanks,
  Leon.






-- 
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: Pause a go loop

2014-09-11 Thread Linus Ericsson
For instance you can use schejulure [1] or at-at [2] and make sure the
scheduled function calls put an item (event) on the channel and then made
the scheduler do the pausing work.

All the listeners attached to the channel will receive the events at the
time the scheduler releases them, and you don't have to manage anything
regarding timing/pausing.

/Linus


[1] https://github.com/AdamClements/schejulure
[2] https://github.com/overtone/at-at


2014-09-11 13:52 GMT+02:00 Jeremy Vuillermet jeremy.vuiller...@gmail.com:

 Hello,

 here is my use case

 (defn replay [history] (go (doseq [millis history]
   (! (timeout millis))
   (prn millis

 history is a vector of duration: [1000 2000 4000]

 Now I would like to pause this doseq. One way is to use an atom pause?,
 check for the pause and block until a new value in a resume chan.

 But there may be an other way with channels only and avoid global/shared
 pause atom.
 I was naively thinking of a pause channel and at each loop I check if
 there is a value but I'm not sure it's better and I couldn't manage to do
 it anyway.

 --
 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: Pause a go loop

2014-09-11 Thread Alex Miller
You should never block a go loop other than by using a parking channel op 
(like !, !, etc).

You probably instead want a control channel where you can send it a pause 
message telling it to block on the control channel until a resume message 
arrives.

On Thursday, September 11, 2014 6:52:48 AM UTC-5, Jeremy Vuillermet wrote:

 Hello,

 here is my use case 

 (defn replay [history] (go (doseq [millis history] 
   (! (timeout millis)) 
   (prn millis

 history is a vector of duration: [1000 2000 4000]

 Now I would like to pause this doseq. One way is to use an atom pause?, 
 check for the pause and block until a new value in a resume chan.

 But there may be an other way with channels only and avoid global/shared 
 pause atom.
 I was naively thinking of a pause channel and at each loop I check if 
 there is a value but I'm not sure it's better and I couldn't manage to do 
 it anyway.


-- 
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: defrecord - CompilerException to referring record defined at other namespace

2014-09-11 Thread Alex Miller
Yeah, dt/Record1 is not a thing that is referenceable. 

dt/-Record1 is a constructor function
defrecord_example1.datatypes.Record1 is a class 

You can't use the ns alias dt to shorten the name of the class (those are 
different naming contexts).


On Wednesday, September 10, 2014 8:44:18 PM UTC-5, Bin Li wrote:

 Yes , it is.

 Is it because that / is accessing the 'static' function/field ? so at 
 core.clj:

 we can only have there constructors as follow ?

 dt/-Record1
 dt/-Record2
 dt/map-Record1
 dt/map-Record2

 On Wednesday, September 10, 2014 10:21:45 PM UTC+8, Alex Miller wrote:

 Is datatypes.clj at src/defrecord_example1/datatypes.clj ?  (note _, not 
 - in directory name)


 On Wednesday, September 10, 2014 6:01:25 AM UTC-5, Bin Li wrote:

 I have records defined at datatypes.clj:
 ```clojure
 (ns defrecord-example1.datatypes)

 (defrecord Record1 [f1])

 (defrecord Record2 [f1 f2 f3])

 ;; this is working at repl
 (def m-inside1 
  {Record1
   (fn [] ({:a A}))
   Record2
   (fn [] ({:n B}))})

 And using at core.clj :
 ```clojure
 (ns defrecord-example1.core
   (:require 
 [defrecord-example1.datatypes :as dt]))

 ```

 ;; error at repl 
 ;; CompilerException java.lang.RuntimeException: No such var: 
 dt/Record1, compiling:(defrecord_example1\core.clj:7:1)  
 (def m-in-core1 
  {dt/Record1
   (fn [] ({:a A}))
   dt/Record2
   (fn [] ({:n B}))})

 ```

 Any one can help on this ?
 My project.clj:
 ``` clojure
 (defproject defrecord-example1 0.1.0-SNAPSHOT
   :description FIXME: write description
   :url http://example.com/FIXME;
   :license {:name Eclipse Public License
 :url http://www.eclipse.org/legal/epl-v10.html}
   :dependencies [[org.clojure/clojure 1.6.0]])

 ```



-- 
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: [ANN] aprint (awesome print) released

2014-09-11 Thread Dave Sann
Is there an easy way to get the same compact layout but without the colour 
control codes?

On Friday, 5 September 2014 07:50:10 UTC+10, Vladimir Bokov wrote:

 Hi folks, I got just tired to gazing into big amount of data and scroll 
 3-4 screens of my 13' laptop to grasp the structure,
 so I used pprint's pretty printer, but add colors and changed indentation 
 *by default*
 (actually pprint has tuning parameters, too, but anyway it's breaking maps 
 by single entry by line...)

 Now the screen area gets used more effectively and looks more friendly imo 
 :)
 See it: https://github.com/razum2um/aprint

 Looking forward yours opinion if I should make a nrepl middleware to use 
 it *right away*, without doing (ap)
 every time ;)


-- 
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: [ANN] Clojure 1.7.0-alpha2

2014-09-11 Thread Alex Miller
On Thursday, September 11, 2014 2:41:44 AM UTC-5, Arnout Roemers wrote:

 I can understand why something like a clojure.lang.Volatile can be useful 
 for some optimizations in the functions of standard library, but do they 
 really need to become part of the public core API? 


From my own perspective (not talking for anyone else here), Clojure is a 
language that *empowers* you by giving you powerful, composable, expressive 
tools to solve hard problems. There are guidelines for use but pushing past 
those guidelines is ok (and expected) as your skills increases or as 
problems demand it. In this case my general guideline would be: don't use 
volatiles. Just like learning a musical instrument, learning how best to 
use the language (and when to break the rules) takes time and practice. 


-- 
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: [ANN] aprint (awesome print) released

2014-09-11 Thread Vladimir Bokov
Yes. I use clansi:

(clansi.core/without-ansi (aprint issues))

Thanks for feedback, I updated README too

четверг, 11 сентября 2014 г., 21:58:57 UTC+7 пользователь Dave Sann написал:

 Is there an easy way to get the same compact layout but without the colour 
 control codes?

 On Friday, 5 September 2014 07:50:10 UTC+10, Vladimir Bokov wrote:

 Hi folks, I got just tired to gazing into big amount of data and scroll 
 3-4 screens of my 13' laptop to grasp the structure,
 so I used pprint's pretty printer, but add colors and changed indentation 
 *by default*
 (actually pprint has tuning parameters, too, but anyway it's breaking 
 maps by single entry by line...)

 Now the screen area gets used more effectively and looks more friendly 
 imo :)
 See it: https://github.com/razum2um/aprint

 Looking forward yours opinion if I should make a nrepl middleware to use 
 it *right away*, without doing (ap)
 every time ;)



-- 
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.


[ANN] clojure client/wrapper for vowpal wabbit

2014-09-11 Thread Joachim De Beule


Dear list,


I'd like to announce a pre-release of a clojure client/wrapper for vowpal 
wabbit, see engagor/clj-vw https://github.com/engagor/clj-vw and clj-vw 
1.0.0-RC2 - Clojars https://clojars.org/engagor/clj-vw.


All feedback/help welcome!


Joachim.

-- 
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: Pause a go loop

2014-09-11 Thread Jeremy Vuillermet
Yes when I write block I meant park.
My first idea was to use a control channel which have pause and resume 
input but then my question is 
! control-channel would park until a value is available, what if I want to 
continue is there is nothing ?

On Thursday, September 11, 2014 4:39:51 PM UTC+2, Alex Miller wrote:

 You should never block a go loop other than by using a parking channel op 
 (like !, !, etc).

 You probably instead want a control channel where you can send it a pause 
 message telling it to block on the control channel until a resume message 
 arrives.

 On Thursday, September 11, 2014 6:52:48 AM UTC-5, Jeremy Vuillermet wrote:

 Hello,

 here is my use case 

 (defn replay [history] (go (doseq [millis history] 
   (! (timeout millis)) 
   (prn millis

 history is a vector of duration: [1000 2000 4000]

 Now I would like to pause this doseq. One way is to use an atom pause?, 
 check for the pause and block until a new value in a resume chan.

 But there may be an other way with channels only and avoid global/shared 
 pause atom.
 I was naively thinking of a pause channel and at each loop I check if 
 there is a value but I'm not sure it's better and I couldn't manage to do 
 it anyway.



-- 
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: (Request) Rich Hickey's EuroClojure 2014 slides

2014-09-11 Thread Fergal Byrne
Unfortunately the guys had a problem with the recording of the screen at
euroClojure, so only the speakers' head-and-shoulder shots are in those
videos. I made the video of my talk at home from the one originally
recorded, by re-running the slides while listening to the audio and saving
the screencast. It takes just a little longer than doing the talk itself,
as long as it's just slides.  For people with live coding it'd be a good
deal more work.

This was important for my talk because it was quite dense and hard to
understand just from listening and by watching my ugly mug!





On Thu, Sep 11, 2014 at 3:33 PM, Alex Miller a...@puredanger.com wrote:

 Usually Rich doesn't release his slides as he prefers for them to be
 consumed in the context of the talk.


 On Thursday, September 11, 2014 8:44:47 AM UTC-5, Leon Grapenthin wrote:

 Hi,
  I am looking for the slides of this talk because one can't see them in
 the video:

 http://vimeo.com/100518968

 Thanks,
  Leon.




  --
 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.




-- 

Fergal Byrne, Brenter IT

http://inbits.com - Better Living through Thoughtful Technology
http://ie.linkedin.com/in/fergbyrne/ - https://github.com/fergalbyrne

Author, Real Machine Intelligence with Clortex and NuPIC
Read for free or buy the book at https://leanpub.com/realsmartmachines

Speaking on Clortex and HTM/CLA at euroClojure Krakow, June 2014:
http://euroclojure.com/2014/
and at LambdaJam Chicago, July 2014: http://www.lambdajam.com

e:fergalbyrnedub...@gmail.com t:+353 83 4214179
Join the quest for Machine Intelligence at http://numenta.org
Formerly of Adnet edi...@adnet.ie http://www.adnet.ie

-- 
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.


ClojureBridge Edinburgh - September 27th

2014-09-11 Thread Ali King
ClojureBridge is a one-day workshop run by Girl Geek Scotland aimed at 
introducing women to the Clojure language and functional programming.  The 
event will be held at CodeBase in Edinburgh on September 27th (with 
installfest the night before), and is now open for booking!

http://www.girlgeekscotland.com/events/clojurebridge-edinburgh/

We're looking for volunteers to help with teaching at the event, so if you 
know Clojure and live near Edinburgh, please get in touch!  If you don't, 
you can still help with running the event.  We're also looking for sponsors 
- details on the event page.

Sponsors confirmed so far are GitHub, ScotlandIS, Entrepreneurial Spark, 
and NCR.  We're getting a lot of enthusiasm for the event from the Clojure 
community, so it's shaping up to be a great day!

Ali King
cloj...@koshatnik.com

-- 
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: (Request) Rich Hickey's EuroClojure 2014 slides

2014-09-11 Thread Leon Grapenthin
@Alex Miller: It would be great if an exception could be made. Again: The 
slides are not in the video.

Consuming them in context of the talk is my intention by opening two 
windows (one with the video, one with the slides).


Thanks, Leon.


On Thursday, September 11, 2014 4:33:41 PM UTC+2, Alex Miller wrote:

 Usually Rich doesn't release his slides as he prefers for them to be 
 consumed in the context of the talk.

 On Thursday, September 11, 2014 8:44:47 AM UTC-5, Leon Grapenthin wrote:

 Hi,
  I am looking for the slides of this talk because one can't see them in 
 the video:

 http://vimeo.com/100518968

 Thanks,
  Leon.






-- 
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: (Request) Rich Hickey's EuroClojure 2014 slides

2014-09-11 Thread Mark Engelberg
+1.  I also was unable to follow the video without the slides.

On Thu, Sep 11, 2014 at 12:36 PM, Leon Grapenthin grapenthinl...@gmail.com
wrote:

 @Alex Miller: It would be great if an exception could be made. Again: The
 slides are not in the video.

 Consuming them in context of the talk is my intention by opening two
 windows (one with the video, one with the slides).


 Thanks, Leon.


 On Thursday, September 11, 2014 4:33:41 PM UTC+2, Alex Miller wrote:

 Usually Rich doesn't release his slides as he prefers for them to be
 consumed in the context of the talk.

 On Thursday, September 11, 2014 8:44:47 AM UTC-5, Leon Grapenthin wrote:

 Hi,
  I am looking for the slides of this talk because one can't see them in
 the video:

 http://vimeo.com/100518968

 Thanks,
  Leon.




  --
 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: (Request) Rich Hickey's EuroClojure 2014 slides

2014-09-11 Thread Alex Miller
The slides are now available 
at http://cdn.cognitect.com/presentations/2014/insidechannels.pdf.


On Thursday, September 11, 2014 2:57:30 PM UTC-5, puzzler wrote:

 +1.  I also was unable to follow the video without the slides.

 On Thu, Sep 11, 2014 at 12:36 PM, Leon Grapenthin grapent...@gmail.com 
 javascript: wrote:

 @Alex Miller: It would be great if an exception could be made. Again: The 
 slides are not in the video.

 Consuming them in context of the talk is my intention by opening two 
 windows (one with the video, one with the slides).


 Thanks, Leon.


 On Thursday, September 11, 2014 4:33:41 PM UTC+2, Alex Miller wrote:

 Usually Rich doesn't release his slides as he prefers for them to be 
 consumed in the context of the talk.

 On Thursday, September 11, 2014 8:44:47 AM UTC-5, Leon Grapenthin wrote:

 Hi,
  I am looking for the slides of this talk because one can't see them in 
 the video:

 http://vimeo.com/100518968

 Thanks,
  Leon.




  -- 
 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 
 javascript:
 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 javascript:
 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 javascript:.
 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 terminology

2014-09-11 Thread jvanderhyde
I'm new to Clojure, but I'm teaching a course on it this year to 
undergrads. I'm having a little trouble with terminology, partly because 
Clojure departs from other languages (such as Scheme) on some terms (such 
as atom).

I want to say something like this:

A word is considered a var unless it is quoted. Example: 'hello

A list is considered a function invocation unless it is quoted. Example: 
'(1 2 3)


I don't think word is the correct term to use. Do I mean symbol? Do I 
mean symbol instead of var?
Is list better called a form or an s-expression?
What exactly is a scalar? Is it anything that's not a container?

Can someone help me with what I'm trying to say? It's OK to oversimplify, 
but I don't want to use wrong words that will introduce confusion. Thanks 
for the help.

-- 
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 terminology

2014-09-11 Thread blake
I'm having some trouble fleshing out the surrounding context, but I'll take
a stab at this:

I don't think word is the correct term to use. Do I mean symbol?

Token, perhaps?

Do I mean symbol instead of var?

Yes. It may not be a var, after all.

 Is list better called a form or an s-expression?

This one I'm having trouble with. (whatever) designates a function
invocation. '(whatever) designates a list and is a shorthand for (list
whatever). That's an important distinction, as '(a-fun some-fun
more-fun) describes a list of functions while (a-fun some-fun more-fun)
calls a-fun with some-fun and more-fun as parameters. It seems to me
the fact that they look similar is practically coincidental.

 What exactly is a scalar? Is it anything that's not a container?
​
In Pascal, a scalar referred specifically to enumerable integer types. In
Clojure, I think it refers to all vars. But I haven't run into it.

===Blake===

-- 
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.


pigpen newbie question

2014-09-11 Thread Sunil S Nandihalli
Hi ,
 I am trying to compile a simple clj file which does nothing apart from
requiring the pigpen name-space and it fails to compile with the following
error. Can anybody help?

Attempting to call unbound fn: #'instaparse.combinators-source/cat

the full stack trace is here.
https://gist.github.com/sunilnandihalli/b400e21552ca97038e56

Thanks,
Sunil.

-- 
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 terminology

2014-09-11 Thread jvanderhyde
Thank you for the help.

What is the difference between a form and an s-expression? The Clojure 
Glossary 
https://github.com/clojuredocs/guides/blob/master/articles/language/glossary.md
 defines 
form as a valid s-expression. What is an example of an invalid 
s-expression?

I'm not sure token is correct, although it is better than word. Isn't a 
single parenthesis also a token?

-- 
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: pigpen newbie question

2014-09-11 Thread Mark Engelberg
You're probably using Clojure 1.7.0 alpha 2, which introduced a new
function called cat into the core namespace, which overlaps with a
function in instaparse.

A couple nights ago, I updated instaparse to version 1.3.4, with an update
to deal with this change in alpha 2, but pigpen has not yet been updated to
use that version of instaparse.

You can either go back to a non-alpha release of Clojure, or wait for the
pigpen folks to update, or perhaps there is some leiningen-fu you can do in
the project.clj file to override the instaparse dependency loaded by pigpen
with instaparse 1.3.4.

On Thu, Sep 11, 2014 at 5:16 PM, Sunil S Nandihalli 
sunil.nandiha...@gmail.com wrote:

 Hi ,
  I am trying to compile a simple clj file which does nothing apart from
 requiring the pigpen name-space and it fails to compile with the following
 error. Can anybody help?

 Attempting to call unbound fn: #'instaparse.combinators-source/cat

 the full stack trace is here.
 https://gist.github.com/sunilnandihalli/b400e21552ca97038e56

 Thanks,
 Sunil.

 --
 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: pigpen newbie question

2014-09-11 Thread mbossenbroek via Clojure
That's a weird one :)

Couple of questions...

What version of pigpen are you using?
What are you using to compile  produce that output? It doesn't look like 
lein or gradle output.
What OS are you using?
Do you have a full sample project to repro?
Does your project have any other references? Something that might be 
pulling in a different version of instaparse?

There was an earlier version of pigpen that had a bad version of 
instaparse, but that was fixed long 
ago: https://github.com/Netflix/PigPen/issues/4

Sorry to answer your question with a bunch of questions, but I haven't seen 
that one before.

-Matt

On Thursday, September 11, 2014 5:16:45 PM UTC-7, Sunil Nandihalli wrote:

 Hi ,
  I am trying to compile a simple clj file which does nothing apart from 
 requiring the pigpen name-space and it fails to compile with the following 
 error. Can anybody help?

 Attempting to call unbound fn: #'instaparse.combinators-source/cat

 the full stack trace is here. 
 https://gist.github.com/sunilnandihalli/b400e21552ca97038e56

 Thanks,
 Sunil.


-- 
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: pigpen newbie question

2014-09-11 Thread 'Matt Bossenbroek' via Clojure
Just saw this response - disregard the questions I asked you on the pigpen 
support DL. 

I'll pull in the new instaparse  get a new PigPen build out soonish (within a 
day or two). 

-Matt


On Thursday, September 11, 2014 at 6:28 PM, Mark Engelberg wrote:

 You're probably using Clojure 1.7.0 alpha 2, which introduced a new function 
 called cat into the core namespace, which overlaps with a function in 
 instaparse.
 
 A couple nights ago, I updated instaparse to version 1.3.4, with an update to 
 deal with this change in alpha 2, but pigpen has not yet been updated to use 
 that version of instaparse.
 
 You can either go back to a non-alpha release of Clojure, or wait for the 
 pigpen folks to update, or perhaps there is some leiningen-fu you can do in 
 the project.clj file to override the instaparse dependency loaded by pigpen 
 with instaparse 1.3.4.
 
 On Thu, Sep 11, 2014 at 5:16 PM, Sunil S Nandihalli 
 sunil.nandiha...@gmail.com (mailto:sunil.nandiha...@gmail.com) wrote:
  Hi ,
   I am trying to compile a simple clj file which does nothing apart from 
  requiring the pigpen name-space and it fails to compile with the following 
  error. Can anybody help?
  
  Attempting to call unbound fn: #'instaparse.combinators-source/cat
  
  the full stack trace is here. 
  https://gist.github.com/sunilnandihalli/b400e21552ca97038e56
  
  Thanks,
  Sunil.
  
  
  -- 
  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 
  (mailto: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 
  (mailto:clojure%2bunsubscr...@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 
  (mailto: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 
 (mailto: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 
 (mailto: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 
 (mailto: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: Clojure terminology

2014-09-11 Thread Alex Miller


On Thursday, September 11, 2014 2:49:43 PM UTC-5, jvanderhyde wrote:

 I'm new to Clojure, but I'm teaching a course on it this year to 
 undergrads. I'm having a little trouble with terminology, partly because 
 Clojure departs from other languages (such as Scheme) on some terms (such 
 as atom).

 I want to say something like this:

 A word is considered a var unless it is quoted. Example: 'hello 

 A list is considered a function invocation unless it is quoted. Example: 
 '(1 2 3)


 I don't think word is the correct term to use. Do I mean symbol? Do I 
 mean symbol instead of var?


I think word is fine here. You're basically leveraging knowledge of 
English to informally describe something. Seems close enough to be useful.
You mean symbol, not var. There might be a var referred to by this 
symbol, or not.
 

 Is list better called a form or an s-expression?


I think list is fine here, although it sounds like you're trying to talk 
about quoting and backed into invocation. It's important to distinguish 
between syntax and evaluation semantics.

(+ 1 2) is read (parsed) as a a list containing the symbol + and the 
numbers 1 and 2. 
Generally, everything in Clojure evaluates to itself, except lists and 
symbols. Symbols are evaluated to the thing they refer to (skipping the 
details of how that works and what it means). Lists evaluate each of their 
elements, then invoke the first element with the rest as arguments.

Quoting prevents that evaluation. So quoting a symbol or a list causing it 
to return just the parsed data (the symbol or the list).

There is probably some distinction between form and s-expression but I 
don't what it is. Form seems less jargony to me (unless you've already 
studied something like Scheme). I would generally say that either means a 
single Clojure expression, which can be something as simple as 0 or as 
complex as a function definition. The Clojure Reader takes a stream of 
characters and returns a series of forms (which are data). 
See http://clojure.org/reader.
 

 What exactly is a scalar? Is it anything that's not a container?


 I don't see that term used with Clojure. I guess what you mean is any 
Clojure form that is not a collection (list, vector, set, map).

Can someone help me with what I'm trying to say? It's OK to oversimplify, 
 but I don't want to use wrong words that will introduce confusion. Thanks 
 for the help.


-- 
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 terminology

2014-09-11 Thread Mark Engelberg
This whole discussion makes me think you're trying to teach Clojure in a
Scheme-like way, which maybe isn't the best approach.

In Clojure, it is rare to need quoted lists and symbols.
Instead of 'hello, you would use :hello.
Instead of '(1 2 3), you would use [1 2 3].

So the whole notion of quoting can be avoided with beginners, and doesn't
typically need to be introduced until you get to macros.  This is good
because quoting can be a surprisingly subtle and tricky topic.  Much easier
to work with and teach self-evaulating expressions.  If you really need a
list, I'd recommend teaching it as (list 1 2 3), and only much later
teaching quote as a sort of shortcut.

-- 
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.


[ANN] lein-node-webkit-build

2014-09-11 Thread Wilker
Hi,

For you guys that are working node-webkit and Clojurescript like I'm, I
created this build tool that's similar in functionality with
grunt-node-webkit-build.

The library still very young and missing some features that maybe very
important for some people (like being able to do a more precise selection
of the files to go on the build), but I decided to work on features only by
demand, so, if you see something that you need, please open an issue, pull
requests would be also welcome.

Here is the project: https://github.com/wilkerlucio/lein-node-webkit-build

Thanks.

Best regards
---
Wilker Lúcio
http://about.me/wilkerlucio/bio
Woboinc Consultant
+55 81 82556600

-- 
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: pigpen newbie question

2014-09-11 Thread Sunil S Nandihalli
Thanks Mark for the response. That was very quick. Let me see if moving to
clojure 1.6.0 fixes the issues.
Sunil.

On Fri, Sep 12, 2014 at 6:58 AM, Mark Engelberg mark.engelb...@gmail.com
wrote:

 You're probably using Clojure 1.7.0 alpha 2, which introduced a new
 function called cat into the core namespace, which overlaps with a
 function in instaparse.

 A couple nights ago, I updated instaparse to version 1.3.4, with an update
 to deal with this change in alpha 2, but pigpen has not yet been updated to
 use that version of instaparse.

 You can either go back to a non-alpha release of Clojure, or wait for the
 pigpen folks to update, or perhaps there is some leiningen-fu you can do in
 the project.clj file to override the instaparse dependency loaded by pigpen
 with instaparse 1.3.4.

 On Thu, Sep 11, 2014 at 5:16 PM, Sunil S Nandihalli 
 sunil.nandiha...@gmail.com wrote:

 Hi ,
  I am trying to compile a simple clj file which does nothing apart from
 requiring the pigpen name-space and it fails to compile with the following
 error. Can anybody help?

 Attempting to call unbound fn: #'instaparse.combinators-source/cat

 the full stack trace is here.
 https://gist.github.com/sunilnandihalli/b400e21552ca97038e56

 Thanks,
 Sunil.

 --
 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: pigpen newbie question

2014-09-11 Thread Sunil S Nandihalli
Thanks Mark and Matt, changing the version back to clojure version 1.6.0
fixed it.
Sunil

On Fri, Sep 12, 2014 at 7:05 AM, 'Matt Bossenbroek' via Clojure 
clojure@googlegroups.com wrote:

  Just saw this response - disregard the questions I asked you on the
 pigpen support DL.

 I'll pull in the new instaparse  get a new PigPen build out soonish
 (within a day or two).

 -Matt

 On Thursday, September 11, 2014 at 6:28 PM, Mark Engelberg wrote:

 You're probably using Clojure 1.7.0 alpha 2, which introduced a new
 function called cat into the core namespace, which overlaps with a
 function in instaparse.

 A couple nights ago, I updated instaparse to version 1.3.4, with an update
 to deal with this change in alpha 2, but pigpen has not yet been updated to
 use that version of instaparse.

 You can either go back to a non-alpha release of Clojure, or wait for the
 pigpen folks to update, or perhaps there is some leiningen-fu you can do in
 the project.clj file to override the instaparse dependency loaded by pigpen
 with instaparse 1.3.4.

 On Thu, Sep 11, 2014 at 5:16 PM, Sunil S Nandihalli 
 sunil.nandiha...@gmail.com wrote:

 Hi ,
  I am trying to compile a simple clj file which does nothing apart from
 requiring the pigpen name-space and it fails to compile with the following
 error. Can anybody help?

 Attempting to call unbound fn: #'instaparse.combinators-source/cat

 the full stack trace is here.
 https://gist.github.com/sunilnandihalli/b400e21552ca97038e56

 Thanks,
 Sunil.

 --
 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: defrecord - CompilerException to referring record defined at other namespace

2014-09-11 Thread Bin Li
Thanks a lot , Alex.

So in order to working with defrecords , we have to use fully qualified 
name , or we can import them.

But the :require is needed before I can import the 'defrecord' classes.. 
 [... :refer :all] will not import the classes.. 


On Thursday, September 11, 2014 10:46:17 PM UTC+8, Alex Miller wrote:

 Yeah, dt/Record1 is not a thing that is referenceable. 

 dt/-Record1 is a constructor function
 defrecord_example1.datatypes.Record1 is a class 

 You can't use the ns alias dt to shorten the name of the class (those are 
 different naming contexts).


 On Wednesday, September 10, 2014 8:44:18 PM UTC-5, Bin Li wrote:

 Yes , it is.

 Is it because that / is accessing the 'static' function/field ? so at 
 core.clj:

 we can only have there constructors as follow ?

 dt/-Record1
 dt/-Record2
 dt/map-Record1
 dt/map-Record2

 On Wednesday, September 10, 2014 10:21:45 PM UTC+8, Alex Miller wrote:

 Is datatypes.clj at src/defrecord_example1/datatypes.clj ?  (note _, not 
 - in directory name)


 On Wednesday, September 10, 2014 6:01:25 AM UTC-5, Bin Li wrote:

 I have records defined at datatypes.clj:
 ```clojure
 (ns defrecord-example1.datatypes)

 (defrecord Record1 [f1])

 (defrecord Record2 [f1 f2 f3])

 ;; this is working at repl
 (def m-inside1 
  {Record1
   (fn [] ({:a A}))
   Record2
   (fn [] ({:n B}))})

 And using at core.clj :
 ```clojure
 (ns defrecord-example1.core
   (:require 
 [defrecord-example1.datatypes :as dt]))

 ```

 ;; error at repl 
 ;; CompilerException java.lang.RuntimeException: No such var: 
 dt/Record1, compiling:(defrecord_example1\core.clj:7:1)  
 (def m-in-core1 
  {dt/Record1
   (fn [] ({:a A}))
   dt/Record2
   (fn [] ({:n B}))})

 ```

 Any one can help on this ?
 My project.clj:
 ``` clojure
 (defproject defrecord-example1 0.1.0-SNAPSHOT
   :description FIXME: write description
   :url http://example.com/FIXME;
   :license {:name Eclipse Public License
 :url http://www.eclipse.org/legal/epl-v10.html}
   :dependencies [[org.clojure/clojure 1.6.0]])

 ```



-- 
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: (Request) Rich Hickey's EuroClojure 2014 slides

2014-09-11 Thread Leon Grapenthin
Fantastic! Thank you very much.

On Thursday, September 11, 2014 10:26:17 PM UTC+2, Alex Miller wrote:

 The slides are now available at 
 http://cdn.cognitect.com/presentations/2014/insidechannels.pdf.


 On Thursday, September 11, 2014 2:57:30 PM UTC-5, puzzler wrote:

 +1.  I also was unable to follow the video without the slides.

 On Thu, Sep 11, 2014 at 12:36 PM, Leon Grapenthin grapent...@gmail.com 
 wrote:

 @Alex Miller: It would be great if an exception could be made. Again: 
 The slides are not in the video.

 Consuming them in context of the talk is my intention by opening two 
 windows (one with the video, one with the slides).


 Thanks, Leon.


 On Thursday, September 11, 2014 4:33:41 PM UTC+2, Alex Miller wrote:

 Usually Rich doesn't release his slides as he prefers for them to be 
 consumed in the context of the talk.

 On Thursday, September 11, 2014 8:44:47 AM UTC-5, Leon Grapenthin wrote:

 Hi,
  I am looking for the slides of this talk because one can't see them 
 in the video:

 http://vimeo.com/100518968

 Thanks,
  Leon.




  -- 
 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.