Re: tools.analyzer[.js/.jvm], tools.emitter.jvm, status report

2014-08-19 Thread Francesco Bellomi
Nicola,

of course you're right.

I recently switched to the 3-ary analyze in order to 
use :validate/wrong-tag-handler and I was wrongly passing {} as the env, 
instead of (empty-env).
When I saw the "Invalid token: ::a/b" errors I was fooled into thinking 
they were purely syntactical errors (but still -- that would be the reader, 
as you said), and didn't check the environment.

(btw, I'm using my own analyze-ns because I'm interested in trying to go 
ahead even if the evaluation of some top-level form fails)

Sorry for the noise, and thanks again for your work

Francesco




On Tuesday, August 19, 2014 10:18:56 PM UTC+2, Nicola Mometto wrote:
>
>
> Francesco, 
> that doesn't seem to be the case in my tests: 
>
> [~/src/tools.analyzer.jvm/src/main/clojure]> cat test.clj 
> (ns test (:require [clojure.string :as s])) 
> ::s/foo 
>
> clojure.tools.analyzer.jvm> (-> (analyze-ns 'test) last :form) 
> :clojure.string/foo 
>
> Note that to analyze keywords in the form ::foo/bar, *ns* has to be set 
> and all the aliases need to be setup, this can only happen if the ns 
> form is evaluated after being analyzed, using analyze+eval or analyze-ns 
> directly, there's an explaination on the tools.analyzer.jvm README 
> regarding why `analyze` shouldn't be used to analyze whole namespaces 
> and why you whould use analyze+eval or analyze-ns instead. 
>
> In any case, keywords in the form ::foo/bar are resolved by the reader, 
> not the analyzer. 
>
> Nicola 
>
> Francesco Bellomi writes: 
>
> > Nicola, 
> > 
> > thank you for your work, and for :validate/wrong-tag-handler 
> specifically, 
> > which is very useful to me. 
> > 
> > It seems that analyzer refuses keywords in the form ::a/b, which are 
> used 
> > in some projects 
> > (e.g. [org.clojure/core.typed] clojure.core.typed.check.fn contains 
> > ::t/cmethods at line 21). 
> > 
> > Francesco 
> > 
> > 
> > On Wednesday, August 13, 2014 6:54:54 PM UTC+2, Nicola Mometto wrote: 
> >> 
> >> 
> >> As some of you might know, I've been working contiuously on my various 
> >> tools.* contrib libraries for the past months and I've recently added 
> >> tools.analyzer.js to the list of contrib libraries I maintain. 
> >> 
> >> Since I don't blog/tweet much about those libraries, I thought I'd 
> write 
> >> a report to let the community aware of the status of those libraries. 
> >> 
> >> ## tools.analyzer https://github.com/clojure/tools.analyzer 
> >> 
> >> tools.analyzer is a host-agnostic pluggable analyzer and collection of 
> >> passes producing an AST in clojure data structures for clojure and 
> >> other languages in the clojure language family, like clojurescript. 
> >> 
> >> The current release is 0.5.1, here's a list of notable changes that 
> have 
> >> made in in the last few months: 
> >> 
> >> * The analyzer now uses different environments for lexical state (like 
> >>   the locals map) and for global state (like namespaces mappings); the 
> >>   former is just a regular map passed to an analyze call, the latter is 
> >>   a dynamic var holding an atom and lives in the tools.analyzer.env 
> >>   namespace along with functions to setup/manipulate it. 
> >> 
> >> * The metadata elision mechanism has been vastly improved, allowing to 
> >>   specify different keys to elide based on the node :op, aswell as 
> based 
> >>   on a predicate rather than simple key matching. 
> >> 
> >> * The env context now partecipates in a keyword hierarchy, the default 
> >>   contexts are :ctx/statement, :ctx/return and :ctx/expr and other 
> >>   contexts can be derived from those, as an example tools.analyzer 
> >>   utilizes :ctx.invoke/target and :ctx.invoke/params for nodes in 
> invoke 
> >>   position. 
> >> 
> >> * Dispatch on clojure expressions types has been opened with the 
> >>   -analyze-form multimethod, allowing to provide custom evaluation 
> >>   strategies for custom types (this was needed for tools.analyzer.js 
> >>   because of clojurescript's #js syntax) 
> >> 
> >> * Documentation has been vastly improved with docstrings for every 
> >>   public function and pass, and the addition of an official AST 
> >>   quickref http://clojure.github.io/tools.analyzer/spec/quickref.html 
> >> 
> >> For a complete list of changes, refer to the CHANGELOG: 
> >> https://github.com/clojure/tools.analyzer/blob/master/CHANGELOG.md 
> >> 
> >> For more informations and examples, refer to the README: 
> >> https://github.com/clojure/tools.analyzer/blob/master/README.md 
> >> 
> >> ## tools.analyzer.jvm https://github.com/clojure/tools.analyzer.jvm 
> >> 
> >> tools.analyzer.jvm is a jvm-specific tools.analyzer extension, 
> >> collection of passes and useful functions to deal with analysis of 
> >> clojure on the JVM code. 
> >> 
> >> The current release is 0.5.2, here's a list of notable changes that 
> have 
> >> made in the last few months: 
> >> 
> >> * Added an analyze-ns function that returns a vector of AST nodes for 
> >>   every top-level form in that namespace; e

Re: [ANN] lein-templater - automagically generate templates from your existing projects

2014-08-19 Thread Dave Sann
Interesting Idea. I'll give it a go.

On Wednesday, 20 August 2014 06:47:47 UTC+10, Dylan Butman wrote:
>
> I've been writing a lot of templates lately for various web stacks and 
> whatnot, and I got really tired of having to copy my files into a template 
> every time they changes. I figured it wouldn't be too hard to generate them 
> programmatically, and after a few more days than expected, here you have it.
>
> Introducing lein-templater - 
> https://github.com/pleasetrythisathome/lein-templater
>
> It generates templates for you! It has options! 
>
> Feedback appreciated. I'm sure there are some kinks to iron out.
>

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


[ANN] lein-templater - automagically generate templates from your existing projects

2014-08-19 Thread Dylan Butman
I've been writing a lot of templates lately for various web stacks and 
whatnot, and I got really tired of having to copy my files into a template 
every time they changes. I figured it wouldn't be too hard to generate them 
programmatically, and after a few more days than expected, here you have it.

Introducing lein-templater - 
https://github.com/pleasetrythisathome/lein-templater

It generates templates for you! It has options! 

Feedback appreciated. I'm sure there are some kinks to iron out.

-- 
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] lein-plz 0.1.1 - Add dependencies quickly

2014-08-19 Thread Dylan Butman
Here you go! https://github.com/pleasetrythisathome/lein-templater

I'm sure there are some kinks to iron out, give it a try!

On Tuesday, August 19, 2014 1:07:34 AM UTC-4, john walker wrote:
>
> Is there a link to your work? I'm very interested in this.
>
> On Monday, August 18, 2014 8:49:36 PM UTC-7, Dylan Butman wrote:
>>
>> It'd be great if you could chain lein take like that to take advantage of 
>> having already spun up the jvm. 
>>
>> I've been thinking a lot lately about scaffolding for clojure projects, 
>> and while lein templates are a nice start, what I want to work towards is 
>> modular templates that can add (and maybe remove, although that's much 
>> harder) functionality where you need it. 
>>
>> Modular deps would be a great start! I'm almost done with an automatic 
>> template generator (also using re that's at least very helpful for template 
>> development. 
>>
>> On Aug 18, 2014, at 6:28 PM, john walker  wrote:
>>
>> I hadn't planned on adding remove, but with groups of dependencies, it 
>> makes sense. I like it
>>
>> Dependencies that will surely be added get lookups, but no one else. I'm 
>> going to play with exclusions to see if I can make it launch faster, but I 
>> suspect that it's largely a clojure issue in general. Another way that it 
>> can be sped up is by switching from rewrite-clj to the built-in lein change.
>>
>> One way that you might be able to eyeball the task's performance is by 
>> doing
>>
>> lein do help, plz add cljs match
>>
>> and eyeballing the gap? I bet there are problems with this approach, 
>> though.
>>
>> Something I'm interested in is a lein task for switching directories like 
>> this:
>>
>> lein do new baz, cd baz, plz add cljs
>>
>> if there were, then you could save some calls to lein.
>>
>> The right answer is probably here. I'll look through it and figure 
>> something out. https://github.com/technomancy/leiningen/wiki/Faster
>>
>> On Monday, August 18, 2014 9:24:00 AM UTC-7, Dylan Butman wrote:
>>>
>>> It looks like it walks the file and injects new lines. 
>>>
>>> Are you planning on adding a "remove" task?
>>>
>>> Also, it'd be great if you define groups of dependencies by giving 
>>> multiple dependencies the same key. For example, I want something like
>>>
>>> {
>>>   om#{"om frontend"}
>>>   prismatic/om-tools#{"om-tools frontend"}
>>>   sablono#{"sablono frontend"}
>>> }
>>>
>>> where "lein plz add frontend" would add all three deps.
>>>
>>> Also, it seems like the task takes quite a while, and there's no debug 
>>> output to indicate why, is this because you're fetching a lot of things 
>>> behind the scenes?
>>>
>>  -- 
>> 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 a topic in the 
>> Google Groups "Clojure" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/clojure/f5avH92IkBA/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> clojure+u...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>

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


[ANN] rete4frames, v. 5.1.0 - CLIPS-like expert system shell

2014-08-19 Thread ru
Hello all,

New version 5.1.0 of rete4frames CLIPS-like expert system shell published 
on https://github.com/rururu/rete4frames.

New features:

1. Alpha-memory reimplemented as hash map. As a result gained better 
performance up to 47% on Mrs.Manners and Waltz benchmarks.
2. To "depth" conflict resolution strategy (default) added optional 
"breadth" strategy.
3. Added example of "classic" expert system. This expert system diagnoses 
some simple problems with a car.

Enjoy!

Sincerely,
  Ru

-- 
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: tools.analyzer[.js/.jvm], tools.emitter.jvm, status report

2014-08-19 Thread Nicola Mometto

Francesco,
that doesn't seem to be the case in my tests:

[~/src/tools.analyzer.jvm/src/main/clojure]> cat test.clj
(ns test (:require [clojure.string :as s]))
::s/foo

clojure.tools.analyzer.jvm> (-> (analyze-ns 'test) last :form)
:clojure.string/foo

Note that to analyze keywords in the form ::foo/bar, *ns* has to be set
and all the aliases need to be setup, this can only happen if the ns
form is evaluated after being analyzed, using analyze+eval or analyze-ns
directly, there's an explaination on the tools.analyzer.jvm README
regarding why `analyze` shouldn't be used to analyze whole namespaces
and why you whould use analyze+eval or analyze-ns instead.

In any case, keywords in the form ::foo/bar are resolved by the reader,
not the analyzer.

Nicola

Francesco Bellomi writes:

> Nicola,
>
> thank you for your work, and for :validate/wrong-tag-handler specifically,
> which is very useful to me.
>
> It seems that analyzer refuses keywords in the form ::a/b, which are used
> in some projects
> (e.g. [org.clojure/core.typed] clojure.core.typed.check.fn contains
> ::t/cmethods at line 21).
>
> Francesco
>
>
> On Wednesday, August 13, 2014 6:54:54 PM UTC+2, Nicola Mometto wrote:
>>
>>
>> As some of you might know, I've been working contiuously on my various
>> tools.* contrib libraries for the past months and I've recently added
>> tools.analyzer.js to the list of contrib libraries I maintain.
>>
>> Since I don't blog/tweet much about those libraries, I thought I'd write
>> a report to let the community aware of the status of those libraries.
>>
>> ## tools.analyzer https://github.com/clojure/tools.analyzer
>>
>> tools.analyzer is a host-agnostic pluggable analyzer and collection of
>> passes producing an AST in clojure data structures for clojure and
>> other languages in the clojure language family, like clojurescript.
>>
>> The current release is 0.5.1, here's a list of notable changes that have
>> made in in the last few months:
>>
>> * The analyzer now uses different environments for lexical state (like
>>   the locals map) and for global state (like namespaces mappings); the
>>   former is just a regular map passed to an analyze call, the latter is
>>   a dynamic var holding an atom and lives in the tools.analyzer.env
>>   namespace along with functions to setup/manipulate it.
>>
>> * The metadata elision mechanism has been vastly improved, allowing to
>>   specify different keys to elide based on the node :op, aswell as based
>>   on a predicate rather than simple key matching.
>>
>> * The env context now partecipates in a keyword hierarchy, the default
>>   contexts are :ctx/statement, :ctx/return and :ctx/expr and other
>>   contexts can be derived from those, as an example tools.analyzer
>>   utilizes :ctx.invoke/target and :ctx.invoke/params for nodes in invoke
>>   position.
>>
>> * Dispatch on clojure expressions types has been opened with the
>>   -analyze-form multimethod, allowing to provide custom evaluation
>>   strategies for custom types (this was needed for tools.analyzer.js
>>   because of clojurescript's #js syntax)
>>
>> * Documentation has been vastly improved with docstrings for every
>>   public function and pass, and the addition of an official AST
>>   quickref http://clojure.github.io/tools.analyzer/spec/quickref.html
>>
>> For a complete list of changes, refer to the CHANGELOG:
>> https://github.com/clojure/tools.analyzer/blob/master/CHANGELOG.md
>>
>> For more informations and examples, refer to the README:
>> https://github.com/clojure/tools.analyzer/blob/master/README.md
>>
>> ## tools.analyzer.jvm https://github.com/clojure/tools.analyzer.jvm
>>
>> tools.analyzer.jvm is a jvm-specific tools.analyzer extension,
>> collection of passes and useful functions to deal with analysis of
>> clojure on the JVM code.
>>
>> The current release is 0.5.2, here's a list of notable changes that have
>> made in the last few months:
>>
>> * Added an analyze-ns function that returns a vector of AST nodes for
>>   every top-level form in that namespace; evaluates each form.
>>
>> * Added a configurable handler for wrong tags: while Clojure is
>>   permissive of type hints that don't resolve to a Class which it
>>   simply ignores in most cases, tools.analyzer.jvm's default behaviour
>>   has always been to throw an exception in those cases. This has been a
>>   longstanding issue for tools like eastwood that want to simply emit a
>>   warning on those cases rather than stopping analysis and error out.
>>   With the addition of this handlers, users can now control what happens
>>   when t.a.jvm hits a tag that can't be resolved to a Class.
>>
>> * Added optional Var-level tag inference
>>
>> * Improved analyze+eval to attach the result of the evaluation of the
>>   node to the AST, wrapping potential exceptions at evaluation time in
>>   an ExceptionThrown record.
>>
>> * Documentation has been vastly improved with docstrings for every
>>   public function and pass, and the addition of an offici

Re: tools.analyzer[.js/.jvm], tools.emitter.jvm, status report

2014-08-19 Thread Francesco Bellomi
Nicola,

thank you for your work, and for :validate/wrong-tag-handler specifically, 
which is very useful to me.

It seems that analyzer refuses keywords in the form ::a/b, which are used 
in some projects
(e.g. [org.clojure/core.typed] clojure.core.typed.check.fn contains 
::t/cmethods at line 21).

Francesco


On Wednesday, August 13, 2014 6:54:54 PM UTC+2, Nicola Mometto wrote:
>
>
> As some of you might know, I've been working contiuously on my various 
> tools.* contrib libraries for the past months and I've recently added 
> tools.analyzer.js to the list of contrib libraries I maintain. 
>
> Since I don't blog/tweet much about those libraries, I thought I'd write 
> a report to let the community aware of the status of those libraries. 
>
> ## tools.analyzer https://github.com/clojure/tools.analyzer 
>
> tools.analyzer is a host-agnostic pluggable analyzer and collection of 
> passes producing an AST in clojure data structures for clojure and 
> other languages in the clojure language family, like clojurescript. 
>
> The current release is 0.5.1, here's a list of notable changes that have 
> made in in the last few months: 
>
> * The analyzer now uses different environments for lexical state (like 
>   the locals map) and for global state (like namespaces mappings); the 
>   former is just a regular map passed to an analyze call, the latter is 
>   a dynamic var holding an atom and lives in the tools.analyzer.env 
>   namespace along with functions to setup/manipulate it. 
>
> * The metadata elision mechanism has been vastly improved, allowing to 
>   specify different keys to elide based on the node :op, aswell as based 
>   on a predicate rather than simple key matching. 
>
> * The env context now partecipates in a keyword hierarchy, the default 
>   contexts are :ctx/statement, :ctx/return and :ctx/expr and other 
>   contexts can be derived from those, as an example tools.analyzer 
>   utilizes :ctx.invoke/target and :ctx.invoke/params for nodes in invoke 
>   position. 
>
> * Dispatch on clojure expressions types has been opened with the 
>   -analyze-form multimethod, allowing to provide custom evaluation 
>   strategies for custom types (this was needed for tools.analyzer.js 
>   because of clojurescript's #js syntax) 
>
> * Documentation has been vastly improved with docstrings for every 
>   public function and pass, and the addition of an official AST 
>   quickref http://clojure.github.io/tools.analyzer/spec/quickref.html 
>
> For a complete list of changes, refer to the CHANGELOG: 
> https://github.com/clojure/tools.analyzer/blob/master/CHANGELOG.md 
>
> For more informations and examples, refer to the README: 
> https://github.com/clojure/tools.analyzer/blob/master/README.md 
>
> ## tools.analyzer.jvm https://github.com/clojure/tools.analyzer.jvm 
>
> tools.analyzer.jvm is a jvm-specific tools.analyzer extension, 
> collection of passes and useful functions to deal with analysis of 
> clojure on the JVM code. 
>
> The current release is 0.5.2, here's a list of notable changes that have 
> made in the last few months: 
>
> * Added an analyze-ns function that returns a vector of AST nodes for 
>   every top-level form in that namespace; evaluates each form. 
>
> * Added a configurable handler for wrong tags: while Clojure is 
>   permissive of type hints that don't resolve to a Class which it 
>   simply ignores in most cases, tools.analyzer.jvm's default behaviour 
>   has always been to throw an exception in those cases. This has been a 
>   longstanding issue for tools like eastwood that want to simply emit a 
>   warning on those cases rather than stopping analysis and error out. 
>   With the addition of this handlers, users can now control what happens 
>   when t.a.jvm hits a tag that can't be resolved to a Class. 
>
> * Added optional Var-level tag inference 
>
> * Improved analyze+eval to attach the result of the evaluation of the 
>   node to the AST, wrapping potential exceptions at evaluation time in 
>   an ExceptionThrown record. 
>
> * Documentation has been vastly improved with docstrings for every 
>   public function and pass, and the addition of an official AST 
>   quickref http://clojure.github.io/tools.analyzer.jvm/spec/quickref.html 
>
> For a complete list of changes, refer to the CHANGELOG: 
> https://github.com/clojure/tools.analyzer.jvm/blob/master/CHANGELOG.md 
>
> For more informations and examples, refer to the README: 
> https://github.com/clojure/tools.analyzer.jvm/blob/master/README.md 
>
> ## tools.analyzer.js https://github.com/clojure/tools.analyzer.js 
>
> tools.analyzer.js is a js-specific tools.analyzer extension, collection 
> of passes and useful functions to deal with analysis of clojurescript 
> code. 
>
> The current release is 0.1.0-beta4. 
>
> The produced AST is not compatible with the one produced by 
> cljs.analyzer even though they are similar as the cljs analyzer heavily 
> influenced the AST format of tools.analyzer. 
> tools.analyzer.js h

Re: tools.analyzer[.js/.jvm], tools.emitter.jvm, status report

2014-08-19 Thread Francesco Bellomi
Nicola,

thank you for your work, and for :validate/wrong-tag-handler specifically, 
which is very useful to me.

It seems that analyzer refuses keywords in the form ::a/b, which are used 
in some projects
(e.g. [org.clojure/core.typed] clojure.core.typed.check.fn contains 
::t/cmethods at line 21).

Francesco


org.clojure/core.typed clojure.core.typed.check.fnorg.clojure/core.typed 
clojure.core.typed.check.fn
On Wednesday, August 13, 2014 6:54:54 PM UTC+2, Nicola Mometto wrote:
>
>
> As some of you might know, I've been working contiuously on my various 
> tools.* contrib libraries for the past months and I've recently added 
> tools.analyzer.js to the list of contrib libraries I maintain. 
>
> Since I don't blog/tweet much about those libraries, I thought I'd write 
> a report to let the community aware of the status of those libraries. 
>
> ## tools.analyzer https://github.com/clojure/tools.analyzer 
>
> tools.analyzer is a host-agnostic pluggable analyzer and collection of 
> passes producing an AST in clojure data structures for clojure and 
> other languages in the clojure language family, like clojurescript. 
>
> The current release is 0.5.1, here's a list of notable changes that have 
> made in in the last few months: 
>
> * The analyzer now uses different environments for lexical state (like 
>   the locals map) and for global state (like namespaces mappings); the 
>   former is just a regular map passed to an analyze call, the latter is 
>   a dynamic var holding an atom and lives in the tools.analyzer.env 
>   namespace along with functions to setup/manipulate it. 
>
> * The metadata elision mechanism has been vastly improved, allowing to 
>   specify different keys to elide based on the node :op, aswell as based 
>   on a predicate rather than simple key matching. 
>
> * The env context now partecipates in a keyword hierarchy, the default 
>   contexts are :ctx/statement, :ctx/return and :ctx/expr and other 
>   contexts can be derived from those, as an example tools.analyzer 
>   utilizes :ctx.invoke/target and :ctx.invoke/params for nodes in invoke 
>   position. 
>
> * Dispatch on clojure expressions types has been opened with the 
>   -analyze-form multimethod, allowing to provide custom evaluation 
>   strategies for custom types (this was needed for tools.analyzer.js 
>   because of clojurescript's #js syntax) 
>
> * Documentation has been vastly improved with docstrings for every 
>   public function and pass, and the addition of an official AST 
>   quickref http://clojure.github.io/tools.analyzer/spec/quickref.html 
>
> For a complete list of changes, refer to the CHANGELOG: 
> https://github.com/clojure/tools.analyzer/blob/master/CHANGELOG.md 
>
> For more informations and examples, refer to the README: 
> https://github.com/clojure/tools.analyzer/blob/master/README.md 
>
> ## tools.analyzer.jvm https://github.com/clojure/tools.analyzer.jvm 
>
> tools.analyzer.jvm is a jvm-specific tools.analyzer extension, 
> collection of passes and useful functions to deal with analysis of 
> clojure on the JVM code. 
>
> The current release is 0.5.2, here's a list of notable changes that have 
> made in the last few months: 
>
> * Added an analyze-ns function that returns a vector of AST nodes for 
>   every top-level form in that namespace; evaluates each form. 
>
> * Added a configurable handler for wrong tags: while Clojure is 
>   permissive of type hints that don't resolve to a Class which it 
>   simply ignores in most cases, tools.analyzer.jvm's default behaviour 
>   has always been to throw an exception in those cases. This has been a 
>   longstanding issue for tools like eastwood that want to simply emit a 
>   warning on those cases rather than stopping analysis and error out. 
>   With the addition of this handlers, users can now control what happens 
>   when t.a.jvm hits a tag that can't be resolved to a Class. 
>
> * Added optional Var-level tag inference 
>
> * Improved analyze+eval to attach the result of the evaluation of the 
>   node to the AST, wrapping potential exceptions at evaluation time in 
>   an ExceptionThrown record. 
>
> * Documentation has been vastly improved with docstrings for every 
>   public function and pass, and the addition of an official AST 
>   quickref http://clojure.github.io/tools.analyzer.jvm/spec/quickref.html 
>
> For a complete list of changes, refer to the CHANGELOG: 
> https://github.com/clojure/tools.analyzer.jvm/blob/master/CHANGELOG.md 
>
> For more informations and examples, refer to the README: 
> https://github.com/clojure/tools.analyzer.jvm/blob/master/README.md 
>
> ## tools.analyzer.js https://github.com/clojure/tools.analyzer.js 
>
> tools.analyzer.js is a js-specific tools.analyzer extension, collection 
> of passes and useful functions to deal with analysis of clojurescript 
> code. 
>
> The current release is 0.1.0-beta4. 
>
> The produced AST is not compatible with the one produced by 
> cljs.analyzer even though they are simil

Disrupt SF Hackathon Clojure Group

2014-08-19 Thread mark
Hey guys/gals,

Are any of you going to the Disrupt SF Hackathon? I'd love to join or form 
a group of Clojurists.

I'm open to any and all project ideas. I really am interested in meeting 
other smart people and hack on Clojure for a day (and win first place). 
I've been using Clojure for a year now, mainly writing RESTful web 
services, but I've touched a little ClojureScipt as well.

Let me know!

-Mark

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


[videos] Getting started with Clojure, IntelliJ, Cursive and Gorilla REPL

2014-08-19 Thread Jony Hudson


Thought I'd share the links to a couple of videos I made for my students on 
how to set up a nice development environment for Clojure with IntelliJ, 
Cursive and Gorilla.

Part 1 on setting up software: https://vimeo.com/103808402

Part 2 on basic workflow:https://vimeo.com/103812557

Probably not much in there for experts, and the setup won't suit everyone 
(*cough* emacs *cough*) but hopefully they're useful for some of those just 
getting started. They're excruciatingly detailed, so should be suitable for 
those with no Clojure experience.


Jony

-- 
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: Howto write test.check custom generators

2014-08-19 Thread Reid Draper
Hey Tim,

When you write a property, like your `has-agroup`, there's no need to call 
`gen/sample`. You can simply write: (prop/for-all [v my-generator] ...)

-Reid

On Sunday, August 10, 2014 6:04:21 PM UTC-5, frye wrote:
>
> Oook, this is starting to sink in. 
>
> I've gotten a little farther, in that I can run quick-check with my custom 
> generator. However, after a bunch of values had been generated, it fails on 
> a NullPointerException. How can I know where the breakdown is happening? 
>
> => (tc/quick-check 100 u/has-agroup)
> {:email , :last-name , :first-name , :username }
> {:email , :last-name , :first-name , :username 0}
> {:email , :last-name , :first-name Rq, :username 0}
> {:email 5D2, :last-name R4F, :first-name x, :username G0H}
> ...
> {:email 8KQgSr497EPw14X80oEbWC0, :last-name cdkLb8D5ol, :first-name 
> 8DCOXz1U4S3JM641u5I7yPwQ, :username DADOk}
> {:email x, :last-name Qq3h07d6Cbs4, :first-name 6H6Enrwu, :username 
> yf40SClLjJHp1ptbnx4I9xFbwI3}
> *NullPointerException   clojure.test.check.generators/gen-bind/fn--18990 
> (generators.clj:77)*
> bkell.bkell> (pst *e)
> NullPointerException
> clojure.test.check.generators/gen-bind/fn--18990 
> (generators.clj:77)
> clojure.test.check.generators/gen-bind/fn--18990 
> (generators.clj:79)
>  clojure.test.check.generators/gen-bind/fn--18990 
> (generators.clj:77)
> clojure.test.check.generators/gen-fmap/fn--18985 
> (generators.clj:70)
> clojure.test.check.generators/call-gen (generators.clj:56)
> clojure.test.check/quick-check (check.clj:57)
> bkell.bkell/eval19267 (form-init7280611083923741467.clj:1)
> clojure.lang.Compiler.eval (Compiler.java:6703)
> clojure.lang.Compiler.eval (Compiler.java:)
> clojure.core/eval (core.clj:2927)
>  clojure.main/repl/read-eval-print--6625/fn--6628 (main.clj:239)
> clojure.main/repl/read-eval-print--6625 (main.clj:239)
>
>
> This is my domain function: 
>
>   (defn *create-user* 
> ([] (create {}))
> ([opts]
>(println opts)
>(let [sans-nils (apply merge (for [[k v]
>   opts
>   :when (not (nil? v))]
>   {k v}))]
>
>  (merge {:id (mu/generate-uuid)
>  :username ""
>  :password (crypto/base64 12)
>  :first-name ""
>  :last-name ""
>  :email ""
>  :country {}}
> sans-nils
>
>
> And these are my test functions. 
>
>   (def gend-user
> (gen/fmap *du/create-user*
>   (gen/hash-map :username gen/string-alpha-numeric
> :first-name gen/string-alpha-numeric
> :last-name gen/string-alpha-numeric
> :email gen/string-alpha-numeric)))
>
>   (def has-agroup
> (prop/for-all [v (gen/sample gend-user)]
>   (-> v nil? not)))
>
>
>
> Tim Washington 
> Interruptsoftware.com  
>
>
> On Sun, Aug 10, 2014 at 3:02 PM, Sam Ritchie  > wrote:
>
>> You can to use gen/fmap to build up generators. Here's an example:
>>
>>

-- 
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: Cljs build does not compile the source folders

2014-08-19 Thread Timur

Ok, the problem was the files with .clj suffix are ignored by the watcher. 
Changing it to .cljs solved the problem. 


On Tuesday, August 19, 2014 11:58:51 AM UTC+2, Timur wrote:
>
> Hi everyone,
>
> My clojurescript build results in a Javascript file which does not contain 
> the expected namepsace and functions contained in my clojurescript files. 
> What could be the reason?
>
> My project setup (simplified) is as follows:
>
> (defproject myapp "0.1.0-SNAPSHOT"
>
>   :description "FIXME: write description"
>
>   :url "http://example.com/FIXME";
>
>   :dependencies [[org.clojure/clojure "1.6.0"]
>
>  [compojure "1.1.8"]
>
>  [enfocus "2.1.0"]
>
>  [cljs-ajax "0.2.6"]
>
>  [org.clojure/clojurescript "0.0-2311"]]
>
>   :plugins [[lein-idefiles "0.2.1"]
>
> [lein-cljsbuild "1.0.3"]
>
> [com.cemerick/austin "0.1.4"]]
>
>   :ring {:handler myapp/app}
>
>   :java-source-paths ["src/main/java"]
>
>   :hooks [leiningen.cljsbuild]
>
>   :resource-paths ["src/main/resources" "src/main/web-app"]
>
>   :source-paths ["src/main/clj"]
>
>   :java-source-paths ["src/main/java"]
>
>   :compile-path "bin/"
>
>   :profiles  {:dev 
>
>   {:dependencies [[javax.servlet/servlet-api "2.5"]
>
>[ring-mock "0.1.5"]]}}
>
>   :cljsbuild {
>
>   :builds [{
>
> :source-paths ["src/main/cljs"]
>
> :compiler {
>
>:output-to 
> "src/main/web-app/public/js/main.js"  ; default: target/cljsbuild-main.js
>
>:optimizations :whitespace
>
>:pretty-print true}}]})
>

-- 
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] lein-plz 0.1.1 - Add dependencies quickly

2014-08-19 Thread Dylan Butman
I'm going to tie a bow on it today and I'll get back to you

> On Aug 19, 2014, at 1:07 AM, john walker  wrote:
> 
> Is there a link to your work? I'm very interested in this.
> 
>> On Monday, August 18, 2014 8:49:36 PM UTC-7, Dylan Butman wrote:
>> It'd be great if you could chain lein take like that to take advantage of 
>> having already spun up the jvm. 
>> 
>> I've been thinking a lot lately about scaffolding for clojure projects, and 
>> while lein templates are a nice start, what I want to work towards is 
>> modular templates that can add (and maybe remove, although that's much 
>> harder) functionality where you need it. 
>> 
>> Modular deps would be a great start! I'm almost done with an automatic 
>> template generator (also using re that's at least very helpful for template 
>> development. 
>> 
>>> On Aug 18, 2014, at 6:28 PM, john walker  wrote:
>>> 
>>> I hadn't planned on adding remove, but with groups of dependencies, it 
>>> makes sense. I like it
>>> 
>>> Dependencies that will surely be added get lookups, but no one else. I'm 
>>> going to play with exclusions to see if I can make it launch faster, but I 
>>> suspect that it's largely a clojure issue in general. Another way that it 
>>> can be sped up is by switching from rewrite-clj to the built-in lein change.
>>> 
>>> One way that you might be able to eyeball the task's performance is by doing
>>> 
>>> lein do help, plz add cljs match
>>> 
>>> and eyeballing the gap? I bet there are problems with this approach, though.
>>> 
>>> Something I'm interested in is a lein task for switching directories like 
>>> this:
>>> 
>>> lein do new baz, cd baz, plz add cljs
>>> 
>>> if there were, then you could save some calls to lein.
>>> 
>>> The right answer is probably here. I'll look through it and figure 
>>> something out. https://github.com/technomancy/leiningen/wiki/Faster
>>> 
 On Monday, August 18, 2014 9:24:00 AM UTC-7, Dylan Butman wrote:
 It looks like it walks the file and injects new lines. 
 
 Are you planning on adding a "remove" task?
 
 Also, it'd be great if you define groups of dependencies by giving 
 multiple dependencies the same key. For example, I want something like
 
 {
   om#{"om frontend"}
   prismatic/om-tools#{"om-tools frontend"}
   sablono#{"sablono frontend"}
 }
 
 where "lein plz add frontend" would add all three deps.
 
 Also, it seems like the task takes quite a while, and there's no debug 
 output to indicate why, is this because you're fetching a lot of things 
 behind the scenes?
>>> 
>>> -- 
>>> 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 a topic in the 
>>> Google Groups "Clojure" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/clojure/f5avH92IkBA/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> clojure+u...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Clojure" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/clojure/f5avH92IkBA/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 optio

Cljs build does not compile the source folders

2014-08-19 Thread Timur
Hi everyone,

My clojurescript build results in a Javascript file which does not contain 
the expected namepsace and functions contained in my clojurescript files. 
What could be the reason?

My project setup (simplified) is as follows:

(defproject myapp "0.1.0-SNAPSHOT"

  :description "FIXME: write description"

  :url "http://example.com/FIXME";

  :dependencies [[org.clojure/clojure "1.6.0"]

 [compojure "1.1.8"]

 [enfocus "2.1.0"]

 [cljs-ajax "0.2.6"]

 [org.clojure/clojurescript "0.0-2311"]]

  :plugins [[lein-idefiles "0.2.1"]

[lein-cljsbuild "1.0.3"]

[com.cemerick/austin "0.1.4"]]

  :ring {:handler myapp/app}

  :java-source-paths ["src/main/java"]

  :hooks [leiningen.cljsbuild]

  :resource-paths ["src/main/resources" "src/main/web-app"]

  :source-paths ["src/main/clj"]

  :java-source-paths ["src/main/java"]

  :compile-path "bin/"

  :profiles  {:dev 

  {:dependencies [[javax.servlet/servlet-api "2.5"]

   [ring-mock "0.1.5"]]}}

  :cljsbuild {

  :builds [{

:source-paths ["src/main/cljs"]

:compiler {

   :output-to 
"src/main/web-app/public/js/main.js"  ; default: target/cljsbuild-main.js

   :optimizations :whitespace

   :pretty-print true}}]})

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