Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-15 Thread ronen
Great! 

The Clojure eco system is really fast paced

Ronen

On Friday, February 15, 2013 9:30:19 AM UTC+2, Ambrose Bonnaire-Sergeant 
wrote:

 Jonas already has another project which uses analyze 
 https://github.com/jonase/eastwood

 On Fri, Feb 15, 2013 at 12:19 PM, ronen nar...@gmail.com javascript:wrote:


 It looks as if https://github.com/jonase/kibit/ is a lint/check style 
 tool that only reads the source code, this limits its utilization:

 Kibit 
 readshttp://clojure.github.com/clojure/clojure.core-api.html#clojure.core/read
  source 
 code without any macro expansion or evaluation. A macro can therefor easily 
 invalidate a rule. Also, kibit will not know if the symbol + in the form (+ 
 x 1) actually refers to a local or to a function in a namespace other 
 than clojure.core. Expect some false positives.

 So there is a place for an AST based one (more similar to findbugs I 
 guess)

 On Wednesday, February 13, 2013 9:21:52 AM UTC+2, Ambrose 
 Bonnaire-Sergeant wrote:

 IMO that's the job of a linter-style tool, which can be written easily 
 with `analyze`.

 On Tue, Feb 12, 2013 at 11:58 PM, Michael Wood esio...@gmail.comwrote:

 It might be useful, though, to be able to enable warnings for shadowed
 variables.

 On 12 February 2013 17:38, Timothy Baldridge tbald...@gmail.com 
 wrote:
  This sort of pattern is used quite a lot in clojure (even in core):
 
  (let [data (if (string? data) (read-string data) data)
data (if (string? (first data)) (first data) (next data))
data (if (string? (first data)) (first data) (next data))]
   data)
 
  Throwing exceptions on overridden variable names would not only break
  Clojure code, but also is very non-lispy.
 
  Timothy
 
 
 
  On Tue, Feb 12, 2013 at 6:31 AM, AtKaaZ atk...@gmail.com wrote:
 
  it makes sense to not throw now that I think about it, when using _
  instead of a
  I'm also thinking of cases like:
  = (let [a 1]
   (let [b 2 a 3]
 (println a b)))
  3 2
  nil
 
  is there something that would let me know I'm overwriting a ? I 
 figure
  if something like this would slip by would be tough to track down
 
 
  On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood esio...@gmail.com 
 wrote:

 
  On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote:
   what would this do:
  
   (let [a 1, a 2] a)
   becomes:
   (let [a 1, a123 2] a)
   or
   (let [a 1, a123 2] a123)
   or
   exception[I prefer]
 
  It would be the second option, i.e.:
 
  (let [a 1, a123 2] a123)
 
  The original code is valid, so it would not throw an exception.
 
   On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com wrote:
  
   Processing a hygienic AST relieves the burden of worrying about
   shadowing
   of locals.
  
   Wherever a binding would normally be shadowed, it is instead 
 renamed
   to a
   local binding currently not in scope.
  
   eg. (let [a 1, a a] a)
  
   becomes
  
   (let [a 1, a123 a] a123)
  
   It can be useful for those processing Clojure's analysis results.
  
   Thanks,
   Ambrose
  
  
   On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta 
 kovas@gmail.com

   wrote:
  
   What is a hygienic AST?
  
   Thanks
   k
  
  
   On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com wrote:
Hi everyone,
   
Happy to release analyze 0.3.0 with new hygienic code
transformation
capabilities.
   
[analyze 0.3.0]
   
In a line:
   
analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy
emit-hy)
((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
   
Hygienic AST's have enabled large performance boosts in 
 core.typed.
I'm
excited to see how it could
be as useful to others.
   
Note: hygienic AST's (those transformed with
`analyze.hygienic/ast-hy` can
be printed normally with `analyze.emit-form/emit-form`, and
hygienically
with `analyze.hygienic/emit-hy`.
   
https://github.com/frenchy64/**analyzehttps://github.com/frenchy64/analyze
   
Thanks,
Ambrose
   
--
--
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=enhttp://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/**
 groups/opt_out https://groups.google.com/groups/opt_out.
   
   
  
   --
   --
   You received this message because you 

Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-14 Thread ronen

It looks as if https://github.com/jonase/kibit/ is a lint/check style tool 
that only reads the source code, this limits its utilization:

Kibit 
readshttp://clojure.github.com/clojure/clojure.core-api.html#clojure.core/read
 source 
code without any macro expansion or evaluation. A macro can therefor easily 
invalidate a rule. Also, kibit will not know if the symbol + in the form (+ 
x 1) actually refers to a local or to a function in a namespace other than 
clojure.core. Expect some false positives.

So there is a place for an AST based one (more similar to findbugs I guess)

On Wednesday, February 13, 2013 9:21:52 AM UTC+2, Ambrose Bonnaire-Sergeant 
wrote:

 IMO that's the job of a linter-style tool, which can be written easily 
 with `analyze`.

 On Tue, Feb 12, 2013 at 11:58 PM, Michael Wood esio...@gmail.comjavascript:
  wrote:

 It might be useful, though, to be able to enable warnings for shadowed
 variables.

 On 12 February 2013 17:38, Timothy Baldridge 
 tbald...@gmail.comjavascript: 
 wrote:
  This sort of pattern is used quite a lot in clojure (even in core):
 
  (let [data (if (string? data) (read-string data) data)
data (if (string? (first data)) (first data) (next data))
data (if (string? (first data)) (first data) (next data))]
   data)
 
  Throwing exceptions on overridden variable names would not only break
  Clojure code, but also is very non-lispy.
 
  Timothy
 
 
 
  On Tue, Feb 12, 2013 at 6:31 AM, AtKaaZ atk...@gmail.com javascript: 
 wrote:
 
  it makes sense to not throw now that I think about it, when using _
  instead of a
  I'm also thinking of cases like:
  = (let [a 1]
   (let [b 2 a 3]
 (println a b)))
  3 2
  nil
 
  is there something that would let me know I'm overwriting a ? I 
 figure
  if something like this would slip by would be tough to track down
 
 
  On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood 
  esio...@gmail.comjavascript: 
 wrote:
 
  On 12 February 2013 12:28, AtKaaZ atk...@gmail.com javascript: 
 wrote:
   what would this do:
  
   (let [a 1, a 2] a)
   becomes:
   (let [a 1, a123 2] a)
   or
   (let [a 1, a123 2] a123)
   or
   exception[I prefer]
 
  It would be the second option, i.e.:
 
  (let [a 1, a123 2] a123)
 
  The original code is valid, so it would not throw an exception.
 
   On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com javascript: wrote:
  
   Processing a hygienic AST relieves the burden of worrying about
   shadowing
   of locals.
  
   Wherever a binding would normally be shadowed, it is instead 
 renamed
   to a
   local binding currently not in scope.
  
   eg. (let [a 1, a a] a)
  
   becomes
  
   (let [a 1, a123 a] a123)
  
   It can be useful for those processing Clojure's analysis results.
  
   Thanks,
   Ambrose
  
  
   On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta 
   kovas@gmail.comjavascript:
 
   wrote:
  
   What is a hygienic AST?
  
   Thanks
   k
  
  
   On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com javascript: wrote:
Hi everyone,
   
Happy to release analyze 0.3.0 with new hygienic code
transformation
capabilities.
   
[analyze 0.3.0]
   
In a line:
   
analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy
emit-hy)
((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
   
Hygienic AST's have enabled large performance boosts in 
 core.typed.
I'm
excited to see how it could
be as useful to others.
   
Note: hygienic AST's (those transformed with
`analyze.hygienic/ast-hy` can
be printed normally with `analyze.emit-form/emit-form`, and
hygienically
with `analyze.hygienic/emit-hy`.
   
https://github.com/frenchy64/analyze
   
Thanks,
Ambrose
   
--
--
You received this message because you are subscribed to the 
 Google
Groups Clojure group.
To post to this group, send email to 
clo...@googlegroups.comjavascript:
Note that posts from new members are moderated - please be 
 patient
with
your
first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com javascript:
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the 
 Google
Groups
Clojure group.
To unsubscribe from this group and stop receiving emails from 
 it,
send
an
email to clojure+u...@googlegroups.com javascript:.
For more options, visit 
 https://groups.google.com/groups/opt_out.
   
   
  
   --
   --
   You received this message because you are subscribed to the Google
   Groups Clojure group.
   To post to this group, send email to 
   clo...@googlegroups.comjavascript:
   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 

Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-14 Thread Jonas


On Friday, February 15, 2013 6:19:00 AM UTC+2, ronen wrote:


 It looks as if https://github.com/jonase/kibit/ is a lint/check style 
 tool that only reads the source code, this limits its utilization:

 Kibit 
 readshttp://clojure.github.com/clojure/clojure.core-api.html#clojure.core/read
  source 
 code without any macro expansion or evaluation. A macro can therefor easily 
 invalidate a rule. Also, kibit will not know if the symbol + in the form (+ 
 x 1) actually refers to a local or to a function in a namespace other 
 than clojure.core. Expect some false positives.

 So there is a place for an AST based one (more similar to findbugs I guess)


If someone is interested in this https://github.com/jonase/eastwood might 
be a good starting point.
 


 On Wednesday, February 13, 2013 9:21:52 AM UTC+2, Ambrose 
 Bonnaire-Sergeant wrote:

 IMO that's the job of a linter-style tool, which can be written easily 
 with `analyze`.

 On Tue, Feb 12, 2013 at 11:58 PM, Michael Wood esio...@gmail.com wrote:

 It might be useful, though, to be able to enable warnings for shadowed
 variables.

 On 12 February 2013 17:38, Timothy Baldridge tbald...@gmail.com wrote:
  This sort of pattern is used quite a lot in clojure (even in core):
 
  (let [data (if (string? data) (read-string data) data)
data (if (string? (first data)) (first data) (next data))
data (if (string? (first data)) (first data) (next data))]
   data)
 
  Throwing exceptions on overridden variable names would not only break
  Clojure code, but also is very non-lispy.
 
  Timothy
 
 
 
  On Tue, Feb 12, 2013 at 6:31 AM, AtKaaZ atk...@gmail.com wrote:
 
  it makes sense to not throw now that I think about it, when using _
  instead of a
  I'm also thinking of cases like:
  = (let [a 1]
   (let [b 2 a 3]
 (println a b)))
  3 2
  nil
 
  is there something that would let me know I'm overwriting a ? I 
 figure
  if something like this would slip by would be tough to track down
 
 
  On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood esio...@gmail.com 
 wrote:
 
  On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote:
   what would this do:
  
   (let [a 1, a 2] a)
   becomes:
   (let [a 1, a123 2] a)
   or
   (let [a 1, a123 2] a123)
   or
   exception[I prefer]
 
  It would be the second option, i.e.:
 
  (let [a 1, a123 2] a123)
 
  The original code is valid, so it would not throw an exception.
 
   On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com wrote:
  
   Processing a hygienic AST relieves the burden of worrying about
   shadowing
   of locals.
  
   Wherever a binding would normally be shadowed, it is instead 
 renamed
   to a
   local binding currently not in scope.
  
   eg. (let [a 1, a a] a)
  
   becomes
  
   (let [a 1, a123 a] a123)
  
   It can be useful for those processing Clojure's analysis results.
  
   Thanks,
   Ambrose
  
  
   On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta 
 kovas@gmail.com
   wrote:
  
   What is a hygienic AST?
  
   Thanks
   k
  
  
   On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com wrote:
Hi everyone,
   
Happy to release analyze 0.3.0 with new hygienic code
transformation
capabilities.
   
[analyze 0.3.0]
   
In a line:
   
analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy
emit-hy)
((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
   
Hygienic AST's have enabled large performance boosts in 
 core.typed.
I'm
excited to see how it could
be as useful to others.
   
Note: hygienic AST's (those transformed with
`analyze.hygienic/ast-hy` can
be printed normally with `analyze.emit-form/emit-form`, and
hygienically
with `analyze.hygienic/emit-hy`.
   
https://github.com/frenchy64/analyze
   
Thanks,
Ambrose
   
--
--
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/groups/opt_out.
   
   
  
   --
   --
   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
   

Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-14 Thread Ambrose Bonnaire-Sergeant
Jonas already has another project which uses analyze
https://github.com/jonase/eastwood

On Fri, Feb 15, 2013 at 12:19 PM, ronen nark...@gmail.com wrote:


 It looks as if https://github.com/jonase/kibit/ is a lint/check style
 tool that only reads the source code, this limits its utilization:

 Kibit 
 readshttp://clojure.github.com/clojure/clojure.core-api.html#clojure.core/read
  source
 code without any macro expansion or evaluation. A macro can therefor easily
 invalidate a rule. Also, kibit will not know if the symbol + in the form (+
 x 1) actually refers to a local or to a function in a namespace other
 than clojure.core. Expect some false positives.

 So there is a place for an AST based one (more similar to findbugs I guess)

 On Wednesday, February 13, 2013 9:21:52 AM UTC+2, Ambrose
 Bonnaire-Sergeant wrote:

 IMO that's the job of a linter-style tool, which can be written easily
 with `analyze`.

 On Tue, Feb 12, 2013 at 11:58 PM, Michael Wood esio...@gmail.com wrote:

 It might be useful, though, to be able to enable warnings for shadowed
 variables.

 On 12 February 2013 17:38, Timothy Baldridge tbald...@gmail.com wrote:
  This sort of pattern is used quite a lot in clojure (even in core):
 
  (let [data (if (string? data) (read-string data) data)
data (if (string? (first data)) (first data) (next data))
data (if (string? (first data)) (first data) (next data))]
   data)
 
  Throwing exceptions on overridden variable names would not only break
  Clojure code, but also is very non-lispy.
 
  Timothy
 
 
 
  On Tue, Feb 12, 2013 at 6:31 AM, AtKaaZ atk...@gmail.com wrote:
 
  it makes sense to not throw now that I think about it, when using _
  instead of a
  I'm also thinking of cases like:
  = (let [a 1]
   (let [b 2 a 3]
 (println a b)))
  3 2
  nil
 
  is there something that would let me know I'm overwriting a ? I
 figure
  if something like this would slip by would be tough to track down
 
 
  On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood esio...@gmail.com
 wrote:

 
  On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote:
   what would this do:
  
   (let [a 1, a 2] a)
   becomes:
   (let [a 1, a123 2] a)
   or
   (let [a 1, a123 2] a123)
   or
   exception[I prefer]
 
  It would be the second option, i.e.:
 
  (let [a 1, a123 2] a123)
 
  The original code is valid, so it would not throw an exception.
 
   On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com wrote:
  
   Processing a hygienic AST relieves the burden of worrying about
   shadowing
   of locals.
  
   Wherever a binding would normally be shadowed, it is instead
 renamed
   to a
   local binding currently not in scope.
  
   eg. (let [a 1, a a] a)
  
   becomes
  
   (let [a 1, a123 a] a123)
  
   It can be useful for those processing Clojure's analysis results.
  
   Thanks,
   Ambrose
  
  
   On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta 
 kovas@gmail.com

   wrote:
  
   What is a hygienic AST?
  
   Thanks
   k
  
  
   On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
   abonnair...@gmail.com wrote:
Hi everyone,
   
Happy to release analyze 0.3.0 with new hygienic code
transformation
capabilities.
   
[analyze 0.3.0]
   
In a line:
   
analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy
emit-hy)
((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
   
Hygienic AST's have enabled large performance boosts in
 core.typed.
I'm
excited to see how it could
be as useful to others.
   
Note: hygienic AST's (those transformed with
`analyze.hygienic/ast-hy` can
be printed normally with `analyze.emit-form/emit-form`, and
hygienically
with `analyze.hygienic/emit-hy`.
   
https://github.com/frenchy64/**analyzehttps://github.com/frenchy64/analyze
   
Thanks,
Ambrose
   
--
--
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=enhttp://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/**
 groups/opt_out https://groups.google.com/groups/opt_out.
   
   
  
   --
   --
   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 - 

Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-12 Thread AtKaaZ
what would this do:
(let [a 1, a 2] a)
becomes:
(let [a 1, a123 2] a)
or
(let [a 1, a123 2] a123)
or
exception[I prefer]


On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant 
abonnaireserge...@gmail.com wrote:

 Processing a hygienic AST relieves the burden of worrying about shadowing
 of locals.

 Wherever a binding would normally be shadowed, it is instead renamed to a
 local binding currently not in scope.

 eg. (let [a 1, a a] a)

 becomes

 (let [a 1, a123 a] a123)

 It can be useful for those processing Clojure's analysis results.

 Thanks,
 Ambrose


 On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta kovas.bog...@gmail.comwrote:

 What is a hygienic AST?

 Thanks
 k


 On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
 abonnaireserge...@gmail.com wrote:
  Hi everyone,
 
  Happy to release analyze 0.3.0 with new hygienic code transformation
  capabilities.
 
  [analyze 0.3.0]
 
  In a line:
 
  analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy emit-hy)
  ((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
 
  Hygienic AST's have enabled large performance boosts in core.typed. I'm
  excited to see how it could
  be as useful to others.
 
  Note: hygienic AST's (those transformed with
 `analyze.hygienic/ast-hy` can
  be printed normally with `analyze.emit-form/emit-form`, and hygienically
  with `analyze.hygienic/emit-hy`.
 
  https://github.com/frenchy64/analyze
 
  Thanks,
  Ambrose
 
  --
  --
  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/groups/opt_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/groups/opt_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/groups/opt_out.






-- 
Please correct me if I'm wrong or incomplete,
even if you think I'll subconsciously hate it.

-- 
-- 
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/groups/opt_out.




Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-12 Thread Michael Wood
On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote:
 what would this do:

 (let [a 1, a 2] a)
 becomes:
 (let [a 1, a123 2] a)
 or
 (let [a 1, a123 2] a123)
 or
 exception[I prefer]

It would be the second option, i.e.:

(let [a 1, a123 2] a123)

The original code is valid, so it would not throw an exception.

 On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
 abonnaireserge...@gmail.com wrote:

 Processing a hygienic AST relieves the burden of worrying about shadowing
 of locals.

 Wherever a binding would normally be shadowed, it is instead renamed to a
 local binding currently not in scope.

 eg. (let [a 1, a a] a)

 becomes

 (let [a 1, a123 a] a123)

 It can be useful for those processing Clojure's analysis results.

 Thanks,
 Ambrose


 On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta kovas.bog...@gmail.com
 wrote:

 What is a hygienic AST?

 Thanks
 k


 On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
 abonnaireserge...@gmail.com wrote:
  Hi everyone,
 
  Happy to release analyze 0.3.0 with new hygienic code transformation
  capabilities.
 
  [analyze 0.3.0]
 
  In a line:
 
  analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy emit-hy)
  ((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
 
  Hygienic AST's have enabled large performance boosts in core.typed. I'm
  excited to see how it could
  be as useful to others.
 
  Note: hygienic AST's (those transformed with
  `analyze.hygienic/ast-hy` can
  be printed normally with `analyze.emit-form/emit-form`, and
  hygienically
  with `analyze.hygienic/emit-hy`.
 
  https://github.com/frenchy64/analyze
 
  Thanks,
  Ambrose
 
  --
  --
  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/groups/opt_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/groups/opt_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/groups/opt_out.






 --
 Please correct me if I'm wrong or incomplete,
 even if you think I'll subconsciously hate it.

 --
 --
 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/groups/opt_out.





-- 
Michael Wood esiot...@gmail.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 

Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-12 Thread AtKaaZ
it makes sense to not throw now that I think about it, when using _
instead of a
I'm also thinking of cases like:
= (let [a 1]
 (let [b 2 a 3]
   (println a b)))
3 2
nil

is there something that would let me know I'm overwriting a ? I figure if
something like this would slip by would be tough to track down


On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood esiot...@gmail.com wrote:

 On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote:
  what would this do:
 
  (let [a 1, a 2] a)
  becomes:
  (let [a 1, a123 2] a)
  or
  (let [a 1, a123 2] a123)
  or
  exception[I prefer]

 It would be the second option, i.e.:

 (let [a 1, a123 2] a123)

 The original code is valid, so it would not throw an exception.

  On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
  abonnaireserge...@gmail.com wrote:
 
  Processing a hygienic AST relieves the burden of worrying about
 shadowing
  of locals.
 
  Wherever a binding would normally be shadowed, it is instead renamed to
 a
  local binding currently not in scope.
 
  eg. (let [a 1, a a] a)
 
  becomes
 
  (let [a 1, a123 a] a123)
 
  It can be useful for those processing Clojure's analysis results.
 
  Thanks,
  Ambrose
 
 
  On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta kovas.bog...@gmail.com
  wrote:
 
  What is a hygienic AST?
 
  Thanks
  k
 
 
  On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
  abonnaireserge...@gmail.com wrote:
   Hi everyone,
  
   Happy to release analyze 0.3.0 with new hygienic code transformation
   capabilities.
  
   [analyze 0.3.0]
  
   In a line:
  
   analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy
 emit-hy)
   ((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
  
   Hygienic AST's have enabled large performance boosts in core.typed.
 I'm
   excited to see how it could
   be as useful to others.
  
   Note: hygienic AST's (those transformed with
   `analyze.hygienic/ast-hy` can
   be printed normally with `analyze.emit-form/emit-form`, and
   hygienically
   with `analyze.hygienic/emit-hy`.
  
   https://github.com/frenchy64/analyze
  
   Thanks,
   Ambrose
  
   --
   --
   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/groups/opt_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/groups/opt_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/groups/opt_out.
 
 
 
 
 
 
  --
  Please correct me if I'm wrong or incomplete,
  even if you think I'll subconsciously hate it.
 
  --
  --
  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 

Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-12 Thread Timothy Baldridge
This sort of pattern is used quite a lot in clojure (even in core):

(let [data (if (string? data) (read-string data) data)
  data (if (string? (first data)) (first data) (next data))
  data (if (string? (first data)) (first data) (next data))]
 data)

Throwing exceptions on overridden variable names would not only break
Clojure code, but also is very non-lispy.

Timothy



On Tue, Feb 12, 2013 at 6:31 AM, AtKaaZ atk...@gmail.com wrote:

 it makes sense to not throw now that I think about it, when using _
 instead of a
 I'm also thinking of cases like:
 = (let [a 1]
  (let [b 2 a 3]
(println a b)))
 3 2
 nil

 is there something that would let me know I'm overwriting a ? I figure
 if something like this would slip by would be tough to track down


 On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood esiot...@gmail.com wrote:

 On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote:
  what would this do:
 
  (let [a 1, a 2] a)
  becomes:
  (let [a 1, a123 2] a)
  or
  (let [a 1, a123 2] a123)
  or
  exception[I prefer]

 It would be the second option, i.e.:

 (let [a 1, a123 2] a123)

 The original code is valid, so it would not throw an exception.

  On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
  abonnaireserge...@gmail.com wrote:
 
  Processing a hygienic AST relieves the burden of worrying about
 shadowing
  of locals.
 
  Wherever a binding would normally be shadowed, it is instead renamed
 to a
  local binding currently not in scope.
 
  eg. (let [a 1, a a] a)
 
  becomes
 
  (let [a 1, a123 a] a123)
 
  It can be useful for those processing Clojure's analysis results.
 
  Thanks,
  Ambrose
 
 
  On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta kovas.bog...@gmail.com
  wrote:
 
  What is a hygienic AST?
 
  Thanks
  k
 
 
  On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
  abonnaireserge...@gmail.com wrote:
   Hi everyone,
  
   Happy to release analyze 0.3.0 with new hygienic code transformation
   capabilities.
  
   [analyze 0.3.0]
  
   In a line:
  
   analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy
 emit-hy)
   ((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
  
   Hygienic AST's have enabled large performance boosts in core.typed.
 I'm
   excited to see how it could
   be as useful to others.
  
   Note: hygienic AST's (those transformed with
   `analyze.hygienic/ast-hy` can
   be printed normally with `analyze.emit-form/emit-form`, and
   hygienically
   with `analyze.hygienic/emit-hy`.
  
   https://github.com/frenchy64/analyze
  
   Thanks,
   Ambrose
  
   --
   --
   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/groups/opt_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/groups/opt_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/groups/opt_out.
 
 
 
 
 
 
  --
  Please correct me if I'm wrong or incomplete,
  even if you think I'll subconsciously hate it.
 
  --
  --
  You received this message because you are subscribed to the Google

Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-12 Thread Michael Wood
It might be useful, though, to be able to enable warnings for shadowed
variables.

On 12 February 2013 17:38, Timothy Baldridge tbaldri...@gmail.com wrote:
 This sort of pattern is used quite a lot in clojure (even in core):

 (let [data (if (string? data) (read-string data) data)
   data (if (string? (first data)) (first data) (next data))
   data (if (string? (first data)) (first data) (next data))]
  data)

 Throwing exceptions on overridden variable names would not only break
 Clojure code, but also is very non-lispy.

 Timothy



 On Tue, Feb 12, 2013 at 6:31 AM, AtKaaZ atk...@gmail.com wrote:

 it makes sense to not throw now that I think about it, when using _
 instead of a
 I'm also thinking of cases like:
 = (let [a 1]
  (let [b 2 a 3]
(println a b)))
 3 2
 nil

 is there something that would let me know I'm overwriting a ? I figure
 if something like this would slip by would be tough to track down


 On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood esiot...@gmail.com wrote:

 On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote:
  what would this do:
 
  (let [a 1, a 2] a)
  becomes:
  (let [a 1, a123 2] a)
  or
  (let [a 1, a123 2] a123)
  or
  exception[I prefer]

 It would be the second option, i.e.:

 (let [a 1, a123 2] a123)

 The original code is valid, so it would not throw an exception.

  On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
  abonnaireserge...@gmail.com wrote:
 
  Processing a hygienic AST relieves the burden of worrying about
  shadowing
  of locals.
 
  Wherever a binding would normally be shadowed, it is instead renamed
  to a
  local binding currently not in scope.
 
  eg. (let [a 1, a a] a)
 
  becomes
 
  (let [a 1, a123 a] a123)
 
  It can be useful for those processing Clojure's analysis results.
 
  Thanks,
  Ambrose
 
 
  On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta kovas.bog...@gmail.com
  wrote:
 
  What is a hygienic AST?
 
  Thanks
  k
 
 
  On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
  abonnaireserge...@gmail.com wrote:
   Hi everyone,
  
   Happy to release analyze 0.3.0 with new hygienic code
   transformation
   capabilities.
  
   [analyze 0.3.0]
  
   In a line:
  
   analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy
   emit-hy)
   ((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
  
   Hygienic AST's have enabled large performance boosts in core.typed.
   I'm
   excited to see how it could
   be as useful to others.
  
   Note: hygienic AST's (those transformed with
   `analyze.hygienic/ast-hy` can
   be printed normally with `analyze.emit-form/emit-form`, and
   hygienically
   with `analyze.hygienic/emit-hy`.
  
   https://github.com/frenchy64/analyze
  
   Thanks,
   Ambrose
  
   --
   --
   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/groups/opt_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/groups/opt_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/groups/opt_out.
 
 
 
 
 

Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-12 Thread Ambrose Bonnaire-Sergeant
IMO that's the job of a linter-style tool, which can be written easily
with `analyze`.

On Tue, Feb 12, 2013 at 11:58 PM, Michael Wood esiot...@gmail.com wrote:

 It might be useful, though, to be able to enable warnings for shadowed
 variables.

 On 12 February 2013 17:38, Timothy Baldridge tbaldri...@gmail.com wrote:
  This sort of pattern is used quite a lot in clojure (even in core):
 
  (let [data (if (string? data) (read-string data) data)
data (if (string? (first data)) (first data) (next data))
data (if (string? (first data)) (first data) (next data))]
   data)
 
  Throwing exceptions on overridden variable names would not only break
  Clojure code, but also is very non-lispy.
 
  Timothy
 
 
 
  On Tue, Feb 12, 2013 at 6:31 AM, AtKaaZ atk...@gmail.com wrote:
 
  it makes sense to not throw now that I think about it, when using _
  instead of a
  I'm also thinking of cases like:
  = (let [a 1]
   (let [b 2 a 3]
 (println a b)))
  3 2
  nil
 
  is there something that would let me know I'm overwriting a ? I figure
  if something like this would slip by would be tough to track down
 
 
  On Tue, Feb 12, 2013 at 1:46 PM, Michael Wood esiot...@gmail.com
 wrote:
 
  On 12 February 2013 12:28, AtKaaZ atk...@gmail.com wrote:
   what would this do:
  
   (let [a 1, a 2] a)
   becomes:
   (let [a 1, a123 2] a)
   or
   (let [a 1, a123 2] a123)
   or
   exception[I prefer]
 
  It would be the second option, i.e.:
 
  (let [a 1, a123 2] a123)
 
  The original code is valid, so it would not throw an exception.
 
   On Tue, Feb 12, 2013 at 7:10 AM, Ambrose Bonnaire-Sergeant
   abonnaireserge...@gmail.com wrote:
  
   Processing a hygienic AST relieves the burden of worrying about
   shadowing
   of locals.
  
   Wherever a binding would normally be shadowed, it is instead renamed
   to a
   local binding currently not in scope.
  
   eg. (let [a 1, a a] a)
  
   becomes
  
   (let [a 1, a123 a] a123)
  
   It can be useful for those processing Clojure's analysis results.
  
   Thanks,
   Ambrose
  
  
   On Tue, Feb 12, 2013 at 1:54 AM, kovas boguta 
 kovas.bog...@gmail.com
   wrote:
  
   What is a hygienic AST?
  
   Thanks
   k
  
  
   On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
   abonnaireserge...@gmail.com wrote:
Hi everyone,
   
Happy to release analyze 0.3.0 with new hygienic code
transformation
capabilities.
   
[analyze 0.3.0]
   
In a line:
   
analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy
emit-hy)
((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922
   
Hygienic AST's have enabled large performance boosts in
 core.typed.
I'm
excited to see how it could
be as useful to others.
   
Note: hygienic AST's (those transformed with
`analyze.hygienic/ast-hy` can
be printed normally with `analyze.emit-form/emit-form`, and
hygienically
with `analyze.hygienic/emit-hy`.
   
https://github.com/frenchy64/analyze
   
Thanks,
Ambrose
   
--
--
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/groups/opt_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/groups/opt_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
   

Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-11 Thread kovas boguta
What is a hygienic AST?

Thanks
k


On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant
abonnaireserge...@gmail.com wrote:
 Hi everyone,

 Happy to release analyze 0.3.0 with new hygienic code transformation
 capabilities.

 [analyze 0.3.0]

 In a line:

 analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy emit-hy)
 ((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922

 Hygienic AST's have enabled large performance boosts in core.typed. I'm
 excited to see how it could
 be as useful to others.

 Note: hygienic AST's (those transformed with `analyze.hygienic/ast-hy` can
 be printed normally with `analyze.emit-form/emit-form`, and hygienically
 with `analyze.hygienic/emit-hy`.

 https://github.com/frenchy64/analyze

 Thanks,
 Ambrose

 --
 --
 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/groups/opt_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/groups/opt_out.




Re: [ANN] analyze 0.3.0 - Hygienic transformation

2013-02-11 Thread ronen
My educated guess is that each symbol has a separate representation 

analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy emit-hy)
((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922

In this example the first a is a in the AST the second one is a2921

This prevents collisions when working with the AST, gensyms in macros 
achieve similar results

I guess this is useful in typed Clojure or similar tools to perform type 
checking 

Ronen

On Monday, February 11, 2013 7:54:31 PM UTC+2, kovasb wrote:

 What is a hygienic AST? 

 Thanks 
 k 


 On Sun, Feb 10, 2013 at 10:45 PM, Ambrose Bonnaire-Sergeant 
 abonnair...@gmail.com javascript: wrote: 
  Hi everyone, 
  
  Happy to release analyze 0.3.0 with new hygienic code transformation 
  capabilities. 
  
  [analyze 0.3.0] 
  
  In a line: 
  
  analyze.hygienic= (- (ast (let [a 1 a a b a a a] a)) ast-hy emit-hy) 
  ((fn* ([] (let* [a 1 a2921 a b a2921 a2922 a2921] a2922 
  
  Hygienic AST's have enabled large performance boosts in core.typed. I'm 
  excited to see how it could 
  be as useful to others. 
  
  Note: hygienic AST's (those transformed with `analyze.hygienic/ast-hy` 
 can 
  be printed normally with `analyze.emit-form/emit-form`, and hygienically 
  with `analyze.hygienic/emit-hy`. 
  
  https://github.com/frenchy64/analyze 
  
  Thanks, 
  Ambrose 
  
  -- 
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.comjavascript: 
  Note that posts from new members are moderated - please be patient with 
 your 
  first post. 
  To unsubscribe from this group, send email to 
  clojure+u...@googlegroups.com javascript: 
  For more options, visit this group at 
  http://groups.google.com/group/clojure?hl=en 
  --- 
  You received this message because you are subscribed to the Google 
 Groups 
  Clojure group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to clojure+u...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/groups/opt_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/groups/opt_out.