Re: Clojure library

2016-04-01 Thread Karl Blomström
Hello Fernando, Please correct me if I've misunderstood. If you want to install one of your libraries locally and are running leiningen just execute: lein install This way you can reference it in other projects just like you would a library from clojars.org. Regards, Kalle Den 2 apr. 2016

Re: Clojure library

2016-04-01 Thread William la Forge
OK, here is an older library project that uses lein: https://github.com/laforge49/aatree So I guess that covers all the bases. Personally I find boot to be amazing. And easy to use. Bill On Friday, April 1, 2016 at 8:19:46 PM UTC-4, William la Forge wrote: > > OOps. Here's the link:

Re: Clojure library

2016-04-01 Thread William la Forge
Here is a sample library which works the way you are asking. It uses boot, but then you didn't specify what build tool you wanted to use. :-) On Friday, April 1, 2016 at 9:33:45 AM UTC-4, Fernando Abrao wrote: > > Hello all, > > What is the best way to create a lib for internal propose, that

Re: Clojure library

2016-04-01 Thread William la Forge
OOps. Here's the link: https://github.com/aatree/aautil/ On Friday, April 1, 2016 at 8:19:01 PM UTC-4, William la Forge wrote: > > Here is a sample library which works the way you are asking. It uses boot, > but then you didn't specify what build tool you wanted to use. :-) > > On Friday, April

Live rendering of AsciiDoc and MarkDown files in Chrome browser (Github Flavored!)

2016-04-01 Thread Alan Thompson
*UPDATE: AsciiDoc vs MarkDown format:* I have been trying to edit some MarkDown files on GitHub, and it seems that the Google Chrome extension AsciiDoctor.js no longer renders MarkDown, only AsciiDoc. Not to worry, however! I just found a similar Chrome extension that does live rendering of

Re: Stable clojure.xml/parse

2016-04-01 Thread Francis Avila
Are you sure that it changes the child element order? It hasn't in my experience. Example: (clojure.xml/parse (io/input-stream (.getBytes "" "UTF-8"))) => {:tag :a, :attrs nil, :content [{:tag :b1, :attrs nil, :content nil} {:tag :a1, :attrs nil, :content nil} {:tag :a2,

Re: defmulti is a defonce?

2016-04-01 Thread Kenneth Tilton
Pure genius. :) And once I have the method working as I want I can swap in the code. Thx! -kt On Fri, Apr 1, 2016 at 12:15 PM, Gary Trakhman wrote: > I usually work around this by putting the dispatch in a separate def and > referencing the var within defmulti. > >

Re: defmulti is a defonce?

2016-04-01 Thread Gary Trakhman
I usually work around this by putting the dispatch in a separate def and referencing the var within defmulti. (defmulti my-multi #'my-dispatch) It's barely slower for the extra var dereference and very convenient for development. On Fri, Apr 1, 2016 at 12:10 PM hiskennyness

defmulti is a defonce?

2016-04-01 Thread hiskennyness
I just killed two hours trying to figure out why my tweaks to the dispatch function of defmulti did not work. Finally got the feeling I had found a bug in Clojure, but then I found a comment somewhere saying it is a feature, effectively a defonce (and, yes, looking at the source I see it does

Re: Mutual Recursion Doesn't Compile

2016-04-01 Thread Ashish Negi
Yeah.. protocols are more right answer to this problem , rather than using declare. -- 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

Stable clojure.xml/parse

2016-04-01 Thread Olek
Hi! I need a stable clojure.xml/parse. Unfortunately current implementation changes the order of child elements in a node. I use xml as a form of language for DSL. Please don't suggest switching to clojure structures because non-clojure programmers (actually analysts) are editing it and also

Re: Question about how lazy sequences are held/released/garbage collected

2016-04-01 Thread Gary Trakhman
I think this is an example of locals-clearing at work: https://groups.google.com/forum/#!topic/clojure/FLrtjyYJdRU My guess is that the compiler clears the references 'at the point of last reference', but in this case s2 has no last reference. On Fri, Apr 1, 2016 at 9:07 AM John Jacobsen

Clojure library

2016-04-01 Thread Fernando Abrao
Hello all, What is the best way to create a lib for internal propose, that generate a jar file with .clj sources instead of .class, like it is in the libs from clojars? My idea is to create a lib (jar) common for all projects. Another idea is welcome. Regards, Fernando -- You received this

Question about how lazy sequences are held/released/garbage collected

2016-04-01 Thread John Jacobsen
The problem of correctly handling large lazy sequences so they don't blow up in memory came up at work this week. I thought I would try to explain the following simple case to our Monday afternoon study group, and I realized I don't understand it 100%: (def n 1e8) (let [s1 (range n) s2

Re: Functions referenced in macro-expansions cannot be internal?

2016-04-01 Thread Erik Assum
On condp, case etc. Alex Miller wrote a blog post on their performance a while ago: http://insideclojure.org/2015/04/27/poly-perf/ Erik. -- i farta > Den 1. apr. 2016 kl. 13.03 skrev Kenneth Tilton : > > > >> On Fri, Apr 1, 2016 at 2:41 AM, Erik Assum

Re: Functions referenced in macro-expansions cannot be internal?

2016-04-01 Thread Kenneth Tilton
On Fri, Apr 1, 2016 at 2:41 AM, Erik Assum wrote: > Not at all answering your question, but I would strongly suggest to at > least deref `me` before calling the function, so it’s definition would be > more like: > > (defn svr [me slot] >(when-let [sval (slot me)] >(if

Re: Functions referenced in macro-expansions cannot be internal?

2016-04-01 Thread Erik Assum
Not at all answering your question, but I would strongly suggest to at least deref `me` before calling the function, so it’s definition would be more like: (defn svr [me slot] (when-let [sval (slot me)] (if (jz-ref sval) (condp type @sval) :jzi (:val @sval)