Haskell Weekly News: Issue 85 - September 13, 2008

--------------------------------------------------------------------------- Haskell Weekly News http://sequence.complete.org/hwn/20080913 Issue 85 - September 13, 2008 --------------------------------------------------------------------------- Welcome to issue 85 of HWN, a newsletter covering developments in the [1]Haskell community. Announcements citeproc-hs. Andrea Rossato [2]announced the first release of [3]citeproc-hs, a Haskell implementation of the [4]Citation Style Language. citeproc-hs adds a Bibtex-like citation and bibliographic formatting and generation facility to [5]Pandoc. Twidge. John Goerzen [6]announced the release of [7]Twidge, a command-line Twitter and Identi.ca client. Real World HAppS: Cabalized, Self-Demoing HAppS Tutorial (Version 3). Thomas Hartman [8]announced a new version of [9]happs-tutorial, with a correspondingly updated [10]online demo. generic list functions fixed. Jim Apple reported that genericTake, genericDrop, and genericSplitAt have [11]been fixed so they are now total functions (they used to fail on negative integer inputs, unlike their ungeneric counterparts). The Monad.Reader (13) - Call for copy. Wouter Swierstra [12]announced a call for copy for Issue 13 of the [13]Monad.Reader. The deadline for submitting articles is February 13, 2009. Heads Up: code.haskell.org is upgrading to darcs 2. Duncan Coutts [14]announced that /usr/bin/darcs on code.haskell.org will soon be upgraded to version 2. Most users should be unaffected as darcs 2 works just fine with repositories in darcs 1 format, and has been extensively tested for correctness. Discussion packages and QuickCheck. Conal Elliott [15]asked what methods of organization people use to package up QuickCheck tests for their libraries. Hackage needs a theme song!. Jason Dagit wrote a [16]theme song for Hackage! Jobs Gamr7. Lionel Barret De Nazaris [17]announced that [18]Gamr7, a startup in France focused on procedural city generation for the game and simulation market, is looking for a senior developer/technical director. senior role at Credit Suisse. Ganesh Sittampalam [19]announced that [20]Credit Suisse is seeking to recruit an expert in functional programming for a senior role in the Global Modelling and Analytics Group (GMAG) in the Securities Division. Blog noise [21]Haskell news from the [22]blogosphere. * Douglas M. Auclair (geophf): [23]What is declarative programming?. * John Goerzen (CosmicRay): [24]New Twitter Client: Twidge. * Mark Jason Dominus: [25]Return return. Mark's mind is blown by the code "return return" appearing in a paper by Mark Jones. * Eric Kow (kowey): [26]darcs weekly news #3. * Ketil Malde: [27]The FastQ file format for sequences. * >>> Nathan Sanders: [28]Real World Haskell. Nathan experiments with porting some of his Python code to Haskell. * Andrea Vezzosi (Saizan): [29]Results from GSoC. Andrea's GSoC work on a high-level dependency framework for Cabal is going to be released in a separate package for now, [30]hbuild. * >>> Ricky Clarkson: [31]An IRC Bot in Haskell, 20% code, 80% GRR. Ricky shares his experiences, frustrations, and eventual success writing a simple IRC bot in Haskell. * >>> Yaakov Nemoy: [32]Xmonad 0.8 released. * Luke Palmer: [33]The problem with Coq. ...is, according to Luke, that it doesn't have a nice graphical interface. * >>> James Cowie: [34]Haskell! yes no?. James dives into learning some Haskell. Verdict so far: a "very nice language". Quotes of the Week * EvilTerran: this is hard to express in this type system. i'm going to make my own type system instead! About the Haskell Weekly News New editions are posted to [35]the Haskell mailing list as well as to [36]the Haskell Sequence and [37]Planet Haskell. [38]RSS is also available, and headlines appear on [39]haskell.org. To help create new editions of this newsletter, please see the information on [40]how to contribute. Send stories to byorgey at cis dot upenn dot edu. The darcs repository is available at darcs get [41]http://code.haskell.org/~byorgey/code/hwn/ . References 1. http://haskell.org/ 2. http://article.gmane.org/gmane.comp.lang.haskell.cafe/44471 3. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/citeproc%2Dhs 4. http://xbiblio.sourceforge.net/csl/ 5. http://johnmacfarlane.net/pandoc/ 6. http://article.gmane.org/gmane.comp.lang.haskell.cafe/44453 7. http://software.complete.org/twidge 8. http://article.gmane.org/gmane.comp.lang.haskell.cafe/44410 9. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/happs-tutorial 10. http://happstutorial.com:5001/ 11. http://hackage.haskell.org/trac/ghc/ticket/2533 12. http://article.gmane.org/gmane.comp.lang.haskell.general/16420 13. http://www.haskell.org/haskellwiki/The_Monad.Reader 14. http://article.gmane.org/gmane.comp.lang.haskell.general/16419 15. http://thread.gmane.org/gmane.comp.lang.haskell.cafe/44259 16. http://thread.gmane.org/gmane.comp.lang.haskell.cafe/44450 17. http://article.gmane.org/gmane.comp.lang.haskell.cafe/44211 18. http://www.gamr7.com/ 19. http://article.gmane.org/gmane.comp.lang.haskell.general/16422 20. http://www.credit-suisse.com/ 21. http://planet.haskell.org/ 22. http://haskell.org/haskellwiki/Blog_articles 23. http://logicaltypes.blogspot.com/2008/09/what-is-declarative-programming.htm... 24. http://changelog.complete.org/posts/752-New-Twitter-Client-Twidge.html 25. http://blog.plover.com/prog/springschool95.html 26. http://koweycode.blogspot.com/2008/09/darcs-weekly-news-3.html 27. http://blog.malde.org/index.php/2008/09/09/the-fastq-file-format-for-sequenc... 28. http://sandersn.com/blog/index.php?title=real_world_haskell 29. http://vezzosi.blogspot.com/2008/09/even-if-this-blog-has-been-silent-since.... 30. http://hackage.haskell.org/trac/hackage/wiki/HBuild 31. http://rickyclarkson.blogspot.com/2008/09/irc-bot-in-haskell-20-code-80-grr.... 32. http://loupgaroublond.blogspot.com/2008/09/xmonad-08-released.html 33. http://luqui.org/blog/archives/2008/09/07/the-problem-with-coq/ 34. http://www.jcowie.co.uk/2008/09/haskell-yes-no/ 35. http://www.haskell.org/mailman/listinfo/haskell 36. http://sequence.complete.org/ 37. http://planet.haskell.org/ 38. http://sequence.complete.org/node/feed 39. http://haskell.org/ 40. http://haskell.org/haskellwiki/HWN 41. http://code.haskell.org/~byorgey/code/hwn/

I have a newbie question.... Does theorem proofs have a use for an
application? Take for example the IRC bot example (
http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot) listed below. Is
there any insight to be gained by theorem proofs (as in COQ) into the app?
Thanks,
Daryoush
On Sat, Sep 13, 2008 at 4:07 PM, Brent Yorgey
--------------------------------------------------------------------------- Haskell Weekly News http://sequence.complete.org/hwn/20080913 Issue 85 - September 13, 2008 ---------------------------------------------------------------------------
Welcome to issue 85 of HWN, a newsletter covering developments in the [1]Haskell community.
Announcements
citeproc-hs. Andrea Rossato [2]announced the first release of [3]citeproc-hs, a Haskell implementation of the [4]Citation Style Language. citeproc-hs adds a Bibtex-like citation and bibliographic formatting and generation facility to [5]Pandoc.
Twidge. John Goerzen [6]announced the release of [7]Twidge, a command-line Twitter and Identi.ca client.
Real World HAppS: Cabalized, Self-Demoing HAppS Tutorial (Version 3). Thomas Hartman [8]announced a new version of [9]happs-tutorial, with a correspondingly updated [10]online demo.
generic list functions fixed. Jim Apple reported that genericTake, genericDrop, and genericSplitAt have [11]been fixed so they are now total functions (they used to fail on negative integer inputs, unlike their ungeneric counterparts).
The Monad.Reader (13) - Call for copy. Wouter Swierstra [12]announced a call for copy for Issue 13 of the [13]Monad.Reader. The deadline for submitting articles is February 13, 2009.
Heads Up: code.haskell.org is upgrading to darcs 2. Duncan Coutts [14]announced that /usr/bin/darcs on code.haskell.org will soon be upgraded to version 2. Most users should be unaffected as darcs 2 works just fine with repositories in darcs 1 format, and has been extensively tested for correctness.
Discussion
packages and QuickCheck. Conal Elliott [15]asked what methods of organization people use to package up QuickCheck tests for their libraries.
Hackage needs a theme song!. Jason Dagit wrote a [16]theme song for Hackage!
Jobs
Gamr7. Lionel Barret De Nazaris [17]announced that [18]Gamr7, a startup in France focused on procedural city generation for the game and simulation market, is looking for a senior developer/technical director.
senior role at Credit Suisse. Ganesh Sittampalam [19]announced that [20]Credit Suisse is seeking to recruit an expert in functional programming for a senior role in the Global Modelling and Analytics Group (GMAG) in the Securities Division.
Blog noise
[21]Haskell news from the [22]blogosphere. * Douglas M. Auclair (geophf): [23]What is declarative programming?. * John Goerzen (CosmicRay): [24]New Twitter Client: Twidge. * Mark Jason Dominus: [25]Return return. Mark's mind is blown by the code "return return" appearing in a paper by Mark Jones. * Eric Kow (kowey): [26]darcs weekly news #3. * Ketil Malde: [27]The FastQ file format for sequences. * >>> Nathan Sanders: [28]Real World Haskell. Nathan experiments with porting some of his Python code to Haskell. * Andrea Vezzosi (Saizan): [29]Results from GSoC. Andrea's GSoC work on a high-level dependency framework for Cabal is going to be released in a separate package for now, [30]hbuild. * >>> Ricky Clarkson: [31]An IRC Bot in Haskell, 20% code, 80% GRR. Ricky shares his experiences, frustrations, and eventual success writing a simple IRC bot in Haskell. * >>> Yaakov Nemoy: [32]Xmonad 0.8 released. * Luke Palmer: [33]The problem with Coq. ...is, according to Luke, that it doesn't have a nice graphical interface. * >>> James Cowie: [34]Haskell! yes no?. James dives into learning some Haskell. Verdict so far: a "very nice language".
Quotes of the Week
* EvilTerran: this is hard to express in this type system. i'm going to make my own type system instead!
About the Haskell Weekly News
New editions are posted to [35]the Haskell mailing list as well as to [36]the Haskell Sequence and [37]Planet Haskell. [38]RSS is also available, and headlines appear on [39]haskell.org.
To help create new editions of this newsletter, please see the information on [40]how to contribute. Send stories to byorgey at cis dot upenn dot edu. The darcs repository is available at darcs get [41]http://code.haskell.org/~byorgey/code/hwn/http://code.haskell.org/%7Ebyorgey/code/hwn/.
References
1. http://haskell.org/ 2. http://article.gmane.org/gmane.comp.lang.haskell.cafe/44471 3. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/citeproc%2Dhs 4. http://xbiblio.sourceforge.net/csl/ 5. http://johnmacfarlane.net/pandoc/ 6. http://article.gmane.org/gmane.comp.lang.haskell.cafe/44453 7. http://software.complete.org/twidge 8. http://article.gmane.org/gmane.comp.lang.haskell.cafe/44410 9. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/happs-tutorial 10. http://happstutorial.com:5001/ 11. http://hackage.haskell.org/trac/ghc/ticket/2533 12. http://article.gmane.org/gmane.comp.lang.haskell.general/16420 13. http://www.haskell.org/haskellwiki/The_Monad.Reader 14. http://article.gmane.org/gmane.comp.lang.haskell.general/16419 15. http://thread.gmane.org/gmane.comp.lang.haskell.cafe/44259 16. http://thread.gmane.org/gmane.comp.lang.haskell.cafe/44450 17. http://article.gmane.org/gmane.comp.lang.haskell.cafe/44211 18. http://www.gamr7.com/ 19. http://article.gmane.org/gmane.comp.lang.haskell.general/16422 20. http://www.credit-suisse.com/ 21. http://planet.haskell.org/ 22. http://haskell.org/haskellwiki/Blog_articles 23. http://logicaltypes.blogspot.com/2008/09/what-is-declarative-programming.htm... 24. http://changelog.complete.org/posts/752-New-Twitter-Client-Twidge.html 25. http://blog.plover.com/prog/springschool95.html 26. http://koweycode.blogspot.com/2008/09/darcs-weekly-news-3.html 27. http://blog.malde.org/index.php/2008/09/09/the-fastq-file-format-for-sequenc... 28. http://sandersn.com/blog/index.php?title=real_world_haskell 29. http://vezzosi.blogspot.com/2008/09/even-if-this-blog-has-been-silent-since.... 30. http://hackage.haskell.org/trac/hackage/wiki/HBuild 31. http://rickyclarkson.blogspot.com/2008/09/irc-bot-in-haskell-20-code-80-grr.... 32. http://loupgaroublond.blogspot.com/2008/09/xmonad-08-released.html 33. http://luqui.org/blog/archives/2008/09/07/the-problem-with-coq/ 34. http://www.jcowie.co.uk/2008/09/haskell-yes-no/ 35. http://www.haskell.org/mailman/listinfo/haskell 36. http://sequence.complete.org/ 37. http://planet.haskell.org/ 38. http://sequence.complete.org/node/feed 39. http://haskell.org/ 40. http://haskell.org/haskellwiki/HWN 41. http://code.haskell.org/~byorgey/code/hwn/http://code.haskell.org/%7Ebyorgey/code/hwn/ _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

dmehrtash:
I have a newbie question.... Does theorem proofs have a use for an application? Take for example the IRC bot example ([1]http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot) listed below. Is there any insight to be gained by theorem proofs (as in COQ) into the app?
Some customers require very high level of assurance that there are no bugs in the code you ship to them. Theorem proving is one great way to make those assurances. -- Don P.S. <publicity> In fact, it's the subject of a talk on Tuesday, http://www.galois.com/blog/2008/09/11/theorem-proving-for-verification/ </publicity>

What I am trying to figure out is that say on the code for the IRC bot that
is show here
http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot/Source
What would theorem proofs do for me?
Daryoush
On Sat, Sep 13, 2008 at 9:29 PM, Don Stewart
dmehrtash:
I have a newbie question.... Does theorem proofs have a use for an application? Take for example the IRC bot example ([1]http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot) listed below. Is there any insight to be gained by theorem proofs (as in COQ) into the app?
Some customers require very high level of assurance that there are no bugs in the code you ship to them. Theorem proving is one great way to make those assurances.
-- Don
P.S.
<publicity>
In fact, it's the subject of a talk on Tuesday,
http://www.galois.com/blog/2008/09/11/theorem-proving-for-verification/
</publicity>

On 2008 Sep 14, at 1:24, Daryoush Mehrtash wrote:
What I am trying to figure out is that say on the code for the IRC bot that is show here
http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot/Source
What would theorem proofs do for me?
Assurance of correct operation; for example, a mathematically provable lack of security holes, assuming you can describe its proper operation in terms of suitable theorems (which, for a simple bot like that, is not so difficult). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

What would theorem proofs do for me? Imagine if you used SmallCheck to exhastively test the ENTIRE problem space for a given property. Now imagine you used your brain to show the
programs correctness before the heat death of the universe... Proofs are not features, nor are they code. What you prove is entirely up to you and might not be what you think. Take, for example, the issue of proving a sort function works correctly [1]. I'm not saying this to discourage complete proofs, but just cautioning you that proving something as unimportant and IO laden as an IRC bot probably isn't the best example. Do see the linked PDF, and [2] as well. Oh, and for examples where people should have used FM, search for 'ariane 1996' or the gulf war patriot missle failure TomMD [1] http://www.cl.cam.ac.uk/~mjcg/Teaching/SpecVer1/Lectures/pslides07x4.pdf [2] http://users.lava.net/~newsham/formal/reverse/

On Sun, Sep 14, 2008 at 5:56 AM, Thomas M. DuBuisson
What would theorem proofs do for me? Imagine if you used SmallCheck to exhastively test the ENTIRE problem space for a given property. Now imagine you used your brain to show the programs correctness before the heat death of the universe...
Proofs are not features, nor are they code. What you prove is entirely up to you and might not be what you think. Take, for example, the issue of proving a sort function works correctly [1].
I'm not saying this to discourage complete proofs, but just cautioning you that proving something as unimportant and IO laden as an IRC bot probably isn't the best example. Do see the linked PDF, and [2] as well.
Oh, and for examples where people should have used FM, search for 'ariane 1996' or the gulf war patriot missle failure
TomMD
[1] http://www.cl.cam.ac.uk/~mjcg/Teaching/SpecVer1/Lectures/pslides07x4.pdf [2] http://users.lava.net/~newsham/formal/reverse/
One thing have always bugged me: how do you prove that you have correctly proven something? I mean, when I write a code I'm formaly stating what I want to happen and bugs happen. If I try to prove some part of the code I write more formal text (which generally isn't even checked by a compiler); how can I be sure that my proof doesn't contain bugs? Why would it make my program less error-prone? Is there any article that tries to compare heavy testing with FM?

2008/9/14 Rafael Almeida
One thing have always bugged me: how do you prove that you have correctly proven something? I mean, when I write a code I'm formaly stating what I want to happen and bugs happen. If I try to prove some part of the code I write more formal text (which generally isn't even checked by a compiler); how can I be sure that my proof doesn't contain bugs? Why would it make my program less error-prone? Is there any article that tries to compare heavy testing with FM?
Well, that's where formal prover enter the picture : when you prove something with Coq, you can be reasonably sure that your proof is correct. And FM brings absolute certitude a propriety is verified by your program whereas testing however heavy can only check this property on a finite set of inputs (using randomly generated input help alleviate the risk of blind spot but is still limited). -- Jedaï

On Sunday 14 September 2008 6:59:06 am Rafael Almeida wrote:
One thing have always bugged me: how do you prove that you have correctly proven something? I mean, when I write a code I'm formaly stating what I want to happen and bugs happen. If I try to prove some part of the code I write more formal text (which generally isn't even checked by a compiler); how can I be sure that my proof doesn't contain bugs? Why would it make my program less error-prone? Is there any article that tries to compare heavy testing with FM?
This isn't really a problem if you're programming in a language in which the proofs of program correctness are checked by the compiler/what have you, as Chaddaï has already said. In that case, it's similar to asking, "how do I know my Haskell programs are actually type correct?" Barring bugs in the tools (which, in the ideal case, are built on a simple enough foundation to be confidently proven correct by hand), it's not so much a concern. A more difficult question is: how do I know that the formal specification I've written for my program is the right one? Tools can fairly easily check that your programs conform to a given specification, but they cannot (to my knowledge) check that your specification says exactly what you want it to say. Of course, this is no worse than the case with test suites, since one can similarly ask, "how can I be sure the tests check for the properties/behavior that I actually want?" -- Dan

A more difficult question is: how do I know that the formal specification I've written for my program is the right one? Tools can fairly easily check that your programs conform to a given specification, but they cannot (to my knowledge) check that your specification says exactly what you want it to say.
The key is *redundancy*: as long as your property is sufficiently different (in structure, in authorship, etc...) you can hope that if the spec has a bug, the code will not have a corresponding bug and vice versa. It's only a hope, tho. Stefan

On Mon, 15 Sep 2008 10:32:44 -0400
Stefan Monnier
A more difficult question is: how do I know that the formal specification I've written for my program is the right one? Tools can fairly easily check that your programs conform to a given specification, but they cannot (to my knowledge) check that your specification says exactly what you want it to say.
The key is *redundancy*: as long as your property is sufficiently different (in structure, in authorship, etc...) you can hope that if the spec has a bug, the code will not have a corresponding bug and vice versa. It's only a hope, tho.
There are other meta-level properties one might desire in a specification, too, such as: * Simplicity - if a specification is too long-winded, you might not spot a bug in it because it's too hard to read. * Definite description - if a specification is a definite description, it is satisfied by one and only one value (up to functional equivalence). For example, if I say that a list sorting function must preserve the length of its input, that's not a definite description, because it is satisfied by the identity function, as well as a correct sorting function. However, if I say (in a suitably formal way) that a sorting function must output a list where every element in the input occurs the same number of times in the output as it occurs in the input, and vice-versa, and the output is ordered according to the specified order - then that *is* a definite description, because any two functions that follow that specification must be equivalent. * Reusable (and perhaps reused!) - As in ordinary programming, reuse of specifications can help avoid errors. -- Robin

On Sat, 13 Sep 2008 21:06:21 -0700, "Daryoush Mehrtash"
I have a newbie question.... Does theorem proofs have a use for an application? Take for example the IRC bot example ( http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot) listed below. Is there any insight to be gained by theorem proofs (as in COQ) into the app?
Yes. Basically, if you can prove that the program is correct, then you don't need to test it. While proofs can become very tedious for huge programs with many different kinds of control flow involving very complicated logic, if the program size can be shortened to a reasonable size, then proofs can help shorten development time. This was actually part of the motivation for developing Haskell as a pure functional programming language (i.e., one that prohibits side effects -- see http://www.haskell.org/haskellwiki/Functional_programming). It is generally easier to write proofs for pure functional programming languages than for impure ones. Theorem provers help to automate the process of writing proofs for programs. Djinn (see http://lambda-the-ultimate.org/node/1178) is an example of a theorem prover for Haskell. Given a (Haskell function), it returns a function of that type if one exists. Here is a sample Djinn session (courtesy of http://lambda-the-ultimate.org/node/1178):
calvin% djinn Welcome to Djinn version 2005-12-11. Type :h to get help. # Djinn is interactive if not given any arguments. # Let's see if it can find the identity function. Djinn> f ? a->a f :: a -> a f x1 = x1 # Yes, that was easy. Let's try some tuple munging. Djinn> sel ? ((a,b),(c,d)) -> (b,c) sel :: ((a, b), (c, d)) -> (b, c) sel ((_, v5), (v6, _)) = (v5, v6)
# We can ask for the impossible, but then we get what we # deserve. Djinn> cast ? a->b -- cast cannot be realized.
# OK, let's be bold and try some functions that are tricky to write: # return, bind, and callCC in the continuation monad Djinn> type C a = (a -> r) -> r Djinn> returnC ? a -> C a returnC :: a -> C a returnC x1 x2 = x2 x1
Djinn> bindC ? C a -> (a -> C b) -> C b bindC :: C a -> (a -> C b) -> C b bindC x1 x2 x3 = x1 (\ c15 -> x2 c15 (\ c17 -> x3 c17))
Djinn> callCC ? ((a -> C b) -> C a) -> C a callCC :: ((a -> C b) -> C a) -> C a callCC x1 x2 = x1 (\ c15 _ -> x2 c15) (\ c11 -> x2 c11) # Well, poor Djinn has a sweaty brow after deducing the code # for callCC so we had better quit. Djinn> :q Bye.
Other theorem provers include COQ (see http://coq.inria.fr/) and Sparkle (see http://www.cs.ru.nl/Sparkle/) (a theorem prover for the alternative non-strict, purely function programming language Clean (see http://clean.cs.ru.nl/)). -- Benjamin L. Russell
participants (11)
-
Benjamin L.Russell
-
Brandon S. Allbery KF8NH
-
Brent Yorgey
-
Chaddaï Fouché
-
Dan Doel
-
Daryoush Mehrtash
-
Don Stewart
-
Rafael Almeida
-
Robin Green
-
Stefan Monnier
-
Thomas M. DuBuisson