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 invariant
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:
>
> Ga
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
@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 languages,
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 un
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 comparing
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 ill-typed denominator.
--
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 wrong, but i do not v
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 subs
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 ", Error: " :error)
>
| 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
>
> 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
> l
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 t
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 to
>
> 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 Freg
On a priority map pm, (.priority->set-of-items pm) will return a sorted map
from priorities (i.e., the values in the priority-map) to sets of items
that have that priority (i.e., the keys in the priority-map).
With that sorted map you can look up specific priorities, or do various
subseq operation
16 matches
Mail list logo