Re: What's up with IMeta?

2017-11-01 Thread Alex Miller
+1 to everything James said. -- 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: What's up with IMeta?

2017-11-01 Thread James Reeves
IMeta only allows you to read metadata. IObj is for immutable data that can be duplicated with new metadata. IReference is for references. So an immutable map would implement IObj, but an atom would implement IReference. If you want to support metadata, you need to decide what type of object it

Re: What's up with IMeta?

2017-11-01 Thread Timothy Baldridge
To start with, IObj and its .meta method are used with clojure.core/meta to get the metadata on an object. Since this method can be the same between refs and immutable data, they all use the same interface. IMeta is used with withMeta and clojure.core/with-meta to return a new object with the

Re: [ANN] Clojure 1.9.0-beta4

2017-11-01 Thread Didier
> > FWIW, bigdec? seemed to fit better, given bigdec as a coercion and > BigDecimal as the underlying type – decimal? always seemed like the anomaly. > Thought so too, but since there's no small decimal, or any other decimal, its survivable. Though it does get a bit confusing, especially since

What's up with IMeta?

2017-11-01 Thread Didier
Hey, I was surprised to find that IMeta does not work for (with-meta). So it seems that withMeta is added to IObj, which extends IMeta. And it seems like alterMeta and resetMeta are added in IReference, which also extends IMeta. So now if you want to support meta, you have to implement

Re: Grateful Appreciation

2017-11-01 Thread Wei Hsu
I want to say the same. I've been using Clojure for nearly a decade and it remains my favorite language to work in, largely thanks to the ecosystem and wonderful community. Keep up the good work! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: Grateful Appreciation

2017-11-01 Thread Matching Socks
Simplicity is a rare pleasure, and so too is a standard library diverging only immaterially from the ideal of 1 data structure and 100 functions. In Clojure, it saves a lot of time that would otherwise be spent asking questions on Stack Overflow. Or rather, it frees up a lot of time for

RE: [ANN] Clojure 1.9.0-beta4

2017-11-01 Thread Sean Corfield
Aside from needing to change bigdec? to decimal? in four places in our code, testing with Beta 4 has not shown any problems so we’ll probably go to production with it early next week. FWIW, bigdec? seemed to fit better, given bigdec as a coercion and BigDecimal as the underlying type –

Re: An Annotation within an Annotation

2017-11-01 Thread Justin Smith
when you use ^{}, that applies metadata to the next form. In the highlighted code, you are trying to put metadata on the keyword :component - perhaps the ^TestType metadata should go on the hash-map on that line instead of turning the whole hash-map into metadata ? On Wed, Nov 1, 2017 at 7:37 AM

Re: An Annotation within an Annotation

2017-11-01 Thread Jan Stavel
Hello, I have forgetten an error that 'lein compile' gives. java.lang.IllegalArgumentException: Metadata can only be applied to IMetas, compiling:(rhsm/cockpit/tests/register_tests.clj:88:35) Exception in thread "main" java.lang.IllegalArgumentException: Metadata can only be applied to

An Annotation within an Annotation

2017-11-01 Thread Jan Stavel
Hello everybody, I am trying to annotate a method in clojure where annotation type is made up of nested annotations. Example of similar java code: https://github.com/jstavel/rhsm-qe/blob/polarion-annotations/src/rhsm/cli/tests/ContentTests.java#L66 I want to do the same in clojure. This is

Re: Grateful Appreciation

2017-11-01 Thread Colin Yates
This. Sent from my iPhone > On 31 Oct 2017, at 23:59, Alan Moore wrote: > > All, > > I want to give a shout out to all the Clojure, ClojureScript, library and > tool developers (all y’all really) to say how much I appreciate your efforts. > > It takes a lot of