Re: Registering commands in a command language

2014-05-29 Thread Walter van der Laan
You can do this using multimethods. defmulti and defmethod will allow you 
to do everything you ask for apart from adding a doc-string to each 
command. Have a look at: 
http://clojuredocs.org/clojure_core/clojure.core/defmulti

On Thursday, May 29, 2014 3:05:56 AM UTC+2, Will Duquette wrote:

 If there's a better place to ask this kind of question, please point me in 
 the right direction!

 I'm learning Clojure, and part of the project I'm making is a command 
 language: the user can type commands at the application in something like a 
 REPL, and have a dialog with the application.  I want to dispatch to a 
 function that carries out the command based on the first word of the 
 command; the function then receives the remaining words in the command, and 
 can do with them what it likes.  So I'm going to need a map, something like 

 { dothis #'commands/dothis, dothat #'commands/dothat ...}

 The question is, how best to build up that map?  I'd like to define a 
 command like this:

 (command dothis 
Documentation string
[argv]
)

 and have (command) define the function and add the entry to the map.

 I can think of all kinds of ways to do this.  I could define

 (def command-map {})

 and then have (command) rebind it:

 ...
 (def command-map (assoc command-map name function))

 but I know that's frowned upon.  I could make command-map contain an atom, 
 and use (swap!) to update the atom, but really, the mapping isn't going to 
 change at run-time.  I could make (command) a macro, so that it's really 
 updating command-map at the top-level, but that seems cheesy.

 Or, I could make (command) define the function as a public function in the 
 'commands namespace, which would be reserved for that purpose, and attach 
 the command name, e.g., dothis to the function as metadata.  Then I could 
 build the map by querying the namespace using (ns-publics).

 Is there is a normal way to do this kind of thing?


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


clojurescript 0-.0-2227

2014-05-29 Thread t x
I just upgraded to clojurescript 0.0-2227

I now get the following error.

Anyone else run into this issue?

./lein pdo cljx auto, cljsbuild ao
to
Compiling ClojureScript.
Exception in thread main java.lang.RuntimeException: No such var:
deps/find-classpath-lib, compiling:(cljs/closure.clj:431:20)
at clojure.lang.Compiler.analyze(Compiler.java:6380)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3573)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2677)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.access$100(Compiler.java:37)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:5973)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2669)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6009)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.access$100(Compiler.java:37)
at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:529)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)
at clojure.lang.Compiler.analyze(Compiler.java:6361)
at clojure.lang.Compiler.analyze(Compiler.java:6322)
at clojure.lang.Compiler.eval(Compiler.java:6623)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
at clojure.core$load_lib.doInvoke(core.clj:5374)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invoke(core.clj:619)
at clojure.core$load_libs.doInvoke(core.clj:5413)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:621)
at clojure.core$use.doInvoke(core.clj:5507)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at cljsbuild.compiler$eval9$loading__4910__auto10.invoke(compiler.clj:1)
at cljsbuild.compiler$eval9.invoke(compiler.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.eval(Compiler.java:6608)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361)
at clojure.lang.RT.load(RT.java:440)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)

Re: Registering commands in a command language

2014-05-29 Thread Gregg Reynolds
On Wed, May 28, 2014 at 8:05 PM, Will Duquette w...@wjduquette.com wrote:

 If there's a better place to ask this kind of question, please point me in
 the right direction!

 I'm learning Clojure, and part of the project I'm making is a command
 language: the user can type commands at the application in something like a
 REPL, and have a dialog with the application.  I want to dispatch to a
 function that carries out the command based on the first word of the
 command; the function then receives the remaining words in the command, and
 can do with them what it likes.


Take a look at the source of some leiningen plugins for examples.

https://github.com/technomancy/leiningen/blob/master/doc/PLUGINS.md

https://github.com/technomancy/leiningen/wiki/Plugins

-Gregg

-- 
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: [prismatic/plumbing 0.3.0] release adds ClojureScript support

2014-05-29 Thread Gary Trakhman
I was also wondering about this, several people on the #reactjs IRC channel
were wondering why they were getting e-mails and had no recollection of
signing in to prismatic.


On Wed, May 28, 2014 at 9:21 PM, Atamert Ölçgen mu...@muhuk.com wrote:

 Whoever thought it would be a good idea to farm emails (possibly from
 GitHub) and spam people is hurting your brand.

 She (or he) is a bad hire especially if she thinks she can pull something
 like that off with programmers.



 On Wed, May 28, 2014 at 11:15 PM, Jason Wolfe ja...@w01fe.com wrote:

 We’re excited to announce that Prismatic’s Plumbing and Graph library is
 now supported in ClojureScript, via cljx!  We’ve also added an experimental
 parallel, asynchronous Graph compilation strategy using core.async that
 works in both Clojure and ClojureScript, and made a number of smaller
 additions and changes (including breaking changes to ? and ?).

 Repo: https://github.com/Prismatic/plumbing
 Blog: http://blog.getprismatic.com/clojurescript-plumbing/
 Changelog: https://github.com/Prismatic/plumbing/blob/master/CHANGELOG.md

 Plumbing includes:
  - A core library of very commonly used functions (the only namespace we
 :refer :all across the Prismatic codebase)
  - Graph, a simple and declarative way to specify a structured
 computation, which is easy to analyze, change, compose, and monitor.  Graph
 forms the backbone of our services and core data pipelines at Prismatic.

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




 --
 Kind Regards,
 Atamert Ölçgen

 -+-
 --+
 +++

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


-- 
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: [R User Conference]

2014-05-29 Thread Jeff Heon
R is quirky, but really nice.

Not to hijack too much the group, but if you learn better with interactive 
introductions, like me, 
here are two nice interactive introductions to R :

https://www.codeschool.com/courses/try-r (Very humorous)
https://www.datacamp.com/courses/introduction-to-r (More serious)

-- 
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: [R User Conference]

2014-05-29 Thread Fergal Byrne
Coursera are basing a suite of courses in data science on R:

https://www.coursera.org/specialization/jhudatascience/1


On Thu, May 29, 2014 at 6:09 PM, Jeff Heon jfh...@gmail.com wrote:

 R is quirky, but really nice.

 Not to hijack too much the group, but if you learn better with interactive
 introductions, like me,
 here are two nice interactive introductions to R :

 https://www.codeschool.com/courses/try-r (Very humorous)
 https://www.datacamp.com/courses/introduction-to-r (More serious)

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

Author, Real Machine Intelligence with Clortex and NuPIC
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

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

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.


need help automating continuous deployment

2014-05-29 Thread Cody Ruby


A colleague of mine owns an established software company and is looking to 
expand his team for moving an analytics product to the cloud;  all new 
development for automating continuous deployment.  Subsequently, he’s asked 
for my help in getting the word out to those interested in joining him in 
legitimate functional programming, specifically cloud related with Clojure.

 Only catch is their office is up in White Plains, NY.  Can anyone help 
spread the word to those interested in a software engineering opportunity 
like this?

 Any help is greatly appreciated.

Cody Ruby | Managing Partner

Astute Search http://www.astutesearch.com/individuals

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


Strange update-in Behavior

2014-05-29 Thread Stuart Fehr
I am not sure if this is considered a bug or if it is simply expected 
behavior, so I thought I would ask the list for clarification.

I have this test which passes and shows the strange behavior that I am 
encountering:

(deftest update-in-and-remove
  ;; The leaf value becomes and empty list instead of [1 3]
  (is (= {:mykey {:myotherkey '()}}
 (update-in {:mykey {:myotherkey [1 2 3]}} [:mykey :myotherkey] 
remove #{2})))
  ;; Forcing a vector results in the behavior that I would expect
  (is (= {:mykey {:myotherkey [1 3]}}
 (update-in {:mykey {:myotherkey [1 2 3]}} [:mykey :myotherkey] 
(comp vec (partial remove #{2}))

I think this behavior is due to the use of apply in the definition of 
update-in and I think (but haven't tested) adding a partial to the 
non-recursive clause will fix this:
https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L5687

However, I don't want to submit a fix if this is the expected behavior. 
Thoughts?

-- 
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: Strange update-in Behavior

2014-05-29 Thread Ben Wolfson
it is expected behavior, because update-in calls the supplied function with
the value it finds in the map as the first argument, so your first call
ends up being

(remove [1 2 3] #{2})

Since ([1 2 3] 2) = 3 and is truthy, the result is ().

In your second case you're using (partial remove #{2}), so the result is
'(1 3), which is then turned into a vector by vec.


On Thu, May 29, 2014 at 10:00 AM, Stuart Fehr stuart.f...@gmail.com wrote:

 I am not sure if this is considered a bug or if it is simply expected
 behavior, so I thought I would ask the list for clarification.

 I have this test which passes and shows the strange behavior that I am
 encountering:

 (deftest update-in-and-remove
   ;; The leaf value becomes and empty list instead of [1 3]
   (is (= {:mykey {:myotherkey '()}}
  (update-in {:mykey {:myotherkey [1 2 3]}} [:mykey :myotherkey]
 remove #{2})))
   ;; Forcing a vector results in the behavior that I would expect
   (is (= {:mykey {:myotherkey [1 3]}}
  (update-in {:mykey {:myotherkey [1 2 3]}} [:mykey :myotherkey]
 (comp vec (partial remove #{2}))

 I think this behavior is due to the use of apply in the definition of
 update-in and I think (but haven't tested) adding a partial to the
 non-recursive clause will fix this:

 https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L5687

 However, I don't want to submit a fix if this is the expected behavior.
 Thoughts?

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




-- 
Ben Wolfson
Human kind has used its intelligence to vary the flavour of drinks, which
may be sweet, aromatic, fermented or spirit-based. ... Family and social
life also offer numerous other occasions to consume drinks for pleasure.
[Larousse, Drink entry]

-- 
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 Neocons 3.0 is released

2014-05-29 Thread Michael Klishin
Neocons [1] is a Clojure client for the Neo4J REST API.

Release notes:
http://blog.clojurewerkz.org/blog/2014/05/29/neocons-3-dot-0-0-is-released/

1. http://clojureneo4j.info
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
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 Welle 3.0.0 is released

2014-05-29 Thread Michael Klishin
Welle [1] is a small Clojure client for Riak with batteries included.

Release notes:
http://blog.clojurewerkz.org/blog/2014/05/29/welle-3-dot-0-0-is-released/

1. http://clojureriak.info
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
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: [R User Conference]

2014-05-29 Thread Gregg Reynolds
On Thu, May 29, 2014 at 1:22 AM, A aael...@gmail.com wrote:

 I hope it's allright to mention here that the R User Conference is
 happening June 30-July 3 in Los Angeles.  There are a number of ways
 Clojure and R can be used together for statistical programming and data
 analysis.

 Observing the R community may be insightful for the Clojure community with
 respect to the Incanter project and other data science oriented efforts in
 Clojure.


Ditto for Julia.  JuliaCon 2014 http://juliacon.org/ will be in Chicago
in June.  Any other Clojurites going?  I'm mainly interested in Clojure,
mainly because it's hard to beat it as a data integration language
(whatever that means), but I think Julia is worth a hard look.

-Gregg

-- 
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: Strange update-in Behavior

2014-05-29 Thread Stuart Fehr
Ah, for some reason, I had it in my head that the value found in the map 
was the *last* argument passed to the function.

This behavior makes a lot more sense now. Thanks for the clarification!

On Thursday, May 29, 2014 11:00:58 AM UTC-6, Stuart Fehr wrote:

 I am not sure if this is considered a bug or if it is simply expected 
 behavior, so I thought I would ask the list for clarification.

 I have this test which passes and shows the strange behavior that I am 
 encountering:

 (deftest update-in-and-remove
   ;; The leaf value becomes and empty list instead of [1 3]
   (is (= {:mykey {:myotherkey '()}}
  (update-in {:mykey {:myotherkey [1 2 3]}} [:mykey :myotherkey] 
 remove #{2})))
   ;; Forcing a vector results in the behavior that I would expect
   (is (= {:mykey {:myotherkey [1 3]}}
  (update-in {:mykey {:myotherkey [1 2 3]}} [:mykey :myotherkey] 
 (comp vec (partial remove #{2}))

 I think this behavior is due to the use of apply in the definition of 
 update-in and I think (but haven't tested) adding a partial to the 
 non-recursive clause will fix this:

 https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L5687

 However, I don't want to submit a fix if this is the expected behavior. 
 Thoughts?


-- 
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: [R User Conference]

2014-05-29 Thread TP
On Thu, May 29, 2014 at 12:21 PM, Gregg Reynolds d...@mobileink.com wrote:

 On Thu, May 29, 2014 at 1:22 AM, A aael...@gmail.com wrote:

 I hope it's allright to mention here that the R User Conference is
 happening June 30-July 3 in Los Angeles.  There are a number of ways
 Clojure and R can be used together for statistical programming and data
 analysis.

 Observing the R community may be insightful for the Clojure community
 with respect to the Incanter project and other data science oriented
 efforts in Clojure.


 Ditto for Julia.  JuliaCon 2014 http://juliacon.org/ will be in Chicago
 in June.  Any other Clojurites going?  I'm mainly interested in Clojure,
 mainly because it's hard to beat it as a data integration language
 (whatever that means), but I think Julia is worth a hard look.

 -Gregg


 There is also the newish book Clojure Data Analysis Cookbook (Packt,
March 2013) by Eric Rochester [1]. I haven't read it but it covers things
like working with R, Mathematica, and Inchanter via Clojure.

[1] http://www.packtpub.com/clojure-data-analysis-cookbook/book

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


Confusion about binding *ns* before defining a var

2014-05-29 Thread ian.tegebo
I went to write a context macro so that I could define functions in another 
namespace.  After the obligatory googling, I found with-ns:

http://richhickey.github.io/clojure-contrib/with-ns-api.html

Clicking through to look at the source, I was surprised to see that eval 
was being wrapped around each form in the body of binding.  I thought, 
surely forms within the body of a binding expression are evaluated in a 
context of the bindings?!:

user (ns blah)
nil
blah (in-ns 'user)
#Namespace user
user (binding [*ns* (the-ns 'blah)] *ns*)
#Namespace blah

Okay, no surprise there.  Yet, to my surprise:

user (binding [*ns* (the-ns 'blah)] (defn foo []))
#'user/foo
user (binding [*ns* (the-ns 'blah)] (eval '(defn foo [])))
#'blah/foo

The extra eval is necessary after all.  But wait, what does the one without 
eval expand into?

user (clojure.walk/macroexpand-all '(binding [*ns* (the-ns 'blah)] (defn 
foo [])))
(let*
 []
 (clojure.core/push-thread-bindings
  (clojure.core/hash-map #'*ns* (the-ns 'blah)))
 (try
  (def foo (fn* ([])))
  (finally (clojure.core/pop-thread-bindings

Huh.  Alright, let's remind ourselves of what def means:

user (doc def)
-
def
  (def symbol doc-string? init?)
Special Form
  Creates and interns a global var with the name
  of symbol *in the current namespace (*ns*) *or locates such a var if
  it already exists.  If init is supplied, it is evaluated, and the
  root binding of the var is set to the resulting value.  If init is
  not supplied, the root binding of the var is unaffected.

  Please see http://clojure.org/special_forms#def

Now my confusion: isn't binding *ns* exactly how one sets the current 
namespace?  It seems like def is not behaving as advertised.  I looked 
briefly at jvm.clojure.lang.Compiler.DefExpr, but I wasn't able to figure 
out why the symbol and namespace resolution going on in that class didn't 
consult thread-bindings (by design?).

Assuming this isn't a bug, what's the rationale for the current behavior?

-- 
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: [prismatic/plumbing 0.3.0] release adds ClojureScript support

2014-05-29 Thread Atamert Ölçgen
Prismatic responded via twitter. Funny thing is, whoever's writing those
tweets seems to think her (or his) audience would simply buy insincere
apologies like we didn't intent and so clueless to who she's talking to
that she would mention the unsubscribe link.

See: https://twitter.com/muhuk/status/471822897791516672

Opt-out only might be OK with non-technical users, it's debatable. But the
only valid form for mass mailing is opt-in for technical users. And I think
we should speak up. If not for ourselves, we should speak up because
Prismatic is a part of Clojure community.




On Thu, May 29, 2014 at 3:59 PM, Gary Trakhman gary.trakh...@gmail.com
wrote:

 I was also wondering about this, several people on the #reactjs IRC
 channel were wondering why they were getting e-mails and had no
 recollection of signing in to prismatic.


 On Wed, May 28, 2014 at 9:21 PM, Atamert Ölçgen mu...@muhuk.com wrote:

 Whoever thought it would be a good idea to farm emails (possibly from
 GitHub) and spam people is hurting your brand.

 She (or he) is a bad hire especially if she thinks she can pull something
 like that off with programmers.



 On Wed, May 28, 2014 at 11:15 PM, Jason Wolfe ja...@w01fe.com wrote:

 We’re excited to announce that Prismatic’s Plumbing and Graph library is
 now supported in ClojureScript, via cljx!  We’ve also added an experimental
 parallel, asynchronous Graph compilation strategy using core.async that
 works in both Clojure and ClojureScript, and made a number of smaller
 additions and changes (including breaking changes to ? and ?).

 Repo: https://github.com/Prismatic/plumbing
 Blog: http://blog.getprismatic.com/clojurescript-plumbing/
 Changelog:
 https://github.com/Prismatic/plumbing/blob/master/CHANGELOG.md

 Plumbing includes:
  - A core library of very commonly used functions (the only namespace we
 :refer :all across the Prismatic codebase)
  - Graph, a simple and declarative way to specify a structured
 computation, which is easy to analyze, change, compose, and monitor.  Graph
 forms the backbone of our services and core data pipelines at Prismatic.

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




 --
 Kind Regards,
 Atamert Ölçgen

 -+-
 --+
 +++

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


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




-- 
Kind Regards,
Atamert Ölçgen

-+-
--+
+++

www.muhuk.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, 

Re: Confusion about binding *ns* before defining a var

2014-05-29 Thread Stephen Gilardi

On May 29, 2014, at 7:11 PM, ian.tegebo ian.teg...@gmail.com wrote:

 user (binding [*ns* (the-ns 'blah)] (defn foo []))
 #'user/foo
 user (binding [*ns* (the-ns 'blah)] (eval '(defn foo [])))
 #'blah/foo

clojure.core/eval evaluates a form by compiling it and then executing the 
compiled code. For a def form, it's the ns that is current when the form is 
compiled that determines in which namespace the resulting var is created.

In the first case, the defn form is compiled before the binding to (the-ns 
'blah) is in effect.

In the second case, the defn form is quoted and remains unevaluated while the 
binding form is compiled. While executing the compiled code for the binding 
form, eval compiles the defn form (and then executes its compiled code). In 
this case, the defn is compiled after the binding to (the-ns 'blah) is in 
effect.

--Steve

-- 
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: Confusion about binding *ns* before defining a var

2014-05-29 Thread ian.tegebo

On Thursday, May 29, 2014 8:43:58 PM UTC-7, squeegee wrote:


 On May 29, 2014, at 7:11 PM, ian.tegebo ian.t...@gmail.com javascript: 
 wrote:

 user (binding [*ns* (the-ns 'blah)] (defn foo []))
 #'user/foo
 user (binding [*ns* (the-ns 'blah)] (eval '(defn foo [])))
 #'blah/foo

 In the first case, the defn form is compiled before the binding to (the-ns 
 ‘blah) is in effect.


It's exactly this point that's confusing.

The defn form expands into a def, whose documentation says it uses the 
current namespace.  The current namespace, as I understand it, is what's 
bound to *ns* which IIUC should have been accomplished with the binding 
macro.  The first code snippet was meant to demonstrate that.  Here's 
another variant in case there's confusing about *ns* being lexical:

user (defn println-ns [] *ns*)
#'user/println-ns
user (binding [*ns* (the-ns 'blah)] (println-ns))
#Namespace blah

I don't see the reason why def should behave as it currently does; it seems 
like it should lookup the current thread-binding for *ns*, making the 
second case's use of eval unnecessary.  Since it doesn't, I'd like to know 
why it couldn't (or shouldn't) do the thing that seems more intuitive.

That said, if the special form let* does not evaluate its arguments in left 
to right order such that let* actually evaluates def's before anything 
else, then I would understand why the current behavior is the way it is. 
 However, then I'd just be curious about let*...
 

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


help with the lawyers?

2014-05-29 Thread rcg
Hello;

Developing web site for government using Clojure on back end- lawyers 
reviewing EPL had objections. Would appreciate any advice on how to deal 
with them.

Again- web site, not distributing or modifying Clojure. I have no expertise 
with Open Source Licenses or lawyer-ese jargon.

These are the specific objections- do they even apply in the context of web 
services?

1. This Agreement is governed by the laws of the State of New York. Not 
acceptable: The federal government cannot agree to be bound by state law.

2. Each party waives its rights to a jury trial in any 
resulting litigation. Not acceptable: Only DOJ can control litigation.


THANKS!!

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


Re: help with the lawyers?

2014-05-29 Thread Marcus Blankenship
Dude, you need a lawyer to answer these questions.  No one here in their right 
mind will give legal advice, at least not this way.  


On May 29, 2014, at 8:31 PM, rcg randy.goebb...@gmail.com wrote:

 Hello;
 
 Developing web site for government using Clojure on back end- lawyers 
 reviewing EPL had objections. Would appreciate any advice on how to deal with 
 them.
 
 Again- web site, not distributing or modifying Clojure. I have no expertise 
 with Open Source Licenses or lawyer-ese jargon.
 
 These are the specific objections- do they even apply in the context of web 
 services?
 
 1. This Agreement is governed by the laws of the State of New York. Not 
 acceptable: The federal government cannot agree to be bound by state law.
 2. Each party waives its rights to a jury trial in any resulting 
 litigation. Not acceptable: Only DOJ can control litigation.
 
 THANKS!!
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with your 
 first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

Best,
Marcus

Marcus Blankenship
\\\ Problem Solver, Linear Thinker
\\\ 541.805.2736 \ @justzeros \ skype:marcuscreo

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


Re: help with the lawyers?

2014-05-29 Thread Atamert Ölçgen

 This Agreement is governed by the laws of the State of New York and the
 intellectual property laws of the United States of America.


This is a very peculiar clause for me. I have just checked GPL text and it
doesn't contain anything like that. I'll look into this further later, but
at this point I'm concerned by a license that is in a way limited to a
geographical location. A location which I don't live.

Thanks for bringing this to my attention.




On Fri, May 30, 2014 at 1:20 PM, Marcus Blankenship mar...@creoagency.com
wrote:

 Dude, you need a lawyer to answer these questions.  No one here in their
 right mind will give legal advice, at least not this way.


 On May 29, 2014, at 8:31 PM, rcg randy.goebb...@gmail.com wrote:

 Hello;

 Developing web site for government using Clojure on back end- lawyers
 reviewing EPL had objections. Would appreciate any advice on how to deal
 with them.

 Again- web site, not distributing or modifying Clojure. I have no
 expertise with Open Source Licenses or lawyer-ese jargon.

 These are the specific objections- do they even apply in the context of
 web services?

 1. This Agreement is governed by the laws of the State of New York. Not
 acceptable: The federal government cannot agree to be bound by state law.

 2. Each party waives its rights to a jury trial in any
 resulting litigation. Not acceptable: Only DOJ can control litigation.


 THANKS!!

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


 Best,
 Marcus

   Marcus Blankenship
 \\\ Problem Solver, Linear Thinker
 \\\ 541.805.2736 \ @justzeros \ skype:marcuscreo

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




-- 
Kind Regards,
Atamert Ölçgen

-+-
--+
+++

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