Re: Clojure 1.5.0 bug (Java interop: Compiler.load(new StringReader(str));)

2013-03-13 Thread Andy Fingerhut
OK, I don't know whether this is really a bug or just an obsolete message being printed on the console, but I've reopened the ticket and added a pointer to this discussion, and a link to exactly which commit it was that caused this change in behavior (just before Clojure 1.5.0-RC4). Andy On

Re: What's the point of - ?

2013-03-13 Thread Marko Topolnik
On Tuesday, March 12, 2013 6:20:56 PM UTC+1, Sean Corfield wrote: (as- response x (:body x) (:postalCodes x) (map to-location x) (sort-by :city x)) I like the new threading operators and I'm looking forward to using them but I'm not sure this is better since you need some neutral

Re: What's the point of - ?

2013-03-13 Thread Jason Wolfe
That's what - is for :) https://github.com/Prismatic/plumbing/blob/master/src/plumbing/core.clj#L234 On Tuesday, March 12, 2013 4:37:58 AM UTC-7, Marko Topolnik wrote: On Tuesday, March 12, 2013 10:54:35 AM UTC+1, Laurent PETIT wrote: or perhaps (- response :body :postalCodes (- (map

Re: What causes the text that I print to the terminal to become mangled garbage?

2013-03-13 Thread Marko Topolnik
There *is* mutual exclusion on all Java output streams (as well as input streams) so at least individual prints should be atomic. Not that it will solve this, but still, this kind of granularity of interleaving is unusual. I have never seen it. On Wednesday, March 13, 2013 4:27:00 AM UTC+1,

Re: What's the point of - ?

2013-03-13 Thread Meikel Brandmeyer (kotarak)
Hi, Am Dienstag, 12. März 2013 18:21:22 UTC+1 schrieb sw1nn: I find the need to switch between - and - in a pipeline disturbs the clarity of my code. In my experience having problems with switching between - and - is closely related to unknowingly cross borders between collections land

Re: What's the point of - ?

2013-03-13 Thread Marko Topolnik
On Wednesday, March 13, 2013 9:11:44 AM UTC+1, Meikel Brandmeyer (kotarak) wrote: Am Dienstag, 12. März 2013 18:21:22 UTC+1 schrieb sw1nn: I find the need to switch between - and - in a pipeline disturbs the clarity of my code. In my experience having problems with switching between -

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread shlomivaknin
Hey Sean, Your attempt worked because in Netty 4.0.0.Alpha8 AbstractBootstraphttps://github.com/netty/netty/commit/23438de66f82c72720b092c539bb430995722d2d#transport/src/main/java/io/netty/bootstrap/AbstractBootstrap.java was still public.. Try it out with 4.0.0.Beta2.. Thanks! On

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread Marko Topolnik
When you annotate, is it a runtime or a compile-time error? I would be very surprised if it happened at runtime (when the function is actuall called). On Wednesday, March 13, 2013 1:26:00 AM UTC+1, Shlomi Vaknin wrote: hey, I have a similar problem, even when i type annotate with clojure 1.5

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread shlomivaknin
yes you are right, it is a compile-time error.. On Wednesday, March 13, 2013 11:19:25 AM UTC+2, Marko Topolnik wrote: When you annotate, is it a runtime or a compile-time error? I would be very surprised if it happened at runtime (when the function is actuall called). On Wednesday, March

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread shlomivaknin
here is the full exception when compiling: Exception in thread main java.lang.IllegalArgumentException: Can't call public method of non-public class: public io.netty.bootstrap.AbstractBootstrap io.netty.bootstrap.AbstractBootstrap.channel(java.lang.Class), compiling:(netty.clj:31:1) at

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread Marko Topolnik
It is almost certain that the method you want to call is inherited from a public ancestor. Annotate the call with that ancestor and it will work. On Wednesday, March 13, 2013 10:23:31 AM UTC+1, shlomi...@gmail.com wrote: here is the full exception when compiling: Exception in thread main

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread shlomivaknin
hey we dont need to be almost certain, we can just look at the code : https://github.com/netty/netty/blob/master/transport/src/main/java/io/netty/bootstrap/AbstractBootstrap.java and see that it is not a public ancestor. more then that, i annotated the code and it didnt work. here is a repl

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread Marko Topolnik
It does have a public descendant, though. It is not acceptable for you to annotate with ServerBootstrap? It really is bad practice to annotate with non-public classes. On Wednesday, March 13, 2013 10:43:35 AM UTC+1, shlomi...@gmail.com wrote: hey we dont need to be almost certain, we can

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread shlomivaknin
I fully agree with you, only it doesnt work.. ServerBootstrap does not override that specific method, which is what causing this pain, so i dont know what other options i have. here is my attempt: user (.channel ^ServerBootstrap b ^Class io.netty.channel.socket.nio.NioServerSocketChannel)

Re: Java interop with dynamic proxies

2013-03-13 Thread Thomas
@Brian I want to translate the snippet above to Clojure. @Jonathan That is more or less what I tried, but I get this error: (.setName fred fred) UnsupportedOperationException setName x.x.proxy$java.lang.Object$Fred$8b90692b.setName (:-1) from Java it all works (albeit kinda mysteriously

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread Marko Topolnik
I see, that's very unfortunate then. It fails even when it is not actually making the reflective call. Your last recourse is writing your own code against the Java Reflection API, using *setAccesible(true)* if necessary. On Wednesday, March 13, 2013 11:03:50 AM UTC+1, shlomi...@gmail.com wrote:

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread shlomivaknin
hmmm, that what i was afraid of :) ill take my chances harassing the netty people now before i go down that path.. On Wednesday, March 13, 2013 12:09:44 PM UTC+2, Marko Topolnik wrote: I see, that's very unfortunate then. It fails even when it is not actually making the reflective call. Your

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread Marko Topolnik
The netty people are not to blame; harass Rich instead :) On Wednesday, March 13, 2013 11:11:46 AM UTC+1, shlomi...@gmail.com wrote: hmmm, that what i was afraid of :) ill take my chances harassing the netty people now before i go down that path.. On Wednesday, March 13, 2013 12:09:44 PM

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread shlomivaknin
That is very true. is here the right place? is there a a different group/forum for the language developers? should i file a bug on github? On Wednesday, March 13, 2013 12:17:45 PM UTC+2, Marko Topolnik wrote: The netty people are not to blame; harass Rich instead :) On Wednesday, March 13,

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread Marko Topolnik
You should first make a minimal example that reproduces this. I've just failed to do so with the following: abstract class AbstractParent { public void x() { System.out.println(x); } } public class ConcreteChild extends AbstractParent { } user (set! *warn-on-reflection* true) true user (.x

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread Marko Topolnik
I did it: the method must be final. Apparently without that the child is compiled with an overriding method that I didn't even define! On Wednesday, March 13, 2013 11:27:55 AM UTC+1, Marko Topolnik wrote: You should first make a minimal example that reproduces this. I've just failed to do so

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread Marko Topolnik
Detailed finding: it *doesn't* fail at compile time; it always fails at runtime. Reason: at compile time there is a *reflection warning*, which means that the method wasn't found and a reflective call was emited by the compiler. On Wednesday, March 13, 2013 11:31:08 AM UTC+1, Marko Topolnik

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread Marko Topolnik
You didn't recompile everything, that's the reason. I got the same error the first time, that's how I realized that the child had overridden the method. This is an interesting finding in itself: javac provides the override precisely to avoid pitfalls such as this one. If the parent was public,

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread shlomivaknin
very interesting.. are you getting the same error as i originally got? On Wednesday, March 13, 2013 12:38:26 PM UTC+2, Marko Topolnik wrote: Detailed finding: it *doesn't* fail at compile time; it always fails at runtime. Reason: at compile time there is a *reflection warning*, which means

Re: Java interop with dynamic proxies

2013-03-13 Thread Gary Verhaegen
It would help if you could give an executable representative case (if the library you are trying to use is not freely available, maybe try to find an open source library that has a similar interface ? I am by no means a Java wizard, but it seems pretty idiomatic). On 13 March 2013 11:06, Thomas

Re: Clojure HTML5 Game Development

2013-03-13 Thread Mikera
On Wednesday, 13 March 2013 04:34:21 UTC+8, Reginald Choudari wrote: Any resources/people dedicated to game development using Clojure/Clojurescript? I have made a couple games using HTML5/Javascript with the canvas element, and seeing that Clojurescript can replace Javascript coupled with

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread Marko Topolnik
Yes, the error is there. I also created a *lein new app* project, which by default creates a gen-classed main namespace: (ns call-test.core (:gen-class)) (set! *warn-on-reflection* true) (defn -main [ args] (.x (test.ConcreteChild.))) Now try *lein do clean, uberjar. *It will report a

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread shlomivaknin
right, i managed to reproduce it here, thanks! so i am opening a bug and linking back here On Wednesday, March 13, 2013 12:48:43 PM UTC+2, Marko Topolnik wrote: Yes, the error is there. I also created a *lein new app* project, which by default creates a gen-classed main namespace: (ns

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread shlomivaknin
here is the bug report: http://dev.clojure.org/jira/browse/CLJ-1183 Thanks! On Wednesday, March 13, 2013 1:02:25 PM UTC+2, shlomi...@gmail.com wrote: right, i managed to reproduce it here, thanks! so i am opening a bug and linking back here On Wednesday, March 13, 2013 12:48:43 PM UTC+2,

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread Marko Topolnik
Hm. You shouldn't have made ConcreteChild a nested class, that is a distraction that may set people on a wrong trail. In Java you are allowed to have as many package-private classes as you wish; the constraint is only on one *public* class. If you had ConcreteChild.java with this in it:

Re: Java interop: Can't call public method of non-public class

2013-03-13 Thread shlomivaknin
oh, right. thats a good point. ill re-post that correction on the bug report.. thanks for the review! On Wednesday, March 13, 2013 1:42:51 PM UTC+2, Marko Topolnik wrote: Hm. You shouldn't have made ConcreteChild a nested class, that is a distraction that may set people on a wrong trail. In

clojurescript browser repl not working.

2013-03-13 Thread Rohan Nicholls
Hey all, I have been experimenting with clojurescript and following the modern tutorial. However I am now stuck while trying to get the browser repl (brepl) working. I looked on the clojurescript jira tracker and there was no mention of this problem. There was no way to add an issue, so I

Re: Clojure HTML5 Game Development

2013-03-13 Thread Laurent PETIT
2013/3/13 Mikera mike.r.anderson...@gmail.com On Wednesday, 13 March 2013 04:34:21 UTC+8, Reginald Choudari wrote: Any resources/people dedicated to game development using Clojure/Clojurescript? I have made a couple games using HTML5/Javascript with the canvas element, and seeing that

Re: Java interop with dynamic proxies

2013-03-13 Thread Thomas
Not sure what I did previously different, but now it seems to work for me with the code snippet similar as the one above (And which I am sure I tried before as well). Thank you all for your help, Thomas -- -- You received this message because you are subscribed to the Google Groups Clojure

Re: fold over a sequence

2013-03-13 Thread Paul Butcher
Thanks Stuart - my Contributor Agreement is on its way. In the meantime, I've published foldable-seq as a library: https://clojars.org/foldable-seq I'd be very interested in any feedback on the code or how it works. -- paul.butcher-msgCount++ Snetterton, Castle Combe, Cadwell Park... Who

Re: fold over a sequence

2013-03-13 Thread Jim foo.bar
how come your project depends on the problematic version 1.5.0? Jim On 13/03/13 14:03, Paul Butcher wrote: Thanks Stuart - my Contributor Agreement is on its way. In the meantime, I've published foldable-seq as a library: https://clojars.org/foldable-seq I'd be very interested in any

Re: fold over a sequence

2013-03-13 Thread Paul Butcher
On 13 Mar 2013, at 14:05, Jim foo.bar jimpil1...@gmail.com wrote: how come your project depends on the problematic version 1.5.0? 1.5.0 is problematic? -- paul.butcher-msgCount++ Snetterton, Castle Combe, Cadwell Park... Who says I have a one track mind? http://www.paulbutcher.com/ LinkedIn:

Re: fold over a sequence

2013-03-13 Thread Jim foo.bar
there was a memory leak hence the 1.5.1 release the next day... Jim On 13/03/13 14:12, Paul Butcher wrote: On 13 Mar 2013, at 14:05, Jim foo.bar jimpil1...@gmail.com mailto:jimpil1...@gmail.com wrote: how come your project depends on the problematic version 1.5.0? 1.5.0 is problematic?

Re: fold over a sequence

2013-03-13 Thread Paul Butcher
Ah - sorry, missed that. I've just released version 0.2, which depends on 1.5.1. -- paul.butcher-msgCount++ Snetterton, Castle Combe, Cadwell Park... Who says I have a one track mind? http://www.paulbutcher.com/ LinkedIn: http://www.linkedin.com/in/paulbutcher MSN: p...@paulbutcher.com AIM:

Re: What causes the text that I print to the terminal to become mangled garbage?

2013-03-13 Thread larry google groups
Thanks all. I don't think this can be just a concurrency issue or I would also see it when I'm not using Timbre. If I call pprint from multiple threads I don't get this kind of interleaving of individual characters. Nor do I normally get this interleaving when just using Timbre. But somehow

Re: What causes the text that I print to the terminal to become mangled garbage?

2013-03-13 Thread larry google groups
tl;dr concurrency is hard Jason, if it was just a concurrency issue, it would happen when I use pprint. But the above mess only seems to happen with a very specific combination of Timbre and thread measuring functions. On Wednesday, March 13, 2013 12:16:46 AM UTC-4, Jason Lewis wrote:

Re: What's the point of - ?

2013-03-13 Thread larry google groups
I suspect that early on, still being a Clojure noobie, I'll stick with the 'proper' Lisp forms and no doubt as I become more experienced I'll pick more of the arcane Clojure idioms ;) I agree. I have been working with Clojure for almost 8 months now. I am sort of in between new and medium

Re: What causes the text that I print to the terminal to become mangled garbage?

2013-03-13 Thread David Powell
pprint uses refs internally rather than vars. I was always a bit suspicious about that... Perhaps transaction retries are happening? On Wed, Mar 13, 2013 at 3:19 PM, larry google groups lawrencecloj...@gmail.com wrote: tl;dr concurrency is hard Jason, if it was just a concurrency issue,

ANN: core.logic 0.8.0-rc3

2013-03-13 Thread David Nolen
This is probably the last version before I cut 0.8.0. If you're using core.logic please try this out. There are a couple of bugs that need squashing in JIRA but it's been nearly 8 months since the last release so I'd like to push this out now and address any issues with more incremental updates.

Re: [ANN] jvm.tools.analyzer / clr.tools.analyzer

2013-03-13 Thread Rich Morin
On Mar 13, 2013, at 09:21, Ambrose Bonnaire-Sergeant wrote: I have two recently created contrib projects to help use analysis results for Clojure and ClojureCLR. Have you considered whether an how this information could be used as part of Codeq's analysis phase? For example, how hard would it

Re: [ANN] jvm.tools.analyzer / clr.tools.analyzer

2013-03-13 Thread Ambrose Bonnaire-Sergeant
How useful is a fully macroexpanded AST to Codeq? There are line numbers associated with the AST nodes, and column numbers if you're using Clojure 1.5.0+. Ambrose On Thu, Mar 14, 2013 at 12:48 AM, Rich Morin r...@cfcl.com wrote: On Mar 13, 2013, at 09:21, Ambrose Bonnaire-Sergeant wrote: I

Is it possible to set breakpoint using nrepl-ritz?

2013-03-13 Thread xumingming64398966
Is it possible to set breakpoint using nrepl-ritz? -- -- 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

回复:Is it possible to set breakpoint using nrepl-ritz?

2013-03-13 Thread xumingming64398966
I mean ritz-nrepl:https://github.com/pallet/ritz/tree/develop/nrepl原始邮件发件人:xumingming64398966xumingming64398...@gmail.com收件人:clojureclojure@googlegroups.com发送时间:2013年3月14日(周四) 01:00主题:Is it possible to set breakpoint using nrepl-ritz?Is it

Re: [ANN] jvm.tools.analyzer / clr.tools.analyzer

2013-03-13 Thread Rich Morin
On Mar 13, 2013, at 09:52, Ambrose Bonnaire-Sergeant wrote: How useful is a fully macroexpanded AST to Codeq? Let's decomplect this question a bit, eg: * How useful is an AST to Codeq? Rich Hickey's Clojure analyzer only harvests def* and ns forms. So, for example, it says nothing about

Re: Is it possible to set breakpoint using nrepl-ritz?

2013-03-13 Thread Hugo Duncan
xumingming64398966xumingming64398...@gmail.com writes: Is it possible to set breakpoint using nrepl-ritz? It is using the latest development code (C-c C-x C-b on the line to break at). A release should be out containing this in the next few days. Hugo -- -- You received this message

Re: ClojureCLR - Question about the Debug 3.5 build configuration and System.Reflection.Assembly.IsDynamic property

2013-03-13 Thread dmiller
Oops. Forgot to do a test build on 3.5 for that one. I need to conditionalize that call. I'll try to commit a patch for that tonight. -David On Tuesday, March 12, 2013 11:43:58 PM UTC-5, FC wrote: Hi, I'm trying to build ClojureCLR from the latest clojure-clr-master.ZIP file I

set!

2013-03-13 Thread Mark Engelberg
In Clojure, there are a handful of global variables that you can set!, for example (set! *warn-on-reflection* true) Is there any mechanism for providing a similar feature in a user library? -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post

ANN Clojure documentation progress report for March 13th, 2013

2013-03-13 Thread Michael Klishin
The Clojure Documentation Site [1] (a.k.a. CDS) publishes periodic reports to give the Clojure community a better idea of what it has to offer. Our progress report for March 13th, 2013: http://blog.clojurewerkz.org/blog/2013/03/13/clojure-documentation-project-progress-report-march-13th/ 1.

Re: [ANN] jvm.tools.analyzer / clr.tools.analyzer

2013-03-13 Thread kovas boguta
On Wed, Mar 13, 2013 at 9:52 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: How useful is a fully macroexpanded AST to Codeq? There are line numbers associated with the AST nodes, and column numbers if you're using Clojure 1.5.0+. I am strongly of the opinion that

Re: What's the point of - ?

2013-03-13 Thread Denis Labaye
I find the threading macros expressions much easier to *write* and *edit* than their nested expression counterparts. And it comes very handy when working at the REPL, to incrementally build an expression. It's easier to toggle on / off some parts of the pipeline than it is for a nested

Re: [ANN] jvm.tools.analyzer / clr.tools.analyzer

2013-03-13 Thread Rich Morin
On Mar 13, 2013, at 13:05, kovas boguta wrote: On Wed, Mar 13, 2013 at 9:52 AM, Ambrose Bonnaire-Sergeant wrote: How useful is a fully macroexpanded AST to Codeq? ... I am strongly of the opinion that macroexpansion should not be part of a codeq's core definition. ... I agree, for your

Re: set!

2013-03-13 Thread Mark Engelberg
OK, thanks. The apparent globalness is not the piece I want to imitate. I want to make a var available for users to set!, where the var controls overall behavior of how the library operates. I understand that I can just declare the var dynamic, and then they can control it with the binding

miniKanren / core.logic Google Group

2013-03-13 Thread David Nolen
William Byrd has started a new miniKanren / core.logic Google Group. Feel free to direct your relational and constraint logic programming queries there. It's fine to post on the Clojure lists of course especially if the inquiry / discussion is Clojure-centric, but I'm excited about the

Re: set!

2013-03-13 Thread Marko Topolnik
On Wednesday, March 13, 2013 9:35:42 PM UTC+1, puzzler wrote: OK, thanks. The apparent globalness is not the piece I want to imitate. I want to make a var available for users to set!, where the var controls overall behavior of how the library operates. I understand that I can just

Re: [ANN] jvm.tools.analyzer / clr.tools.analyzer

2013-03-13 Thread kovas boguta
On Wed, Mar 13, 2013 at 1:27 PM, Rich Morin r...@cfcl.com wrote: I agree, for your reasons and others. For example, I don't think a codeq should say much about _any_ symbol the code references. However, that seems to create a disconnect. If codeq is tracking raw code, and the AST reflects

Re: set!

2013-03-13 Thread Cedric Greevey
To expand on what Marko said, the set!able Vars that come with Clojure just have thread-local bindings created already in the REPL thread. They're really only meant to aid developers working at the REPL, rather than to be set! as part of normal running code. On Wed, Mar 13, 2013 at 5:06 PM,

skip null

2013-03-13 Thread Brian Craft
Is there a common idiom for skipping blank or null values, as you might do in javascript like var foo = a || b || c; -- -- 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

Re: skip null

2013-03-13 Thread Marko Topolnik
There are several, depending on what exactly you want to skip. Your example would just be (let [foo (or a b c)] ...) There are also some- and cond-, which you may find useful in other contexts. On Wednesday, March 13, 2013 10:31:33 PM UTC+1, Brian Craft wrote: Is there a common idiom for

Re: set!

2013-03-13 Thread Michael Klishin
2013/3/14 Mark Engelberg mark.engelb...@gmail.com I believe one can mimic the functionality with alter-var-root! (I haven't tried it though), but I'd rather imitate core's style of using set! for those sorts of overall controlling variables. alter-var-root works fine for that purpose, e.g.

Re: set!

2013-03-13 Thread Mark Engelberg
On Wed, Mar 13, 2013 at 2:09 PM, Cedric Greevey cgree...@gmail.com wrote: To expand on what Marko said, the set!able Vars that come with Clojure just have thread-local bindings created already in the REPL thread. They're really only meant to aid developers working at the REPL, rather than to

Re: [ANN] jvm.tools.analyzer / clr.tools.analyzer

2013-03-13 Thread Rich Morin
On Mar 13, 2013, at 14:08, kovas boguta wrote: On Wed, Mar 13, 2013 at 1:27 PM, Rich Morin r...@cfcl.com wrote: I agree, for your reasons and others. For example, I don't think a codeq should say much about _any_ symbol the code references. However, that seems to create a disconnect. If

Re: set!

2013-03-13 Thread Mark Engelberg
On Wed, Mar 13, 2013 at 2:06 PM, Marko Topolnik marko.topol...@gmail.comwrote: As far as I understand it, *set!* modifies the *thread-local* binding, just like the *binding* macro, but doesn't delimit a definite scope of validity for the binding. You can *set!* any dynamic var with the same

Re: set!

2013-03-13 Thread Mark Engelberg
On Wed, Mar 13, 2013 at 2:36 PM, Michael Klishin michael.s.klis...@gmail.com wrote: alter-var-root works fine for that purpose, e.g. https://github.com/michaelklishin/monger/blob/master/src/clojure/monger/core.clj#L168-171 Thanks. That's probably what I'll end up doing. Still, it would be

Re: set!

2013-03-13 Thread Cedric Greevey
Again, those are already given bindings. Think of it as if somewhere there's (binding [*unchecked-math* false] (loop [] (do-repl-stuff!) (recur))). As for intended for uses other than working at the REPL, they still tend to be compile/macroexpansion-time uses, and presumably dynamic bindings

Re: skip null

2013-03-13 Thread Brian Craft
Thanks! On Wednesday, March 13, 2013 2:34:25 PM UTC-7, Michael Klishin wrote: 2013/3/14 Brian Craft craft...@gmail.com javascript: Is there a common idiom for skipping blank or null values, as you might do in javascript like var foo = a || b || c; (or a b c) false and nil evaluate to

Re: set!

2013-03-13 Thread Marko Topolnik
Yes, I'd say there is no low-level magic about those vars except that they are well-supported in all the relevant contexts. However, the fact that they need such special support does make it hard to use one's own vars in the same way. On Wednesday, March 13, 2013 10:52:15 PM UTC+1, Cedric

Re: problem with dependencies

2013-03-13 Thread BJG145
If you look for mortbay on this page there seems to be some discussion on it which may possibly shed some light on the problem...? http://clojure-log.n01se.net/date/2012-06-12.html -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: What's the point of - ?

2013-03-13 Thread Sean Corfield
On Wed, Mar 13, 2013 at 1:11 AM, Meikel Brandmeyer (kotarak) m...@kotka.de wrote: In my experience having problems with switching between - and - is closely related to unknowingly cross borders between collections land and sequence land. If you run into this quite often you might want to

Re: What's the point of - ?

2013-03-13 Thread Laurent PETIT
2013/3/13 Sean Corfield seancorfi...@gmail.com: On Wed, Mar 13, 2013 at 1:11 AM, Meikel Brandmeyer (kotarak) m...@kotka.de wrote: In my experience having problems with switching between - and - is closely related to unknowingly cross borders between collections land and sequence land. If you

Re: skip null

2013-03-13 Thread Herwig Hochleitner
if-let and when-let also come in handy in a lot of those cases. If the nils already are in a data structure, there are (filter identity ..)and (remove nil? ..) to remove false and/or nil values from sequences. On associatives, there is an :or key available in the destructuring dsl: (let [{x :foo

Re: set!

2013-03-13 Thread Alan Malloy
On Wednesday, March 13, 2013 2:46:06 PM UTC-7, puzzler wrote: On Wed, Mar 13, 2013 at 2:06 PM, Marko Topolnik marko.t...@gmail.comjavascript: wrote: As far as I understand it, *set!* modifies the *thread-local* binding, just like the *binding* macro, but doesn't delimit a definite scope

Re: set!

2013-03-13 Thread Herwig Hochleitner
2013/3/13 Mark Engelberg mark.engelb...@gmail.com Still, it would be nice to understand whether it's possible to achieve the same effect as Clojure core's settable vars. It is, because clojure doesn't do anything magic here (apart from the effects its set!-able vars have ;-). The catch is:

Re: set!

2013-03-13 Thread Stephen Gilardi
The repl's thread binding for those vars is set here: https://github.com/clojure/clojure/blob/master/src/clj/clojure/main.clj#L267 using this macro: https://github.com/clojure/clojure/blob/master/src/clj/clojure/main.clj#L85 Users of your library would need to do something similar,

Re: set!

2013-03-13 Thread Mark Engelberg
OK, that answers my question. Thanks for the insights everyone! -- -- 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

Re: What's the point of - ?

2013-03-13 Thread Mike Norman
This is absolutely the wrong understanding of the benefits of Clojure's syntax. Its main benefit is not minimalism. Its main benefit is simplicity, which is less akin to ordinality than it is to orthogonality. In this case, there is a tool that just does chaining, which allows you to compose

[ANN] shopify-clj

2013-03-13 Thread James MacAulay
I work at Shopify http://www.shopify.com/ and this has been my weekend project for a little while now: https://github.com/jamesmacaulay/shopify-clj It's a library for interacting with shops through our API. It includes a Friend workflow and an API wrapper based on clj-http with a custom

Re: ClojureCLR - Question about the Debug 3.5 build configuration and System.Reflection.Assembly.IsDynamic property

2013-03-13 Thread dmiller
Fixed in master. On Tuesday, March 12, 2013 11:43:58 PM UTC-5, FC wrote: Hi, I'm trying to build ClojureCLR from the latest clojure-clr-master.ZIP file I downloaded from GitHub. With Debug 3.5 as the build configuration I get a compilation error in Clojure\lib\RT.cs that

Trying to understand Java better to understand Clojure better

2013-03-13 Thread Daniel Higginbotham
I've been feeling like my lack of Java knowledge has been holding me back with Clojure, so I've started to learn it and have written an article on how you compile and run a Java program: http://www.flyingmachinestudios.com/programming/how-clojure-babies-are-made-the-java-cycle/ . Is the

Re: Trying to understand Java better to understand Clojure better

2013-03-13 Thread Jason Lewis
I actually really enjoyed the article... it wasn't much new for me in terms of Java, but I think one of the places we're lacking in documentation is help for Java n00bs trying to get a handle on JVM programming, especially since the idiomatic way of accessing Java from Clojure is directly.