OT: Monad co-tutorial: the Compilation Monad

This is a little off-topic, since it isn't specifically about Haskell, but since Haskell is the home of the monad tutorial it isn't completely irrelevant. The monad tutorial genre is well-known; it's often written somebody who has just learned the concept trying to explain it, often in highly imaginative terms (e.g. "a monad is just like a giant squid, with special tentacles"). I propose "monad co-tutorial" for attempts, often by an amateur (e.g. me) to work out how a monad appears in an unexpected place. In particular, I recently suffered through a few days of learning to deal with Ant and Maven2, which got me thinking about build systems in general, which got me thinking about the (meta-)language used in such systems, which got me thinking about What It's Really All About. Lo and behold - a monad! I think, anyway. The basic idea is that program texts (source or object code) are to programs as sentences are to propositions. Compilation transforms one representation into another. This can be viewed in terms of the unit natural transformation of a monad of transformations over program representations. The multiplication component captures the fact that program text transformations can be chained, as in macro expansion, phased optimization, etc. I'm not sure if this works, but it fits my somewhat limited idea of monads, so I wrote an article http://blog.mobileink.com/ about it and I'd appreciate any corrections. I expect if it does work somebody has already done something like it, so I would appreciate any pointers to more info. My real goal is to think about better language for software build systems, since what we have now is pretty weak, in my view. One thing that follows from thinking in terms of monads is that we can discard the notion of dependency of object code of source code in favor of a notion of equivalence (i.e. unit transform). My hunch is that thinking along such lines might lead to an improved metalanguage for build DSLs. Thanks, Gregg

On 17 December 2010 00:59, Gregg Reynolds
My real goal is to think about better language for software build systems, since what we have now is pretty weak, in my view.
I can't speak for your monad based approach, but you may be interested in Neil Mitchell's Haskell DSL for build systems, called Shake: http://community.haskell.org/~ndm/downloads/slides-shake_a_better_make-01_oc... I have an open source implementation of it which has all the core functionality at http://github.com/batterseapower/openshake. (Warning: the code is quite ugly at the moment) Cheers, Max

There is also Nix (http://nixos.org/) which is based on somewhat related ideas.
On Fri, Dec 17, 2010 at 8:32 AM, Max Bolingbroke
On 17 December 2010 00:59, Gregg Reynolds
wrote: My real goal is to think about better language for software build systems, since what we have now is pretty weak, in my view.
I can't speak for your monad based approach, but you may be interested in Neil Mitchell's Haskell DSL for build systems, called Shake: http://community.haskell.org/~ndm/downloads/slides-shake_a_better_make-01_oc...
I have an open source implementation of it which has all the core functionality at http://github.com/batterseapower/openshake. (Warning: the code is quite ugly at the moment)
Cheers, Max
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 12/17/10 01:32, Max Bolingbroke wrote: [snip]
I can't speak for your monad based approach, but you may be interested in Neil Mitchell's Haskell DSL for build systems, called Shake: http://community.haskell.org/~ndm/downloads/slides-shake_a_better_make-01_oc...
WARNING: I clicked on that link in my thunderbird news reader and got a page which was something about registering domains. It was nothing about Neil's slides. I then tried directing my Firfox browser to: http://community.haskell.org/ but got the same web page. Am I doing something wrong or has somehow community.haskell.org been hijacked somehow? -Larry

On Friday 17 December 2010 13:45:38, Larry Evans wrote:
WARNING: I clicked on that link in my thunderbird news reader and got a page which was something about registering domains. It was nothing about Neil's slides.
I then tried directing my Firfox browser to:
but got the same web page.
Am I doing something wrong or has somehow community.haskell.org been hijacked somehow?
-Larry
It seems the haskell.org domain hasn't been renewed on time.

On 12/17/10 07:07, Daniel Fischer wrote:
On Friday 17 December 2010 13:45:38, Larry Evans wrote:
WARNING: I clicked on that link in my thunderbird news reader and got a page which was something about registering domains. It was nothing about Neil's slides.
I then tried directing my Firfox browser to:
but got the same web page.
Am I doing something wrong or has somehow community.haskell.org been hijacked somehow?
-Larry
It seems the haskell.org domain hasn't been renewed on time.
Yes, it works for me now. Thanks for all the replies explaining the reason. BTW, I found the video for the talk here: http://vimeo.com/15465133 -regards, Larry

The haskell.org domain expired. It's being worked on.
On 17 December 2010 12:45, Larry Evans
On 12/17/10 01:32, Max Bolingbroke wrote: [snip]
I can't speak for your monad based approach, but you may be interested in Neil Mitchell's Haskell DSL for build systems, called Shake: http://community.haskell.org/~ndm/downloads/slides-shake_a_better_make-01_oc...
WARNING: I clicked on that link in my thunderbird news reader and got a page which was something about registering domains. It was nothing about Neil's slides.
I then tried directing my Firfox browser to:
but got the same web page.
Am I doing something wrong or has somehow community.haskell.org been hijacked somehow?
-Larry
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Push the envelope. Watch it bend.

On 17/12/2010 12:59 AM, Gregg Reynolds wrote:
This is a little off-topic, since it isn't specifically about Haskell, but since Haskell is the home of the monad tutorial it isn't completely irrelevant. The monad tutorial genre is well-known; it's often written somebody who has just learned the concept trying to explain it, often in highly imaginative terms (e.g. "a monad is just like a giant squid, with special tentacles"). I propose "monad co-tutorial" for attempts, often by an amateur (e.g. me) to work out how a monad appears in an unexpected place.
I've been off work all week due to illness, and I feel rotten. But this paragraph gave me a much-needed giggle. Thanks for that! Never mind monoids in the category of endofunctors. The only endofunctor I'm looking for is the one from the category is miserable, virus-ridden humans to the category of people who feel half human. >_<
participants (8)
-
Andrew Coppin
-
Arnaud Bailly
-
Daniel Fischer
-
Gregg Reynolds
-
Larry Evans
-
Max Bolingbroke
-
Neil Mitchell
-
Thomas Schilling