Re: Clojure library

2016-04-05 Thread Fernando Abrao
Yes, thats I wanted.

Thanks a lot
Regards

Em domingo, 3 de abril de 2016 07:10:01 UTC-3, Ashish Negi escreveu:
>
> By default build tool : lein would not do AOT i.e. create .class files. 
> So, your jar with `lein uberjar` would have .clj files. You can verify with 
> un-tar the jar.
>
> If you have a `-main` then you can use :skip-aot for not doing aot.. 
> see 
> https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L189
>
>

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Partial question

2016-02-23 Thread Fernando Abrao
Hello, it worked, but if I use

(debug "TEST" :id "something")

is getting ArityException Wrong number of args (3) passed to ...

Em terça-feira, 23 de fevereiro de 2016 15:36:46 UTC-3, Josh Tilles 
escreveu:
>
> My guess is that what you're looking for is:
> (def debug #(log "DEBUG" % :idVE "COM"))
> (see "Anonymous function literal" under 
> http://clojure.org/reference/reader#_dispatch)
>
> However, note that defining functions in a "point-free"-ish style in 
> Clojure has a downside with regard to metadata, in that the function 
> arities and argument names aren't inspectable at the REPL:
> (def debug-1 #(log "DEBUG" % :idVE "COM"))
> ;= user/debug-1
> (clojure.repl/doc debug-1)
> ; -
> ; user/debug-1
> ;   nil
> ;= nil
> (defn debug-2 [message]
>   (log "DEBUG" message :idVE "COM"))
> ;= user/debug-2
> (clojure.repl/doc debug-2)
> ; -
> ; user/debug-2
> ; ([message])
> ;   nil
> ;= nil
>
>
> Hope that's helpful,
> Josh
>
> P.S. If you *really want to* you can populate the :arglists metadata 
> yourself:
> (def ^{:arglists '([message])} debug #(log "DEBUG" % :idVE "COM"))
>
>
>
> On Tuesday, February 23, 2016 at 1:14:33 PM UTC-5, Fernando Abrao wrote:
>>
>> Hello all,
>>
>> I´m trying to do something like:
>>
>> (defn log [type message & {:keys [id idVe] :or {id "LOCAL" idVe "END"}}] 
>>  (println (str id ": " type " -> " message "<- " idVe)))
>>
>>
>> (def debug (partial log "DEBUG" ?? :idVe "COM"))
>>
>>
>> Is there any way to do what I want? Pass arguments to log and add the 
>> :idVe into the end? Is the partial the best using to do this?
>>
>> Regards,
>>
>> Fernando
>>
>

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Partial question

2016-02-23 Thread Fernando Abrao
Hello all,

I´m trying to do something like:

(defn log [type message & {:keys [id idVe] :or {id "LOCAL" idVe "END"}}] 
 (println (str id ": " type " -> " message "<- " idVe)))


(def debug (partial log "DEBUG" ?? :idVe "COM"))


Is there any way to do what I want? Pass arguments to log and add the :idVe 
into the end? Is the partial the best using to do this?

Regards,

Fernando

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Concurrency Threads

2016-02-12 Thread Fernando Abrao
Hello All,

I 'm doing a program that have to:
- Read a file with list of hosts ip
- Start pinging from n threads pool or whatever
- Cycle the pinging again after thread sleep
What is the best way doing it? Producer and consumer to use queue? One 
thread by ip? 
Any advice about it?

Regards,

Fernando

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.