Re: strange problem

2012-01-17 Thread joachim
me. Anyway, thanks again! Joachim. -- 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 unsu

Clojure doesn't find java class

2012-01-17 Thread joachim
ons jar, Apparently it is not found. I can not import it either. What am I doing wrong? Thanks, Joachim. -- 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 ne

How to loop over several sequences in parallel for side-effects?

2012-01-20 Thread joachim
Hi All, Here is a simple problem for which I nevertheless can't seem to find the right solution: How to run over several sequences in parallel for side-effects? Here is one way: (dorun (map some-fn-with-side-effects sequence-1 sequence-2)) However, I was told that the form "(dorun (map ...

Re: strange problem

2012-01-20 Thread joachim
On Jan 18, 8:23 pm, Andy Fingerhut wrote: > I don't have some code lying around to do that, but I might make one.  The > name strings would require several megabytes of storage, but as long as you > don't mind that... I wouldn't mind, but the code your provided is already more than I was hoping f

Re: How to loop over several sequences in parallel for side-effects?

2012-01-24 Thread joachim
First: Thanks all for your thoughts. Second: I have the same question as Allen (why would the doseq variant be faster in this case?) Finally: so I guess that what I did was also OK then? Jm On Jan 20, 9:57 pm, Alan Malloy wrote: > But I don't see any reason why this would be faster than (dorun

How to add a new type of collection?

2012-01-24 Thread joachim
, Joachim. -- 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,

Re: How to add a new type of collection?

2012-01-25 Thread joachim
ot sure why, and also not when to use atoms in general? Anyway, thanks again, and I would be happy to hear any further comments and suggestions! Joachim. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

How to pass clojure.core/read-str reader-forms to clojure.tools.reader.edn/read-str?

2013-09-09 Thread Joachim De Beule
via the :readers option)? and 2) If so, how do I get to the reader-forms of clojure.core/read-str, e.g. for reading records? Thanks! Joachim. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@

Re: How to pass clojure.core/read-str reader-forms to clojure.tools.reader.edn/read-str?

2013-09-09 Thread Joachim De Beule
;defrecord-and-edn-reader' macro, but this seems a bit overkill? Joachim. Op maandag 9 september 2013 14:30:20 UTC+2 schreef Meikel Brandmeyer (kotarak): > > Hi, > > Am Montag, 9. September 2013 14:21:12 UTC+2 schrieb Joachim De Beule: >> >> So my questions are: >

Re: [ANN] Jig

2014-06-25 Thread Joachim De Beule
Hi Malcolm, me again :-) I've been using (and loving) jig now for quite some time and have reached the point where I want to start using my code in a production environment. There are several things that need to get fixed though, most importantly: 1) Testing. Have you by any chance thought more

Re: [ANN] Jig

2014-06-25 Thread Joachim De Beule
Just a small follow up, in the mean time I did manage to get the code running as daemon using Tanuki's service wrapper by setting the wrapper.working.dir to the main project's root. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gr

[ANN] clojure client/wrapper for vowpal wabbit

2014-09-11 Thread Joachim De Beule
Dear list, I'd like to announce a pre-release of a clojure client/wrapper for vowpal wabbit, see engagor/clj-vw <https://github.com/engagor/clj-vw> and clj-vw 1.0.0-RC2 - Clojars <https://clojars.org/engagor/clj-vw>. All feedback/help welcome! Joachim. -- You rece

atom swap! versus ref dosync+alter?

2014-09-30 Thread Joachim De Beule
Dear list, I've got two threads that update the same location. One of them takes a lot of time. Given this, my question is if there is a reason to prefer an atom or a ref? i.e.: 1) with an atom: (def a (atom [])) ;; the slow thread (future (swap! a #(do (Thread/sleep 5000) (conj % 1 ;; t

Re: [ANN] async-sockets - work with sockets using core.async channels

2014-10-06 Thread Joachim De Beule
Could you please expand on this, Zach? > Please note that if you use core.async with java.nio, you need to make > sure backpressure is properly propagated (this happens automatically with > java.io, assuming you have a thread per connection) > Thanks! -- You received this message because y

Re: Clojure with Tensorflow, Torch etc (call for participation, brainstorming etc)

2016-10-07 Thread Joachim De Beule
For those interested: here's some work on using deeplearning4j in clojure (no abstractions added, simply a port of the nd4j and deeplearning4j API's to 'clojuresque' functions and multimethods.) https://github.com/engagor/dl4clj If anybody wants to contribute they're welcome of course! Op vrij

Re: [ANN] clj-xchart – A charting/plotting library for Clojure

2016-10-18 Thread Joachim De Beule
million points in about a minute, and most of the CPU time is spent inside gnuplot in that test, so I'm reasonably happy." Cheers, Joachim. Op maandag 17 oktober 2016 07:54:41 UTC+2 schreef Mars0i: > > Looks very nice! Thanks Jean Niklas. I've been using Incanter for chart

clojure.core.match/match: very strange behavior

2017-01-30 Thread Joachim De Beule
2:00")) (match dt dt2 true :else false) ;; => true ;; so far so good .. (defn dt-matcher [dt] (fn [dt2] (match dt dt2 true :else false))) ((dt-matcher dt) dt2) ;; => false ;; ??? -- Joachim -- You received this message because you are subscribed to the Google Groups "Clojur

Re: tool.namespace reload not working

2017-04-03 Thread Joachim De Beule
Hi JPatrick. I'm having the same sort of problems. Quite annoying! Did you manage to fix this in the end? Hello, >>> I'm trying to implement the Component ideology. When run something >>> manually with component/start-system and stop, it works fine. The main >>> method calls component/start-sys

Re: tool.namespace reload not working

2017-04-04 Thread Joachim De Beule
Turns out my problems were due to AOT compiling. Doing `lein clean` before firing up the repl fixed things. Op maandag 3 april 2017 10:34:03 UTC+2 schreef Joachim De Beule: > > Hi JPatrick. I'm having the same sort of problems. Quite annoying! Did you > manage to fix this in the

[ANN] port of Deeplearning4j RNN example to clojure

2016-02-09 Thread Joachim De Beule
see https://github.com/joachimdb/dl4clj, all comments welcome! Joachim -- 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

Re: [ANN] Jig

2014-02-05 Thread Joachim De Beule
d then I guess it should also call user/reset? Or am I still missing something here? BTW, not that I want to press you, but do you have any idea when you will be finishing up version 2? I ask because it seems that the github code currently is kind of in-between versions... Thanks again, Joachim.

Re: [ANN] Jig

2014-02-06 Thread Joachim De Beule
Thanks so much for your suggestions Malcolm, very helpful and illuminating! Joachim. -- 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

clj-http client translated from php/curl implementation fails, why?

2014-02-13 Thread Joachim De Beule
Dear list, [Sorry if this may be a bit of topic, but I don't know much about php and http, and I'm not sure where else to turn] I'm trying to port a working php api client implementation to clojure. So on the one hand, I've got the following working php code for performing a signed post reques

Re: clj-http client translated from php/curl implementation fails, why?

2014-02-13 Thread Joachim De Beule
That did the trick! Thanks!! Op donderdag 13 februari 2014 13:35:46 UTC+1 schreef Gijs S.: > > Untested of course, but I think you need to use either :body or > :form-params rather than :query-params to put the query-params data into > the body of the post request. > -- You received this messa

Re: clj-http client translated from php/curl implementation fails, why?

2014-02-13 Thread Joachim De Beule
Solved by Gijs S., but thanks anyway, I didn't know about httpbin.org. Op donderdag 13 februari 2014 14:03:18 UTC+1 schreef Kevin Ilchmann Jørgensen: > > They return identical data if you use http://httpbin.org/post as url ? > > /Kevin > > -- You received this message because you are subscribed

Re: [ANN] Jig

2014-03-11 Thread Joachim De Beule
Dear Malcolm. I'm still having trouble seeing the intended flow, and I have the feeling I'm missing something. My first question is why I would create two separate components C and A, instead of just having one component A that both installs a channel in the system map and starts a thread for

Re: [ANN] Jig

2014-03-11 Thread Joachim De Beule
update: I made mistake at the end of my previous post: I mean "that the db component does NOT sufficiently encapsulate the internals" of course... -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegrou

Re: [ANN] Jig

2014-03-18 Thread Joachim De Beule
Got it! :-) One more thing. While developing, I often have to deal with large amounts of data that take quite a while to load. However, the data is lost and so has to be reloaded after every reset, which is a bit annoying. Is there a way to prevent this? -- You received this message because

Re: Kwargs vs explicit parameter map for APIs?

2014-04-30 Thread Joachim De Beule
ugh I do agree with all the good reasons against keywords arguments, to me this is still the decisive reason to prefer them... Joachim Op woensdag 30 april 2014 05:41:29 UTC+2 schreef James Reeves: > > On 30 April 2014 03:54, Sean Corfield >wrote: > >> I still think the keyword a

Advice on implementing atomic read/write socket operations

2014-06-02 Thread Joachim De Beule
rom a different thread B, blocks thread A and queues it until thread B's write/read call is finished and the connection is released. Is this a good strategy? How would it best be implemented using clojure's concurrency supporting features? All advice much appreciated! Joachim -- You rece

Re: Advice on implementing atomic read/write socket operations

2014-06-03 Thread Joachim De Beule
That's indeed what I needed! 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 unsubscrib

Re: Advice on implementing atomic read/write socket operations

2014-06-03 Thread Joachim De Beule
Thanks a lot Timothy! Unfortunately, I don't control the remote end, otherwise I would indeed use request ID's and core.async as you suggest. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.co

Memory leak problem

2013-09-16 Thread Joachim De Beule
t of processing a datafile is a map of about 200k only, so that the map returned by the entire above expression is only about 10 Megabytes. Nevertheless, executing the above code fills up memory and eventually stops clojure from functioning. Why? Thanks a lot for any suggestions! Joachim.

Re: Memory leak problem

2013-09-17 Thread Joachim De Beule
eader f)) by the way, so maybe it's something else after all? Joachim. -- -- 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

Re: Memory leak problem

2013-09-17 Thread Joachim De Beule
ava:25) at java.lang.reflect.Method.invoke(Method.java:597) at sun.tools.jmap.JMap.runTool(JMap.java:179) at sun.tools.jmap.JMap.main(JMap.java:110) Caused by: sun.jvm.hotspot.oops.UnknownOopException As for visualvm: it never seems to finish producing a heap dump :( Joachim. -- -- You rec

map> vs map< in core.async

2013-12-12 Thread Joachim De Beule
Dear list, I'm playing around with core.async and I don't understand the following. 1) I make a "source" channel that emits a random number every second. (def continue (atom true)) (def source (let [out (as/chan)] (as/go-loop [] (when @continue (as/pu

Re: map> vs map< in core.async

2013-12-13 Thread Joachim De Beule
3 04:28:53 UTC+1 schreef Carlo: > > On Thu, Dec 12, 2013 at 06:08:11PM -0800, Joachim De Beule wrote: > > I expected to see a sequence of the form "<><><>...". However, only one > or > > very few ">" get printed, so I get a sequence &quo

Re: map> vs map< in core.async

2013-12-16 Thread Joachim De Beule
Thanks, that's very helpful! -- -- 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 fr

Re: How to handle configuration in Clojure?

2014-01-13 Thread Joachim De Beule
There's also this: https://github.com/clojure-cookbook/clojure-cookbook/blob/master/local-io/edn-config/edn-config.asciidoc Joachim -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@g

Re: [ANN] Jig

2014-01-22 Thread Joachim De Beule
Very impressive work! I was thinking of letting components not only implement the Lifecycle protocol but also a protocol that defines the functionality of the component. To give a simple example, there could be a jdbc component that establishes a connection on init etc., and which also impleme

Re: [ANN] Jig

2014-01-22 Thread Joachim De Beule
(follow up) I just realized that another approach would be to hold the jdbc connection type implementing the JDBCProtocol in system under [:jdbc-component :db] or something, and then call the clojure.java.jdbc/query like functions on that. Anyway, I would be very happy to hear your comments on

Re: [ANN] Jig

2014-01-23 Thread Joachim De Beule
Op maandag 21 oktober 2013 02:41:43 UTC+2 schreef frye: > > Also, is there a Google Group for Jig? I'm playing around with it, can see > the potential, and already have some questions. > +1 for the google group .. -- -- You received this message because you are subscribed to the Google Grou

Re: [ANN] Jig

2014-01-23 Thread Joachim De Beule
Hi Malcolm, Thank you for your very helpful reply! Indeed, I've also been thinking about "database components", "elasticsearch components", "memcache components" and so on that all are async/channels (or something) but failed to find the right abstraction so far, so probably it is best to sep

Help on implementing a simple java (openNLP) EventStream interface

2013-02-14 Thread Joachim De Beule
increment the index after a call to next() etc. Any ideas on how to best do something like this? Thanks a lot! Joachim. -- -- 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

Re: Belgium Clojure Meetup

2013-02-14 Thread Joachim De Beule
Hi there, I might join if the event takes place in Ghent. grtz Op maandag 11 februari 2013 23:11:36 UTC+1 schreef Thomas Goossens het volgende: > > *With some fellow Belgian clojurians (Frederik De > Bleser& Wim De Clerq) I’m planning to organise a > Clojure meetup

Re: Help on implementing a simple java (openNLP) EventStream interface

2013-02-14 Thread Joachim De Beule
>event current))) (hasNext [] (not (empty? @remaining)) 2013/2/14 Ulises > How about having your methods access an atom provided in a closure like > it's done here: > http://kotka.de/blog/2010/03/proxy_gen-class_little_brother.html > > U > > > On 14 Febru

How to set the value of a static variable in a java factory class from clojure?

2013-02-14 Thread Joachim De Beule
the variable SMOOTHING_OBSERVATION (see above link section #SMOOTHING_OBSERVATION). My problem is that I don't know how to do that from clojure? Thanks a lot! Joachim -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to t

Re: Help on implementing a simple java (openNLP) EventStream interface

2013-02-14 Thread Joachim De Beule
est) (case->event current features-extractor labeler))) (hasNext [this] (not (empty? @remaining)) May I ask why that would be faster? And when proxy is preferred over reify? Joachim. 2013/2/14 Max Penet > > Also It looks like you could use reify instead of proxy here, it wou

Re: How to set the value of a static variable in a java factory class from clojure?

2013-02-15 Thread Joachim De Beule
yes, that works. thanks! Op donderdag 14 februari 2013 17:07:31 UTC+1 schreef Baishampayan Ghose het volgende: > > Haven't looked at the code, but `set!` should work. ~BG > > Sent from phone. Please excuse brevity. > On 14 Feb 2013 21:30, "Joachim De Beule" >

problem redefining protocols and records in emacs+nrepl

2013-02-27 Thread Joachim De Beule
restart or close emacs and restart. Any ideas? Joachim -- -- 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

Re: problem redefining protocols and records in emacs+nrepl

2013-02-27 Thread Joachim De Beule
u by any chance trying to create 'mixins'? If yes remember > that for a protocol to be fully populated , it must be extended fully > per individual type (quote from the JOy of Clojure) > > > On 27/02/13 15:48, Joachim De Beule wrote: > > Hi all, > > > &g

Re: problem redefining protocols and records in emacs+nrepl

2013-02-27 Thread Joachim De Beule
(At the end of my previous update, I mean namespaces 1, 2 and 3 instead of A, B and C. Sorry for that ...) Op woensdag 27 februari 2013 23:49:42 UTC+1 schreef Joachim De Beule het volgende: > > Hi Jim, > > I'm sorry I can't really be more specific. I tried to duplicate

Re: problem redefining protocols and records in emacs+nrepl

2013-02-27 Thread Joachim De Beule
Oops, sorry again, this last problem was just a stupid mistake, pls ignore it (I guess I'm not just getting annoyed but also a bit too suspicious) Op woensdag 27 februari 2013 23:53:46 UTC+1 schreef Joachim De Beule het volgende: > > (At the end of my previous update, I mean namespac

Re: problem redefining protocols and records in emacs+nrepl

2013-03-01 Thread Joachim De Beule
l to be fully populated , it must be extended fully > per individual type (quote from the JOy of Clojure) > > > On 27/02/13 15:48, Joachim De Beule wrote: > > Hi all, > > > > I'm doing interactive development with emacs+clojure-mode+nrepl and > > I&

Re: problem redefining protocols and records in emacs+nrepl

2013-03-01 Thread Joachim De Beule
The problem is precisely that I cannot create *novel* instances after redefining the record, apparently because it tries to initialise them according to the old definition. 2013/3/1 Neale Swinnerton > > On Fri, Mar 1, 2013 at 3:44 PM, Joachim De Beule < > joachim.de.be...@gmai

merge nested maps

2013-04-25 Thread Joachim De Beule
rge nor unify work as they simply return {:foo {:x "y"}}, and I don't see anything else. Am I missing something? Joachim. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegrou

Re: problem redefining protocols and records in emacs+nrepl

2013-05-16 Thread Joachim De Beule
Just a small follow up in case somebody else hits the same problems: they disappear after a "lein clean"... Op vrijdag 1 maart 2013 17:52:36 UTC+1 schreef Jim foo.bar het volgende: > > On 01/03/13 16:17, Joachim De Beule wrote: > > I'm not sure what you mean

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-07 Thread Joachim De Beule
On Mar 7, 6:39 pm, Leon Talbot wrote: > If so, how ? > > Thanks ! Please define "readable". 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 m

how to write a macro that calls defrecord?

2012-04-02 Thread Joachim De Beule
Protocol (do-something [this] this) ~@body)) But then when I call (my-defrecord R [content]), which expands into the following (valid) code: (defrecord R (content) tmp-protocol (do-sth [this] this)), Then I get the RunTimeException "No such var: this"? Any ideas? Best, Joachim.

Re: How to add a new type of collection?

2012-01-28 Thread Joachim De Beule
Well, I also do not want to re-invent the wheel. Some of these libraries are really optimized for both memory and speed (yes, I will need both) and already provide a great deal of useful functionality that I would otherwise have to implement myself. I just want to make sure I am doing it right and