Re: [BUG?] loading Clojure source files from various data sources (classloading)

2015-06-05 Thread Henrik Heine
Alex - I had no problem doing what you describe. Both namespaces load fine. I use an URLClassLoader to mimic what I think your code is doing. I triped over a few things: - first I got the alter-root wrong doing it from Java. - I had to load clojure.lang.RT before clojure.lang.Compiler - otherwise

[Q] Guarantees of sorted-map-by calling the comparator?

2015-04-22 Thread Henrik Heine
Hi, I'd like to build a sorted map that uses a user-supplied comparator using sorted-map-by. And I'd like to make sure, that one will never add a key already contained in the map. This is what I came up with: (defn compare-not-equal [x y] (let [r (compare x y)] (if-not (= 0 r) r

Re: [Q] Any Clojure code browsing and cross referencer?

2015-04-22 Thread Henrik Heine
That looks promising! Thanks! -- 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 t

Re: [Q] Any Clojure code browsing and cross referencer?

2015-04-21 Thread Henrik Heine
Thanks for your reply. Yes, I'm aware of crossclj, but I did not find any example on how to use it for my own project (i.e. run it on my code and deploy it to customers). Any hint on that? - Henrik -- You received this message because you are subscribed to the Google Groups "Clojure" group. T

[Q] Any Clojure code browsing and cross referencer?

2015-04-21 Thread Henrik Heine
Hi, I know of highlight.js which I could use for highlighting my Clojure code. But what about cross referencing? In the end I would like start a ring/jetty server and let the user browse/navigate the highlighted source code. GrepCode does it somewhow - but how? Any ideas? - Henrik -- You r

Sorting a collection of elements according to a given list of elements

2015-03-19 Thread Henrik Heine
Hi, I want to sort a set/map according to an ordering given by a seq of elements - e.g. (def some-order [:u :a :e :i :o]) (def some-order-fn (order-fn some-order)) (sorted-set-by some-order-fn :a :e :i :o :u) ; --> #{:u :a :e :i :o} This is what I came up with: (defn order-fn [ks] #(- (.inde

Re: XPATH/XSLT like access to Clojure data structures?

2015-02-27 Thread Henrik Heine
This seems to work on XML/JDOM - right? I'm looking for something that works on Clojure data structures. And I wouldn't like to go from Clojure data structures->XML/JDOM only to do the transformation on XML/JDOM and then back to Clojure data structures. Any idea? -- You received this message

XPATH/XSLT like access to Clojure data structures?

2015-02-27 Thread Henrik Heine
Hi folks, do you know of a lib that let's you navigate around nested Clojure structures like XPATH does on XML? I'm aware of core.match, walk and zippers. But has anyone put those together in order to produce an API that gives you XPATH/XSLT? - Henrik -- You received this message because yo

Re: Extending the LispReader with "embeded language lorms"

2015-02-11 Thread Henrik Heine
Hi, Am Dienstag, 10. Februar 2015 21:07:50 UTC+1 schrieb Gary Verhaegen: > > For the sake of completeness, in this context "other users" is not limited > to humans: what about IDE support? Refactoring tools? Code analysis? I agree. You lock out "others" and that takes away a lot. For me that's

Re: Q: How to parse stream of text (from java.io.Reader) via instaparse with minimal input consuption

2015-01-16 Thread Henrik Heine
Hi, instaparse does not support readers and it cannot at the moment mainly because it uses JDK RegEx which do not support readers (thanks to Mark Engelbert for supplying this info). IMHO you cannot greedyly consume a reader and then decide that a match was not found due to the side-effect of t