Re: NoSuchMethodError when AOT'ing with Clojure 1.10

2019-01-16 Thread Matthew Phillips
I've been able to reproduce this by deliberately building with Java 11/Clojure 1.10, then running on Java 8. Doing the same thing but built with Java 8 is fine. So, somehow some classes built with Java 11 must have gotten into the build. Time to check my build cleanliness... Thanks again, and

Re: NoSuchMethodError when AOT'ing with Clojure 1.10

2019-01-16 Thread Matthew Phillips
I am pretty sure I'm using Java 8. I do have both Java 8 and Java 11 installed, but the environment it's built with: $ java -version java version "1.8.0_162" Java(TM) SE Runtime Environment (build 1.8.0_162-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode) $ echo $JAVA_HOME

NoSuchMethodError when AOT'ing with Clojure 1.10

2019-01-15 Thread Matthew Phillips
Hi all, I have an inexplicable runtime error with a leiningen-generated AOT uberjar that happens when using Clojure 1.10 that doesn't happen with 1.9 (I'm on Java 8 for both compilation and deployment). The code in question looks like: (defn make-apns-message [payload] (let [buffer (ByteBuff

Re: [ANN] Clojure 1.10.0-RC1 (please test!)

2018-10-11 Thread Matthew Phillips
Hi Alex, have just finished testing on an 18 KLOC Clojure backend service (Java 8, Linux). Test suites and deployed service runs fine. Let me add my thanks for your hard work! Cheers, Matthew. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: [ANN] Clojure 1.9.0-alpha18

2017-08-23 Thread Matthew Phillips
Just for everyone's info: seems this update breaks CIDER 0.15: https://github.com/clojure-emacs/cider/issues/2081 -- 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 m

Re: Upgrading to Clojure 1.8 (direct linking)

2016-04-07 Thread Matthew Phillips
On Friday, April 8, 2016 at 5:50:33 AM UTC+9:30, Sean Corfield wrote: > > On 4/6/16, 1:21 PM, "Piyush Katariya" on behalf of corporat...@gmail.com > wrote: > > Has anybody experienced the performance boost by switching to Clojure > version 1.8 (and direct linking) ? > > We switched to direct l

ANN: MPEdn, an EDN reader/writer for OS X and iOS

2013-02-22 Thread Matthew Phillips
Hello all, just letting anyone who might be interested know that I've posted MPEdn, an EDN reader/writer implementation for OS X and iOS: https://github.com/scramjet/mpedn It's in active use in a project of mine, so I'm going to go ahead and claim it's a stable and useful 1.0 release. Feedba

Re: EDN for Objective-C (iOS/OS X)

2013-02-06 Thread Matthew Phillips
ps://github.com/brandonbloom/libclj > > > 2013/2/5 Matthew Phillips > > >> Hello, >> >> a quick search of this group, and the web at large, doesn't get any hits >> for an Obj-C EDN implementation. Is there anyone working on this? >> >> If not, I&

EDN for Objective-C (iOS/OS X)

2013-02-05 Thread Matthew Phillips
Hello, a quick search of this group, and the web at large, doesn't get any hits for an Obj-C EDN implementation. Is there anyone working on this? If not, I'll likely go ahead and implement a basic subset of the EDN spec for my own needs, which I'd be happy to share. Cheers, Matthew. -- --

lein-ritz Swank character coding

2012-11-04 Thread Matthew Phillips
Hello, my current lein-ritz (0.5.0) setup, started with slime-connect, hangs when handling Unicode characters, e.g. user> (def a "\uD83D\uDE1F") ; UTF-16 representation of Unicode 4 WORRIED FACE #'clojure.core/a user> a "?" The REPL is hung at this point: in the the mini buffer I see "error i

Re: Inconsistency of dissoc on maps vs records?

2012-04-21 Thread Matthew Phillips
On Friday, April 20, 2012 4:01:54 PM UTC+9:30, David Jagoe wrote: > > > On 20 April 2012 07:08, Matthew Phillips wrote: > >> I've always liked the way assoc and dissoc return the original map >> instance when there's no change to be made. But this is not a

Inconsistency of dissoc on maps vs records?

2012-04-19 Thread Matthew Phillips
I've always liked the way assoc and dissoc return the original map instance when there's no change to be made. But this is not apparently true of records. e.g.: > (def m {:a 1}) > (identical? m (dissoc m :x)) ; true > (def r <>) > (identical? r (dissoc r :x)) ; false Does anyone know if there'

Re: Wisdom sought for functional iterative processing

2011-06-14 Thread Matthew Phillips
On Jun 15, 12:41 pm, Christian Schuhegger wrote: > Ah, sorry, perhaps I misunderstand you, but if you use multimethods > (defmulti) in Clojure you do not need to "attach" methods to anything. > The defmulti will allow you "dispatch-on-type" based on the key which > is present in the map  (e.g. if

Re: Wisdom sought for functional iterative processing

2011-06-14 Thread Matthew Phillips
On Jun 15, 11:51 am, Mark Engelberg wrote: > On Tue, Jun 14, 2011 at 7:41 PM, Matthew Phillips wrote: > > Yes. I agree that can work, and that's what I've done in some other > > situations, but it has the downside of lots of "recur" points > > sprinkled

Re: Wisdom sought for functional iterative processing

2011-06-14 Thread Matthew Phillips
On Jun 14, 4:40 pm, Alex Osborne wrote: > Matthew Phillips writes: > > The only way I can think of to write it in Clojure is: > > > (reduce > >   (fn [items op] > >     (let [items1 (if (:delete op) (drop-index (:delete op) items) > > items)] > >      

Re: Wisdom sought for functional iterative processing

2011-06-14 Thread Matthew Phillips
On Jun 14, 12:30 pm, Mark Engelberg wrote: > On Mon, Jun 13, 2011 at 7:37 PM, Matthew Phillips wrote: > > List items = initialItems (); > > > for (Op op : operations) > > { > >  if (op.requiresDelete ()) > >    items.remove (op.indexToDelete ()); > >

Re: Wisdom sought for functional iterative processing

2011-06-14 Thread Matthew Phillips
On Jun 14, 12:05 pm, gaz jones wrote: > if i was writing the java i would probably do a "tell dont ask" > refactoring so that the operations had an applyTo method: > > List items = initialItems (); > > for (Op op : operations) > { >   op.applyTo(items); > > } > > not sure what your op data structu

Wisdom sought for functional iterative processing

2011-06-13 Thread Matthew Phillips
Hello all, I've been programming Clojure now for long enough that I'm starting to think I'm at the point of being fluent … almost. One area that keeps tripping me up is iteratively processing a data structure when the processing is highly conditional and may take several overlapping paths. An exam

Re: Protocols and default method implementations

2010-08-17 Thread Matthew Phillips
On Aug 12, 10:51 pm, Stuart Halloway wrote: > The other thing that you should consider is that protocols are the > contract for implementers, not the contract for callers. If you > change a contract for implementers, then the implementers *must* > change. > > Take your example of a function that h

Re: Protocols and default method implementations

2010-08-16 Thread Matthew Phillips
: the instance just needs to provide whichever one is most suitable. Matthew. On Aug 14, 9:30 pm, Nicolas Oury wrote: > On Sat, Aug 14, 2010 at 5:32 AM, Matthew Phillips wrote: > > > One idea that I tried was to use extend-type on a protocol, say to > > extend any Node to b

Re: Protocols and default method implementations

2010-08-16 Thread Matthew Phillips
Thanks to all of you who responded. So, I think my original thesis was correct: I'm clearly misconstruing something quite fundamental here ;) And I can see now my original example was clumsy: for example something like PrettyPrintable *should* be an orthogonal protocol to Node. (Not to mention th

Re: Protocols and default method implementations

2010-08-14 Thread Matthew Phillips
On Aug 14, 3:22 am, Armando Blancas wrote: > > A more concrete example: say I've defined a protocol for AST nodes in > > 1.0 of a library, and later when developing 2.0 I discover it would > > have been a good idea to have a "pretty-print" method on nodes to show > > human-readable output. If the

Re: Protocols and default method implementations

2010-08-14 Thread Matthew Phillips
On Aug 14, 9:07 am, Kevin Downey wrote: > so clients don't directly call the protocol functions they call > print-ast which then checks to see if PrettyPrintable has been > extended to the object and falls back to the default if it hasn't Sure, but I'm talking about publishing protocols that clie

Re: Protocols and default method implementations

2010-08-14 Thread Matthew Phillips
On Aug 14, 12:34 am, Stuart Halloway wrote: > > Following Stuart's suggestion, I *could* just add a protocol > > called "PrettyPrintable" with one method and implement it on some > > of the new node types, but now I can't just call "pretty-print" on > > any node: I need to write another function t

Re: Protocols and default method implementations

2010-08-13 Thread Matthew Phillips
On Aug 13, 3:38 am, Stuart Halloway wrote: > > Stu, (or anybody) I'd like to ask about a variation on this > > point. How do you handle the case where you have a general > > function that works for every type you'd like to implement a > > protocol for (thus not technically needing to be in a proto