What is replacement to maven-assembly-plugin in boot-clj environment?

2016-06-09 Thread Jacek Grzebyta
I need to build more complex package using boot-cl. I have cited my request put on the StackOverflow: Copy of What is replacement to maven-assembly-plugin in boot-clj environment? I created a project which (semi-) finally gives jar file. The file is f

clojure alternative to AspectJ proxy in Java's code

2016-07-07 Thread Jacek Grzebyta
like 3 or 4 classes 2. Programmers quite strongly uses creation de novo rather than injection already prepared instance Thanks a lot for your help, Jacek Grzebyta ++ java code+ class Baz { // I need to proxy this method protected List doAction(String arg 1, String arg2) // weird work

unit tests on gen-class outcome

2016-12-20 Thread Jacek Grzebyta
Hi, I have a project which uses some java project. I made classes using gen-class. Than in unit test just wanted to test it (clojure.test enviro). If I run tests in emacs+cider they works. If I run test in the command line I have class not found exception: boot testing aot run-test task testing

Releases timetable

2017-08-30 Thread Jacek Grzebyta
Hi, Where can I find any timetable for next releases? Or does exist any planned release date for 1.9 version? Thanks, Jacek -- 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

Clojure design patterns

2017-11-22 Thread Jacek Grzebyta
That is my latest discovery. Very good blog with common design patterns implemented in clojure: http://mishadoff.com/blog/clojure-design-patterns/ All the best, J -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Multi-threading with side-effects processing

2017-12-01 Thread Jacek Grzebyta
Hi, I need to load a Java data-base presented as java Collection. Basically it is org.eclipse.rdf4j.sail.model.SailModel ( http://docs.rdf4j.org/javadoc/latest/org/eclipse/rdf4j/sail/model/SailModel.html). Anyway the data are stored on the disk but the object is not thread safe. In my program I

Re: Multi-threading with side-effects processing

2017-12-01 Thread Jacek Grzebyta
rdf4j Models juggling. Regards, Jacek On 1 December 2017 at 12:18, Jacek Grzebyta wrote: > Hi, > > I need to load a Java data-base presented as java Collection. Basically it > is org.eclipse.rdf4j.sail.model.SailModel (http://docs.rdf4j.org/ > javadoc/latest/org/eclipse/r

partition-all in clojure.core.asyncn channel does not work

2017-12-06 Thread Jacek Grzebyta
Hi, I have to populate a triple store with a big number of data (~38k records x 12) and there is a deadly narrow bottleneck - IO operations speed. To fix it I did: 1. To avoid threads overflow I put all compute results into channel. 2. Loading data in chunks is better than single transacti

Re: partition-all in clojure.core.asyncn channel does not work

2017-12-06 Thread Jacek Grzebyta
#(doseq (go >! q (processing i j k l m)) ) .. ) ... )) On 6 December 2017 at 11:50, Ray Miller wrote: > On 6 December 2017 at 11:23, Jacek Grzebyta > wrote: >> >> I have to populate a triple store with a big

Re: partition-all in clojure.core.asyncn channel does not work

2017-12-06 Thread Jacek Grzebyta
? Regards, J On 6 December 2017 at 12:21, Jacek Grzebyta wrote: > Thanks a lot. > > I found you changed the finish slightly - you close q within go body. > Where should I put close! in case if I load a channel in many places within > several methods? I afraid the go body is done >

Re: partition-all in clojure.core.asyncn channel does not work

2017-12-06 Thread Jacek Grzebyta
t; all *-sub-methods with go inside I could check state if was finished? > > Regards, > J > > > > On 6 December 2017 at 12:21, Jacek Grzebyta > wrote: > >> Thanks a lot. >> >> I found you changed the finish slightly - you close q within go body. >>

Re: partition-all in clojure.core.asyncn channel does not work

2017-12-06 Thread Jacek Grzebyta
Finally I will add atomically changed flag `isFinished`. And separate throw to close if the flag is true. On 6 December 2017 at 13:30, Jacek Grzebyta wrote: > So I found how to manage all sub-*-methods ( finish) but still I do not know where should I put close!. If I do at the > end

Slow -main function termination by pmap

2017-12-19 Thread Jacek Grzebyta
Hi, I have multi -mains project. Thus the execution looks like: java -cp location/file.jar some.method .. One -main method looks like: (defn -main [& args] (let [validated (validate-args args)] (if (:msg validated) (println (st/join \newline (:msg validated))) (run vali

Re: Slow -main function termination by pmap

2017-12-19 Thread Jacek Grzebyta
.core/shutdown-agents > > On Tue, Dec 19, 2017 at 1:05 PM, Jacek Grzebyta > wrote: > >> Hi, >> >> I have multi -mains project. Thus the execution looks like: >> >> java -cp location/file.jar some.method .. >> >> >> One -main method looks

what does future do after fn finish ?

2018-01-31 Thread Jacek Grzebyta
Hi, I have application with quite intense tripe store populating ~30/40 k records per chunk (139 portions). The data are wrapped within the future: (conj agent (future (apply task args))) and that all together is send-off into (agent []). At the end of the main thread function I just use await-

Re: what does future do after fn finish ?

2018-01-31 Thread Jacek Grzebyta
On 31 January 2018 at 18:08, James Reeves wrote: > On 31 January 2018 at 17:59, Jacek Grzebyta > wrote: > >> I have application with quite intense tripe store populating ~30/40 k >> records per chunk (139 portions). The data are wrapped within the future: >> >>

Re: what does future do after fn finish ?

2018-01-31 Thread Jacek Grzebyta
he agent calling conj is negligible. You need > to control the size of the pool of threads used, and you need to impose > back-pressure. > > On Wed, Jan 31, 2018 at 3:46 PM Jacek Grzebyta > wrote: > >> On 31 January 2018 at 18:08, James Reeves wrote: >> >>> On

Re: what does future do after fn finish ?

2018-02-01 Thread Jacek Grzebyta
, 2018 at 5:18 PM John Newman wrote: >>> >>>> Agents manage a pool of threads for you. Try doing it without the >>>> future call and see if that works (unless you're trying to do something >>>> else). >>>> >>>> John >

Re: what does future do after fn finish ?

2018-02-02 Thread Jacek Grzebyta
On 2 February 2018 at 08:34, Niels van Klaveren wrote: > +1 for Claypoole, it removed the needs of using agents or futures in 95% > of the cases in my code. > > Thanks a lot. I modify the code using claypoole. I imagine with-shutdown will close the pool properly after finish all tasks so there is

Re: what does future do after fn finish ?

2018-02-02 Thread Jacek Grzebyta
and replace all multithreading parts by something simpler. If you want see the stacktrace just look at: https://github.com/jgrzebyta/triple-loader/issues/53 On 2 February 2018 at 11:16, Jacek Grzebyta wrote: > > On 2 February 2018 at 08:34, Niels van Klaveren < > niels.vanklave...@g

Re: what does future do after fn finish ?

2018-02-03 Thread Jacek Grzebyta
data structure containing symbols, and before compiling to byte code - it > doesn't do anything directly. > > On Fri, Feb 2, 2018 at 3:55 PM Jacek Grzebyta > wrote: > >> OK I found what makes the memory leak. >> >> In the project I work with I use a java Model

[Newbe] how to 'unpack' clojure internal instance

2016-01-25 Thread Jacek Grzebyta
Hi All, Sorry for trivial question but I am a newbe in Clojure. I need to manage some object which is created by calling java method: (let [result #(.getStatements c nil nil nil (into-array Resource '[]))] > (log/debug (format "Result class: %s" (type result))) > (map #(log/debug "E

Re: [Newbe] how to 'unpack' clojure internal instance

2016-01-25 Thread Jacek Grzebyta
t; > Because the CloseableIteration can throw exceptions, I wrapped the whole > thing in a try/catch and a finally to .close the result. If you want to > accumulate some state during this recursion, you can add a loop binding to > collect info and return it at the end instead. >