Re: Log4j2 integration classloading woes

2021-01-23 Thread Dimitrios Jim Piliouras
Hi Eugen, Many thanks for your response, and apologies for the late reply. I followed the JIRA conversation and the various links, and ended up here [1] which seems to be the exact problem I am facing. The thing is that this seems to have resolved on Java side many years ago. I believe I was

[ANN]: drand-clj

2020-08-22 Thread Dimitrios Jim Piliouras
Hi folks, This is a Clojure client for the drand [1,2] HTTP api. https://github.com/jimpil/drand-clj Kind regards, Dimitris [1]: https://drand.love/ [2]: https://github.com/drand/drand -- You

Re: Why is `binding-conveyor-fn` private?

2020-08-21 Thread Dimitrios Jim Piliouras
Yeah good point, thanks Sean :) Kind regards On Fri, 21 Aug 2020, 19:32 Sean Corfield, wrote: > Isn't that what bound-fn and bound-fn* are for? > > On Fri, Aug 21, 2020 at 11:21 AM Dimitrios Jim Piliouras < > jimpil1...@gmail.com> wrote: > >> Hi folks, >> >

Why is `binding-conveyor-fn` private?

2020-08-21 Thread Dimitrios Jim Piliouras
Hi folks, I don’t get this… Why would such a neat/important utility private? Every time I submit/schedule a function to some Executor manually (not via `future` or `agent`), I need to remember to wrap it with `binding-conveyor-fn` (otherwise dynamic bindings won’t get propagated), and every

Re: ANN: jedi-time 0.1.4

2020-02-03 Thread Dimitrios Jim Piliouras
t; takes you back to the object world on the left, corresponding to the place > on the right that you'd get to via get etc. > > See if this blog post helps > https://corfield.org/blog/2018/12/03/datafy-nav/ > > > On Sun, Feb 2, 2020 at 1:22 AM Dimitrios Jim Piliouras < > jimpil1

RE: ANN: jedi-time 0.1.4

2020-02-02 Thread Dimitrios Jim Piliouras
or converted to an alternate version? 3. Why would I ever navigate the existing keys of a map via `nav` (as opposed to the standard functions)? Kind regards, Dimitris From: Dimitrios Jim Piliouras Sent: 02 February 2020 09:22 To: clojure@googlegroups.com Subject: RE: ANN: jedi-time 0.1.4 Hi Sean

RE: ANN: jedi-time 0.1.4

2020-02-02 Thread Dimitrios Jim Piliouras
Hi Sean, Admittedly, I’ve never used REBL, and I did struggle with the shape and name of the `nav` arguments... In particular I’m struggling to understand why would anyone use `nav` to navigate to a key that already exists in the map...Can’t we just use `get` or `get-in`? You used the

[ANN] - cryptohash-clj 0.1.6

2019-11-24 Thread Dimitrios Jim Piliouras
Hi folks, Robust cryptographic hashing/verifying facilities (pbkdf2, bcrypt, scrypt, argon2). https://github.com/jimpil/cryptohash-clj I’ve opened an issue with the guys over at BouncyCastle, over the fact that their openBSD bcrypt encoding/decoding utilities are private and so consumers are

Re: Bizarre issue when calling protocol-fn wrapper from different namespace

2019-11-22 Thread Dimitrios Jim Piliouras
t;> >> there is no foo/x unless you defined one - the protocol function is >> created by defprotocol and is not owned by the object implementing the >> protocol >> >> On Thu, Nov 21, 2019 at 3:29 PM Dimitrios Jim Piliouras >> wrote: >>> &

Re: Bizarre issue when calling protocol-fn wrapper from different namespace

2019-11-21 Thread Dimitrios Jim Piliouras
belongs to the protocol namespace no > > matter where it is called, and calling it as if it belonged to the > > namespace defining the object extending the protocol will and should > > fail > > > > On Thu, Nov 21, 2019 at 1:57 PM Dimitrios Jim Piliouras > > wrote: >

Bizarre issue when calling protocol-fn wrapper from different namespace

2019-11-21 Thread Dimitrios Jim Piliouras
Hi folks, This has me completely stumped - I would massively appreciate a helping hand! Suppose the following simple directory structure: — someProject.impl.{foo.clj, bar.clj,baz.clj} — someProject.proto.clj — someProject.api.clj `proto.clj` contains a single protocol with two methods - let’s

Re: ClojureScreencasts.com domain

2019-01-29 Thread Jim Slattery
I don't have a set price, it doesn't have to cost much... Just looking for a good steward for the domain. -- 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

ClojureScreencasts.com domain

2019-01-29 Thread Jim Slattery
Hi, would anyone in the Clojure community be interested in purchasing the ClojureScreencasts.com domain? I had created a lot of introductory videos a few years ago, but the site has been idle. Maybe someone else in the community would like to do something useful with that domain? Thanks, Jim

Re: [ANN]: clambda 0.1.4 - reducible Java Streams

2018-08-10 Thread Dimitrios Jim Piliouras
Hi Andrew, Well, for the native java Stream case, your 'early-spliterator' has to be able to split the Spliterator it's wrapping instead of always returning nil. For the Stream around a seq case, you need to ditch 'iterator-seq', and implement something splitable. See my SeqSpliterator deftype...

Re: Luminus in Techempower benchmarks

2016-02-29 Thread Jim Crossley
Sounds good, Dmitri. I'll work up something on a fork in the next few days and ping you. We can go from there. Jim On Mon, Feb 29, 2016 at 2:33 PM, Dmitri <dmitri.sotni...@gmail.com> wrote: > Hi Jim, > > I'm the author of Luminus, and I'd love tow work with you to tune up th

Re: Luminus in Techempower benchmarks

2016-02-28 Thread Jim Crossley
that, Jim On Sunday, February 28, 2016 at 1:32:09 PM UTC-5, Jim Crossley wrote: > > Hi, > > Luminus uses Immutant, which uses Undertow, so it should be possible > to tune the Luminus app to approach the performance of the TechEmpower > Undertow app. The relevant options to i

Re: Luminus in Techempower benchmarks

2016-02-28 Thread Jim Crossley
this is to distinguish each handler with a unique :path option. I'm happy to assist whoever is maintaining that app with the tuning. Thanks, Jim [1] http://immutant.org/documentation/current/apidoc/immutant.web.html#var-run [2] https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/Java

Re: Apparent bug with more than 5000 command line arguments

2015-10-16 Thread Jim
Although I am still curious as to why it works in the uberjar but not with lein run. On Thursday, October 15, 2015 at 10:52:52 PM UTC-7, Jim wrote: > > Yep you are right. I figured it out right after I posted this :) > > On Thursday, October 15, 2015 at 10:46:01 PM UTC-7, Andy Fin

Re: Apparent bug with more than 5000 command line arguments

2015-10-15 Thread Jim
Yep you are right. I figured it out right after I posted this :) On Thursday, October 15, 2015 at 10:46:01 PM UTC-7, Andy Fingerhut wrote: > > James: > > This sounds to me likely to be known and expected behavior of xargs. Any > OS has maximum limitations on either number and/or total size of

Re: Immutant survey

2015-04-02 Thread Jim Crossley
Here are the results: http://immutant.org/news/2015/04/02/survey-results/ Thanks! Jim On Thursday, March 12, 2015 at 12:11:27 PM UTC-4, jaju wrote: Very curious to know - how's the response been? A happy user, jaju On Fri, Mar 6, 2015 at 8:01 PM, Jim Crossley jcros...@gmail.com

Re: Immutant survey

2015-03-12 Thread Jim Crossley
As of this moment, we've received 46 responses, mostly positive, some with very thoughtful feedback, for which we're very grateful. We plan to post the results on immutant.org in a couple weeks. Thanks, Jim On Thu, Mar 12, 2015 at 12:10 PM, Ravindra Jaju ravindra.j...@gmail.com wrote: Very

Immutant survey

2015-03-06 Thread Jim Crossley
Hi friends, If you have any opinion about Immutant [1], would you please take a few moments to fill out this short survey? http://goo.gl/forms/syYnYtpM4v We're trying to get a sense of how Immutant is being used. Thanks so much! Jim [1] http://immutant.org -- You received this message

Re: Using the Undertow AJP Linstner in Immutant2

2015-02-20 Thread Jim Crossley
Cool. Submit a PR and we'll get it merged in. Thanks! Jim On Fri, Feb 20, 2015 at 4:25 AM, Eunmin Kim telepopso...@gmail.com wrote: Hi! I added ajp? on immutant.web/run option to use the Undertow AJP Linstner in Immutant2. :) https://github.com/eunmin/immutant/tree/support_undertow_ajp

[ANN] Immutant 2.0.0-beta2

2015-02-10 Thread Jim Crossley
you. Thanks! Jim -- 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

[ANN] Immutant 2.0.0-alpha1 The Deuce

2014-08-27 Thread Jim Crossley
server, a more permissive Apache license, and hopefully cleaner API's. Thanks, Jim -- 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

[ANN] lein-modules 0.3.1

2014-05-09 Thread Jim Crossley
: Pedestal [3] and Ring [4]. I did this mainly to harden lein-modules, just as an exercise to expose potential bugs. But those three may serve as examples for your own projects if you're interested. Have fun! Jim [1] https://github.com/jcrossley3/lein-modules [2] https://github.com/immutant

Re: Kwargs vs explicit parameter map for APIs?

2014-04-30 Thread Jim Crossley
We used kwargs for options extensively in Immutant 1.x, and we're moving to explicit maps for Immutant 2.x, for the reasons cited above. It's not obvious to me why the bad release-sharks example on the coding standards page [1] is bad. Why should the optional config be the least variance

Re: Kwargs vs explicit parameter map for APIs?

2014-04-30 Thread Jim Crossley
, Apr 30, 2014 at 10:03 AM, Jim Crossley j...@crossleys.org wrote: We used kwargs for options extensively in Immutant 1.x, and we're moving to explicit maps for Immutant 2.x, for the reasons cited above. It's not obvious to me why the bad release-sharks example on the coding standards page [1

Re: Kwargs vs explicit parameter map for APIs?

2014-04-30 Thread Jim Crossley
Unless I'm missing something subtle, all of your points would hold if you removed the in your argument vector to turn your kwargs into an explicit map, wouldn't they? One advantage is you'd be able to (apply f [m]), but I'm not sure the :or logic would be any less troublesome. On Wed, Apr 30,

Re: Kwargs vs explicit parameter map for APIs?

2014-04-30 Thread Jim Crossley
2014 15:04, Jim Crossley j...@crossleys.org wrote: Unless I'm missing something subtle, all of your points would hold if you removed the in your argument vector to turn your kwargs into an explicit map, wouldn't they? One advantage is you'd be able to (apply f [m]), but I'm not sure

Re: Style - Keyword access or accessors?

2014-04-22 Thread Jim
there is really no reason to use `get-in` with keywords/symbols as they know how to look themselves up...in other words, you don't need to pay for any polymorphic calls : (get-in [:a :b :c :d] someMap) = (- someMap :a :b :c :d) Jim On 22/04/14 10:49, Daniel Kersten wrote: For navigating

[ANN] Immutant 1.1.1 released

2014-04-08 Thread Jim Crossley
(or EAP) app server. Feel free to help or lurk: http://immutant.org/community/ Love, Jim -- 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: threading operators

2014-03-21 Thread Jim Crossley
Seen this? http://blog.jayfields.com/2012/09/clojure-refactoring-from-thread-last-to.html On Friday, March 21, 2014 7:42:34 AM UTC-4, Andy Smith wrote: I have a chain of operations where i want to use a mixture of - and - (i.e. some functions expect the previous result to be fed into the

Re: Creating multi-module projects with dependencies between modules

2014-03-20 Thread Jim Crossley
, Jim On Monday, March 17, 2014 11:19:37 PM UTC-4, Dave Kincaid wrote: Thanks, I'll try to show you what I have pieced together from your example and the immutant project. Right now I'm just trying to make it work, so I just have a project with 2 modules. There is lambda-common and lambda-etl

Re: reduced

2014-03-19 Thread Jim
I think `reduced` was added in 1.4... 4clojure is on 1.2 right? Jim On 19/03/14 16:44, Andy Smith wrote: Hi, Ive been looking at http://www.4clojure.com/problem/137 and I have a solution : (fn [x b] (reduce #(let [r (quot x %2) d (mod r b)] (if (zero? r) (reduced %1) (conj %1 d

Re: Creating multi-module projects with dependencies between modules

2014-03-17 Thread Jim Crossley
or point me to them if public, and tell me what you tried that didn't work, I can try to get you going. Jim On Mon, Mar 17, 2014 at 10:55 PM, Dave Kincaid kincaid.d...@gmail.comwrote: I'm trying to create a project with multiple modules where there are some dependencies between modules. So far

Re: printing vals from a static hashmap

2014-03-07 Thread Jim
On 07/03/14 09:39, d0nski wrote: Can someone advise on the best way to print out this hashmap to file? for dumping the entire map: (spit /tmp/final.txt (pr-str staticMeasureMap)) for just the values: (spit /tmp/final.txt (pr-str (vals staticMeasureMap))) HTH, Jim -- You received

Re: map and lazy sequence

2014-02-28 Thread Jim - FooBar();
Clojure works on a chunked basis for performance reasons...THe size of a chunk is 32 elements - thus you would actually get 32 printouts if you supplied a collection larger than 31 elements. Jim On 28/02/14 17:04, Andy Smith wrote: Hi, Can someone correct my misunderstanding here. I

[ANN] lein-modules 0.2.0

2014-02-27 Thread Jim Crossley
/lein-modules For another example, I recently pushed my lein-ization of Immutant to its master branch. Somewhat disturbingly, it can now be built with *either* Maven or Leiningen. But I'm not advocating that. :) Love, Jim -- You received this message because you are subscribed to the Google Groups

Re: Email delivery libs not working

2014-02-24 Thread Jim - FooBar();
:port 587}))) Jim On 24/02/14 10:33, The Dude (Abides) wrote: Hi, I'm new to clojure and have got a productive handle on CRUD, sessions, routing, writing functions. Last couple things are email delivery, image processing (resizing). So I looked on the clojure-toolbox site for email

[ANN] lein-modules 0.1.0 - multi-module support in Leiningen

2014-02-10 Thread Jim Crossley
to version strings, from which your dependency specs are populated by Leiningen middleware. See the README for more details and an example. Love, Jim -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Error throw when defining function with return type hint

2014-02-10 Thread Jim - FooBar();
testing ^String [] (.toUpperCase hello)) Jim -- 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

Re: How would I write it with concurrency

2014-02-10 Thread Jim - FooBar();
If `session` returns a list, why don't you just do `(take 5 (repeatedly session))` ??? with regards to concurrency I am not sure what you're asking...you want to do the same thing from multiple threads and accumulate a global result? Jim On 10/02/14 18:46, Haim Ashkenazi wrote: Hi I have

Re: [ANN] lein-modules 0.1.0 - multi-module support in Leiningen

2014-02-10 Thread Jim Crossley
place: the parent project.clj. Hope that helps, Jim On Mon, Feb 10, 2014 at 3:42 PM, dgrnbrg dsg123456...@gmail.com wrote: Could you compare lein-modules with lein-voom? I can see that they have different features, but I'm trying get a handle on when each might be appropriate. This looks like

Re: [ANN] lein-modules 0.1.0 - multi-module support in Leiningen

2014-02-10 Thread Jim Crossley
the confusion of also identifying the git repo as a project. So one git repo, identified as a conceptual project, would be organized as 3 Leiningen projects, aka modules. I hope I didn't make things worse, Jim On Monday, February 10, 2014 5:31:27 PM UTC-5, Jim Crossley wrote: I've not used lein

range-sum

2014-02-06 Thread Jim - FooBar();
Hi all, I often see this code for summing up a range from 0-N : `(reduce + (range N))` However there is a much faster way for this : `(/ (* N (dec N)) 2)` Do you think this should be in the language so that people do not use the slow version? Jim -- You received this message because

Re: How to organize clojure functions? A clojure newbie here...

2014-02-03 Thread Jim - FooBar();
managed it is :) HTH, Jim On 03/02/14 08:47, Aravindh S wrote: Hi All, I am new to clojure and have been working with the language for the past one week. I have got a basic hold of the constructs in clojure. I have been programming for 4 years in C# now. One thing I am not able

Re: Programming clojure second Edition

2014-02-03 Thread Jim - FooBar();
a vector is a function of its indices a map is a function of its keys a set is a function of its elements does this help at all? Jim On 03/02/14 15:29, action wrote: (defn index-filter [pred coll] (when pred (for [[idx elt] (indexed coll) :when (pred elt)] idx))) (index-filter

Re: David Nolen's sudoku solver not compatible with Peter Norvig's generator?

2014-01-31 Thread Jim - FooBar();
:) Thanks! Jim -- 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

Re: Should predicates always have one argument?

2014-01-31 Thread Jim - FooBar();
A predicate is something that returns true or false. Nothing more nothing less...you can have as many args as you want - it is still a function predicate :) Jim On 31/01/14 16:44, Ryan wrote: Hello, I am wondering if all my predicates should be one argument functions because I run

David Nolen's sudoku solver not compatible with Peter Norvig's generator?

2014-01-30 Thread Jim - FooBar();
0 0 0 0 0 0 0) user= (count (filter (complement zero?) *1)) 17 has anyone looked at both projects? thanks in advance :) Jim -- 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

Re: equality

2014-01-27 Thread Jim - FooBar();
Use `==` instead: user= (== 42 42.0) true user= (== 42 42M) true Jim On 27/01/14 13:41, Dennis Haupt wrote: one does not simply compare floating point numbers for equality 2014-01-27 Eric Le Goff eleg...@gmail.com mailto:eleg...@gmail.com Newbie question : user= (= 42 42

Re: random thought on #_

2014-01-22 Thread Jim - FooBar();
On 22/01/14 13:21, Christophe Grand wrote: #_ nests nicely: #_#_ comments out the next two expressions. Christophe WHAT?!!! I had no idea.I guess you do learn something new every day :) Jim -- -- You received this message because you are subscribed to the Google Groups Clojure group

Re: [Large File Processing] What am I doing wrong?

2014-01-21 Thread Jim - FooBar();
(rest lines) every time you recurse yes? checking for more lines should be done for *all* current lines, not (rest current-lines)...unless I 've misunderstood something... Jim -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group

Re: Clojure web server benchmarks

2014-01-20 Thread Jim Crossley
the :gen-class servlets included in the benchmarks, and a little better than the Jetty Ring Adapter, which is about what I'd expect. Undertow's numbers are just a skosh below http-kit, and can probably even be improved since the adapter's dep is about 20 betas behind the current release. Jim

Re: Grouping and nested keys in a hash

2014-01-16 Thread Jim - FooBar();
--id 2}} all that's left is the names in the inner map... HTH, Jim On 16/01/14 13:46, James Conroy-Finn wrote: Hello all, I've found myself stuck trying to move matching keys in a hash into a nested hash. For example,: {:a--id 1 :a--name A :b--id 2 :b--name B} ;= {:a {:id 1 :name A} :b {:id

Re: Hello, here´s a new clojur adict... with a question.

2014-01-14 Thread Jim - FooBar();
an atom cannot be used as a function! deref it first to get the vector inside and then try again... Jim On 14/01/14 11:25, Andreas Olsson wrote: Cant get this to work. (def sx2(atom [2 3 4])) (println (sx2 3)) Den tisdagen den 14:e januari 2014 kl. 12:04:27 UTC+1 skrev Omer Iqbal

Re: Type hint using protocol

2014-01-12 Thread Jim - FooBar();
, yes the compiler will let you do it but it won't actually enforce it! May I ask why would you want to do this? Are you hitting any reflection? Jim On 12/01/14 12:38, bob wrote: Hi, Is it possible to add type hint (the type is protocol) to funs? for example: (defprotocol IProtocol (f1

Re: Type hint using protocol

2014-01-12 Thread Jim - FooBar();
...Would you mind sharing sample code that demonstrates the issue, with us? Jim -- -- 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: Type hint using protocol

2014-01-12 Thread Jim - FooBar();
On 12/01/14 13:07, Jim - FooBar(); wrote: On 12/01/14 13:04, bob wrote: Exactly! the compiler throws the reflection warnings, I want to type hint for the input parameters to eliminate the warnings. you must be doing something wrong as a pure protocol based implementation that doesn't

Re: Type hint using protocol

2014-01-12 Thread Jim - FooBar();
Haha I knew it Instead of using .ret-value and .write use cqrs.storage/ret-value and cqrs.storage/write...Also in your ns declaration you don't really need to bring in the protocol. YOu can bring in the functions it defines :) Jim On 12/01/14 13:22, bob wrote: Sure, here has

Re: Type hint using protocol

2014-01-12 Thread Jim - FooBar();
many protocols is to put them all in a single file and :refer :all it. hope that helps, Jim On 12/01/14 13:27, Jim - FooBar(); wrote: Haha I knew it Instead of using .ret-value and .write use cqrs.storage/ret-value and cqrs.storage/write...Also in your ns declaration you don't really need

Re: Type hint using protocol

2014-01-12 Thread Jim - FooBar();
It is not compiling because it cannot find the function...either fully qualify it like in my previous email or change your ns declaration to something like: [cqrs.storage :as stora] and then simply use stora/ret-value, stora/write, stora/write-batch Jim On 12/01/14 13:26, bob wrote: If I

Re: Type hint using protocol

2014-01-12 Thread Jim - FooBar();
there you go: (defprotocol IBark (bark [this])) (in-ns 'other) (set! user/*warn-on-reflection* true) (clojure.core/defrecord Dog [] user/IBark (bark [_] (clojure.core/println WOOF!))) (def d (Dog.)) (user/bark d) ;;NO reflection (.bark d) ;;reflection it should be obvious now :) Jim

Re: Type hint using protocol

2014-01-12 Thread Jim - FooBar();
oops (set! *clojure.core*/*warn-on-reflection* true) instead of (set! *user*/*warn-on-reflection* true) On 12/01/14 13:52, Jim - FooBar(); wrote: there you go: (defprotocol IBark (bark [this])) (in-ns 'other) (set! user/*warn-on-reflection* true) (clojure.core/defrecord Dog [] user

Re: Type hint using protocol

2014-01-12 Thread Jim - FooBar();
are getting reflection with these... Jim -- -- 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

Re: Type hint using protocol

2014-01-12 Thread Jim - FooBar();
On 12/01/14 13:59, Jim - FooBar(); wrote: On 12/01/14 13:57, bob wrote: Thanks for the big help, I treated the protocol as interface. :) no worries :) I was also surprised to see that you are type-hinting the clojure.lang.Atom...why would you do that? from what I can see you are only using

Re: Type hint using protocol

2014-01-12 Thread Jim - FooBar();
On 12/01/14 14:15, Jim - FooBar(); wrote: (map [this f] (let [^DBIterator iterator (.iterator db)] (.seekToFirst iterator) (clojure.core/map #(apply f %) (iterator-seq iterator or even nicer: (map [this f] (let [^DBIterator iterator (doto (.iterator db) .seekToFirst)] (clojure.core

Re: How can I improve this?

2014-01-10 Thread Jim - FooBar();
% (map str (second %2) (range))) [] (post-fn unique (recur (if-not (some #{f} unique) (conj unique f) (vary-meta unique update-in [:encountered] conj f)) more) HTH, Jim On 10/01/14 15:24, Colin Yates wrote: I did consider that but I want to preserve the order of the incoming

Re: How can I improve this?

2014-01-10 Thread Jim - FooBar();
actually `post-fn` should be #(group-by identity (- % meta :encountered)) Jim On 10/01/14 15:28, Jim - FooBar(); wrote: I quickly put together this which seems to preserver the orderof the original seq: (defn uniquify [coll] (let [post-fn #(group-by first (- % meta :encountered))] (loop

Re: How can I improve this?

2014-01-10 Thread Jim - FooBar();
oops! my fn will not keep the original ordering...sorry Colin Jim On 10/01/14 15:34, Jim - FooBar(); wrote: actually `post-fn` should be #(group-by identity (- % meta :encountered)) Jim On 10/01/14 15:28, Jim - FooBar(); wrote: I quickly put together this which seems to preserver

Re: Processing a lazy sequence consuming the heap

2014-01-09 Thread Jim - FooBar();
that is obviously because you still use the Var `xml` somewhere...change it to a function call`(xml)` and try again :) Jim On 09/01/14 11:38, Peter Ullah wrote: I now get Don't know how to create ISeq from: xml_example.core$xml clojure.lang.RT.seqFrom (RT.java:505) -- -- You received

Re: Processing a lazy sequence consuming the heap

2014-01-09 Thread Jim - FooBar();
oops, ny bad it seems you figured it out :) Jim On 09/01/14 11:42, Peter Ullah wrote: My bad, was passing a reference to the function, rather than the response from the function Doh! On Thursday, January 9, 2014 11:38:44 AM UTC, Peter Ullah wrote: I now get Don't know how to create

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-08 Thread Jim - FooBar();
, the user has the quite convincing illusion that nothing is happening!!! this of course doesn't mean anything, I just thought it is worth mentioning... Jim -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-08 Thread Jim - FooBar();
included and no reflection (well there is one place where I cannot get rid of reflection)... If I remember correctly `lein repl` takes close to 55 seconds to show...clojure-py beats everything, hands down with respect to startup times... Jim On 08/01/14 15:46, Timothy Baldridge wrote: That's

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-08 Thread Jim - FooBar();
not JIT. Jim On 08/01/14 16:30, Max Gonzih wrote: I do lot of hacking on embed devices like Pi and BeagleBone for fun, I run clojure mostly on ejre and it is much faster and memory efficient than openjdk compiled for ARM, but still suffers from startup time (in Pi case it actually much worse

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-08 Thread Jim - FooBar();
I think that is the one in the repos, but update 40 instead of 45...I had no idea it was called `ejre` as I used to use jdk-ea and switched to 7 a couple of months ago through the official rasbian channels . Jim On 08/01/14 16:58, Max Gonzih wrote: How is it different from http

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-08 Thread Jim - FooBar();
indeed :) On 08/01/14 17:32, Max Gonzih wrote: Well it's actually cool that this is inside Raspbian channels. -- -- 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: Are all clojure namespaces loaded in repl by default?

2014-01-07 Thread Jim - FooBar();
it a bit :) Jim On 07/01/14 14:55, John Kida wrote: I am using Clojure 1.5, and reading a book on Clojure 1.3. I am reading over the namespaces chapters but I appears in my repl I can already access everything with its fully qualified name without a require. For example on this website

Re: Are all clojure namespaces loaded in repl by default?

2014-01-07 Thread Jim - FooBar();
qualified names. Also, it needs to be noted that strictly speaking, Clojure doesn't preload anything for you...these namespaces just happen to have been loaded because Clojure needed them during bootstrap...Nothing really happens for the user - at least this is my understanding. Jim On 07

Re: get rid of reflection in proxy-super?

2013-12-25 Thread Jim - FooBar();
Thanks Colin, I did vote for it but its title implies something different...something restoring original binding on exception... Jim On 25/12/13 04:06, Colin Fleming wrote: That is indeed the same issue, and it even includes a patch with a test! I've voted for this one, please consider doing

get rid of reflection in proxy-super?

2013-12-22 Thread Jim - FooBar();
Hi all, is there any way to get rid of reflection in simmilar looking? Nothing seems to work... (proxy [JPanel ActionListener KeyListener] [] (paintComponent [^java.awt.Graphics g] (let [^JPanel this this] (proxy-super paintComponent g)) thanks in advance... :) Jim

Re: howto use reify in defmacro

2013-12-18 Thread Jim - FooBar();
as an aside, if you're writing def-like macros, I'd encourage you to look at 'clojure.tools.macro/name-with-attributes' Jim On 18/12/13 12:14, Tassilo Horn wrote: Xiangtao Zhou tao...@gmail.com writes: Hi! I want to use reify in macro, but the namespace is the problem. the following code

implementing arithmetic operators without using [+ - * / even? odd? inc dec]

2013-12-09 Thread Jim - FooBar();
question is, can anyone see a better way of doing this? It seems pretty elegant to me but I'd like to see what other people think... many thanks :) Jim ps: division is indeed a bit trickier than the rest due to positive/negative signs. Not really hard though... -- -- You received

accessing big-resource - what are people doing?

2013-12-07 Thread Jim - FooBar();
extensive industrial experience, I'd like to ask how people are tackling this issue, in the large? as always, many thanks in advance :) Jim -- -- 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

Re: I need a vector not a list?

2013-11-30 Thread Jim
On Sat, 30 Nov 2013 13:15:33 -0800 (PST) Andy Smith the4thamig...@googlemail.com wrote: Why dont we have a version of map that returns a vector when given a vector? We can do this kind of thing in other languages with templates/generics why not clojure? we do have mapv :) Jim -- -- You

Re: I need a vector not a list?

2013-11-30 Thread Jim
exclusively you lose the ability to aggregate operations without cost. hope that clarifies it... Jim -- -- 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

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-24 Thread Jim - FooBar();
persistence... Jim -- -- 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: Releasing Caribou today: Open Source Clojure Web Ecosystem

2013-11-24 Thread Jim Crossley
if you start up Immutant in your project's directory, so in production you'll likely want that to be an absolute path. I especially like the project's name. It reminds me of the Pixies song: https://www.youtube.com/watch?v=x6m-pwWCDKU Thanks! Jim On Wed, Nov 13, 2013 at 1:25 AM, Ryan Spangler

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-22 Thread Jim - FooBar();
On 22/11/13 08:18, Stefan Kamphausen wrote: How about (defn get-key-generator [] (let [i (atom 0)] (fn [] (swap! i inc (def generate-keys (get-key-generator)) nice one, much better than mine :) thanks Stefan... Jim -- -- You received this message because you are subscribed

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-21 Thread Jim - FooBar();
in a ref) approach generally suggested ? I initially had a map-ref with agents inside (the accounts) but I find it a lot simpler to just have the map-ref...what ref-granularity are people suggesting for the bank example? Jim -- -- You received this message because you are subscribed

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-21 Thread Jim - FooBar();
you wrong, don't worry...this is the reason I started this thread - need some answers /feedback :) Jim On 21/11/13 10:42, Stefan Kamphausen wrote: Hi, I may be missing something here, since this thread leaves me a bit confused. 1. Why are you using a Ref for the bank in the first place

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-21 Thread Jim - FooBar();
also I forgot to add that having the bank in some reference type allows opening/closing new accounts, an operation that at least to me sounds like it needs coordination... So which way is preferred? map-ref that stores values, map that stores refs or map-ref that stores refs? Jim On 21/11

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-21 Thread Jim - FooBar();
this is fine: (defn- transfer1 [amount from to] (dosync (alter to credit amount) (alter from debit amount))) but I can't have it both ways! if accounts are refs then a simple deposit or withdraw must happen in a transaction... Jim -- -- You received this message because you

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-21 Thread Jim - FooBar();
for a particular feature and say ok, we'll use this library instead. thanks again, I will have another go at it in the morning :) Jim [1] https://github.com/cgrand/megaref On 21/11/13 22:35, John D. Hume wrote: generate-key is not thread-safe. Multiple callers might get the same id

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-21 Thread Jim - FooBar();
for simply depositing in to an account. There are still 2 fns that use dosync but only modify a single identity, namely deposit! withdraw!. I don't see how else this can be done since they are refs. I would appreciate feedback for this (hopefully) last version... many thanks in advance :) Jim

preferred way to dereference a ref: outside or inside dosync?

2013-11-20 Thread Jim - FooBar();
the transaction has commited and exited (outside the 'dosync')? Is there actually a difference? This code is educational and I'd like it to be clean and that I've covered all my basis for potential questions. If anyone can comment that would be great...:) Jim -- -- You received this message because

Re: instaparse: composing smaller rules into a bigger one

2013-11-19 Thread Jim - FooBar();
but it never mathes the *(ADV | XFOLD)? *rule. I am presuming this is something quite simple... As always, thanks in advance, Jim On 19/11/13 00:38, Mark Engelberg wrote: Seems like there are (at least) two issues here. 1. You have a preference in mind that is not expressed by the grammar

Re: Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread Jim - FooBar();
40} {:key 5, :value nil}) Jim -- -- 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

Re: Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread Jim - FooBar();
On 19/11/13 11:42, Jim - FooBar(); wrote: On 19/11/13 11:29, Colin Yates wrote: Imagine the sequence represents a distribution between 1 and 5. The initial sequence might only be [{:key 3 :value 30} {:key 4 :value 40}]. I want it to be [{:key 1 :value nil} {:key 2 :value nil} {:key 3 :value

  1   2   3   4   5   6   7   8   9   10   >