Re: Why the need for an explicit new operator in Clojure?

2013-05-16 Thread Meikel Brandmeyer (kotarak)
Yes. But I guess I misunderstood the OP rereading the original post again. (Foo 42) vs. (instance? Foo 42) was my understanding (so no operator), but I guess it's more about (new Foo 42) vs. (Foo. 42). Am Freitag, 17. Mai 2013 07:48:19 UTC+2 schrieb tbc++: > > >>how do you distinguish between ac

Re: Why the need for an explicit new operator in Clojure?

2013-05-16 Thread Timothy Baldridge
>>how do you distinguish between accessing the class itself and creating a new >>instance of it? (Foo. 42) vs (instance? Foo 42) Is that what you mean? Timothy On Thu, May 16, 2013 at 11:43 PM, Meikel Brandmeyer (kotarak) wrote: > Hi, > > how do you distinguish between accessing the class it

Re: Why the need for an explicit new operator in Clojure?

2013-05-16 Thread Meikel Brandmeyer (kotarak)
Hi, how do you distinguish between accessing the class itself and creating a new instance of it? 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 membe

Re: [ANN] getclojure.org

2013-05-16 Thread Ramesh
This is great, and will make clojure adoption wider. I hope its ranked higher in google results! Also, it would be great if it supports regular expressions like these: "->[a-zA-Z]*", "\*[a-z]\*", etc. as well. I was reading clojure code for a while, and I remembered "->Obj" to be a valid IFn, but

Re: [ANN] getclojure.org

2013-05-16 Thread Timothy Baldridge
This is awesome! I remember you mentioning this project last year at the Madison Clojure Meetup, it's cool to see it in action. This would make a pretty cool test framework for a new Clojure implementation. Timothy On Thu, May 16, 2013 at 9:41 PM, Devin Walters wrote: > There are some tweaks

Re: core.match

2013-05-16 Thread David Nolen
On Thu, May 16, 2013 at 11:35 PM, Mark Engelberg wrote: > core.match has been alpha for about two years. > > I've been itching to use it in real projects for a long time, but with the > alpha status, I've been reluctant to trust that it has been vetted for > correctness. > > What aspects are preve

Re: [ANN] getclojure.org

2013-05-16 Thread Devin Walters
There are some tweaks required on the analyzer/filter/tokenizer to allow certain queries. I wish Michael Klishin of ClojureWerkz fame was here to take a peek and offer his elasticsearch advice. ;) -- {:∂evin :√valters} On Thursday, May 16, 2013 at 10:39 PM, atkaaz wrote: > nevermind :) it

Re: [ANN] getclojure.org

2013-05-16 Thread Devin Walters
IRC logs from the last 5 years and clojuredocs' DB. The examples were run through a sandbox against 1.5.1. -- {:∂evin :√valters} On Thursday, May 16, 2013 at 10:36 PM, Mark Engelberg wrote: > Where is it getting the examples from? > -- > -- > You received this message because you are s

Re: [ANN] getclojure.org

2013-05-16 Thread atkaaz
nevermind :) it acts the same as ->> even when -\>\> so I don't know what I was talking about :D On Fri, May 17, 2013 at 6:37 AM, atkaaz wrote: > like > http://getclojure.org/search?q=-\%3E\%3E&num=0 > > > On Fri, May 17, 2013 at 6:36 AM, Ram

Re: [ANN] getclojure.org

2013-05-16 Thread atkaaz
like http://getclojure.org/search?q=-\%3E\%3E&num=0 On Fri, May 17, 2013 at 6:36 AM, Ramesh wrote: > Looks like "->>" is not supported. I quoted it! > > http://getclojure.org/search?q=%22-%3E%22&num=0 > > -ramesh > > > On Thu, May 16, 2013 at 6:12 PM, Devin Walters wrote: > >> Hey All, >> >>

Re: [ANN] getclojure.org

2013-05-16 Thread Ramesh
Looks like "->>" is not supported. I quoted it! http://getclojure.org/search?q=%22-%3E%22&num=0 -ramesh On Thu, May 16, 2013 at 6:12 PM, Devin Walters wrote: > Hey All, > > I put this ( http://getclojure.org ) together and wanted to share it with > all of you. It's a nifty way to search for

Re: [ANN] getclojure.org

2013-05-16 Thread Mark Engelberg
Where is it getting the examples from? -- -- 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 unsub

core.match

2013-05-16 Thread Mark Engelberg
core.match has been alpha for about two years. I've been itching to use it in real projects for a long time, but with the alpha status, I've been reluctant to trust that it has been vetted for correctness. What aspects are preventing core.match from being ready for prime-time? --Mark -- -- Yo

Re: [ANN] getclojure.org

2013-05-16 Thread Alex Baranosky
Really cool. Thanks! On Thu, May 16, 2013 at 8:04 PM, Devin Walters wrote: > Thanks for trying it out! > > One hint to people trying it out would be to not put too much stock into > the first page of results. The plan is to add user ratings to augment > search results in a meaningful way. At th

Re: [ANN] getclojure.org

2013-05-16 Thread Devin Walters
Thanks for trying it out! One hint to people trying it out would be to not put too much stock into the first page of results. The plan is to add user ratings to augment search results in a meaningful way. At the moment searching for "comp" will give you the most "relevant" examples like: (comp

Re: [ANN] getclojure.org

2013-05-16 Thread Leon Talbot
This project is actually very useful for learning clojure one (or two!) function at a time. Thanks a lot! -- -- 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 memb

Re: [ANN] getclojure.org

2013-05-16 Thread Devin Walters
Not difficult, feel free to submit an issue on the repo. Thanks, -- {:∂evin :√valters} On Thursday, May 16, 2013 at 8:32 PM, atkaaz wrote: > Ok fair enough. I was wondering however how hard would it be to add a button > maybe? or a var to the url? (or a button which adds the var to the url

Re: [ANN] getclojure.org

2013-05-16 Thread atkaaz
Ok fair enough. I was wondering however how hard would it be to add a button maybe? or a var to the url? (or a button which adds the var to the url - not sure how these are called) which would switch between the default(as it is now) and the pretty printed output (for all the results not just one o

Re: [ANN] getclojure.org

2013-05-16 Thread Devin Walters
At the moment, yes. The docstrings are not pretty, but in the end I decided that seeing the literal \n was better than pretty printing captured output. That being said, I'm not strongly opposed to changing it (patches welcome), but right now I think not pretty printing output is good in the 80

Re: [ANN] getclojure.org

2013-05-16 Thread atkaaz
Hi! http://getclojure.org/search?q=fixture&num=0 is it supposed to show the \n inline? it's a bit uncomfy to have to read those on one line On Fri, May 17, 2013 at 4:12 AM, Devin Walters wrote: > Hey All, > > I put this ( http://getclojure.org ) together and wanted to share it with > all of yo

[ANN] getclojure.org

2013-05-16 Thread Devin Walters
Hey All, I put this ( http://getclojure.org ) together and wanted to share it with all of you. It's a nifty way to search for example usage of clojure. It's far less curated than ClojureDocs, so you may pick up some interesting ideas by simply browsing. It supports boolean queries like: "com

Strange exception intializing clojure.core using Spring-Hadoop

2013-05-16 Thread Dave Kincaid
I'm posting this here in hopes that someone might be able to steer us in the right direction. We have a Cascalog process that we're using Spring-Hadoop & Spring-Batch to send to a remote Hadoop cluster. It seems as though Spring-Hadoop is doing something funky with the classpath/classloader and

Re: who's not using leiningen?

2013-05-16 Thread Dave Ray
On Wednesday, May 15, 2013, Dave Sann wrote: > If you are not using Leiningen, what do you use? At home I use leiningen because its easy and well supported. At work I use gradle and sometimes ant because it's the quickest path to getting clojure in the build. > > why do you prefer it? > > D > >

Re: Is there any particular reason for using this form?

2013-05-16 Thread David Nolen
On Thu, May 16, 2013 at 4:30 PM, David Nolen wrote: > .nth is a method call, nth is a function call. Another perf thing. > > In anycase if you're looking for examples of everyday Clojure it's best to > look elsewhere :) fast Clojure tends to look a bit quirky and relies on > details of the curren

Re: Is there any particular reason for using this form?

2013-05-16 Thread David Nolen
.nth is a method call, nth is a function call. Another perf thing. In anycase if you're looking for examples of everyday Clojure it's best to look elsewhere :) fast Clojure tends to look a bit quirky and relies on details of the current state of the compiler. On Thu, May 16, 2013 at 4:15 PM, Pa

Re: Is there any particular reason for using this form?

2013-05-16 Thread Pavel Prokopenko
Thanks, David! What about (.nth this i) vs (nth this i)? Is that also some optimization trick like direct object's method call vs reflection method call? On Thursday, May 16, 2013 10:34:16 PM UTC+3, David Nolen wrote: > > It is necessary - integer literals default to primitive long and I'm not

Re: Is there any particular reason for using this form?

2013-05-16 Thread David Nolen
It is necessary - integer literals default to primitive long and I'm not sure if >= will inline if it doesn't have type information in scope. This bit of noise could probably be removed by improving type inference in the compiler. On Thu, May 16, 2013 at 3:09 PM, Pavel Prokopenko < pavel.a.prokop

Tool for Google Summer of Code: Flower Dev Center

2013-05-16 Thread Flower Platform Team
Hello GSoC Mentors, As you are participating to Google Summer of Code, I'm wondering if you could consider using Flower Dev Center [1] while working with students. Flower Dev Center is an online platform for UML modeling diagramming, with a strong focus on code synchronization, integration wi

Re: Why the need for an explicit new operator in Clojure?

2013-05-16 Thread Gary Trakhman
speculating, 'new' might be more convenient for code-gen, in the same way that (. obj func) is more convenient than (.func obj) On Thu, May 16, 2013 at 8:57 AM, Andrew McAuliffe wrote: > Hi. > > My understanding of Java (or jvm) is that you can not call a constructor > without using a new opera

Why the need for an explicit new operator in Clojure?

2013-05-16 Thread Andrew McAuliffe
Hi. My understanding of Java (or jvm) is that you can not call a constructor without using a new operator. Why then (even with the suffix dot syntactic sugar notation) is the new operator required explicitly at all? What are the disadvantages to having it implicit? Thanks in advance amca --

Is there any particular reason for using this form?

2013-05-16 Thread Pavel Prokopenko
Hi, I've been reading Clojure sources in order to get a better understanding of how and why things work and found this implementation of nth function in src/clj/clojure/gvec.clj: (nth [this i not-found] (let [z (int 0)] (if (and (>= i z) (< i (.count this))) (.nth t

status of clj-nstools or similar tools?

2013-05-16 Thread Ben Mabey
Hi all, I like the idea of clj-nstools[1] in certain settings but I have never tried it in a project. (I like how it doesn't do any var copying like defalias and similar solutions do.) Has anyone used it on past projects that would be willing to give some experience reports (maybe Konrad him

Re: confused on set!

2013-05-16 Thread Jim - FooBar();
On 16/05/13 16:48, Phillip Lord wrote: I have one main user at the moment, although she is my PhD student; I claim no coercion. I am a Ph.D student myself and that's exactly where I will most likely need ontologies... Something tells me we're going to be in contact soon :) Give me a shout if

Re: ritz-nrepl starts up slowly?

2013-05-16 Thread Warren Lynn
> The killing of the user process is currently not very reliable. > > > This might be an Emacs "bug" (at least on Windows). The problem is there even for nrepl without ritz (some java process will still dangle there after exiting nrepl). What I did to work around this is to add some code/advi

Re: confused on set!

2013-05-16 Thread Phillip Lord
Jim writes: > On 16/05/13 15:07, Phillip Lord wrote: >> Yep, that's the problem. The library in question >> (https://github.com/phillord/tawny-owl) is meant to be usable by people >> who don't want to know that they are writing clojure. > Funny that you're writing an ontology lib - my research is

Re: confused on set!

2013-05-16 Thread Jim
On 16/05/13 15:07, Phillip Lord wrote: Yep, that's the problem. The library in question (https://github.com/phillord/tawny-owl) is meant to be usable by people who don't want to know that they are writing clojure. Funny that you're writing an ontology lib - my research is increasingly driving me

Re: confused on set!

2013-05-16 Thread Phillip Lord
Jim writes: > On 16/05/13 12:45, Phillip Lord wrote: >> I have a process that >> produces logging output, and I want the user to be able to define >> where that output goes. > > or you can define a multi-method or a tiny protocol with 2-3 > implementations (for GUI, raw-text or file-output) and

Re: confused on set!

2013-05-16 Thread Phillip Lord
Jim writes: > On 16/05/13 13:56, AtKaaZ wrote: >> In a way I'm in his shoes, but I always assumed that the user would use >> binding even if that meant encompassing the whole program in it. > > personally, I find it rather unpleasant to depend on a lib that forces me to > use 'binding' in such a

Re: confused on set!

2013-05-16 Thread Phillip Lord
Jim writes: > On 16/05/13 12:52, AtKaaZ wrote: >> why not ref and dosync? > > a bit heavyweight isn't it? Yep, that's the problem. The library in question (https://github.com/phillord/tawny-owl) is meant to be usable by people who don't want to know that they are writing clojure. > > dynamic s

Re: ritz-nrepl starts up slowly?

2013-05-16 Thread Hugo Duncan
yizhen wei writes: > I found that my ritz-nrepl takes 25 plus seconds to start. While the nrepl > would only take 10 secs. The difference is mainly due to the extra jvm process that is started. > I also noticed that the lein ritz-nrepl (or M-x nrepl-ritz-jack-in inside > of emacs) would start

Re: confused on set!

2013-05-16 Thread Jim
On 16/05/13 13:56, AtKaaZ wrote: In a way I'm in his shoes, but I always assumed that the user would use binding even if that meant encompassing the whole program in it. personally, I find it rather unpleasant to depend on a lib that forces me to use 'binding' in such a top-level fashion...Clo

Re: confused on set!

2013-05-16 Thread AtKaaZ
you're right, I somehow didn't read what he was using it for, just looked at the examples he gave and assumed generic var In a way I'm in his shoes, but I always assumed that the user would use binding even if that meant encompassing the whole program in it. Like if you wanted to disable asserts

Re: Utility libraries and dependency hygiene

2013-05-16 Thread fmjrey
Using the decomposition I made earlier, I would refine my analysis a bit further and say: - the original problem lies mostly within the programming model: it's about resolving dependencies when reusing and composing deployable units, and how to avoid complexity and conflicts. - part of the probl

Re: confused on set!

2013-05-16 Thread Jim
On 16/05/13 12:52, AtKaaZ wrote: why not ref and dosync? a bit heavyweight isn't it? A bit off topic but I remember when Clojure came out, STM was the big selling point! I've been programming Clojure for more than 3 years now and I've yet to write code that uses STM but that wasn't intention

Re: confused on set!

2013-05-16 Thread Jim
On 16/05/13 12:45, Phillip Lord wrote: I have a process that produces logging output, and I want the user to be able to define where that output goes. or you can define a multi-method or a tiny protocol with 2-3 implementations (for GUI, raw-text or file-output) and let your user select what

Re: confused on set!

2013-05-16 Thread AtKaaZ
why not ref and dosync? On Thu, May 16, 2013 at 2:45 PM, Phillip Lord wrote: > Jim writes: > > > On 16/05/13 11:33, Phillip Lord wrote: > >> And if it is okay to use set! > >> on*warn-on-reflection*, why is it not okay to allow me, as the library > >> developer, to define similar properties fo

Re: confused on set!

2013-05-16 Thread Phillip Lord
Jim writes: > On 16/05/13 11:33, Phillip Lord wrote: >> And if it is okay to use set! >> on*warn-on-reflection*, why is it not okay to allow me, as the library >> developer, to define similar properties for my library which work in a >> similar way. > > well, nothing stops you from providing bind

Re: who's not using leiningen?

2013-05-16 Thread Meikel Brandmeyer (kotarak)
Hi, Am Donnerstag, 16. Mai 2013 02:05:31 UTC+2 schrieb Dave Sann: > > If you are not using Leiningen, what do you use? > > why do you prefer it? > > I use gradle. Meikel -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, se

Re: confused on set!

2013-05-16 Thread Jim
On 16/05/13 11:33, Phillip Lord wrote: And if it is okay to use set! on*warn-on-reflection*, why is it not okay to allow me, as the library developer, to define similar properties for my library which work in a similar way. well, nothing stops you from providing bindings at the main entry point

Re: problem redefining protocols and records in emacs+nrepl

2013-05-16 Thread Joachim De Beule
Just a small follow up in case somebody else hits the same problems: they disappear after a "lein clean"... Op vrijdag 1 maart 2013 17:52:36 UTC+1 schreef Jim foo.bar het volgende: > > On 01/03/13 16:17, Joachim De Beule wrote: > > I'm not sure what you mean. I am not changing between namespace

Re: confused on set!

2013-05-16 Thread Neale Swinnerton
On Thu, May 16, 2013 at 11:33 AM, Phillip Lord wrote: > "Jim - FooBar();" writes: > causes an error. What it doesn't explain is why > > (set! *warn-on-reflection* true) > > works just fine. Is the REPL running inside a binding? Is it possible to > add other forms of this binding? Or not? And if

Re: confused on set!

2013-05-16 Thread Jim
You can do (set! *warn-on-reflection* true) because *warn-on-reflection* is already thread-locally bound... Is the REPL running inside a binding? essentially yes... Is it possible to add other forms of this binding? Or not? as Atkaaz pointed out yesterday these vars are in Java code so I'm

Re: confused on set!

2013-05-16 Thread Phillip Lord
"Jim - FooBar();" writes: >>> (set!*my-test* true) >> >> (alter-var-root #'*my-test* (constantly true)) > > here explains what you're asking: > http://clojure.org/Vars > > scroll down to until you see No, this only explains why (def ^{:dynamic true} *my-test* false) (set! *my-test* true) c

Re: idiomatic terminating infinite loops

2013-05-16 Thread Colin Yates
Thanks both, good suggestions. On 15 May 2013 23:38, "Stuart Sierra" wrote: > Colin Yates wrote: > > I have a scheduler which creates a future that basically > > does a (while true (let [next-job (.take queue)]...)), > > where queue is a LinkedBlockingQueue. The problem is that > > once it is run

Re: who's not using leiningen?

2013-05-16 Thread Mikera
On Thursday, 16 May 2013 08:05:31 UTC+8, Dave Sann wrote: > If you are not using Leiningen, what do you use? I use Counterclockwise with Eclipse and Maven. > > why do you prefer it? > Mainly because I do a lot of work with Java (including Polyglot Clojure+Java projects), and I find it works

nrepl-ritz without jack-in?

2013-05-16 Thread Ken Restivo
nrepl-ritz looks very interesting, and I've been meaning to try it out. The problem is that I don't use jack-in. I have long-running processes, sometimes running on a separate machine, and connect and disconnect from them from emacs, using (nrepl "localhost" portnum). I haven't figured out how