Re: How to configure a library from a file in the project that has it as a dependency?

2016-04-19 Thread Shantanu Kumar
How about accepting a fn as argument to provide the config required? In 
that case the user is free to use whichever library/hand-rolled code to 
read config from a file.

Shantanu

On Tuesday, 19 April 2016 22:15:22 UTC+5:30, Facundo Olano wrote:
>
> Hi! I started to use clojure a couple of months ago and now I'm struggling 
> to extract a little library from a larger project I'm working on.
>
> The lib is a gettext-like tool that allows translating strings based on a 
> translations dictionary. I'd like to be able to include the lib as a 
> dependency of the larger project and point to my translations dictionary 
> from a setting in a configuration file (Ideally I would use project.clj to 
> avoid having a lib specific file just for one setting).
>
> My problem is I'm not sure how to read a configuration file in my project 
> from the generated JAR of the lib (if that's even possible and not a bad 
> idea for some reason). I tried using configleaf 
>  and it worked while I 
> included the lib as a checkout project but it seems the config file gets 
> freezed to whatever it is when the lib's JAR is packed.
>
> I wonder if there's a straightforward and idiomatic way to achieve this. 
> "That's a terrible idea" type of answers are also welcome :P
>
> Thanks, 
> Facundo.
>

-- 
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: Validation Benchmark

2016-04-19 Thread Jason Wolfe
On Wed, Apr 20, 2016 at 12:31 AM, Atamert Ölçgen  wrote:
> Hi Jason,
>
> Thank you for the PR. I've just merged it.
>
> For now I have added this to the blog post:
>
> Results below and the comments about Schema being slow is no longer true.
> See this pull request for the results Jason got with quick mode benchmark.
>
> I am thinking about generating a stand alone page (GH pages) so that I don't
> have to update or create a new post everytime the results are updated.
>
> The README for Schema doesn't mention checker function, FYI.

Thanks!  I've just updated the README to explain check and checker as well.

>
>
> On Tue, Apr 19, 2016 at 7:30 AM, Jason Wolfe  wrote:
>>
>> Thanks for putting this together!
>>
>> For schema, I think using `s/validate` is not a fair comparison with the
>> other libraries -- as you mention, it throws an exception on error, and it
>> also has to parse the schema each time.
>>
>> I think `s/checker` is the correct construct to use here -- it returns an
>> error or nil for success (no exceptions), and only parses the schema once.
>> (This is what's used by `s/defn`, for example).
>>
>> Here's a pull request that implements this change:
>>
>> https://github.com/muhuk/validation-benchmark/pull/6
>>
>> I posted the updated results in the PR comments as well, which are
>> qualitatively quite different from the ones currently reported in your blog
>> post (with this change, schema is fastest on all but one benchmark, often by
>> a factor of 3 or more).
>>
>> Please let me know if you have any questions.
>>
>> Thanks,
>> Jason
>>
>>
>> On Tuesday, April 19, 2016 at 2:47:33 AM UTC+7, Atamert Ölçgen wrote:
>>>
>>> Hi All,
>>>
>>> I have been working a benchmark for (runtime) validation libraries. I
>>> think it is mature enough to share the results with the group.
>>>
>>> The repo is here: https://github.com/muhuk/validation-benchmark
>>>
>>> Raw benchmark output as EDN is here:
>>> https://gist.github.com/muhuk/93d7d9e46bf5191310aaa4557379d10e
>>>
>>> More human readable results are in my blog:
>>> http://blog.muhuk.com/2016/04/18/performance_comparison_of_annotate_herbert_schema.html
>>>
>>> If you are familiar with Annotate, Herbert or Schema, please take a quick
>>> look at their implementations:
>>> https://github.com/muhuk/validation-benchmark/tree/master/src/validation_benchmark/lib
>>>
>>> Also contributions of other validation libraries are most welcome!
>>>
>>> -
>>>
>>> As an aside: what is the group policy for attachments? Would it be ok if
>>> I attached images of benchmark results?
>>>
>>> --
>>> 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.
>
>
>
>
> --
> 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 a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/P3X9995Lrp8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

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

Re: lein project cross-reference tools

2016-04-19 Thread Dave Tenny
I'll take a look at that clj-refactor.

Re: IntelliJ.

I vaguely (possibly incorrectly) recall there was someone who used the
eclipse capabilities for java source code analysis and cross referencing
and packaged it up as some kind of emacs extension. I wonder if anybody has
done that with IntelliJ.



On Tue, Apr 19, 2016 at 2:49 PM, Colin Yates  wrote:

> Have you tried the 'find usages' functionality of
> https://github.com/clojure-emacs/clj-refactor.el? Also - you might
> want to download IntelliJ and give cursive a try - cursive is
> fantastic for this sort of stuff
>
> ... and yes, I too feel a bit of despair that my suggestions is 'try
> this other tool, if that doesn't work, try this entire editor, if that
> doesn't work then' :-)
>
> On 19 April 2016 at 19:45, Dave Tenny  wrote:
> > Still looking for basic slime-like who-calls in cider.  Is it there and
> I'm
> > just missing it?
> >
> > On Tue, Apr 19, 2016 at 9:57 AM, Dave Tenny 
> wrote:
> >>
> >> Tags aside, a transtive closure who-calls report for a definition would
> >> still be appreciated.
> >>
> >> On Tue, Apr 19, 2016 at 9:53 AM, Dave Tenny 
> wrote:
> >>>
> >>> Hmm, okay, trying etags, certainly plenty of google hits there as
> opposed
> >>> to googling "cross reference".  FYI, in terms of emacs compatibility, I
> >>> generally use CIDER if anybody has suggestoins for how to search
> without a
> >>> live repl or with a live repl but across projects or uberjars.
> >>>
> >>> On Tue, Apr 19, 2016 at 9:33 AM, Dave Tenny 
> wrote:
> 
>  Oh, if crossclj DOES do what I'm asking, please let me know, I found
> the
>  pages I visited a bit confusing as to how I might analyze my (private)
>  projects.
> 
>  On Tue, Apr 19, 2016 at 9:30 AM, Dave Tenny 
>  wrote:
> >
> > I'm tired of doing 'find-grep' type operations (including that
> command
> > in emacs).
> >
> > Are there any decent tools for producing cross reference reports and
> > emacs who-calls data in some useful form?
> >
> > A search on the topic mostly points to 'crossclj', which doesn't seem
> > to be what I want (I don't need to see who uses what from, say,
> clojars).
> >
> > I have a big project which, in conjunction with 'lein modules' has
> many
> > subprojects.  I can't really load a REPL on all of them in emacs.
> I'm happy
> > with source code analysis and the assumption that I don't need to
> know who
> > is calling functions by obscured dynamic lisp means.
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> > Note that posts from new members are moderated - please be patient
> with
> > your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> > ---
> > You received this message because you are subscribed to a topic in
> the
> > Google Groups "Clojure" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/clojure/ejNMVjyjp-Q/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > clojure+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> 
> 
> >>>
> >>
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> > Note that posts from new members are moderated - please be patient with
> your
> > first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "Clojure" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to clojure+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/ejNMVjyjp-Q/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...

Re: How to configure a library from a file in the project that has it as a dependency?

2016-04-19 Thread Stephen Gilardi
If you end up using a separate config file rather than project.clj, you might 
find Carica https://github.com/sonian/carica  
useful. It allows merging config files on the classpath into one effective 
config hierarchy with predictable overriding behavior.

Sample calls:

(carica/config :db) => {:classname “org.postgresql.Driver”, :subprotocol 
“postgresql”, … }
(carica/config :db :classname) => “org.postgresql.Driver”

A typical use is to have a config file for a server or library in the shipped 
jar file that contains defaults and a runtime classpath that allows that config 
to be overridden by a config file laid down during deployment.

The deployed config file needs to contain keys for the key paths that need to 
be overridden, not the entire hierarchy.

—Steve

> On Apr 19, 2016, at 12:04 PM, Facundo Olano  wrote:
> 
> Hi! I started to use clojure a couple of months ago and now I'm struggling to 
> extract a little library from a larger project I'm working on.
> 
> The lib is a gettext-like tool that allows translating strings based on a 
> translations dictionary. I'd like to be able to include the lib as a 
> dependency of the larger project and point to my translations dictionary from 
> a setting in a configuration file (Ideally I would use project.clj to avoid 
> having a lib specific file just for one setting).
> 
> My problem is I'm not sure how to read a configuration file in my project 
> from the generated JAR of the lib (if that's even possible and not a bad idea 
> for some reason). I tried using configleaf 
>  and it worked while I included 
> the lib as a checkout project but it seems the config file gets freezed to 
> whatever it is when the lib's JAR is packed.
> 
> I wonder if there's a straightforward and idiomatic way to achieve this. 
> "That's a terrible idea" type of answers are also welcome :P
> 
> Thanks, 
> Facundo.
> 
> -- 
> 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: lein project cross-reference tools

2016-04-19 Thread Colin Yates
Have you tried the 'find usages' functionality of
https://github.com/clojure-emacs/clj-refactor.el? Also - you might
want to download IntelliJ and give cursive a try - cursive is
fantastic for this sort of stuff

... and yes, I too feel a bit of despair that my suggestions is 'try
this other tool, if that doesn't work, try this entire editor, if that
doesn't work then' :-)

On 19 April 2016 at 19:45, Dave Tenny  wrote:
> Still looking for basic slime-like who-calls in cider.  Is it there and I'm
> just missing it?
>
> On Tue, Apr 19, 2016 at 9:57 AM, Dave Tenny  wrote:
>>
>> Tags aside, a transtive closure who-calls report for a definition would
>> still be appreciated.
>>
>> On Tue, Apr 19, 2016 at 9:53 AM, Dave Tenny  wrote:
>>>
>>> Hmm, okay, trying etags, certainly plenty of google hits there as opposed
>>> to googling "cross reference".  FYI, in terms of emacs compatibility, I
>>> generally use CIDER if anybody has suggestoins for how to search without a
>>> live repl or with a live repl but across projects or uberjars.
>>>
>>> On Tue, Apr 19, 2016 at 9:33 AM, Dave Tenny  wrote:

 Oh, if crossclj DOES do what I'm asking, please let me know, I found the
 pages I visited a bit confusing as to how I might analyze my (private)
 projects.

 On Tue, Apr 19, 2016 at 9:30 AM, Dave Tenny 
 wrote:
>
> I'm tired of doing 'find-grep' type operations (including that command
> in emacs).
>
> Are there any decent tools for producing cross reference reports and
> emacs who-calls data in some useful form?
>
> A search on the topic mostly points to 'crossclj', which doesn't seem
> to be what I want (I don't need to see who uses what from, say, clojars).
>
> I have a big project which, in conjunction with 'lein modules' has many
> subprojects.  I can't really load a REPL on all of them in emacs.  I'm 
> happy
> with source code analysis and the assumption that I don't need to know who
> is calling functions by obscured dynamic lisp means.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/ejNMVjyjp-Q/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


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

-- 
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 project cross-reference tools

2016-04-19 Thread Dave Tenny
Still looking for basic slime-like who-calls in cider.  Is it there and I'm
just missing it?

On Tue, Apr 19, 2016 at 9:57 AM, Dave Tenny  wrote:

> Tags aside, a transtive closure who-calls report for a definition would
> still be appreciated.
>
> On Tue, Apr 19, 2016 at 9:53 AM, Dave Tenny  wrote:
>
>> Hmm, okay, trying etags, certainly plenty of google hits there as opposed
>> to googling "cross reference".  FYI, in terms of emacs compatibility, I
>> generally use CIDER if anybody has suggestoins for how to search without a
>> live repl or with a live repl but across projects or uberjars.
>>
>> On Tue, Apr 19, 2016 at 9:33 AM, Dave Tenny  wrote:
>>
>>> Oh, if crossclj DOES do what I'm asking, please let me know, I found the
>>> pages I visited a bit confusing as to how I might analyze my (private)
>>> projects.
>>>
>>> On Tue, Apr 19, 2016 at 9:30 AM, Dave Tenny 
>>> wrote:
>>>
 I'm tired of doing 'find-grep' type operations (including that command
 in emacs).

 Are there any decent tools for producing cross reference reports and
 emacs who-calls data in some useful form?

 A search on the topic mostly points to 'crossclj', which doesn't seem
 to be what I want (I don't need to see who uses what from, say, clojars).

 I have a big project which, in conjunction with 'lein modules' has many
 subprojects.  I can't really load a REPL on all of them in emacs.  I'm
 happy with source code analysis and the assumption that I don't need to
 know who is calling functions by obscured dynamic lisp means.


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

>>>
>>>
>>
>

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


Re: Validation Benchmark

2016-04-19 Thread Atamert Ölçgen
Hi Jason,

Thank you for the PR. I've just merged it.

For now I have added this to the blog post:

Results below and the comments about Schema being slow is no longer true.
See this pull request
 for
the results Jason got with quick mode benchmark.

I am thinking about generating a stand alone page (GH pages) so that I
don't have to update or create a new post everytime the results are updated.

The README for Schema doesn't mention checker function, FYI.


On Tue, Apr 19, 2016 at 7:30 AM, Jason Wolfe  wrote:

> Thanks for putting this together!
>
> For schema, I think using `s/validate` is not a fair comparison with the
> other libraries -- as you mention, it throws an exception on error, and it
> also has to parse the schema each time.
>
> I think `s/checker` is the correct construct to use here -- it returns an
> error or nil for success (no exceptions), and only parses the schema once.
>  (This is what's used by `s/defn`, for example).
>
> Here's a pull request that implements this change:
>
> https://github.com/muhuk/validation-benchmark/pull/6
>
> I posted the updated results in the PR comments as well, which are
> qualitatively quite different from the ones currently reported in your blog
> post (with this change, schema is fastest on all but one benchmark, often
> by a factor of 3 or more).
>
> Please let me know if you have any questions.
>
> Thanks,
> Jason
>
>
> On Tuesday, April 19, 2016 at 2:47:33 AM UTC+7, Atamert Ölçgen wrote:
>>
>> Hi All,
>>
>> I have been working a benchmark for (runtime) validation libraries. I
>> think it is mature enough to share the results with the group.
>>
>> The repo is here: https://github.com/muhuk/validation-benchmark
>>
>> Raw benchmark output as EDN is here:
>> https://gist.github.com/muhuk/93d7d9e46bf5191310aaa4557379d10e
>>
>> More human readable results are in my blog:
>> http://blog.muhuk.com/2016/04/18/performance_comparison_of_annotate_herbert_schema.html
>>
>> If you are familiar with Annotate, Herbert or Schema, please take a quick
>> look at their implementations:
>> https://github.com/muhuk/validation-benchmark/tree/master/src/validation_benchmark/lib
>>
>> Also contributions of other validation libraries are most welcome!
>>
>> -
>>
>> As an aside: what is the group policy for attachments? Would it be ok if
>> I attached images of benchmark results?
>>
>> --
>> 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.
>



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


[ANN] clojure.java.jdbc 0.6.0 Alpha 2

2016-04-19 Thread Sean Corfield
What?
Clojure contrib JDBC wrapper
  https://github.com/clojure/java.jdbc
   Another minor step towards 0.6.0

Changes?
  Release 0.6.0-alpha2 on 2016-04-18 -- BREAKING RELEASE!

  ALL DEPRECATED FUNCTIONALITY HAS BEEN REMOVED! JDBC-118.
   • This removes deprecated functionality from db-do-commands and 
db-do-prepared* which should have been removed in Alpha 1.
   • Ensures SQL / params are actually vectors prior to destructuring (this 
addresses an interop edge case from other languages) JDBC-124.
   • Fix typo in insert-multi! argument validation exception JDBC-123.

  Release 0.6.0-alpha1 on 2016-04-13 -- BREAKING RELEASE!

  (ALMOST) ALL DEPRECATED FUNCTIONALITY HAS BEEN REMOVED! JDBC-118.
   • See changes described in versions 0.5.5 through 0.5.8 for what was 
deprecated
   • Use version 0.5.8 as a bridge to identify any deprecated API calls on 
which your code relies!
   • db-transaction (deprecated in version 0.3.0) has been removed
   • The java.jdbc.deprecated namespace has been removed

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood









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


How to configure a library from a file in the project that has it as a dependency?

2016-04-19 Thread Facundo Olano
Hi! I started to use clojure a couple of months ago and now I'm struggling 
to extract a little library from a larger project I'm working on.

The lib is a gettext-like tool that allows translating strings based on a 
translations dictionary. I'd like to be able to include the lib as a 
dependency of the larger project and point to my translations dictionary 
from a setting in a configuration file (Ideally I would use project.clj to 
avoid having a lib specific file just for one setting).

My problem is I'm not sure how to read a configuration file in my project 
from the generated JAR of the lib (if that's even possible and not a bad 
idea for some reason). I tried using configleaf 
 and it worked while I 
included the lib as a checkout project but it seems the config file gets 
freezed to whatever it is when the lib's JAR is packed.

I wonder if there's a straightforward and idiomatic way to achieve this. 
"That's a terrible idea" type of answers are also welcome :P

Thanks, 
Facundo.

-- 
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: Recur in an overloaded function does not work?

2016-04-19 Thread James Elliott
But recur does not do that. Recur does not call a function at all. It is 
the opposite of calling a function, it says “I want to loop, without the 
overhead of calling a function and creating a stack frame.” Recur is even 
used outside of functions entirely; it is how you iterate using the (loop 
...) form, and that is almost always how I have used it.

If you want to call a different arity of your function, that has to be an 
actual function call. recur is only a way to branch back to where you 
started a loop, or a particular function body.

On Tuesday, April 19, 2016 at 10:18:40 AM UTC-5, andmed wrote:
>
> Thank you. That the point. If "recur" binds to fn, why it can not know the 
> binding point as the function method based on the number of arguments 
> passed to it? I mean it is clear that Clojure can't do that, but I can see 
> no reason why it could or should not if we choose to implement such 
> syntactic nicety as recur in a function
>

-- 
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: ^:const changes data type

2016-04-19 Thread Nicola Mometto
Using `^:const` can lead to some funky behaviour, like the one you're seeing.
AFAIK The only official documentation about it can be found in the clojure 1.3 
changelog, 
https://github.com/clojure/clojure/blob/master/changes.md#215-const-defs where 
it is described as "^:const lets you name primitive values with speedier 
reference.".

There are other values that I'd say are currently "safe" to be used with 
`^:const` other than primitive values, such as strings and keywords, but I 
wouldn't use it for anything else, since it was not designed to work with 
arbitrary values but just to speed up math operations.

Nicola


> On 19 Apr 2016, at 15:43, Michael Stalker  wrote:
> 
> Adding ^:const to a var seems to change the data type sometimes:
> 
> user> (def ^:const time1 (java.sql.Timestamp. 1)
> #'user/time1
> user> (def time2 (java.sql.Timestamp. 1)
> #'user/time2
> user> (type time1)
> java.util.Date
> user> (type time2)
> java.sql.Timestamp
> 
> The upshot is that while (= time1 time2) yields true, converting these two 
> vars to strings yields different results:
> 
> user> (str time1)
> "Thu Jan 01 22:46:40 EST 1970"
> user> (str time2)
> "1970-01-01 22:46:40.0"
> 
> Daniel Gregoire pointed out that this seems be because of how the compiler 
> quotes constant vars. He showed met that eval-ing two different methods of 
> quoting yields different types:
> 
> user> (type (eval (quote (java.sql.Timestamp. 1
> java.sql.Timestamp
> user> (type (eval (list 'quote (java.sql.Timestamp. 1
> java.util.Date
> 
> Chris Bui noted that rebinding the data readers, and then evaluating the 
> second form above, yields the same data type as the first form:
> 
> user> (prn default-data-readers)
> {inst #'clojure.instant/read-instant-date, uuid 
> #'clojure.uuid/default-uuid-reader}
> nil
> user> (binding [*data-readers* {'inst 
> #'clojure.instant/read-instant-timestamp}]
> (type (eval (list 'quote (java.sql.Timestamp. 1)
> java.sql.Timestamp
> 
> Here's a gist he made.
> 
> I didn't expect ^:const to change the var's data type, and there wasn't any 
> clear documentation on this behavior that I could find. Is this a bug that I 
> should file in JIRA, or is ^:const supposed to work like 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.

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


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Recur in an overloaded function does not work?

2016-04-19 Thread andmed
Thank you. That the point. If "recur" binds to fn, why it can not know the 
binding point as the function method based on the number of arguments 
passed to it? I mean it is clear that Clojure can't do that, but I can see 
no reason why it could or should not if we choose to implement such 
syntactic nicety as recur in a function

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


^:const changes data type

2016-04-19 Thread Michael Stalker
Adding ^:const to a var seems to change the data type sometimes:

user> (def ^:const time1 (java.sql.Timestamp. 1)
#'user/time1
user> (def time2 (java.sql.Timestamp. 1)
#'user/time2
user> (type time1)
java.util.Date
user> (type time2)
java.sql.Timestamp

The upshot is that while (= time1 time2) yields true, converting these two 
vars to strings yields different results:

user> (str time1)
"Thu Jan 01 22:46:40 EST 1970"
user> (str time2)
"1970-01-01 22:46:40.0"

Daniel Gregoire pointed out that this seems be because of how the compiler 
quotes 
constant vars 
.
 
He showed met that eval-ing two different methods of quoting yields 
different types:

user> (type (eval (quote (java.sql.Timestamp. 1
java.sql.Timestamp
user> (type (eval (list 'quote (java.sql.Timestamp. 1
java.util.Date

Chris Bui noted that rebinding the data readers, and then evaluating the 
second form above, yields the same data type as the first form:

user> (prn default-data-readers)
{inst #'clojure.instant/read-instant-date, uuid 
#'clojure.uuid/default-uuid-reader}
nil
user> (binding [*data-readers* {'inst #'clojure.instant/read-instant-
timestamp}]
(type (eval (list 'quote (java.sql.Timestamp. 1)
java.sql.Timestamp

Here's a gist he made 
.

I didn't expect ^:const to change the var's data type, and there wasn't any 
clear documentation on this behavior that I could find. Is this a bug that 
I should file in JIRA, or is ^:const supposed to work like 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.


Subject: Functional Art, Music, Modelling and Design 2016: 2nd Call For Papers

2016-04-19 Thread Michael Sperber
4th ACM SIGPLAN International Workshop on Functional Art, Music, Modelling 
and Design
http://functional-art.org/2016/
Co-located with ICFP
Nara, Japan, 24 September, 2016

Call for Papers and Demos

The ACM SIGPLAN International Workshop on Functional Art, Music, Modelling 
and Design (FARM) gathers together people who are harnessing functional 
techniques in the pursuit of creativity and expression.

Functional Programming has emerged as a mainstream software development 
paradigm, and its artistic and creative use is booming. A growing number of 
software toolkits, frameworks and environments for art, music and design 
now employ functional programming languages and techniques. FARM is a forum 
for exploration and critical evaluation of these developments, for example 
to consider potential benefits of greater consistency, tersity, and closer 
mapping to a problem domain.

FARM encourages submissions from across art, craft and design, including 
textiles, visual art, music, 3D sculpture, animation, GUIs, video games, 3D 
printing and architectural models, choreography, poetry, and even VLSI 
layouts, GPU configurations, or mechanical engineering designs. Theoretical 
foundations, language design, implementation issues, and applications in 
industry or the arts are all within the scope of the workshop.  The 
language used need not be purely functional ("mostly functional" is fine), 
and may be manifested as a domain specific language or tool.  Moreover, 
submissions focusing on questions or issues about the use of functional 
programming are within the scope.

We welcome submissions from academic, professional, and independent 
programmers and artists.
Submissions are invited in three categories:

1) Original papers

We solicit original papers in the following categories:

* original research
* overview / state of the art
* technology tutorial

All submissions must propose an original contribution to the FARM theme. 
FARM 2016 is an interdisciplinary conference, so a wide range of approaches 
are encouraged. An original paper should have 5 to 12 pages, be in portable 
document format (PDF), using the ACM SIGPLAN style guidelines and use the 
ACM SIGPLAN template (http://www.sigplan.org/Resources/Author/). Accepted 
papers will be published in the ACM Digital Library as part of the FARM 
2016 proceedings. See http://authors.acm.org/main.cfm for information on 
the options available to authors. Authors are encouraged to submit 
auxiliary material for publication along with their paper (source code, 
data, videos, images, etc.); authors retain all rights to the auxiliary 
material.

2) Demo proposals

Demo proposals should describe a demonstration to be given at the FARM 
workshop and its context, connecting it with the themes of FARM. A demo 
could be in the form of a short (10-20 minute) tutorial, presentation of 
work-in-progress, an exhibition of some work, or even a performance.  Demo 
proposals should be in plain text, HTML or Markdown format, and not exceed 
2000 words. A demo proposal should be clearly marked as such, by prepending 
`Demo Proposal:` to the title. Demo proposals will be published on the FARM 
website.  A summary of the demo performances will also be published as part 
of the conference proceedings, to be prepared by the program chair.

3) Calls for collaboration

Calls for collaboration should describe a need for technology or expertise 
related to the FARM theme. Examples may include but are not restricted to:

* art projects in need of realization
* existing software or hardware that may benefit from functional programming
* unfinished projects in need of inspiration

Calls for collaboration should be in plain text, HTML or Markdown format, 
and not exceed 5000 words. A call for collaboration should be clearly 
marked as such, by prepending `Call for Collaboration:` to the title. Calls 
for collaboration will be published on the FARM website.

AUTHORS TAKE NOTE: The official publication date is the date the 
proceedings are made available in the ACM Digital Library. This date may be 
up to two weeks prior to the first day of your conference. The official 
publication date affects the deadline for any patent filings related to 
published work.

If you have any questions about what type of contributions that might be 
suitable, or anything else regarding submission or the workshop itself, 
please contact the organizers at: farm-2...@functional-art.org

All presentations at FARM 2016 will be recorded.  Permission to publish the 
resulting video (in all probability on YouTube, along with the videos of 
ICFP itself and the other ICFP-colocated events) will be requested on-site.

Key Dates:
Submission deadline - June 24
Author Notification - 15 July
Camera Ready - 31 July
Workshop - September 24, 2016

Submit at :
https://easychair.org/conferences/?conf=farm2016

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send ema

Re: lein project cross-reference tools

2016-04-19 Thread Dave Tenny
Tags aside, a transtive closure who-calls report for a definition would
still be appreciated.

On Tue, Apr 19, 2016 at 9:53 AM, Dave Tenny  wrote:

> Hmm, okay, trying etags, certainly plenty of google hits there as opposed
> to googling "cross reference".  FYI, in terms of emacs compatibility, I
> generally use CIDER if anybody has suggestoins for how to search without a
> live repl or with a live repl but across projects or uberjars.
>
> On Tue, Apr 19, 2016 at 9:33 AM, Dave Tenny  wrote:
>
>> Oh, if crossclj DOES do what I'm asking, please let me know, I found the
>> pages I visited a bit confusing as to how I might analyze my (private)
>> projects.
>>
>> On Tue, Apr 19, 2016 at 9:30 AM, Dave Tenny  wrote:
>>
>>> I'm tired of doing 'find-grep' type operations (including that command
>>> in emacs).
>>>
>>> Are there any decent tools for producing cross reference reports and
>>> emacs who-calls data in some useful form?
>>>
>>> A search on the topic mostly points to 'crossclj', which doesn't seem to
>>> be what I want (I don't need to see who uses what from, say, clojars).
>>>
>>> I have a big project which, in conjunction with 'lein modules' has many
>>> subprojects.  I can't really load a REPL on all of them in emacs.  I'm
>>> happy with source code analysis and the assumption that I don't need to
>>> know who is calling functions by obscured dynamic lisp means.
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clojure@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Clojure" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/clojure/ejNMVjyjp-Q/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

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


Re: lein project cross-reference tools

2016-04-19 Thread Dave Tenny
Hmm, okay, trying etags, certainly plenty of google hits there as opposed
to googling "cross reference".  FYI, in terms of emacs compatibility, I
generally use CIDER if anybody has suggestoins for how to search without a
live repl or with a live repl but across projects or uberjars.

On Tue, Apr 19, 2016 at 9:33 AM, Dave Tenny  wrote:

> Oh, if crossclj DOES do what I'm asking, please let me know, I found the
> pages I visited a bit confusing as to how I might analyze my (private)
> projects.
>
> On Tue, Apr 19, 2016 at 9:30 AM, Dave Tenny  wrote:
>
>> I'm tired of doing 'find-grep' type operations (including that command in
>> emacs).
>>
>> Are there any decent tools for producing cross reference reports and
>> emacs who-calls data in some useful form?
>>
>> A search on the topic mostly points to 'crossclj', which doesn't seem to
>> be what I want (I don't need to see who uses what from, say, clojars).
>>
>> I have a big project which, in conjunction with 'lein modules' has many
>> subprojects.  I can't really load a REPL on all of them in emacs.  I'm
>> happy with source code analysis and the assumption that I don't need to
>> know who is calling functions by obscured dynamic lisp means.
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Clojure" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/clojure/ejNMVjyjp-Q/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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


Re: [ANN] components.md

2016-04-19 Thread Francis Avila
I believe by "several different mem-dbs" he means different instances, not 
implementations, i.e. they differ by name and (maybe) config, but share an 
implementation.

There are two ways this can happen: two system graphs in the same clojure 
runtime, or one system graph that uses the same service-type twice.

In Component, the first case is handled by making a separate Component map; 
the second by adding a new key to the map.

In mount, the first case is AFAIKT not possible (maybe some 
swap-with-states trickery?), and the second by adding a new defstate var 
somewhere.

In general, what Component does with system maps, map keys and records 
mount does with namespaces. The upside is you don't have to be as manual 
and explicit about instances, names, dependencies, instantiation, etc (just 
use normal namespace machinery and accept initialization as a side-effect 
of require). The downside is that namespaces are singletons, so your system 
must be a singleton too.

On Tuesday, April 19, 2016 at 7:46:44 AM UTC-5, Brian Platz wrote:
>
>
> Jeroen,
>
> Happy to talk more about it on Slack.
>
> No matter what you are `def`-ing something somewhere. For Component I’d 
> `def` a big config map, and I do the same with Mount. My advantage with 
> Mount in the REPL is that I can have local vars for ‘components’ that are 
> easy to reference (but still driven from the main config map). In Component 
> I’d accomplish this by outputting what I need to a var, usually in the 
> ‘user’ namespace that I could get a handle to.
>
> As for several different `mem-db`s, if you mean swapping them out for 
> dev/testing, that is explained here: 
> https://github.com/tolitius/mount#swapping-alternate-implementations
>
> -Brian
>
>
>
> On Apr 19, 2016, at 6:03 AM, Jeroen van Dijk  > wrote:
>
> Hi Brian,
>
> When looking at the Readme of Mount (I think) I already see global state 
> backed in. 
>
> (defstate ^{:on-reload :noop} 
>   mem-db :start (connect config) 
>  :stop (disconnect mem-db))
>
>
> Do I misunderstand this or do we just disagree on what global state is? 
> What if I want to have several (different) `mem-db` instances, how would 
> that work? 
>
>
>
> On Fri, Apr 8, 2016 at 4:25 PM, Brian Platz  > wrote:
>
>>
>> >> This is also something that wouldn't be possible with Mount as this 
>> library seems to promote global state.
>>
>> As a recent switcher from Component to Mount, and without trying to 
>> change the thread's topic into a this vs. that -- I'll simply say that I 
>> don't believe any of these tools promote global state, it is people who 
>> code global state, and that can be with any of these tools... or likewise 
>> avoided with any of these tools.
>>
>> Some tools (i.e. Component) probably make it more difficult to have 
>> global state, but I think it is heavy handed. For projects with a lot of 
>> components, I would spend a lot of time backtracking components all feeding 
>> into each other to figure out where some var was when working in REPL. I'd 
>> also repeatedly deal with errors when adding new components as I didn't set 
>> up the dependencies correctly at first... just several interlocking pieces 
>> that all need to be coordinated, and I sometimes forget one (or two).
>>
>> Mount probably makes it a little easier to have global state, but that is 
>> up to the developer - I have no more global state than I had before the 
>> switch. I find it easier to work in REPL and get access to a var, or conn, 
>> etc. when I need to eval something, and I think all these components are 
>> primarily there to make the REPL workflow better. Also, I'm out of the 
>> business of managing my dependencies, which my challenges might just root 
>> from an absent-mindedness that I possess. Once it is in production, the 
>> component stuff matters very little anyhow.
>>
>> All to say that these tools, assuming they provide the feature needs that 
>> have been outlined well in this thread, should not make anything 'not 
>> possible' and can have as much or as little global state as the developer 
>> chooses to code in. I cringe a bit when I repeatedly see that Mount 
>> promotes global state, I think that is a falsehood.
>>
>> -Brian
>>
>>
>> -- 
>> 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 m

Re: lein project cross-reference tools

2016-04-19 Thread Dave Tenny
Oh, if crossclj DOES do what I'm asking, please let me know, I found the
pages I visited a bit confusing as to how I might analyze my (private)
projects.

On Tue, Apr 19, 2016 at 9:30 AM, Dave Tenny  wrote:

> I'm tired of doing 'find-grep' type operations (including that command in
> emacs).
>
> Are there any decent tools for producing cross reference reports and emacs
> who-calls data in some useful form?
>
> A search on the topic mostly points to 'crossclj', which doesn't seem to
> be what I want (I don't need to see who uses what from, say, clojars).
>
> I have a big project which, in conjunction with 'lein modules' has many
> subprojects.  I can't really load a REPL on all of them in emacs.  I'm
> happy with source code analysis and the assumption that I don't need to
> know who is calling functions by obscured dynamic lisp means.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/ejNMVjyjp-Q/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


lein project cross-reference tools

2016-04-19 Thread Dave Tenny
I'm tired of doing 'find-grep' type operations (including that command in 
emacs).

Are there any decent tools for producing cross reference reports and emacs 
who-calls data in some useful form?  

A search on the topic mostly points to 'crossclj', which doesn't seem to be 
what I want (I don't need to see who uses what from, say, clojars).

I have a big project which, in conjunction with 'lein modules' has many 
subprojects.  I can't really load a REPL on all of them in emacs.  I'm 
happy with source code analysis and the assumption that I don't need to 
know who is calling functions by obscured dynamic lisp means.


-- 
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] components.md

2016-04-19 Thread Brian Platz

Jeroen,

Happy to talk more about it on Slack.

No matter what you are `def`-ing something somewhere. For Component I’d `def` a 
big config map, and I do the same with Mount. My advantage with Mount in the 
REPL is that I can have local vars for ‘components’ that are easy to reference 
(but still driven from the main config map). In Component I’d accomplish this 
by outputting what I need to a var, usually in the ‘user’ namespace that I 
could get a handle to.

As for several different `mem-db`s, if you mean swapping them out for 
dev/testing, that is explained here: 
https://github.com/tolitius/mount#swapping-alternate-implementations

-Brian



On Apr 19, 2016, at 6:03 AM, Jeroen van Dijk  wrote:

> Hi Brian,
> 
> When looking at the Readme of Mount (I think) I already see global state 
> backed in. 
> 
> (defstate ^{:on-reload :noop} 
>   mem-db :start (connect config) 
>  :stop (disconnect mem-db))
> 
> Do I misunderstand this or do we just disagree on what global state is? What 
> if I want to have several (different) `mem-db` instances, how would that 
> work? 
> 
> 
> 
> On Fri, Apr 8, 2016 at 4:25 PM, Brian Platz  wrote:
> 
> >> This is also something that wouldn't be possible with Mount as this 
> >> library seems to promote global state.
> 
> As a recent switcher from Component to Mount, and without trying to change 
> the thread's topic into a this vs. that -- I'll simply say that I don't 
> believe any of these tools promote global state, it is people who code global 
> state, and that can be with any of these tools... or likewise avoided with 
> any of these tools.
> 
> Some tools (i.e. Component) probably make it more difficult to have global 
> state, but I think it is heavy handed. For projects with a lot of components, 
> I would spend a lot of time backtracking components all feeding into each 
> other to figure out where some var was when working in REPL. I'd also 
> repeatedly deal with errors when adding new components as I didn't set up the 
> dependencies correctly at first... just several interlocking pieces that all 
> need to be coordinated, and I sometimes forget one (or two).
> 
> Mount probably makes it a little easier to have global state, but that is up 
> to the developer - I have no more global state than I had before the switch. 
> I find it easier to work in REPL and get access to a var, or conn, etc. when 
> I need to eval something, and I think all these components are primarily 
> there to make the REPL workflow better. Also, I'm out of the business of 
> managing my dependencies, which my challenges might just root from an 
> absent-mindedness that I possess. Once it is in production, the component 
> stuff matters very little anyhow.
> 
> All to say that these tools, assuming they provide the feature needs that 
> have been outlined well in this thread, should not make anything 'not 
> possible' and can have as much or as little global state as the developer 
> chooses to code in. I cringe a bit when I repeatedly see that Mount promotes 
> global state, I think that is a falsehood.
> 
> -Brian
> 
> 
> -- 
> 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 a topic in the Google 
> Groups "Clojure" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/clojure/hYFEpJ6w80k/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googl

Re: [ANN] components.md

2016-04-19 Thread Jeroen van Dijk
Hi Brian,

When looking at the Readme of Mount (I think) I already see global state
backed in.

(defstate ^{:on-reload :noop}
  mem-db :start (connect config)
 :stop (disconnect mem-db))


Do I misunderstand this or do we just disagree on what global state is?
What if I want to have several (different) `mem-db` instances, how would
that work?



On Fri, Apr 8, 2016 at 4:25 PM, Brian Platz  wrote:

>
> >> This is also something that wouldn't be possible with Mount as this
> library seems to promote global state.
>
> As a recent switcher from Component to Mount, and without trying to change
> the thread's topic into a this vs. that -- I'll simply say that I don't
> believe any of these tools promote global state, it is people who code
> global state, and that can be with any of these tools... or likewise
> avoided with any of these tools.
>
> Some tools (i.e. Component) probably make it more difficult to have global
> state, but I think it is heavy handed. For projects with a lot of
> components, I would spend a lot of time backtracking components all feeding
> into each other to figure out where some var was when working in REPL. I'd
> also repeatedly deal with errors when adding new components as I didn't set
> up the dependencies correctly at first... just several interlocking pieces
> that all need to be coordinated, and I sometimes forget one (or two).
>
> Mount probably makes it a little easier to have global state, but that is
> up to the developer - I have no more global state than I had before the
> switch. I find it easier to work in REPL and get access to a var, or conn,
> etc. when I need to eval something, and I think all these components are
> primarily there to make the REPL workflow better. Also, I'm out of the
> business of managing my dependencies, which my challenges might just root
> from an absent-mindedness that I possess. Once it is in production, the
> component stuff matters very little anyhow.
>
> All to say that these tools, assuming they provide the feature needs that
> have been outlined well in this thread, should not make anything 'not
> possible' and can have as much or as little global state as the developer
> chooses to code in. I cringe a bit when I repeatedly see that Mount
> promotes global state, I think that is a falsehood.
>
> -Brian
>
> --
> 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.