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 end?

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

clojure.core.match/match: very strange behavior

2017-01-30 Thread Joachim De Beule
Does anybody understand what is going on here? (require '[clojure.core.matcher :refer [match]] (import '[org.joda.time DateTimeZone DateTime]) (def dt (DateTime. 2013 02 12 4 30 0 (DateTimeZone/forOffsetHours -2))) (def dt2 (clj-time.coerce/from-string "2013-02-12T04:30:00.000-02:00")) (match

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

2016-10-18 Thread Joachim De Beule
Hi Marshall, You might want to have a look at https://github.com/aphyr/gnuplot >From the repo: "Datasets are streamed as sequences directly to gnuplot's stdin, so there's no temporary files to worry about. Yep, lazy sequences are streamed lazily. My laptop can plot about 10 million points in

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

[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 be patient

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 you

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 ;;

[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 received this message because

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

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

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 unsubscribe

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.com

Advice on implementing atomic read/write socket operations

2014-06-02 Thread Joachim De Beule
Dear group, I have the following use case: I have a socket connection to an external service. I want several threads to use the same connection. Importantly, in order to get a synchronized response from the external service, every write must be followed by a read before another write is

Re: Kwargs vs explicit parameter map for APIs?

2014-04-30 Thread Joachim De Beule
my two cents: The extra readability to users when using keyword args also comes from the fact that a function's options are explicit in its signature. So during development, instead of having to look them up in the docs or in the code, my emacs mini-buffer simply shows them to me. Although I

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

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

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

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

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 message

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 to

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 moderated - please

Re: [ANN] Jig

2014-02-05 Thread Joachim De Beule
Hi Malcolm, I have a follow up question if you don't mind. Suppose I want to define a component that starts a thread and regularly checks a resource. If the resource changes, this has repercussions for other (dependent) components. How would you do that in jig? Maybe this question is too

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 Groups

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 separate

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

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: 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@googlegroups.com

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

Re: map vs map in core.async

2013-12-13 Thread Joachim De Beule
: 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 Why? They're getting buffered. Try this: (as/pipe (as/map (fn [x] (print ) (flush) x) source

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

Re: Memory leak problem

2013-09-17 Thread Joachim De Beule
Dear Andy, Thanks for your reply. I am using java version 1.6.0_51. I'm a bit reluctant to upgrade however, so I was wondering how sure you are that this is indeed the problem? The problem persists after calling clojure.tools.reader.edn/read on (java.io.PushbackReader. (clojure.java.io/reader

Re: Memory leak problem

2013-09-17 Thread Joachim De Beule
Dear Brian, Thanks for your reply. I tried to use jmap, unfortunately it fails: bash-3.2$ jmap -F -dump:file=heap.bin 58708 Attaching to process ID 58708, please wait... Debugger attached successfully. Server compiler detected. JVM version is 20.51-b01-457 Dumping heap to heap.bin ... Exception

Memory leak problem

2013-09-16 Thread Joachim De Beule
Dear List, I'm experiencing a memory leak and I don't understand why. I have a bunch of 50 files on disk called data-1.edn through data-50.edn. I perform the following code: (def all-processed-data (reduce (fn [ret f] (merge ret (process-data (clojure.tools.reader.edn/read-string (slurp

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

2013-09-09 Thread Joachim De Beule
Hi List, As documented at http://clojure.org/reader, defining a record with defrecord also installs a reader form, e.g.: (ns test) (defrecord X [a b]) (read-string #test.X{:a :foo, :b :bar}) = test.X{:a :foo, :b :bar} However, the record reader form does not seem to be visible to

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

2013-09-09 Thread Joachim De Beule
-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: 1) Is it really required that any non-standard

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. I am not changing between namespaces

merge nested maps

2013-04-25 Thread Joachim De Beule
Hi list, I was searching for an easy way to combined nested maps, e.g. as in (combine {:foo {:bar baz}} {:foo {:x y}}) = {:foo {:bar baz, :x y}} I would expect that there is some core map operation to do this, but neither merge nor unify work as they simply return {:foo {:x y}}, and I don't

Re: problem redefining protocols and records in emacs+nrepl

2013-03-01 Thread Joachim De Beule
) On 27/02/13 15:48, Joachim De Beule wrote: Hi all, I'm doing interactive development with emacs+clojure-mode+nrepl and I'm experiencing some seriously annoying problems with protocols and records implementing the protocols: 1) When I redefine a protocol by adding a method

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 ne...@isismanor.com On Fri, Mar 1, 2013 at 3:44 PM, Joachim De Beule joachim.de.be

problem redefining protocols and records in emacs+nrepl

2013-02-27 Thread Joachim De Beule
Hi all, I'm doing interactive development with emacs+clojure-mode+nrepl and I'm experiencing some seriously annoying problems with protocols and records implementing the protocols: 1) When I redefine a protocol by adding a method to it, and then re-implement a record according in accordance to

Re: problem redefining protocols and records in emacs+nrepl

2013-02-27 Thread Joachim De Beule
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'm experiencing some seriously annoying problems with protocols and records implementing the protocols: 1) When I redefine

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 the problems with a few

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 namespaces 1, 2 and 3

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 joachim@gmail.comjavascript: wrote

Help on implementing a simple java (openNLP) EventStream interface

2013-02-14 Thread Joachim De Beule
Hi All, I want to turn a clojure sequence into an 'EventStream' java interface in clojure (see http://opennlp.apache.org/documentation/1.5.2-incubating/apidocs/opennlp-maxent/index.html). Basically this is an object that implements next() and hasNext() methods. I know this can be done with

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 Bleserhttp://www.enigmeta.com/ Wim De Clerq) I’m planning to organise a Clojure meetup in

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

2013-02-14 Thread Joachim De Beule
))) (hasNext [] (not (empty? @remaining)) 2013/2/14 Ulises ulises.cerv...@gmail.com 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 February 2013 13:58, Joachim De

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

2013-02-14 Thread Joachim De Beule
Hi All, I know how to call static java methods such as the ones defined here: http://grepcode.com/file/repo1.maven.org/maven2/org.apache.opennlp/opennlp-maxent/3.0.2-incubating/opennlp/maxent/GIS.java, e.g. trainModel(...). However, before I call this method I want to change the value of

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

2013-02-14 Thread Joachim De Beule
2013 14:22, Joachim De Beule joachim@gmail.comwrote: Thanks! So you mean like this (assuming some function elt-event): (defn seq-event-stream [input-seq] (let [remaining (atom input-seq)] (proxy [EventStream] [] (next [] (let [current (first @remaining

how to write a macro that calls defrecord?

2012-04-02 Thread Joachim De Beule
Hi All, I need to define a number of similar records, so I wanted to write a macro for that, but I do not know how. Basically, I tried the following: (defprotocol MyProtocol (do-something [this])) (defmacro my-defrecord [name [ fields] body] `(defrecord ~name ~fields MyProtocol

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 leontal...@gmail.com 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

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