Re: lein autodoc failed in clojure.java.jdbc

2017-07-13 Thread Xiangtao Zhou
Thanks Alex.  so that's also the reason of  404 
of https://clojure.github.io/spec.alpha/.

Joe

On Friday, July 14, 2017 at 12:34:07 PM UTC+8, Alex Miller wrote:
>
> The Clojure team uses the latest version of autodoc (
> https://github.com/tomfaulhaber/autodoc and 
> https://github.com/tomfaulhaber/autodoc-collect are the repos). lein 
> autodoc (https://github.com/tomfaulhaber/lein-autodoc) is hard pegged to 
> autodoc 1.1.1. 
>
> The official build file for java.jdbc (and all Clojure contrib projects) 
> is the Maven pom.xml, not project.clj. Some possibilities:
>
> - The project.clj is not up to date wrt the official dependencies in the 
> pom.xml. The project.clj is there for convenience and is manually kept up 
> to date but could be out of sync.
> - The version used by lein autodoc is older and could easily be 
> encountering a bug that has been resolved already in autodoc.
> - The batch process that generates the official API docs uses autodoc and 
> autodoc-collect, but does not use leiningen or lein autodoc at all. It's 
> entirely possible something is different between those two processes.
> - Something else I haven't thought of.
>
> I don't have time to figure out what the difference is right now, but feel 
> free to dig into it more if you're interested. The exception seems to be 
> during reading, so I would try to understand more about what is being read 
> and why it's failing to read.
>
> Alex
>
>
> On Thursday, July 13, 2017 at 9:42:53 PM UTC-5, Xiangtao Zhou wrote:
>>
>> hi Sean,
>>
>> The official site of java.jdbc is generated by autodoc,  does that mean 
>> the clojure team use a different autodoc?  
>>
>> please see this.  https://clojure.github.io/java.jdbc/
>>
>> Joe 
>>
>> On Thursday, July 13, 2017 at 12:17:45 PM UTC+8, Sean Corfield wrote:
>>>
>>> Autodoc is not declared in java.jdbc’s project.clj, I’ve never run 
>>> autodoc on that project (or any other, to be honest), so I have no 
>>> expectation about which projects autodoc works on an which it doesn’t, but 
>>> *if 
>>> it can’t read valid Clojure source code, that’s a bug in autodoc as far as 
>>> I’m concerned.*
>>>
>>>  
>>>
>>> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
>>> An Architect's View -- http://corfield.org/
>>>
>>> "If you're not annoying somebody, you're not really alive."
>>> -- Margaret Atwood
>>>
>>>  
>>>
>>> *From: *Xiangtao Zhou
>>> *Sent: *Wednesday, July 12, 2017 6:50 PM
>>> *To: *Clojure
>>> *Subject: *lein autodoc failed in clojure.java.jdbc
>>>
>>>  
>>>
>>> hi clojure.java.jdbc's contributor,  
>>>
>>>  
>>>
>>> I checkout master, and run lein autodoc failed with following errors. 
>>> And there is no error for version java.jdbc-0.6.1.  Any detailed infomation 
>>> about this is appreciated.
>>>
>>>  
>>>
>>> Joe
>>>
>>>  
>>>
>>> Exception in thread "main" java.lang.RuntimeException: EOF while reading
>>>
>>> at clojure.lang.Util.runtimeException(Util.java:221)
>>>
>>> at clojure.lang.LispReader.read(LispReader.java:246)
>>>
>>> at clojure.lang.LispReader.read(LispReader.java:196)
>>>
>>> at clojure.lang.LispReader.read(LispReader.java:190)
>>>
>>> at clojure.core$read.invoke(core.clj:3640)
>>>
>>> at clojure.core$read.invoke(core.clj:3638)
>>>
>>> at clojure.core$read.invoke(core.clj:3636)
>>>
>>> at clojure.core$read.invoke(core.clj:3634)
>>>
>>> at 
>>> autodoc.collect_info_wrapper$do_collect.invoke(collect_info_wrapper.clj:95)
>>>
>>> at autodoc.autodoc$build_html.doInvoke(autodoc.clj:26)
>>>
>>> at clojure.lang.RestFn.invoke(RestFn.java:397)
>>>
>>> at clojure.lang.Var.invoke(Var.java:375)
>>>
>>> at clojure.lang.AFn.applyToHelper(AFn.java:152)
>>>
>>> at clojure.lang.Var.applyTo(Var.java:700)
>>>
>>> at clojure.core$apply.invoke(core.clj:630)
>>>
>>> at autodoc.autodoc$autodoc.doInvoke(autodoc.clj:102)
>>>
>>> at clojure.lang.RestFn.invoke(RestFn.java:425)
>>>
>>> at autodoc.autodoc$autodoc.invoke(autodoc.clj:76)
>>>
>>> at clojure.lang.AFn.applyToHelper(AFn.java:154)
>>>
>>> at clojure.lang.RestFn.applyTo(RestFn.java:132)
>>>
>>> at clojure.core$apply.invoke(core.clj:63

Re: lein autodoc failed in clojure.java.jdbc

2017-07-13 Thread Xiangtao Zhou
Thanks Sean.  Now I know I need to dig into autodoc.

On Friday, July 14, 2017 at 10:57:20 AM UTC+8, Sean Corfield wrote:
>
> I asked Alex Miller about this on Slack and he said (paraphrasing):
>
>  
>
> Something in clojure.spec broke autodoc a while back and then the split of 
> spec to spec.alpha threw a further wrench in the automated doc generation. 
> That means at least some of the API documentation has been stale for a 
> while since the doc-gen task can’t run. Right now, Alex is waiting for Tom 
> Faulhaber to find enough time to fix whatever is causing the problem.
>
>  
>
> So – the problem is autodoc doesn’t like something in clojure.spec and 
> that affects several Clojure projects (I had wondered why the clojure.spec 
> docs had seemed so out of date!). 
>
>  
>
> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>  
>
> *From: *Xiangtao Zhou 
> *Sent: *Thursday, July 13, 2017 7:43 PM
> *To: *Clojure 
> *Subject: *Re: lein autodoc failed in clojure.java.jdbc
>
>  
>
> hi Sean,
>
>  
>
> The official site of java.jdbc is generated by autodoc,  does that mean 
> the clojure team use a different autodoc?  
>
>  
>
> please see this.  https://clojure.github.io/java.jdbc/
>
>  
>
> Joe 
>
>
> On Thursday, July 13, 2017 at 12:17:45 PM UTC+8, Sean Corfield wrote:
>
> Autodoc is not declared in java.jdbc’s project.clj, I’ve never run autodoc 
> on that project (or any other, to be honest), so I have no expectation 
> about which projects autodoc works on an which it doesn’t, but *if it 
> can’t read valid Clojure source code, that’s a bug in autodoc as far as I’m 
> concerned.*
>
>  
>
> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>  
>
> *From: *Xiangtao Zhou
> *Sent: *Wednesday, July 12, 2017 6:50 PM
> *To: *Clojure
> *Subject: *lein autodoc failed in clojure.java.jdbc
>
>  
>
> hi clojure.java.jdbc's contributor,  
>
>  
>
> I checkout master, and run lein autodoc failed with following errors. And 
> there is no error for version java.jdbc-0.6.1.  Any detailed infomation 
> about this is appreciated.
>
>  
>
> Joe
>
>  
>
> Exception in thread "main" java.lang.RuntimeException: EOF while reading
>
> at clojure.lang.Util.runtimeException(Util.java:221)
>
> at clojure.lang.LispReader.read(LispReader.java:246)
>
> at clojure.lang.LispReader.read(LispReader.java:196)
>
> at clojure.lang.LispReader.read(LispReader.java:190)
>
> at clojure.core$read.invoke(core.clj:3640)
>
> at clojure.core$read.invoke(core.clj:3638)
>
> at clojure.core$read.invoke(core.clj:3636)
>
> at clojure.core$read.invoke(core.clj:3634)
>
> at 
> autodoc.collect_info_wrapper$do_collect.invoke(collect_info_wrapper.clj:95)
>
> at autodoc.autodoc$build_html.doInvoke(autodoc.clj:26)
>
> at clojure.lang.RestFn.invoke(RestFn.java:397)
>
> at clojure.lang.Var.invoke(Var.java:375)
>
> at clojure.lang.AFn.applyToHelper(AFn.java:152)
>
> at clojure.lang.Var.applyTo(Var.java:700)
>
> at clojure.core$apply.invoke(core.clj:630)
>
> at autodoc.autodoc$autodoc.doInvoke(autodoc.clj:102)
>
> at clojure.lang.RestFn.invoke(RestFn.java:425)
>
> at autodoc.autodoc$autodoc.invoke(autodoc.clj:76)
>
> at clojure.lang.AFn.applyToHelper(AFn.java:154)
>
> at clojure.lang.RestFn.applyTo(RestFn.java:132)
>
> at clojure.core$apply.invoke(core.clj:632)
>
> at autodoc.autodoc$execute.doInvoke(autodoc.clj:116)
>
> at clojure.lang.RestFn.applyTo(RestFn.java:137)
>
> at clojure.core$apply.invoke(core.clj:630)
>
> at autodoc.autodoc$_main.doInvoke(autodoc.clj:120)
>
> at clojure.lang.RestFn.applyTo(RestFn.java:137)
>
> at autodoc.autodoc.main(Unknown Source)
>
>  
>
>  
>
>  
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with 
> your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from 

Re: lein autodoc failed in clojure.java.jdbc

2017-07-13 Thread Xiangtao Zhou
hi Sean,

The official site of java.jdbc is generated by autodoc,  does that mean the 
clojure team use a different autodoc?  

please see this.  https://clojure.github.io/java.jdbc/

Joe 

On Thursday, July 13, 2017 at 12:17:45 PM UTC+8, Sean Corfield wrote:
>
> Autodoc is not declared in java.jdbc’s project.clj, I’ve never run autodoc 
> on that project (or any other, to be honest), so I have no expectation 
> about which projects autodoc works on an which it doesn’t, but *if it 
> can’t read valid Clojure source code, that’s a bug in autodoc as far as I’m 
> concerned.*
>
>  
>
> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>  
>
> *From: *Xiangtao Zhou 
> *Sent: *Wednesday, July 12, 2017 6:50 PM
> *To: *Clojure 
> *Subject: *lein autodoc failed in clojure.java.jdbc
>
>  
>
> hi clojure.java.jdbc's contributor,  
>
>  
>
> I checkout master, and run lein autodoc failed with following errors. And 
> there is no error for version java.jdbc-0.6.1.  Any detailed infomation 
> about this is appreciated.
>
>  
>
> Joe
>
>  
>
> Exception in thread "main" java.lang.RuntimeException: EOF while reading
>
> at clojure.lang.Util.runtimeException(Util.java:221)
>
> at clojure.lang.LispReader.read(LispReader.java:246)
>
> at clojure.lang.LispReader.read(LispReader.java:196)
>
> at clojure.lang.LispReader.read(LispReader.java:190)
>
> at clojure.core$read.invoke(core.clj:3640)
>
> at clojure.core$read.invoke(core.clj:3638)
>
> at clojure.core$read.invoke(core.clj:3636)
>
> at clojure.core$read.invoke(core.clj:3634)
>
> at 
> autodoc.collect_info_wrapper$do_collect.invoke(collect_info_wrapper.clj:95)
>
> at autodoc.autodoc$build_html.doInvoke(autodoc.clj:26)
>
> at clojure.lang.RestFn.invoke(RestFn.java:397)
>
> at clojure.lang.Var.invoke(Var.java:375)
>
> at clojure.lang.AFn.applyToHelper(AFn.java:152)
>
> at clojure.lang.Var.applyTo(Var.java:700)
>
> at clojure.core$apply.invoke(core.clj:630)
>
> at autodoc.autodoc$autodoc.doInvoke(autodoc.clj:102)
>
> at clojure.lang.RestFn.invoke(RestFn.java:425)
>
> at autodoc.autodoc$autodoc.invoke(autodoc.clj:76)
>
> at clojure.lang.AFn.applyToHelper(AFn.java:154)
>
> at clojure.lang.RestFn.applyTo(RestFn.java:132)
>
> at clojure.core$apply.invoke(core.clj:632)
>
> at autodoc.autodoc$execute.doInvoke(autodoc.clj:116)
>
> at clojure.lang.RestFn.applyTo(RestFn.java:137)
>
> at clojure.core$apply.invoke(core.clj:630)
>
> at autodoc.autodoc$_main.doInvoke(autodoc.clj:120)
>
> at clojure.lang.RestFn.applyTo(RestFn.java:137)
>
> at autodoc.autodoc.main(Unknown Source)
>
>  
>
>  
>
>  
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com 
> Note that posts from new members are moderated - please be patient with 
> your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+u...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>  
>

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


lein autodoc failed in clojure.java.jdbc

2017-07-12 Thread Xiangtao Zhou
hi clojure.java.jdbc's contributor, 

I checkout master, and run lein autodoc failed with following errors. And 
there is no error for version java.jdbc-0.6.1.  Any detailed infomation 
about this is appreciated.

Joe

Exception in thread "main" java.lang.RuntimeException: EOF while reading
at clojure.lang.Util.runtimeException(Util.java:221)
at clojure.lang.LispReader.read(LispReader.java:246)
at clojure.lang.LispReader.read(LispReader.java:196)
at clojure.lang.LispReader.read(LispReader.java:190)
at clojure.core$read.invoke(core.clj:3640)
at clojure.core$read.invoke(core.clj:3638)
at clojure.core$read.invoke(core.clj:3636)
at clojure.core$read.invoke(core.clj:3634)
at 
autodoc.collect_info_wrapper$do_collect.invoke(collect_info_wrapper.clj:95)
at autodoc.autodoc$build_html.doInvoke(autodoc.clj:26)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.Var.invoke(Var.java:375)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.core$apply.invoke(core.clj:630)
at autodoc.autodoc$autodoc.doInvoke(autodoc.clj:102)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at autodoc.autodoc$autodoc.invoke(autodoc.clj:76)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:632)
at autodoc.autodoc$execute.doInvoke(autodoc.clj:116)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:630)
at autodoc.autodoc$_main.doInvoke(autodoc.clj:120)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at autodoc.autodoc.main(Unknown Source)



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


Re: can clojure java.jdbc function 'result-set-seq' add option to supportcustom 'result-set-read-column' ?

2016-08-07 Thread Xiangtao Zhou
hi Sean,

Done. see http://dev.clojure.org/jira/browse/JDBC-137

Joe.

On Sunday, August 7, 2016 at 1:33:10 PM UTC+8, Sean Corfield wrote:
>
> Hi Joe,
>
>  
>
> I’m starting to see more requests for per-database customization in a 
> multi-database environment so this is definitely something I’d consider. 
> Could you create a JIRA issue for tracking purposes, along with any 
> suggestions you have about how this might work – and remain performant? 
> http://dev.clojure.org/jira/browse/JDBC
>
>  
>
> Sean Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org
>
>  
>
> *From: *Xiangtao Zhou 
> *Sent: *Saturday, August 6, 2016 7:15 PM
> *To: *Clojure 
> *Subject: *can clojure java.jdbc function 'result-set-seq' add option to 
> supportcustom 'result-set-read-column' ?
>
>  
>
> Hello the contributor of jdbc,
>
>  
>
> Using java.jdbc with postgres composite type,  the common way is extend 
> the IResultSetReadColumn protocol. When there are multiple databases in 
> use, every database should specify it's own column reader. 
>
> Add option to 'result-set-seq' support custom function to replace 
> IResultSetReadColumn may be a solution for this situation.
>
>  
>
> any other idea to solve this?
>
>  
>
> Joe.
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com 
> Note that posts from new members are moderated - please be patient with 
> your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+u...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>  
>

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


can clojure java.jdbc function 'result-set-seq' add option to support custom 'result-set-read-column' ?

2016-08-06 Thread Xiangtao Zhou
Hello the contributor of jdbc,

Using java.jdbc with postgres composite type,  the common way is extend the 
IResultSetReadColumn 
protocol. When there are multiple databases in use, every database should 
specify it's own column reader. 
Add option to 'result-set-seq' support custom function to replace 
IResultSetReadColumn 
may be a solution for this situation.

any other idea to solve this?

Joe.

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


Re: can clojure have es7 async await

2016-05-23 Thread Xiangtao Zhou
hi Andrey, 

I think,  javascript basically designed with event mechnism, especially IO 
api. The async/await api is cps transform with promise.  async makes the 
function return promise, await make cps transform. in clojure, these may 
associate with core.async, I mean use channel replace promise.

On Monday, May 23, 2016 at 9:14:22 PM UTC+8, Andrey Antukh wrote:
>
> I'm not pretty sure if this answers your question,  but I have similar 
> async/await syntax already implemented in promesa library: 
> http://funcool.github.io/promesa/latest/#async-await-syntax
>
> Regards.
> Andrey
>
> On Mon, May 23, 2016 at 4:07 PM, Xiangtao Zhou <tao...@gmail.com 
> > wrote:
>
>> hi Everyone, 
>>
>> es7 async/await makes javascript easily understandable,  and avoid the 
>> callback hell. can clojure have one library like this?
>>
>> scala version is here https://github.com/scala/async.
>>
>>
>> Thanks.
>>
>> Joe.
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> 
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Andrey Antukh - Андрей Антух - <ni...@niwi.nz >
> http://www.niwi.nz
> https://github.com/niwinz
>

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


can clojure have es7 async await

2016-05-23 Thread Xiangtao Zhou
hi Everyone, 

es7 async/await makes javascript easily understandable,  and avoid the 
callback hell. can clojure have one library like this?

scala version is here https://github.com/scala/async.


Thanks.

Joe.

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


Re: stuartsierra/component is oop, can clojure namespace self init to solve the dependencies?

2015-06-18 Thread Xiangtao Zhou
oop means object oriented programming, which doesn't mean mutable. record 
is oop and immutable. when you use java, you can asume everthing is 
immutable. 

if i use dynamic to implement the object, i can test it with binding; 
others i can test with with-redefs. so it works, except side effects.

On Thursday, June 18, 2015 at 5:21:46 PM UTC+8, Atamert Ölçgen wrote:

 How is stuartsierra/component OOP when it is building an immutable object 
 graph? (Contrast that to Guava etc.)

 On Thu, Jun 18, 2015 at 5:15 AM, Xiangtao Zhou tao...@gmail.com 
 javascript: wrote:

 hi guys,

 Constructing simple clojure project is trival, just make functions. if 
 the project grows large, with more datasources, message queue, and other 
 storages, dependencies problem is on the table. 

 One solution is stuartsierra/component,  using system to configure 
 dependencies graph, make component and dependencies resolution separate.

 If we make namespace must run with code block that init the namespace, 
 like the start method in component, is this a good way to solve the 
 dependencies?


 You can do that. But it's not a really good idea to have top-level 
 side-effectful code within namespaces. How are you going to test that ns? 
 How will you do (stop)?

 Namespaces should only define things.
  


 because when the namespace is required the first time, the init block 
 worked once.

 any suggestion is appreciated.


 - Joe

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




 -- 
 Kind Regards,
 Atamert Ölçgen

 ◻◼◻
 ◻◻◼
 ◼◼◼

 www.muhuk.com
  

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


stuartsierra/component is oop, can clojure namespace self init to solve the dependencies?

2015-06-17 Thread Xiangtao Zhou
hi guys,

Constructing simple clojure project is trival, just make functions. if the 
project grows large, with more datasources, message queue, and other 
storages, dependencies problem is on the table. 

One solution is stuartsierra/component,  using system to configure 
dependencies graph, make component and dependencies resolution separate.

If we make namespace must run with code block that init the namespace, like 
the start method in component, is this a good way to solve the 
dependencies?

because when the namespace is required the first time, the init block 
worked once.

any suggestion is appreciated.


- Joe

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


Re: clojure map to java instance of pojo class

2015-03-05 Thread Xiangtao Zhou
thanks, i test with defrecord. 

On Thursday, March 5, 2015 at 4:39:03 PM UTC+8, Colin Yates wrote:

 Isn't this exactly what defrecord does? 

 On 5 March 2015 at 07:42, Xiangtao Zhou tao...@gmail.com javascript: 
 wrote: 
  hi all, 
  
  is there some library or simple way to do it like the function 
 map-to-pojo 
  in the following code ? 
  
  java code 
  class A{ 
public int a; 
public String b; 
  } 
  
  clojure code 
  (def a {:a 1 :b 2}) 
  (def b (map-to-pojo a A)) 
  (instance? b A) 
  
  
  any solution is good. 
  
  Joe 
  
  
  
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.com 
 javascript: 
  Note that posts from new members are moderated - please be patient with 
 your 
  first post. 
  To unsubscribe from this group, send email to 
  clojure+u...@googlegroups.com javascript: 
  For more options, visit this group at 
  http://groups.google.com/group/clojure?hl=en 
  --- 
  You received this message because you are subscribed to the Google 
 Groups 
  Clojure group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to clojure+u...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/d/optout. 


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


clojure map to java instance of pojo class

2015-03-04 Thread Xiangtao Zhou
hi all,

is there some library or simple way to do it like the function 
map-to-pojo in the following code ?

java code
class A{ 
  public int a;
  public String b;
}

clojure code
(def a {:a 1 :b 2})
(def b (map-to-pojo a A))
(instance? b A)


any solution is good.

Joe




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


emacs-cider company-mode no match found

2014-09-21 Thread Xiangtao Zhou
hi every,

I have upgrade the latest emacs-cider, the document suggest me to use 
company for auto completion,  but it doesn't work, anyone know what should 
I do.

here is the part of .emacs

(require 'cider)
(require 'smartparens)
(require 'icomplete)
(require 'company)
(add-hook 'clojure-mode-hook 'smartparens-strict-mode)
(add-hook 'clojure-mode-hook 'rainbow-delimiters-mode)
(add-hook 'cider-mode-hook 'cider-turn-on-eldoc-mode)
(add-hook 'cider-repl-mode-hook 'smartparens-strict-mode)
(add-hook 'cider-repl-mode-hook 'rainbow-delimiters-mode)
(global-company-mode)


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


Re: emacs-cider company-mode no match found

2014-09-21 Thread Xiangtao Zhou
hi Tassilo,

i'm pretty sure, because I also want to have company working with repl. 
both cider  cider-repl not working.

Joe

On Sunday, September 21, 2014 3:59:59 PM UTC+8, Tassilo Horn wrote:

 Xiangtao Zhou tao...@gmail.com javascript: writes: 

 Hi! 

  I have upgrade the latest emacs-cider, the document suggest me to use 
  company for auto completion, but it doesn't work, anyone know what 
  should I do. 

 Just to be sure, you did M-x cider-jack-in RET in the Clojure project 
 you are hacking in, right? 

 Bye, 
 Tassilo 


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


howto use reify in defmacro

2013-12-18 Thread Xiangtao Zhou
hi all,

I want to use reify in macro, but the namespace is the problem. the 
following code shows what have done. is there a way to make it right?

(defmacro def-site-entity
  [ent  body]
  `(let [e# (create-e)]
 (def ~ent (reify clojure.lang.ILookup 
 (valAt [key not-found]
   (condp = key
 :db @t1
 :options @t2
 (get e# key not-found)))


Joe

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


howto use reify in defmacro

2013-12-18 Thread Xiangtao Zhou
hi all,

I want to use reify in macro, but the namespace is the problem. the 
following code shows what have done. is there a way to make it right?

(defmacro def-site-entity
  [ent  body]
  `(let [e# (create-e)]
 (def ~ent (reify clojure.lang.ILookup 
 (valAt [key not-found]
   (condp = key
 :db @t1
 :options @t2
 (get e# key not-found)))


Joe

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


IE compatibility of clojurescript, Element undefined problem

2013-12-16 Thread Xiangtao Zhou
hi all,

I'm new for clojurescript.  I found there is compatibility problem under 
IE6,  closurescript use Element which IE 6 dos not have.

Line 34266, Element.prototype.clojure$browser$event$EventType$ = true;

Is clojurescript give up IE6? 


Joe

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


Re: IE compatibility of clojurescript, Element undefined problem

2013-12-16 Thread Xiangtao Zhou
hi David,

Thanks. You're right, I delete dommy, it works. 

On Monday, December 16, 2013 9:10:18 PM UTC+8, David Powell wrote:

 The clojure.browser namespace does try to extend a protocol to 
 js/EventType - which IE6 doesn't have, but if you use third party 
 alternatives, raw javascript DOM manipulation, or Google Closure, then 
 things should work in IE6.


 On Mon, Dec 16, 2013 at 12:59 PM, Xiangtao Zhou tao...@gmail.comjavascript:
  wrote:

 hi all,

 I'm new for clojurescript.  I found there is compatibility problem under 
 IE6,  closurescript use Element which IE 6 dos not have.

 Line 34266, Element.prototype.clojure$browser$event$EventType$ = true;

 Is clojurescript give up IE6? 


 Joe

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




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


Re: IE compatibility of clojurescript, Element undefined problem

2013-12-16 Thread Xiangtao Zhou
Hi Tim,

somebody already filed a bug under IE8,   
https://github.com/Prismatic/dommy/issues/57
according to the absence of js/Element, the fix may not work. I'll test it 
later.

Joe

On Tuesday, December 17, 2013 12:34:42 AM UTC+8, Tim Visher wrote:

 Hi Xiangtao, 

 If you needed to delete dommy in order to get thing working in IE6, 
 _please_ file a bug report. I like dommy a lot and finding everywhere 
 that it breaks compatibility with older browsers is crucial for its 
 success. 

 On Mon, Dec 16, 2013 at 8:28 AM, Xiangtao Zhou 
 tao...@gmail.comjavascript: 
 wrote: 
  hi David, 
  
  Thanks. You're right, I delete dommy, it works. 
  
  
  On Monday, December 16, 2013 9:10:18 PM UTC+8, David Powell wrote: 
  
  The clojure.browser namespace does try to extend a protocol to 
  js/EventType - which IE6 doesn't have, but if you use third party 
  alternatives, raw javascript DOM manipulation, or Google Closure, then 
  things should work in IE6. 
  
  
  On Mon, Dec 16, 2013 at 12:59 PM, Xiangtao Zhou tao...@gmail.com 
 wrote: 
  
  hi all, 
  
  I'm new for clojurescript.  I found there is compatibility problem 
 under 
  IE6,  closurescript use Element which IE 6 dos not have. 
  
  Line 34266, Element.prototype.clojure$browser$event$EventType$ = true; 
  
  Is clojurescript give up IE6? 
  
  
  Joe 
  
  -- 
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.com 
  
  Note that posts from new members are moderated - please be patient 
 with 
  your first post. 
  To unsubscribe from this group, send email to 
  clojure+u...@googlegroups.com 
  
  For more options, visit this group at 
  http://groups.google.com/group/clojure?hl=en 
  --- 
  You received this message because you are subscribed to the Google 
 Groups 
  Clojure group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to clojure+u...@googlegroups.com. 
  
  For more options, visit https://groups.google.com/groups/opt_out. 
  
  
  -- 
  -- 
  You received this message because you are subscribed to the Google 
  Groups Clojure group. 
  To post to this group, send email to clo...@googlegroups.comjavascript: 
  Note that posts from new members are moderated - please be patient with 
 your 
  first post. 
  To unsubscribe from this group, send email to 
  clojure+u...@googlegroups.com javascript: 
  For more options, visit this group at 
  http://groups.google.com/group/clojure?hl=en 
  --- 
  You received this message because you are subscribed to the Google 
 Groups 
  Clojure group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to clojure+u...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/groups/opt_out. 


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