Re: [ANN] Introducing Yo-yo, a protocol-less, function composition-based alternative to Component

2015-06-25 Thread James Henderson
On Wednesday, 24 June 2015 11:17:41 UTC+1, Atamert Ölçgen wrote: On Tue, Jun 23, 2015 at 11:47 PM, James Henderson ja...@jarohen.me.uk javascript: wrote: Hi Atamert - thanks :) I thought it might be preferable to keep the call to (latch)explicit - it means that ylet can be used in

Re: Calling an overloaded Scala function

2015-06-25 Thread Stephen Wakely
Interesting. That could be a good last resort. On Thu, Jun 25, 2015 at 1:27 PM Andy Fingerhut andy.finger...@gmail.com wrote: Sorry, I do not know whether Clojure can or cannot determine the correct overload in this situation. All I have is a weak suggestion that work well enough: have you

Re: Calling an overloaded Scala function

2015-06-25 Thread Andy Fingerhut
Sorry, I do not know whether Clojure can or cannot determine the correct overload in this situation. All I have is a weak suggestion that work well enough: have you considered creating wrapper functions, e.g. in Scala or Java, that have different enough function signatures that Clojure can easily

Re: materials

2015-06-25 Thread Baishampayan Ghose
Alex, I just realised my mistake. My apologies to the poster. Regards, BG On Thu, Jun 25, 2015 at 6:49 PM, Alex Miller a...@puredanger.com wrote: Hey BG, Perhaps the OP did Google already but saw too many choices and was looking for an informed decision about where to go first. Using a

Re: materials

2015-06-25 Thread Alex Miller
Hey BG, Perhaps the OP did Google already but saw too many choices and was looking for an informed decision about where to go first. Using a lmgtfy link is a condescending way to answer a question and I don't want this list or this community to be that kind of place. I would prefer people to

Re: Calling an overloaded Scala function

2015-06-25 Thread Ambrose Bonnaire-Sergeant
Do you know how to call this method from Java 1.4? That will probably give enough context to use in Clojure type hints. Thanks, Ambrose On Thu, Jun 25, 2015 at 9:03 PM, Stephen Wakely fungus.humun...@gmail.com wrote: Interesting. That could be a good last resort. On Thu, Jun 25, 2015 at 1:27

Re: materials

2015-06-25 Thread Mike Grabowski
Living Clojure Do ~20 project euler problems (there are few open source repos in Clojure you can compare your algorithms with). On Thursday, 25 June 2015 10:59:12 UTC+2, Baskar Kalyanasamy wrote: hi everyone, can somebody send me materials for clojure. i am a beginner and

Re: let vs. let*

2015-06-25 Thread Alex Miller
raould, I find lmgtfy links to be a condescending way to answer a question and I would prefer that we not use them on this list. If you have an answer or a link to one, then respond with this, otherwise I do not see a reason to post this. Thanks, Alex On Thursday, June 18, 2015 at 3:35:53

Re: side-effecting re-/transducers

2015-06-25 Thread Stuart Sierra
Hi Sam, Transducers are a new feature, and best practices are still emerging. Transducing/reducing is always non-lazy, so it's *less* risky to have side effects in a reduce compared with side effects in a lazy sequence. Still, I would offer the same advice I give for lazy sequences. Keep your

Re: Calling an overloaded Scala function

2015-06-25 Thread Stuart Sierra
Scala has to compile down to JVM bytecode just like Clojure, but it may change method signatures along the way. You could try running `javap` to disassemble the compiled Scala bytecode and figure out what the method signatures actually are. Or use Java reflection to examine the objects you

Re: Calling an overloaded Scala function

2015-06-25 Thread Stephen Wakely
So using reflection on the objects gives the following signatures - they have identical signatures : {:name apply, :return-type com.cra.figaro.language.CompoundDist, :declaring-class com.cra.figaro.language.Dist$, :parameter-types [scala.collection.Seq

Re: Calling an overloaded Scala function

2015-06-25 Thread Stephen Wakely
javap gives : public T com.cra.figaro.language.AtomicDistT apply(scala.collection.Seqscala.Tuple2java.lang.Object, com.cra.figaro.language.ElementT, com.cra.figaro.language.NameT, com.cra.figaro.language.ElementCollection); public T com.cra.figaro.language.CompoundDistT

Re: Writing REST api the right way

2015-06-25 Thread Mike Grabowski
Yeah, looks interesting, but unfortunately still in alpha, so I can't profit from it at this stage. But will check later! Thank you all for your responses! It's been really great source of new ideas and thoughts about API benchmarking and blocking/non-blocking approaches :) On Thursday, 25

Re: Calling an overloaded Scala function

2015-06-25 Thread Stephen Wakely
I am sadly quite clueless when it comes to Java. De-compiling the Scala class file to Java gives me the following: public T AtomicDistT apply(SeqTuple2Object, ElementT clauses, NameT name, ElementCollection collection) { return new AtomicDist(name, clauses.toList(), collection);

Re: Writing REST api the right way

2015-06-25 Thread Dylan Butman
Have you looked at yada http://yada.juxt.pro/user-guide.html ? It's an aleph compatible alternative to liberator that is swagger compatible with swagger out of the box. On Tuesday, June 23, 2015 at 5:33:50 AM UTC-4, Mike Grabowski wrote: Hey guys, I am so excited to join Clojure bandwagon,

Is this expected behavior with meta data?

2015-06-25 Thread Sarkis Karayan
Why doesn't this work? user= (meta ^{:some-meta 123} 'n) nil While this works: user= (meta ^{:some-meta 123} (fn [n] n)) {:some-meta 123} And this works too: user= (meta (with-meta 'n {:some-meta 123})) {:some-meta 123} Is this intended behavior? If so, what's the reasoning? Thanks, Sarkis

Re: let vs. let*

2015-06-25 Thread Luc Préfontaine
I had to query it myself not knowing what this site was all about, nice tutorial, I think I understood it :) Luc P. raould, I find lmgtfy links to be a condescending way to answer a question and I would prefer that we not use them on this list. If you have an answer or a link to one,

Re: Is this expected behavior with meta data?

2015-06-25 Thread Andy-
There was just this question the other day: http://stackoverflow.com/questions/30922413/why-does-metadata-symbol-not-work There is also a few threads a few weeks ago here on google groups about it: https://groups.google.com/d/msg/clojure/_e7vBom2acw/0AAKTiGuzv4J HTH On Thursday, June 25,

Looking for library to annotate structures with grammar descriptions

2015-06-25 Thread Brian Marick
Suppose we have a structure like this: [ :a [:a :b :c][:a [:b1 :b2] :c ] ] That is a *required* list. It consists of keywords and *paths* (nested vector like [:a :b :c] above). A path consists of keywords and *alternates* (a twice-nested vector like [:b1 :b2]) above. It's easy

Re: Is this expected behavior with meta data?

2015-06-25 Thread gianluca torta
to get the meta-data of a var (I'm guessing symbol n refers to a var...) you should call it on the var iself, not its value or symbol: user= (def ^{:some-meta 123} n 0) #'user/n user= (meta n) nil user= (meta 'n) nil user= (meta #'n) {:some-meta 123, :ns #Namespace user, :name n, :file

Re: materials

2015-06-25 Thread Andy-
The sidebar on reddit is actually pretty decent: http://www.reddit.com/r/clojure My #1 resource for looking up docs is nowadays clojuredocs.org since it gives examples/comments for most of the functions. HTH On Thursday, June 25, 2015 at 4:59:12 AM UTC-4, Baskar Kalyanasamy wrote: hi

side-effecting re-/transducers

2015-06-25 Thread Sam Raker
This seems bad, is this bad: (defn to-db [conn] (fn ([val] (upload-to-my-db conn val)) ([_ val] (upload-to-my-db conn val))) (defn -main [] (transduce my-preprocessing-xf (to-db (get-db-conn)) seq-of-things-to- preprocess-and-upload)) I ask only because 1) Plugging the

ANN: clj-pronouncing

2015-06-25 Thread John Wiseman
I ported Allison Parrish's Pronouncing python library, an interface to the CMU Pronouncing Dictionary, to clojure: https://github.com/wiseman/clj-pronouncing You can use it to count syllables, find rhymes, etc.: user (require '[com.lemonodor.pronouncing :as pro]) user (- literally

Re: Calling an overloaded Scala function

2015-06-25 Thread Ambrose Bonnaire-Sergeant
They apparently differ in the return type. I don't think clojure.lang.Reflector considers the return type hint when resolving methods. Thanks, Ambrose On Fri, Jun 26, 2015 at 4:16 AM, Stephen Wakely fungus.humun...@gmail.com wrote: javap gives : public T com.cra.figaro.language.AtomicDistT

Re: Calling an overloaded Scala function

2015-06-25 Thread Ambrose Bonnaire-Sergeant
That was meant as a response to the other thread. On Fri, Jun 26, 2015 at 10:35 AM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: They apparently differ in the return type. I don't think clojure.lang.Reflector considers the return type hint when resolving methods. Thanks,

Re: [ANN] Introducing Yo-yo, a protocol-less, function composition-based alternative to Component

2015-06-25 Thread James Henderson
Seems like the next step for this would be for me to put together a blog with an example Component system, and its equivalent Yoyo system?! :) Should have time for that over the weekend. James On Thursday, 25 June 2015 09:05:39 UTC+1, James Henderson wrote: On Wednesday, 24 June 2015

Re: materials

2015-06-25 Thread Josh Kamau
http://www.braveclojure.com/ On Thu, Jun 25, 2015 at 12:10 PM, Baishampayan Ghose b.gh...@gmail.com wrote: http://lmgtfy.com/?q=clojure+tutorial Hope this helps. ~BG On Thu, Jun 25, 2015 at 7:21 AM, Baskar Kalyanasamy baskar...@gmail.com wrote: hi everyone, can

Calling an overloaded Scala function

2015-06-25 Thread Stephen Wakely
I am trying to call into some Scala that has the following overloaded methods : def apply[T](clauses: (Double, Element[T])*)(implicit name: Name[T], collection: ElementCollection) = new AtomicDist(name, clauses.toList, collection) def apply[T](clauses: (Element[Double],

materials

2015-06-25 Thread Baskar Kalyanasamy
hi everyone, can somebody send me materials for clojure. i am a beginner and i also want to in which tool or software i should practice in. thanks in advance -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: materials

2015-06-25 Thread Baishampayan Ghose
http://lmgtfy.com/?q=clojure+tutorial Hope this helps. ~BG On Thu, Jun 25, 2015 at 7:21 AM, Baskar Kalyanasamy baskar...@gmail.com wrote: hi everyone, can somebody send me materials for clojure. i am a beginner and i also want to in which tool or software i should practice

Re: materials

2015-06-25 Thread Geert Vermeiren
Have you tried the most obvious place ? http://clojure.org/getting_started Kind regards On Thursday, June 25, 2015 at 10:59:12 AM UTC+2, Baskar Kalyanasamy wrote: hi everyone, can somebody send me materials for clojure. i am a beginner and i also want to in which tool or