Re: namespace what?

2011-12-15 Thread tonyl
you are mixing up the format for ns. If you want to use an alias for your library, use require, like this: (ns examples.core (:require [clarity.component :as c])) ;; you can call the function/macro make, by using the alias. (c/make :button "The Button") but if you don't want to use an alias and

[ANN] ClojureCLR 1.3.0 released

2011-09-26 Thread tonyl
Oh yeah, I am going it in Mono and in the Windows machine with .Net thanks for the big release :) -- 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 modera

Re: One name space / Multiple Modules

2011-08-04 Thread tonyl
There are no modules in clojure, but just namespaces. But you can nest namespaces, so you can spread out the functions in namespaces. On Aug 4, 2:32 pm, octopusgrabbus wrote: > Can more than one module implement the same name space? In other > words, can the functions that comprise a name space b

Re: Anyone on Google+ yet?

2011-07-14 Thread tonyl
http://tonylara.net/+ On Jul 14, 6:09 pm, Devin Walters wrote: > http://gplus.to/devn > > -- > Devin Walters > > > > > > > > On Thursday, July 14, 2011 at 6:00 PM, ianp wrote: > > Ian (https://plus.google.com/110915919730271680589) > > > Looks like G+ is pretty popular with the Clojure crowd :-)

Re: overriding keyword behavior?

2011-03-07 Thread tonyl
I little redundant but looking now at the source code in Keyword.java the Keyword class extends IFn, Comparable, Named, and Serializable; they are all java that you could extend. But I am not sure how the keyword lookup system works, haven't look into it. Just something that might help. On Mar 6,

Re: overriding keyword behavior?

2011-03-07 Thread tonyl
I haven't tested it or anything, but you can use: (extend-type java.util.Properties ILookup (valAt [this key] ...) (valAt [this key not-found] ...)) AFAIK you can extend on Interfaces but not Abstracts or Classes. On Mar 6, 9:27 pm, kurtharriger wrote: > I was curious if it was possi

Re: figuring out sets

2010-11-02 Thread tonyl
Wow, this brings more light to the subject. Thank you guys for your explanations and practical uses. On Nov 2, 1:31 am, Rasmus Svensson wrote: > 2010/11/1 tonyl : > > > I was wondering since it uses the dispatch macro and AFAIK > > there is no api fn to create them like hash-m

Re: figuring out sets

2010-10-31 Thread tonyl
chat, good learning. On Oct 31, 9:35 pm, tonyl wrote: > I've been wondering if sets are actually a defined data structure like > vectors and maps or are they a result of an expansion of the dispatch > macro? I was wondering since it uses the dispatch macro and AFAIK > there is no api

figuring out sets

2010-10-31 Thread tonyl
I've been wondering if sets are actually a defined data structure like vectors and maps or are they a result of an expansion of the dispatch macro? I was wondering since it uses the dispatch macro and AFAIK there is no api fn to create them like hash-maps to create maps, vector/vec for vectors, or

Re: Help to optimize palindrome search from input file

2010-10-12 Thread tonyl
i mid) >         true >         (when (= (.charAt s i) (.charAt s j)) >           (recur (inc i) (dec j))) > > Also, the built-in function max-key will do what your sort/max-comp > code is doing more concisely: > > (apply max-key count (filter palindrome? (all-combs input))) > > HTH,

Re: Help to optimize palindrome search from input file

2010-10-12 Thread tonyl
So for returns a lazy-seq of the combinations and I am forcing it to process the values by filtering. mmm... I still tried your approach and nothing changed in processing time. I changed the for form to filter as it is pairing the combinations, I didn't think it would make any difference since I ju

Help to optimize palindrome search from input file

2010-10-12 Thread tonyl
Hi, I just started to learn clojure in a more serious way and I am doing the first level of the greplin challenge. I made it to work with a short palindrome like the example they give me, but when it comes to work with the input file, it takes for ever and I have to stop it. $ time clj level1.clj