t; Alex
>
> On Thursday, May 19, 2022 at 4:12:33 PM UTC-5 Dmitry Kakurin wrote:
>
>> Hello,
>> The “Maybe Not” talk from 2018 has hinted at significant upcoming changes
>> for spec, such as removal of “:req” keys for map specs and potential
>> introduction
Hello,
The “Maybe Not” talk from 2018 has hinted at significant upcoming changes
for spec, such as removal of “:req” keys for map specs and potential
introduction of “spec/select”.
But I could not find any additional information in the past 3-4 years on
the evolution of that line of development.
Interesting, I did not know that.
That's OK if checks do not *guarantee* correctness.
But having 20/80 Pareto principle in mind: if few simple detection technics
will warn about 80% of ambiguous grammars (especially the ones found in
practice), that would be very helpful.
Thanks, Dmitry.
--
--
y
least I'd like to detect ambiguity during my app startup.
I.e. I'd like to put a big fat assert during initialization phase.
Is there a way to do it now (or planned in the future)?
Thanks for being patient with me :-), Dmitry.
On Friday, April 12, 2013 12:51:36 AM UTC-7, puzzler wrote:
Hi Mark,
Brilliant work, thank you!
I was playing with your arithmetic parser from tutorial, and noticed the
following definition for add and sub:
"expr = add-sub
= mul-div | add | sub
add = add-sub <'+'> mul-div
sub = add-sub <'-'> mul-div
...
And I realize now that the ord
Very well, something along these lines would be my guess too.
But that would mean that in case 2 protocols are no faster
than multimethods.
And I've got an impression that protocols are described to be as fast as
interface dispatch (callvirt).
So either my impression is wrong (which is totally po
[2] and if it is, calls the count function
> implemented in that type.
>
> [1]https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/R...
> [2]https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/C...
>
> On Sat, May 7, 2011 at 10:00 PM, Dmitry
Is there a document describing internal implementation of Clojure
protocols?
I.e. what is happening "under the hood"?
To be specific suppose I have extended ICountable protocol with a
single "count" method to String class. What happens when I call (count
"some string")?
At what point dynamic dispat
The last successful build was on June 23rd.
- Dmitry
--
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 pos
It's a great idea, and the site looks very good.
Two suggestions:
1. Move examples section above source code section
2. Add OpenID sign in support. Personally I'm instantly repelled by
sites asking me to create another account/password. And I'm sure I'm
not alone. Stackoverflow.com is a great examp
Suppose I already have a function f that accepts 0 and 1 param:
(defn f
([] 0)
([ _ ] 1))
How do I extend it with additional version that takes 2 params?
Something like the following that does not override the original:
(defn f [ _ _ ] 2)
and makes all 3 work:
(f)
(f 1)
(f 1 2)
- Dmitry
--
On Dec 17, 10:42 am, Santhosh G R wrote:
> Again the same statement about being humble :-(
The "humble" comment relates to the title of your article.
Lookup (and contrast) words "analysis" and "opinion" in your favorite
dictionary.
Were your post named "My opinion about Clojure" I would not make
Please keep in mind that it is almost literally the speech that I give
to my friends/colleagues when they ask me why am I so excited about
Clojure. I did it many times now and I have quickly learned that
saying "persistent data structures" gets misinterpreted by every
single person as "something yo
Judging by the article you've spent very little time "learning"
Clojure and have managed to get every key point wrong:
> Clojure is a multi-paradigm language
no it's not, and it's most certainty not an OOP language:
http://clojure.org/rationale
> Functional programming finds its best implementat
Thanks for a great idea Andrew!
I was slightly annoyed by the lack of consistency in parameter
ordering of Clojure collections API (cons vs conj, get/assoc vs filter/
map/take).
IMHO the input collection should ALWAYS be the last param. Then simple
->> macro would be sufficient in most cases.
Out o
On Oct 21, 9:14 pm, John Harrop wrote:
> You probably therefore want this instead:
>
> (defn multi-filter [filters coll]
> (let [c (count filters)
> ignore (Object.)]
> (map
> (fn [i]
> (remove #(= % ignore)
> (take-nth c
> (drop i
>
On Oct 21, 6:45 pm, John Harrop wrote:
> the reduction is wrapping the initial seq of empty vectors in ten
> thousand layers of map ... fn ... invoke ... map ... etc.
> Reducing a lazy sequence generator like map over a large sequence does not
> work well in Clojure.
I wonder if this could be i
I have an innocent-looking function that only uses map and reduce, but
when I run it on a big collection (10K elements) I get a StackOverflow
exception. Here is the function:
(defn multi-filter [filters coll]
(reduce
(fn [res e]
(map (fn [f r] (if (f e) (conj r e) r))
filters
On Oct 20, 5:52 am, Meikel Brandmeyer wrote:
> > (defn multi-filter [filters coll]
> > (reduce
> > (fn [res e]
> > (map (fn [f r] (if (f e) (conj r e) r))
> > filters
> > res))
> > (repeat (count filters) [])
> > coll))
>
> I think this basically equivalent to
nts possible to my emap definition?
(defn emap [f c1 c2]
(loop [s1 (seq c1) s2 (seq c2) res [] ]
(if (and s1 s2)
(recur (seq (rest s1)) (seq (rest s2)) (conj res (f (first s1)
(first s2
res)))
- Dmitry
On Oct 19, 12:13 pm, Meikel Brandmeyer wrote:
> Hi,
>
> Am 19.10
mitry
On Oct 18, 7:20 pm, Alex Osborne wrote:
> Dmitry Kakurin wrote:
> > I actually like your "tag them then group them" approach.
> > But what if the same record can have multiple tags?
> > E.g. :sales and :upgrades?
>
> Hmmm. the first way that occurred to m
The reduce-by approach (while cool) would not work for me because I
need to run multiple queries on the results.
- Dmitry
On Oct 18, 10:54 am, Alex Osborne wrote:
> Alex Osborne wrote:
> > If the three output lists themselves are too large, I'd just explicitly
> > sum your units with reduce:
>
ndmeyer wrote:
> Hi,
>
> Am 18.10.2009 um 09:48 schrieb Dmitry Kakurin:
>
>
>
>
>
> > Here is what I have right now:
> > (let [idata ... something ...
> > sales
> > (filter
> > #($ (% "Product T
I need to run 3 separate filters on the same collection.
Can I do this in a single pass thru collection (as opposed to 3
separate passes)?
Basically I don't want to bind the head of 'idata' collection because
it holds the whole thing in memory. Also collection itself is coming
from a file.
Here i
t; -David
>
> On Oct 13, 2:22 am, Dmitry Kakurin wrote:
>
>
>
> > What's wrong with my definition of sqrt?
>
> > user=> (defn sqrt [x] (. System.Math Sqrt x))
> > #'user/sqrt
> > user=> (sqrt 4)
> > System.InvalidCastExceptio
What's wrong with my definition of sqrt?
user=> (defn sqrt [x] (. System.Math Sqrt x))
#'user/sqrt
user=> (sqrt 4)
System.InvalidCastException: Specified cast is not valid.
at lambda_method(Closure , Object )
at AFunction_impl.invoke(Object )
at lambda_method(Closure )
at AFunction_im
lete test suite. (It does pass all the tests in
> > the test suite, but there is a lot of ground not covered.)
>
> > -David
>
> > On Oct 10, 2:29 am, Dmitry Kakurin wrote:
>
> > > I've read "Programming Clojure" book an I love the language (and the
&
I've watched some Clojure screen cast where Rich Hickey mentions that
initially Clojure was co-developed for both platforms simultaneously.
But then it became too hard and he has dropped .NET support.
Out of curiosity, why JVM has won the contest :-)?
- Dmitry
--~--~-~--~~--
I've read "Programming Clojure" book an I love the language (and the
book), kudos!
I'm evaluating ClojureCLR as a scripting language for my product.
Is there a list of ClojureCLR limitations and not implemented
features?
I've just started playing with it and (after some debugging)
discovered tha
29 matches
Mail list logo