Re: Little namespace question

2012-12-18 Thread Alan Shaw
BG, The macro doesn't seem to do the trick. The function X is interned in the target namespace, but: user=> (def image (eval-in "(X 400 400)" "clevolution.version.version0-1-1")) CompilerException java.lang.RuntimeException: Unable to resolve symbol: X in this context, compiling:(NO_SOURCE_PATH:1)

Re: Little namespace question

2012-12-18 Thread Baishampayan Ghose
Do you have target ns "clevolution.version.version0-1-1" required? -BG On Tue, Dec 18, 2012 at 1:38 PM, Alan Shaw wrote: > BG, > The macro doesn't seem to do the trick. The function X is interned in the > target namespace, but: > > user=> (def image (eval-in "(X 400 400)" > "clevolution.version.

Re: Little namespace question

2012-12-18 Thread Alan Shaw
Now I do, and the macro worked! I believe I have a problem using the macro from a function, but leaving that for tomorrow. Thanks BG! -A On Tue, Dec 18, 2012 at 12:19 AM, Baishampayan Ghose wrote: > Do you have target ns "clevolution.version.version0-1-1" required? > > -BG > > On Tue, Dec 18,

Re: Clojure Full Syntactical Reference

2012-12-18 Thread Niels van Klaveren
It's a feature of the REPLy NREPL client. See https://github.com/trptcolin/reply/blob/master/src/clj/reply/initialization.clj how it works so you can emulate it. On Tuesday, December 18, 2012 5:10:00 AM UTC+1, Karim A. Nassar wrote: > > When using nrepl in emacs (cdoc ) emits: > > CompilerExcep

Re: Clojure Full Syntactical Reference

2012-12-18 Thread Niels van Klaveren
I wonder if this couldn't have been better implemented as nrepl middleware. On Tuesday, December 18, 2012 10:34:01 AM UTC+1, Niels van Klaveren wrote: > > It's a feature of the REPLy NREPL client. See > https://github.com/trptcolin/reply/blob/master/src/clj/reply/initialization.cljhow > it works

Question about re-find

2012-12-18 Thread vernam
Hi, I've tinkered with clojures regexes and found a behavior I do not understand. (def regex "a(.*?)b(.*?)c(.*?)") ;; The RE string, a little strange but valid (def input "abbbcc") ;; The input, should match completely (import '[java.util.regex Pa

Re: Question about re-find

2012-12-18 Thread Andy Fingerhut
Try these at the REPL: (source re-find) (source re-matches) re-matches is closer to what you did in Java than re-find, which does something different (find the first match in the string, as opposed to determining whether the entire string matches the regex). Andy On Dec 18, 2012, at 1:32 AM,

Re: How to structure a Clojure day for noobs?

2012-12-18 Thread ulsa
Good point. I really would like themselves to be able to set up their own environment. I think it gives them a sense of control. However, as a fallback, it would be great with a virtual machine with everything working. I'll consider that. I believe you can get a similar level of interactivity

Re: Belgian Clojure base meetup?

2012-12-18 Thread Pierre R
Liege would be not too far -- 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

Re: [ANN] tools.namespace 0.2.2 and Flow 0.1.0

2012-12-18 Thread Anthony Grimes
http://dev.clojure.org/jira/browse/TNS-1 is the reason why I did bultitude. It was an important bug that was never addressed, and probably still hasn't been addressed. Other people have also added relatively complex classpath features to it as well, and since it isn't a contrib project you can

Re: [ANN] tools.namespace 0.2.2 and Flow 0.1.0

2012-12-18 Thread Anthony Grimes
Actually, scratch that first one. Looks like Stuart did finally apply the patch. Other reasons for bultitude's existence still apply. On Tuesday, December 18, 2012 6:06:40 AM UTC-6, Anthony Grimes wrote: > > http://dev.clojure.org/jira/browse/TNS-1 is the reason why I did > bultitude. It was an

Re: Belgian Clojure base meetup?

2012-12-18 Thread Frederik De Bleser
I'd love to see a Belgian Clojure meetup! I'm from Antwerp. Kind regards, Frederik -- 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

gen-interface and deftype with types, compilation problem

2012-12-18 Thread Vladimir Matveev
Hello, Consider the following code (gen-interface :name IntStack :methods [[stackPeek [] int] [stackPush [int] void] [stackPop [] int] [stackDepth [] int]]) (deftype IntStackImpl [^{:tag ints :unsynchronized-mutable true} data ^{:tag int :unsynchroniz

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread David Nolen
I don't think you can type hint a field as a primitive array. On Tuesday, December 18, 2012, Vladimir Matveev wrote: > Hello, > > Consider the following code > > (gen-interface > :name IntStack > :methods [[stackPeek [] int] > [stackPush [int] void] > [stackPop [] int]

core.logic - explaining transitive relationships

2012-12-18 Thread Stathis Sideris
Hello, With the code below you can query transitive relationships between entities successfully. Is there any way to use core.logic "explain" the relationship? Specifically, is there any way to write a function explain so that: > (explain :pitbull :chordate) will give you: [:pitbull :dog] [:

Re: Belgian Clojure base meetup?

2012-12-18 Thread François
Hello, I'm from Namur. Such a meeting would be fantastic. Belgium is not very large. I can of course get around. François Le lundi 17 décembre 2012 19:09:56 UTC+1, Sébastien Wagener a écrit : > > Hi Thomas, > > I'm from Luxembourg. If the meetup isn't too far away from the border, I > would b

Re: core.logic - explaining transitive relationships

2012-12-18 Thread Tassilo Horn
Stathis Sideris writes: Hi Stathis, > With the code below you can query transitive relationships between > entities successfully. Is there any way to use core.logic "explain" > the relationship? Specifically, is there any way to write a function > explain so that: > >> (explain :pitbull :chordat

Re: core.logic - explaining transitive relationships

2012-12-18 Thread Stathis Sideris
Hello David, Yes, I wasn't expecting for this to be built-in. Your example is exactly what I was looking for, thanks a lot! I'll to need to spend some time to figure it out :-) Stathis On Tuesday, 18 December 2012 15:52:47 UTC, David Nolen wrote: > > There is no general "explain" functionalit

Re: core.logic - explaining transitive relationships

2012-12-18 Thread Stathis Sideris
Thanks for this. I didn't think about that! On Tuesday, 18 December 2012 15:51:55 UTC, Tassilo Horn wrote: > > Stathis Sideris > writes: > > Hi Stathis, > > > With the code below you can query transitive relationships between > > entities successfully. Is there any way to use core.logic "explai

Re: core.logic - explaining transitive relationships

2012-12-18 Thread David Nolen
;; there is a transitive relationship between x & z if there is a ;; relationship between x & some y and some y & z (defn transitive [r] (fn t ;; if passed only two args create the path logic var ([x z] (t x z (lvar))) ;; take an x, z, and a path from x to z ([x z path] (fr

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread Vladimir Matveev
Well, it is news for me since it is not documented anywhere. Why is this so? BTW, typehinting value in '(let [value (aget data depth)]' binding gives an error "Can't type hint a local with a primitive initializer" so I think since this value considered primitive then I actually can hint the fie

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread Vladimir Matveev
Just tested it, swapping body of stackPop with (aget data depth) has the same effect as swapping it with zero, i.e. it fixes the error, unfortunately, not in the correct way. вторник, 18 декабря 2012 г., 22:46:53 UTC+4 пользователь Vladimir Matveev написал: > > Well, it is news for me since it

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread Jim - FooBar();
On 18/12/12 18:46, Vladimir Matveev wrote: Well, it is news for me since it is not documented anywhere. Why is this so? it is at least mentioned here in an example...look at line 6 http://clojuredocs.org/clojure_core/clojure.core/definterface Jim -- You received this message because you ar

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread David Nolen
Oops, looking over gvec.clj it looks like I'm wrong about type-hinting fields. However you may need to type-hint the primitive array with a string instead of the symbol shorthand allowed by Clojure. Try the following: ^{:tag "[I" :unsynchronized-mutable true} David On Tue, Dec 18, 2012 at 1:46

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread Vladimir Matveev
It is definterface example, I have arrays only in deftype. вторник, 18 декабря 2012 г., 23:16:09 UTC+4 пользователь Jim foo.bar написал: > > On 18/12/12 18:46, Vladimir Matveev wrote: > > Well, it is news for me since it is not documented anywhere. Why is this > so? > > > it is at least ment

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread Vladimir Matveev
Thanks, but it seems that I have found the source of problem, though I do not know why compiler message is so uninformative and misleading. The following code does not work (fails with CompilerException java.lang.VerifyError: (class: test/Test2Impl, method: fail signature: ()V) Expecting to fin

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread David Nolen
Ah right, sorry to mislead. On Tue, Dec 18, 2012 at 2:26 PM, Vladimir Matveev wrote: > Thanks, but it seems that I have found the source of problem, though I do > not know why compiler message is so uninformative and misleading. > > The following code does not work (fails with CompilerException

Re: gen-interface and deftype with types, compilation problem

2012-12-18 Thread Vladimir Matveev
No, you shouldn't worry about that) In fact it was useful to me to learn that Clojure does not support array type hints everywhere. It may be possible that I will have to change some of my code because of this. вторник, 18 декабря 2012 г., 23:30:39 UTC+4 пользователь David Nolen написал: > > Ah

[ANN] lein-stencil 0.1.0

2012-12-18 Thread Matthew O. Smith
*It is not in clojars yet as I wanted people to have the opportunity to give feedback before making it live* * * *https://github.com/m0smith/lein-stencil * * * A plugin that can be used to copy files from multiple source directories to a target directory while maintaining the sub-directories Al

Re: ClojureCLR errors on Mono Linux

2012-12-18 Thread dmiller
Shantanu, I created an Ubuntu 12.10 VM running in VirtualBox on my Win7 PC. I installed Mono 2.10.8. I downloaded the zip for ClojureCLR 1.4.0 Debug-4.0. Extracted. > mono Clojure.Main.exe Runs with no problem. > mono Clojure.Compile.exe test.junk Runs with no problem. >From the errors you r

Re: clojure-contrib migrations

2012-12-18 Thread Christopher Meiklejohn
Hi Andy, Thanks for the response. I've signed the CA and mailed it off. I'm also hoping to keep this under the clojure.* namespace. Would the process moving forward be to create a separate repo containing just the components I'll be working on moving forward to break it out of the large clo

Re: clojure-contrib migrations

2012-12-18 Thread Andy Fingerhut
I believe Sean Corfield has helped several of the older contrib libraries get migrated to the newer ones, and either knows the process better, or knows who to ask. Sean? Andy On Dec 18, 2012, at 1:29 PM, Christopher Meiklejohn wrote: > Hi Andy, > > Thanks for the response. I've signed the

[ANN] CJD 0.1.0, a documentation technology for Clojure programs

2012-12-18 Thread greenh
I'd like to announce the availability of CJD 0.1.0. CJD is a technology for documenting Clojure programs which I devised to satisfy my idiosyncratic documentation-related propensities. It's mostly complete, so I thought I'd share it with the community just in case there are any fellow travel

Re: [ANN] CJD 0.1.0, a documentation technology for Clojure programs

2012-12-18 Thread Bronsa
Awesome! 2012/12/18 greenh > I'd like to announce the availability of CJD 0.1.0. > > CJD is a technology for documenting Clojure programs which I devised to > satisfy my idiosyncratic documentation-related propensities. It's mostly > complete, so I thought I'd share it with the community just in

Re: [ANN] CJD 0.1.0, a documentation technology for Clojure programs

2012-12-18 Thread Frank Siebenlist
It sure looks very nice! … but doesn't your use of #_ preclude us from getting that doc-info in the running system? In other words, how would you enhance the doc facility in the repl to pickup your doc-meta-data in real-time? -FrankS. On Dec 18, 2012, at 11:10 PM, greenh wrote: > I'd like

Re: Little namespace question

2012-12-18 Thread Alan Shaw
>From yesterday: (defmacro eval-in "Eval a Clojure form in a different namespace and switch back to current namespace. Args: code - Clojure form as string ns - Target namespace as string" [code ns] `(do (in-ns '~(symbol ns)) (let [ret# (eval '~(read-string code))]

Re: Who's using Clojure?

2012-12-18 Thread kinleyd
@Christopher Redinger: Thanks, that's a nice page. Bookmarked and will visit from time to time to assess the state of Clojure adoption. -- 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

Re: Little namespace question

2012-12-18 Thread juan.facorro
The macro sees it arguments as *symbols* and does not resolve to the corresponding *var* until evaluation, so the value for the local *code* var in the macro is actually the *symbol** generator.* The *eval-in* macro uses the *read-string* function to evaluate the code you provide, this function

Re: Little namespace question

2012-12-18 Thread Alan Shaw
Thanks very much Juan, that's some good study material for me. -A On Dec 18, 2012 10:45 PM, "juan.facorro" wrote: > The macro sees it arguments as *symbols* and does not resolve to the > corresponding *var* until evaluation, so the value for the local *code* var > in the macro is actually the *

Re: New Clojure user group in Israel

2012-12-18 Thread Haim Ashkenazi
Finally! I'm in :) On Mon, Dec 17, 2012 at 12:58 PM, Daniel Szmulewicz < daniel.szmulew...@gmail.com> wrote: > Hi everybody, > > Happy to announce that Israel has its first Clojure user group. > > http://www.meetup.com/Clojure-**Israel/ > > Sincerely, > > Da

Re: Little namespace question

2012-12-18 Thread Alan Shaw
As an aside, I'm curious about whether this could have been implemented without a macro. -A On Dec 18, 2012 11:06 PM, "Alan Shaw" wrote: > Thanks very much Juan, that's some good study material for me. > > -A > On Dec 18, 2012 10:45 PM, "juan.facorro" wrote: > >> The macro sees it arguments a

Re: ClojureCLR errors on Mono Linux

2012-12-18 Thread Shantanu Kumar
Thanks David, and sorry for the insufficient bug details. I tested this on 64-bit Ubuntu where it works fine; however, the problem shows up on 32-bit Ubuntu. I will post the exact steps in the evening on how to replicate the issue on 32-bit Ubuntu. Shantanu On Wednesday, 19 December 2012 02:0

Need help in geeting cemerick/friend working with openid

2012-12-18 Thread Murtaza Husain
Hi, I am trying to setup my authentication using cemerick/friend. I would like to authenticate using openid with gmail. Below is the code that I have - (ns faiz.handler (:use compojure.core) (:require [compojure.handler :as handler] [compojure.route :as route] [rin