Re: Improving visibility of clojure-doc.org
With the aim of increasing exposure, have you covered off boring SEO things like having a sitemap.xml and verifying the domain with Webmaster tools? I couldn't find a sitemap, but it does look like the content has been indexed by Google. On another note, I wonder whether it's worth clarifying the position of the site in relation to the other Clojure Documentations out there. I've often thought it's a shame to see http://clojuredocs.org/ fall out of regular updates. Having an up to date, searchable reference is one of the best things for a language to have. Is this likely to be rolled into clojure-doc in the future? Are they sister sites? If you want help bringing the http://clojuredocs.org/ site up to date I'd be happy to offer some time. I put together some Overtone docs based on a fork of it so I feel like I'm up to speed with the whole thing - you can see my fork here http://overtone-docs.herokuapp.com/ Thanks, On Wednesday, February 27, 2013 6:06:46 PM UTC, Michael Klishin wrote: Started in October 2012, http://clojure-doc.org is a pretty extensive community documentation effort. It covers Clojure, its ecosystem and tools and has two key goals: * We produce beginner-friendly content * It is dead easy to join and help Even though recently that hasn't been as much activity as in the past, it is not abandoned and continues to accumulate useful, beginner-friendly material. We constantly get praises from newcomers to Clojure who discover clojure-doc.org. Unfortunately, it does not appear even in top 10 in Google for clojure docs or clojure documentation and many community members are not aware of it. In part it is less visible because we no longer actively post progress reports. Things have settled down and most of changes now are small edits and improvements all over the place. It is a bit pointless to post progress reports more often than once a month or so. So I'd like to start a discussion about what can be done about it. The community (we have 40 contributors) has worked very hard on clojure-doc.org and I'd like to see high profile resources (namly clojure.org and leiningen.org) link to it. What would it take to convince clojure.org maintainers to do so? There are still guides left ot be written (macros, gen-class), but overall, I'd say there is no better source of freely available, beginner-friendly, hackable (no Clojure CA, everything is developed on GitHub [1], content is in Markdown) documentation. All it needs is some linking and promotion love. One way to help would be to start a campaign such as Mozilla's Promote JS [docs]. Unfortunately, unlike Mozilla key contributors behind clojure-doc.org largely lack graphic and Web design skills, so replicating that campaing is probably not an option. Do you have any ideas about how we can make clojure-doc.org more visible? Do you know who can help with getting a link from clojure.org? Do you think clojure-doc.org is not good enough to be the blessed open source documentation resource? Please post your suggestions and concerns. Improving CDS visibility will benefit the entire community plus all the people who will join it in the future. Most of the work is already done, it just needs to be promoted better. Thanks you. 1. https://github.com/clojuredocs/cds -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- -- 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: instance? with one argument
Yes, you are right about the lexical binding; I suspect that is less likely to hit people though. I don't know why I keep typing (instance? String) but I've done it a lot. Possibly because I am using a Java API with a lot of very similar classes; by the time I have managed to find out which class I need to check, I've forgotten what I was doing in the first place. Thanks for opening the ticket! Herwig Hochleitner hhochleit...@gmail.com writes: Also direct calls are only handled, if the first arg is a symbol that directly resolves to a class: user= (def C Long) user= (instance? C) ArityException Wrong number of args (1) passed to: core$instance-QMARK- clojure.lang.AFn.throwArity (AFn.java:437) Starting from this, I just discovered another, much more severe bug: user= (let [Long String] (instance? Long abc)) false I've opened a ticket: http://dev.clojure.org/jira/browse/CLJ-1171 -- -- Phillip Lord, Phone: +44 (0) 191 222 7827 Lecturer in Bioinformatics, Email: phillip.l...@newcastle.ac.uk School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord Room 914 Claremont Tower, skype: russet_apples Newcastle University, twitter: phillord NE1 7RU -- -- 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: Improving visibility of clojure-doc.org
2013/2/28 xavriley i...@xavierriley.co.uk On another note, I wonder whether it's worth clarifying the position of the site in relation to the other Clojure Documentations out there. I've often thought it's a shame to see http://clojuredocs.org/ fall out of regular updates. Having an up to date, searchable reference is one of the best things for a language to have. Is this likely to be rolled into clojure-doc in the future? clojuredocs.org is API reference. clojure-doc.org is guides and tutorials. -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- -- 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: Improving visibility of clojure-doc.org
The ordinary visitor might be forgiven for expecting that both would be found under someplace like Clojure.org... just a thought. -A On Feb 28, 2013 2:04 AM, Michael Klishin michael.s.klis...@gmail.com wrote: 2013/2/28 xavriley i...@xavierriley.co.uk On another note, I wonder whether it's worth clarifying the position of the site in relation to the other Clojure Documentations out there. I've often thought it's a shame to see http://clojuredocs.org/ fall out of regular updates. Having an up to date, searchable reference is one of the best things for a language to have. Is this likely to be rolled into clojure-doc in the future? clojuredocs.org is API reference. clojure-doc.org is guides and tutorials. -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
(def function* ... ???
I see cases of * after function names. Can anyone enlighten me as to the specific meaning of this, if any. Is it specific to some clojure uses or more widely employed. thanks Dave -- -- 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: (def function* ... ???
Sometimes people separate a macro into the macro itself, and a normal function that does the actual work. The normal function often has the same name as the macro but with a * suffix. Chris On 28 February 2013 13:38, Dave Sann daves...@gmail.com wrote: I see cases of * after function names. Can anyone enlighten me as to the specific meaning of this, if any. Is it specific to some clojure uses or more widely employed. thanks Dave -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
what on earth is happening?
I've got a project 1. I can /'lein2 repl'/ in it and navigate to any namespace - no problem 2. I can /'lein2 check'/ it and it compiles everything - no problem 3. I can /'lein2 test'/ or /'lein2 test some-namespace'/ and BOOM! - *PROBLEM! * *Exception in thread main java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(hotel_nlp/concretions/models.clj:68:1)* * *What on earth does that mean? I've never had that before!!! The 'models' namespace has not been modified for 3 days now so it can't be the culprit! The thing is I don't understand the error message! anyone? going slightly mental here! To add to the confusion, sometimes the same thing happens with 'lein2 repl' + 'load' but only *some* times. Most times it doesn't complain ! I'm not AOT-ing... Jim -- -- 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: what on earth is happening?
Jim, I'm not answering your question here. but the subject you have chosen is not very descriptive of your problem/question/topic. On Friday, 1 March 2013 01:23:22 UTC+11, Jim foo.bar wrote: I've got a project 1. I can *'lein2 repl'* in it and navigate to any namespace - no problem 2. I can *'lein2 check'* it and it compiles everything - no problem 3. I can *'lein2 test'* or *'lein2 test some-namespace'* and BOOM! - * PROBLEM! * *Exception in thread main java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(hotel_nlp/concretions/models.clj:68:1)* * *What on earth does that mean? I've never had that before!!! The 'models' namespace has not been modified for 3 days now so it can't be the culprit! The thing is I don't understand the error message! anyone? going slightly mental here! To add to the confusion, sometimes the same thing happens with 'lein2 repl' + 'load' but only *some* times. Most times it doesn't complain ! I'm not AOT-ing... Jim -- -- 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: what on earth is happening?
Just a general pointer: the bytecode verification that the JVM performs when loading a class has failed. There is a code path through the bytecode of the mentioned method such that it pops more than it pushes (Java bytecode is a stack-oriented machine language). So it makes sense that it blows up only when you try to actually run the code. Why it blows up---no idea. On Thursday, February 28, 2013 3:23:22 PM UTC+1, Jim foo.bar wrote: I've got a project 1. I can *'lein2 repl'* in it and navigate to any namespace - no problem 2. I can *'lein2 check'* it and it compiles everything - no problem 3. I can *'lein2 test'* or *'lein2 test some-namespace'* and BOOM! - * PROBLEM! * *Exception in thread main java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(hotel_nlp/concretions/models.clj:68:1)* * *What on earth does that mean? I've never had that before!!! The 'models' namespace has not been modified for 3 days now so it can't be the culprit! The thing is I don't understand the error message! anyone? going slightly mental here! To add to the confusion, sometimes the same thing happens with 'lein2 repl' + 'load' but only *some* times. Most times it doesn't complain ! I'm not AOT-ing... Jim -- -- 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: defmacro/gen-class/annotation woes
Hi Meikel! Thanks for the suggestion. I'll second what Paul said, I'm not sure if I would ever have guessed to syntax quote the metadata map. I just tested it and it works like magic. Cheers, Michael Willis On Thursday, February 28, 2013 12:21:57 AM UTC-7, Meikel Brandmeyer (kotarak) wrote: Hi, if you want to avoid reflection in macro-generated code you have to quote the class because the compiler expects the classname and not the class itself. I figured it could be similar here. Kind regards Meikel -- -- 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: what on earth is happening?
On 28/02/13 14:34, Marko Topolnik wrote: So it makes sense that it blows up only when you try to actually run the code. It doesn't low up when I try to run the code...as I said, I can easily navigate into any namespace from the repl and run any code that I wantso there is no problem compiling /running the actual code. I seem to be getting this error at random occasions without changing any code This is what's driving me nuts! 2 minutes ago I did: * lein2 test hotel_nlp.core *[ALL-GOOD] lein test hotel_nlp.core Testing hotel_nlp.core Ran 0 tests containing 0 assertions. 0 failures, 0 errors. then I did: * lein2 test hotel_nlp.helper * [ALL-GOOD]* *lein test hotel_nlp.helper Testing hotel_nlp.helper Ran 7 tests containing 30 assertions. 0 failures, 0 errors.* * so it *seems* everything is working fine...However, without changing any code: *lein2 test hotel_nlp.core hotel_nlp.helper* [BAD] Exception in thread main java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(hotel_nlp/concretions/models.clj:68:1) then immediately after I did the same *lein2 test hotel_nlp.core hotel_nlp.helper* [ALL-GOOD] lein test hotel_nlp.core Testing hotel_nlp.core lein test hotel_nlp.helper Testing hotel_nlp.helper Ran 7 tests containing 30 assertions. 0 failures, 0 errors. That is what I mean it occurs at random...Has anyone ever had this before? @Dave: You're absolutely right Dave, I should have been be more specific in the subject heading. I do apologise though on behalf of my frustration which is to blame for this! It won't happen again Jim -- -- 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: what on earth is happening?
Maybe you are already doing this, but as soon as I get into This doesn't seem possible territory, I run a lein clean. That has resolved the problem for me several times. On Thu, Feb 28, 2013 at 9:01 AM, Jim foo.bar jimpil1...@gmail.com wrote: On 28/02/13 14:34, Marko Topolnik wrote: So it makes sense that it blows up only when you try to actually run the code. It doesn't low up when I try to run the code...as I said, I can easily navigate into any namespace from the repl and run any code that I wantso there is no problem compiling /running the actual code. I seem to be getting this error at random occasions without changing any code This is what's driving me nuts! 2 minutes ago I did: * lein2 test hotel_nlp.core*[ALL-GOOD] lein test hotel_nlp.core Testing hotel_nlp.core Ran 0 tests containing 0 assertions. 0 failures, 0 errors. then I did: * lein2 test hotel_nlp.helper * [ALL-GOOD]* *lein test hotel_nlp.helper Testing hotel_nlp.helper Ran 7 tests containing 30 assertions. 0 failures, 0 errors.* * so it *seems* everything is working fine...However, without changing any code: *lein2 test hotel_nlp.core hotel_nlp.helper* [BAD] Exception in thread main java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(hotel_nlp/concretions/models.clj:68:1) then immediately after I did the same *lein2 test hotel_nlp.core hotel_nlp.helper* [ALL-GOOD] lein test hotel_nlp.core Testing hotel_nlp.core lein test hotel_nlp.helper Testing hotel_nlp.helper Ran 7 tests containing 30 assertions. 0 failures, 0 errors. That is what I mean it occurs at random...Has anyone ever had this before? @Dave: You're absolutely right Dave, I should have been be more specific in the subject heading. I do apologise though on behalf of my frustration which is to blame for this! It won't happen again Jim -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: what on earth is happening?
On 28/02/13 15:12, Alex Robbins wrote: Maybe you are already doing this, but as soon as I get into This doesn't seem possible territory, I run a lein clean. That has resolved the problem for me several times. I've got nothing in /target...I am not AOT-compiling anything! I think i found the problem though...There was an invocation on a protocol method that was being delegated into some other protocol method which again was trying to delegate to the first one! This piece of code however has been there for almost 3 weeks and this is the 1st day that it manifested! Also, I'm nowhere near at understanding why sometimes it worked and other times it throwed! Jim -- -- 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: what on earth is happening?
Nondeterministic behavior - suspect race conditions. Maybe compilation was happening concurrently on several threads and the resulting bytecode got mangled. On Thursday, February 28, 2013 4:17:52 PM UTC+1, Jim foo.bar wrote: On 28/02/13 15:12, Alex Robbins wrote: Maybe you are already doing this, but as soon as I get into This doesn't seem possible territory, I run a lein clean. That has resolved the problem for me several times. I've got nothing in /target...I am not AOT-compiling anything! I think i found the problem though...There was an invocation on a protocol method that was being delegated into some other protocol method which again was trying to delegate to the first one! This piece of code however has been there for almost 3 weeks and this is the 1st day that it manifested! Also, I'm nowhere near at understanding why sometimes it worked and other times it throwed! Jim -- -- 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: what on earth is happening?
WOW! Clojure compiles in parallel? I did not know that!!! I didn't even know that was possible since there is a clear class hierarchy that needs to be loaded...I must do some reading... As a side note, I hope you all had a good laugh with my major grammar-error (throwed instead of threw)... hehe :) Jim On 28/02/13 15:21, Marko Topolnik wrote: Nondeterministic behavior - suspect race conditions. Maybe compilation was happening concurrently on several threads and the resulting bytecode got mangled. On Thursday, February 28, 2013 4:17:52 PM UTC+1, Jim foo.bar wrote: On 28/02/13 15:12, Alex Robbins wrote: Maybe you are already doing this, but as soon as I get into This doesn't seem possible territory, I run a lein clean. That has resolved the problem for me several times. I've got nothing in /target...I am not AOT-compiling anything! I think i found the problem though...There was an invocation on a protocol method that was being delegated into some other protocol method which again was trying to delegate to the first one! This piece of code however has been there for almost 3 weeks and this is the 1st day that it manifested! Also, I'm nowhere near at understanding why sometimes it worked and other times it throwed! Jim -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: what on earth is happening?
Hi, can you post the JVM used, maybe a snippet of the code around line 68, the dependencies tree (lein deps :tree) and your project.clj ? With these we can probably find the root cause of this. Luc P. I've got a project 1. I can /'lein2 repl'/ in it and navigate to any namespace - no problem 2. I can /'lein2 check'/ it and it compiles everything - no problem 3. I can /'lein2 test'/ or /'lein2 test some-namespace'/ and BOOM! - *PROBLEM! * *Exception in thread main java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(hotel_nlp/concretions/models.clj:68:1)* * *What on earth does that mean? I've never had that before!!! The 'models' namespace has not been modified for 3 days now so it can't be the culprit! The thing is I don't understand the error message! anyone? going slightly mental here! To add to the confusion, sometimes the same thing happens with 'lein2 repl' + 'load' but only *some* times. Most times it doesn't complain ! I'm not AOT-ing... Jim -- -- 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. -- Softaddictslprefonta...@softaddicts.ca sent by ibisMail from my ipad! -- -- 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: what on earth is happening?
I don't have the regular compile-and-load route in mind; this doesn't use concurrency. However if the runtime evaluation of a form results in just-in-time bytecode generation and classloading, I don't see why this couldn't be happening in any thread. Whether any of this could actually result in the errors you are getting, I don't know. On Thursday, February 28, 2013 4:25:59 PM UTC+1, Jim foo.bar wrote: WOW! Clojure compiles in parallel? I did not know that!!! I didn't even know that was possible since there is a clear class hierarchy that needs to be loaded...I must do some reading... As a side note, I hope you all had a good laugh with my major grammar-error (throwed instead of threw)... hehe :) Jim On 28/02/13 15:21, Marko Topolnik wrote: Nondeterministic behavior - suspect race conditions. Maybe compilation was happening concurrently on several threads and the resulting bytecode got mangled. On Thursday, February 28, 2013 4:17:52 PM UTC+1, Jim foo.bar wrote: On 28/02/13 15:12, Alex Robbins wrote: Maybe you are already doing this, but as soon as I get into This doesn't seem possible territory, I run a lein clean. That has resolved the problem for me several times. I've got nothing in /target...I am not AOT-compiling anything! I think i found the problem though...There was an invocation on a protocol method that was being delegated into some other protocol method which again was trying to delegate to the first one! This piece of code however has been there for almost 3 weeks and this is the 1st day that it manifested! Also, I'm nowhere near at understanding why sometimes it worked and other times it throwed! Jim -- -- 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/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: what on earth is happening?
You could also have two independent compile-and-load operations going on in parallel. On Thursday, February 28, 2013 4:37:53 PM UTC+1, Marko Topolnik wrote: I don't have the regular compile-and-load route in mind; this doesn't use concurrency. However if the runtime evaluation of a form results in just-in-time bytecode generation and classloading, I don't see why this couldn't be happening in any thread. Whether any of this could actually result in the errors you are getting, I don't know. On Thursday, February 28, 2013 4:25:59 PM UTC+1, Jim foo.bar wrote: WOW! Clojure compiles in parallel? I did not know that!!! I didn't even know that was possible since there is a clear class hierarchy that needs to be loaded...I must do some reading... -- -- 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: what on earth is happening?
On 28/02/13 15:36, Softaddicts wrote: Hi, can you post the JVM used, maybe a snippet of the code around line 68, the dependencies tree (lein deps :tree) and your project.clj ? With these we can probably find the root cause of this. Luc P. Hi Luc, thanks for your interest but I think I've cracked it...:) the code that was causing this is the following record. You will notice that 'deploy' delegates to 'run' per component. But then, since a WorkFlow can be a Component as well, the 'run' fn should NOT delegate to 'deploy' as it will only go round in circles! So, from what I understand '(deploy this text)' should be '(reduce #(run %2 %) text components))' which is basically what 'deploy' does! This is in-line with what Marko / Meikel suggested... (defrecord Workflow [components] ;;a seq of components - the workflow can itself be a component IWorkflow (getComponents [this] components) ;;just return all components (appendComponent [this c] (conj (vec components) c)) (addComponent [this pos c] (addC components pos c)) (removeComponent [this pos] (removeC components pos)) (replaceComponent [this pos replacement] (replaceC components pos replacement)) (deploy [_ text intermediates?] ((if intermediates? reductions reduce) (fn [init c] (run c init)) text components)) (deploy [this text] (deploy this text false)) ;(deploy [this] (deploy this)) IComponent (link [this pos other] (Workflow. (help/link this pos other))) ;(run [this] (deploy this)) (run [this text] (deploy this text) ;(reduce #(run %2 %) text components)) ;(run [this text more] (deploy this text (first more))) clojure.lang.IFn ;;can act as an fn (invoke [this arg] (deploy this arg)) (applyTo [this args] (apply deploy this args)) ) Jim -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ANN] clj-nio2 0.1.0
Hi Jürgen, I was just looking for a nice filesystem watcher! Jürgen Hötzel juer...@hoetzel.info writes: - Implementation of * clojure.java.io/Coercions * and * clojure.java.io/IOFactory* protocols for NIO.2 paths. Does this differ from https://github.com/pjstadig/nio? Hugo -- -- 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.
Clojure/West - don't miss it!
Clojure/West http://clojurewest.org, of course, is the Clojure conference taking place in sunny [1] Portland, OR from March 18-20th. Full schedule: http://clojurewest.org/schedule Registration: http://regonline.com/clojurewest2013 The night before the conference we've rented out Ground Kontrol, an excellent pinball and arcade mecca just a couple blocks from the hotel. We've got free play on all the games from 7-9 pm as well as early registration for the conference. (If your company is interested in sponsoring drinks at the event, please let me know!) I also want to mention that Relevance is providing full day ClojureScript training on the preconference day (http://clojurewest.org/training/). On the first day of the conference, we've got two tracks in the morning with talks on domain driven design, Cascalog, the data reader, REST, abstraction, and building a PaaS. In the afternoon we've got a talk from Stuart Sierra about building large systems with Clojure and some exciting work by Paul deGrandis on leveraging specifications as data. We also have two talks that will introduce the new Pedestal project from Relevance, which I think is going to be an important part of the Clojure ecosystem. And the day will end with a keynote from Rich Hickey - I don't what he's talking about yet but I'm betting it's something you'll want to hear. :) That evening, we'll have some more casual unsessions at the conference hotel. On the second day of the conference, we are two tracks all day long. Lots of ClojureScript talks about interop with JavaScript, asset pipelines, functional reactive programming, and ClojureScript in ClojureScript. We also have talks on DSLs, PuppetDB (written in Clojure), using Clojure to track deforestation, securing web apps with Friend, core.logic and SQL, macros, compiling Clojure to native code via scheme, and monitoring systems. To top all that off, we've got a 4 hour mini conference on logic programming that night - Byrd and Friedman will be closing the night but we've also got talks by David Nolen, Nada Amin, and more. On the last day of the conference, we're double-tracked in the morning with talks on concenative Clojure, macros and monads, working with mixed Clojure/ClojureScript code bases, editing with Emacs, debugging with Ritz, and managing your infrastructure with Clojure. After lunch we've got a bunch of great lightning talks lined up, Stuart Sierra talking about his new simulation testing framework Simulant, and a closing keynote from Matthew Flatt about metaprogramming in Racket. But hey, Racket's not Clojure! Exactly - the Clojure community has never been shy about learning and incorporating great ideas from other communities and there is much to learn about extensibility from their examples. Hopefully you can find some time to explore Portland a bit as well! It's a great city with amazing food, coffee, beer, book stores, and lots more. I think it's clear from the (incomplete!) list above that Clojure/West is going to be a tremendous learning opportunity for Clojure developers. I hope you can make it! Alex Miller 1. possibly not always sunny -- -- 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.
Interesting Light Table post
Hey guys, this is in the top of Hacker News right now, it looks very nice: http://www.chris-granger.com/2013/02/27/light-table-030-experience/ I was thinking a lot after reading the thread Why is this so difficult that maybe what we need is a dedicated IDE, something that's built with the clojure workflow in mind, I don't know... maybe this is the missing piece, who knows. I was thinking also on how cool would be to have something like the Smalltalk environment but a la clojure... I'm really excited about this project. Good job Chris! -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: ANN: lein-clr 0.2.0 for ClojureCLR
I had a quick look into nleiningen. I'm not able to bootstrap the build atm. Can't build the ClojureClrEx dep. What I basically did was: git clone https://github.com/aaronc/nleiningen.git git submodules init git submodules update nuget install Nuget.Core -o packages $env:CLOJURE_LOAD_PATH=./src;./ClojureClrEx/src/;./ClojureClrEx created an init.clj with content and changed nleiningen.core/main to nleiningen.core/-main init.clj: (assembly-load-from packages/Nuget.Core.2.2.0/lib/net40-Client/NuGet.Core.dll) nleiningen.signing is missing from the sources. Just commented it out from nleiningen/core.clj afterwards executed: Clojure.Main.exe -i .\init.clj -m nleiningen.core repl Mono.Cecil.dll Loaded #RuntimeAssembly Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Mdb.dll Loaded #RuntimeAssembly Mono.Cecil.Mdb, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Pdb.dll Loaded #RuntimeAssembly Mono.Cecil.Pdb, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Rocks.dll Loaded #RuntimeAssembly Mono.Cecil.Rocks, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Trying to resolve ClojureClrEx project.clj not found Mono.Cecil.dll Loaded #RuntimeAssembly Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Mdb.dll Loaded #RuntimeAssembly Mono.Cecil.Mdb, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Pdb.dll Loaded #RuntimeAssembly Mono.Cecil.Pdb, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Rocks.dll Loaded #RuntimeAssembly Mono.Cecil.Rocks, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Compile path: D:\Projects\Playground\clojure\test\clr\clode_org\nleiningen\bin Error loading ClojureClrEx : #NullReferenceException System.NullReferenceException: Object reference not set to an instance of an object. at clojure.lang.CljCompiler.Ast.GenContext..ctor(String sourceName, String assyName, String extension, String directory, Boolean createDynInitHelper) in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\CljCompiler\Ast\GenContext.cs:line 105 at clojure.lang.CljCompiler.Ast.GenContext.CreateWithExternalAssembly(String sourceName, String assyName, String extension, Boolean createDynInitHelper) in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\CljCompiler\Ast\GenContext.cs:line 86 at clojure.lang.CljCompiler.Ast.GenContext.CreateWithExternalAssembly(String assyName, String extension, Boolean createDynInitHelper) in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\CljCompiler\Ast\GenContext.cs:line 91 at nleiningen/core$compile_project__1078.doInvoke(Object ) in eval:line 233 at clojure.lang.RestFn.invoke() in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\Lib\RestFn.cs:line 456 at nleiningen/core$load_sub_project$fn__788__792.invoke() in eval:line 152 at nleiningen/core$load_sub_project__795.invoke(Object ) in eval:line 144 at nleiningen/core$bootstrap_project$fn__826__830.invoke() in eval:line 171 Clojure 1.4.1 uncommented the local-dependencies in the project file, because ClojureClrEx doesn't have a project.clj, only a csproj. Therefore I added the ClojureClrEx to the load path and now the repl works. but compile fails with Compile path: D:\Projects\Playground\clojure\test\clr\clode_org\nleiningen\bin Unhandled Exception: System.MissingMethodException: Cannot find member Compile matching args at CallSite.Target(Closure , CallSite , Object , Object , Object , Object , Object , Object ) at CallSite.Target(Closure , CallSite , Object , Object , Object , Object , Object , Object ) at nleiningen/core$compile_project$fn__959__963.__interop_Compile965(Object , Object __temp_1, Object __temp_2, Object __temp_3, Object __temp_4, Object __temp_5) at nleiningen/core$compile_project$fn__959__963.invoke() in eval:line 239 at nleiningen/core$compile_project__1078.doInvoke(Object ) in eval:line 238 at clojure.lang.RestFn.invoke() in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\Lib\RestFn.cs:line 456 at nleiningen/core$_main__1146.doInvoke(Object ) in eval:line 393 at clojure.lang.RestFn.invoke(Object arg1) in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\Lib\RestFn.cs:line 468 at clojure.lang.Var.invoke(Object arg1) in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\Lib\Var.cs:line 741 at clojure.lang.AFn.ApplyToHelper(IFn fn, ISeq argList) in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\Lib\AFn.cs:line 191 at clojure.lang.Var.applyTo(ISeq arglist) in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\Lib\Var.cs:line 874 at clojure/core$apply__12458.invoke(Object , Object ) in core.clj:line 601 at clojure/main$main_opt__263.invoke(Object , Object ) in eval:line 343 at clojure/main$main__338.doInvoke(Object ) in eval:line 446 at clojure.lang.RestFn.invoke(Object arg1, Object arg2, Object arg3,
Re: Interesting Light Table post
LISP SHALL RISE AGAIN! On Thursday, 28 February 2013 11:54:56 UTC-5, Erlis Vidal wrote: Hey guys, this is in the top of Hacker News right now, it looks very nice: http://www.chris-granger.com/2013/02/27/light-table-030-experience/ I was thinking a lot after reading the thread Why is this so difficult that maybe what we need is a dedicated IDE, something that's built with the clojure workflow in mind, I don't know... maybe this is the missing piece, who knows. I was thinking also on how cool would be to have something like the Smalltalk environment but a la clojure... I'm really excited about this project. Good job Chris! -- -- 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: Interesting Light Table post
LISP SHALL RISE AGAIN! -- -- 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: what on earth is happening?
I just walked in home, sat on my pc, /git-pull/ (what I pushed 30 min ago), /lein2 repl/, /load-file xxx.clj/ , *BOOM!* CompilerException java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(hotel_nlp/concretions/models.clj:68:1) this is beyond belief! I thought I sorted that at the office...before leaving I tried lein2 repl/lein2 test 5 times and it worked every single time my project.clj is here: https://github.com/jimpil/hotel-nlp/blob/master/project.clj sorted@sorted-desktop:~$ java -version java version 1.7.0_15 Java(TM) SE Runtime Environment (build 1.7.0_15-b03) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode) sorted@sorted-desktop:~/clooJWorkspace/hotel-nlp$ lein2 deps :tree [edu.stanford.nlp/stanford-corenlp-models 1.3.4-models] [edu.stanford.nlp/stanford-corenlp 1.3.4] [de.jollyday/jollyday 0.4.7] [javax.xml.bind/jaxb-api 2.2.7] [joda-time 2.1] [xom 1.2.5] [xalan 2.7.0] [xerces/xercesImpl 2.8.0] [xml-apis 1.3.03] [experiment 1.5.3] [net.sf.jwordnet/jwnl 1.4_rc3] [commons-logging 1.1.1] [org.apache.lucene/lucene-snowball 3.0.3] [org.apache.opennlp/opennlp-maxent 3.0.3-SNAPSHOT] [org.apache.pdfbox/pdfbox 1.7.1] [org.apache.pdfbox/fontbox 1.7.1] [org.apache.pdfbox/jempbox 1.7.1] [org.clojure/clojure 1.5.0-RC16] [org.clojure/data.zip 0.1.1] [uk.ac.gate/gate-core 7.1] [com.thoughtworks.xstream/xstream 1.4.2 :exclusions [[xmlpull] [xpp3/xpp3_min]]] [commons-io 2.1] [commons-lang 2.6] [jaxen 1.1 :scope runtime :exclusions [[xml-apis] [xerces/xercesImpl] [xom]]] [dom4j 1.6.1 :scope runtime] [jdom 1.0] [junit 4.10 :exclusions [[org.hamcrest/hamcrest-core]]] [log4j 1.2.17] [net.sourceforge.nekohtml/nekohtml 1.9.14 :exclusions [[xml-apis]]] [org.apache.ant/ant 1.8.1] [org.apache.ant/ant-launcher 1.8.1] [org.apache.ivy/ivy 2.2.0] [org.apache.lucene/lucene-core 3.5.0] [org.apache.tika/tika-parsers 1.0 :scope runtime :exclusions [[rome] [edu.ucar/netcdf] [org.ccil.cowan.tagsoup/tagsoup] [asm] [de.l3s.boilerpipe/boilerpipe] [org.apache.geronimo.specs/geronimo-stax-api_1.0_spec]]] [com.drewnoakes/metadata-extractor 2.4.0-beta-1 :scope runtime] [commons-codec 1.5 :scope runtime] [org.apache.commons/commons-compress 1.3 :scope runtime] [org.apache.james/apache-mime4j-core 0.7 :scope runtime] [org.apache.james/apache-mime4j-dom 0.7 :scope runtime] [org.apache.poi/poi-ooxml 3.8-beta4 :scope runtime :exclusions [[stax/stax-api] [xml-apis]]] [org.apache.poi/poi-ooxml-schemas 3.8-beta4 :scope runtime] [org.apache.xmlbeans/xmlbeans 2.3.0 :scope runtime] [org.apache.poi/poi-scratchpad 3.8-beta4 :scope runtime] [org.apache.poi/poi 3.8-beta4 :scope runtime] [org.apache.tika/tika-core 1.0 :scope runtime] [org.bouncycastle/bcmail-jdk15 1.45 :scope runtime] [org.bouncycastle/bcprov-jdk15 1.45 :scope runtime] [org.codehaus.woodstox/woodstox-core-lgpl 4.1.3 :exclusions [[javax.xml.stream/stax-api]]] [org.codehaus.woodstox/stax2-api 3.1.1] [org.springframework/spring-aop 2.0.8] [aopalliance 1.0] [org.springframework/spring-beans 2.0.8] [org.springframework/spring-core 2.0.8] [org.xhtmlrenderer/flying-saucer-core 9.0.1] [uk.ac.gate/gate-asm 3.1] [uk.ac.gate/gate-compiler-jdt 3.7.1] [urbanophile/java-getopt 1.0.9] [xmlunit 1.2] [xpp3 1.1.3.4.O :scope runtime] My actual project has practically no dependencies! All that stuff I need to test what I'm doing. I'm providing the glue (the protocols and the extension-points) for several NLP libraries...after I'm done with each library, I need to pull it in and use it exactly as a consumer would. At the moment I've only done openNLP , stanfordNLP GATE so it is normal to see those and their dependencies in the dep-tree. They are used in examples/workflows.clj which demonstrates how the 'glue' feels like from a consumer's perspective... any help to get to the bottom of this will be really appreciated guys...This is a rather ambitious project but I'd like for it to step on its feet quite earlyI can't do anything while this persists...I mean, I can but it is eating my brain... Jim On 28/02/13 15:46, Jim foo.bar wrote: On 28/02/13 15:36, Softaddicts wrote: Hi, can you post the JVM used, maybe a snippet of the code around line 68, the dependencies tree (lein deps :tree) and your project.clj ? With these we can probably find the root cause of this. Luc P. Hi Luc, thanks for your interest but I think I've cracked it...:) the code that was causing this is the following record. You will notice that 'deploy' delegates to 'run' per component. But then, since a WorkFlow can be a Component as well, the 'run' fn should NOT delegate to 'deploy' as it will only go round in circles! So, from what I
Re: what on earth is happening?
Did you try with Java 6 ? I am inclined that your problem is not so much with your code than with one of your java dependencies. Luc P. I just walked in home, sat on my pc, /git-pull/ (what I pushed 30 min ago), /lein2 repl/, /load-file xxx.clj/ , *BOOM!* CompilerException java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(hotel_nlp/concretions/models.clj:68:1) this is beyond belief! I thought I sorted that at the office...before leaving I tried lein2 repl/lein2 test 5 times and it worked every single time my project.clj is here: https://github.com/jimpil/hotel-nlp/blob/master/project.clj sorted@sorted-desktop:~$ java -version java version 1.7.0_15 Java(TM) SE Runtime Environment (build 1.7.0_15-b03) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode) sorted@sorted-desktop:~/clooJWorkspace/hotel-nlp$ lein2 deps :tree [edu.stanford.nlp/stanford-corenlp-models 1.3.4-models] [edu.stanford.nlp/stanford-corenlp 1.3.4] [de.jollyday/jollyday 0.4.7] [javax.xml.bind/jaxb-api 2.2.7] [joda-time 2.1] [xom 1.2.5] [xalan 2.7.0] [xerces/xercesImpl 2.8.0] [xml-apis 1.3.03] [experiment 1.5.3] [net.sf.jwordnet/jwnl 1.4_rc3] [commons-logging 1.1.1] [org.apache.lucene/lucene-snowball 3.0.3] [org.apache.opennlp/opennlp-maxent 3.0.3-SNAPSHOT] [org.apache.pdfbox/pdfbox 1.7.1] [org.apache.pdfbox/fontbox 1.7.1] [org.apache.pdfbox/jempbox 1.7.1] [org.clojure/clojure 1.5.0-RC16] [org.clojure/data.zip 0.1.1] [uk.ac.gate/gate-core 7.1] [com.thoughtworks.xstream/xstream 1.4.2 :exclusions [[xmlpull] [xpp3/xpp3_min]]] [commons-io 2.1] [commons-lang 2.6] [jaxen 1.1 :scope runtime :exclusions [[xml-apis] [xerces/xercesImpl] [xom]]] [dom4j 1.6.1 :scope runtime] [jdom 1.0] [junit 4.10 :exclusions [[org.hamcrest/hamcrest-core]]] [log4j 1.2.17] [net.sourceforge.nekohtml/nekohtml 1.9.14 :exclusions [[xml-apis]]] [org.apache.ant/ant 1.8.1] [org.apache.ant/ant-launcher 1.8.1] [org.apache.ivy/ivy 2.2.0] [org.apache.lucene/lucene-core 3.5.0] [org.apache.tika/tika-parsers 1.0 :scope runtime :exclusions [[rome] [edu.ucar/netcdf] [org.ccil.cowan.tagsoup/tagsoup] [asm] [de.l3s.boilerpipe/boilerpipe] [org.apache.geronimo.specs/geronimo-stax-api_1.0_spec]]] [com.drewnoakes/metadata-extractor 2.4.0-beta-1 :scope runtime] [commons-codec 1.5 :scope runtime] [org.apache.commons/commons-compress 1.3 :scope runtime] [org.apache.james/apache-mime4j-core 0.7 :scope runtime] [org.apache.james/apache-mime4j-dom 0.7 :scope runtime] [org.apache.poi/poi-ooxml 3.8-beta4 :scope runtime :exclusions [[stax/stax-api] [xml-apis]]] [org.apache.poi/poi-ooxml-schemas 3.8-beta4 :scope runtime] [org.apache.xmlbeans/xmlbeans 2.3.0 :scope runtime] [org.apache.poi/poi-scratchpad 3.8-beta4 :scope runtime] [org.apache.poi/poi 3.8-beta4 :scope runtime] [org.apache.tika/tika-core 1.0 :scope runtime] [org.bouncycastle/bcmail-jdk15 1.45 :scope runtime] [org.bouncycastle/bcprov-jdk15 1.45 :scope runtime] [org.codehaus.woodstox/woodstox-core-lgpl 4.1.3 :exclusions [[javax.xml.stream/stax-api]]] [org.codehaus.woodstox/stax2-api 3.1.1] [org.springframework/spring-aop 2.0.8] [aopalliance 1.0] [org.springframework/spring-beans 2.0.8] [org.springframework/spring-core 2.0.8] [org.xhtmlrenderer/flying-saucer-core 9.0.1] [uk.ac.gate/gate-asm 3.1] [uk.ac.gate/gate-compiler-jdt 3.7.1] [urbanophile/java-getopt 1.0.9] [xmlunit 1.2] [xpp3 1.1.3.4.O :scope runtime] My actual project has practically no dependencies! All that stuff I need to test what I'm doing. I'm providing the glue (the protocols and the extension-points) for several NLP libraries...after I'm done with each library, I need to pull it in and use it exactly as a consumer would. At the moment I've only done openNLP , stanfordNLP GATE so it is normal to see those and their dependencies in the dep-tree. They are used in examples/workflows.clj which demonstrates how the 'glue' feels like from a consumer's perspective... any help to get to the bottom of this will be really appreciated guys...This is a rather ambitious project but I'd like for it to step on its feet quite earlyI can't do anything while this persists...I mean, I can but it is eating my brain... Jim On 28/02/13 15:46, Jim foo.bar wrote: On 28/02/13 15:36, Softaddicts wrote: Hi, can you post the JVM used, maybe a snippet of the code around line 68, the dependencies tree (lein deps :tree) and your project.clj ? With these we can probably find the root cause of this. Luc P. Hi Luc, thanks for your
Re: what on earth is happening?
No I did not try Oracle Java6 and it would be a real hassle since it's not even installed...I think I've got openJDK 6 though...hmm I'll poke around with the dependencies of the namespace I'm trying to load see if that changes anything and if it doesn't I'll give openJDK a spin... Clojure seems rather sure it is my record definition...but if I try to load the namespace containing the record everything is fine...it is the 'consumer' namespace (workflows.clj) that doesn't load (sometimes)... Jim On 28/02/13 17:20, Softaddicts wrote: Did you try with Java 6 ? I am inclined that your problem is not so much with your code than with one of your java dependencies. Luc P. I just walked in home, sat on my pc, /git-pull/ (what I pushed 30 min ago), /lein2 repl/, /load-file xxx.clj/ , *BOOM!* CompilerException java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(hotel_nlp/concretions/models.clj:68:1) this is beyond belief! I thought I sorted that at the office...before leaving I tried lein2 repl/lein2 test 5 times and it worked every single time my project.clj is here: https://github.com/jimpil/hotel-nlp/blob/master/project.clj sorted@sorted-desktop:~$ java -version java version 1.7.0_15 Java(TM) SE Runtime Environment (build 1.7.0_15-b03) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode) sorted@sorted-desktop:~/clooJWorkspace/hotel-nlp$ lein2 deps :tree [edu.stanford.nlp/stanford-corenlp-models 1.3.4-models] [edu.stanford.nlp/stanford-corenlp 1.3.4] [de.jollyday/jollyday 0.4.7] [javax.xml.bind/jaxb-api 2.2.7] [joda-time 2.1] [xom 1.2.5] [xalan 2.7.0] [xerces/xercesImpl 2.8.0] [xml-apis 1.3.03] [experiment 1.5.3] [net.sf.jwordnet/jwnl 1.4_rc3] [commons-logging 1.1.1] [org.apache.lucene/lucene-snowball 3.0.3] [org.apache.opennlp/opennlp-maxent 3.0.3-SNAPSHOT] [org.apache.pdfbox/pdfbox 1.7.1] [org.apache.pdfbox/fontbox 1.7.1] [org.apache.pdfbox/jempbox 1.7.1] [org.clojure/clojure 1.5.0-RC16] [org.clojure/data.zip 0.1.1] [uk.ac.gate/gate-core 7.1] [com.thoughtworks.xstream/xstream 1.4.2 :exclusions [[xmlpull] [xpp3/xpp3_min]]] [commons-io 2.1] [commons-lang 2.6] [jaxen 1.1 :scope runtime :exclusions [[xml-apis] [xerces/xercesImpl] [xom]]] [dom4j 1.6.1 :scope runtime] [jdom 1.0] [junit 4.10 :exclusions [[org.hamcrest/hamcrest-core]]] [log4j 1.2.17] [net.sourceforge.nekohtml/nekohtml 1.9.14 :exclusions [[xml-apis]]] [org.apache.ant/ant 1.8.1] [org.apache.ant/ant-launcher 1.8.1] [org.apache.ivy/ivy 2.2.0] [org.apache.lucene/lucene-core 3.5.0] [org.apache.tika/tika-parsers 1.0 :scope runtime :exclusions [[rome] [edu.ucar/netcdf] [org.ccil.cowan.tagsoup/tagsoup] [asm] [de.l3s.boilerpipe/boilerpipe] [org.apache.geronimo.specs/geronimo-stax-api_1.0_spec]]] [com.drewnoakes/metadata-extractor 2.4.0-beta-1 :scope runtime] [commons-codec 1.5 :scope runtime] [org.apache.commons/commons-compress 1.3 :scope runtime] [org.apache.james/apache-mime4j-core 0.7 :scope runtime] [org.apache.james/apache-mime4j-dom 0.7 :scope runtime] [org.apache.poi/poi-ooxml 3.8-beta4 :scope runtime :exclusions [[stax/stax-api] [xml-apis]]] [org.apache.poi/poi-ooxml-schemas 3.8-beta4 :scope runtime] [org.apache.xmlbeans/xmlbeans 2.3.0 :scope runtime] [org.apache.poi/poi-scratchpad 3.8-beta4 :scope runtime] [org.apache.poi/poi 3.8-beta4 :scope runtime] [org.apache.tika/tika-core 1.0 :scope runtime] [org.bouncycastle/bcmail-jdk15 1.45 :scope runtime] [org.bouncycastle/bcprov-jdk15 1.45 :scope runtime] [org.codehaus.woodstox/woodstox-core-lgpl 4.1.3 :exclusions [[javax.xml.stream/stax-api]]] [org.codehaus.woodstox/stax2-api 3.1.1] [org.springframework/spring-aop 2.0.8] [aopalliance 1.0] [org.springframework/spring-beans 2.0.8] [org.springframework/spring-core 2.0.8] [org.xhtmlrenderer/flying-saucer-core 9.0.1] [uk.ac.gate/gate-asm 3.1] [uk.ac.gate/gate-compiler-jdt 3.7.1] [urbanophile/java-getopt 1.0.9] [xmlunit 1.2] [xpp3 1.1.3.4.O :scope runtime] My actual project has practically no dependencies! All that stuff I need to test what I'm doing. I'm providing the glue (the protocols and the extension-points) for several NLP libraries...after I'm done with each library, I need to pull it in and use it exactly as a consumer would. At the moment I've only done openNLP , stanfordNLP GATE so it is normal to see those and their dependencies in the dep-tree. They are used in examples/workflows.clj which demonstrates how the 'glue' feels like from a consumer's perspective... any help to get to the bottom of this will be really appreciated guys...This is a rather ambitious project but I'd like
Re: what on earth is happening?
Your run protocol defines three arities, you do not implement all three. Did you try limiting the definition of the run protocol to the two arity case that you are actually implementing? On Thu, Feb 28, 2013 at 9:23 AM, Jim foo.bar jimpil1...@gmail.com wrote: I've got a project 1. I can *'lein2 repl'* in it and navigate to any namespace - no problem 2. I can *'lein2 check'* it and it compiles everything - no problem 3. I can *'lein2 test'* or *'lein2 test some-namespace'* and BOOM! - * PROBLEM! * *Exception in thread main java.lang.VerifyError: (class: hotel_nlp/concretions/models/Workflow, method: run signature: ()Ljava/lang/Object;) Unable to pop operand off an empty stack, compiling:(hotel_nlp/concretions/models.clj:68:1)* * *What on earth does that mean? I've never had that before!!! The 'models' namespace has not been modified for 3 days now so it can't be the culprit! The thing is I don't understand the error message! anyone? going slightly mental here! To add to the confusion, sometimes the same thing happens with 'lein2 repl' + 'load' but only *some* times. Most times it doesn't complain ! I'm not AOT-ing... Jim -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: what on earth is happening?
On 28/02/13 17:29, David Nolen wrote: Your run protocol defines three arities, you do not implement all three. what's wrong with that? protocols, unlike interfaces let you do that... Did you try limiting the definition of the run protocol to the two arity case that you are actually implementing? funny you should mention that though cos I had 2 arities at first but now there is a library that defines a void 'execute' method that I need to hook on to so I added another 1-arg arity to cover that. In any case I think I found the culprit...it's the last line in this extend-type form: (defn extend-gate [] (extend-type gate.Executable IComponent (run ([this] (do (.execute this) (.getAnnotations ^gate.Document (.getDocument ^gate.creole.AbstractLanguageAnalyser this ([this _] (run this)) ) (link [this pos other] (help/linkage this pos other)) ) (extend-type gate.creole.SerialAnalyserController IWorkflow (deploy [this] (run this))) ) ;;HERE! Different namespace and of course different line...for some reason when I coded it I thought that since SerialAnalyserController implements Executable I can delegate to its IComponent extension previously defined .These are characteristic of the problems inheritance introduces in Java. I had similar problems with stanforNLP and I did post here (protocol granularity was the name of the post). Jim -- -- 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: what on earth is happening?
On Thu, Feb 28, 2013 at 1:00 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: On 28/02/13 17:29, David Nolen wrote: Your run protocol defines three arities, you do not implement all three. what's wrong with that? protocols, unlike interfaces let you do that... It's not my understanding that protocols are intended to be used in this way. They only let you do that to support exploratory REPL based development. David -- -- 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: what on earth is happening?
not that I have any serious arguments agaisnt what you're saying but this sounds very limiting...where is the power then? what are the chances that you will be able to extend a particular protocol to many types without needing at least 2-3 arities...it's perfectly fine that an exception will be thrown if someone calls the wrong arity isn't it? in addition, how about when extending a protocol to an interface that defines multiple arities? The concrete classes implementing that interface and thus your protocol, need to be able to be called with whichever arity is available. some other interface though may only defines a single arity but you still want to extend the protocol to - what do you do then? this is the first time I'm hearing about this and if you cold expand that would be great...If one hangs out on the list enough, it doesn't take much brains to realise that you are very knowledgeable and always have good insights/suggestions so I'm only trying to learn. Jim On 28/02/13 18:05, David Nolen wrote: On Thu, Feb 28, 2013 at 1:00 PM, Jim - FooBar(); jimpil1...@gmail.com mailto:jimpil1...@gmail.com wrote: On 28/02/13 17:29, David Nolen wrote: Your run protocol defines three arities, you do not implement all three. what's wrong with that? protocols, unlike interfaces let you do that... It's not my understanding that protocols are intended to be used in this way. They only let you do that to support exploratory REPL based development. David -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: what on earth is happening?
David has something here. I did not pay attention because they were commented in the snippet you posted. I remember playing around with this months ago and dropped it, unexpected and strange behaviours popped out and I did not have time to spend digging into it. We AOT all our code here and even that prove hard to stabilize with multiple arities. If some of your implementations are not in sync with the definition then it may explain the glitch. Certainly it can be hard to track what has been loaded first and what byte code comes up first. Luc P. On Thu, Feb 28, 2013 at 1:00 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: On 28/02/13 17:29, David Nolen wrote: Your run protocol defines three arities, you do not implement all three. what's wrong with that? protocols, unlike interfaces let you do that... It's not my understanding that protocols are intended to be used in this way. They only let you do that to support exploratory REPL based development. David -- -- 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. -- Softaddictslprefonta...@softaddicts.ca sent by ibisMail from my ipad! -- -- 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: what on earth is happening?
On Thu, Feb 28, 2013 at 1:16 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: not that I have any serious arguments agaisnt what you're saying but this sounds very limiting...where is the power then? what are the chances that you will be able to extend a particular protocol to many types without needing at least 2-3 arities...it's perfectly fine that an exception will be thrown if someone calls the wrong arity isn't it? It's worth examining how protocols were done in ClojureScript. In every case where a protocol fn has multiple arities they are all implemented. The one outlier is IFn, and I don't personally have a good answer for that. in addition, how about when extending a protocol to an interface that defines multiple arities? The concrete classes implementing that interface and thus your protocol, need to be able to be called with whichever arity is available. some other interface though may only defines a single arity but you still want to extend the protocol to - what do you do then? Being able to extend protocols to interfaces is a nice JVM-centric convenience. It's not clear to me the whether the peculiarities around interface interop have much to do with the actual semantics of protocols. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: ANN: lein-clr 0.2.0 for ClojureCLR
Hi Rainer, glad you're checking this out. This code (as I believe I mentioned above) requires a special build of the ClojureCLR compiler (see this github branch https://github.com/aaronc/clojure-clr - I just merged it with the clojure-clr master). I'm going to try to make some effort today to see if I can get Dave the patches so he can review them for inclusion in clojure-clr master. Hopefully soon we can have an official nuget package. Here's ClojureClrEx: https://github.com/aaronc/ClojureClrEx On Thu, Feb 28, 2013 at 11:55 AM, Rainer Schuster schuster-rai...@web.dewrote: I had a quick look into nleiningen. I'm not able to bootstrap the build atm. Can't build the ClojureClrEx dep. What I basically did was: git clone https://github.com/aaronc/nleiningen.git git submodules init git submodules update nuget install Nuget.Core -o packages $env:CLOJURE_LOAD_PATH=./src;./ClojureClrEx/src/;./ClojureClrEx created an init.clj with content and changed nleiningen.core/main to nleiningen.core/-main init.clj: (assembly-load-from packages/Nuget.Core.2.2.0/lib/net40-Client/NuGet.Core.dll) nleiningen.signing is missing from the sources. Just commented it out from nleiningen/core.clj afterwards executed: Clojure.Main.exe -i .\init.clj -m nleiningen.core repl Mono.Cecil.dll Loaded #RuntimeAssembly Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Mdb.dll Loaded #RuntimeAssembly Mono.Cecil.Mdb, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Pdb.dll Loaded #RuntimeAssembly Mono.Cecil.Pdb, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Rocks.dll Loaded #RuntimeAssembly Mono.Cecil.Rocks, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Trying to resolve ClojureClrEx project.clj not found Mono.Cecil.dll Loaded #RuntimeAssembly Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Mdb.dll Loaded #RuntimeAssembly Mono.Cecil.Mdb, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Pdb.dll Loaded #RuntimeAssembly Mono.Cecil.Pdb, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Mono.Cecil.Rocks.dll Loaded #RuntimeAssembly Mono.Cecil.Rocks, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756 Compile path: D:\Projects\Playground\clojure\test\clr\clode_org\nleiningen\bin Error loading ClojureClrEx : #NullReferenceException System.NullReferenceException: Object reference not set to an instance of an object. at clojure.lang.CljCompiler.Ast.GenContext..ctor(String sourceName, String assyName, String extension, String directory, Boolean createDynInitHelper) in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\CljCompiler\Ast\GenContext.cs:line 105 at clojure.lang.CljCompiler.Ast.GenContext.CreateWithExternalAssembly(String sourceName, String assyName, String extension, Boolean createDynInitHelper) in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\CljCompiler\Ast\GenContext.cs:line 86 at clojure.lang.CljCompiler.Ast.GenContext.CreateWithExternalAssembly(String assyName, String extension, Boolean createDynInitHelper) in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\CljCompiler\Ast\GenContext.cs:line 91 at nleiningen/core$compile_project__1078.doInvoke(Object ) in eval:line 233 at clojure.lang.RestFn.invoke() in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\Lib\RestFn.cs:line 456 at nleiningen/core$load_sub_project$fn__788__792.invoke() in eval:line 152 at nleiningen/core$load_sub_project__795.invoke(Object ) in eval:line 144 at nleiningen/core$bootstrap_project$fn__826__830.invoke() in eval:line 171 Clojure 1.4.1 uncommented the local-dependencies in the project file, because ClojureClrEx doesn't have a project.clj, only a csproj. Therefore I added the ClojureClrEx to the load path and now the repl works. but compile fails with Compile path: D:\Projects\Playground\clojure\test\clr\clode_org\nleiningen\bin Unhandled Exception: System.MissingMethodException: Cannot find member Compile matching args at CallSite.Target(Closure , CallSite , Object , Object , Object , Object , Object , Object ) at CallSite.Target(Closure , CallSite , Object , Object , Object , Object , Object , Object ) at nleiningen/core$compile_project$fn__959__963.__interop_Compile965(Object , Object __temp_1, Object __temp_2, Object __temp_3, Object __temp_4, Object __temp_5) at nleiningen/core$compile_project$fn__959__963.invoke() in eval:line 239 at nleiningen/core$compile_project__1078.doInvoke(Object ) in eval:line 238 at clojure.lang.RestFn.invoke() in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\Lib\RestFn.cs:line 456 at nleiningen/core$_main__1146.doInvoke(Object ) in eval:line 393 at clojure.lang.RestFn.invoke(Object arg1) in D:\work\clojure-clr-1.4.1-fix\Clojure\Clojure\Lib\RestFn.cs:line 468 at
Re: what on earth is happening?
On 28/02/13 18:16, Softaddicts wrote: We AOT all our code here and even that prove hard to stabilize with multiple arities. doesn't /lein2 check/ do AOT? how else would it be able to emit reflection warnings? If that is the case, I always AOT my code periodically too. In this particualr case lein2 check succeeds every time...or at least it hasn't failed yet! Jim -- -- 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: Improving visibility of clojure-doc.org
I added a link to http://clojure-doc.org in this two wikipedia's pages: http://en.wikipedia.org/wiki/Clojure http://es.wikipedia.org/wiki/Clojure (*see*: external links) Thanks Michael for your site. Is very useful. Miguel -- -- 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.
[ANN] Immutant 0.9.0 released
Hi all, We released Immutant 0.9.0 a few minutes ago, which features a much smaller distribution size, sharing caches with TorqueBox, a friendlier API for scheduling recurring jobs, and more stuff described here: http://bit.ly/immutant090 Toby and I will be at Clojure/West, I think doing an unsession, so please grab us if you want to chat about Immutant or whatever else. # What is Immutant? Immutant is an application server for Clojure. It's an integrated platform built on JBoss AS7 that aims to reduce the incidental complexity in real-world applications. It provides support for Ring handlers, asynchronous messaging, caching, scheduled jobs, XA transactions, clustering, and highly-available daemon services. Peace, Love, and Oysters, Jim -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: ANN: lein-clr 0.2.0 for ClojureCLR
Hi David, I finally got around to creating patches for my commits and opened these two JIRA issues on them: http://dev.clojure.org/jira/browse/CLJCLR-7 http://dev.clojure.org/jira/browse/CLJCLR-8 I have more stuff, but let's start with this. Aaron On Monday, December 17, 2012 4:14:16 PM UTC-5, dmiller wrote: Aaron, tools.logging and nrepl are important. I'm glad to see the effort. I haven't forgotten about your single-DLL work. I'm going to have plenty of time next week if you can get something to me. -David On Saturday, December 15, 2012 5:15:16 PM UTC-6, Aaron wrote: Cool. I'm just seeing this now. I actually spent some time a while back getting a very simple nleiningen working in ClojureCLR. I had nuget downloads working and also the ability to AOT compile namespaces and merge them into a single DLL. It's not fully ready for prime time yet though, in part because it depends on some custom modifications to the ClojureCLR compiler. In the long run, I'd like to work together on getting a full lein clr implementation working. I'd love to discuss further if you have time. By the way Dave - speaking of custom modifications to ClojureCLR, this past week, my colleague and I merged your latest master with our changes ( https://github.com/kocubinski/clojure-clr). I hope to put together some formal patches soon which clearly identify the changes I'm suggesting for the main compiler. While we're at it, a few other things I'm working on or have working in clojure-clr are: tools.logging and pinvoke (https://github.com/aaronc/ClojureClrEx) - logging is mostly ported but with only one backend working, pinvoke/dllimport works great, but no docs a nice interface to WPF (https://github.com/aaronc/ClojureWpf) - pretty stable, but again no docs yet nrepl (https://github.com/aaronc/tools.nrepl/tree/clr) - needs quite a bit more work Unfortunately, I haven't been too diligent with documentation, but I hope to correct that as time allows. On Sunday, November 18, 2012 4:03:03 PM UTC-5, Shantanu Kumar wrote: Hi, I pushed lein-clr 0.2.0 https://github.com/kumarshantanu/lein-clr JARs to Clojars a little while ago. The focus of this release is to 1. add dependency support (via NuGet/wget/curl, Leiningen :dependencies) 2. lower the bar to get started with ClojureCLR (with automated download of ClojureCLR) 3. remove the need to call `assembly-load-from` in code The changelog and TODO are here: https://github.com/kumarshantanu/lein-clr/blob/master/CHANGES.md I hope this release is usable enough to start building ClojureCLR apps and libraries with it. This is an early project and can certainly use feedback and contribution. Please let me know what you think. Shantanu -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [ANN] clj-nio2 0.1.0
Hi Hugo, On Thursday, February 28, 2013 5:11:57 PM UTC+1, Hugo Duncan wrote: Hi Jürgen, I was just looking for a nice filesystem watcher! Jürgen Hötzel jue...@hoetzel.info javascript: writes: - Implementation of * clojure.java.io/Coercions * and * clojure.java.io/IOFactory* protocols for NIO.2 paths. Does this differ from https://github.com/pjstadig/nio? Yes, the nio package is about the IO Channel/Buffers abstractions introduced with Java 5 (java.nio.Buffer, java.nio.channels.Channel). My nio2 package is about the new Path, WatchService and DirectoryStream abstractions introduced with Java 7 (all in the new java.nio.file package). I also plan to wrap file attributes and ACLs (not implemented yet) Both packages extend the clojure.java.io protocols and multimethods for easy interoperability with existing Clojure IO code. There is no WatchService awailable in nio. The only way to to this without Java 7/NIO2 is to use native librarys like http://jnotify.sourceforge.net/ Jürgen -- -- 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: what on earth is happening?
I meant executing the AOT code not just checking it from time to time. In the REPL you can redefine stuff on the fly but it does garantee that it's all coherent at a given time. On 28/02/13 18:16, Softaddicts wrote: We AOT all our code here and even that prove hard to stabilize with multiple arities. doesn't /lein2 check/ do AOT? how else would it be able to emit reflection warnings? If that is the case, I always AOT my code periodically too. In this particualr case lein2 check succeeds every time...or at least it hasn't failed yet! Jim -- -- 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. -- Softaddictslprefonta...@softaddicts.ca sent by ibisMail from my ipad! -- -- 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.
Clojure equivalents of .indexOf .lastIndexOf
Hi, I was looking at http://clojure.org/cheatsheet to find something I could use for getting an index of specific item in the string / vector. It looks like `.indexOf` / `.lastIndexOf (http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#lastIndexOf%28java.lang.String%29)` are officially suggested options. I would prefer to avoid backend specific API like these (as I intend to compile to lua) and was wondering if it's reasonable to open issue requesting clojure native equivalents. I'd also be happy to provide patches to do it. Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.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/groups/opt_out.
Adding string support to `split`
At the moment `split (http://clojuredocs.org/clojure_core/clojure.string/split)` only accepts regexps as delimiter argument. Is it reasonable to add support for string type delimiters ? That has potential to be a lot faster on JS backend ? And I have bunch of cases where what I really need is string delimiters. Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.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/groups/opt_out.
contains? for vectors
Hi, Function contains? (http://clojuredocs.org/clojure_core/clojure.core/contains_q) returns true if key is present in the given collection, although arguably on some data structures one would expect behaviour to be different. In fact it's already different on sets: (contains? #{:a :b :c} :a) ; = true Would that be reasonable to change behaviour for other types too like: (contains? [:a :b :c] :a) ; = false (contains? foo o) ; = false (contains? '(1 2 3) 1) ; = false So they do return `true` instead ? If that will break too much code, maybe some other function can be added instead ? Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.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/groups/opt_out.
converting an xml database backup to insert statements
Preamble: I've read some about xml and clojure, and done some mostly trivial things (reading and writing values from and to xml). Most of the examples I've seen of parse, zip, etc are very elegant and do a great job at reading a specific x-path-like value or series of values. But I'm stuck trying to do what I think is a more involved operation with xml - to the point where I'm thinking clojure isn't the right tool. But I really enjoy programming in clojure, and so I'm hoping some folks on the list can help point me in the right direction. TIA! Detail: I have poked around some, read the APIs and examples, and I can even navigate using something like (- down down right node) but I can't seem to reconcile or mix that manual navigation of the zipper (that is passing locs to each fn) and what I think I really want from something like xml- (which doesn't return a loc, it returns a lazy-seq that's de-loc-ified). Overview: I have a backup of a database as xml. It's got a bunch of stuff in it, some of which I want and some that I want to discard. But I mostly have a blacklist of this is what I need to discard and I want everything else. Once I have the parts of the db backup I want, I need to translate them to insert statements to build the database back up. I'm having some difficulty wrapping my head around what I haven't even gotten to solving yet - that I need the list of tags and the value back, when something really nifty like xml- seems to be designed to only give me the values. Code (ish): Sample files below (or gisted https://gist.github.com/pbuckley/5060575). xml: config xmlns=some-url FAKENAME xmlns=another-url SomeSettings SpecificSettings FooVAL1/Foo BarVAL3/Bar /SpecificSettings /SomeSettings DoNotWant SomeEnormousChildren /SomEnormousChildren /DoNotWant MoreConfig Baz20/Baz Buz300/Buz /MoreConfig /FAKENAME /config And this non-working somewhat pseudo-code (it gets more pseudo the further you get): (ns config-backup.confdbackup (:require [clojure.xml :as xml] ; I think I need both zip and data.zip? [clojure.zip :as zip] ; different from clojure.data.zip? [clojure.data.zip :as zf] ; used to be zip-filter? [clojure.data.zip.xml :as zx])) (def my-xml (xml/parse my-db-backup.xml)) (def my-zipped-xml (zip/xml-zip my-xml)) (def this-worked (zx/xml- my-zipped-xml :FAKENAME :SomeSettings :SpecificSettings :Foo zx/text)) (def with-junk-removed (zip/remove (zx/xml- my-zipped-xml :FAKENAME :DoNotWant))) ; does not work (defn transmogrifier given the xml, nodes and text, create insert statements for them [things] (do-some-magic)) (transmogrifier with-junk-removed) ; returns insert FAKENAME SomeSettings SpecificSettings Foo VAL1 and the stuff from MoreConfig etc -- The king’s heart is like a stream of water directed by the Lord; He guides it wherever He pleases. -- -- 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: contains? for vectors
= *(contains? '(1 2 3) 1)* IllegalArgumentException contains? not supported on type: clojure.lang.PersistentList clojure.lang.RT.contains (RT.java:724) = **clojure-version** {:major 1, :minor 5, :incremental 0, :qualifier RC17} = *(contains? foo o)* IllegalArgumentException contains? not supported on type: java.lang.String clojure.lang.RT.contains (RT.java:724) = *(contains? [:a :b :c] :a)* false whoops contains? clojure.core Argument Lists: [coll key] Documentation: Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'. = (contains? '[:a :b :c] 1) true = (contains? '[:a :b :c] 3) false = (contains? '[:a :b :c] 2) true well, I would not have expected that On Thu, Feb 28, 2013 at 11:14 PM, Irakli Gozalishvili rfo...@gmail.comwrote: Hi, Function contains?http://clojuredocs.org/clojure_core/clojure.core/contains_q returns true if key is present in the given collection, although arguably on some data structures one would expect behaviour to be different. In fact it's already different on sets: (contains? #{:a :b :c} :a) ; = true Would that be reasonable to change behaviour for other types too like: (contains? [:a :b :c] :a) ; = false (contains? foo o) ; = false (contains? '(1 2 3) 1) ; = false So they do return `true` instead ? If that will break too much code, maybe some other function can be added instead ? Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.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/groups/opt_out. -- Please correct me if I'm wrong or incomplete, even if you think I'll subconsciously hate it. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: contains? for vectors
On Thu, Feb 28, 2013 at 11:23 PM, AtKaaZ atk...@gmail.com wrote: = *(contains? '(1 2 3) 1)* IllegalArgumentException contains? not supported on type: clojure.lang.PersistentList clojure.lang.RT.contains (RT.java:724) = **clojure-version** {:major 1, :minor 5, :incremental 0, :qualifier RC17} = *(contains? foo o)* IllegalArgumentException contains? not supported on type: java.lang.String clojure.lang.RT.contains (RT.java:724) = *(contains? [:a :b :c] :a)* false whoops contains? clojure.core Argument Lists: [coll key] Documentation: Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'. = (contains? '[:a :b :c] 1) true = (contains? '[:a :b :c] 3) false = (contains? '[:a :b :c] 2) true well, I would not have expected that the code for that is this: clojure.lang.APersistentVector.containsKey(Object) public boolean containsKey(Object key){ if(!(Util.isInteger(key))) return false; int i = ((Number) key).intValue(); return i = 0 i count(); } if you ask me, it should throw rather than return false, that is, if anyone cares about not introducing subtle errors easily On Thu, Feb 28, 2013 at 11:14 PM, Irakli Gozalishvili rfo...@gmail.comwrote: Hi, Function contains?http://clojuredocs.org/clojure_core/clojure.core/contains_q returns true if key is present in the given collection, although arguably on some data structures one would expect behaviour to be different. In fact it's already different on sets: (contains? #{:a :b :c} :a) ; = true Would that be reasonable to change behaviour for other types too like: (contains? [:a :b :c] :a) ; = false (contains? foo o) ; = false (contains? '(1 2 3) 1) ; = false So they do return `true` instead ? If that will break too much code, maybe some other function can be added instead ? Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.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/groups/opt_out. -- Please correct me if I'm wrong or incomplete, even if you think I'll subconsciously hate it. -- Please correct me if I'm wrong or incomplete, even if you think I'll subconsciously hate it. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: contains? for vectors
by errors I mean bugs On Thu, Feb 28, 2013 at 11:43 PM, AtKaaZ atk...@gmail.com wrote: On Thu, Feb 28, 2013 at 11:23 PM, AtKaaZ atk...@gmail.com wrote: = *(contains? '(1 2 3) 1)* IllegalArgumentException contains? not supported on type: clojure.lang.PersistentList clojure.lang.RT.contains (RT.java:724) = **clojure-version** {:major 1, :minor 5, :incremental 0, :qualifier RC17} = *(contains? foo o)* IllegalArgumentException contains? not supported on type: java.lang.String clojure.lang.RT.contains (RT.java:724) = *(contains? [:a :b :c] :a)* false whoops contains? clojure.core Argument Lists: [coll key] Documentation: Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'. = (contains? '[:a :b :c] 1) true = (contains? '[:a :b :c] 3) false = (contains? '[:a :b :c] 2) true well, I would not have expected that the code for that is this: clojure.lang.APersistentVector.containsKey(Object) public boolean containsKey(Object key){ if(!(Util.isInteger(key))) return false; int i = ((Number) key).intValue(); return i = 0 i count(); } if you ask me, it should throw rather than return false, that is, if anyone cares about not introducing subtle errors easily On Thu, Feb 28, 2013 at 11:14 PM, Irakli Gozalishvili rfo...@gmail.comwrote: Hi, Function contains?http://clojuredocs.org/clojure_core/clojure.core/contains_q returns true if key is present in the given collection, although arguably on some data structures one would expect behaviour to be different. In fact it's already different on sets: (contains? #{:a :b :c} :a) ; = true Would that be reasonable to change behaviour for other types too like: (contains? [:a :b :c] :a) ; = false (contains? foo o) ; = false (contains? '(1 2 3) 1) ; = false So they do return `true` instead ? If that will break too much code, maybe some other function can be added instead ? Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.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/groups/opt_out. -- Please correct me if I'm wrong or incomplete, even if you think I'll subconsciously hate it. -- Please correct me if I'm wrong or incomplete, even if you think I'll subconsciously hate it. -- Please correct me if I'm wrong or incomplete, even if you think I'll subconsciously hate it. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: contains? for vectors
This is a sore spot that has been discussed many times on this list[1]. The short version is that many people agree that the name contains? is misleading to newcomers, but according to Rich it's not changing any time soon[2]. What you want for linear searches is 'some (as mentioned in the doc for 'contains?). Also, why are you quoting your vectors (e.g. '[:a :b :c] instead of just [:a :b :c])? [1] Most recently, https://groups.google.com/d/msg/clojure/wNFdG11zMMo/OC9ezSn9nRAJ [2] https://groups.google.com/d/msg/clojure/bSrSb61u-_8/3-wjAkJ4VJgJ -- -- 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: contains? for vectors
On Thu, Feb 28, 2013 at 11:59 PM, Michael Gardner gardne...@gmail.comwrote: This is a sore spot that has been discussed many times on this list[1]. The short version is that many people agree that the name contains? is misleading to newcomers, but according to Rich it's not changing any time soon[2]. What you want for linear searches is 'some (as mentioned in the doc for 'contains?). Also, why are you quoting your vectors (e.g. '[:a :b :c] instead of just [:a :b :c])? I accidentally quoted those in my repl tries and I ended up recalling the last variant (Ctrl+Up in repl) when I tried the 1 3 2 params. [1] Most recently, https://groups.google.com/d/msg/clojure/wNFdG11zMMo/OC9ezSn9nRAJ [2] https://groups.google.com/d/msg/clojure/bSrSb61u-_8/3-wjAkJ4VJgJ Thank you for the links Michael. Ambrose Bonnaire-Sergeant 9/3/12 'contains?' tests if a key is in a collection. Vector is an associative data structure, with keys being indexes. A vector of length 3 has the key 2, but not key 3. According to this, can a vector have keys that are not numbers? like :a , if not, then wouldn't it make more sense that (contains? [:a :b :c] :a) would throw ? It's probably just me. Thanks. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Please correct me if I'm wrong or incomplete, even if you think I'll subconsciously hate it. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Clojure Performance For Expensive Algorithms
I didn't know reduce could be short circuited! I assume from the code below this is done calling the function reduced? Is this in Clojure 1.5 only and is where is this documented? On Wednesday, February 27, 2013 4:59:33 AM UTC-5, Christophe Grand wrote: On Wed, Feb 27, 2013 at 10:21 AM, Marko Topolnik marko.t...@gmail.comjavascript: wrote: (defn blank? [s] (every? #(Character/isWhitespace %) s)) Have you ever wondered about its performance? Here you go: user (time (dotimes [_ 1] (blank? ))) Elapsed time: 3887.578 msecs To give a more complete picture, this version (defn blank? [s] (every? #(Character/isWhitespace ^char %) s)) is only six times slower than the expanded version, and keeping an eye on reflection warnings is not such a drag. So, if it could be demonstrated that in general the properly type-hinted, but otherwise idiomatic Clojure is not more than 10 times slower than idiomatic Java, I'd consider that at least a good starting point. Now that reduce can be short-circuited, redifining every?, some and al on top of it would yield some interesting gains: (defn revery? [pred coll] (reduce (fn [t x] (if (pred x) t (reduced false))) true coll)) (defn rblank? [s] (revery? #(Character/isWhitespace ^char %) s)) (defn blank? [s] (every? #(Character/isWhitespace ^char %) s)) = (dotimes [_ 10] (time (dotimes [_ 10] (blank? Elapsed time: 515.371 msecs Elapsed time: 500.408 msecs Elapsed time: 507.646 msecs Elapsed time: 644.074 msecs Elapsed time: 529.717 msecs Elapsed time: 482.813 msecs Elapsed time: 557.563 msecs Elapsed time: 486.573 msecs Elapsed time: 493.636 msecs Elapsed time: 481.357 msecs nil = (dotimes [_ 10] (time (dotimes [_ 10] (rblank? Elapsed time: 227.692 msecs Elapsed time: 99.937 msecs Elapsed time: 95.922 msecs Elapsed time: 91.193 msecs Elapsed time: 90.794 msecs Elapsed time: 94.765 msecs Elapsed time: 89.842 msecs Elapsed time: 120.551 msecs Elapsed time: 90.843 msecs Elapsed time: 93.523 msecs nil Christophe -- -- 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: contains? for vectors
Thanks Michael, This links are helpful. As far as I can see nothing like contains-val? or seq-contains? has being added though :( I'm trying to use cljs for performance sensitive code and high order functions like `some` don't really do it, while indexOf on strings in JS are well optimised by engines. Maybe something else can be considered like `includes?` to do that instead ? Also Rich says no better name was suggest for includes?, I think `has?` would have being a lot better name. Don't know if it makes sense to reply to that post at this point. Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.com/ On Thursday, 2013-02-28 at 14:59 , Michael Gardner wrote: This is a sore spot that has been discussed many times on this list[1]. The short version is that many people agree that the name contains? is misleading to newcomers, but according to Rich it's not changing any time soon[2]. What you want for linear searches is 'some (as mentioned in the doc for 'contains?). Also, why are you quoting your vectors (e.g. '[:a :b :c] instead of just [:a :b :c])? [1] Most recently, https://groups.google.com/d/msg/clojure/wNFdG11zMMo/OC9ezSn9nRAJ [2] https://groups.google.com/d/msg/clojure/bSrSb61u-_8/3-wjAkJ4VJgJ -- -- 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 (mailto: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 (mailto: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 (mailto:clojure+unsubscr...@googlegroups.com). For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Clojure equivalents of .indexOf .lastIndexOf
Although the cheat sheet is hosted on clojure.org, I'd hesitate a bit in inferring from its contents that .indexOf and .lastIndexOf are officially suggested options. More precise would be to say that when I was updating the cheatsheet a year ago to add many things that weren't already on there, it occurred to me that those would be useful for people to know about, even though they could of course write equivalents for themselves. I'm certainly open to suggestions for those entries on the cheat sheet if there is something better to suggest. (or any of it at all, really) If there already are Clojure core or contrib functions that have the same behavior and performance as .indexOf / .lastIndexOf, I'm all ears. Andy On Feb 28, 2013, at 1:49 PM, Irakli Gozalishvili wrote: Hi, I was looking at http://clojure.org/cheatsheet to find something I could use for getting an index of specific item in the string / vector. It looks like `.indexOf` / `.lastIndexOf` are officially suggested options. I would prefer to avoid backend specific API like these (as I intend to compile to lua) and was wondering if it's reasonable to open issue requesting clojure native equivalents. I'd also be happy to provide patches to do it. Regards -- Irakli Gozalishvili Web: http://www.jeditoolkit.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/groups/opt_out.
ANN: Shoreleave 0.3.0
Shoreleave is a collection of integrated libraries for building ClojureScript applications that focuses on: * Security * Idiomatic interfaces * Common client-side strategies * HTML5 capabilities * ClojureScript's advantages Version 0.3.0 has been released across all modules. There is also an example application and template for building Shoreleave+Compojure apps: https://github.com/shoreleave/shoreleave-baseline For more information on docs and the changes in 0.3.0: https://github.com/ohpauleez/shoreleave#wheres-the-code Thanks for all who reported bugs, gave feedback, and helped push the project forward! Paul -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: ANN: lein-clr 0.2.0 for ClojureCLR
Rainer, I've pushed some updates to nleiningen. Be sure you do a git submodule update first. There is now a Bootstrap project that you can build from VS 2010 - enable Nuget package restore on it first and then try building. There is a private nuget package for Clojure.dll that it pulls. Then you use script\repl.bat to start a repl (you must do this from the root of the nleiningen dir). You should be again to compile nlein.exe using the following commands: user= (use 'nleiningen.core) user= (main compile) Let me know if you get this to work or if you have any problems. Please keep in mind that this is just a proof of concept really - the code is not too well organized yet. -- -- 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.
In order to get java-like performance, one needs to write java-like code first?
I just start learning clojure recently. So I was looking for some performance related post on the internet, and found some optimization tips, fast clojure code and so on. Which lead to the question above. It seems like most of the time we have to write longer, more java-like code (which I found less readable to java equivalence) to catch up java's speed. Is that just the trade-off we need to make in order to type less character? What is the difference in performance between true clojure (without using type hint or other java stuffs) and java? -- -- 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: In order to get java-like performance, one needs to write java-like code first?
Performance at doing what? why? what are your requirements and what is important to you? Your question is simple but can generate extensive debate. Don't expect a yes/no answer. See this extensive discussion and examples: https://groups.google.com/d/topic/clojure/byHO-9t6X4U/discussion it's funny how the phrase java-like performance is now used as a moniker for fast. when Java came out the phrase was c-like performance. when C came out, probably assembler-like ..its even faster if you build it in hardware too... just maybe not flexible in the way you would like. Dave On Friday, 1 March 2013 15:35:16 UTC+11, yizhen wei wrote: I just start learning clojure recently. So I was looking for some performance related post on the internet, and found some optimization tips, fast clojure code and so on. Which lead to the question above. It seems like most of the time we have to write longer, more java-like code (which I found less readable to java equivalence) to catch up java's speed. Is that just the trade-off we need to make in order to type less character? What is the difference in performance between true clojure (without using type hint or other java stuffs) and java? -- -- 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: Interesting Light Table post
The out-of-the-box leiningen support is reason enough to give it a serious try...especially for newcomers to Clojure. On Thursday, February 28, 2013 10:54:56 AM UTC-6, Erlis Vidal wrote: Hey guys, this is in the top of Hacker News right now, it looks very nice: http://www.chris-granger.com/2013/02/27/light-table-030-experience/ I was thinking a lot after reading the thread Why is this so difficult that maybe what we need is a dedicated IDE, something that's built with the clojure workflow in mind, I don't know... maybe this is the missing piece, who knows. I was thinking also on how cool would be to have something like the Smalltalk environment but a la clojure... I'm really excited about this project. Good job Chris! -- -- 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: contains? for vectors
Irakli Gozalishvili rfo...@gmail.com writes: Maybe something else can be considered like `includes?` to do that instead ? Also Rich says no better name was suggest for includes?, I think `has?` would have being a lot better name. Don't know if it makes sense to reply to that post at this point. I think member? is a rather good name: (defn member? Returns true iff `e` is a member of `coll`. [e ^java.util.Collection coll] (if (seq coll) (.contains coll e) false)) 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/groups/opt_out.