Re: Priority Map with efficient search on values?

2017-04-07 Thread Andy Fingerhut
My first quick take is that you would be served well by creating your own data structure that wraps a priority queue for efficient access by minimum value, and a sorted map for efficient access by key, including subseq's of keys. That combination won't give you subseq's on values, but you could

Priority Map with efficient search on values?

2017-04-07 Thread Brian Beckman
I have found a few data types in Clojure that support search and priority queues. In particular, I found Priority Maphttps://github.com/clojure/data.priority-map PSQhttps://goo.gl/Dw4gkV data.avlhttps://goo.gl/e07q7H I would be grateful for a few clarifying words on whether any of

Re: was Re: ANN: Orchestra, complete instrumentation for clojure.spec

2017-04-07 Thread Colin Fleming
> > I have longed for a statically compiled language with type inference with > the simplicity and consistency of Clojure's syntax that also supports > generative testing and works on the JVM but alas, I have not found one. > Frege and PureScript both look interesting but I am unsure of Frege's >

Re: was Re: ANN: Orchestra, complete instrumentation for clojure.spec

2017-04-07 Thread Didier
| I think you missed my point, which is only "Spec is great as we have the power of Clojure" - sure, just don't forget you have the power of ANOther language in that language as well. Hum, I've probably missed your point sorry, I'm still not following. | no, this will, or at least should, be

Re: Atom in macros ==> Can't embed object in code

2017-04-07 Thread James Reeves
Why don't you put the "let" that defines the atom counter inside the quoted form? - James On 7 April 2017 at 22:21, Max Muranov wrote: > I need to create logger for machine learning debugging. First, I wanted to > perform this string: > > (create-logger 10 "Epoch #" :epoch

Re: Stackoverflow error on including link to the same object

2017-04-07 Thread udkl
No problem. I'm actually very new to Clojure but someone posted that on the clojure slack channel today. Serendipity. On Friday, April 7, 2017 at 2:31:43 PM UTC-7, Max Muranov wrote: > > Yes, that's exactly what I needed, thank you! > -- You received this message because you are

Re: was Re: ANN: Orchestra, complete instrumentation for clojure.spec

2017-04-07 Thread Gregg Reynolds
On Apr 6, 2017 3:47 PM, "Raoul Duke" wrote: I am writing to ignorantly sincerely ask how spec + Orchestra compares to other statically typed out of the box JVM languages. What are the succint wins over not Scala shudder but eg Kotlin Ceylon, heck Frege, et. al.? i could be

Re: was Re: ANN: Orchestra, complete instrumentation for clojure.spec

2017-04-07 Thread Gregg Reynolds
On Apr 7, 2017 12:07 AM, "Didier" wrote: Types are not very precise though, like it will catch 10/"123", but not 10/0, because the type isn't more precise then int. no, this will, or at least should, be caught. 10/0 is not an int, and typed "/' would reject 0 as an

Re: was Re: ANN: Orchestra, complete instrumentation for clojure.spec

2017-04-07 Thread Colin Yates
Not sure where you are getting the assertion of equivalence from, it certainly isn't what I meant. I think you missed my point, which is only "Spec is great as we have the power of Clojure" - sure, just don't forget you have the power of ANOther language in that language as well. I think

Re: Stackoverflow error on including link to the same object

2017-04-07 Thread Max Muranov
Yes, that's exactly what I needed, thank you! -- 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

Re: was Re: ANN: Orchestra, complete instrumentation for clojure.spec

2017-04-07 Thread Didier
@Colin Yates If spec is a DSL to describe invariants and the static typing of other languages are too, then it's not true that all static typing DSLs can express what the spec DSL can. If you say, could I build spec in other languages, or can I put asserts in the code using the full

Atom in macros ==> Can't embed object in code

2017-04-07 Thread Max Muranov
I need to create logger for machine learning debugging. First, I wanted to perform this string: (create-logger 10 "Epoch #" :epoch ", Error: " :error) This code will cause this output while training: Epoch #10, Error: 2.0 Epoch #20, Error: 1.0 Epoch #30, Error: 0.0 Epoch #40, Error: 0.0 ... I

Re: Stackoverflow error on including link to the same object

2017-04-07 Thread udkl
Can you try #' ? #' means the var itself, not the value inside the var On Friday, March 31, 2017 at 2:04:29 PM UTC-7, Max Muranov wrote: > > But if I perform such thing this in clojure: > > (send-off (:movement-agent game) (fn [_] game)) > > > > As I found out, I get something like this: > >

Re: was Re: ANN: Orchestra, complete instrumentation for clojure.spec

2017-04-07 Thread Colin Yates
So I see Clojure Spec as an "internal DSL if you squint" for describing invariants that are enforced at runtime. Static typing is also an "internal DSL if you squint" for describing data-shape-invariants at compile time. With Clojure Spec you have the entirety of Clojure to describe those