Re: Any updates on spec after “Maybe Not” presentation?

2022-05-25 Thread Dmitry Kakurin
ex > > 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 of “s

Any updates on spec after “Maybe Not” presentation?

2022-05-19 Thread Dmitry Kakurin
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

Re: [ANN] Instaparse 1.0.0

2013-04-14 Thread Dmitry Kakurin
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. --

Re: [ANN] Instaparse 1.0.0

2013-04-12 Thread Dmitry Kakurin
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: On Thu, Apr 11, 2013 at 7:41 PM, Dmitry Kakurin dmitry@gmail.comjavascript: wrote

Re: [ANN] Instaparse 1.0.0

2013-04-11 Thread Dmitry Kakurin
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 add-sub = mul-div | add | sub add = add-sub '+' mul-div sub = add-sub '-' mul-div ... And I realize now that the

Re: How Clojure protocols are implemented internally?

2011-05-08 Thread Dmitry Kakurin
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

How Clojure protocols are implemented internally?

2011-05-07 Thread Dmitry Kakurin
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 dispatch

Re: How Clojure protocols are implemented internally?

2011-05-07 Thread Dmitry Kakurin
://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 Kakurin dmitry.kaku...@gmail.comwrote: Is there a document describing internal implementation of Clojure

Re: ClojureDocs.org

2010-07-09 Thread Dmitry Kakurin
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

Recent builds have failed on http://build.clojure.org

2010-07-09 Thread Dmitry Kakurin
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

How do I extend an existing function to take different number of params?

2010-01-09 Thread Dmitry Kakurin
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 --

Re: Clojure analysis

2009-12-17 Thread Dmitry Kakurin
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 you

Re: Clojure analysis

2009-12-17 Thread Dmitry Kakurin
On Dec 17, 10:42 am, Santhosh G R kusim...@gmail.com 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

Re: Clojure analysis

2009-12-16 Thread Dmitry Kakurin
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 implementation

Re: Generalizing - -

2009-12-13 Thread Dmitry Kakurin
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 of

Re: Large lazy seq = StackOverflow?

2009-10-24 Thread Dmitry Kakurin
On Oct 21, 9:14 pm, John Harrop jharrop...@gmail.com 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    

Re: Large lazy seq = StackOverflow?

2009-10-21 Thread Dmitry Kakurin
On Oct 21, 6:45 pm, John Harrop jharrop...@gmail.com 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

Re: Best way to run multiple filters on the same [lazy] collection?

2009-10-20 Thread Dmitry Kakurin
, Alex Osborne a...@meshy.org 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 me is just make your tagging function return a set: (defn

Re: Best way to run multiple filters on the same [lazy] collection?

2009-10-20 Thread Dmitry Kakurin
) (first s2 res))) - Dmitry On Oct 19, 12:13 pm, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 19.10.2009 um 01:34 schrieb Dmitry Kakurin: This is in line with what I was thinking for my own custom filter function. Now how would you modify it if the same record can be both sales

Re: Best way to run multiple filters on the same [lazy] collection?

2009-10-20 Thread Dmitry Kakurin
On Oct 20, 5:52 am, Meikel Brandmeyer m...@kotka.de 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 the

Re: Best way to run multiple filters on the same [lazy] collection?

2009-10-19 Thread Dmitry Kakurin
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 a...@meshy.org wrote: Alex Osborne wrote: If the three output lists themselves are too large, I'd just explicitly sum your units with

Re: Best way to run multiple filters on the same [lazy] collection?

2009-10-19 Thread Dmitry Kakurin
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 Type Identifier) = 1                 % Vendor Identifier = 01010012            )            idata

Best way to run multiple filters on the same [lazy] collection?

2009-10-18 Thread Dmitry Kakurin
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

Re: Problem with .NET interop

2009-10-15 Thread Dmitry Kakurin
) -David On Oct 13, 2:22 am, Dmitry Kakurin dmitry.kaku...@gmail.com wrote: 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

Re: ClojureCLR limitations

2009-10-13 Thread Dmitry Kakurin
On Oct 10, 2:29 am, Dmitry Kakurin dmitry.kaku...@gmail.com wrote: 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

ClojureCLR limitations

2009-10-10 Thread Dmitry Kakurin
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 that

Why JVM (and not .NET) is the primary platform for Clojure?

2009-10-10 Thread Dmitry Kakurin
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