Comments on: Slides from Hac Phi: “All About Monoids” http://comonad.com/reader/2009/hac-phi-slides/ types, (co)monads, substructural logic Sat, 29 Dec 2012 15:18:06 -0800 http://wordpress.org/?v=2.8.4 hourly 1 By: Edward Kmeft http://comonad.com/reader/2009/hac-phi-slides/comment-page-1/#comment-10826 Edward Kmeft Mon, 03 Aug 2009 11:33:04 +0000 http://comonad.com/reader/?p=85#comment-10826 @Stulli Look on hackage at any revision of monoids before 0.2.0, and it will contain Data.Monoid.Lexical.SourcePosition -- I recently slimmed the package down and plan to move the remaining functionality into a monoid-extras style package so that the core functionality is available without a laundry list of dependencies. Your kind error comes from the fact that when I added Pos, I added an argument to the type to make it a Pointed Functor. So you need to make Monoid (SourcePosition f) and Reducer Char (SourcePosition f). I explained the extra argument as part of the narrative during the talk, but naked slides do not provide me such opportunity for elaboration. :) @Stulli

Look on hackage at any revision of monoids before 0.2.0, and it will contain Data.Monoid.Lexical.SourcePosition — I recently slimmed the package down and plan to move the remaining functionality into a monoid-extras style package so that the core functionality is available without a laundry list of dependencies.

Your kind error comes from the fact that when I added Pos, I added an argument to the type to make it a Pointed Functor. So you need to make Monoid (SourcePosition f) and Reducer Char (SourcePosition f).

I explained the extra argument as part of the narrative during the talk, but naked slides do not provide me such opportunity for elaboration. :)

]]>
By: stulli http://comonad.com/reader/2009/hac-phi-slides/comment-page-1/#comment-10809 stulli Sun, 02 Aug 2009 14:01:35 +0000 http://comonad.com/reader/?p=85#comment-10809 Hi, do you have a working code example for the file position example? I get following error: `Reducer SourcePosition' is not applied to enough type arguments Expected kind `*', but `Reducer SourcePosition' has kind `* -> *' In the instance declaration for `Reducer SourcePosition' Hi, do you have a working code example for the file position example? I get following error:

`Reducer SourcePosition’ is not applied to enough type arguments
Expected kind `*’, but `Reducer SourcePosition’ has kind `* -> *’
In the instance declaration for `Reducer SourcePosition’

]]>
By: Edward Kmett http://comonad.com/reader/2009/hac-phi-slides/comment-page-1/#comment-10782 Edward Kmett Sat, 01 Aug 2009 03:49:31 +0000 http://comonad.com/reader/?p=85#comment-10782 @RayNBow: Yeah, I spotted it during the talk, but didn't fix the slides, woops! Re: the gravatar thing, hrmm. It is funny that they should be case insensitive given that at least the portion before the @ should technically be handled case sensitively per RFC 2821 (though requiring this is explicitly called out as not being nice in the RFC). The wordpress gravatar php function seems to be implemented along the guidelines of the other examples on gravatar which only trim whitespace and don't change case. (i.e. http://en.gravatar.com/site/implement/textpattern) So I'm thinking that the only way to portably get your gravatar to work on everyone's site is to explicitly lowercase it yourself since anyone else doing it could incorrectly mangle an email address. ;) I'd not be adverse to fixing it, since after all case sensitive email addresses don't seem to really exist in practice, but currently the fragment looks like < ?php gravatar("R", 40); ?> and calls off to some method in some library somewhere, which already knows the email address in question. If I ever learned php, I might know where to find it. :) [Edit: I did at least tweak your email address to be lowercase. ;) ] @RayNBow: Yeah, I spotted it during the talk, but didn’t fix the slides, woops!

Re: the gravatar thing, hrmm. It is funny that they should be case insensitive given that at least the portion before the @ should technically be handled case sensitively per RFC 2821 (though requiring this is explicitly called out as not being nice in the RFC).

The wordpress gravatar php function seems to be implemented along the guidelines of the other examples on gravatar which only trim whitespace and don’t change case. (i.e. http://en.gravatar.com/site/implement/textpattern)

So I’m thinking that the only way to portably get your gravatar to work on everyone’s site is to explicitly lowercase it yourself since anyone else doing it could incorrectly mangle an email address. ;)

I’d not be adverse to fixing it, since after all case sensitive email addresses don’t seem to really exist in practice, but currently the fragment looks like < ?php gravatar("R", 40); ?> and calls off to some method in some library somewhere, which already knows the email address in question. If I ever learned php, I might know where to find it. :)

[Edit: I did at least tweak your email address to be lowercase. ;) ]

]]>
By: RayNbow http://comonad.com/reader/2009/hac-phi-slides/comment-page-1/#comment-10777 RayNbow Fri, 31 Jul 2009 21:18:47 +0000 http://comonad.com/reader/?p=85#comment-10777 @EdwardK: np :). Btw, there's a small mistake in the definition of Endo's mempty in your slides. "id" should be wrapped within Endo. Also, Gravatars don't seem to work on this blog when using capital letters in the email address. @EdwardK:
np :). Btw, there’s a small mistake in the definition of Endo’s mempty in your slides. “id” should be wrapped within Endo.

Also, Gravatars don’t seem to work on this blog when using capital letters in the email address.

]]>
By: Edward Kmett http://comonad.com/reader/2009/hac-phi-slides/comment-page-1/#comment-10775 Edward Kmett Fri, 31 Jul 2009 20:13:25 +0000 http://comonad.com/reader/?p=85#comment-10775 @Raynbow: Thanks! @wwkeyboard: It should be around the week of the 17th. Ravi was waiting to see what Norman Ramsey's schedule was like before setting it in stone since we keep scheduling it when he can't show up! @Raynbow: Thanks!

@wwkeyboard: It should be around the week of the 17th. Ravi was waiting to see what Norman Ramsey’s schedule was like before setting it in stone since we keep scheduling it when he can’t show up!

]]>
By: wwkeyboard http://comonad.com/reader/2009/hac-phi-slides/comment-page-1/#comment-10773 wwkeyboard Fri, 31 Jul 2009 20:04:23 +0000 http://comonad.com/reader/?p=85#comment-10773 So when is this August meeting of the Boston Haskell Users Group? I want to attend but can't seem to find information about it. So when is this August meeting of the Boston Haskell Users Group? I want to attend but can’t seem to find information about it.

]]>
By: RayNbow http://comonad.com/reader/2009/hac-phi-slides/comment-page-1/#comment-10772 RayNbow Fri, 31 Jul 2009 19:43:51 +0000 http://comonad.com/reader/?p=85#comment-10772 PDF: http://www.mediafire.com/file/anifmxlzfgm/AllAboutMonoids.pdf PDF:

http://www.mediafire.com/file/anifmxlzfgm/AllAboutMonoids.pdf

]]>
By: Socrates philosophy and hyoptheses can't stop me from doing it monadically. http://comonad.com/reader/2009/hac-phi-slides/comment-page-1/#comment-10771 Socrates philosophy and hyoptheses can't stop me from doing it monadically. Fri, 31 Jul 2009 19:26:24 +0000 http://comonad.com/reader/?p=85#comment-10771 Can someone dump this to PDF? Or are the transitions too tasty to give up? Can someone dump this to PDF? Or are the transitions too tasty to give up?

]]>
By: Lee http://comonad.com/reader/2009/hac-phi-slides/comment-page-1/#comment-10769 Lee Fri, 31 Jul 2009 18:56:09 +0000 http://comonad.com/reader/?p=85#comment-10769 Brett: Looks like a Powerpoint 2007 file. If you have Powerpoint 2003, try http://www.microsoft.com/downloads/details.aspx?FamilyId=941b3470-3ae9-4aee-8f43-c6bb74cd1466&displaylang=en. Brett: Looks like a Powerpoint 2007 file.

If you have Powerpoint 2003, try http://www.microsoft.com/downloads/details.aspx?FamilyId=941b3470-3ae9-4aee-8f43-c6bb74cd1466&displaylang=en.

]]>
By: Brett http://comonad.com/reader/2009/hac-phi-slides/comment-page-1/#comment-10767 Brett Fri, 31 Jul 2009 18:21:14 +0000 http://comonad.com/reader/?p=85#comment-10767 How does one actually view the slides? The zip file seems to contain a large number of xml and .xml.rels files, but nothing to click on such as a pdf or even a powerpoint file. How does one actually view the slides? The zip file seems to contain a large number of xml and .xml.rels files, but nothing to click on such as a pdf or even a powerpoint file.

]]>