Discussion:
Updating the Clojurescript Checker
Vincent Heuken
2015-11-29 21:55:47 UTC
Permalink
I recently made an issue on the typed clojurescript sample project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
Ambrose Bonnaire-Sergeant
2015-11-29 22:53:26 UTC
Permalink
Hi Vincent,

Awesome!

This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs to be
resolved.

Here's what to do.

1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058>
:try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the AST to
conform to tools.analyzer.

I'm available to video chat over the week if that helps.

Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample project's
github <https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
Vincent Heuken
2015-11-30 08:05:33 UTC
Permalink
Thanks for getting back to me.

I won't have time to start for a couple of days, but I wanted to go in and
try something simple to make sure I have the right idea, so I tried my hand
at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.

---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env :context :expr)
throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))

(defmethod parse 'try
[op env [_ & body :as form] name _]


On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs to be
resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the AST to
conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample project's
github <https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
Vincent Heuken
2015-11-30 08:06:27 UTC
Permalink
Thanks for getting back to me.

I won't have time to start for a couple of days, but I wanted to go in and
try something simple to make sure I have the right idea, so I tried my hand
at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.

---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env :context :expr)
throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))

(defmethod parse 'try
[op env [_ & body :as form] name _]

On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs to be
resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the AST to
conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample project's
github <https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
Ambrose Bonnaire-Sergeant
2015-11-30 08:15:29 UTC
Permalink
Yes, that's a good start. You should also start thinking about how this
affects the rest of the analyzer/compiler. eg. :throw is now :exception,
and :children traversal is drastically different and keep notes about that
too.

Eventually the patch will incorporate these changes, but I would leave them
until last.

Thanks,
Ambrose
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to go in and
try something simple to make sure I have the right idea, so I tried my hand
at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env :context :expr)
throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs to be
resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the AST to
conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample project's
github <https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
Sean Walker
2016-01-22 16:05:59 UTC
Permalink
Has any progress been made on this? I am interested in helping get this
updated, so I'm willing to assist/collaborate if you're still working on
this, or look into it myself otherwise.
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to go in and
try something simple to make sure I have the right idea, so I tried my hand
at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env :context :expr)
throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs to be
resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the AST to
conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample project's
github <https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
Vincent Heuken
2016-01-23 01:42:23 UTC
Permalink
Unfortunately I haven't had time. Feel free to start on it yourself if
you'd like.
Post by Sean Walker
Has any progress been made on this? I am interested in helping get this
updated, so I'm willing to assist/collaborate if you're still working on
this, or look into it myself otherwise.
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to go in
and try something simple to make sure I have the right idea, so I tried my
hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env :context
:expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs to be
resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the AST
to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample project's
github <https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
--
Vincent Heuken
Ambrose Bonnaire-Sergeant
2016-01-24 01:30:56 UTC
Permalink
No progress from me either.

Sean, the instructions earlier in the thread should still be a good
starting point to work on.

Thanks,
Ambrose
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it yourself if
you'd like.
Post by Sean Walker
Has any progress been made on this? I am interested in helping get this
updated, so I'm willing to assist/collaborate if you're still working on
this, or look into it myself otherwise.
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to go in
and try something simple to make sure I have the right idea, so I tried my
hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env :context
:expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs to be
resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the AST
to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
--
Vincent Heuken
Vincent Heuken
2016-01-24 02:59:12 UTC
Permalink
Sean, if you do end up starting, could you link to your Github (or
wherever)? I'd like to watch progress and possibly help out if I can.

On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a good
starting point to work on.
Thanks,
Ambrose
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it yourself if
you'd like.
On Fri, Jan 22, 2016 at 8:05 AM, Sean Walker <
Post by Sean Walker
Has any progress been made on this? I am interested in helping get this
updated, so I'm willing to assist/collaborate if you're still working on
this, or look into it myself otherwise.
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to go in
and try something simple to make sure I have the right idea, so I tried my
hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env :context
:expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs to be
resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the AST
to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Sean Walker
2016-01-26 07:29:50 UTC
Permalink
Sure, my github is https://github.com/AnOctopus. I'll likely start on it
later this week, once I've cleared a few other things off of my plate.
Post by Vincent Heuken
Sean, if you do end up starting, could you link to your Github (or
wherever)? I'd like to watch progress and possibly help out if I can.
On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a good
starting point to work on.
Thanks,
Ambrose
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it yourself if
you'd like.
Post by Sean Walker
Has any progress been made on this? I am interested in helping get this
updated, so I'm willing to assist/collaborate if you're still working on
this, or look into it myself otherwise.
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to go in
and try something simple to make sure I have the right idea, so I tried my
hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env :context
:expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs to
be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the
AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Sean Walker
2016-01-31 01:03:19 UTC
Permalink
I have tried adjusting a few more forms to match the tools.analyzer ast,
and I want to make sure I'm on the right track as well. The commit is here
<https://github.com/AnOctopus/clojurescript/commit/07e553bd54945238c819795c4164a9f65d0ca23f>.
I'm not sure about a few things (is ctor just class, or something else?),
but I think I'm starting to understand how this part of the analyzer works.
Post by Sean Walker
Sure, my github is https://github.com/AnOctopus. I'll likely start on it
later this week, once I've cleared a few other things off of my plate.
Post by Vincent Heuken
Sean, if you do end up starting, could you link to your Github (or
wherever)? I'd like to watch progress and possibly help out if I can.
On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a good
starting point to work on.
Thanks,
Ambrose
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it yourself if
you'd like.
Post by Sean Walker
Has any progress been made on this? I am interested in helping get
this updated, so I'm willing to assist/collaborate if you're still working
on this, or look into it myself otherwise.
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to go
in and try something simple to make sure I have the right idea, so I tried
my hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env :context
:expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs to
be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the
AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Ambrose Bonnaire-Sergeant
2016-01-31 01:40:34 UTC
Permalink
Looks good!

One strategy that helps is to evaluate a tools.analyzer.jvm AST and inspect
the output.

Thanks,
Ambrose
Post by Sean Walker
I have tried adjusting a few more forms to match the tools.analyzer ast,
and I want to make sure I'm on the right track as well. The commit is here
<https://github.com/AnOctopus/clojurescript/commit/07e553bd54945238c819795c4164a9f65d0ca23f>.
I'm not sure about a few things (is ctor just class, or something else?),
but I think I'm starting to understand how this part of the analyzer works.
Post by Sean Walker
Sure, my github is https://github.com/AnOctopus. I'll likely start on it
later this week, once I've cleared a few other things off of my plate.
Post by Vincent Heuken
Sean, if you do end up starting, could you link to your Github (or
wherever)? I'd like to watch progress and possibly help out if I can.
On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a good
starting point to work on.
Thanks,
Ambrose
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it yourself if
you'd like.
Post by Sean Walker
Has any progress been made on this? I am interested in helping get
this updated, so I'm willing to assist/collaborate if you're still working
on this, or look into it myself otherwise.
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to go
in and try something simple to make sure I have the right idea, so I tried
my hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env :context
:expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs to
be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the
AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Sean Walker
2016-01-31 06:14:20 UTC
Permalink
Yeah, a repl is proving useful (I'd been without it due to temporary issues
with cider). It looks like the clojurescript analyzer is generating the
constructor node, rather than a class node. It shouldn't be too hard to
convert it to the right form.

On Sat, Jan 30, 2016 at 5:40 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Looks good!
One strategy that helps is to evaluate a tools.analyzer.jvm AST and
inspect the output.
Thanks,
Ambrose
Post by Sean Walker
I have tried adjusting a few more forms to match the tools.analyzer ast,
and I want to make sure I'm on the right track as well. The commit is here
<https://github.com/AnOctopus/clojurescript/commit/07e553bd54945238c819795c4164a9f65d0ca23f>.
I'm not sure about a few things (is ctor just class, or something else?),
but I think I'm starting to understand how this part of the analyzer works.
Post by Sean Walker
Sure, my github is https://github.com/AnOctopus. I'll likely start on
it later this week, once I've cleared a few other things off of my plate.
Post by Vincent Heuken
Sean, if you do end up starting, could you link to your Github (or
wherever)? I'd like to watch progress and possibly help out if I can.
On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a good
starting point to work on.
Thanks,
Ambrose
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it yourself
if you'd like.
Post by Sean Walker
Has any progress been made on this? I am interested in helping get
this updated, so I'm willing to assist/collaborate if you're still working
on this, or look into it myself otherwise.
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to go
in and try something simple to make sure I have the right idea, so I tried
my hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env :context
:expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs
to be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to
this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates the
AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample
project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Sean Walker
2016-02-08 04:54:10 UTC
Permalink
Is there some way to get a a copy of my repl environment (or something else
easy to set up) as an :env value? I'd like to poke at var a bit, but since
it needs the var to exist, and the only premade environment seems to be the
empty one, I'm stuck using do and pulling it out of that.
Post by Sean Walker
Yeah, a repl is proving useful (I'd been without it due to temporary
issues with cider). It looks like the clojurescript analyzer is generating
the constructor node, rather than a class node. It shouldn't be too hard to
convert it to the right form.
On Sat, Jan 30, 2016 at 5:40 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Looks good!
One strategy that helps is to evaluate a tools.analyzer.jvm AST and
inspect the output.
Thanks,
Ambrose
Post by Sean Walker
I have tried adjusting a few more forms to match the tools.analyzer ast,
and I want to make sure I'm on the right track as well. The commit is here
<https://github.com/AnOctopus/clojurescript/commit/07e553bd54945238c819795c4164a9f65d0ca23f>.
I'm not sure about a few things (is ctor just class, or something else?),
but I think I'm starting to understand how this part of the analyzer works.
Post by Sean Walker
Sure, my github is https://github.com/AnOctopus. I'll likely start on
it later this week, once I've cleared a few other things off of my plate.
Post by Vincent Heuken
Sean, if you do end up starting, could you link to your Github (or
wherever)? I'd like to watch progress and possibly help out if I can.
On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a good
starting point to work on.
Thanks,
Ambrose
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it yourself
if you'd like.
Post by Sean Walker
Has any progress been made on this? I am interested in helping get
this updated, so I'm willing to assist/collaborate if you're still working
on this, or look into it myself otherwise.
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to
go in and try something simple to make sure I have the right idea, so I
tried my hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env
:context :expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs
to be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms to
this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates
the AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample
project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Ambrose Bonnaire-Sergeant
2016-02-08 07:07:17 UTC
Permalink
I believe cljs.env contains the state of a REPL environment. That might be
a good place to start looking.

Thanks,
Ambrose
Post by Sean Walker
Is there some way to get a a copy of my repl environment (or something
else easy to set up) as an :env value? I'd like to poke at var a bit, but
since it needs the var to exist, and the only premade environment seems to
be the empty one, I'm stuck using do and pulling it out of that.
On Sat, Jan 30, 2016 at 10:14 PM, Sean Walker <
Post by Sean Walker
Yeah, a repl is proving useful (I'd been without it due to temporary
issues with cider). It looks like the clojurescript analyzer is generating
the constructor node, rather than a class node. It shouldn't be too hard to
convert it to the right form.
On Sat, Jan 30, 2016 at 5:40 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Looks good!
One strategy that helps is to evaluate a tools.analyzer.jvm AST and
inspect the output.
Thanks,
Ambrose
Post by Sean Walker
I have tried adjusting a few more forms to match the tools.analyzer
ast, and I want to make sure I'm on the right track as well. The commit is
here
<https://github.com/AnOctopus/clojurescript/commit/07e553bd54945238c819795c4164a9f65d0ca23f>.
I'm not sure about a few things (is ctor just class, or something else?),
but I think I'm starting to understand how this part of the analyzer works.
Post by Sean Walker
Sure, my github is https://github.com/AnOctopus. I'll likely start on
it later this week, once I've cleared a few other things off of my plate.
Post by Vincent Heuken
Sean, if you do end up starting, could you link to your Github (or
wherever)? I'd like to watch progress and possibly help out if I can.
On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a good
starting point to work on.
Thanks,
Ambrose
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it yourself
if you'd like.
On Fri, Jan 22, 2016 at 8:05 AM, Sean Walker <
Post by Sean Walker
Has any progress been made on this? I am interested in helping get
this updated, so I'm willing to assist/collaborate if you're still working
on this, or look into it myself otherwise.
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to
go in and try something simple to make sure I have the right idea, so I
tried my hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env
:context :expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461> needs
to be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms
to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates
the AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
On Sun, Nov 29, 2015 at 4:55 PM, Vincent Heuken <
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample
project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Sean Walker
2016-02-09 01:48:18 UTC
Permalink
cljs.env didn't have quite what I was looking for. Calling
(default-compiler-env) in the repl causes it to hang, and at this point
it's going to be easier to either construct a minimal environment by hand
or just stick to extracting info from analyzing a do form.


On Sun, Feb 7, 2016 at 11:07 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
I believe cljs.env contains the state of a REPL environment. That might be
a good place to start looking.
Thanks,
Ambrose
Post by Sean Walker
Is there some way to get a a copy of my repl environment (or something
else easy to set up) as an :env value? I'd like to poke at var a bit, but
since it needs the var to exist, and the only premade environment seems to
be the empty one, I'm stuck using do and pulling it out of that.
On Sat, Jan 30, 2016 at 10:14 PM, Sean Walker <
Post by Sean Walker
Yeah, a repl is proving useful (I'd been without it due to temporary
issues with cider). It looks like the clojurescript analyzer is generating
the constructor node, rather than a class node. It shouldn't be too hard to
convert it to the right form.
On Sat, Jan 30, 2016 at 5:40 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Looks good!
One strategy that helps is to evaluate a tools.analyzer.jvm AST and
inspect the output.
Thanks,
Ambrose
Post by Sean Walker
I have tried adjusting a few more forms to match the tools.analyzer
ast, and I want to make sure I'm on the right track as well. The commit is
here
<https://github.com/AnOctopus/clojurescript/commit/07e553bd54945238c819795c4164a9f65d0ca23f>.
I'm not sure about a few things (is ctor just class, or something else?),
but I think I'm starting to understand how this part of the analyzer works.
Post by Sean Walker
Sure, my github is https://github.com/AnOctopus. I'll likely start
on it later this week, once I've cleared a few other things off of my plate.
Post by Vincent Heuken
Sean, if you do end up starting, could you link to your Github (or
wherever)? I'd like to watch progress and possibly help out if I can.
On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a good
starting point to work on.
Thanks,
Ambrose
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it
yourself if you'd like.
On Fri, Jan 22, 2016 at 8:05 AM, Sean Walker <
Post by Sean Walker
Has any progress been made on this? I am interested in helping
get this updated, so I'm willing to assist/collaborate if you're still
working on this, or look into it myself otherwise.
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to
go in and try something simple to make sure I have the right idea, so I
tried my hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env
:context :expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461>
needs to be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms
to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates
the AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
On Sun, Nov 29, 2015 at 4:55 PM, Vincent Heuken <
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample
project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Sean Walker
2016-03-11 00:56:41 UTC
Permalink
It's been about a month since my last update, so I thought I would share
the progress since then. It's not much, mostly analysis, because I've
been rather busy with interviews and other related job stuff.

I've determined that the quote form will need to be created from
scratch, because tools.analyzer has an actual quote node and cljs just
sets a flag in the environment. It's not particularly complicated of a
form, though.

Let, loop, and recur are a bit messy, because loop and let are the same
form with some extra info (loop target) stored for loop. It looks like
the :info map contains the same info as the parent node, so it should
maybe be changed the way :children has been. (I only seem to have one,
unlabeled ast form for loop in my notes, so I'll have to see what
changes need to happen.)
Post by Sean Walker
cljs.env didn't have quite what I was looking for. Calling
(default-compiler-env) in the repl causes it to hang, and at this point
it's going to be easier to either construct a minimal environment by hand
or just stick to extracting info from analyzing a do form.
On Sun, Feb 7, 2016 at 11:07 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
I believe cljs.env contains the state of a REPL environment. That might be
a good place to start looking.
Thanks,
Ambrose
Post by Sean Walker
Is there some way to get a a copy of my repl environment (or something
else easy to set up) as an :env value? I'd like to poke at var a bit, but
since it needs the var to exist, and the only premade environment seems to
be the empty one, I'm stuck using do and pulling it out of that.
On Sat, Jan 30, 2016 at 10:14 PM, Sean Walker <
Post by Sean Walker
Yeah, a repl is proving useful (I'd been without it due to temporary
issues with cider). It looks like the clojurescript analyzer is generating
the constructor node, rather than a class node. It shouldn't be too hard to
convert it to the right form.
On Sat, Jan 30, 2016 at 5:40 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Looks good!
One strategy that helps is to evaluate a tools.analyzer.jvm AST and
inspect the output.
Thanks,
Ambrose
Post by Sean Walker
I have tried adjusting a few more forms to match the tools.analyzer
ast, and I want to make sure I'm on the right track as well. The commit is
here
<https://github.com/AnOctopus/clojurescript/commit/07e553bd54945238c819795c4164a9f65d0ca23f>.
I'm not sure about a few things (is ctor just class, or something else?),
but I think I'm starting to understand how this part of the analyzer works.
Post by Sean Walker
Sure, my github is https://github.com/AnOctopus. I'll likely start
on it later this week, once I've cleared a few other things off of my plate.
Post by Vincent Heuken
Sean, if you do end up starting, could you link to your Github (or
wherever)? I'd like to watch progress and possibly help out if I can.
On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a good
starting point to work on.
Thanks,
Ambrose
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it
yourself if you'd like.
On Fri, Jan 22, 2016 at 8:05 AM, Sean Walker <
Post by Sean Walker
Has any progress been made on this? I am interested in helping
get this updated, so I'm willing to assist/collaborate if you're still
working on this, or look into it myself otherwise.
On Monday, November 30, 2015 at 12:06:27 AM UTC-8, Vincent Heuken
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted to
go in and try something simple to make sure I have the right idea, so I
tried my hand at throw
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env
:context :expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461>
needs to be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
2. Notice how the implementation of tools.analyzer.js conforms
to this spec.
eg. case*
<https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325>,
or delegates to tools.analyzer, eg. try
<https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404>
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059>
4. Note any differences between the specs.
eg. :catch in ClojureScript
<https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058> :try
node, vs :catches vector in tools.analyzer
<https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400>
:try node.
5. Prepare a patch for the ClojureScript analyzer that updates
the AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
On Sun, Nov 29, 2015 at 4:55 PM, Vincent Heuken <
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample
project's github
<https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
core.typed not working on the latest version of Clojurescript. You
mentioned you had a list of things to get it working again. I'd love to try
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Ambrose Bonnaire-Sergeant
2016-03-11 02:11:26 UTC
Permalink
Awesome!
Post by Sean Walker
It's been about a month since my last update, so I thought I would share
the progress since then. It's not much, mostly analysis, because I've
been rather busy with interviews and other related job stuff.
I've determined that the quote form will need to be created from
scratch, because tools.analyzer has an actual quote node and cljs just
sets a flag in the environment. It's not particularly complicated of a
form, though.
Let, loop, and recur are a bit messy, because loop and let are the same
form with some extra info (loop target) stored for loop. It looks like
the :info map contains the same info as the parent node, so it should
maybe be changed the way :children has been. (I only seem to have one,
unlabeled ast form for loop in my notes, so I'll have to see what
changes need to happen.)
Post by Sean Walker
cljs.env didn't have quite what I was looking for. Calling
(default-compiler-env) in the repl causes it to hang, and at this point
it's going to be easier to either construct a minimal environment by hand
or just stick to extracting info from analyzing a do form.
On Sun, Feb 7, 2016 at 11:07 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
I believe cljs.env contains the state of a REPL environment. That might
be
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
a good place to start looking.
Thanks,
Ambrose
On Sun, Feb 7, 2016 at 11:54 PM, Sean Walker <
Post by Sean Walker
Is there some way to get a a copy of my repl environment (or something
else easy to set up) as an :env value? I'd like to poke at var a bit,
but
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
since it needs the var to exist, and the only premade environment
seems to
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
be the empty one, I'm stuck using do and pulling it out of that.
On Sat, Jan 30, 2016 at 10:14 PM, Sean Walker <
Post by Sean Walker
Yeah, a repl is proving useful (I'd been without it due to temporary
issues with cider). It looks like the clojurescript analyzer is
generating
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
the constructor node, rather than a class node. It shouldn't be too
hard to
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
convert it to the right form.
On Sat, Jan 30, 2016 at 5:40 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Looks good!
One strategy that helps is to evaluate a tools.analyzer.jvm AST and
inspect the output.
Thanks,
Ambrose
Post by Sean Walker
I have tried adjusting a few more forms to match the tools.analyzer
ast, and I want to make sure I'm on the right track as well. The
commit is
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
here
<
https://github.com/AnOctopus/clojurescript/commit/07e553bd54945238c819795c4164a9f65d0ca23f
Post by Sean Walker
.
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
I'm not sure about a few things (is ctor just class, or something
else?),
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
but I think I'm starting to understand how this part of the
analyzer works.
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Sure, my github is https://github.com/AnOctopus. I'll likely start
on it later this week, once I've cleared a few other things off of
my plate.
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Sean, if you do end up starting, could you link to your Github (or
wherever)? I'd like to watch progress and possibly help out if I
can.
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a
good
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
starting point to work on.
Thanks,
Ambrose
On Fri, Jan 22, 2016 at 8:42 PM, Vincent Heuken <
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it
yourself if you'd like.
On Fri, Jan 22, 2016 at 8:05 AM, Sean Walker <
Post by Sean Walker
Has any progress been made on this? I am interested in helping
get this updated, so I'm willing to assist/collaborate if
you're still
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
working on this, or look into it myself otherwise.
On Monday, November 30, 2015 at 12:06:27 AM UTC-8, Vincent
Heuken
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted
to
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
go in and try something simple to make sure I have the right
idea, so I
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
tried my hand at throw
<
http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env
:context :expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461>
needs to be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<
http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
2. Notice how the implementation of tools.analyzer.js
conforms
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
to this spec.
eg. case*
<
https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325
Post by Sean Walker
,
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
or delegates to tools.analyzer, eg. try
<
https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<
https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
4. Note any differences between the specs.
eg. :catch in ClojureScript
<
https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058>
:try
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
node, vs :catches vector in tools.analyzer
<
https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
:try node.
5. Prepare a patch for the ClojureScript analyzer that
updates
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
the AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
On Sun, Nov 29, 2015 at 4:55 PM, Vincent Heuken <
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample
project's github
<
https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
core.typed not working on the latest version of
Clojurescript. You
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
mentioned you had a list of things to get it working again.
I'd love to try
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Sean Walker
2016-03-21 01:47:46 UTC
Permalink
Figured I should try to provide updates semi-frequently. I updated all
of the analyzer/emitter usage of :var to :the-var, because that's what
tools.analyzer uses.

I've also finished up loop/let bindings and bodies, although there's
some extra stuff in each. Some of that seems to be cljs specific, like
setting the bindings :op to :the-var so the compiler routes them
correctly, and the use of *recur-frames*. It's unclear what is essential
and what could be cleaned up, but it's not going to interfere with
anything to leave it in, so I'll leave that be for now.

I also did a few changes to recur, but I haven't verified that I got everything.
Post by Ambrose Bonnaire-Sergeant
Awesome!
Post by Sean Walker
It's been about a month since my last update, so I thought I would share
the progress since then. It's not much, mostly analysis, because I've
been rather busy with interviews and other related job stuff.
I've determined that the quote form will need to be created from
scratch, because tools.analyzer has an actual quote node and cljs just
sets a flag in the environment. It's not particularly complicated of a
form, though.
Let, loop, and recur are a bit messy, because loop and let are the same
form with some extra info (loop target) stored for loop. It looks like
the :info map contains the same info as the parent node, so it should
maybe be changed the way :children has been. (I only seem to have one,
unlabeled ast form for loop in my notes, so I'll have to see what
changes need to happen.)
Post by Sean Walker
cljs.env didn't have quite what I was looking for. Calling
(default-compiler-env) in the repl causes it to hang, and at this point
it's going to be easier to either construct a minimal environment by hand
or just stick to extracting info from analyzing a do form.
On Sun, Feb 7, 2016 at 11:07 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
I believe cljs.env contains the state of a REPL environment. That might
be
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
a good place to start looking.
Thanks,
Ambrose
On Sun, Feb 7, 2016 at 11:54 PM, Sean Walker <
Post by Sean Walker
Is there some way to get a a copy of my repl environment (or something
else easy to set up) as an :env value? I'd like to poke at var a bit,
but
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
since it needs the var to exist, and the only premade environment
seems to
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
be the empty one, I'm stuck using do and pulling it out of that.
On Sat, Jan 30, 2016 at 10:14 PM, Sean Walker <
Post by Sean Walker
Yeah, a repl is proving useful (I'd been without it due to temporary
issues with cider). It looks like the clojurescript analyzer is
generating
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
the constructor node, rather than a class node. It shouldn't be too
hard to
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
convert it to the right form.
On Sat, Jan 30, 2016 at 5:40 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Looks good!
One strategy that helps is to evaluate a tools.analyzer.jvm AST and
inspect the output.
Thanks,
Ambrose
Post by Sean Walker
I have tried adjusting a few more forms to match the tools.analyzer
ast, and I want to make sure I'm on the right track as well. The
commit is
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
here
<
https://github.com/AnOctopus/clojurescript/commit/07e553bd54945238c819795c4164a9f65d0ca23f
Post by Sean Walker
.
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
I'm not sure about a few things (is ctor just class, or something
else?),
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
but I think I'm starting to understand how this part of the
analyzer works.
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Sure, my github is https://github.com/AnOctopus. I'll likely start
on it later this week, once I've cleared a few other things off of
my plate.
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Sean, if you do end up starting, could you link to your Github (or
wherever)? I'd like to watch progress and possibly help out if I
can.
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a
good
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
starting point to work on.
Thanks,
Ambrose
On Fri, Jan 22, 2016 at 8:42 PM, Vincent Heuken <
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it
yourself if you'd like.
On Fri, Jan 22, 2016 at 8:05 AM, Sean Walker <
Post by Sean Walker
Has any progress been made on this? I am interested in helping
get this updated, so I'm willing to assist/collaborate if
you're still
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
working on this, or look into it myself otherwise.
On Monday, November 30, 2015 at 12:06:27 AM UTC-8, Vincent
Heuken
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I wanted
to
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
go in and try something simple to make sure I have the right
idea, so I
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
tried my hand at throw
<
http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>. The
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
diff is below. Let me know if this is right or of I'm way off.
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env
:context :expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461>
needs to be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<
http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
2. Notice how the implementation of tools.analyzer.js
conforms
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
to this spec.
eg. case*
<
https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325
Post by Sean Walker
,
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
or delegates to tools.analyzer, eg. try
<
https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<
https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
4. Note any differences between the specs.
eg. :catch in ClojureScript
<
https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058>
:try
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
node, vs :catches vector in tools.analyzer
<
https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
:try node.
5. Prepare a patch for the ClojureScript analyzer that
updates
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
the AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
On Sun, Nov 29, 2015 at 4:55 PM, Vincent Heuken <
Post by Vincent Heuken
I recently made an issue on the typed clojurescript sample
project's github
<
https://github.com/frenchy64/typed-clojurescript-play/issues/1> regarding
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
core.typed not working on the latest version of
Clojurescript. You
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
mentioned you had a list of things to get it working again.
I'd love to try
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Ambrose Bonnaire-Sergeant
2016-03-21 02:08:58 UTC
Permalink
Are you sure the distinction between :var and :the-var is correct?

:var is for var references like `+`.

:the-var is for var expressions like `#'+`.

Thanks,
Ambrose
Post by Sean Walker
Figured I should try to provide updates semi-frequently. I updated all
of the analyzer/emitter usage of :var to :the-var, because that's what
tools.analyzer uses.
I've also finished up loop/let bindings and bodies, although there's
some extra stuff in each. Some of that seems to be cljs specific, like
setting the bindings :op to :the-var so the compiler routes them
correctly, and the use of *recur-frames*. It's unclear what is essential
and what could be cleaned up, but it's not going to interfere with
anything to leave it in, so I'll leave that be for now.
I also did a few changes to recur, but I haven't verified that I got everything.
Post by Ambrose Bonnaire-Sergeant
Awesome!
Post by Sean Walker
It's been about a month since my last update, so I thought I would share
the progress since then. It's not much, mostly analysis, because I've
been rather busy with interviews and other related job stuff.
I've determined that the quote form will need to be created from
scratch, because tools.analyzer has an actual quote node and cljs just
sets a flag in the environment. It's not particularly complicated of a
form, though.
Let, loop, and recur are a bit messy, because loop and let are the same
form with some extra info (loop target) stored for loop. It looks like
the :info map contains the same info as the parent node, so it should
maybe be changed the way :children has been. (I only seem to have one,
unlabeled ast form for loop in my notes, so I'll have to see what
changes need to happen.)
Post by Sean Walker
cljs.env didn't have quite what I was looking for. Calling
(default-compiler-env) in the repl causes it to hang, and at this
point
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
it's going to be easier to either construct a minimal environment by
hand
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
or just stick to extracting info from analyzing a do form.
On Sun, Feb 7, 2016 at 11:07 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
I believe cljs.env contains the state of a REPL environment. That
might
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
be
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
a good place to start looking.
Thanks,
Ambrose
On Sun, Feb 7, 2016 at 11:54 PM, Sean Walker <
Post by Sean Walker
Is there some way to get a a copy of my repl environment (or
something
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
else easy to set up) as an :env value? I'd like to poke at var a
bit,
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
but
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
since it needs the var to exist, and the only premade environment
seems to
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
be the empty one, I'm stuck using do and pulling it out of that.
On Sat, Jan 30, 2016 at 10:14 PM, Sean Walker <
Post by Sean Walker
Yeah, a repl is proving useful (I'd been without it due to
temporary
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
issues with cider). It looks like the clojurescript analyzer is
generating
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
the constructor node, rather than a class node. It shouldn't be too
hard to
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
convert it to the right form.
On Sat, Jan 30, 2016 at 5:40 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Looks good!
One strategy that helps is to evaluate a tools.analyzer.jvm AST
and
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
inspect the output.
Thanks,
Ambrose
Post by Sean Walker
I have tried adjusting a few more forms to match the
tools.analyzer
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
ast, and I want to make sure I'm on the right track as well. The
commit is
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
here
<
https://github.com/AnOctopus/clojurescript/commit/07e553bd54945238c819795c4164a9f65d0ca23f
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
.
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
I'm not sure about a few things (is ctor just class, or something
else?),
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
but I think I'm starting to understand how this part of the
analyzer works.
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
On Monday, January 25, 2016 at 11:29:51 PM UTC-8, Sean Walker
Post by Sean Walker
Sure, my github is https://github.com/AnOctopus. I'll likely
start
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
on it later this week, once I've cleared a few other things off
of
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
my plate.
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
On Saturday, January 23, 2016 at 6:59:13 PM UTC-8, Vincent
Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Sean, if you do end up starting, could you link to your Github
(or
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
wherever)? I'd like to watch progress and possibly help out if
I
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
can.
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
On Sat, Jan 23, 2016 at 5:30 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
No progress from me either.
Sean, the instructions earlier in the thread should still be a
good
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
starting point to work on.
Thanks,
Ambrose
On Fri, Jan 22, 2016 at 8:42 PM, Vincent Heuken <
Post by Vincent Heuken
Unfortunately I haven't had time. Feel free to start on it
yourself if you'd like.
On Fri, Jan 22, 2016 at 8:05 AM, Sean Walker <
Post by Sean Walker
Has any progress been made on this? I am interested in
helping
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
get this updated, so I'm willing to assist/collaborate if
you're still
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
working on this, or look into it myself otherwise.
On Monday, November 30, 2015 at 12:06:27 AM UTC-8, Vincent
Heuken
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Thanks for getting back to me.
I won't have time to start for a couple of days, but I
wanted
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
to
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
go in and try something simple to make sure I have the
right
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
idea, so I
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
tried my hand at throw
<
http://clojure.github.io/tools.analyzer.js/spec/quickref.html#throw>.
The
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
diff is below. Let me know if this is right or of I'm way
off.
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
---
diff --git a/src/main/clojure/cljs/analyzer.cljc
b/src/main/clojure/cljs/analyzer.cljc
index 437c8a0..6eb5b6b 100644
--- a/src/main/clojure/cljs/analyzer.cljc
+++ b/src/main/clojure/cljs/analyzer.cljc
@@ -994,8 +994,8 @@
[op env [_ throw :as form] name _]
(let [throw-expr (disallowing-recur (analyze (assoc env
:context :expr) throw))]
{:env env :op :throw :form form
- :throw throw-expr
- :children [throw-expr]}))
+ :exception throw-expr
+ :children [:exception]}))
(defmethod parse 'try
[op env [_ & body :as form] name _]
On Sunday, November 29, 2015 at 2:53:46 PM UTC-8, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Vincent,
Awesome!
This issue <http://dev.clojure.org/jira/browse/CLJS-1461>
needs to be resolved.
Here's what to do.
1. Look over the tools.analyzer.js AST format
<
http://clojure.github.io/tools.analyzer.js/spec/quickref.html>
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
2. Notice how the implementation of tools.analyzer.js
conforms
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
to this spec.
eg. case*
<
https://github.com/clojure/tools.analyzer.js/blob/eec5e3dd3fbeb306511aa8cdbeb663bac94392f9/src/main/clojure/clojure/tools/analyzer/js.clj#L290-L325
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
,
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
or delegates to tools.analyzer, eg. try
<
https://github.com/clojure/tools.analyzer/blob/f5d959f4e9e12a0a9d3d74293d9ff2ca0ad65ad4/src/main/clojure/clojure/tools/analyzer.clj#L373-L404
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
3. Compare this spec to the actual ClojureScript analyzer.
eg. try
<
https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L1000-L1059
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
4. Note any differences between the specs.
eg. :catch in ClojureScript
<
https://github.com/clojure/clojurescript/blob/3e1af212e114a9968c6f69719b0346df12bd6d0e/src/main/clojure/cljs/analyzer.cljc#L1058
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
:try
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
node, vs :catches vector in tools.analyzer
<
https://github.com/clojure/tools.analyzer/blob/1c8693b30e8459ad3fbdb21871164ba82afb7b43/src/main/clojure/clojure/tools/analyzer.clj#L400
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
:try node.
5. Prepare a patch for the ClojureScript analyzer that
updates
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
the AST to conform to tools.analyzer.
I'm available to video chat over the week if that helps.
Thanks,
Ambrose
On Sun, Nov 29, 2015 at 4:55 PM, Vincent Heuken <
Post by Vincent Heuken
I recently made an issue on the typed clojurescript
sample
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
project's github
<
https://github.com/frenchy64/typed-clojurescript-play/issues/1>
regarding
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
core.typed not working on the latest version of
Clojurescript. You
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
mentioned you had a list of things to get it working
again.
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
I'd love to try
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
Post by Sean Walker
Post by Vincent Heuken
Post by Ambrose Bonnaire-Sergeant
Post by Vincent Heuken
and help get it working again.
--
Vincent Heuken
--
Vincent Heuken
Sean Walker
2016-03-21 02:47:35 UTC
Permalink
I was going off of parse-var returning :the-var, but I do now see that
analyze-symbol returns :var. I hadn't noticed the existence of both :var
and :the-var in the docs.

Is it correct that parse 'var should be :the-var, and analyze-symbol
should be :var? That shouldn't be too difficult to switch to, although
it means adding that case in the emitter, since it was all :var before.

(This is why I wanted to provide more updates; it keeps me from missing
things like this, so I can stay on track.)
Post by Ambrose Bonnaire-Sergeant
Are you sure the distinction between :var and :the-var is correct?
:var is for var references like `+`.
:the-var is for var expressions like `#'+`.
Thanks,
Ambrose
Post by Sean Walker
Figured I should try to provide updates semi-frequently. I updated all
of the analyzer/emitter usage of :var to :the-var, because that's what
tools.analyzer uses.
I've also finished up loop/let bindings and bodies, although there's
some extra stuff in each. Some of that seems to be cljs specific, like
setting the bindings :op to :the-var so the compiler routes them
correctly, and the use of *recur-frames*. It's unclear what is essential
and what could be cleaned up, but it's not going to interfere with
anything to leave it in, so I'll leave that be for now.
I also did a few changes to recur, but I haven't verified that I got everything.
Sean Walker
2016-03-30 00:54:19 UTC
Permalink
So, I've had the chance to look through this again. It seems that :var
is probably just :var, and that the cljs :var-special is what serves the
role of the t.a :the-var. Does this sound about right?

Also, is there anywhere with documentation similar to the t.a quickref,
for the cljs analyzer?

Sean
Post by Sean Walker
I was going off of parse-var returning :the-var, but I do now see that
analyze-symbol returns :var. I hadn't noticed the existence of both :var
and :the-var in the docs.
Is it correct that parse 'var should be :the-var, and analyze-symbol
should be :var? That shouldn't be too difficult to switch to, although
it means adding that case in the emitter, since it was all :var before.
(This is why I wanted to provide more updates; it keeps me from missing
things like this, so I can stay on track.)
Post by Ambrose Bonnaire-Sergeant
Are you sure the distinction between :var and :the-var is correct?
:var is for var references like `+`.
:the-var is for var expressions like `#'+`.
Thanks,
Ambrose
Ambrose Bonnaire-Sergeant
2016-03-30 00:57:02 UTC
Permalink
I'm not aware of any documentation, hand tracing the AST to the emitter has
been my best bet.

Can you link to the :var-special code?

Thanks,
Ambrose
Post by Sean Walker
So, I've had the chance to look through this again. It seems that :var
is probably just :var, and that the cljs :var-special is what serves the
role of the t.a :the-var. Does this sound about right?
Also, is there anywhere with documentation similar to the t.a quickref,
for the cljs analyzer?
Sean
Post by Sean Walker
I was going off of parse-var returning :the-var, but I do now see that
analyze-symbol returns :var. I hadn't noticed the existence of both :var
and :the-var in the docs.
Is it correct that parse 'var should be :the-var, and analyze-symbol
should be :var? That shouldn't be too difficult to switch to, although
it means adding that case in the emitter, since it was all :var before.
(This is why I wanted to provide more updates; it keeps me from missing
things like this, so I can stay on track.)
Post by Ambrose Bonnaire-Sergeant
Are you sure the distinction between :var and :the-var is correct?
:var is for var references like `+`.
:the-var is for var expressions like `#'+`.
Thanks,
Ambrose
Sean Walker
2016-03-30 01:04:03 UTC
Permalink
Post by Ambrose Bonnaire-Sergeant
Can you link to the :var-special code?
This is the emitter dispatch:
https://github.com/clojure/clojurescript/blob/16666f37cc13ead5a66330046db82a2976b6f1f0/src/main/clojure/cljs/compiler.cljc#L327

The only other uses are in the emit :def method and the parse 'var method.
Ambrose Bonnaire-Sergeant
2016-03-30 01:19:22 UTC
Permalink
Yes, since CLJS :var-special nodes correspond to (var ..) expressions
(as evidenced by the parse 'var method), they correspond to :the-var
in t.a.

Thanks,
Ambrose
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Can you link to the :var-special code?
https://github.com/clojure/clojurescript/blob/16666f37cc13ead5a66330046db82a2976b6f1f0/src/main/clojure/cljs/compiler.cljc#L327
The only other uses are in the emit :def method and the parse 'var method.
Sean Walker
2016-04-07 00:09:33 UTC
Permalink
Started working on writing the :quote form. It's really straightforward,
except I don't see anything equivalent to analyze-const to use for
analyzing the form. Is there one that I'm missing, or should I copy over
the t.a one? (it seems odd that there wouldn't be one, so I suspect I'm
just missing it). If it's missing, then I need something to handle
getting the type, which also doesn't seem to exist as-is.
Ambrose Bonnaire-Sergeant
2016-04-15 18:28:11 UTC
Permalink
Hi Sean,

Sorry for the silence.

Did you get any further on this? I've talked to Nicola Mometto about the
differences in :quote
in various compilers and it's rather subtle. He might be the right person
if you're still stuck.

Thanks for you work! Looking forward to your updates.
Ambrose
Post by Sean Walker
Started working on writing the :quote form. It's really straightforward,
except I don't see anything equivalent to analyze-const to use for
analyzing the form. Is there one that I'm missing, or should I copy over
the t.a one? (it seems odd that there wouldn't be one, so I suspect I'm
just missing it). If it's missing, then I need something to handle
getting the type, which also doesn't seem to exist as-is.
Sean Walker
2016-05-13 03:32:57 UTC
Permalink
Hey Ambrose,

I emailed Nicola earlier this week, but haven't gotten a response yet.

Could you elaborate on what kind of subtle differences there are? I can
see that the compiler uses a flag in the env rather than producing a
distinct node, but if there's a big difference beyond that, I haven't
seen it yet.

(I'm finally settled into my new job, so I'm hoping to apply much more
time/effort to this project now.)


Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto about the
differences in :quote
in various compilers and it's rather subtle. He might be the right person
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
Post by Sean Walker
Started working on writing the :quote form. It's really straightforward,
except I don't see anything equivalent to analyze-const to use for
analyzing the form. Is there one that I'm missing, or should I copy over
the t.a one? (it seems odd that there wouldn't be one, so I suspect I'm
just missing it). If it's missing, then I need something to handle
getting the type, which also doesn't seem to exist as-is.
Sean Walker
2016-08-01 02:27:51 UTC
Permalink
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.

Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.


Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a response yet.
Could you elaborate on what kind of subtle differences there are? I can
see that the compiler uses a flag in the env rather than producing a
distinct node, but if there's a big difference beyond that, I haven't
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply much more
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto about the
differences in :quote
in various compilers and it's rather subtle. He might be the right person
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
Post by Sean Walker
Started working on writing the :quote form. It's really straightforward,
except I don't see anything equivalent to analyze-const to use for
analyzing the form. Is there one that I'm missing, or should I copy over
the t.a one? (it seems odd that there wouldn't be one, so I suspect I'm
just missing it). If it's missing, then I need something to handle
getting the type, which also doesn't seem to exist as-is.
Ambrose Bonnaire-Sergeant
2016-08-08 09:19:32 UTC
Permalink
Hi Sean,

The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).

The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information needed is
already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the tools.analyzer
AST.

Thanks,
Ambrose
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a response yet.
Could you elaborate on what kind of subtle differences there are? I can
see that the compiler uses a flag in the env rather than producing a
distinct node, but if there's a big difference beyond that, I haven't
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply much more
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto about the
differences in :quote
in various compilers and it's rather subtle. He might be the right
person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to use for
analyzing the form. Is there one that I'm missing, or should I copy
over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I suspect I'm
just missing it). If it's missing, then I need something to handle
getting the type, which also doesn't seem to exist as-is.
Ambrose Bonnaire-Sergeant
2016-08-08 11:37:54 UTC
Permalink
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.

https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&q=impl-case

Thanks,
Ambrose

On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information needed is
already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the tools.analyzer
AST.
Thanks,
Ambrose
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a response yet.
Could you elaborate on what kind of subtle differences there are? I can
see that the compiler uses a flag in the env rather than producing a
distinct node, but if there's a big difference beyond that, I haven't
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply much more
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto about
the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be the right
person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to use for
analyzing the form. Is there one that I'm missing, or should I copy
over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I suspect
I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something to handle
getting the type, which also doesn't seem to exist as-is.
Sean Walker
2017-04-23 17:14:37 UTC
Permalink
6ish months later, I think I'm done with the :children conversion and I'm
starting on some of the differences that require impl-case.

There's still probably going to be a lot of changes needed after, but I'd
like to get at least that much done soon.

On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information needed is
already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the tools.analyzer
AST.
Thanks,
Ambrose
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a response yet.
Could you elaborate on what kind of subtle differences there are? I can
see that the compiler uses a flag in the env rather than producing a
distinct node, but if there's a big difference beyond that, I haven't
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply much more
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto about
the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be the right
person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
<javascript:>>
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to use for
analyzing the form. Is there one that I'm missing, or should I copy
over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I suspect
I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something to handle
getting the type, which also doesn't seem to exist as-is.
Ambrose Bonnaire-Sergeant
2017-04-23 18:21:29 UTC
Permalink
Hi Sean,

I did some experimentation of my own in the mean time.

I think I got most of the way there, IIRC I implemented the :children
conversion.
There was a few outstanding issues but I forgot what they were.

You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.

Thanks,
Ambrose
Post by Sean Walker
6ish months later, I think I'm done with the :children conversion and I'm
starting on some of the differences that require impl-case.
There's still probably going to be a lot of changes needed after, but I'd
like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information needed
is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the tools.analyzer
AST.
Thanks,
Ambrose
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a response yet.
Could you elaborate on what kind of subtle differences there are? I
can
Post by Sean Walker
see that the compiler uses a flag in the env rather than producing a
distinct node, but if there's a big difference beyond that, I haven't
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply much more
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto about
the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be the right
person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to use for
analyzing the form. Is there one that I'm missing, or should I copy
over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I suspect
I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something to handle
getting the type, which also doesn't seem to exist as-is.
Sean Walker
2017-04-23 18:52:33 UTC
Permalink
Hmm, yeah. I've already spotted one thing that still needs changing. I'll
do a sweep through and either fix or note remaining stuff. Your changes are
more complete than mine so I'll work from that.

On Sunday, April 23, 2017 at 11:21:50 AM UTC-7, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
I did some experimentation of my own in the mean time.
I think I got most of the way there, IIRC I implemented the :children
conversion.
There was a few outstanding issues but I forgot what they were.
You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.
Thanks,
Ambrose
Post by Sean Walker
6ish months later, I think I'm done with the :children conversion and I'm
starting on some of the differences that require impl-case.
There's still probably going to be a lot of changes needed after, but I'd
like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information needed
is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the tools.analyzer
AST.
Thanks,
Ambrose
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a response
yet.
Post by Sean Walker
Could you elaborate on what kind of subtle differences there are? I
can
Post by Sean Walker
see that the compiler uses a flag in the env rather than producing a
distinct node, but if there's a big difference beyond that, I haven't
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply much
more
Post by Sean Walker
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto
about the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be the right
person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to use for
analyzing the form. Is there one that I'm missing, or should I
copy over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I
suspect I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something to handle
getting the type, which also doesn't seem to exist as-is.
Sean Walker
2017-04-24 01:04:32 UTC
Permalink
I have opened a PR for two conversions that currently require impl-case.

There's a bunch more stuff that doesn't directly match up, but that doesn't
seem to be affecting core.typed at least. Those will require a more careful
comparison with the tools.analyzer spec.
Post by Sean Walker
Hmm, yeah. I've already spotted one thing that still needs changing. I'll
do a sweep through and either fix or note remaining stuff. Your changes are
more complete than mine so I'll work from that.
On Sunday, April 23, 2017 at 11:21:50 AM UTC-7, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
I did some experimentation of my own in the mean time.
I think I got most of the way there, IIRC I implemented the :children
conversion.
There was a few outstanding issues but I forgot what they were.
You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.
Thanks,
Ambrose
Post by Sean Walker
6ish months later, I think I'm done with the :children conversion and
I'm starting on some of the differences that require impl-case.
There's still probably going to be a lot of changes needed after, but
I'd like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information needed
is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the tools.analyzer
AST.
Thanks,
Ambrose
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a response
yet.
Post by Sean Walker
Could you elaborate on what kind of subtle differences there are? I
can
Post by Sean Walker
see that the compiler uses a flag in the env rather than producing a
distinct node, but if there's a big difference beyond that, I
haven't
Post by Sean Walker
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply much
more
Post by Sean Walker
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto
about the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be the right
person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to use for
analyzing the form. Is there one that I'm missing, or should I
copy over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I
suspect I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something to handle
getting the type, which also doesn't seem to exist as-is.
Ambrose Bonnaire-Sergeant
2017-07-12 20:59:36 UTC
Permalink
Sorry about the slow turnaround. I've made some time to review your PR and
think further issues.

I can't quite remember the state of this work, but for me, these are the
latest
proposed changed to core.typed
<https://github.com/typedclojure/core.typed/pull/120>, and this is the
latest for clojurescript <https://github.com/frenchy64/clojurescript/pull/5>
.
Post by Sean Walker
I have opened a PR for two conversions that currently require impl-case.
There's a bunch more stuff that doesn't directly match up, but that
doesn't seem to be affecting core.typed at least. Those will require a more
careful comparison with the tools.analyzer spec.
Post by Sean Walker
Hmm, yeah. I've already spotted one thing that still needs changing. I'll
do a sweep through and either fix or note remaining stuff. Your changes are
more complete than mine so I'll work from that.
On Sunday, April 23, 2017 at 11:21:50 AM UTC-7, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
I did some experimentation of my own in the mean time.
I think I got most of the way there, IIRC I implemented the :children
conversion.
There was a few outstanding issues but I forgot what they were.
You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.
Thanks,
Ambrose
Post by Sean Walker
6ish months later, I think I'm done with the :children conversion and
I'm starting on some of the differences that require impl-case.
There's still probably going to be a lot of changes needed after, but
I'd like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&
q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information
needed is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the tools.analyzer
AST.
Thanks,
Ambrose
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a response
yet.
Post by Sean Walker
Could you elaborate on what kind of subtle differences there are?
I can
Post by Sean Walker
see that the compiler uses a flag in the env rather than producing
a
Post by Sean Walker
distinct node, but if there's a big difference beyond that, I
haven't
Post by Sean Walker
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply much
more
Post by Sean Walker
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto
about the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be the
right person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to use
for
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
analyzing the form. Is there one that I'm missing, or should I
copy over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I
suspect I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something to
handle
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
getting the type, which also doesn't seem to exist as-is.
Amanda Walker
2017-09-12 05:43:01 UTC
Permalink
So, I've unfortunately been busy as well. I just moved (again), but I'm now
relatively settled in and would like to give this another good go. I had
previously been stuck trying to get the changes to pass all the tests, due
to what was an extremely difficult to find bug triggering in parts of the
code that hadn't changed in years and had no reason to fail that way.

I take it the end goal is to update the compiler, and then update
core.typed to no longer need the impl-case workarounds? Are there any other
things that will also need to be changed (by one of us)?

On Wednesday, July 12, 2017 at 1:59:57 PM UTC-7, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-Sergeant
Sorry about the slow turnaround. I've made some time to review your PR and
think further issues.
I can't quite remember the state of this work, but for me, these are the
latest
proposed changed to core.typed
<https://github.com/typedclojure/core.typed/pull/120>, and this is the
latest for clojurescript
<https://github.com/frenchy64/clojurescript/pull/5>.
Post by Sean Walker
I have opened a PR for two conversions that currently require impl-case.
There's a bunch more stuff that doesn't directly match up, but that
doesn't seem to be affecting core.typed at least. Those will require a more
careful comparison with the tools.analyzer spec.
Post by Sean Walker
Hmm, yeah. I've already spotted one thing that still needs changing.
I'll do a sweep through and either fix or note remaining stuff. Your
changes are more complete than mine so I'll work from that.
On Sunday, April 23, 2017 at 11:21:50 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
I did some experimentation of my own in the mean time.
I think I got most of the way there, IIRC I implemented the :children
conversion.
There was a few outstanding issues but I forgot what they were.
You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.
Thanks,
Ambrose
Post by Sean Walker
6ish months later, I think I'm done with the :children conversion and
I'm starting on some of the differences that require impl-case.
There's still probably going to be a lot of changes needed after, but
I'd like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information
needed is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the
tools.analyzer
AST.
Thanks,
Ambrose
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a response
yet.
Post by Sean Walker
Could you elaborate on what kind of subtle differences there are?
I can
Post by Sean Walker
see that the compiler uses a flag in the env rather than
producing a
Post by Sean Walker
distinct node, but if there's a big difference beyond that, I
haven't
Post by Sean Walker
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply much
more
Post by Sean Walker
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto
about the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be the
right person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to use
for
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
analyzing the form. Is there one that I'm missing, or should I
copy over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I
suspect I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something to
handle
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
getting the type, which also doesn't seem to exist as-is.
Ambrose Bonnaire-Sergeant
2017-09-12 12:11:41 UTC
Permalink
Hi Amanda,

So I propose a different approach to the CLJS analyzer side of things, with
the end goal of eliminating
all the impl-case workarounds.

Let's just write our own CLJS AST -> TAJ AST conversion, and convert before
we call `check`.
This way, we're not dependent on any upstream CLJS changes, and we can
finally have a working
CLJS checker again.

Thoughts?

Thanks,
Ambrose
Post by Amanda Walker
So, I've unfortunately been busy as well. I just moved (again), but I'm
now relatively settled in and would like to give this another good go. I
had previously been stuck trying to get the changes to pass all the tests,
due to what was an extremely difficult to find bug triggering in parts of
the code that hadn't changed in years and had no reason to fail that way.
I take it the end goal is to update the compiler, and then update
core.typed to no longer need the impl-case workarounds? Are there any other
things that will also need to be changed (by one of us)?
On Wednesday, July 12, 2017 at 1:59:57 PM UTC-7, Ambrose Bonnaire-Sergeant
Post by Ambrose Bonnaire-Sergeant
Sorry about the slow turnaround. I've made some time to review your PR and
think further issues.
I can't quite remember the state of this work, but for me, these are the
latest
proposed changed to core.typed
<https://github.com/typedclojure/core.typed/pull/120>, and this is the
latest for clojurescript
<https://github.com/frenchy64/clojurescript/pull/5>.
Post by Sean Walker
I have opened a PR for two conversions that currently require impl-case.
There's a bunch more stuff that doesn't directly match up, but that
doesn't seem to be affecting core.typed at least. Those will require a more
careful comparison with the tools.analyzer spec.
Post by Sean Walker
Hmm, yeah. I've already spotted one thing that still needs changing.
I'll do a sweep through and either fix or note remaining stuff. Your
changes are more complete than mine so I'll work from that.
On Sunday, April 23, 2017 at 11:21:50 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
I did some experimentation of my own in the mean time.
I think I got most of the way there, IIRC I implemented the :children
conversion.
There was a few outstanding issues but I forgot what they were.
You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.
Thanks,
Ambrose
Post by Sean Walker
6ish months later, I think I'm done with the :children conversion and
I'm starting on some of the differences that require impl-case.
There's still probably going to be a lot of changes needed after, but
I'd like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&
q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information
needed is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the
tools.analyzer
AST.
Thanks,
Ambrose
On Mon, Aug 1, 2016 at 10:27 AM, Sean Walker <
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a
response yet.
Post by Sean Walker
Could you elaborate on what kind of subtle differences there
are? I can
Post by Sean Walker
see that the compiler uses a flag in the env rather than
producing a
Post by Sean Walker
distinct node, but if there's a big difference beyond that, I
haven't
Post by Sean Walker
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply
much more
Post by Sean Walker
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto
about the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be the
right person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to use
for
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
analyzing the form. Is there one that I'm missing, or should I
copy over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I
suspect I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something to
handle
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
getting the type, which also doesn't seem to exist as-is.
Ambrose Bonnaire-Sergeant
2017-09-12 12:59:28 UTC
Permalink
Alternatively, we could fork the CLJS analyzer like I have with
Compiler.java. There are
other experiments with macroexpansion that I'd like to do that might also
benefit from a forked
analyzer.

On Tue, Sep 12, 2017 at 8:11 AM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Amanda,
So I propose a different approach to the CLJS analyzer side of things,
with the end goal of eliminating
all the impl-case workarounds.
Let's just write our own CLJS AST -> TAJ AST conversion, and convert
before we call `check`.
This way, we're not dependent on any upstream CLJS changes, and we can
finally have a working
CLJS checker again.
Thoughts?
Thanks,
Ambrose
On Tue, Sep 12, 2017 at 1:43 AM, Amanda Walker <
Post by Amanda Walker
So, I've unfortunately been busy as well. I just moved (again), but I'm
now relatively settled in and would like to give this another good go. I
had previously been stuck trying to get the changes to pass all the tests,
due to what was an extremely difficult to find bug triggering in parts of
the code that hadn't changed in years and had no reason to fail that way.
I take it the end goal is to update the compiler, and then update
core.typed to no longer need the impl-case workarounds? Are there any other
things that will also need to be changed (by one of us)?
On Wednesday, July 12, 2017 at 1:59:57 PM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Sorry about the slow turnaround. I've made some time to review your PR and
think further issues.
I can't quite remember the state of this work, but for me, these are the
latest
proposed changed to core.typed
<https://github.com/typedclojure/core.typed/pull/120>, and this is the
latest for clojurescript
<https://github.com/frenchy64/clojurescript/pull/5>.
Post by Sean Walker
I have opened a PR for two conversions that currently require impl-case.
There's a bunch more stuff that doesn't directly match up, but that
doesn't seem to be affecting core.typed at least. Those will require a more
careful comparison with the tools.analyzer spec.
Post by Sean Walker
Hmm, yeah. I've already spotted one thing that still needs changing.
I'll do a sweep through and either fix or note remaining stuff. Your
changes are more complete than mine so I'll work from that.
On Sunday, April 23, 2017 at 11:21:50 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
I did some experimentation of my own in the mean time.
I think I got most of the way there, IIRC I implemented the :children
conversion.
There was a few outstanding issues but I forgot what they were.
You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.
Thanks,
Ambrose
Post by Sean Walker
6ish months later, I think I'm done with the :children conversion
and I'm starting on some of the differences that require impl-case.
There's still probably going to be a lot of changes needed after,
but I'd like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&
q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information
needed is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the tools.analyzer
AST.
Thanks,
Ambrose
On Mon, Aug 1, 2016 at 10:27 AM, Sean Walker <
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a
response yet.
Post by Sean Walker
Could you elaborate on what kind of subtle differences there
are? I can
Post by Sean Walker
see that the compiler uses a flag in the env rather than
producing a
Post by Sean Walker
distinct node, but if there's a big difference beyond that, I
haven't
Post by Sean Walker
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply
much more
Post by Sean Walker
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola Mometto
about the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be the
right person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to
use for
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
analyzing the form. Is there one that I'm missing, or should
I copy over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I
suspect I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something to
handle
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
getting the type, which also doesn't seem to exist as-is.
Ambrose Bonnaire-Sergeant
2017-09-13 11:58:33 UTC
Permalink
First, I'll try a little harder
<https://dev.clojure.org/jira/browse/CLJS-1461?focusedCommentId=46937&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-46937>
to move the upstream changes along. Perhaps Amanda
can take the lead on the sequence of patches on that issue if we get the go
ahead.

On Tue, Sep 12, 2017 at 8:59 AM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Alternatively, we could fork the CLJS analyzer like I have with
Compiler.java. There are
other experiments with macroexpansion that I'd like to do that might also
benefit from a forked
analyzer.
On Tue, Sep 12, 2017 at 8:11 AM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Amanda,
So I propose a different approach to the CLJS analyzer side of things,
with the end goal of eliminating
all the impl-case workarounds.
Let's just write our own CLJS AST -> TAJ AST conversion, and convert
before we call `check`.
This way, we're not dependent on any upstream CLJS changes, and we can
finally have a working
CLJS checker again.
Thoughts?
Thanks,
Ambrose
On Tue, Sep 12, 2017 at 1:43 AM, Amanda Walker <
Post by Amanda Walker
So, I've unfortunately been busy as well. I just moved (again), but I'm
now relatively settled in and would like to give this another good go. I
had previously been stuck trying to get the changes to pass all the tests,
due to what was an extremely difficult to find bug triggering in parts of
the code that hadn't changed in years and had no reason to fail that way.
I take it the end goal is to update the compiler, and then update
core.typed to no longer need the impl-case workarounds? Are there any other
things that will also need to be changed (by one of us)?
On Wednesday, July 12, 2017 at 1:59:57 PM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Sorry about the slow turnaround. I've made some time to review your PR and
think further issues.
I can't quite remember the state of this work, but for me, these are
the latest
proposed changed to core.typed
<https://github.com/typedclojure/core.typed/pull/120>, and this is the
latest for clojurescript
<https://github.com/frenchy64/clojurescript/pull/5>.
Post by Sean Walker
I have opened a PR for two conversions that currently require impl-case.
There's a bunch more stuff that doesn't directly match up, but that
doesn't seem to be affecting core.typed at least. Those will require a more
careful comparison with the tools.analyzer spec.
Post by Sean Walker
Hmm, yeah. I've already spotted one thing that still needs changing.
I'll do a sweep through and either fix or note remaining stuff. Your
changes are more complete than mine so I'll work from that.
On Sunday, April 23, 2017 at 11:21:50 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
I did some experimentation of my own in the mean time.
I think I got most of the way there, IIRC I implemented the
:children conversion.
There was a few outstanding issues but I forgot what they were.
You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.
Thanks,
Ambrose
Post by Sean Walker
6ish months later, I think I'm done with the :children conversion
and I'm starting on some of the differences that require impl-case.
There's still probably going to be a lot of changes needed after,
but I'd like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&
q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information
needed is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the tools.analyzer
AST.
Thanks,
Ambrose
On Mon, Aug 1, 2016 at 10:27 AM, Sean Walker <
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only components that
need updating? Actually, can you outline the tasks that need to be done
for the compiler to produce information needed for core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a
response yet.
Post by Sean Walker
Could you elaborate on what kind of subtle differences there
are? I can
Post by Sean Walker
see that the compiler uses a flag in the env rather than
producing a
Post by Sean Walker
distinct node, but if there's a big difference beyond that, I
haven't
Post by Sean Walker
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply
much more
Post by Sean Walker
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola
Mometto about the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be the
right person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to
use for
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
analyzing the form. Is there one that I'm missing, or should
I copy over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I
suspect I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something to
handle
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
getting the type, which also doesn't seem to exist as-is.
Amanda Walker
2017-09-16 03:44:55 UTC
Permalink
Yeah, I'm willing to work with them on getting the patches accepted if they
are willing to move forward with it.

As for the alternatives, I'm curious what kind of experiments you have in
mind.

On Wednesday, September 13, 2017 at 4:58:54 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
First, I'll try a little harder
<https://dev.clojure.org/jira/browse/CLJS-1461?focusedCommentId=46937&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-46937>
to move the upstream changes along. Perhaps Amanda
can take the lead on the sequence of patches on that issue if we get the
go ahead.
On Tue, Sep 12, 2017 at 8:59 AM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Alternatively, we could fork the CLJS analyzer like I have with
Compiler.java. There are
other experiments with macroexpansion that I'd like to do that might also
benefit from a forked
analyzer.
On Tue, Sep 12, 2017 at 8:11 AM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Amanda,
So I propose a different approach to the CLJS analyzer side of things,
with the end goal of eliminating
all the impl-case workarounds.
Let's just write our own CLJS AST -> TAJ AST conversion, and convert
before we call `check`.
This way, we're not dependent on any upstream CLJS changes, and we can
finally have a working
CLJS checker again.
Thoughts?
Thanks,
Ambrose
Post by Amanda Walker
So, I've unfortunately been busy as well. I just moved (again), but I'm
now relatively settled in and would like to give this another good go. I
had previously been stuck trying to get the changes to pass all the tests,
due to what was an extremely difficult to find bug triggering in parts of
the code that hadn't changed in years and had no reason to fail that way.
I take it the end goal is to update the compiler, and then update
core.typed to no longer need the impl-case workarounds? Are there any other
things that will also need to be changed (by one of us)?
On Wednesday, July 12, 2017 at 1:59:57 PM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Sorry about the slow turnaround. I've made some time to review your PR and
think further issues.
I can't quite remember the state of this work, but for me, these are
the latest
proposed changed to core.typed
<https://github.com/typedclojure/core.typed/pull/120>, and this is
the latest for clojurescript
<https://github.com/frenchy64/clojurescript/pull/5>.
Post by Sean Walker
I have opened a PR for two conversions that currently require impl-case.
There's a bunch more stuff that doesn't directly match up, but that
doesn't seem to be affecting core.typed at least. Those will require a more
careful comparison with the tools.analyzer spec.
Post by Sean Walker
Hmm, yeah. I've already spotted one thing that still needs changing.
I'll do a sweep through and either fix or note remaining stuff. Your
changes are more complete than mine so I'll work from that.
On Sunday, April 23, 2017 at 11:21:50 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
I did some experimentation of my own in the mean time.
I think I got most of the way there, IIRC I implemented the
:children conversion.
There was a few outstanding issues but I forgot what they were.
You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.
Thanks,
Ambrose
On Sun, Apr 23, 2017 at 1:14 PM, Sean Walker <
Post by Sean Walker
6ish months later, I think I'm done with the :children conversion
and I'm starting on some of the differences that require impl-case.
There's still probably going to be a lot of changes needed after,
but I'd like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information
needed is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the tools.analyzer
AST.
Thanks,
Ambrose
On Mon, Aug 1, 2016 at 10:27 AM, Sean Walker <
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off
my radar
in favor of job related things (lots to learn as a devops setting up
cloud infrastructure from scratch). I imagine this project
might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only
components that
need updating? Actually, can you outline the tasks that need to
be done
for the compiler to produce information needed for core.typed?
It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a
response yet.
Post by Sean Walker
Could you elaborate on what kind of subtle differences there
are? I can
Post by Sean Walker
see that the compiler uses a flag in the env rather than
producing a
Post by Sean Walker
distinct node, but if there's a big difference beyond that, I
haven't
Post by Sean Walker
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply
much more
Post by Sean Walker
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola
Mometto about the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be the
right person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to
use for
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
analyzing the form. Is there one that I'm missing, or
should I copy over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so I
suspect I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something to
handle
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
getting the type, which also doesn't seem to exist as-is.
Ambrose Bonnaire-Sergeant
2017-09-16 04:43:53 UTC
Permalink
Could you rebase the first patch I prepared and reupload?

I want to play around with delaying macroexpansion so we can better type
check things like core.match expressions.

Ambrose
Post by Amanda Walker
Yeah, I'm willing to work with them on getting the patches accepted if
they are willing to move forward with it.
As for the alternatives, I'm curious what kind of experiments you have in
mind.
On Wednesday, September 13, 2017 at 4:58:54 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
First, I'll try a little harder
<https://dev.clojure.org/jira/browse/CLJS-1461?focusedCommentId=46937&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-46937>
to move the upstream changes along. Perhaps Amanda
can take the lead on the sequence of patches on that issue if we get the
go ahead.
On Tue, Sep 12, 2017 at 8:59 AM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Alternatively, we could fork the CLJS analyzer like I have with
Compiler.java. There are
other experiments with macroexpansion that I'd like to do that might
also benefit from a forked
analyzer.
On Tue, Sep 12, 2017 at 8:11 AM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Amanda,
So I propose a different approach to the CLJS analyzer side of things,
with the end goal of eliminating
all the impl-case workarounds.
Let's just write our own CLJS AST -> TAJ AST conversion, and convert
before we call `check`.
This way, we're not dependent on any upstream CLJS changes, and we can
finally have a working
CLJS checker again.
Thoughts?
Thanks,
Ambrose
Post by Amanda Walker
So, I've unfortunately been busy as well. I just moved (again), but
I'm now relatively settled in and would like to give this another good go.
I had previously been stuck trying to get the changes to pass all the
tests, due to what was an extremely difficult to find bug triggering in
parts of the code that hadn't changed in years and had no reason to fail
that way.
I take it the end goal is to update the compiler, and then update
core.typed to no longer need the impl-case workarounds? Are there any other
things that will also need to be changed (by one of us)?
On Wednesday, July 12, 2017 at 1:59:57 PM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Sorry about the slow turnaround. I've made some time to review your PR and
think further issues.
I can't quite remember the state of this work, but for me, these are
the latest
proposed changed to core.typed
<https://github.com/typedclojure/core.typed/pull/120>, and this is
the latest for clojurescript
<https://github.com/frenchy64/clojurescript/pull/5>.
Post by Sean Walker
I have opened a PR for two conversions that currently require impl-case.
There's a bunch more stuff that doesn't directly match up, but that
doesn't seem to be affecting core.typed at least. Those will require a more
careful comparison with the tools.analyzer spec.
Post by Sean Walker
Hmm, yeah. I've already spotted one thing that still needs
changing. I'll do a sweep through and either fix or note remaining stuff.
Your changes are more complete than mine so I'll work from that.
On Sunday, April 23, 2017 at 11:21:50 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
I did some experimentation of my own in the mean time.
I think I got most of the way there, IIRC I implemented the
:children conversion.
There was a few outstanding issues but I forgot what they were.
You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.
Thanks,
Ambrose
On Sun, Apr 23, 2017 at 1:14 PM, Sean Walker <
Post by Sean Walker
6ish months later, I think I'm done with the :children conversion
and I'm starting on some of the differences that require impl-case.
There's still probably going to be a lot of changes needed after,
but I'd like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&
q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the information
needed is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the
tools.analyzer
AST.
Thanks,
Ambrose
On Mon, Aug 1, 2016 at 10:27 AM, Sean Walker <
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell off
my radar
in favor of job related things (lots to learn as a devops
setting up
cloud infrastructure from scratch). I imagine this project
might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only
components that
need updating? Actually, can you outline the tasks that need
to be done
for the compiler to produce information needed for core.typed?
It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a
response yet.
Post by Sean Walker
Could you elaborate on what kind of subtle differences there
are? I can
Post by Sean Walker
see that the compiler uses a flag in the env rather than
producing a
Post by Sean Walker
distinct node, but if there's a big difference beyond that,
I haven't
Post by Sean Walker
seen it yet.
(I'm finally settled into my new job, so I'm hoping to apply
much more
Post by Sean Walker
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola
Mometto about the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be
the right person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const to
use for
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
analyzing the form. Is there one that I'm missing, or
should I copy over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so
I suspect I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something
to handle
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
getting the type, which also doesn't seem to exist as-is.
Amanda Walker
2017-09-26 03:31:41 UTC
Permalink
I rebased the first patch and attached it to that issue. It should be good
to go, though I haven't submitted any patches for clojure(script) before,
so let me know if I did something wrong with it.

On Friday, September 15, 2017 at 9:43:55 PM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Could you rebase the first patch I prepared and reupload?
I want to play around with delaying macroexpansion so we can better type
check things like core.match expressions.
Ambrose
Post by Amanda Walker
Yeah, I'm willing to work with them on getting the patches accepted if
they are willing to move forward with it.
As for the alternatives, I'm curious what kind of experiments you have in
mind.
On Wednesday, September 13, 2017 at 4:58:54 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
First, I'll try a little harder
<https://dev.clojure.org/jira/browse/CLJS-1461?focusedCommentId=46937&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-46937>
to move the upstream changes along. Perhaps Amanda
can take the lead on the sequence of patches on that issue if we get the
go ahead.
On Tue, Sep 12, 2017 at 8:59 AM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Alternatively, we could fork the CLJS analyzer like I have with
Compiler.java. There are
other experiments with macroexpansion that I'd like to do that might
also benefit from a forked
analyzer.
On Tue, Sep 12, 2017 at 8:11 AM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Amanda,
So I propose a different approach to the CLJS analyzer side of things,
with the end goal of eliminating
all the impl-case workarounds.
Let's just write our own CLJS AST -> TAJ AST conversion, and convert
before we call `check`.
This way, we're not dependent on any upstream CLJS changes, and we can
finally have a working
CLJS checker again.
Thoughts?
Thanks,
Ambrose
Post by Amanda Walker
So, I've unfortunately been busy as well. I just moved (again), but
I'm now relatively settled in and would like to give this another good go.
I had previously been stuck trying to get the changes to pass all the
tests, due to what was an extremely difficult to find bug triggering in
parts of the code that hadn't changed in years and had no reason to fail
that way.
I take it the end goal is to update the compiler, and then update
core.typed to no longer need the impl-case workarounds? Are there any other
things that will also need to be changed (by one of us)?
On Wednesday, July 12, 2017 at 1:59:57 PM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Sorry about the slow turnaround. I've made some time to review your PR and
think further issues.
I can't quite remember the state of this work, but for me, these are
the latest
proposed changed to core.typed
<https://github.com/typedclojure/core.typed/pull/120>, and this is
the latest for clojurescript
<https://github.com/frenchy64/clojurescript/pull/5>.
Post by Sean Walker
I have opened a PR for two conversions that currently require impl-case.
There's a bunch more stuff that doesn't directly match up, but that
doesn't seem to be affecting core.typed at least. Those will require a more
careful comparison with the tools.analyzer spec.
Post by Sean Walker
Hmm, yeah. I've already spotted one thing that still needs
changing. I'll do a sweep through and either fix or note remaining stuff.
Your changes are more complete than mine so I'll work from that.
On Sunday, April 23, 2017 at 11:21:50 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
I did some experimentation of my own in the mean time.
I think I got most of the way there, IIRC I implemented the
:children conversion.
There was a few outstanding issues but I forgot what they were.
You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.
Thanks,
Ambrose
On Sun, Apr 23, 2017 at 1:14 PM, Sean Walker <
Post by Sean Walker
6ish months later, I think I'm done with the :children
conversion and I'm starting on some of the differences that require
impl-case.
There's still probably going to be a lot of changes needed
after, but I'd like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that component
is particularly important to core.typed. All of the
information needed is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the
tools.analyzer
AST.
Thanks,
Ambrose
On Mon, Aug 1, 2016 at 10:27 AM, Sean Walker <
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell
off my radar
in favor of job related things (lots to learn as a devops
setting up
cloud infrastructure from scratch). I imagine this project
might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only
components that
need updating? Actually, can you outline the tasks that need
to be done
for the compiler to produce information needed for
core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a
response yet.
Post by Sean Walker
Could you elaborate on what kind of subtle differences
there are? I can
Post by Sean Walker
see that the compiler uses a flag in the env rather than
producing a
Post by Sean Walker
distinct node, but if there's a big difference beyond that,
I haven't
Post by Sean Walker
seen it yet.
(I'm finally settled into my new job, so I'm hoping to
apply much more
Post by Sean Walker
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola
Mometto about the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be
the right person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const
to use for
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
analyzing the form. Is there one that I'm missing, or
should I copy over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one, so
I suspect I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something
to handle
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
getting the type, which also doesn't seem to exist as-is.
Amanda Walker
2017-10-13 19:25:34 UTC
Permalink
Still waiting on this, although with clojure/conj going on right now isn't
a great time.
Post by Amanda Walker
I rebased the first patch and attached it to that issue. It should be good
to go, though I haven't submitted any patches for clojure(script) before,
so let me know if I did something wrong with it.
On Friday, September 15, 2017 at 9:43:55 PM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Could you rebase the first patch I prepared and reupload?
I want to play around with delaying macroexpansion so we can better type
check things like core.match expressions.
Ambrose
Post by Amanda Walker
Yeah, I'm willing to work with them on getting the patches accepted if
they are willing to move forward with it.
As for the alternatives, I'm curious what kind of experiments you have
in mind.
On Wednesday, September 13, 2017 at 4:58:54 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
First, I'll try a little harder
<https://dev.clojure.org/jira/browse/CLJS-1461?focusedCommentId=46937&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-46937>
to move the upstream changes along. Perhaps Amanda
can take the lead on the sequence of patches on that issue if we get
the go ahead.
On Tue, Sep 12, 2017 at 8:59 AM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Alternatively, we could fork the CLJS analyzer like I have with
Compiler.java. There are
other experiments with macroexpansion that I'd like to do that might
also benefit from a forked
analyzer.
On Tue, Sep 12, 2017 at 8:11 AM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Amanda,
So I propose a different approach to the CLJS analyzer side of
things, with the end goal of eliminating
all the impl-case workarounds.
Let's just write our own CLJS AST -> TAJ AST conversion, and convert
before we call `check`.
This way, we're not dependent on any upstream CLJS changes, and we
can finally have a working
CLJS checker again.
Thoughts?
Thanks,
Ambrose
On Tue, Sep 12, 2017 at 1:43 AM, Amanda Walker <
Post by Amanda Walker
So, I've unfortunately been busy as well. I just moved (again), but
I'm now relatively settled in and would like to give this another good go.
I had previously been stuck trying to get the changes to pass all the
tests, due to what was an extremely difficult to find bug triggering in
parts of the code that hadn't changed in years and had no reason to fail
that way.
I take it the end goal is to update the compiler, and then update
core.typed to no longer need the impl-case workarounds? Are there any other
things that will also need to be changed (by one of us)?
On Wednesday, July 12, 2017 at 1:59:57 PM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Sorry about the slow turnaround. I've made some time to review your PR and
think further issues.
I can't quite remember the state of this work, but for me, these
are the latest
proposed changed to core.typed
<https://github.com/typedclojure/core.typed/pull/120>, and this is
the latest for clojurescript
<https://github.com/frenchy64/clojurescript/pull/5>.
On Sun, Apr 23, 2017 at 9:04 PM, Sean Walker <
Post by Sean Walker
I have opened a PR for two conversions that currently require impl-case.
There's a bunch more stuff that doesn't directly match up, but
that doesn't seem to be affecting core.typed at least. Those will require a
more careful comparison with the tools.analyzer spec.
Post by Sean Walker
Hmm, yeah. I've already spotted one thing that still needs
changing. I'll do a sweep through and either fix or note remaining stuff.
Your changes are more complete than mine so I'll work from that.
On Sunday, April 23, 2017 at 11:21:50 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
I did some experimentation of my own in the mean time.
I think I got most of the way there, IIRC I implemented the
:children conversion.
There was a few outstanding issues but I forgot what they were.
You might want to have a look here
<https://github.com/frenchy64/clojurescript/pull/4/files>.
Thanks,
Ambrose
On Sun, Apr 23, 2017 at 1:14 PM, Sean Walker <
Post by Sean Walker
6ish months later, I think I'm done with the :children
conversion and I'm starting on some of the differences that require
impl-case.
There's still probably going to be a lot of changes needed
after, but I'd like to get at least that much done soon.
On Monday, August 8, 2016 at 4:38:15 AM UTC-7, Ambrose
Post by Ambrose Bonnaire-Sergeant
I found a few dozen places where workarounds are needed in
core.typed
because of CLJS's non-standard AST.
https://github.com/clojure/core.typed/search?utf8=%E2%9C%93&q=impl-case
Thanks,
Ambrose
On Mon, Aug 8, 2016 at 5:19 PM, Ambrose Bonnaire-Sergeant <
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
The parse and emit functions are a good start, I'm not sure
where else would be needed (probably a few loose ends around
the place, eg. helper functions on AST nodes).
The input to core.typed is the output of `parse`, so that
component
is particularly important to core.typed. All of the
information needed is already
in the AST, it's just in a non-standard format. All of the :op's
and their :children should be standardised based on the
tools.analyzer
AST.
Thanks,
Ambrose
On Mon, Aug 1, 2016 at 10:27 AM, Sean Walker <
Post by Sean Walker
Ok, I didn't get a followup and working on this kinda fell
off my radar
in favor of job related things (lots to learn as a devops
setting up
cloud infrastructure from scratch). I imagine this project
might still
be useful, and I feel like I could make much more progress now.
Are the analyzer parse methods and the emitter the only
components that
need updating? Actually, can you outline the tasks that need
to be done
for the compiler to produce information needed for
core.typed? It would
be helpful in focusing my efforts.
Sean
Post by Sean Walker
Hey Ambrose,
I emailed Nicola earlier this week, but haven't gotten a
response yet.
Post by Sean Walker
Could you elaborate on what kind of subtle differences
there are? I can
Post by Sean Walker
see that the compiler uses a flag in the env rather than
producing a
Post by Sean Walker
distinct node, but if there's a big difference beyond
that, I haven't
Post by Sean Walker
seen it yet.
(I'm finally settled into my new job, so I'm hoping to
apply much more
Post by Sean Walker
time/effort to this project now.)
Thanks,
Sean
Post by Ambrose Bonnaire-Sergeant
Hi Sean,
Sorry for the silence.
Did you get any further on this? I've talked to Nicola
Mometto about the
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
differences in :quote
in various compilers and it's rather subtle. He might be
the right person
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
if you're still stuck.
Thanks for you work! Looking forward to your updates.
Ambrose
On Wed, Apr 6, 2016 at 8:09 PM, Sean Walker <
Post by Sean Walker
Started working on writing the :quote form. It's really
straightforward,
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
except I don't see anything equivalent to analyze-const
to use for
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
analyzing the form. Is there one that I'm missing, or
should I copy over
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
the t.a one? (it seems odd that there wouldn't be one,
so I suspect I'm
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
just missing it). If it's missing, then I need something
to handle
Post by Sean Walker
Post by Ambrose Bonnaire-Sergeant
Post by Sean Walker
getting the type, which also doesn't seem to exist as-is.
Loading...