Re: Patching core.match

2013-05-29 Thread David Pollak
David,

I figured out something of a hack... in MapPattern, I just put a guard
around all the wildcard patterns. ;-)

The patch and tests are uploaded to Jira.

I look forward to helping as I can on core.match

Thanks for your excellent work!

David



On Wed, May 29, 2013 at 12:57 PM, David Nolen wrote:

> It's actually nice to use pull requests as a form of review and I don't
> discourage that at all. But in order to facilitate the process it's easier
> if you attach the patch yourself to the ticket as we're not allowed to
> actually merge in pull requests. I know, I know, it's a bit of rigamarole
> but that's the steps outlined by Clojure.
>
> Thanks again,
> David
>
>
> On Wed, May 29, 2013 at 3:47 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>> I'm mailing my CLA to Rich right now.
>>
>> I'll do a pull request for the new tests and the changed code. Please
>> look at the pull request and fix/apply it when I've been added to the
>> Clojure contributors.
>>
>>
>>
>> On Wed, May 29, 2013 at 12:36 PM, David Nolen wrote:
>>
>>> Good catch - please file a ticket here
>>> http://dev.clojure.org/jira/browse/MATCH. Please attach any
>>> work-in-progress patch you may have there and I'll review.
>>>
>>> Before I can apply any work you've done you need to send in your
>>> Contributor Agreement (CA) - http://clojure.org/contributing
>>>
>>> Thanks,
>>> David
>>>
>>>
>>> On Wed, May 29, 2013 at 3:27 PM, David Pollak <
>>> feeder.of.the.be...@gmail.com> wrote:
>>>
 Howdy,

 I'm looking to patch core.match. There are a couple of cases where the
 pattern matcher eliminates rows (basically, if you're pattern matching
 against a Map, a row containing a map that has all wildcards will be
 considered a "wildcard" row and all the subsequent rows will be removed).
 Here's a couple of tests that fail:

 (deftest map-pattern-match-bind-2
   (is (= (let [xqq {:cz 1 :dz 2}]
(match [xqq]
  [{:z a :zz b}] [:a0 a b]
  [{:cz a :dz b}] [:a2 a b]
  :else []))
 [:a2 1 2])))

 (deftest map-pattern-match-bind-3
   (is (= (let [xmm {:bz 2}]
(match [xmm]
  [{:az a}] [:a0 a]
  [{:bz b}] [:a1 b]
  :else []))
 [:a1 2])))

 I've been reading through the core.match code to try to fix the code so
 that map matches are not treated as wildcards. As far as I can tell, if I
 add a magic null guard into specialize-map-pattern-row, then the row will
 not be treated as a wildcard... but my attempts to add a guard have been
 less than successful. Any help or pointers would be greatly appreciated.

 Thanks,

 David

 --
 Telegram, Simply Beautiful CMS https://telegr.am
 Lift, the simply functional web framework http://liftweb.net
 Follow me: http://twitter.com/dpp
 Blog: http://goodstuff.im

  --
 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google
 Groups "Clojure" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.



>>>
>>>  --
>>> --
>>> 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 group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Telegram, Simply Beautiful CMS https://telegr.am
>> Lift, the simply functional web framework http://liftweb.net
>> Follow me: http://twitter.com/dpp
>> Blog: http://goodstuff.im
>>
>>  --
>> --
>> 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 pa

Re: Patching core.match

2013-05-29 Thread David Pollak
David,

I'm the king of process in Lift-land and we have a ton of process that
makes people unhappy. I'm happy to follow the Clojure community process and
respect this community.

Rock on!

David


On Wed, May 29, 2013 at 12:57 PM, David Nolen wrote:

> It's actually nice to use pull requests as a form of review and I don't
> discourage that at all. But in order to facilitate the process it's easier
> if you attach the patch yourself to the ticket as we're not allowed to
> actually merge in pull requests. I know, I know, it's a bit of rigamarole
> but that's the steps outlined by Clojure.
>
> Thanks again,
> David
>
>
> On Wed, May 29, 2013 at 3:47 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>> I'm mailing my CLA to Rich right now.
>>
>> I'll do a pull request for the new tests and the changed code. Please
>> look at the pull request and fix/apply it when I've been added to the
>> Clojure contributors.
>>
>>
>>
>> On Wed, May 29, 2013 at 12:36 PM, David Nolen wrote:
>>
>>> Good catch - please file a ticket here
>>> http://dev.clojure.org/jira/browse/MATCH. Please attach any
>>> work-in-progress patch you may have there and I'll review.
>>>
>>> Before I can apply any work you've done you need to send in your
>>> Contributor Agreement (CA) - http://clojure.org/contributing
>>>
>>> Thanks,
>>> David
>>>
>>>
>>> On Wed, May 29, 2013 at 3:27 PM, David Pollak <
>>> feeder.of.the.be...@gmail.com> wrote:
>>>
 Howdy,

 I'm looking to patch core.match. There are a couple of cases where the
 pattern matcher eliminates rows (basically, if you're pattern matching
 against a Map, a row containing a map that has all wildcards will be
 considered a "wildcard" row and all the subsequent rows will be removed).
 Here's a couple of tests that fail:

 (deftest map-pattern-match-bind-2
   (is (= (let [xqq {:cz 1 :dz 2}]
(match [xqq]
  [{:z a :zz b}] [:a0 a b]
  [{:cz a :dz b}] [:a2 a b]
  :else []))
 [:a2 1 2])))

 (deftest map-pattern-match-bind-3
   (is (= (let [xmm {:bz 2}]
(match [xmm]
  [{:az a}] [:a0 a]
  [{:bz b}] [:a1 b]
  :else []))
 [:a1 2])))

 I've been reading through the core.match code to try to fix the code so
 that map matches are not treated as wildcards. As far as I can tell, if I
 add a magic null guard into specialize-map-pattern-row, then the row will
 not be treated as a wildcard... but my attempts to add a guard have been
 less than successful. Any help or pointers would be greatly appreciated.

 Thanks,

 David

 --
 Telegram, Simply Beautiful CMS https://telegr.am
 Lift, the simply functional web framework http://liftweb.net
 Follow me: http://twitter.com/dpp
 Blog: http://goodstuff.im

  --
 --
 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 group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google
 Groups "Clojure" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.



>>>
>>>  --
>>> --
>>> 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 group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>>
>> --
>> Telegram, Simply Beautiful CMS https://telegr.am
>> Lift, the simply functional web framework http://liftweb.net
>> Follow me: http://twitter.com/dpp
>> Blog: http://goodstuff.im
>>
>>  --
>> --
>> 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 t

Re: Patching core.match

2013-05-29 Thread David Nolen
It's actually nice to use pull requests as a form of review and I don't
discourage that at all. But in order to facilitate the process it's easier
if you attach the patch yourself to the ticket as we're not allowed to
actually merge in pull requests. I know, I know, it's a bit of rigamarole
but that's the steps outlined by Clojure.

Thanks again,
David


On Wed, May 29, 2013 at 3:47 PM, David Pollak  wrote:

> I'm mailing my CLA to Rich right now.
>
> I'll do a pull request for the new tests and the changed code. Please look
> at the pull request and fix/apply it when I've been added to the Clojure
> contributors.
>
>
>
> On Wed, May 29, 2013 at 12:36 PM, David Nolen wrote:
>
>> Good catch - please file a ticket here
>> http://dev.clojure.org/jira/browse/MATCH. Please attach any
>> work-in-progress patch you may have there and I'll review.
>>
>> Before I can apply any work you've done you need to send in your
>> Contributor Agreement (CA) - http://clojure.org/contributing
>>
>> Thanks,
>> David
>>
>>
>> On Wed, May 29, 2013 at 3:27 PM, David Pollak <
>> feeder.of.the.be...@gmail.com> wrote:
>>
>>> Howdy,
>>>
>>> I'm looking to patch core.match. There are a couple of cases where the
>>> pattern matcher eliminates rows (basically, if you're pattern matching
>>> against a Map, a row containing a map that has all wildcards will be
>>> considered a "wildcard" row and all the subsequent rows will be removed).
>>> Here's a couple of tests that fail:
>>>
>>> (deftest map-pattern-match-bind-2
>>>   (is (= (let [xqq {:cz 1 :dz 2}]
>>>(match [xqq]
>>>  [{:z a :zz b}] [:a0 a b]
>>>  [{:cz a :dz b}] [:a2 a b]
>>>  :else []))
>>> [:a2 1 2])))
>>>
>>> (deftest map-pattern-match-bind-3
>>>   (is (= (let [xmm {:bz 2}]
>>>(match [xmm]
>>>  [{:az a}] [:a0 a]
>>>  [{:bz b}] [:a1 b]
>>>  :else []))
>>> [:a1 2])))
>>>
>>> I've been reading through the core.match code to try to fix the code so
>>> that map matches are not treated as wildcards. As far as I can tell, if I
>>> add a magic null guard into specialize-map-pattern-row, then the row will
>>> not be treated as a wildcard... but my attempts to add a guard have been
>>> less than successful. Any help or pointers would be greatly appreciated.
>>>
>>> Thanks,
>>>
>>> David
>>>
>>> --
>>> Telegram, Simply Beautiful CMS https://telegr.am
>>> Lift, the simply functional web framework http://liftweb.net
>>> Follow me: http://twitter.com/dpp
>>> Blog: http://goodstuff.im
>>>
>>>  --
>>> --
>>> 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 group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> --
>> 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 group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Telegram, Simply Beautiful CMS https://telegr.am
> Lift, the simply functional web framework http://liftweb.net
> Follow me: http://twitter.com/dpp
> Blog: http://goodstuff.im
>
>  --
> --
> 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 group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com

Re: Patching core.match

2013-05-29 Thread David Pollak
I'm mailing my CLA to Rich right now.

I'll do a pull request for the new tests and the changed code. Please look
at the pull request and fix/apply it when I've been added to the Clojure
contributors.



On Wed, May 29, 2013 at 12:36 PM, David Nolen wrote:

> Good catch - please file a ticket here
> http://dev.clojure.org/jira/browse/MATCH. Please attach any
> work-in-progress patch you may have there and I'll review.
>
> Before I can apply any work you've done you need to send in your
> Contributor Agreement (CA) - http://clojure.org/contributing
>
> Thanks,
> David
>
>
> On Wed, May 29, 2013 at 3:27 PM, David Pollak <
> feeder.of.the.be...@gmail.com> wrote:
>
>> Howdy,
>>
>> I'm looking to patch core.match. There are a couple of cases where the
>> pattern matcher eliminates rows (basically, if you're pattern matching
>> against a Map, a row containing a map that has all wildcards will be
>> considered a "wildcard" row and all the subsequent rows will be removed).
>> Here's a couple of tests that fail:
>>
>> (deftest map-pattern-match-bind-2
>>   (is (= (let [xqq {:cz 1 :dz 2}]
>>(match [xqq]
>>  [{:z a :zz b}] [:a0 a b]
>>  [{:cz a :dz b}] [:a2 a b]
>>  :else []))
>> [:a2 1 2])))
>>
>> (deftest map-pattern-match-bind-3
>>   (is (= (let [xmm {:bz 2}]
>>(match [xmm]
>>  [{:az a}] [:a0 a]
>>  [{:bz b}] [:a1 b]
>>  :else []))
>> [:a1 2])))
>>
>> I've been reading through the core.match code to try to fix the code so
>> that map matches are not treated as wildcards. As far as I can tell, if I
>> add a magic null guard into specialize-map-pattern-row, then the row will
>> not be treated as a wildcard... but my attempts to add a guard have been
>> less than successful. Any help or pointers would be greatly appreciated.
>>
>> Thanks,
>>
>> David
>>
>> --
>> Telegram, Simply Beautiful CMS https://telegr.am
>> Lift, the simply functional web framework http://liftweb.net
>> Follow me: http://twitter.com/dpp
>> Blog: http://goodstuff.im
>>
>>  --
>> --
>> 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 group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> 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 group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im

-- 
-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Patching core.match

2013-05-29 Thread David Nolen
Good catch - please file a ticket here
http://dev.clojure.org/jira/browse/MATCH. Please attach any
work-in-progress patch you may have there and I'll review.

Before I can apply any work you've done you need to send in your
Contributor Agreement (CA) - http://clojure.org/contributing

Thanks,
David


On Wed, May 29, 2013 at 3:27 PM, David Pollak  wrote:

> Howdy,
>
> I'm looking to patch core.match. There are a couple of cases where the
> pattern matcher eliminates rows (basically, if you're pattern matching
> against a Map, a row containing a map that has all wildcards will be
> considered a "wildcard" row and all the subsequent rows will be removed).
> Here's a couple of tests that fail:
>
> (deftest map-pattern-match-bind-2
>   (is (= (let [xqq {:cz 1 :dz 2}]
>(match [xqq]
>  [{:z a :zz b}] [:a0 a b]
>  [{:cz a :dz b}] [:a2 a b]
>  :else []))
> [:a2 1 2])))
>
> (deftest map-pattern-match-bind-3
>   (is (= (let [xmm {:bz 2}]
>(match [xmm]
>  [{:az a}] [:a0 a]
>  [{:bz b}] [:a1 b]
>  :else []))
> [:a1 2])))
>
> I've been reading through the core.match code to try to fix the code so
> that map matches are not treated as wildcards. As far as I can tell, if I
> add a magic null guard into specialize-map-pattern-row, then the row will
> not be treated as a wildcard... but my attempts to add a guard have been
> less than successful. Any help or pointers would be greatly appreciated.
>
> Thanks,
>
> David
>
> --
> Telegram, Simply Beautiful CMS https://telegr.am
> Lift, the simply functional web framework http://liftweb.net
> Follow me: http://twitter.com/dpp
> Blog: http://goodstuff.im
>
>  --
> --
> 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 group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Patching core.match

2013-05-29 Thread David Pollak
Howdy,

I'm looking to patch core.match. There are a couple of cases where the
pattern matcher eliminates rows (basically, if you're pattern matching
against a Map, a row containing a map that has all wildcards will be
considered a "wildcard" row and all the subsequent rows will be removed).
Here's a couple of tests that fail:

(deftest map-pattern-match-bind-2
  (is (= (let [xqq {:cz 1 :dz 2}]
   (match [xqq]
 [{:z a :zz b}] [:a0 a b]
 [{:cz a :dz b}] [:a2 a b]
 :else []))
[:a2 1 2])))

(deftest map-pattern-match-bind-3
  (is (= (let [xmm {:bz 2}]
   (match [xmm]
 [{:az a}] [:a0 a]
 [{:bz b}] [:a1 b]
 :else []))
[:a1 2])))

I've been reading through the core.match code to try to fix the code so
that map matches are not treated as wildcards. As far as I can tell, if I
add a magic null guard into specialize-map-pattern-row, then the row will
not be treated as a wildcard... but my attempts to add a guard have been
less than successful. Any help or pointers would be greatly appreciated.

Thanks,

David

-- 
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im

-- 
-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.