Re: [ANN] Clojure 1.8.0-alpha2

2015-07-19 Thread Michael Blume
(It looks like you're depending on Potemkin through clj-http, so upgrading to clj-http 2.0.0 will also solve the problem) On Sun, Jul 19, 2015 at 4:53 PM Michael Blume wrote: > Looks like it has, pinning to Potemkin 0.4.1 should probably sort you out > > On Sun, Jul 19, 2015 at 4

Re: [ANN] Clojure 1.8.0-alpha2

2015-07-19 Thread Michael Blume
Looks like it has, pinning to Potemkin 0.4.1 should probably sort you out On Sun, Jul 19, 2015 at 4:50 PM Michael Blume wrote: > Sean, I think that was identified as a bug in Potemkin. The pull was > merged but I'm not sure if there's been a release since. Zack? > > https

Re: [ANN] Clojure 1.8.0-alpha2

2015-07-19 Thread Michael Blume
Sean, I think that was identified as a bug in Potemkin. The pull was merged but I'm not sure if there's been a release since. Zack? https://github.com/ztellman/potemkin/pull/40 http://dev.clojure.org/jira/browse/CLJ-1208?focusedCommentId=39632&page=com.atlassian.jira.plugin.system.issuetabpanels:

ANN Monger 3.0.0 is released

2015-07-18 Thread Michael Klishin
Monger [1] is a modern Clojure MongoDB client. 3.0 has breaking API changes. Release notes: http://blog.clojurewerkz.org/blog/2015/07/16/monger-3-dot-0-0-is-released/ 1. http://clojuremongodb.info -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- You received this me

Re: How do I expand a variable that I pass to a macro?

2015-07-12 Thread Michael Blume
First of all, I'm pretty sure compojure will let you do the thing, because it's less macro-heavy than what you're using. But to answer the general question, this is a fundamental problem with macros. Once you're making heavy use of macros you start having to write more macros in order to compose t

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Michael McLellan
That brings up an interesting point - what's the ramp-up time usually like for the Java devs that convert to Clojure? On Thursday, July 9, 2015 at 9:16:25 PM UTC-4, raould wrote: > > > and I need to be 10 times more productive. =) > > you mean, after your 2 week ramp-up time, right? > -- You

Re: core.async status?

2015-07-05 Thread Michael Blume
Looking through the tickets at http://dev.clojure.org/jira/browse/ASYNC might give you a better idea of what's planned. On Sat, Jul 4, 2015 at 8:52 PM Martin Raison wrote: > thanks! > > Le samedi 4 juillet 2015 20:38:22 UTC-7, Alex Miller a écrit : >> >> Oh just busy. We will get to a new releas

Different macro definitions via reader conditionals?

2015-07-02 Thread Michael Sperber
I'd like to define a macro differently for Clojure and for ClojureScript. Is there a way to do this via reader conditionals? (My mind boggles.) Regards, Mike -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloju

ANN Monger 3.0.0-rc2 is released

2015-06-27 Thread Michael Klishin
Monger [1] is a Clojure MongoDB driver for a more civilized age. Monger 3.0 is a major release that sets up ground for various MongoDB 3.x improvements and uses MongoDB Java driver 3.0 under the hood. There are breaking changes in 3.0. You can learn more about 2.x to 3.0 changes in the RC1 releas

Re: let vs. let*

2015-06-18 Thread Michael Blume
Basically you the user should not worry about the starred versions On Thu, Jun 18, 2015 at 1:40 PM Johannes wrote: > thanks > > Am Donnerstag, 18. Juni 2015 22:35:53 UTC+2 schrieb raould: >> >> http://lmgtfy.com/?q=clojure+%22let+vs.+let*%22 >> > -- > You received this message because you are s

[ANN] honeysql now available from Clojurescript

2015-06-14 Thread Michael Blume
Using reader conditionals, I've put up an experimental branch of honeysql which seems to work just fine from both Clojure and Clojurescript. If you need to generate SQL from your Node service, please try it out. https://github.com/michaelblume/honeysql/tree/rcond Will update soon with my experien

Re: Single-atom update ordering guarantees

2015-06-09 Thread Michael Gardner
model guarantees as Java fields declared volatile. I don't have a > good authoritative link handy for Java documentation on volatile, but the > basic idea is that they should not be cached locally by individual threads, > but be visible to all. > > Andy > > > On Tue, J

Re: Single-atom update ordering guarantees

2015-06-09 Thread Michael Gardner
en by normal sequential > execution the atom should change from 1 to 2, then from 2 back to 1. > > Andy > > On Tue, Jun 9, 2015 at 9:38 AM, Atamert Ölçgen wrote: > > > On Tue, Jun 9, 2015 at 7:30 PM, Michael Gardner wrote: > This might be blindingly obvious t

Single-atom update ordering guarantees

2015-06-09 Thread Michael Gardner
This might be blindingly obvious to some, but I can't find any discussion about it. Let's say I have code like the following: (def a (atom 1)) ... (swap! a inc) (swap! a dec) Is there any possibility of another thread seeing a=0? If not, what provides this guarantee? -- You received this mess

[ANN] Onyx 0.6.0

2015-06-09 Thread Michael Drogalis
I'm happy to announce that Onyx 0.6.0 is officially out! Blog post: http://michaeldrogalis.github.io/jekyll/update/2015/06/08/Onyx-0.6.0:-Going-Faster.html GitHub: https://github.com/onyx-platform/onyx Website: www.onyxplatform.org Chat: https://gitter.im/onyx-platform Thanks to all the contrib

Re: Identifying dependency that's pulling in SLF4J

2015-06-08 Thread Michael Gardner
> On Jun 8, 2015, at 10:30 AM, Stephen Gilardi wrote: > > Does “lein deps :tree” help? Yes, that's very helpful. 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 f

Identifying dependency that's pulling in SLF4J

2015-06-08 Thread Michael Gardner
I've started to see unwanted SLF4J console messages from one of my projects. I'm not (directly) using SLF4J, and would like to find out which of my dependencies is. But the dependency tree is a bit large to search by hand. Is there a better way? -- You received this message because you are sub

Re: Is there a cheet sheet for some of the pure symbolic functions like #'

2015-06-06 Thread Michael Wood
In addition to what the others said, try symbolhound: http://symbolhound.com/?q=%23%27+clojure -- Michael Wood On 05 Jun 2015 10:05 PM, "Dru Sellers" wrote: > Trying to google what #' means is tricky to say the least. > > Is there a good name for these that I can g

Re: [ANN] System 0.0.8

2015-05-25 Thread Michael Klishin
On 26 May 2015 at 03:54:35, Daniel Szmulewicz (daniel.szmulew...@gmail.com) wrote: > Yes, sir. Well understood. > > On top of that, the announcement was mistaken. System's version > is at 0.1.8, not 0.0.8. > > Will do better next time. Thank you!  This sounds like a project that can grow in

Re: [ANN] System 0.0.8

2015-05-25 Thread Michael Klishin
 On 26 May 2015 at 03:45:04, Daniel Szmulewicz (daniel.szmulew...@gmail.com) wrote: > Is there a consensus as to what versioning scheme works best? > Or is there no such beast? > Peter Taoussanis has expressed some reservations regarding > SemVer and is proposing a variation on it, which he ca

Re: [ANN] System 0.0.8

2015-05-25 Thread Michael Klishin
On 24 May 2015 at 03:59:52, Daniel Szmulewicz (daniel.szmulew...@gmail.com) wrote: > System 0.0.8 has just been released, but it is not the same anymore. Then perhaps it deserves at least a minor version bump.   Non-standard, confusing version numbers is already a significant enough problem in

Is there some method to implement quartz cluster without spring in clojure?

2015-05-24 Thread savior michael
I have tried the quartz to run time job, but I failed to config cluster to run job singleton. I have tried to use the immutant but i have no idea how to config it yet. Is there someone use the cluster time job? -- You received this message because you are subscribed to the Google Groups "Cloju

Help with timestamp with timezone in YeSQL

2015-05-16 Thread Michael Cramm
Out of curiosity have you tried clj-time.coerce/to-sqs-time ? -- 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

Re: contains? on String

2015-05-12 Thread Michael Gardner
On May 12, 2015, at 3:28 PM, Fluid Dynamics wrote: > Strings and arrays support constant-time access by index. Yes, but why should that mean that contains? should work on Strings? "Because it can" doesn't seem compelling to me. In discussions about contains?, one often hears that it works on as

Re: contains? on String

2015-05-12 Thread Michael Gardner
On May 12, 2015, at 1:54 PM, Shantanu Kumar wrote: > I agree about the counter-intuitiveness. I'm only wondering whether the error > message is a bit misleading "contains? not supported on type: > java.lang.String" because of course (contains? "hello" 2) works fine. It seems odd that (contains?

Re: JDK8

2015-05-07 Thread Michael Blume
Not quite sure what you're asking -- I think Clojure itself is intended to be fully supported on JDK 8, and I regularly build it/build my projects with JDK 8 (though I think I'm using the Oracle version) On Thu, May 7, 2015 at 1:25 PM Pierre-Yves Ritschard wrote: > Hi, > > There hasn't been a JD

ANN Langohr 3.2.0 is released

2015-04-18 Thread Michael Klishin
Langohr [1] is a small Clojure client for RabbitMQ.  Release notes: http://blog.clojurewerkz.org/blog/2015/04/19/langohr-3-dot-2-0-is-released/ 1. http://clojurerabbitmq.info -- @michaelklishin, github.com/michaelklishin -- You received this message because you are subscribed to the Google Gr

Are keys and vals guaranteed to return in the same order?

2015-04-17 Thread Michael Blume
In other people's Clojure code I sometimes see things like (zipmap (map some-fn (keys m)) (map other-fn (vals m))) If it were my code I'd be much more inclined to write (into {} (for [[k v] m] [(some-fn k) (other-fn v)])) Is this a to-each-their-own thing or is the latter preferred?

Re: Generating .clj files with content

2015-04-08 Thread Michael Blume
What James said -- if you want the results to be human readable, if you want control of how it's formatted, if you want to be able to comment it, if you want people to use it as a starting point for code they're going to write, then check out the punctions in https://github.com/technomancy/leininge

Re: Has anyone seen this error while running lein-cloverage?

2015-04-07 Thread Michael Blume
Yes. Cloverage needs to merge https://github.com/lshift/cloverage/pull/59 -- in the meantime, you can add https://github.com/MichaelBlume/cloverage-compojure-fix to your project and it will route around the problem. On Tue, Apr 7, 2015 at 11:27 AM Jonathon McKitrick wrote: > Here's a test in que

Re: Newbie question about filtrering defrecord

2015-04-04 Thread Michael Blume
your list doesn't contain the records, your list contains the symbols 'a1 and 'a2. You can't make a list the way you're trying to. On Sat, Apr 4, 2015 at 5:14 PM Luc Préfontaine wrote: > You mean the a1 record no ? > > > > Hi! > > > > I'm new to clojure, and have problem understanding how to fil

Re: How to coerce to bigint ?

2015-04-04 Thread Michael Gardner
On Sat, Apr 4, 2015 at 11:36 AM, Paul Roush wrote: > (range 5N) => (0 1 2 3 4) ; i.e. the "bigint-ness" is lost > > So in this particular case I needed to "inject" bigint into the process > later in some way. > You could try (range (* 0 n) n). A little silly, but does avoid the conditiona

Newbie re-implement 'interleave' found type conversion error

2015-04-02 Thread michael zhuang
: i'm new to clojure, when I try to implementation 'interleave', get error from type convertion "java.lang。Long cannot be cast to clojure.lang.IFN". ; Now im reading stack trace, try to figure out what's going on.. (defn myIL [col1 col2] (loop [m [] s1 (first col1) s2 (fi

Re: [ANN] Clojure 1.7.0-alpha6 released

2015-03-31 Thread Michael Blume
I've proposed a patch to instaparse to fix this, I realize it's not the most elegant version check ever, but it should fix the problem https://github.com/Engelberg/instaparse/pull/94 On Tue, Mar 31, 2015 at 3:21 PM Sean Corfield wrote: > Looks like a great set of updates! > > Unfortunately, as s

Re: Clojure Jobs Available

2015-03-30 Thread Michael Klishin
On 31 March 2015 at 04:45:39, Jan Drake (jan.s.dr...@gmail.com) wrote: > We have teams in Seattle, Sydney, and Costa Rica and are looking > to hire senior engineers with Clojure/Lisp experience. Jan, It would help if you clarify what locations/timezones you require candidates to be in. Many tal

Re: Clojure Culture Question on TDD

2015-03-24 Thread Michael Blume
It is rare to see an open source clojure project without tests. Clojure itself is pretty thoroughly tested, as is leiningen. I don't know about test-first. I think it's actually more common to see "REPL-first" -- build something through exploration in the REPL and then turn whatever you did in the

Re: Disk based caching for Clojure app

2015-03-06 Thread Michael Blume
Possibly stupid question: can you just pretend you have more memory than you do and let the operating system do the heavy lifting? On Fri, Mar 6, 2015, 10:54 AM JPatrick Davenport wrote: > Hello, > I'm been thinking about an idea for a cache layer. It's driven by two > trends. > > Most caches ar

Re: [ANN] Dunaj project, an alternative core API for Clojure

2015-03-05 Thread Michael Klishin
On 6 March 2015 at 00:45:47, adrian.med...@mail.yu.edu (adrian.med...@mail.yu.edu) wrote: > it strikes me as odd that this project would not come out of > direct collaboration with Clojure's core contributors. I should point out that there's enough people in the community who do not find Clojur

Re: Who's using Clojure?

2015-03-05 Thread Michael Richards
I'm about to start training 4 devs on my team at Oracle in Clojure. My manager is very nervous about putting Clojure into the product. I'm forging on regardless :) I rewrote some components of our product in Clojure in my spare time, mainly as a proof of concept that we could do some of our

[ANN] Onyx 0.5.3: Flow Conditions

2015-03-04 Thread Michael Drogalis
Onyx is a distributed, masterless, fault tolerant data processing system for Clojure. Version 0.5.3 is out with a new feature called Flow Conditions. Flow Conditions isolate logic for message routing within your cluster, offering extraordinary flexibility for runtime specification. Blog post:

Re: How do I depend on clojure 1.7.0-master-SNAPSHOT?

2015-02-28 Thread Michael Griffiths
maven-metadata.xml.sha1 contains: 5c88ee9a5d32a33ad7d16246ec3363fc98631b0a Which makes it seem like an issue with the deployed artifact/metadata? I'm not really sure why it's working for you but not me! Thanks, Michael On Saturday, 28 February 2015 00:18:34 UTC, Sean Corfield wrote

Re: How do I depend on clojure 1.7.0-master-SNAPSHOT?

2015-02-27 Thread Michael Griffiths
and build master directly in the meantime - thank you. Michael On Thursday, 26 February 2015 23:11:05 UTC, Sean Corfield wrote: > > On Feb 26, 2015, at 11:21 AM, Michael Griffiths > wrote: > > I have the following in my project.clj: > > > > :dependencies [[org.clojur

ANN Langohr 3.1.0 is released

2015-02-27 Thread Michael Klishin
Langohr [1] is a small, feature complete Clojure client for RabbitMQ. Release notes: http://blog.clojurewerkz.org/blog/2015/02/27/langohr-3-dot-1-0-is-released/ 1. http://clojurerabbitmq.info -- @michaelklishin, github.com/michaelklishin -- You received this message because you are subscribed

Re: XPATH/XSLT like access to Clojure data structures?

2015-02-27 Thread Michael Griffiths
Sorry, please ignore me. I misread your post entirely :-). I think clojure.zip and clojure.data.zip (not the XML parts) will get you partway to where you want, but I do not know of any XPATH-like API over the top of them. On Friday, 27 February 2015 14:08:19 UTC, Henrik Heine wrote: > This see

Re: XPATH/XSLT like access to Clojure data structures?

2015-02-27 Thread Michael Griffiths
Maybe clojure.data.zip.xml (in clojure.data.zip) is close to what you're looking for? http://clojure.github.io/data.zip/#clojure.data.zip.xml On Friday, 27 February 2015 12:53:51 UTC, Henrik Heine wrote: > Hi folks, > > do you know of a lib that let's you navigate around nested Clojure > struct

How do I depend on clojure 1.7.0-master-SNAPSHOT?

2015-02-26 Thread Michael Griffiths
ehind a proxy, try setting the 'http_proxy' environment variable. Am I doing something wrong? Michael -- 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: Is Caribou Dormant ?

2015-02-25 Thread Michael Blume
Sure looks dormant to me. My usual rule is, if you think you'd feel comfortable maintaining it yourself if it ever became necessary, use it, otherwise look elsewhere. On Wed, Feb 25, 2015 at 3:36 PM Geraldo Lopes de Souza wrote: > Hi, > > I'm checking Caribou, and wanna know if anyone is using i

ANN Monger 2.1.0 is released

2015-02-22 Thread Michael Klishin
Monger [1] is a Clojure MongoDB client for a more civilized age. 2.1.0 is a minor feature released. Change log: http://blog.clojurewerkz.org/blog/2015/02/22/monger-2-dot-1-0-is-released/ There will be no more 2.x releases (except for bug fixes, of course). Monger development will focus on 3.0 no

Re: How to create jar for data.int-map

2015-02-19 Thread Michael Griffiths
Clojure and Clojure contrib libraries are uploaded to Sonatype when released. e.g. https://oss.sonatype.org/content/groups/public/org/clojure/data.int-map/ There should be both a jar with sources and jar without sources for each released version of each lib. Michael -- You received this

Re: ANN: Onyx Dashboard 0.5.2.1

2015-02-18 Thread Michael Drogalis
Hi Colin, This is well supported within Onyx, and has seen recent progress (http://yuppiechef.github.io/cqrs-server/) The examples should give you a good indication if it's a fit for your problem (https://github.com/MichaelDrogalis/onyx-examples). We hang out in Gitter if you have any question

Re: Continuously Integrating Leiningen Projects

2015-02-18 Thread Michael Blume
lein-git-version: > > https://github.com/cvillecsteele/lein-git-version > > Which seems to follow project middleware approach you describe, but > for a different use case. > > R. > > On 18 February 2015 at 06:18, Michael Blume wrote: > > We use a Leiningen plugin to set th

Re: Continuously Integrating Leiningen Projects

2015-02-17 Thread Michael Blume
which I'm > expecting to keep more current. > > R. > > On 17 February 2015 at 19:14, Michael Blume wrote: > > Related -- we run lein ancient as part of a lot of our builds so that we > can > > easily pick up dependencies with newer available versions. >

Re: Continuously Integrating Leiningen Projects

2015-02-17 Thread Michael Blume
Related -- we run lein ancient as part of a lot of our builds so that we can easily pick up dependencies with newer available versions. On Tue Feb 17 2015 at 11:13:44 AM Michael Blume wrote: > What we do at Climate is avoid SNAPSHOT builds. Every build gets a version > string with timesta

Re: Continuously Integrating Leiningen Projects

2015-02-17 Thread Michael Blume
What we do at Climate is avoid SNAPSHOT builds. Every build gets a version string with timestamp and git commit. If an upstream library is changed, it's up to downstream maintainers to update their dependency on it. If you update a dependency and your build fails, you a) don't update your dependenc

Re: Performant string concatenation (of many, large strings)

2015-02-14 Thread Michael Blume
Basically same way you profile java, I usually use jvisualvm, if you feel like shelling out for yourkit that can be nicer. On Sat Feb 14 2015 at 11:23:12 AM Ivan L wrote: > What is the best way to profile Clojure? I tried a reduce doto thing but > it was way slowe than apply str. would love to

Re: Performant string concatenation (of many, large strings)

2015-02-14 Thread Michael Blume
...Annoyingly, almost all the time for my version is spent in protocol dispatch, so there's probably a much faster way to do that. On Sat Feb 14 2015 at 12:21:11 AM Michael Blume wrote: > er, s/(comp val)/val > > On Sat Feb 14 2015 at 12:17:18 AM Michael Blume > wrote: > &

Re: Performant string concatenation (of many, large strings)

2015-02-14 Thread Michael Blume
er, s/(comp val)/val On Sat Feb 14 2015 at 12:17:18 AM Michael Blume wrote: > For minimal change to the presented code, what about > > (defprotocol appendable (append-to [this ^StringBuilder sb])) > > (extend-protocol appendable > String > (append-to [this ^StringBu

Re: Performant string concatenation (of many, large strings)

2015-02-14 Thread Michael Blume
For minimal change to the presented code, what about (defprotocol appendable (append-to [this ^StringBuilder sb])) (extend-protocol appendable String (append-to [this ^StringBuilder sb] (.append sb this)) clojure.lang.IFn (append-to [this ^StringBuilder sb] (this sb)) Object (append-t

Re: [newbie] strange behaviour in self-referential primes lazy-seq attempt

2015-02-12 Thread Michael Blume
Feb 12 2015 at 12:06:28 PM Jorge Marques Pelizzoni < jorge.pelizz...@gmail.com> wrote: > Well, that's a bug then :) And seems to have been fixed. Thanks! > > Em quinta-feira, 12 de fevereiro de 2015 17:51:13 UTC-2, Michael Blume > escreveu: > >> Oh, well this is fu

Re: [newbie] strange behaviour in self-referential primes lazy-seq attempt

2015-02-12 Thread Michael Blume
Oh, well this is fun -- with bleeding edge clojure I get the right answer, but with 1.6.0 I see the same results you did. On Thu Feb 12 2015 at 11:47:54 AM Michael Blume wrote: > Strange, when I run your code I don't get 9 or 15 > > On Thu Feb 12 2015 at 11:02:00 AM Jorge Mar

Re: [newbie] strange behaviour in self-referential primes lazy-seq attempt

2015-02-12 Thread Michael Blume
Strange, when I run your code I don't get 9 or 15 On Thu Feb 12 2015 at 11:02:00 AM Jorge Marques Pelizzoni < jorge.pelizz...@gmail.com> wrote: > Hi, there! Please bear with me as I am very new to Closure (this is my > second program ever) but have a kind of solid Haskell background. > > I was tr

Re: Is this the good way to write get-percentage

2015-02-11 Thread Michael Blume
I think you could replace your condp = with case, since all your mode keywords are known at compile-time, otherwise looks about right. On Tue Feb 10 2015 at 11:32:58 PM Cecil Westerhof wrote: > I needed a function to get the percentage as an int. Input is place and > total-count. > I want the no

Why can't I override equals & hashCode in defrecord?

2015-02-11 Thread Michael Sperber
I'm implementing some low-level data structures using arrays, and I'd like to use defrecord to make type for them. I need to override equals & hashCode, but defrecord won't let me do it. I know this has been discussed before: https://groups.google.com/forum/#!topic/clojure/Nvz0WDhj0qk The advice

Inconsistency in overflow handling between type-hinted and reflective calls

2015-02-09 Thread Michael Blume
(import 'java.io.DataOutputStream) (import 'java.io.ByteArrayOutputStream) (defn- ->bytes "Convert a Java primitive to its byte representation." [write v] (let [output-stream (ByteArrayOutputStream.) data-output (DataOutputStream. output-stream)] (write data-output v) (seq (.

Re: print-table bug?

2015-02-02 Thread Michael Blume
Difference looks like so: https://github.com/MichaelBlume/clojure/compare/pr-str-table On Mon Feb 02 2015 at 12:49:42 PM Steve Miner wrote: > Looks like a bug in clojure.pprint/print-table. Probably should be use > `pr-str` instead of `str`. > > user=> (str ()) > "clojure.lang.PersistentList$

Re: call superclass constructor in clojure class generation with defrecord

2015-02-01 Thread Michael Blume
Yes, but that's for methods you're overriding and OP wants a constructor On Sun, Feb 1, 2015, 12:22 AM Fluid Dynamics wrote: > On Saturday, January 31, 2015 at 6:34:10 PM UTC-5, Michael Blume wrote: >> >> The defn wrapping the call to proxy basically is the constructo

Re: call superclass constructor in clojure class generation with defrecord

2015-01-31 Thread Michael Blume
anels goes here ] (.addComponent this horizontal-panel) this)) Note, I'm calling a variable 'this' but it's *just a variable, the only reason I called it 'this' was to make it look more like the java version. On Sat Jan 31 2015 at 9:53:30 AM coco wr

Re: call superclass constructor in clojure class generation with defrecord

2015-01-30 Thread Michael Blume
(defn my-window [] (proxy [Window] [])) should do the trick Proxy takes a vector of implemented interfaces and at most one superclass (in your case, Window), and then a second vector of arguments to pass to the superclass constructor (in your case, an empty vector) and then a series of methods

Re: simple procedure for updating a value one level down

2015-01-26 Thread Michael Willis
n categories [1 3] merge { :age 12 :somethingElse 29 }) [{1 {:text "foo"}, 2 {:text "bar", :ack 5}} {3 {:age 12, :somethingElse 29}}] On Monday, January 26, 2015 at 9:42:56 AM UTC-6, Michael Willis wrote: > > (def categories [ [ { :id 1 :text "foo" } { :id

Re: simple procedure for updating a value one level down

2015-01-26 Thread Michael Willis
(def categories [ [ { :id 1 :text "foo" } { :id 2 :text "bar" :ack 5 } ] [ { :id 3 :age 7 } ] ]) #'user/categories (update-in categories [1 0] merge { :age 12 :somethingElse 29 }) [[{:text "foo", :id 1} {:text "bar", :ack 5, :id 2}] [{:age 12, :somethingElse 29, :id 3}]] On Monday, January 26,

Re: aot resolve question

2015-01-23 Thread Michael Blume
Not sure what to tell you. If you can post code we can use to reproduce the problem, that would help. Alternately, put some println statements into load-sym so you can be sure it's getting the values you think it is? On Tue Jan 20 2015 at 11:45:34 PM bob wrote: > Hi, > > I have a function > > (d

Re: vectorz, "Unable to find implementation", uberjar, excluding source

2015-01-23 Thread Michael Blume
If you want to keep jar size down and avoid class loader problems, instead of excluding source I'd avoid aot and only ship source. If you need the JVM to find your main class you can write a shim and only aot-compile that. On Wed Jan 21 2015 at 12:36:03 PM Brian Craft wrote: > Fixed it by adding

Re: Set equality bug?

2015-01-23 Thread Michael Gardner
On Jan 23, 2015, at 11:51 AM, Andy Fingerhut wrote: > Hash consistency is certainly nice, but if Clojure were changed such that (= > float-val double-val) were always false, and no other changes were made, it > would lead to this situation: > > user=> (<= (float 1.5) (double 1.5)) > true > user

Re: Set equality bug?

2015-01-23 Thread Michael Gardner
On Jan 23, 2015, at 8:23 AM, Andy Fingerhut wrote: > You can try creating a JIRA ticket suggesting that Clojure's = should return > false when comparing floats and doubles to each other. CLJ-1649, for anyone interested. -- You received this message because you are subscribed to the Google Grou

Re: Set equality bug?

2015-01-23 Thread Michael Gardner
I'm sure we are all aware of the various issues with floating point math (particularly equality comparisons); however none of that is relevant to this discussion. The only issue here is an inconsistency between hashing and equality testing in Clojure. My claim is that the property "any two obje

Re: Set equality bug?

2015-01-23 Thread Michael Gardner
If there's a technical reason why Clojure can't return false for all = comparisons between floats and doubles, I'd like to hear it. Otherwise, I don't see how your response is relevant. > On Jan 23, 2015, at 3:10 AM, Luc Prefontaine > wrote: > > Agree, it's broken... in java... > Has it has b

Re: Set equality bug?

2015-01-23 Thread Michael Gardner
On Jan 23, 2015, at 1:33 AM, Immo Heikkinen wrote: > > I actually ran into this while comparing nested data structures from two > different sources and spent a good part of my day figuring out what's > happening. While it is a good advice to avoid mixing floats and doubles, it > is inevitable

Re: Satisfies? seems strangely slow

2015-01-22 Thread Michael Blume
sympathy for how the JVM operates. > > > On Thursday, January 22, 2015 at 11:10:56 PM UTC-5, Michael Blume wrote: > >> It sounds like basically dispatch is fast because we bothered to make it >> fast (by caching) and satisfies? is slow because we didn't. Is it worth >>

Re: Satisfies? seems strangely slow

2015-01-22 Thread Michael Blume
x27;s class, then if necessary walks up the superclass chain. > > [1] > https://github.com/clojure/clojure/blob/master/src/clj/clojure/core_deftype.clj#L507-L516 > > > > On Thursday, January 22, 2015 at 8:36:23 PM UTC-5, Michael Blume wrote: > >> Extends seems to be defeat

Re: Satisfies? seems strangely slow

2015-01-22 Thread Michael Blume
mented > by x". > > The docs don't seem to give much help here, so play with it in the repl a > bit. > > Timothy > > On Thu, Jan 22, 2015 at 6:14 PM, Michael Blume > wrote: > >> (defprotocol my-protocol >> (foo [this])) >> >> (extend-

Satisfies? seems strangely slow

2015-01-22 Thread Michael Blume
(defprotocol my-protocol (foo [this])) (extend-protocol my-protocol clojure.lang.IPersistentMap (foo [this] "hello from map")) (criterium.core/quick-bench (satisfies? my-protocol {})) (criterium.core/quick-bench (foo {})) Simply calling foo on an empty map takes 7 ns, but checking whe

Re: Testing macros that throw errors at compile time?

2015-01-22 Thread Michael Blume
macroexpand-1 is a good start, I'd also recommend using the (is (thrown? ...)) special form, so (is (thrown? IllegalArgumentException (macroexpend-1 '(my-macro (ill-formed-arguments ...) On Thu Jan 22 2015 at 5:05:36 PM Ben Wolfson wrote: > (try (macroexpand-1 '(my-macro (ill-formed-argumen

[ANN] Onyx 0.5.0: The Cluster as a Value

2015-01-20 Thread Michael Drogalis
For those unfamiliar, Onyx is a batch/stream processing hybrid distributed platform for Clojure. It uses aggressive data-driven techniques to bridge languages. Onyx 0.5.0 has been released, featuring a new masterless design and a built-in event notification service. Source at GitHub: https://g

Re: [ANN] clojure.jdbc 0.4.0-beta1: A jdbc library for clojure.

2015-01-11 Thread Michael Blume
I'm a little confused, by "last major release" do you mean the most recent major release or do you mean clojure.jdbc is about to move into maintenance mode? On Sun Jan 11 2015 at 3:02:51 AM Andrey Antukh wrote: > Hello! > > I wanted to announce the last major release of clojure.jdbc, a jdbc > li

Re: Extend causes error in servlet container?

2015-01-06 Thread Michael Blume
make your problem go away. On Tue Jan 06 2015 at 1:29:39 PM Michael Blume wrote: > TL;DR: If you wait for that lein-ring pull to get merged, you can upgrade > lein-ring and your problem will go away. If you wait for Clojure 1.7.0 it's > possible your problem will go away, though I&#x

Re: Extend causes error in servlet container?

2015-01-06 Thread Michael Blume
oes. It has an initialize! function which, at run-time, rather than at compile-time, manually imports your real handler and sticks it in an atom. Then the handler exposed to ring just reads the real handler out of the atom and applies it to the incoming request. On Tue Jan 06 2015 at 1:24:4

Re: Extend causes error in servlet container?

2015-01-06 Thread Michael Blume
lein-ring uses AOT compilation to build war files. AOT compilation in clojure is, well, problematic sometimes. Fortunately it can almost always be avoided using clever indirection. For example: https://github.com/pdenhaan/extend-test/pull/1 builds a war that works =) I've got a pull open against

Re: lein uberjar not creating class files with :aot

2015-01-03 Thread Michael Blume
(in the clojure.java.jdbc namespace, I should have said) On Sat Jan 03 2015 at 12:43:31 PM Michael Blume wrote: > it's hard to say exactly what's going on without tinkering with your > project, but Connectable is found in the clojure.java.jdbc, so I'd make > absolutely

Re: lein uberjar not creating class files with :aot

2015-01-03 Thread Michael Blume
it's hard to say exactly what's going on without tinkering with your project, but Connectable is found in the clojure.java.jdbc, so I'd make absolutely sure that namespace has been required before Connectable is referred to. And then, well, if it were me, I'd just ditch AOT. In my experience it cau

Re: How to handle fn args in a macro ?

2015-01-01 Thread Michael Blume
Sorry, that should be (defmacro listen [[topic-sym topic-name] & body] `(on-message ~topic-name (fn [~topic-sym] (~@body) On Thu Jan 01 2015 at 11:01:53 PM Michael Blume wrote: > If it were me I'd avoid making 'topic a "magic symbol" and let the use

Re: How to handle fn args in a macro ?

2015-01-01 Thread Michael Blume
If it were me I'd avoid making 'topic a "magic symbol" and let the user choose a symbol to bind. It'd look something like (defmacro listen [[topic-sym topic-name] & body] `(on-message ~topicname (fn [~topic-name] (~@body) (listen [topic "topic-test"] (println topic "test)) this way

ANN Serialism 1.3.0 is released

2014-12-29 Thread Michael Klishin
Serialism [1] is a tiny Clojure library that serializes and deserializes values into popular formats based on provided content type. Release notes: http://blog.clojurewerkz.org/blog/2014/12/30/serialism-1-dot-3-0-is-released/ 1. https://github.com/clojurewerkz/serialism -- @michaelklishin, git

ANN Quartzite 2.0 is released

2014-12-27 Thread Michael Klishin
Quartzite [1] is a scheduling library built on top of Quartz scheduler. Release notes: http://blog.clojurewerkz.org/blog/2014/12/27/quartzite-2-dot-0-is-released/ 1. http://clojurequartz.info  -- @michaelklishin, github.com/michaelklishin -- You received this message because you are subscribe

Re: how do you name your protocols?

2014-12-27 Thread Michael Klishin
On 27 December 2014 at 19:10:38, Jozef Wagner (jozef.wag...@gmail.com) wrote: > clj-time seems to be naming protocols inconsistently. It uses > ISomething, Something and SomethingProtocol naming. I suspect it is because it has 60 contributors and most users never have to extend the protocols. F

ANN cli-time 0.9.0 is released

2014-12-26 Thread Michael Klishin
clj-time [1] is a Clojure library for working with dates and time built on top of Joda Time. Change log: https://github.com/clj-time/clj-time/blob/master/ChangeLog.md#changes-between-080-and-090 1. https://github.com/clj-time/clj-time/ -- @michaelklishin, github.com/michaelklishin -- You rece

Re: Basic usage of namespaces

2014-12-24 Thread Michael Klishin
On 24 December 2014 at 12:59:11, Eric Le Goff (eleg...@gmail.com) wrote: > Now my newbie question : > Is there a simpler way to avoid the redundant 2 lines > (require 'myapp.other) > (refer 'myapp.other) (require '[myapp.other :refer [foo]]) See  http://clojure-doc.org/articles/language/namespace

ANN Langohr 3.0.1 is released

2014-12-23 Thread Michael Klishin
Langohr [1] is a Clojure client for RabbitMQ.  Release notes:  http://blog.clojurewerkz.org/blog/2014/12/23/langohr-3-dot-0-1-is-released/ 1. http://clojurerabbitmq.info -- @michaelklishin, github.com/michaelklishin -- You received this message because you are subscribed to the Google Groups

Re: Author a Book on Clojure - Packt Publishing

2014-12-22 Thread Michael Klishin
On 22 December 2014 at 13:39:12, Jan-Paul Bultmann (janpaulbultm...@googlemail.com) wrote: > It feels to me that this publisher is just a book mill that goes > for quantity and not quality. > I couldn't make it thought a single book I bought from them because > reading them felt like a waste o

ANN Langohr 3.0.0 is released

2014-12-21 Thread Michael Klishin
Langohr [1] is a Clojure client for RabbitMQ. Release notes: http://blog.clojurewerkz.org/blog/2014/12/21/langohr-3-dot-0-0-is-released/ 1. http://clojurerabbitmq.info -- @michaelklishin, github.com/michaelklishin -- You received this message because you are subscribed to the Google Groups "Cl

Re: ANN Cassaforte 2.0 is released

2014-12-20 Thread Michael Klishin
On 20 December 2014 at 19:33:23, Michael Klishin (michael.s.klis...@gmail.com) wrote: > Cassaforte [1] is a modern Clojure client for Apache Cassandra > and DataStax Enterprise. > > 2.0 is a major release with breaking API changes. Release notes: > http://blog.clojurewerkz.o

<    1   2   3   4   5   6   7   8   9   10   >