clojure.spec merge+or bug?

2017-05-31 Thread Alex Miller
This is actually the expected result. s/merge doesn't flow like s/and - only the conformed version of the last map spec in the merge is used. There are thus some unexpected results in combination with the -un options as they are the only link towards conforming. One thing you could try instead

Re: [ANN] spec.alpha 0.1.109

2017-05-31 Thread Alex Miller
Not sure if anyone has noticed this yet, but the explain data has new attributes for the root soec and value in it and the explain printer is (unintentionally) printing them right now. Will fix in next spec. -- You received this message because you are subscribed to the Google Groups "Clojure"

[ANN] Clojure 1.9.0-alpha17

2017-05-26 Thread Alex Miller
Clojure 1.9.0-alpha17 is now available. Try it via - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-alpha17 - Leiningen: [org.clojure/clojure "1.9.0-alpha17"] 1.9.0-alpha17 includes the following changes since 1.9.0-alpha16: - CLJ-1793 Clear 'this' before calls in tail posit

Re: [ANN] spec.alpha 0.1.109

2017-05-26 Thread Alex Miller
There was a build snafu with the version number so we have re-released this as [org.clojure/spec.alpha "0.1.123"]. No code changes, so effectively the same content. On Friday, May 26, 2017 at 10:16:57 AM UTC-5, Alex Miller wrote: > > spec.alpha 0.1.109 is now available

[ANN] spec.alpha 0.1.109

2017-05-26 Thread Alex Miller
spec.alpha 0.1.109 is now available. Try it via: [org.clojure/spec.alpha "0.1.109"] 0.1.109 includes the following changes: - CLJ-2153 - Docstring for int-in-range? and int-in now mention fixed precision constraint - CLJ-2085

SymbolHound search engine

2017-05-25 Thread Alex Miller
Created an issue: https://github.com/clojure/clojure-site/issues/181 -- 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

SymbolHound search engine

2017-05-25 Thread Alex Miller
There has been some talk of updating this and adding it as a guide on clojure.org as a guide, which I think would be great. That would require permission from the author or alternately could be a clean rewrite with the same approach. I think it's a useful inverted complement to the reader refer

Re: slackpocalypse?

2017-05-19 Thread Alex Miller
On Friday, May 19, 2017 at 2:27:35 PM UTC-5, Gregg Reynolds wrote: > > > I'm inclined to think moving away from slack would be wise, but only with > the blessing of the core Clojure team. After all any of us could set up > something on matrix or discourse etc. but if successful that would lead

Re: Understanding `clojure.core.reducers/rfn`

2017-05-19 Thread Alex Miller
ply f input inputs) > > > Yet they are clearly *not* the same: there is nothing in the transducer > about `[ret k v]`. So I must be missing something fundamental about the > relationship between reducers and transducers. > > > On Thursday, May 18, 2017 at 9:34:54

Re: Understanding `clojure.core.reducers/rfn`

2017-05-18 Thread Alex Miller
gt; On Thursday, May 18, 2017 at 4:11:39 PM UTC-7, Alex Miller wrote: >> >> The 3 arity is used when reducing over a map, like reduce-kv. Reducers do >> this automatically which varies from the core reduce. > > -- You received this message because you are subscribed to the

Understanding `clojure.core.reducers/rfn`

2017-05-18 Thread Alex Miller
The 3 arity is used when reducing over a map, like reduce-kv. Reducers do this automatically which varies from the core reduce. -- 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 po

Re: [clojure.spec/form] Need for evaluated subspecs

2017-05-18 Thread Alex Miller
uot;dynamic" spec constructors is usually to avoid > boilerplate when writing specs. Unless I'm missing what I shouldn't do, I'd > prefer to have direct support for that spares me having to deal with two > forms. > In what way are you "dealing with"

Re: [spec] Instrumentation for protocol methods?

2017-05-18 Thread Alex Miller
For the forseeable future, no. On Thursday, May 18, 2017 at 2:28:25 PM UTC-5, Yuri Govorushchenko wrote: > > Hello, > > I wonder, will it be possible to add specs to defprotocols? I use > protocols a lot and it would be very handy to be able to instrument > protocol methods. It is something Plum

Re: [clojure.spec/form] Need for evaluated subspecs

2017-05-18 Thread Alex Miller
On Wednesday, May 17, 2017 at 3:02:17 PM UTC-5, marian.hor...@vacuumlabs.com wrote: > > Hi, > > I am writing a function that transforms Specs to another formats (similar > to the JSON Schema). Assuming from this post >

Re: Spec: Nested Cat Calls

2017-05-16 Thread Alex Miller
The problem here is that s/or is NOT a regex op and introduces a new level of spec nesting. Try using s/alt (which IS a regex op) instead. On Tuesday, May 16, 2017 at 11:34:10 PM UTC-5, Alexander Sedgwick wrote: > > I'm looking to better understand how nested cats work (now that just > sounds f

Re: class and case

2017-05-13 Thread Alex Miller
Or case on (.getName the-class). -- 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 fro

Reducers exception when calling into

2017-05-11 Thread Alex Miller
The symptoms sound like you are running into a case where there are multiple protocol branches that apply - this is a case where the behavior is undefined and can vary between JVM executions. Looks like it's going down the seq reduce path. I'm not at a computer to check more precisely what the

Re: Starting with Clojure

2017-05-09 Thread Alex Miller
There's a lot of stuff being posted right now at https://news.ycombinator.com/item?id=14302762 too. On Tuesday, May 9, 2017 at 11:28:10 AM UTC-5, Kristian Koci wrote: > > Thank You very much! > > El martes, 9 de mayo de 2017, 7:17:32 (UTC-4), adrian...@mail.yu.edu > escribió: >> >> https://cloju

Re: Clojure.spec: need function equivalents of library macros?

2017-05-09 Thread Alex Miller
On Tuesday, May 9, 2017 at 6:21:29 AM UTC-5, Dave Tenny wrote: > > My issues aren't about qualified or unqualified keys (and the APIs > generally need to accept unqualified keys - I do use qualified keys in > various contexts, just not this post where the topic is macros vs. > non-macro forms).

Re: Clojure.spec: need function equivalents of library macros?

2017-05-09 Thread Alex Miller
Is there any reason why you're using unqualified keys? If you're using qualified keys, then a simple (s/keys) spec will validate all registered keys in the map so you can cover all of your optional attribute cases that way. Another possibility worth mentioning is using s/merge to combine well-k

Re: [ANN] Clojure 1.9 / clojure.spec split

2017-05-03 Thread Alex Miller
Going forward, you will need to create your classpath with three jars: Clojure, spec.alpha, and core.specs.alpha. There are some more things planned in this area still to come. We do not currently plan to build a combined jar but things may change. The web page in question will be updated when 1

Re: potential bug with pr-str+print

2017-05-02 Thread Alex Miller
On Tuesday, May 2, 2017 at 6:00:52 PM UTC-5, Jenny Finkel wrote: > > Thanks for the reply. Your explanation for why it should be expected > sounds like implementation details though (why it is that way, but not why > it should be that way). > I'll grant you that, and I could certainly be wrong

Re: potential bug with pr-str+print

2017-05-02 Thread Alex Miller
The `pr` family of functions prints data as readable data by default (with *print-readably* defaulted to true - this happens in RT). The `print` family of functions wraps the `pr` family and turns off this behavior by binding *print-readably* to nil. So I think when surrounding a pr with a pr

[ANN] Strange Loop 2017 CFP closes May 8th!

2017-05-01 Thread Alex Miller
Strange Loop 2017 Sept 28-30, 2017 St. Louis, MO The Strange Loop conference is currently holding their open call for presentations. We are looking for both two hour workshops and 40 minute sessions for this year's event. Requested topics include: * Programming languages, compilers, virtual ma

[ANN] Clojure 1.9.0-alpha16 is now available

2017-04-27 Thread Alex Miller
Clojure 1.9.0-alpha16 is now available. Try it via - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-alpha16 - Leiningen: [org.clojure/clojure "1.9.0-alpha16"] 1.9.0-alpha16 includes the following changes since 1.9.0-alpha15: - The namespaces clojure.spec, clojure.spec.gen, c

Re: [ANN] Clojure 1.9 / clojure.spec split

2017-04-27 Thread Alex Miller
On Thursday, April 27, 2017 at 3:05:26 AM UTC-5, Tamas Herman wrote: > > What problems would it pose if the alpha status would be reflected in the > version number of org.clojure/spec, > just like it is the case with org.clojure/clojure rightnow, which is > 1.9.0-alpha15? > At some future point

Re: [ANN] Clojure 1.9 / clojure.spec split

2017-04-26 Thread Alex Miller
, Apr 26, 2017 at 7:54 PM, Alex Miller wrote: > [org.clojure/spec.alpha "0.1.94"] > [org.clojure/core.specs.alpha "0.1.10"] > > are available now. > > > On Wednesday, April 26, 2017 at 1:28:05 PM UTC-5, Sean Corfield wrote: >> >> Whilst this is r

Re: [ANN] Clojure 1.9 / clojure.spec split

2017-04-26 Thread Alex Miller
[org.clojure/spec.alpha "0.1.94"] [org.clojure/core.specs.alpha "0.1.10"] are available now. On Wednesday, April 26, 2017 at 1:28:05 PM UTC-5, Sean Corfield wrote: > > Whilst this is rather disruptive for current users of clojure.spec, I > understand and appreciate the goal. > > > > I hope th

Re: [ANN] Clojure 1.9 / clojure.spec split

2017-04-26 Thread Alex Miller
On Wednesday, April 26, 2017 at 6:27:08 PM UTC-5, Colin Fleming wrote: > > Doesn't this mean that Clojure and spec will be mutually dependent, i.e. a > dependency cycle? > Yes > Is that likely to cause problems for any tooling? > No? :) Feedback wanted, though if you find that to not be the

Re: [ANN] Clojure 1.9 / clojure.spec split

2017-04-26 Thread Alex Miller
On Wednesday, April 26, 2017 at 11:32:39 AM UTC-5, Leon Grapenthin wrote: > > Thanks for the update, this seems like a good decision allowing things to > evolve more quickly. > > Does that also mean that there are no breaking changes intended to current > non .alpha namespaces/APIs? > 1.9 itsel

[ANN] Clojure 1.9 / clojure.spec split

2017-04-26 Thread Alex Miller
We are moving spec out of the Clojure repo/artifact and into a library to make it easier to evolve spec independently from Clojure. While we consider spec to be an essential part of Clojure 1.9, there are a number of design concerns to resolve before it can be finalized. This allows us to move

Re: What sorcery is this? (`reduced`, `reduced?`)

2017-04-25 Thread Alex Miller
The source for both functions is pretty simple (use the source!), although admittedly `reduced?` does some work to optimize perf that obscures it a little. `reduced` is used by a reducing function to indicate to the outer reducing process that a return value should end the reduce. It does this

[ANN] Clojure infrastructure SSL

2017-04-21 Thread Alex Miller
The following bits of Clojure infrastructure are now https-only and redirect all traffic from http to https: https://build.clojure.org - Jenkins https://dev.clojure.org/jira - JIRA https://dev.clojure.org - Confluence Let me know if you see anything amiss. Alex -- You received this message bec

Re: Has anyone tried building ClojureCLR using dontnet core on non-windows platforms?

2017-04-17 Thread Alex Miller
Just FYI, might also want to ask on https://groups.google.com/forum/#!forum/clojure-clr On Monday, April 17, 2017 at 1:15:10 PM UTC-5, Kashyap CK wrote: > > Hi, > I am attempting to build ClojureCLR on Mac- I was wondering if anyone's > already done this. > Regards, > Kashyap > -- You received

Using specs as/from resources

2017-04-12 Thread Alex Miller
On the first problem, I think you want your resource-paths to just be ["resources"], a root under which the namespace paths can be resolved. On the second, I don't understand what you're describing. Seeing the specs would help. Not familiar with noghtcode to debug the third. -- You received t

Re: Using transducers in a new transducing context

2017-04-11 Thread Alex Miller
> > >> Transducers should ensure stateful changes guarantee visibility. That is: >> you should not make assumptions about external memory barriers. > > > How do you enforce no more than one thread at a time without setting a > memory barrier ? > I could have one thread that invokes a transduce

Re: Using transducers in a new transducing context

2017-04-10 Thread Alex Miller
On Monday, April 10, 2017 at 2:25:48 PM UTC-5, Alexander Gunnarson wrote: > > I think you present a key question: what assumptions can a transducer > make? We know the standard ones, but what of memory barriers? > Transducers should ensure stateful changes guarantee visibility. That is: you s

Re: Using transducers in a new transducing context

2017-04-10 Thread Alex Miller
On Monday, April 10, 2017 at 1:57:10 PM UTC-5, Léo Noel wrote: > > What you said holds for reduction but not necessarily a parallel fold (see >> clojure.core.reducers/fold). >> > > Exactly, and that's why stateful transducers are explicitly forbidden in > fold and in core.async pipeline function

Re: Using transducers in a new transducing context

2017-04-10 Thread Alex Miller
On Monday, April 10, 2017 at 11:48:41 AM UTC-5, Alexander Gunnarson wrote: > > Léo, I definitely agree that you can use unsynchronized mutable stateful > transducers *as long as you can guarantee they'll be used only in > single-threaded contexts. * > Transducers included in core cannot make th

Re: Using transducers in a new transducing context

2017-04-10 Thread Alex Miller
On Sunday, April 9, 2017 at 9:44:00 PM UTC-5, Alexander Gunnarson wrote: > > > As an aside about the stateful `take` transducer, Tesser uses the > equivalent of one but skirts the issue by not guaranteeing that the first n > items of the collection will be returned, but rather, n items of the

Re: Using transducers in a new transducing context

2017-04-10 Thread Alex Miller
I don't agree with your conclusions. :) A transducing process could apply each step of the transduce using a thread from a pool and also not use a memory barrier - in that scenario visibility across threads would not be ensured. These kinds of failures are inherently difficult to reproduce unl

Re: Using transducers in a new transducing context

2017-04-09 Thread Alex Miller
Hey all, just catching up on this thread after the weekend. Rich and I discussed the thread safety aspects of transducers last fall and the intention is that transducers are expected to only be used in a single thread at a time, but that thread can change throughout the life of the transducing

[ANN] New Clojure story pages on clojure.org

2017-04-05 Thread Alex Miller
I wanted to let people to know that we've been updating the clojure.org site to add some deeper descriptions of companies using and succeeding with Clojure: https://clojure.org/community/success_stories is a port of the success stories that were previously hosted on the Cognitect web site: ht

Re: spec docs

2017-04-03 Thread Alex Miller
Either an issue or a PR on the clojure-site repo is best for the site. On Monday, April 3, 2017 at 6:21:57 PM UTC-5, Gregg Reynolds wrote: > > > > On Mon, Apr 3, 2017 at 6:20 PM, Gregg Reynolds wrote: > >> >> >> On Mon, Apr 3, 2017 at 5:38 PM, Sean Corfield wrote: >> >>> For clojure.org, the sou

Re: How do I just use AOT compiled class files over clj(c) source with a leiningen uberjar?

2017-04-03 Thread Alex Miller
On Saturday, April 1, 2017 at 2:24:30 PM UTC-5, Daniel Compton wrote: > > Zach Tellman talked > about > making Clojure work better with Proguard in August 2016. I couldn’t find > any open JIRA tickets about this though. > Zach a

Re: How do I just use AOT compiled class files over clj(c) source with a leiningen uberjar?

2017-04-03 Thread Alex Miller
core_instant18.clj is conditionally loaded if you are using >= Java 1.8 to extend the Inst protocol to java.time.Instant (which didn't exist in prior JDKs). This is set up at: https://github.com/clojure/clojure/blob/7aad2f7dbb3a66019e5cef3726d52d721e9c60df/src/clj/clojure/core.clj#L6661-L6665 T

Re: Protocol support with spec?

2017-03-29 Thread Alex Miller
multi-spec doesn't require you to use a key of a map - it's an arbitrary function on arbitrary data, so it could leverage satisfies? or other protocol functionality. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

escape characters to make a string literal

2017-03-29 Thread Alex Miller
Clojure leans on Java to read that literal. There is no Clojure function to forcibly print it that way again, but you can probably use the Java methods on String or Character to get the String representation of a character somehow. -- You received this message because you are subscribed to the

Re: Protocol support with spec?

2017-03-29 Thread Alex Miller
On Tuesday, March 28, 2017 at 11:52:11 AM UTC-5, Didier wrote: > > I was wondering if protocols do or will be extended to support specs? I think that's undetermined at this point. > I'm thinking in the two following ways: > > 1) I can spec a protocol's functions so that whoever implements it

How do I spec a nullary function?

2017-03-23 Thread Alex Miller
(s/fdef :args (s/cat) ... -- 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

Re: java interop, `(.instanceMember Classname)`

2017-03-21 Thread Alex Miller
On Tuesday, March 21, 2017 at 11:43:25 AM UTC-5, John Gabriele wrote: > > > Erf. Sorry. I don't think I understand that after all, and as well may > have confused java.lang.String and java.lang.Class in my above reply. > > I also notice now that: > > user=> (class String) > java.lang.Cla

Re: java interop, `(.instanceMember Classname)`

2017-03-21 Thread Alex Miller
John Gabriele wrote: > > > > On Monday, March 20, 2017 at 7:47:46 PM UTC-4, Alex Miller wrote: >> >> If someone could file an issue on the clojure-site repo, I would be happy >> to improve the example. > > > Thanks. Filed: <https://github.com/clojure/c

Re: java interop, `(.instanceMember Classname)`

2017-03-20 Thread Alex Miller
If someone could file an issue on the clojure-site repo, I would be happy to improve the example. -- 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 mode

[ANN] core.async 0.3.442

2017-03-14 Thread Alex Miller
core.async 0.3.442 is now available. Try it via: [org.clojure/core.async "0.3.442"] 0.3.442 includes the following changes: - Fixed bad use of :refer-clojure that was failing with the new core specs in 1.9.0-alpha15 -- You received this message because you are subscribed to the Google Groups

Re: [ANN] Clojure 1.9.0-alpha15 is now available

2017-03-14 Thread Alex Miller
(quote :exclude) (quote [reduce transduce into merge > map take partition partition-by bounded-count]) (quote :as) (quote core))}, > compiling:(clojure/core/async.clj:9:1) > > > On Tuesday, March 14, 2017 at 12:39:35 PM UTC-4, Alex Miller wrote: >> >> Clojure 1.9.0-alph

Re: [ANN] Clojure 1.9.0-alpha15 is now available

2017-03-14 Thread Alex Miller
Looks like while CLJ-1793 was ok'ed for this alpha, it was missed when the patches were applied, so that one will not be in until the next alpha. Whoops! On Tuesday, March 14, 2017 at 11:39:35 AM UTC-5, Alex Miller wrote: > > Clojure 1.9.0-alpha15 is now available. > > Try it v

[ANN] Clojure 1.9.0-alpha15 is now available

2017-03-14 Thread Alex Miller
Clojure 1.9.0-alpha15 is now available. Try it via - Download: https://repo1.maven.org/maven2/org/clojure/clojure/1.9.0-alpha15 - Leiningen: [org.clojure/clojure "1.9.0-alpha15"] 1.9.0-alpha15 includes the following changes since 1.9.0-alpha14: - CLJ-1793 - reducer instances hold onto the head

Re: Source Code for Stuart Halloway's ETL Talk

2017-03-10 Thread Alex Miller
Sorry, I don't have any control over the page - that's the publisher. -- 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

Re: Private member variables for deftype

2017-03-10 Thread Alex Miller
No. On Friday, March 10, 2017 at 5:14:09 PM UTC-6, Tianxiang Xiong wrote: > > Is there a way of giving a type defined with `deftype` internal member > variables? E.g. not passed explicitly in the constructor. > > With `reify`, we can use a closure > :

Re: Source Code for Stuart Halloway's ETL Talk

2017-03-10 Thread Alex Miller
Hey, the page just appeared today actually... it's alive! https://pragprog.com/book/shcloj3/programming-clojure On Friday, March 10, 2017 at 4:25:39 PM UTC-6, Alex Miller wrote: > > It's coming along nicely, should be out in beta this summer I think, > including a brand

Re: Source Code for Stuart Halloway's ETL Talk

2017-03-10 Thread Alex Miller
; > On Thursday, March 9, 2017 at 7:05:52 PM UTC-7, Alex Miller wrote: >> >> He has not yet released it but he is still planning to do so. > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send e

Source Code for Stuart Halloway's ETL Talk

2017-03-09 Thread Alex Miller
He has not yet released it but he is still planning to do so. -- 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 f

Re: Vars as global thread-locals?

2017-03-09 Thread Alex Miller
Regarding your last question, yes using volatiles has a performance impact, but is essential to both accomplish the var api and be thread-safe. It is also possible to compile your code with aot and direct linking. In this case var lookups are replaced with a direct invocation (no var lookup). -

Re: ensure causes more contention than ref-set [Was: Ensure more concurrency]

2017-03-09 Thread Alex Miller
A ticket is fine. If someone wants to dig into it further, please feel free to add info to the ticket. On Thursday, March 9, 2017 at 9:07:31 AM UTC-6, Bendlas wrote: > > 2017-03-09 12:34 GMT+01:00 'bertschi' via Clojure < > clojure@googlegroups.com>: > > Thanks for your comments. As suggested I

Compiling a library with direct-linking

2017-03-09 Thread Alex Miller
Yes, you can compile and release a library that is AOT and direct linked. -- 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

Navigators and lenses

2017-03-08 Thread Alex Miller
Edwin, we can have technical discussions about this topic without comparing Nathan to Rich or making comments about Nathan that may feel like a personal attack. Thanks -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send emai

Re: How to transform deeply nested map into a series of arrays?

2017-03-08 Thread Alex Miller
: > > Thank you, Alex. That makes sense. What is the main use case for walk? > > > On Wednesday, March 8, 2017 at 3:16:42 PM UTC-5, Alex Miller wrote: >> >> Usually the walk solution for transformation is easiest with postwalk: >> >> (require '[clojure.walk :refer

Re: How to transform deeply nested map into a series of arrays?

2017-03-08 Thread Alex Miller
Usually the walk solution for transformation is easiest with postwalk: (require '[clojure.walk :refer [postwalk]]) (defn m-to-v [m] (if (map? m) (mapcat (fn [[k v :as e]] (if (coll? v) (mapv #(into [k] %1) v) [e])) m) m)) (postwalk m-to-v data)

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread Alex Miller
If you are getting an OOME there are some JVM flags that can help dump an error file or heap dump, or run arbitrary commands when an error occurs: -XX:ErrorFile=./hs_err_pid.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./java_pid.hprof -XX:OnError=";" -XX:OnOutOfMemoryError=";" That mig

Re: `extend-protocol` order

2017-03-07 Thread Alex Miller
Per the docs at https://clojure.org/reference/protocols, if more than one protocol extension applies and one is derived from the other then the derived one will be used. In other cases (like two independent interfaces), it is undefined and in my experience you will see different ones get applie

Re: 1.9.0-alpha14 doesn't allow Java classes as return type in gen-class :method clause?

2017-03-06 Thread Alex Miller
t; > > On Sunday, March 5, 2017 at 6:51:57 PM UTC-6, Alex Miller wrote: >> >> I would really appreciate seeing the ns declaration that caused the >> original error. I have not been able to exactly reproduce what you are >> describing. If you can't s

Re: 1.9.0-alpha14 doesn't allow Java classes as return type in gen-class :method clause?

2017-03-05 Thread Alex Miller
M UTC-6, Mars0i wrote: > > On Saturday, March 4, 2017 at 7:58:38 AM UTC-6, Mars0i wrote: >> >> On Saturday, March 4, 2017 at 7:24:05 AM UTC-6, Alex Miller wrote: >>> >>> This is definitely related to the gen-class spec, but I'm not at a >>> computer

Re: What makes Clojure Clojure?

2017-03-05 Thread Alex Miller
cljc is (nothing more than) a file extension (the extra c stands for "common") indicating a file that can be read in more than one Clojure platform. cljc files also support reader conditionals by default on read (but they are of course not required if not needed). -- You received this message

What makes Clojure Clojure?

2017-03-04 Thread Alex Miller
Rich considers ClojureScript and ClojureCLR to be dialects of Clojure, not different languages. -- 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 moderat

Re: Could not locate clojure/tools/namespace/find__init.class or clojure/tools/namespace/find.clj on classpath.

2017-03-04 Thread Alex Miller
> > > Welcome to Clojure. If you want to play with the language, building it is > about the last thing you want to do. > Actually, it's quite fun to add debugging to parts of Clojure and use that modified version and I think it's nice that it is so easy to hack on if you like. -- You recei

Re: Could not locate clojure/tools/namespace/find__init.class or clojure/tools/namespace/find.clj on classpath.

2017-03-04 Thread Alex Miller
On Saturday, March 4, 2017 at 1:53:58 PM UTC-6, Andy Fingerhut wrote: > > The clojure-1.8.0.zip file should also contain a pre-built JAR file named > clojure-1.8.0.jar, if you want to just use that and run with it. > Most people obtain the jar by using a build tool that downloads the pre-built

1.9.0-alpha14 doesn't allow Java classes as return type in gen-class :method clause?

2017-03-04 Thread Alex Miller
This is definitely related to the gen-class spec, but I'm not at a computer to look at enough stuff to say if the bug is your code or the spec. You might try quoting rhe class name in case it's getting resolved to a class instance? Might be crazy talk. -- You received this message because you

Re: is it a bug in clojure? unchecked-multiply

2017-03-03 Thread Alex Miller
Note that using the auto-promoting ops will automatically overflow into an arbitrary precision type: user=> (*' 3037000500 3037000500) 922337203700025N user=> (*' 1000 1000) 100N The trailing N indicates the arbitrary precision integer. On Friday, March 3

Re: Making a Java class implement ILookup

2017-02-28 Thread Alex Miller
If it follows Java bean semantics, you can use the `bean` function to view it as a map with properties as keys. user=> (bean (java.util.Date.)) {:day 2, :date 28, :time 1488314343215, :month 1, :seconds 3, :year 117, :class java.util.Date, :timezoneOffset 360, :hours 14, :minutes 39} On Tuesda

Release date for 1.9

2017-02-28 Thread Alex Miller
Sorry, no estimate at this 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 first post. To unsubscribe fro

[ANN] core.async 0.3.441

2017-02-23 Thread Alex Miller
core.async 0.3.441 is now available. Try it via: [org.clojure/core.async "0.3.441"] 0.3.441 includes the following changes: - ASYNC-187 - Tag metadata is lost in local closed over by a loop (also see ASYNC-188

Re: [ANN] core.async 0.3.426

2017-02-23 Thread Alex Miller
On Thu, Feb 23, 2017 at 9:33 AM, Petr wrote: > I have slightly unrelated question. Why core.async is still not 1.x > version? > Because we don't really associate any emotional significance to the version number. > Is there a feeling that API is still experimental and not mature enough? > The

[ANN] core.async 0.3.426

2017-02-22 Thread Alex Miller
core.async 0.3.426 is now available. Try it via: [org.clojure/core.async "0.3.426"] 0.3.426 includes the following changes: - ASYNC-169 - handling of catch and finally inside go blocks was broken, causing a number of issues - Related:

Re: cognitect.http-client submit spec mismatch

2017-02-17 Thread Alex Miller
What is cognitect.http-client and how are you encountering the problem? On Friday, February 17, 2017 at 4:05:28 AM UTC-6, Leon Grapenthin wrote: > > I don't know where else to file this bug: > > - The spec of submit is in the .specs namespace, and it does not refer to > the correct var. > > > --

Re: Contribute Specter to Clojure core?

2017-02-15 Thread Alex Miller
On Wednesday, February 15, 2017 at 3:41:36 PM UTC-6, Nathan Marz wrote: > > Alex – care to elaborate? When I get this question it would be nice to be > able to tell people why the core team isn't interested. > The default answer to all such questions is no. Clojure has a small library and Rich

Contribute Specter to Clojure core?

2017-02-14 Thread Alex Miller
I don't think Rich would be interested in including Specter in core. Making it a contrib doesn't really seem like it would have many advantages to me over its current status. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, sen

Re: Vars as global thread-locals?

2017-02-08 Thread Alex Miller
On Wednesday, February 8, 2017 at 8:34:06 AM UTC-6, Ernesto Garcia wrote: > > https://clojure.org/reference/vars says > > Clojure is a practical language that recognizes the occasional need to >> maintain a persistent reference to a changing value and provides 4 distinct >> mechanisms for doing

Clojure community survey 2016 results

2017-02-07 Thread Alex Miller
Results and analysis are available here: http://blog.cognitect.com/blog/2017/1/31/state-of-clojure-2016-results Many thanks to all that responded! Alex -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goo

Re: clojure.spec s/keys map key with alternative definitions in same namespace

2017-02-07 Thread Alex Miller
Spec names are intended to have enduring global semantics. So the notion of the same spec name having different semantics at different times seems to be at odds with that. In general, it's often helpful to think about all the possible values that an attribute will have - that's the true spec. I

Re: named? predicate?

2017-02-07 Thread Alex Miller
In 1.9 there is a new ident? function which covers keywords and symbols. If you want to include strings, you would have to make that yourself though. On Tuesday, February 7, 2017 at 9:44:55 AM UTC-6, Dave Tenny wrote: > > I've occasionally wanted this and haven't found it. > > (defn named? > "

Re: Clojure.spec, maps, restrict valid keywords, easier way?

2017-02-02 Thread Alex Miller
Ugh, don't do that. Introducing layers that add no value is a bad idea. Just use the keyword directly. -- 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

Re: What’s next for Clojars in 2017?

2017-02-02 Thread Alex Miller
How is your signing proposal different than the signing process already available in Maven and in use in (for example) Maven Central repository (and in use for Clojure itself and contrib releases)? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: Documentation for namespace aliased keywords (particularly relevant for clojure.spec use)

2017-02-02 Thread Alex Miller
On Wednesday, February 1, 2017 at 6:12:35 PM UTC-6, Dave Tenny wrote: > > Looking at the documentation for keywords under > https://clojure.org/reference/reader#_literals > there is no mention for the syntax for namespace aliased keywords, and > this is very important it you want to manage your

Re: Clojure.spec, maps, restrict valid keywords, easier way?

2017-02-02 Thread Alex Miller
We don't encourage you to do this, but I don't have an easier solution than this. On Thursday, February 2, 2017 at 7:05:37 AM UTC-6, Dave Tenny wrote: > > I want to specify in clojure spec that only declared keywords are > permitted in function calls. > This is to catch what are usually mis-spel

Re: Datomic cardinality/many uniqueness

2017-01-31 Thread Alex Miller
You might want to post this at https://groups.google.com/forum/#!topic/datomic instead... On Tuesday, January 31, 2017 at 1:16:02 PM UTC-6, Dmitry Lipovoi wrote: > > Hey everyone, > > Im trying to express following requirements in datomic schema: person may > have many emails, but no two persons

Re: structuring parallel code

2017-01-30 Thread Alex Miller
One technique is to batch locks at a coarser granularity. You've explored both ends of the spectrum - 1 lock and N locks. You can also divide the overall vector into any group of refs between 1 and N. If refs are too heavy, there are several other locking mechanisms on the JVM. You could try Cl

Tentacles; Going Forward

2017-01-26 Thread Alex Miller
I have no authority to speak on this, but I think it would be nice to see a consensus fork managed by some one or ones with a vested interest in it. (I also have used tentacles off and on.) Maybe another option would be to create a github org of some people that can act as admins. I'd nominate

Re: Migration from schema to clojure.spec

2017-01-23 Thread Alex Miller
On Monday, January 23, 2017 at 4:21:05 PM UTC-6, YangYang wrote: > > Hi all, > > I am building a library for parsing RAML file in clojure (and applied to > our project now), when it come to validation part, there's two options - > schema and clojure.spec. To be hoest I tried both, personally, I

Re: Clojure noob repl question

2017-01-23 Thread Alex Miller
The essential functions in Clojure are similar - read, print, and eval all exist although you'll probably want println to get the newline in there. Because Clojure does not automatically do tail recursion, you'll want to use "loop"/"recur". Putting it all together: (defn repl [] (loop []

Re: Apparently nondeterministic compilation failure

2017-01-23 Thread Alex Miller
Most helpful would be to know what Clojure version you are on now and what changed between when it didn't fail and when it did. There have been a variety of changes to both type hints and classloading over the last few releases and it's likely that the error is now simply found when it was sile

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