Add working UnapplyProduct #969

Merged
merged 1 commit into from Jul 13, 2015

Conversation

Projects
None yet
5 participants
@travisbrown
Contributor

travisbrown commented Jul 8, 2015

This uses a trick for approximating the effect of multiple parameter lists (a trick I learned from Miles, of course) to provide UnapplyProduct instances. This means that the following finally works:

import scalaz._, Scalaz._

(1, 'a).bitraverseU(_.set("saw int" :: Nil), _.set("saw sym" :: Nil))

I've added a compilation test on the model of the other Unapply types, but no tests for syntax.

@tpolecat

This comment has been minimized.

Show comment
Hide comment
@tpolecat

tpolecat Jul 13, 2015

Contributor

Related blog post. @S11001001 could you take a look?

Contributor

tpolecat commented Jul 13, 2015

Related blog post. @S11001001 could you take a look?

@travisbrown

This comment has been minimized.

Show comment
Hide comment
@travisbrown

travisbrown Jul 13, 2015

Contributor

I contributed this because I thought it was really neat, and because having it around would make explaining bitraverse a little easier in some cases.

@tonymorris clearly has some concerns about my attribution of part of the idea to Miles (or in Tony's own words, "I wil have to think, because right now, I'd just crucify the deceptive shit bag"). If someone can suggest a more accurate attribution I'm happy to change it!

Contributor

travisbrown commented Jul 13, 2015

I contributed this because I thought it was really neat, and because having it around would make explaining bitraverse a little easier in some cases.

@tonymorris clearly has some concerns about my attribution of part of the idea to Miles (or in Tony's own words, "I wil have to think, because right now, I'd just crucify the deceptive shit bag"). If someone can suggest a more accurate attribution I'm happy to change it!

@tonymorris

This comment has been minimized.

Show comment
Hide comment
@tonymorris

tonymorris Jul 13, 2015

Member

Fuck. Yes, you exist.

To clarify, by crucify, I mean metaphorically, with words. I would say true things, that I am otherwise sworn to secrecy on, and which @travisbrown is unlikely privy to (and so are many people not privy). Doing so would expose many things to many people and we'd have another ridiculous shit fight. It would also fuck over a lot people, yet again. I am largely uninterested in doing this. I recognise that this is not particularly a constructive discourse, even just talking about it, even though I did. I regret doing that. Ultimately, I do not want to pursue this matter.

False attribution is a long-time heritage of Scalaz. Nobody gives a flying fuck about it. My telescope was stolen on Saturday. I am not upset about anything else, besides that fact. Wrap your head around that fact, somehow, even if you don't give a shit about my telescope. I completely understand if you don't care about my telescope. I don't like thieves. I privately hope that all thieves stop being thieves. We might even agree on that some time.

I am pointing to a trap, which once again, has been set off. It is not a consequence of any deliberate misconduct (I do not know, nor do I care, if it is deliberate), but of ignorance (some, understandably) and gross incompetence, which has no constructive method of pursuit that I know of, and so I want to go back to not caring about.

I really want to go back to not giving a piss-fiddle about lots of things now. I'm sure we all do.

Please pursue this issue accordingly. It's just code for fuck's sake.

Member

tonymorris commented Jul 13, 2015

Fuck. Yes, you exist.

To clarify, by crucify, I mean metaphorically, with words. I would say true things, that I am otherwise sworn to secrecy on, and which @travisbrown is unlikely privy to (and so are many people not privy). Doing so would expose many things to many people and we'd have another ridiculous shit fight. It would also fuck over a lot people, yet again. I am largely uninterested in doing this. I recognise that this is not particularly a constructive discourse, even just talking about it, even though I did. I regret doing that. Ultimately, I do not want to pursue this matter.

False attribution is a long-time heritage of Scalaz. Nobody gives a flying fuck about it. My telescope was stolen on Saturday. I am not upset about anything else, besides that fact. Wrap your head around that fact, somehow, even if you don't give a shit about my telescope. I completely understand if you don't care about my telescope. I don't like thieves. I privately hope that all thieves stop being thieves. We might even agree on that some time.

I am pointing to a trap, which once again, has been set off. It is not a consequence of any deliberate misconduct (I do not know, nor do I care, if it is deliberate), but of ignorance (some, understandably) and gross incompetence, which has no constructive method of pursuit that I know of, and so I want to go back to not caring about.

I really want to go back to not giving a piss-fiddle about lots of things now. I'm sure we all do.

Please pursue this issue accordingly. It's just code for fuck's sake.

@jedws

This comment has been minimized.

Show comment
Hide comment
@jedws

jedws Jul 13, 2015

Contributor

@travisbrown this looks like a great bit of work.

The attribution in the code seems to me to be documentation of the technique more than anything else, and doesn't step into more potentially controversial waters of the provenance of original work, so I think it is fine as is.

thanks!

Contributor

jedws commented Jul 13, 2015

@travisbrown this looks like a great bit of work.

The attribution in the code seems to me to be documentation of the technique more than anything else, and doesn't step into more potentially controversial waters of the provenance of original work, so I think it is fine as is.

thanks!

@tonymorris

This comment has been minimized.

Show comment
Hide comment
@tonymorris

tonymorris Jul 13, 2015

Member

I agree it looks useful.

Member

tonymorris commented Jul 13, 2015

I agree it looks useful.

@S11001001

This comment has been minimized.

Show comment
Hide comment
@S11001001

S11001001 Jul 13, 2015

Member

👍 Neato.

Member

S11001001 commented Jul 13, 2015

👍 Neato.

@tpolecat

This comment has been minimized.

Show comment
Hide comment
@tpolecat

tpolecat Jul 13, 2015

Contributor

@travisbrown sorry about the fuck-words and so on. No idea what that was about. Thanks very much for this.

Contributor

tpolecat commented Jul 13, 2015

@travisbrown sorry about the fuck-words and so on. No idea what that was about. Thanks very much for this.

tpolecat added a commit that referenced this pull request Jul 13, 2015

@tpolecat tpolecat merged commit 5392660 into scalaz:series/7.2.x Jul 13, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@tonymorris

This comment has been minimized.

Show comment
Hide comment
@tonymorris

tonymorris Jul 14, 2015

Member

@travisbrown

I'm sorry you took my remarks as targeted at you. I have been in an intemperate mood due to dealing with a theft, and although I understand how my remarks were interpreted, they were not targeted at you. Your PR is good, and I hope that what I was talking about, which did not concern you, but other issues with other people, does not stand in the way of further contributions.

Member

tonymorris commented Jul 14, 2015

@travisbrown

I'm sorry you took my remarks as targeted at you. I have been in an intemperate mood due to dealing with a theft, and although I understand how my remarks were interpreted, they were not targeted at you. Your PR is good, and I hope that what I was talking about, which did not concern you, but other issues with other people, does not stand in the way of further contributions.

@travisbrown

This comment has been minimized.

Show comment
Hide comment
@travisbrown

travisbrown Jul 14, 2015

Contributor

@tonymorris Thank you, Tony. I appreciate the apology, although I'm sure we'd disagree pretty strongly about whether remarks of that kind are ever usefully or appropriately targeted at anyone in the context of an open source project.

I hope you're able to recover the stolen property.

Contributor

travisbrown commented Jul 14, 2015

@tonymorris Thank you, Tony. I appreciate the apology, although I'm sure we'd disagree pretty strongly about whether remarks of that kind are ever usefully or appropriately targeted at anyone in the context of an open source project.

I hope you're able to recover the stolen property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment