https://wiki.haskell.org/api.php?action=feedcontributions&user=Thorkilnaur&feedformat=atomHaskellWiki - User contributions [en]2021-09-17T05:12:51ZUser contributionsMediaWiki 1.27.4https://wiki.haskell.org/index.php?title=Haskell_Weekly_News&diff=45728Haskell Weekly News2012-05-18T18:21:03Z<p>Thorkilnaur: In October 2010, Daniel Santa Cruz took over as editor.</p>
<hr />
<div>__NOTOC__<br />
<br />
[[Image:Hwn-cover.png|Haskell Weekly News]] <br />
[[Image:Hwn-posted.JPG]]<br />
<br />
The Haskell Weekly News (HWN) is a weekly newsletter covering<br />
developments in [[Haskell]]. Content includes announcements of new<br />
projects, discussions from the various Haskell communities, notable<br />
project commit messages, and more.<br />
<br />
The Haskell Weekly News is available at:<br />
<br />
* [http://contemplatecode.blogspot.com/search/label/HWN Contemplating code]<br />
* [http://www.haskell.org/mailman/listinfo/haskell Haskell mailing list]<br />
* Syndicated to [http://planet.haskell.org Planet Haskell]. <br />
* Headlines as [[News]] on [[Haskell|Haskell.org]].<br />
* [http://sequence.complete.org/node/feed RSS]<br />
<br />
<br />
=== Back Issues ===<br />
<br />
Back issues are available:<br />
<br />
* [http://code.haskell.org/~byorgey/code/hwn/archives/ Online]. in the [http://darcs.net darcs] repository, and<br />
* At [http://sequence.complete.org The Haskell Sequence].<br />
* The [[News|headlines]] are also archived to [[Haskell|Haskell.org]].<br />
* A few back issues are [http://www.haskell.org/haskellwiki/HWN/es available in Spanish].<br />
<br />
=== History ===<br />
<br />
The [http://www.haskell.org/pipermail/haskell/2005-August/016208.html first issue] <br />
of HWN was published on August 2, 2005. The founder, and initial editor was<br />
John Goerzen. In January 2006, Don Stewart took over as editor, succeeded by Brent Yorgey in June 2008, who was then succeeded by Joe Fredette in September 2009. In October 2010, Daniel Santa Cruz took over as editor.<br />
<br />
=== Contributing ===<br />
<br />
The simplest way to contribute is to submit stories for HWN. You may<br />
e-mail your stories to dstcruz * at * gmail * dot * com. We welcome stories<br />
on any subject related to Haskell, including new project announcements, notable<br />
project developments, new Haskell papers, and Haskell in the media.<br />
<br />
==== Hints For Contributors ====<br />
<br />
To make things easiest for us to process (which makes it more likely that your<br />
submission gets processed quickly), here are some hints.<br />
<br />
* Include links to whatever you are talking about. Readers need to have a place to go to read more about it.<br />
* Keep it short and sweet. HWN gives people a summary of what's happening, and links to more information. Generally no more than a 4 or 5 sentence paragraph.<br />
* Plain text or hand-edited HTML is required.<br />
<br />
==== Mailing lists ====<br />
<br />
HWN presently uses [http://dir.gmane.org/search.php?match=haskell Gmane.org]<br />
for links into Haskell mailing list discussions. If you send us links into the<br />
mailing list, we prefer that you link to the appropriate items on Gmane. If<br />
not, you can link to them in the [[Haskell]] archives and we'll<br />
find the corresponding gmane posts ourselves. But please at least link to them<br />
''somewhere''.<br />
<br />
==== Repository ====<br />
<br />
The code used to produce the present version<br />
of the newsletter is not yet publicly available, as it is a complete<br />
hack design to get things started again.<br />
<br />
[[Category:Community]]<br />
[[Category:News]]</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac5/Attendees/Photo&diff=27625Hac5/Attendees/Photo2009-04-19T08:31:27Z<p>Thorkilnaur: </p>
<hr />
<div>'''Hac5: Group photo'''<br />
<br />
[[Photo Full Size]]<br />
<br />
[[Image:Hac5.jpg]]<br />
<br />
[[Image:Hac5Legend.jpg]]<br />
<br />
{| class="wikitable"<br />
! Number<br />
! Name (nick)<br />
|-<br />
| 1<br />
| Lennart Kolmodin (kolmodin)<br />
|-<br />
| 2<br />
| Benedikt Schmidt (beschmi)<br />
|-<br />
| 3<br />
| -<br />
|-<br />
| 4<br />
| Erik Hesselink<br />
|-<br />
| 5<br />
| Thomas van Noort<br />
|-<br />
| 6<br />
| -<br />
|-<br />
| 7<br />
| Martijn Schrage<br />
|-<br />
| 8<br />
| Sebastiaan Visser<br />
|-<br />
| 9<br />
| -<br />
|-<br />
| 10<br />
| -<br />
|-<br />
| 11<br />
| David Himmelstrup (Lemmih)<br />
|-<br />
| 12<br />
| Alexey Rodriguez<br />
|-<br />
| 13<br />
| Tom Lokhorst<br />
|-<br />
| 14<br />
| -<br />
|-<br />
| 15<br />
| Bas van Dijk<br />
| -<br />
|-<br />
| 16<br />
| Ganesh Sittampalam (Heffalump)<br />
|-<br />
| 17<br />
| Eelco Dolstra<br />
|-<br />
| 18<br />
| Nicolas Pouillard (npouillard, ertai)<br />
|-<br />
| 19<br />
| Arie Middelkoop<br />
|-<br />
| 20<br />
| Atze Dijkstra<br />
|-<br />
| 21<br />
| -<br />
|-<br />
| 22<br />
| -<br />
|-<br />
| 23<br />
| -<br />
|-<br />
| 24<br />
| Chris Eidhof<br />
|-<br />
| 25<br />
| -<br />
|-<br />
| 26<br />
| Jeroen Fokker<br />
|-<br />
| 27<br />
| Thomas Davie (beelsebob)<br />
|-<br />
| 28<br />
| Peter Verswyvelen (Chatterbox)<br />
|-<br />
| 29<br />
| -<br />
|-<br />
| 30<br />
| -<br />
|-<br />
| 31<br />
| -<br />
|-<br />
| 32<br />
| Martijn van Steenbergen<br />
|-<br />
| 33<br />
| Ben Moseley<br />
|-<br />
| 34<br />
| -<br />
|-<br />
| 35<br />
| Christophe Poucet (vincenz/poucet)<br />
|-<br />
| 36<br />
| Wolfgang Jeltsch (jeltsch)<br />
|-<br />
| 37<br />
| -<br />
|-<br />
| 38<br />
| Ian Lynagh (Igloo)<br />
|-<br />
| 39<br />
| Remi Turk<br />
|-<br />
| 40<br />
| José Pedro Magalhães (dreixel)<br />
|-<br />
| 41<br />
| -<br />
|-<br />
| 42<br />
| Thomas Schilling<br />
|-<br />
| 43<br />
| Doaitse Swierstra<br />
|-<br />
| 44<br />
| -<br />
|-<br />
| 45<br />
| Eelco Lempsink<br />
|-<br />
| 46<br />
| Thorkil Naur (thorkilnaur)<br />
|-<br />
| 47<br />
| Andres Löh<br />
|}</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac5/Attendees/Photo&diff=27604Hac5/Attendees/Photo2009-04-18T15:46:51Z<p>Thorkilnaur: </p>
<hr />
<div>'''Hac5: Group photo'''<br />
<br />
[[Photo Full Size]]<br />
<br />
[[Image:Hac5.jpg]]<br />
<br />
[[Image:Hac5Legend.jpg]]<br />
<br />
{| class="wikitable"<br />
! Number<br />
! Name (nick)<br />
|-<br />
| 1<br />
| -<br />
|-<br />
| 2<br />
| Benedikt Schmidt (beschmi)<br />
|-<br />
| 3<br />
| -<br />
|-<br />
| 4<br />
| -<br />
|-<br />
| 5<br />
| -<br />
|-<br />
| 6<br />
| -<br />
|-<br />
| 7<br />
| -<br />
|-<br />
| 8<br />
| -<br />
|-<br />
| 9<br />
| -<br />
|-<br />
| 10<br />
| -<br />
|-<br />
| 11<br />
| David Himmelstrup (Lemmih)<br />
|-<br />
| 12<br />
| -<br />
|-<br />
| 13<br />
| -<br />
|-<br />
| 14<br />
| -<br />
|-<br />
| 15<br />
| -<br />
|-<br />
| 16<br />
| -<br />
|-<br />
| 17<br />
| -<br />
|-<br />
| 18<br />
| -<br />
|-<br />
| 19<br />
| -<br />
|-<br />
| 20<br />
| -<br />
|-<br />
| 21<br />
| -<br />
|-<br />
| 22<br />
| -<br />
|-<br />
| 23<br />
| -<br />
|-<br />
| 24<br />
| -<br />
|-<br />
| 25<br />
| -<br />
|-<br />
| 26<br />
| -<br />
|-<br />
| 27<br />
| Thomas Davie (beelsebob)<br />
|-<br />
| 28<br />
| -<br />
|-<br />
| 29<br />
| -<br />
|-<br />
| 30<br />
| -<br />
|-<br />
| 31<br />
| -<br />
|-<br />
| 32<br />
| -<br />
|-<br />
| 33<br />
| -<br />
|-<br />
| 34<br />
| -<br />
|-<br />
| 35<br />
| -<br />
|-<br />
| 36<br />
| -<br />
|-<br />
| 37<br />
| -<br />
|-<br />
| 38<br />
| Ian Lynagh (Igloo)<br />
|-<br />
| 39<br />
| -<br />
|-<br />
| 40<br />
| José Pedro Magalhães (dreixel)<br />
|-<br />
| 41<br />
| -<br />
|-<br />
| 42<br />
| -<br />
|-<br />
| 43<br />
| -<br />
|-<br />
| 44<br />
| -<br />
|-<br />
| 45<br />
| -<br />
|-<br />
| 46<br />
| Thorkil Naur (thorkilnaur)<br />
|-<br />
| 47<br />
| -<br />
|}</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac5/Attendees/Photo&diff=27602Hac5/Attendees/Photo2009-04-18T15:44:33Z<p>Thorkilnaur: </p>
<hr />
<div>'''Hac5: Group photo'''<br />
<br />
[[Photo Full Size]]<br />
<br />
[[Image:Hac5.jpg]]<br />
<br />
[[Image:Hac5Legend.jpg]]<br />
<br />
{| class="wikitable"<br />
! Number<br />
! Name (nick)<br />
|-<br />
| 1<br />
| -<br />
|-<br />
| 2<br />
| -<br />
|-<br />
| 3<br />
| -<br />
|-<br />
| 4<br />
| -<br />
|-<br />
| 5<br />
| -<br />
|-<br />
| 6<br />
| -<br />
|-<br />
| 7<br />
| -<br />
|-<br />
| 8<br />
| -<br />
|-<br />
| 9<br />
| -<br />
|-<br />
| 10<br />
| -<br />
|-<br />
| 11<br />
| -<br />
|-<br />
| 12<br />
| -<br />
|-<br />
| 13<br />
| -<br />
|-<br />
| 14<br />
| -<br />
|-<br />
| 15<br />
| -<br />
|-<br />
| 16<br />
| -<br />
|-<br />
| 17<br />
| -<br />
|-<br />
| 18<br />
| -<br />
|-<br />
| 19<br />
| -<br />
|-<br />
| 20<br />
| -<br />
|-<br />
| 21<br />
| -<br />
|-<br />
| 22<br />
| -<br />
|-<br />
| 23<br />
| -<br />
|-<br />
| 24<br />
| -<br />
|-<br />
| 25<br />
| -<br />
|-<br />
| 26<br />
| -<br />
|-<br />
| 27<br />
| Thomas Davie (beelsebob)<br />
|-<br />
| 28<br />
| -<br />
|-<br />
| 29<br />
| -<br />
|-<br />
| 30<br />
| -<br />
|-<br />
| 31<br />
| -<br />
|-<br />
| 32<br />
| -<br />
|-<br />
| 33<br />
| -<br />
|-<br />
| 34<br />
| -<br />
|-<br />
| 35<br />
| -<br />
|-<br />
| 36<br />
| -<br />
|-<br />
| 37<br />
| -<br />
|-<br />
| 38<br />
| Ian Lynagh (Igloo)<br />
|-<br />
| 39<br />
| -<br />
|-<br />
| 40<br />
| José Pedro Magalhães (dreixel)<br />
|-<br />
| 41<br />
| -<br />
|-<br />
| 42<br />
| -<br />
|-<br />
| 43<br />
| -<br />
|-<br />
| 44<br />
| -<br />
|-<br />
| 45<br />
| -<br />
|-<br />
| 46<br />
| Thorkil Naur (thorkilnaur)<br />
|-<br />
| 47<br />
| -<br />
|}</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac5/Attendees/Photo&diff=27600Hac5/Attendees/Photo2009-04-18T15:42:31Z<p>Thorkilnaur: </p>
<hr />
<div>'''Hac5: Group photo'''<br />
<br />
[[Photo Full Size]]<br />
<br />
[[Image:Hac5.jpg]]<br />
<br />
[[Image:Hac5Legend.jpg]]<br />
<br />
{| class="wikitable"<br />
! Number<br />
! Name (nick)<br />
|-<br />
| 1<br />
| -<br />
|-<br />
| 2<br />
| -<br />
|-<br />
| 3<br />
| -<br />
|-<br />
| 4<br />
| -<br />
|-<br />
| 5<br />
| -<br />
|-<br />
| 6<br />
| -<br />
|-<br />
| 7<br />
| -<br />
|-<br />
| 8<br />
| -<br />
|-<br />
| 9<br />
| -<br />
|-<br />
| 10<br />
| -<br />
|-<br />
| 11<br />
| -<br />
|-<br />
| 12<br />
| -<br />
|-<br />
| 13<br />
| -<br />
|-<br />
| 14<br />
| -<br />
|-<br />
| 15<br />
| -<br />
|-<br />
| 16<br />
| -<br />
|-<br />
| 17<br />
| -<br />
|-<br />
| 18<br />
| -<br />
|-<br />
| 19<br />
| -<br />
|-<br />
| 20<br />
| -<br />
|-<br />
| 21<br />
| -<br />
|-<br />
| 22<br />
| -<br />
|-<br />
| 23<br />
| -<br />
|-<br />
| 24<br />
| -<br />
|-<br />
| 25<br />
| -<br />
|-<br />
| 26<br />
| -<br />
|-<br />
| 27<br />
| Thomas Davie (beelsebob)<br />
|-<br />
| 28<br />
| -<br />
|-<br />
| 29<br />
| -<br />
|-<br />
| 30<br />
| -<br />
|-<br />
| 31<br />
| -<br />
|-<br />
| 32<br />
| -<br />
|-<br />
| 33<br />
| -<br />
|-<br />
| 34<br />
| -<br />
|-<br />
| 35<br />
| -<br />
|-<br />
| 36<br />
| -<br />
|-<br />
| 37<br />
| -<br />
|-<br />
| 38<br />
| -<br />
|-<br />
| 39<br />
| -<br />
|-<br />
| 40<br />
| -<br />
|-<br />
| 41<br />
| -<br />
|-<br />
| 42<br />
| -<br />
|-<br />
| 43<br />
| -<br />
|-<br />
| 44<br />
| -<br />
|-<br />
| 45<br />
| -<br />
|-<br />
| 46<br />
| Thorkil Naur (thorkilnaur)<br />
|-<br />
| 47<br />
| -<br />
|}</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac5/Attendees/Photo&diff=27596Hac5/Attendees/Photo2009-04-18T15:38:21Z<p>Thorkilnaur: </p>
<hr />
<div>'''Hac5: Group photo'''<br />
<br />
[[Image:Hac5.jpg]]<br />
<br />
[[Photo Full Size]]<br />
<br />
[[Image:Hac5Legend.jpg]]<br />
<br />
{| class="wikitable"<br />
! Number<br />
! Name (nick)<br />
|-<br />
| 1<br />
| -<br />
|-<br />
| 2<br />
| -<br />
|-<br />
| 3<br />
| -<br />
|-<br />
| 4<br />
| -<br />
|-<br />
| 5<br />
| -<br />
|-<br />
| 6<br />
| -<br />
|-<br />
| 7<br />
| -<br />
|-<br />
| 8<br />
| -<br />
|-<br />
| 9<br />
| -<br />
|-<br />
| 10<br />
| -<br />
|-<br />
| 11<br />
| -<br />
|-<br />
| 12<br />
| -<br />
|-<br />
| 13<br />
| -<br />
|-<br />
| 14<br />
| -<br />
|-<br />
| 15<br />
| -<br />
|-<br />
| 16<br />
| -<br />
|-<br />
| 17<br />
| -<br />
|-<br />
| 18<br />
| -<br />
|-<br />
| 19<br />
| -<br />
|-<br />
| 20<br />
| -<br />
|-<br />
| 21<br />
| -<br />
|-<br />
| 22<br />
| -<br />
|-<br />
| 23<br />
| -<br />
|-<br />
| 24<br />
| -<br />
|-<br />
| 25<br />
| -<br />
|-<br />
| 26<br />
| -<br />
|-<br />
| 27<br />
| -<br />
|-<br />
| 28<br />
| -<br />
|-<br />
| 29<br />
| -<br />
|-<br />
| 30<br />
| -<br />
|-<br />
| 31<br />
| -<br />
|-<br />
| 32<br />
| -<br />
|-<br />
| 33<br />
| -<br />
|-<br />
| 34<br />
| -<br />
|-<br />
| 35<br />
| -<br />
|-<br />
| 36<br />
| -<br />
|-<br />
| 37<br />
| -<br />
|-<br />
| 38<br />
| -<br />
|-<br />
| 39<br />
| -<br />
|-<br />
| 40<br />
| -<br />
|-<br />
| 41<br />
| -<br />
|-<br />
| 42<br />
| -<br />
|-<br />
| 43<br />
| -<br />
|-<br />
| 44<br />
| -<br />
|-<br />
| 45<br />
| -<br />
|-<br />
| 46<br />
| Thorkil Naur (thorkilnaur)<br />
|-<br />
| 47<br />
| -<br />
|}</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac5&diff=27594Hac52009-04-18T15:27:49Z<p>Thorkilnaur: </p>
<hr />
<div>[[Image:Hackathon-utrecht.png|Hac 05 Logo]]<br />
<br />
'''Hac5: The 5th Haskell Hackathon'''<br />
<br />
April 17-19, 2009<br />
Utrecht, The Netherlands<br />
<br />
Sponsored by: <br />
<br />
[[Image:galois.jpg]] [[Image:Research_bL.png]] [[Image:Tupil-logo-wb.png]]<br />
<br />
'''[http://galois.com/ Galois]''', '''[http://research.microsoft.com/ Microsoft Research]''' and '''[http://tupil.com Tupil]'''.<br />
Microsoft is a registered trademark of Microsoft Corporation.<br />
<br />
== About ==<br />
<br />
The Haskell Hackathon is an international, grassroots collaborative coding festival with a simple focus: build and improve Haskell libraries, tools, and infrastructure. Of course, we have fun doing it, too!<br />
<br />
The 5th Haskell Hackathon will be held from April 17 to 19, 2009, in the [http://en.wikipedia.org/wiki/Utrecht_(city) city of Utrecht] in the [http://en.wikipedia.org/wiki/Netherlands Netherlands]. This year's event is being organized by members of the [http://www.cs.uu.nl/ Department of Information and Computing Sciences] at [http://www.uu.nl/ Utrecht University] and by associates of [http://tupil.com/ Tupil].<br />
<br />
== News ==<br />
<br />
* 2009-04-07: Both Galois and Microsoft Research are willing to sponsor the event. We will try to use the money to cover some of the food.<br />
* 2009-02-11: The date has been picked.<br />
<br />
== Projects ==<br />
<br />
Check out the possible [[/Projects|projects]] that you might work on or add your own.<br />
<br />
== Registration ==<br />
<br />
If you will be attending, please [[/Register|register]].<br />
The number of attendees may be limited, depending on availability of space or other resources.<br />
<br />
== Attendees ==<br />
<br />
See [[/Attendees|who else is attending]]. If you've already registered, please add yourself to the list.<br />
<br />
== When ==<br />
<br />
* April 17-19 2009<br />
<br />
In general, the rooms will be open for hacking each day at 10:00 am. Each<br />
night, we should try to leave around 10:00 pm. Alas, we are not allowed to stay<br />
in the room all night<br />
<br />
If sufficiently many participants are already around on April 16<br />
or are still around on April 20, a small symposium and/or an excursion<br />
could be organized.<br />
<br />
== Location ==<br />
<br />
[[Image:BBL.jpg|thumb|The building's facade]]<br />
<br />
[[Image:Minnaert.jpg|thumb|This is the Minnaert building, which is easier to spot. The BBL is right behind it, where the arrow points to.]]<br />
<br />
[http://www.cs.uu.nl/docs/reach/bbl.php Buys Ballot Laboratorium (BBL)] at [http://www.uu.nl/EN/whowhatwhere/Pages/default.aspx Utrecht University]. Room numbers: 426 on Friday, 415 on Saturday and Sunday.<br />
<br />
=== Getting to Utrecht ===<br />
<br />
==== Air ====<br />
<br />
* Schiphol<br />
*:[http://www.schiphol.nl/Homepage/Homepage.htm Schiphol Airport] (AMS) is the main airport of the Netherlands. There is a train station right underneath the airport, and every 15min there is a direct train to Utrecht.<br />
<br />
* Eindhoven<br />
*:The [http://www.eindhovenairport.com/ airport in Eindhoven] (EIN) is cheaper than Schiphol, so many low-cost airlines fly there. There is a bus terminal outside the airport which will take you to Eindhoven station.<br />
<br />
==== Train ====<br />
<br />
* International trains (UK, France, Belgium, Germany)<br />
<br />
* National trains<br />
** General information<br />
**:[http://ns.nl/cs/Satellite/travellers NS] is the main public transport railway company in the Netherlands. You can buy tickets on machines at the station (you can also [http://webdemo.ns.nl/webdemo.e2000/ practice this online]). Maestro Debit cards are usually accepted and credit cards should work too, but in practice I've seen many people having trouble with this.<br />
**:If you pay with cash you have to go the counter, where you'll be charged extra for the ticket.<br />
**: <br /><br />
** From Schiphol, trains depart to Utrecht every 15min. The ticket price is €7,80 (second class, full-fare, one-way). The trip takes about 30min.<br />
**: <br /><br />
** From Eindhoven Airport, first you have to take bus 401 to Eindhoven station. There is a ticket machine inside the bus but you will need (Euro) coins to pay. Then from Eindhoven station you can take the train to Utrecht. There are trains every 15min to Utrecht Centraal. The ticket price is €12,80 (second class, full-fare, one-way). The trip takes about 50min.<br />
**: <br /><br />
* Arriving at Utrecht Central<br />
*:Outside the train station in Utrecht is the main bus station. From there you can take buses number 11, 12 or 12S to the University. The trip takes about 20min and takes 3 [http://en.wikipedia.org/wiki/Strippenkaart 'strippen'].<br />
<br />
==== Sea ====<br />
<br />
* Pier "Hoek van Hollland"<br />
*:From Hoek van Holland you can take the train to Rotterdam (Centraal), and from there to Utrecht. The train station is located just next to the pier. The trip takes about 1h20 and costs €13.30 (second class, full-fare, one-way). You don't need to buy any ticket in Rotterdam, you can just buy a ticket from Hoek van Holland to Utrecht.<br />
<br />
=== Transportation in Utrecht ===<br />
<br />
* Public transportation<br />
** To travel by bus, tramway or metro in the Netherlands, you're advised to buy your ticket in advance. This ticket is called a 'strippenkaart'. Strippenkaarten of 15 or 45 strips are available for €7.30 and €21.60 respectively, and one trip on the bus within a city (including all transfers within 60 minutes) is usually 2 or 3 strips of the card. Most places within the city center of Utrecht are one zone away from the zone where Utrecht University is located, hence you use 3 strippen for this trip.<br />
** Typically you enter the bus through the front door and tell the driver where you want to go. He then stamps the appropriate number of stripes from your strippenkaart. However, in some cases the bus driver might open all the doors and assume people will stamp the tickets themselves (this will typically happen for buses 11 and 12 during rush hour). You can then use the yellow (or nowadays grey) stamp machines inside the bus or at the station just before you depart.<br />
** Buying tickets on the bus is far more expensive. You can get these multiple-strip-/zone-tickets-card(s) in many places, including bus stations, post offices, cigar/magazine shops and some supermarkets (at the service desk or from a vending machine). You can use it also for multiple-party travel for yourself and other persons at the same time. You can read more about the strippenkaart in the [http://www.vbn-bv.nl/ovinfo/algemeen_en.asp?vPaginaID=140 ov-info website].<br />
<br />
* By bike<br />
** Biking is a very convenient way of traveling inside a city in the Netherlands. In particular, the way from Utrecht central station to the University is mostly through separate bike lanes and takes about 20 minutes. You can rent a bike from one of 3 bike parking areas at the station. The daily fee is €6.50 and you have to pay a deposit of €60 and show proof of identity (either driver's license or passport). (Note that these are not "OV-fiets"---those require a yearly subscription.) These places are open from 5am to 2am, every day of the week.<br />
** Make sure to obey traffic lights for bikes as being fined for not doing so is very common. You should also have your front and rear lights on when biking during nighttime (a rented bike will most probably have these in working condition). Also be careful where you park your bike and always lock it securely, since bike theft is very common in the Netherlands.<br />
<br />
=== Getting to the BBL ===<br />
<br />
There are two main bus lines that connect Utrecht city center to the University campus at the Uithof (pronounced something like OUT-hof): 11 and 12. Both depart from Utrecht Central Station, but then follow different routes to the campus.<br />
<br />
To know which line is more suitable to you, you can use [http://journeyplanner.9292.nl/ 9292ov]. Insert as departing point the address of your hotel and as destination Princetonplein 5, Utrecht. You will then be told the bus stop and bus number that you can take. Depending on where you are staying, it could also be that the best bus is not 11 nor 12: in that case simply follow the advice of the website.<br />
<br />
If you are coming with bus number 11, you should leave at bus stop "Botanische Tuinen" (Botanical Gardens). If you are coming with bus number 12, you should leave at bus stop "Padualaan". From either bus stop you will easily spot the [http://www.haskell.org/haskellwiki/Image:Minnaert.jpg Minnaert building]. If you walk towards it, you will notice there are small circular metal plates on the floor forming a path into the building. On Friday you can simply follow this path: it will take you into the building and across the internal bridge to the BBL, leaving you at the stairs where you can walk up. Alternatively you can walk along the corridor and you will find the elevators. During the weekend the Minnaert building will be closed, so you cannot follow this path. But by then it should be relatively easy for you to figure out how to walk around it on the outside and access the [http://www.haskell.org/haskellwiki/Image:BBL.jpg BBL from its front entrance].<br />
<br />
If you find yourself outside the building and cannot get in (which is likely to happen during the weekend or Friday evening), just call one of the two contact phone numbers under [[Hac5#Contact]]. Someone will come to open the door for you. You can also use these numbers in case you get lost or have any other problem.<br />
If you leave at the wrong bus stop, do not worry. In case you left before the correct bus stop, you can either walk along the bus route (if you were just one stop earlier) or wait for another bus to come (typically they are frequent). Your ticket will still be valid because it’s valid for one hour from the time it’s stamped.<br />
<br />
In case you left after the correct bus stop, you will probably still be inside the University campus, since both the 11 and the 12 bus lines end at the University Hospital. You’ll just have to walk a bit back and find your way to the BBL.<br />
<br />
There's also a [http://plattegrond.uu.nl/print/uithofprintversie2008.pdf pdf map of the campus].<br />
<br />
=== Accommodation ===<br />
<br />
It's not always easy to find loads of choice in accommodation in Utrecht. In particular, the Hackathon weekend coincides with a [http://www.recordplanet.nl/index.php?page=platenbeurs-2009 record fair]. So you should try to make your room reservation as soon as possible. You can have a look at [http://www.hotels.nl/utrecht/ hotels.nl].<br />
<br />
Another possibility is to stay in Amsterdam. The train to Utrecht takes 30 minutes and runs all night. Here are two search engines for [http://www.hotels.nl/ hotels] and [http://www.hostelsamsterdam.com/ hostels] in Amsterdam.<br />
<br />
If you have any doubts about any place, for instance about how easy it is to reach the University from there, just ask the organizers.<br />
<br />
== Map ==<br />
<br />
There is also an [http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=100786831801514107226.0004627927d6898c55d28&ll=52.098386,5.13525&spn=0.016082,0.037594&t=h&z=15 annotated Google Map with important locations].<br />
<br />
== Preparations ==<br />
<br />
=== What to bring ===<br />
<br />
* A laptop<br />
* Wireless card if necessary. There will be wireless network access. Ethernet access will probably not be available. If you really need ethernet access, please contact the organizers.<br />
* Power adapters if necessary. Power sockets in the Netherlands are [http://www.adaptelec.com/index.php?main_page=document_general_info&products_id=172 220-240V CEE 7/4] (a.k.a. [http://en.wikipedia.org/wiki/Schuko "Schuko"]).<br />
* Mobile phone<br />
<br />
=== Before you arrive ===<br />
<br />
* Pick out a couple of projects to work on and familiarise yourself with them<br />
* Install an up to date Haskell toolchain (preferrably ghc-6.10.1).<br />
<br />
== Previous Haskell Hackathons ==<br />
<br />
* [[Hackathon|Hackathon page]]<br />
<br />
* [[Hac4|Hac 4 (2008)- Gothenburg]]<br />
* [[Hac_2007_II|Hac 2007 II - Freiburg]]<br />
* [[Hac_2007|Hac 2007 - Oxford]]<br />
* [http://hackage.haskell.org/trac/ghc/wiki/Hackathon Hac 2006 - Portland]<br />
<br />
== Organization ==<br />
<br />
=== Mailing list ===<br />
<br />
[http://www.haskell.org/mailman/listinfo/hackathon hackathon@haskell.org] <br />
<br />
=== IRC channel ===<br />
<br />
Visit <br />
<br />
#haskell-hac5<br />
<br />
in Freenode.<br />
<br />
=== Organisers ===<br />
<br />
The organisers for Hac5 are:<br />
<br />
* Andres Löh<br />
* José Pedro Magalhães<br />
* Sean Leather<br />
* Eelco Lempsink<br />
* Chris Eidhof<br />
* more<br />
<br />
== Contact ==<br />
<br />
For any questions or emergencies, you can always call Pedro (+31 650459029) or Chris (+31 628887656).<br />
<br />
[[Category:Community]]<br />
[[Category:Events]]<br />
[[Category:Hackathon]]<br />
<br />
== Photo ==<br />
<br />
Here is a [[/AttendeePhoto|group photo]] with people's names.<br />
<br />
[[Image:Hac5.jpg]]<br />
<br />
[[Photo Full Size]]</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac5/Dinner&diff=27582Hac5/Dinner2009-04-18T12:38:36Z<p>Thorkilnaur: </p>
<hr />
<div>== Dinner ==<br />
<br />
For saturday night dinner, you have a choice out of 6 tasty options.<br />
<br />
We need to order '''BEFORE 15:00''', so if you want to join us, make sure your name is on this list!<br />
<br />
Dinner is paid for by the sponsors, and drinks as long as funds allow.<br />
<br />
We'll be going to Florin (http://florinutrecht.nl) and are expected at 20:00.<br />
<br />
== Options ==<br />
<br />
# Chicken Satay<br />
# Beef Burger<br />
# Veggie Burger<br />
# Salmon Filet<br />
# Spareribs<br />
# Steak<br />
<br />
== The List ==<br />
<br />
{| class="wikitable"<br />
! Name <br />
! Choice <br />
|-<br />
| Eelco Lempsink <br />
| 3 <br />
|-<br />
|-<br />
| Reinier Lamers<br />
| 3<br />
|-<br />
|-<br />
| Ben Moseley<br />
| 1<br />
|-<br />
|-<br />
| Ganesh Sittampalam<br />
| 6<br />
|-<br />
| Benedikt Schmidt<br />
| 6<br />
|-<br />
| Eric Kow<br />
| 4<br />
|-<br />
| Petr Rockai<br />
| 3<br />
|-<br />
| Daniel Carrera<br />
| 5<br />
|-<br />
| Sigrid Kronenberger<br />
| 1<br />
|-<br />
| Arjan Boeijink<br />
| 1<br />
|-<br />
| Don Stewart<br />
| 3<br />
|-<br />
| Markus Klinik<br />
| 1<br />
|-<br />
| Vincent Zweije<br />
| 5<br />
|-<br />
| Roman Cheplyaka<br />
| 1<br />
|-<br />
| Simon Hengel<br />
| 3<br />
|-<br />
| Ian Lynagh<br />
| 2<br />
|-<br />
| Remi Turk<br />
| 6<br />
|-<br />
| Atze Dijkstra<br />
| 4<br />
|-<br />
| Andres Loeh<br />
| 2<br />
|-<br />
| Clara Loeh<br />
| 6<br />
|-<br />
| Martijn van Steenbergen<br />
| 1<br />
|-<br />
| Wolfgang Jeltsch<br />
| 2<br />
|-<br />
| Thomas Davie<br />
| 6<br />
|-<br />
| Peter Verswyvelen<br />
| 6<br />
|-<br />
| Roel van Dijk<br />
| 6<br />
|-<br />
| Bas van Dijk<br />
| 6<br />
|-<br />
| Erik Hesselink<br />
| 6<br />
|-<br />
| Tom Lokhorst<br />
| 5<br />
|-<br />
| Rui Barbosa<br />
| 4<br />
|-<br />
| Sebastiaan Visser<br />
| 6<br />
|-<br />
| Thomas Schilling<br />
| 1<br />
|-<br />
| José Pedro Magalhães<br />
| 1<br />
|-<br />
| David Himmelstrup<br />
| 4<br />
|-<br />
| Nicolas Pouillard<br />
| 5<br />
|-<br />
| Lennart Kolmodin<br />
| 6<br />
|-<br />
| Chris Eidhof<br />
| 2<br />
|-<br />
| Thorkil Naur<br />
| 4<br />
|}</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac5/Attendees&diff=27173Hac5/Attendees2009-03-23T14:39:59Z<p>Thorkilnaur: My accomodation</p>
<hr />
<div>This is the attendee list for [[Hac5]]. Please refer to the [[Hac5|main page]] for more information.<br />
<br />
= Attendees =<br />
<br />
Once you've [[Hac5/Register|registered]], please add your name to the following table:<br />
<br />
{| class="wikitable"<br />
! Nickname<br />
! Real Name<br />
! Affiliation<br />
! Mobile #<br />
! Arriving<br />
! Departing<br />
! Accomodation<br />
|-<br />
| eelco<br />
| Eelco Lempsink<br />
| UU + Tupil<br />
| +31629486398<br />
| -<br />
| -<br />
| Lives in Utrecht.<br />
|-<br />
| kosmikus<br />
| Andres Löh<br />
| UU<br />
|<br />
| -<br />
| -<br />
| Lives close to Utrecht.<br />
|-<br />
| dreixel<br />
| José Pedro Magalhães<br />
| UU<br />
| +31 650459029<br />
| -<br />
| -<br />
| Lives in Utrecht.<br />
|-<br />
| Heffalump<br />
| Ganesh Sittampalam<br />
| Credit Suisse<br />
| +447968253467<br />
| 17th morning (overnight ferry arrives Hook of Holland at 0630)<br />
| 19th late afternoon (overnight ferry leaves Hook of Holland at 2200)<br />
| Strowis Hostel<br />
|-<br />
| kowey<br />
| Eric Kow<br />
| University of Brighton<br />
|<br />
| 17th morning (overnight ferry)<br />
| 19th late afternoon (overnight ferry)<br />
| Strowis Hostel<br />
|-<br />
|<br />
| Martijn van Steenbergen<br />
| UU<br />
|<br />
|<br />
|<br />
| Lives close to Utrecht.<br />
|-<br />
| Igloo<br />
| Ian Lynagh<br />
| Well-Typed LLP<br />
|<br />
| 17th morning (overnight ferry)<br />
| 19th late afternoon (overnight ferry)<br />
| Strowis hostel<br />
|-<br />
| thorkilnaur<br />
| Thorkil Naur<br />
| thorkilnaur.com<br />
| +45 24 82 85 98<br />
| April 17 (train 9.58, a bit late, but very convenient)<br />
| April 19 (train 19.29)<br />
| Hotel Oorsprongpark Utrecht<br />
|-<br />
| tux_rocker<br />
| Reinier Lamers<br />
|<br />
| <br />
| -<br />
| -<br />
| Lives in Utrecht<br />
|-<br />
| Jutaro<br />
| Jürgen Nicklisch-Franken<br />
| ICS AG<br />
|<br />
| 16th 23:00<br />
| 19th 17:00<br />
| Hotel de Admiraal<br />
|-<br />
| kolmodin<br />
| Lennart Kolmodin<br />
| <br />
| +46736223606<br />
| Don't know yet.<br />
| Don't know yet.<br />
| Don't know yet.<br />
|-<br />
| chr1s<br />
| Chris Eidhof<br />
| UU + Tupil<br />
| +31628887656<br />
| -<br />
| -<br />
| Lives in Utrecht.<br />
|-<br />
| sebas<br />
| Sebastiaan Visser<br />
| UU<br />
| +31624828951<br />
| -<br />
| -<br />
| Lives in Utrecht.<br />
|-<br />
| dcoutts<br />
| Duncan Coutts<br />
| Well-Typed LLP<br />
|<br />
| 16th<br />
| 20th<br />
| Don't know yet.<br />
|-<br />
| benmos<br />
| Ben Moseley<br />
| Barcap<br />
| +447788138855<br />
| 17th morning (overnight ferry arrives Hook of Holland at 0630)<br />
| 19th late afternoon (overnight ferry leaves Hook of Holland at 2200)<br />
| Hotel Oorsprongpark Utrecht<br />
|-<br />
| jeltsch<br />
| Wolfgang Jeltsch<br />
| BTU&nbsp;Cottbus<br />
| <br />
| at April&nbsp;17 in the morning (train arrives at 08:28)<br />
| at April&nbsp;19 in the afternoon (train departs at 16:59)<br />
| Hotel Oorsprongpark Utrecht<br />
|-<br />
-<br />
| beschmi<br />
| Benedikt Schmidt<br />
| ETH Zurich<br />
| +41 797417542<br />
| Don't know yet.<br />
| Don't know yet.<br />
| Don't know yet.<br />
|-<br />
| dons<br />
| Don Stewart<br />
| Galois<br />
|<br />
| Don't know yet.<br />
| Don't know yet.<br />
| Don't know yet.<br />
|-<br />
| blancolioni<br />
| Fraser Wilson<br />
| Anago bv<br />
| +31 6 81462922<br />
| -<br />
| -<br />
| Lives in Utrecht<br />
|-<br />
| Feuerbach<br />
| Roman Cheplyaka<br />
| <br />
|<br />
| 16th in the evening<br />
| 21th in the morning<br />
| Strowis<br />
|-<br />
| hesselink<br />
| Erik Hesselink<br />
| UU<br />
| +31 650994887<br />
| -<br />
| -<br />
| Lives in Utrecht<br />
|-<br />
| -<br />
| Marnix Klooster<br />
| Infor/private<br />
| -<br />
| -<br />
| -<br />
| Lives close to Utrecht<br />
|-<br />
|arjanb<br />
|Arjan Boeijink<br />
| -<br />
| -<br />
|Either the 17th or 18th in morning<br />
|19th in the evening<br />
|Not decided yet on traveling or finding a place to sleep.<br />
|-<br />
| Chatterbox<br />
| Peter Verswyvelen<br />
| Antwerp<br />
| <br />
| April&nbsp;17 in the afternoon<br />
| April&nbsp;19 in the afternoon<br />
| Apollo Hotel Utrecht City Centre<br />
|-<br />
| Beelsebob<br />
| Thomas Davie<br />
| Antwerp<br />
| <br />
| April&nbsp;17 in the afternoon<br />
| April&nbsp;19 in the afternoon<br />
| Apollo Hotel Utrecht City Centre<br />
|-<br />
| basvandijk<br />
| Bas van Dijk<br />
| Radboud Universiteit Nijmegen<br />
| +31614065248<br />
| 17th, morning, by car<br />
| 19th, evening<br />
| Don't know yet.<br />
|-<br />
|<br />
| Roel van Dijk<br />
| Radboud Universiteit Nijmegen<br />
| +31612856453<br />
| 17th, morning, by car<br />
| 19th, evening<br />
| Don't know yet.<br />
|-<br />
| remi<br />
| Remi Turk<br />
| UvA / UU<br />
| <br />
| -<br />
| -<br />
| Don't know yet<br />
|-<br />
| npouillard (ertai)<br />
| Nicolas Pouillard<br />
| INRIA<br />
| +33680126526<br />
| 17th, morning<br />
| 19th, afternoon<br />
| B&B Utrecht<br />
|-<br />
|nominolo<br />
|Thomas Schilling<br />
|University of Kent<br />
|<br />
|16th, probably<br />
|20th<br />
|friend's place<br />
|-<br />
| waern<br />
| David Waern<br />
| Amadeus<br />
| +33 642508769<br />
| 16th<br />
| 20th<br />
| Don't know yet<br />
|-<br />
| mornfall<br />
| Petr Ročkai<br />
| Masaryk University<br />
| <br />
| 17th 9:58 by train (to Utrecht Centraal)<br />
| 19th 19:29 by train<br />
| Friend's place<br />
|-<br />
|<br />
| Jeroen Fokker<br />
| UU<br />
|<br />
| -<br />
| -<br />
| Lives in Utrecht<br />
|-<br />
| sih<br />
| Simon Hengel<br />
| <br />
| +4917661064074<br />
| -<br />
| -<br />
| Don't know yet<br />
|}<br />
<br />
= Additional Comments =<br />
<br />
Please use this section to leave comments for other attendees, e.g. for organizing accommodation.</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac5/Attendees&diff=26775Hac5/Attendees2009-02-28T07:44:52Z<p>Thorkilnaur: Changed my arrival and departure information</p>
<hr />
<div>This is the attendee list for [[Hac5]]. Please refer to the [[Hac5|main page]] for more information.<br />
<br />
= Attendees =<br />
<br />
Once you've [[Hac5/Register|registered]], please add your name to the following table:<br />
<br />
{| class="wikitable"<br />
! Nickname<br />
! Real Name<br />
! Affiliation<br />
! Mobile #<br />
! Arriving<br />
! Departing<br />
! Accomodation<br />
|-<br />
| eelco<br />
| Eelco Lempsink<br />
| UU + Tupil<br />
| +31629486398<br />
| -<br />
| -<br />
| Lives in Utrecht.<br />
|-<br />
| kosmikus<br />
| Andres Löh<br />
| UU<br />
|<br />
| -<br />
| -<br />
| Lives close to Utrecht.<br />
|-<br />
| dreixel<br />
| José Pedro Magalhães<br />
| UU<br />
| +31 650459029<br />
| -<br />
| -<br />
| Lives in Utrecht.<br />
|-<br />
| Heffalump<br />
| Ganesh Sittampalam<br />
| Credit Suisse<br />
| +447968253467<br />
| 17th morning (overnight ferry arrives Hook of Holland at 0630)<br />
| 19th late afternoon (overnight ferry leaves Hook of Holland at 2200)<br />
| Strowis Hostel<br />
|-<br />
| kowey<br />
| Eric Kow<br />
| University of Brighton<br />
|<br />
| 17th morning (overnight ferry)<br />
| 19th late afternoon (overnight ferry)<br />
| Strowis Hostel<br />
|-<br />
|<br />
| Martijn van Steenbergen<br />
| UU<br />
|<br />
|<br />
|<br />
| Lives close to Utrecht.<br />
|-<br />
| Igloo<br />
| Ian Lynagh<br />
| Well-Typed LLP<br />
|<br />
| 17th morning (overnight ferry)<br />
| 19th late afternoon (overnight ferry)<br />
| Strowis hostel<br />
|-<br />
| thorkilnaur<br />
| Thorkil Naur<br />
| thorkilnaur.com<br />
| +45 24 82 85 98<br />
| April 17 (train 9.58, a bit late, but very convenient)<br />
| April 19 (train 19.29)<br />
| Don't know<br />
|-<br />
| tux_rocker<br />
| Reinier Lamers<br />
|<br />
| <br />
| -<br />
| -<br />
| Lives in Utrecht<br />
|-<br />
| Jutaro<br />
| Jürgen Nicklisch-Franken<br />
| ICS AG<br />
|<br />
| ?<br />
| ?<br />
| ?<br />
|-<br />
| kolmodin<br />
| Lennart Kolmodin<br />
| <br />
| +46736223606<br />
| Don't know yet.<br />
| Don't know yet.<br />
| Don't know yet.<br />
|-<br />
| chr1s<br />
| Chris Eidhof<br />
| UU + Tupil<br />
| +31628887656<br />
| -<br />
| -<br />
| Lives in Utrecht.<br />
|-<br />
| sebas<br />
| Sebastiaan Visser<br />
| UU<br />
| +31624828951<br />
| -<br />
| -<br />
| Lives in Utrecht.<br />
|-<br />
| dcoutts<br />
| Duncan Coutts<br />
| Well-Typed LLP<br />
|<br />
| 16th<br />
| 20th<br />
| Don't know yet.<br />
|-<br />
| benmos<br />
| Ben Moseley<br />
| Barcap<br />
| +447788138855<br />
| 17th morning (overnight ferry arrives Hook of Holland at 0630)<br />
| 19th late afternoon (overnight ferry leaves Hook of Holland at 2200)<br />
| Don't Know Yet<br />
|-<br />
| jeltsch<br />
| Wolfgang Jeltsch<br />
| BTU&nbsp;Cottbus<br />
| <br />
| at April&nbsp;17 in the morning (train arrives at 08:28)<br />
| at April&nbsp;19 in the afternoon (train departs at 16:59)<br />
| Hotel Oorsprongpark Utrecht<br />
|-<br />
-<br />
| beschmi<br />
| Benedikt Schmidt<br />
| ETH Zurich<br />
| +41 797417542<br />
| Don't know yet.<br />
| Don't know yet.<br />
| Don't know yet.<br />
|-<br />
| dons<br />
| Don Stewart<br />
| Galois<br />
|<br />
| Don't know yet.<br />
| Don't know yet.<br />
| Don't know yet.<br />
|-<br />
| blancolioni<br />
| Fraser Wilson<br />
| Anago bv<br />
| +31 6 81462922<br />
| -<br />
| -<br />
| Lives in Utrecht<br />
|-<br />
| Feuerbach<br />
| Roman Cheplyaka<br />
| <br />
|<br />
| Don't know yet.<br />
| Don't know yet.<br />
| Don't know yet.<br />
|-<br />
| hesselink<br />
| Erik Hesselink<br />
| UU<br />
| +31 650994887<br />
| -<br />
| -<br />
| Lives in Utrecht<br />
|-<br />
| -<br />
| Marnix Klooster<br />
| Infor/private<br />
| -<br />
| -<br />
| -<br />
| Lives close to Utrecht<br />
|}<br />
<br />
= Additional Comments =<br />
<br />
Please use this section to leave comments for other attendees, e.g. for organizing accommodation.</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac5/Attendees&diff=26437Hac5/Attendees2009-02-12T17:09:50Z<p>Thorkilnaur: Add myself</p>
<hr />
<div>This is the attendee list for [[Hac5]]. Please refer to the [[Hac5|main page]] for more information.<br />
<br />
= Attendees =<br />
<br />
Once you've [[Hac5/Register|registered]], please add your name to the following table:<br />
<br />
{| class="wikitable"<br />
! Nickname<br />
! Real Name<br />
! Affiliation<br />
! Mobile #<br />
! Arriving<br />
! Departing<br />
! Accomodation<br />
|-<br />
| eelco<br />
| Eelco Lempsink<br />
| UU + Tupil<br />
| +31629486398<br />
| -<br />
| -<br />
| Lives in Utrecht.<br />
|-<br />
| kosmikus<br />
| Andres Löh<br />
| UU<br />
|<br />
| -<br />
| -<br />
| Lives close to Utrecht.<br />
|-<br />
| dreixel<br />
| José Pedro Magalhães<br />
| UU<br />
| +31 650459029<br />
| -<br />
| -<br />
| Lives in Utrecht.<br />
|-<br />
| Heffalump<br />
| Ganesh Sittampalam<br />
| Credit Suisse<br />
| +447968253467<br />
| Don't know yet.<br />
| Don't know yet.<br />
| Don't know yet.<br />
|-<br />
| kowey<br />
| Eric Kow<br />
| University of Brighton<br />
|<br />
| Don't know yet.<br />
| Don't know yet.<br />
| Don't know yet.<br />
|-<br />
|<br />
| Martijn van Steenbergen<br />
| UU<br />
|<br />
|<br />
|<br />
| Lives close to Utrecht.<br />
|-<br />
| Igloo<br />
| Ian Lynagh<br />
| Well-Typed LLP<br />
|<br />
| Don't know yet.<br />
| Don't know yet.<br />
| Don't know yet.<br />
|-<br />
| thorkilnaur<br />
| Thorkil Naur<br />
| thorkilnaur.com<br />
| +45 24 82 85 98<br />
| Probably April 16<br />
| Probably April 20<br />
| Don't know<br />
|}<br />
<br />
= Additional Comments =<br />
<br />
Please use this section to leave comments for other attendees, e.g. for organizing accommodation.</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac4/Attendees&diff=20451Hac4/Attendees2008-04-06T19:57:58Z<p>Thorkilnaur: Additional details of mine</p>
<hr />
<div>[[Image:Hac-axe-icon.png|Hac icon]]<br />
<br />
== Projects ==<br />
<br />
See [[Hac4/Projects]].<br />
<br />
== Registrants ==<br />
<br />
If you've [[Hac4/Register|registered]], do add your name to the following table:<br />
<br />
{| class="wikitable"<br />
! Name<br />
! Nick<br />
! Affiliation<br />
! Mobile #<br />
|-<br />
| [http://www.bringert.net/ Björn Bringert]<br />
| bringert<br />
| Chalmers <br />
| +46704779794<br />
|-<br />
| Jean-Philippe Bernardy<br />
| jyp<br />
| Chalmers <br />
| <br />
|-<br />
| [http://mahogny.areta.org/ Johan Henriksson]<br />
| mahogny<br />
| Karolinska Institute/Chalmers<br />
| +46765549028<br />
|-<br />
| Thomas Schilling<br />
| nominolo<br />
| Chalmers<br />
| +46762316289<br />
|-<br />
| Lennart Kolmodin<br />
| kolmodin<br />
| Chalmers<br />
| +46736223606<br />
|-<br />
| David Himmelstrup<br />
| Lemmih<br />
| Lemminian Institute of Technology<br />
|<br />
|-<br />
| Don Stewart<br />
| dons<br />
| Galois <br />
|<br />
|-<br />
| Krasimir Angelov<br />
| kr.angelov<br />
| Chalmers<br />
| +46738228179<br />
|-<br />
| Thorkil Naur<br />
| thorkilnaur<br />
|<br />
| +45 24 82 85 98<br />
|-<br />
| Ian Lynagh<br />
| Igloo<br />
|<br />
|<br />
|-<br />
| Johan Liesén<br />
| liesen<br />
| Chalmers<br />
| <br />
|-<br />
| Fredrik Möllerstrand<br />
| lenbust<br />
| Chalmers<br />
| <br />
|-<br />
| David Waern<br />
| waern<br />
| Amadeus<br />
| +46768555581<br />
|-<br />
| Johan Tibell<br />
| tibbe<br />
| Google<br />
|<br />
|-<br />
| Ganesh Sittampalam<br />
| Heffalump<br />
| Credit Suisse<br />
| +447968253467<br />
|-<br />
| Niklas Broberg<br />
| nibro<br />
| Chalmers<br />
| <br />
|-<br />
| Andres L&ouml;h<br />
| kosmikus<br />
| Utrecht<br />
|<br />
|-<br />
| Sean Leather<br />
| leather<br />
| Utrecht<br />
|<br />
|-<br />
|-<br />
| Josef Svenningsson<br />
| ralejs<br />
| Chalmers<br />
| +46705455542<br />
|-<br />
| Duncan Coutts<br />
| dcoutts<br />
| Oxford<br />
|<br />
|-<br />
|}<br />
<br />
== Arriving ==<br />
<br />
{|<br />
|-<br />
| dons<br />
| 10th, 4:45 PM<br />
|-<br />
| kosmikus<br />
| 10th, 11:30 AM<br />
|-<br />
| Lemmih<br />
| 10th, 3:15 PM<br />
|-<br />
| thorkilnaur<br />
| 11th, 22.20<br />
|}<br />
<br />
== Accomodation ==<br />
<br />
Igloo and Heffalump will be at [http://www.hotelnice.se/ Nice Bed & Breakfast], 10-14 April.<br />
<br />
Lemmih will be at [http://www.hotelnice.se/ Nice Bed & Breakfast], 10-14 April.<br />
<br />
thorkilnaur will be at [http://www.hotelnice.se/ Nice Bed & Breakfast], 11-13 April.<br />
<br />
kosmikus is at Nice B&B as well, 10-14 April.<br />
<br />
dons is at [http://www.panorama.se/ Quality Hotel Panorama], 10-14 April.<br />
<br />
A number of accommodation options are available. To organize to share,<br />
contact other attendees on irc or via email.</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac4/Attendees&diff=19120Hac4/Attendees2008-02-13T22:14:30Z<p>Thorkilnaur: to the list of registrants</p>
<hr />
<div>[[Image:Hac-axe-icon.png|Hac icon]]<br />
<br />
== Projects ==<br />
<br />
See [[Hac4/Projects]].<br />
<br />
== Registrants ==<br />
<br />
If you've [[Hac4/Register|registered]], do add your name to the following table:<br />
<br />
{| class="wikitable"<br />
! Name<br />
! Nick<br />
! Affiliation<br />
! Mobile #<br />
|-<br />
| [http://www.bringert.net/ Björn Bringert]<br />
| bringert<br />
| Chalmers <br />
| +46704779794<br />
|-<br />
| Jean-Philippe Bernardy<br />
| jyp<br />
| Chalmers <br />
| <br />
|-<br />
| [http://mahogny.areta.org/ Johan Henriksson]<br />
| mahogny<br />
| Karolinska Institute/Chalmers<br />
| +46765549028<br />
|-<br />
| Thomas Schilling<br />
| nominolo<br />
| Chalmers<br />
| +46762316289<br />
|-<br />
| Lennart Kolmodin<br />
| kolmodin<br />
| Chalmers<br />
| +46736223606<br />
|-<br />
| David Himmelstrup<br />
| Lemmih<br />
| Lemminian Institute of Technology<br />
|<br />
|-<br />
| Don Stewart<br />
| dons<br />
| Galois <br />
|<br />
|-<br />
| Krasimir Angelov<br />
| kr.angelov<br />
| Chalmers<br />
| +46738228179<br />
|-<br />
| Thorkil Naur<br />
| thorkilnaur<br />
|<br />
|<br />
|-<br />
|}<br />
<br />
== Arriving ==<br />
<br />
<br />
== Accomodation ==<br />
<br />
A number of accommodation options are available. To organize to share,<br />
contact other attendees on irc or via email.</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac_2008/Dates&diff=18195Hac 2008/Dates2008-01-09T07:19:49Z<p>Thorkilnaur: Add myself</p>
<hr />
<div>What dates would suit you for Hac 2008 in Gothenburg?<br />
<br />
{| border="1" <br />
! Name<br />
! Apr 4-6<br />
! Apr 11-13<br />
! Apr 18-20<br />
! Comments<br />
|- <br />
| Björn Bringert<br />
| OK<br />
| OK<br />
| OK<br />
| Will be there<br />
|-<br />
| Duncan Coutts<br />
| OK<br />
| OK<br />
| Probably OK<br />
| Will probably be there<br />
|-<br />
| Ivan Tarasov<br />
| Probably OK<br />
| OK<br />
| OK<br />
| May need some help (an invitation) to get the visa<br />
|-<br />
| Don Stewart<br />
| OK<br />
| OK<br />
| OK<br />
| Probably can make it.<br />
|-<br />
| David Waern<br />
| OK<br />
| OK<br />
| OK<br />
| Hope to make it.<br />
|-<br />
| Lennart Kolmodin<br />
| OK<br />
| OK<br />
| OK<br />
| All dates have high probability.<br />
|-<br />
| Johan Tibell<br />
| OK<br />
| OK<br />
| OK<br />
| Hope to make it.<br />
|-<br />
| Ian Lynagh<br />
| OK<br />
| Not good<br />
| OK<br />
| Will probably be there<br />
|-<br />
| Mattias Bengtsson<br />
| OK<br />
| OK<br />
| OK<br />
| Will probably be there<br />
|-<br />
| David Himmelstrup<br />
| OK<br />
| OK<br />
| OK<br />
| Hope to make it.<br />
|-<br />
| Thorkil Naur<br />
| OK<br />
| OK<br />
| OK<br />
| Will most likely be there.<br />
<br />
|}</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac_2007_II&diff=16095Hac 2007 II2007-10-07T08:47:00Z<p>Thorkilnaur: Perfectifying</p>
<hr />
<div>[[Image:Freiburg-lambda.png|Hac 07 II|center]]<br />
<br />
[[Image:Hac-axe-icon.png|Hac icon]]<br />
<br />
'''Hac 07 II: Haskell Hackathon'''<br />
<br />
'''October 5-7, 2007'''<br />
<br />
'''University of Freiburg, Freiburg, Germany'''<br />
<br />
<br />
* [[/Register|Register for the Hackathon]]<br />
<br />
* [[/Attendees|Attendees organising page]]<br />
<br />
* [[/Projects|What we're working on]]<br />
<br />
== Photos / blogs ==<br />
<br />
[[Image:Hackathon.jpg]]<br />
<br />
Hac 07 II - Freiburg, Germany. Group photo of hackers.<br />
<br />
[[Image:Hac07-mask.jpg]]<br />
<br />
1. Clifford Beshers, thetallguy, Linspire<br />
2. David Himmelstrup, Lemmih, HAppS Inc.<br />
3. Conal Elliot, conal<br />
4. Don Stewart, dons, Galois<br />
5. Russel O'Connor, roconnor<br />
6. Ben Lippmeier, benl23, ANU<br />
7. Johan Tibbel, tibbe, Google<br />
8. Christophe Poucet, vincenz, IMEC<br />
9. Tim Chevalier, Binkley, Portland State<br />
10. Bjorn Bringert, Chalmers<br />
11. <br />
12. Ivan Tarasov<br />
13. <br />
14. Ian Lynagh, Igloo<br />
15. Thorkil Naur (thorkilnaur)<br />
16. Thomas Schilling<br />
17. Pepe Iborra<br />
18. <br />
19. Linspire<br />
20. Duncan Coutts, dcoutts, Oxford<br />
21. Marcus Uneson<br />
22. Phillip Heidegger, Freiburg<br />
23. Ganesh, Heffalump, Credit Suisse<br />
24. Lennart Kolmodin (kolmodin)<br />
25. Jürgen Nicklisch, Jutaro<br />
26. Alexey Yakushev, ghc hacker<br />
<br />
* [http://stockwits.com/Hackathon.jpg Group Picture]<br />
* [http://lafalafu.com/krc/Images/hacday1/ A few from Tim, day 1]<br />
* [http://cgi.cse.unsw.edu.au/~dons/blog/2007/10/06#hac07-2-day1 Don's blog, day 1]<br />
* [http://www.joachim-breitner.de/blog/archives/269-Haskell-Hackathon-Hackage-vs.-Debian.html Joachim's blog, day 1]<br />
* [http://flickr.com/photos/nominolo/tags/hac2007ii/ nominolo's pictures], on Flickr<br />
* [http://flickr.com/photos/pepeiborra/tags/hac2007ii/ mnislaih's pictures], on Flickr<br />
<br />
== About ==<br />
<br />
The 3rd Haskell Hackathon will be held over 3 days, October 5-7 2007,<br />
at the University of Freiburg, in conjunction with the<br />
[http://www.cse.unsw.edu.au/~keller/haskellws/HaskellWorkshop.html Haskell Workshop] and<br />
[http://www.informatik.uni-bonn.de/~ralf/icfp07.html ICFP] 2007.<br />
It is a coding festival, focusing on producing and improving<br />
Haskell libraries, tools and infrastructure.<br />
<br />
To attend please [[/Register|register]], and get ready to hack!<br />
<br />
''Note: that it is not necessary to register for ICFP, or any of the associated conferences, if you only want to go to the Hackathon. The Hackathon itself will be '''free''', but you will have to pay for travel, accommodation and food.''<br />
<br />
== Registration ==<br />
<br />
If you will be attending add your name to the [[/Register|Registration page]].<br />
Numbers may be limited, depending on availablity of space.<br />
<br />
== Where ==<br />
<br />
The Hackathon will take place at the same venue as the IFL workshop, at<br />
[http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&om=1&msid=112565914073914710272.0000011293bc4c0bc450c&ll=47.999169,7.86046&spn=0.041064,0.078621&z=14 the Faculty of Applied Sciences] of the University of Freiburg. '''The room is 02-016 in building 101'''.<br />
<br />
You can reach the hackathon venue from the main train station by taking the "Breisgau S-Bahn" from "Freiburg - Hbf." to "FR Messe/Universitt". [http://proglang.informatik.uni-freiburg.de/IFL2007/timetable.pdf Here is a timetable] (pdf). Please note that most but not all trains stop at the hackathon venue. Also, some trains only run Monday to Friday ("Montag - Freitag") or on Saturday ("Samstag").<br />
<br />
Alternatively, you can walk from the city center to the hackathon (20 - 30 minutes). [http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&om=1&msid=112565914073914710272.0000011293bc4c0bc450c&ll=47.999169,7.86046&spn=0.041064,0.078621&z=14 The map] shows the exact route. <br />
[[Image:logo-klein-07-2.png|frame|]]<br />
<br />
The Hackathon will be integrated with the university [http://sommercampus2007.informatik.uni-freiburg.de/WikiAbstract summer campus]. This will give us all the infrastructure (room, Internet, etc) at minimal hassle. '''Note:''' There won't be any stationary PCs, so you should bring a laptop with you.<br />
<br />
=== Local information ===<br />
<br />
For local information (travel, accommodation etc) see the<br />
[http://proglang.informatik.uni-freiburg.de/ICFP2007/ ICFP local info page].<br />
<br />
[http://proglang.informatik.uni-freiburg.de/IFL2007/travel-information.shtml Travel information page]<br />
<br />
Airport maps:<br />
* [http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&ll=48.705463,9.876709&spn=4.945094,10.063477&z=7&om=1&msid=112565914073914710272.000001129e6f892b7a21e Airports]<br />
<br />
== Dates ==<br />
<br />
Hac 2007 II will take place on Fri 5 Oct to Sun 7 Oct. The following<br />
table shows the workshops and conferences held in Freiburg during the<br />
ICFP period:<br />
<br />
{| class="wikitable"<br />
|-<br />
|Date || Events<br />
|-<br />
|Thu 27 Sep || IFL<br />
|-<br />
|Fri 28 Sep || IFL<br />
|-<br />
|Sat 29 Sep || IFL<br />
|-<br />
|Sun 30 Sep || HW, Scheme<br />
|-<br />
|Mon 1 Oct || ICFP<br />
|-<br />
|Tue 2 Oct || ICFP<br />
|-<br />
|Wed 3 Oct || ICFP<br />
|-<br />
|Thu 4 Oct || CUFP, MM<br />
|-<br />
|Fri 5 Oct || '''Hac 2007 II''', Erlang, ML, PV<br />
|-<br />
|Sat 6 Oct || '''Hac 2007 II'''<br />
|-<br />
|Sun 7 Oct || '''Hac 2007 II'''<br />
|}<br />
<br />
The Hackathon will, ''tentatively'', be held from 10am to 6pm each day,<br />
with dinner after at local venues.<br />
<br />
== Facilities ==<br />
<br />
=== What to bring ===<br />
<br />
* A laptop<br />
* Wireless cards<br />
* Power adaptors if necessary<br />
* Ethernet cable<br />
* Mobile phone<br />
<br />
=== Before you arrive ===<br />
<br />
* Pick out a couple of projects to work on and familiarise yourself with them<br />
* Install an up to date Haskell toolchain (ghc-6.6.1 and if you like a recent snapshot of ghc-6.8.0 also).<br />
<br />
== Projects to work on ==<br />
<br />
Add ideas here for which you think hacking together as a group (rather<br />
than individually) would be beneficial.<br />
<br />
=== Group projects ===<br />
<br />
* Building tests that give 100% code coverage for package base.<br />
* Lots of Cabal hacking still to be done<br />
* Bindings for <your favourite C library><br />
* Haskell library for <your favourite task><br />
* Ensure hackage is ready for ghc 6.8<br />
<br />
=== Other things ===<br />
<br />
* Bit layer on Data.Binary 1.0<br />
* libxml<br />
* bytestring parsec<br />
* combine strictcheck and quickcheck once and for all<br />
* darcs hacking<br />
* aggressive inlining for mtl?<br />
* Data.ByteString.Sequence - a ropes-alike lib based on specialised finger trees<br />
* Data.ByteString.Rope, based on<br />
* [http://www.sgi.com/tech/stl/ropeimpl.html SGIs ropes] or [http://groups.google.com/group/fa.caml/browse_frm/thread/4e70beff0f714229/ new ocaml ropes]<br />
* bit parsing layer for Data.Binary and a network protocol demo?<br />
* dons: HPC coverage for bytestring 1.0<br />
* pretty printer-based ncurses interface<br />
* integrate darcs-piegraph and darcs-graph<br />
* improve the performance of DiffArray using modern techniques [http://www.lri.fr/~filliatr/ftp/ocaml/ds/parray.ml.html OCaml impl]. <br />
** vincenz: Note that even underneath the hood, the ocaml impl is using impurity to implement this (namely the modification of the array in Diff)<br />
* New [http://www.cse.unsw.edu.au/~dons/hs-plugins hs-plugins] on top of ghc-api. [[User:Conal|Conal]]<br />
* Fast general, pure-Haskell image synthesis (speed of [http://conal.net/Pan Pan] or [http://conal.net/Pajama Pajama] but via ghc). Use Harpy or a new hs-plugins. [[User:Conal|Conal]] <br />
* [http://tiddlywiki.com TiddlyWiki]-based code & documentation browser. Syntax-colored and all identifiers fully hyperlinked to sources. Thanks to TiddlyWiki, the browsing experience is fluid & self-organizing. [[User:Conal|Conal]]<br />
* Fix the Network.Socket API (at least to allow <code>setSocketOption x RecvTimeOut</code> and <code>SendTimeOut</code>)<br />
* Haskell WSGI (http://www.python.org/dev/peps/pep-0333/) equivalent with a reference server implementation.<br />
* [http://haskell.org/haskellwiki/UnicodeByteString UnicodeByteString] layer (<code>Text.UnicodeString</code> maybe).<br />
* ByteString network API.<br />
* ByteString simple HTTP<br />
* Library to allow Haskell to communicate with Erlang processes using the Erlang message protocol.<br />
* A better curses rss client than snownews: support ^L resize signal, and parallel feed downloading.<br />
* benl23: Optimize new graph colouring register allocator.<br />
* jutaro: Information extraction for a Haskell IDE (Types,Completion,Navigation)<br />
* ivant: fix [http://cryp.to/funcmp/ Functional MetaPost] (figure out the problems of using it from LaTeX, add definitions for using it from ConTeXt, etc.)<br />
* Possibility to turn logging on/off in lambdabot per channel<br />
* Continuous build system, via as simple, general dependency tracking & execution formulated as an [[applicative functor]] and using [[DataDriven]] computation. No "make" info required (since inferred by construction). Applies uniformly to recompiling, re-executing, installing, compiler-recompiling, GUI specification and execution, etc. For compilation, it can give more precise (efficient) recompilation than language-specific tools (e.g., <code>hmake</code> and <code>ghc --make</code>) without being language-specific. [[User:Conal|Conal]] 13:51, 1 October 2007 (UTC)<br />
<br />
== Organisers ==<br />
<br />
The organisers for the Hackathon are:<br />
<br />
* [http://progtools.comlab.ox.ac.uk/members/duncan Duncan Coutts]<br />
* [mailto:igloo@earth.li Ian Lynagh]<br />
* [http://www.cse.unsw.edu.au/~dons Don Stewart] <br />
<br />
The organisers can be contacted via: <br />
<br />
dons.hac07@cse.unsw.edu.au<br />
<br />
The local organisers in Freiburg:<br />
<br />
* [http://www.informatik.uni-freiburg.de/~wehr/ Stefan Wehr] <br />
* Phillip Heidegger<br />
<br />
Courtesy of the<br />
[http://proglang.informatik.uni-freiburg.de/ICFP2007/local-organizers.shtml Programming Languages Group] at the University of Freiburg.<br />
<br />
== IRC channel ==<br />
<br />
A Hackathon [[IRC channel]] has been set up. Visit:<br />
<br />
#haskell-hac07<br />
<br />
on Freenode.<br />
<br />
== Previous Haskell hackathons ==<br />
<br />
* [[Hac_2007|Hac 2007 - Oxford]]<br />
* [http://hackage.haskell.org/trac/ghc/wiki/Hackathon Hac 2006 - Portland]<br />
<br />
== Related events ==<br />
<br />
Hac 07 II is (unofficially) colocated with ICFP and other conferences:<br />
<br />
{|<br />
!<br />
!<br />
|-<br />
| [http://proglang.informatik.uni-freiburg.de/IFL2007/ IFL]<br />
| September 27-29<br />
|-<br />
| [http://www.cse.unsw.edu.au/~keller/haskellws/HaskellWorkshop.html Haskell Workshop]<br />
| September 30<br />
|-<br />
| [http://www.informatik.uni-bonn.de/~ralf/icfp07.html ICFP] <br />
| October 1-3<br />
|-<br />
| [http://cufp.galois.com/ CUFP] <br />
| October 4<br />
|-<br />
|}<br />
<br />
== Questions ==<br />
<br />
* AJG: What can Galois do to help?<br />
* If there's anything that Credit Suisse can do to support the Hackathon, please let me know - [mailto:howard.mansell@credit-suisse.com]<br />
<br />
== Misc ==<br />
<br />
The Freiburg background is [http://en.wikipedia.org/wiki/Image:Friburgo_-_Freiburg.jpg available] under the GNU Free Documentation License, from wikipedia.<br />
<br />
[[Category:Community]]<br />
[[Category:Events]]</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac_2007_II&diff=16083Hac 2007 II2007-10-06T13:39:07Z<p>Thorkilnaur: Name list skeleton</p>
<hr />
<div>[[Image:Freiburg-lambda.png|Hac 07 II|center]]<br />
<br />
[[Image:Hac-axe-icon.png|Hac icon]]<br />
<br />
'''Hac 07 II: Haskell Hackathon'''<br />
<br />
'''October 5-7, 2007'''<br />
<br />
'''University of Freiburg, Freiburg, Germany'''<br />
<br />
<br />
* [[/Register|Register for the Hackathon]]<br />
<br />
* [[/Attendees|Attendees organising page]]<br />
<br />
* [[/Projects|What we're working on]]<br />
<br />
== Photos / blogs ==<br />
<br />
[[Image:Hackathon.jpg]]<br />
<br />
Hac 07 II - Freiburg, Germany. Group photo of hackers.<br />
<br />
[[Image:Hac07-mask.jpg]]<br />
<br />
1. Clifford Beshers, thetallguy, Linspire<br />
2. David Himmelstrup, Lemmih, HAppS Inc.<br />
3. Conal Elliot, conal<br />
4. Don Stewart, dons, Galois<br />
5. Russel O'Connor, roconnor<br />
6. Ben Lippmeier, benl23, ANU<br />
7. Johan Tibbel, tibbe, Google<br />
8. vincenz<br />
9. Tim Chevalier, Binkley, Portland State<br />
15. Thorkil Naur (thorkilnaur)<br />
<br />
* [http://stockwits.com/Hackathon.jpg Group Picture]<br />
* [http://lafalafu.com/krc/Images/hacday1/ A few from Tim, day 1]<br />
* [http://cgi.cse.unsw.edu.au/~dons/blog/2007/10/06#hac07-2-day1 Don's blog, day 1]<br />
* [http://www.joachim-breitner.de/blog/archives/269-Haskell-Hackathon-Hackage-vs.-Debian.html Joachim's blog, day 1]<br />
* [http://flickr.com/photos/nominolo/tags/hac2007ii/ nominolo's pictures], on Flickr<br />
* [http://flickr.com/photos/pepeiborra/tags/hac2007ii/ mnislaih's pictures], on Flickr<br />
<br />
== About ==<br />
<br />
The 3rd Haskell Hackathon will be held over 3 days, October 5-7 2007,<br />
at the University of Freiburg, in conjunction with the<br />
[http://www.cse.unsw.edu.au/~keller/haskellws/HaskellWorkshop.html Haskell Workshop] and<br />
[http://www.informatik.uni-bonn.de/~ralf/icfp07.html ICFP] 2007.<br />
It is a coding festival, focusing on producing and improving<br />
Haskell libraries, tools and infrastructure.<br />
<br />
To attend please [[/Register|register]], and get ready to hack!<br />
<br />
''Note: that it is not necessary to register for ICFP, or any of the associated conferences, if you only want to go to the Hackathon. The Hackathon itself will be '''free''', but you will have to pay for travel, accommodation and food.''<br />
<br />
== Registration ==<br />
<br />
If you will be attending add your name to the [[/Register|Registration page]].<br />
Numbers may be limited, depending on availablity of space.<br />
<br />
== Where ==<br />
<br />
The Hackathon will take place at the same venue as the IFL workshop, at<br />
[http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&om=1&msid=112565914073914710272.0000011293bc4c0bc450c&ll=47.999169,7.86046&spn=0.041064,0.078621&z=14 the Faculty of Applied Sciences] of the University of Freiburg. '''The room is 02-016 in building 101'''.<br />
<br />
You can reach the hackathon venue from the main train station by taking the "Breisgau S-Bahn" from "Freiburg - Hbf." to "FR Messe/Universitt". [http://proglang.informatik.uni-freiburg.de/IFL2007/timetable.pdf Here is a timetable] (pdf). Please note that most but not all trains stop at the hackathon venue. Also, some trains only run Monday to Friday ("Montag - Freitag") or on Saturday ("Samstag").<br />
<br />
Alternatively, you can walk from the city center to the hackathon (20 - 30 minutes). [http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&om=1&msid=112565914073914710272.0000011293bc4c0bc450c&ll=47.999169,7.86046&spn=0.041064,0.078621&z=14 The map] shows the exact route. <br />
[[Image:logo-klein-07-2.png|frame|]]<br />
<br />
The Hackathon will be integrated with the university [http://sommercampus2007.informatik.uni-freiburg.de/WikiAbstract summer campus]. This will give us all the infrastructure (room, Internet, etc) at minimal hassle. '''Note:''' There won't be any stationary PCs, so you should bring a laptop with you.<br />
<br />
=== Local information ===<br />
<br />
For local information (travel, accommodation etc) see the<br />
[http://proglang.informatik.uni-freiburg.de/ICFP2007/ ICFP local info page].<br />
<br />
[http://proglang.informatik.uni-freiburg.de/IFL2007/travel-information.shtml Travel information page]<br />
<br />
Airport maps:<br />
* [http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&ll=48.705463,9.876709&spn=4.945094,10.063477&z=7&om=1&msid=112565914073914710272.000001129e6f892b7a21e Airports]<br />
<br />
== Dates ==<br />
<br />
Hac 2007 II will take place on Fri 5 Oct to Sun 7 Oct. The following<br />
table shows the workshops and conferences held in Freiburg during the<br />
ICFP period:<br />
<br />
{| class="wikitable"<br />
|-<br />
|Date || Events<br />
|-<br />
|Thu 27 Sep || IFL<br />
|-<br />
|Fri 28 Sep || IFL<br />
|-<br />
|Sat 29 Sep || IFL<br />
|-<br />
|Sun 30 Sep || HW, Scheme<br />
|-<br />
|Mon 1 Oct || ICFP<br />
|-<br />
|Tue 2 Oct || ICFP<br />
|-<br />
|Wed 3 Oct || ICFP<br />
|-<br />
|Thu 4 Oct || CUFP, MM<br />
|-<br />
|Fri 5 Oct || '''Hac 2007 II''', Erlang, ML, PV<br />
|-<br />
|Sat 6 Oct || '''Hac 2007 II'''<br />
|-<br />
|Sun 7 Oct || '''Hac 2007 II'''<br />
|}<br />
<br />
The Hackathon will, ''tentatively'', be held from 10am to 6pm each day,<br />
with dinner after at local venues.<br />
<br />
== Facilities ==<br />
<br />
=== What to bring ===<br />
<br />
* A laptop<br />
* Wireless cards<br />
* Power adaptors if necessary<br />
* Ethernet cable<br />
* Mobile phone<br />
<br />
=== Before you arrive ===<br />
<br />
* Pick out a couple of projects to work on and familiarise yourself with them<br />
* Install an up to date Haskell toolchain (ghc-6.6.1 and if you like a recent snapshot of ghc-6.8.0 also).<br />
<br />
== Projects to work on ==<br />
<br />
Add ideas here for which you think hacking together as a group (rather<br />
than individually) would be beneficial.<br />
<br />
=== Group projects ===<br />
<br />
* Building tests that give 100% code coverage for package base.<br />
* Lots of Cabal hacking still to be done<br />
* Bindings for <your favourite C library><br />
* Haskell library for <your favourite task><br />
* Ensure hackage is ready for ghc 6.8<br />
<br />
=== Other things ===<br />
<br />
* Bit layer on Data.Binary 1.0<br />
* libxml<br />
* bytestring parsec<br />
* combine strictcheck and quickcheck once and for all<br />
* darcs hacking<br />
* aggressive inlining for mtl?<br />
* Data.ByteString.Sequence - a ropes-alike lib based on specialised finger trees<br />
* Data.ByteString.Rope, based on<br />
* [http://www.sgi.com/tech/stl/ropeimpl.html SGIs ropes] or [http://groups.google.com/group/fa.caml/browse_frm/thread/4e70beff0f714229/ new ocaml ropes]<br />
* bit parsing layer for Data.Binary and a network protocol demo?<br />
* dons: HPC coverage for bytestring 1.0<br />
* pretty printer-based ncurses interface<br />
* integrate darcs-piegraph and darcs-graph<br />
* improve the performance of DiffArray using modern techniques [http://www.lri.fr/~filliatr/ftp/ocaml/ds/parray.ml.html OCaml impl]. <br />
** vincenz: Note that even underneath the hood, the ocaml impl is using impurity to implement this (namely the modification of the array in Diff)<br />
* New [http://www.cse.unsw.edu.au/~dons/hs-plugins hs-plugins] on top of ghc-api. [[User:Conal|Conal]]<br />
* Fast general, pure-Haskell image synthesis (speed of [http://conal.net/Pan Pan] or [http://conal.net/Pajama Pajama] but via ghc). Use Harpy or a new hs-plugins. [[User:Conal|Conal]] <br />
* [http://tiddlywiki.com TiddlyWiki]-based code & documentation browser. Syntax-colored and all identifiers fully hyperlinked to sources. Thanks to TiddlyWiki, the browsing experience is fluid & self-organizing. [[User:Conal|Conal]]<br />
* Fix the Network.Socket API (at least to allow <code>setSocketOption x RecvTimeOut</code> and <code>SendTimeOut</code>)<br />
* Haskell WSGI (http://www.python.org/dev/peps/pep-0333/) equivalent with a reference server implementation.<br />
* [http://haskell.org/haskellwiki/UnicodeByteString UnicodeByteString] layer (<code>Text.UnicodeString</code> maybe).<br />
* ByteString network API.<br />
* ByteString simple HTTP<br />
* Library to allow Haskell to communicate with Erlang processes using the Erlang message protocol.<br />
* A better curses rss client than snownews: support ^L resize signal, and parallel feed downloading.<br />
* benl23: Optimize new graph colouring register allocator.<br />
* jutaro: Information extraction for a Haskell IDE (Types,Completion,Navigation)<br />
* ivant: fix [http://cryp.to/funcmp/ Functional MetaPost] (figure out the problems of using it from LaTeX, add definitions for using it from ConTeXt, etc.)<br />
* Possibility to turn logging on/off in lambdabot per channel<br />
* Continuous build system, via as simple, general dependency tracking & execution formulated as an [[applicative functor]] and using [[DataDriven]] computation. No "make" info required (since inferred by construction). Applies uniformly to recompiling, re-executing, installing, compiler-recompiling, GUI specification and execution, etc. For compilation, it can give more precise (efficient) recompilation than language-specific tools (e.g., <code>hmake</code> and <code>ghc --make</code>) without being language-specific. [[User:Conal|Conal]] 13:51, 1 October 2007 (UTC)<br />
<br />
== Organisers ==<br />
<br />
The organisers for the Hackathon are:<br />
<br />
* [http://progtools.comlab.ox.ac.uk/members/duncan Duncan Coutts]<br />
* [mailto:igloo@earth.li Ian Lynagh]<br />
* [http://www.cse.unsw.edu.au/~dons Don Stewart] <br />
<br />
The organisers can be contacted via: <br />
<br />
dons.hac07@cse.unsw.edu.au<br />
<br />
The local organisers in Freiburg:<br />
<br />
* [http://www.informatik.uni-freiburg.de/~wehr/ Stefan Wehr] <br />
* Phillip Heidegger<br />
<br />
Courtesy of the<br />
[http://proglang.informatik.uni-freiburg.de/ICFP2007/local-organizers.shtml Programming Languages Group] at the University of Freiburg.<br />
<br />
== IRC channel ==<br />
<br />
A Hackathon [[IRC channel]] has been set up. Visit:<br />
<br />
#haskell-hac07<br />
<br />
on Freenode.<br />
<br />
== Previous Haskell hackathons ==<br />
<br />
* [[Hac_2007|Hac 2007 - Oxford]]<br />
* [http://hackage.haskell.org/trac/ghc/wiki/Hackathon Hac 2006 - Portland]<br />
<br />
== Related events ==<br />
<br />
Hac 07 II is (unofficially) colocated with ICFP and other conferences:<br />
<br />
{|<br />
!<br />
!<br />
|-<br />
| [http://proglang.informatik.uni-freiburg.de/IFL2007/ IFL]<br />
| September 27-29<br />
|-<br />
| [http://www.cse.unsw.edu.au/~keller/haskellws/HaskellWorkshop.html Haskell Workshop]<br />
| September 30<br />
|-<br />
| [http://www.informatik.uni-bonn.de/~ralf/icfp07.html ICFP] <br />
| October 1-3<br />
|-<br />
| [http://cufp.galois.com/ CUFP] <br />
| October 4<br />
|-<br />
|}<br />
<br />
== Questions ==<br />
<br />
* AJG: What can Galois do to help?<br />
* If there's anything that Credit Suisse can do to support the Hackathon, please let me know - [mailto:howard.mansell@credit-suisse.com]<br />
<br />
== Misc ==<br />
<br />
The Freiburg background is [http://en.wikipedia.org/wiki/Image:Friburgo_-_Freiburg.jpg available] under the GNU Free Documentation License, from wikipedia.<br />
<br />
[[Category:Community]]<br />
[[Category:Events]]</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac_2007_II/Attendees&diff=16062Hac 2007 II/Attendees2007-10-06T11:29:09Z<p>Thorkilnaur: My nick</p>
<hr />
<div>[[Image:Hac-axe-icon.png|Hac icon]]<br />
<br />
== Projects ==<br />
<br />
See [[Hac_2007_II/Projects]].<br />
<br />
== Registrants ==<br />
<br />
If you've registered, do add your name to the following table:<br />
<br />
{| class="wikitable"<br />
! Name<br />
! Nick<br />
! Affiliiation<br />
! Provided tshirt size<br />
! Mobile #<br />
|-<br />
| [http://www.cse.unsw.edu.au/~dons Don Stewart]<br />
| dons<br />
| Galois<br />
| Yes<br />
|<br />
|-<br />
| Ian Lynagh<br />
| Igloo<br />
|<br />
| Yes<br />
|<br />
|-<br />
| Duncan Coutts<br />
| dcoutts<br />
| Oxford<br />
| Yes<br />
|<br />
|-<br />
| Lennart Kolmodin<br />
| kolmodin<br />
| Chalmers<br />
| Yes<br />
| +46736223606<br />
|-<br />
| Pepe Iborra<br />
| mnislaih<br />
| UPV<br />
| Yes<br />
|<br />
|-<br />
| Ben Lippmeier<br />
| benl23<br />
| ANU<br />
| Yes<br />
|<br />
|-<br />
| David Himmelstrup<br />
| Lemmih<br />
|<br />
| Yes<br />
|<br />
|- <br />
| [http://www.bringert.net/ Björn Bringert]<br />
| bringert<br />
| Chalmers <br />
| Yes<br />
| +46704779794<br />
|-<br />
| Tim Chevalier<br />
| Binkley<br />
| PSU<br />
| Yes<br />
|<br />
|-<br />
| Andy Gill<br />
| andyjgill<br />
| Galois<br />
| Yes<br />
|<br />
|-<br />
| Clemens Fruhwirth<br />
| therp<br />
| <br />
| Yes<br />
|<br />
|-<br />
| Thorkil Naur<br />
| thorkilnaur<br />
|<br />
| Yes<br />
|<br />
|-<br />
| Benedikt Schmidt<br />
| beschmi<br />
|<br />
| Yes<br />
|<br />
|-<br />
| Thomas Schilling<br />
| nominolo<br />
|<br />
| Yes<br />
|<br />
|-<br />
| Conal Elliott<br />
| conal<br />
|<br />
| Yes<br />
|<br />
|-<br />
| Russell O'Connor<br />
| roconnor<br />
|<br />
| Yes<br />
| +31625178046<br />
|-<br />
| Ganesh Sittampalam<br />
| Heffalump<br />
| Credit Suisse<br />
| Yes<br />
|<br />
|-<br />
| Jürgen Nicklisch<br />
| Jutaro<br />
|<br />
| Yes<br />
|<br />
|-<br />
| Ivan Tarasov<br />
| ivant<br />
|<br />
| Yes<br />
|<br />
|-<br />
| Johan Tibell<br />
| tibbe<br />
|<br />
| Yes<br />
|<br />
|-<br />
| Clifford Beshers<br />
| thetallguy<br />
|<br />
| Yes<br />
|<br />
|-<br />
| David Fox<br />
| dsf<br />
| <br />
| Yes<br />
|<br />
|-<br />
| [http://www.esat.kuleuven.ac.be/~cpoucet Christophe Poucet]<br />
| vincenz<br />
| IMEC<br />
| Yes<br />
|<br />
|-<br />
| Matthias Neubauer<br />
| heckenpenner<br />
| Freiburg<br />
| Yes<br />
|<br />
|-<br />
| Stefan Wehr<br />
| <br />
| Freiburg<br />
| Yes<br />
|<br />
|-<br />
| [http://www.randomhacks.net/ Eric Kidd]<br />
| ekidd<br />
| Dartmouth<br />
| Yes<br />
| 15776874941<br />
|-<br />
| Marcus Uneson<br />
| muneson<br />
| <br />
| Yes<br />
|<br />
|-<br />
| Conrad Barski<br />
| drcode<br />
| <br />
| Yes<br />
| [http://lisperati.com/haskell/ My Brand New Haskell Tutorial :-)]<br />
|-<br />
| Joachim Breitner<br />
| nomeata<br />
| <br />
| Yes<br />
|<br />
|}<br />
<br />
== Arriving ==<br />
<br />
===Train===<br />
<br />
* Igloo: 29 Sep at 21:00, Freiburg Hbf.<br />
* Lemmih: 29 Sep at 18:00, Freiburg Hbf.<br />
* Jutaro: 29 Sep at 23:09, Freiburg Hbf.<br />
* ivant: 30 Sep, at 8:00, from Vienna<br />
* tibbe: 5 Oct, at 8:00, from Zurich<br />
* vincenz: 4 Oct, At 23-24, Freiburg Hbf.<br />
* roconnor: 4 Oct, at 21:00, Freiburg Hbf.<br />
<br />
===Air===<br />
<br />
* Andy Gill, 29 Sep Frankfurt<br />
* Don Stewart, 29 Sep 8.35 am, Frankfurt<br />
* Thomas Schilling, 29 Sep Frankfurt Main<br />
* Conal Elliott, 25 Sep 11:10 am, Frankfurt<br />
* Ganesh Sittampalam, 29 Sep 2:50 pm, Zurich<br />
* Pepe Iborra, 29 Sep 8:40 pm, Frankfurt Hahn (HHN)<br />
* Lennart Kolmodin, 29 Sep, 12:05, Frankfurt<br />
* Björn Bringert, 04 Oct 18:55, Frankfurt (train to Freiburg dep 19.54, arr 22:15)<br />
<br />
== Accomodation ==<br />
<br />
A number of accommodation options are available. To organize to share,<br />
contact other attendees on irc or via email. <br />
<br />
=== Black Forest Hostel ===<br />
<br />
Some people are staying at the hostel: http://www.blackforest-hostel.de/<br />
<br />
* Igloo, Lemmih, nominolo: 29 Sep - 8 Oct<br />
* conal: same, in a 6-bed dorm room, 25 Sep - 8 Oct<br />
* ivant: same, 30 Sep - 8 Oct<br />
* tibbe: 6-bed dorm room, 5 Oct - 7 Oct<br />
* mnislaih: same<br />
* dcoutts, kolmodin: 6-bed dorm room, 29 Sep - 8 Oct<br />
* drcode<br />
* roconnor: dorm room, 4 Oct - 8 Oct (still to be confirmed)<br />
<br />
We will be meeting at 9am at the entrance of the Black Forest Hostel to go to the Hackathon venue.<br />
<br />
=== Best Western ===<br />
<br />
* dons, andy: Best Western<br />
<br />
=== InterCityHotel ===<br />
<br />
http://www.booking.com/hotel/de/intercityhotelfreiburg.html<br />
<br />
* bringert, vincenz: 04 Oct - 07 Oct<br />
<br />
=== Paradies ===<br />
<br />
* jutaro: 01 Oct - 07 Oct</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac_2007_II/Projects&diff=16061Hac 2007 II/Projects2007-10-06T11:26:57Z<p>Thorkilnaur: HPC coverage recording in the GHC testsuite</p>
<hr />
<div>= Generic Information =<br />
<br />
You can apply for an account and a project using<br />
[http://community.haskell.org/admin/ the community server]. Ping Igloo on #haskell-hac07 and he'll create the account. You can also apply for a project.<br />
<br />
Once you have an account and a project, you upload a Darcs repository as follows. First, initialize your repository on the server:<br />
<br />
$ ssh community.haskell.org<br />
you@haskell:~$ cd /srv/code/yourproject<br />
you@haskell:/srv/code/yourproject$ darcs init<br />
<br />
Then, log out and push your repository:<br />
<br />
$ darcs push community.haskell.org:/srv/code/yourproject<br />
<br />
= Who knows about what =<br />
<br />
A list of projects you've worked on or know fairly well:<br />
<br />
{| class="wikitable"<br />
! Name<br />
! Projects<br />
|-<br />
| dons<br />
| ByteString, xmonad, Data.Binary, lambdabot, hmp3, curses, QuickCheck, HPC, hs-plugins, yi, nobench/nofib, ghc<br />
|-<br />
| Binkley<br />
| ghc, darcs (a little bit)<br />
|-<br />
| skogsbaer (Stefan Wehr)<br />
| hscurses, rhaskell<br />
|-<br />
| Pepe<br />
| ghc (front end mostly), ghci debugger, cabal-install (very little)<br />
|-<br />
| ivant<br />
| Functional MetaPost, xmonad<br />
|-<br />
| kolmodin (Lennart Kolmodin)<br />
| Data.Binary, Gentoo Linux, Haste (Haskell Turbo-Edit,a Haskell IDE in Haskell), hackport (hackage for Gentoo), hinotify, dbus-haskell <br />
|-<br />
| Heffalump (Ganesh Sittampalam)<br />
| darcs patch theory<br />
|-<br />
| [[User:Conal|conal]] (Conal Elliott)<br />
| functional reactive programming, [[DataDriven]] evaluation, tangible functional programming, graphics, embedded compilers, applicative functors, wxHaskell<br />
|}<br />
<br />
= Active Projects =<br />
Please feel free to describe your current project here!<br />
<br />
== Cabal ==<br />
<br />
== ByteString network ==<br />
<br />
Change Network.* to use strict ByteStrings instead of Strings. It would also be nice to tidy up the #ifdef mess.<br />
<br />
Current hacker(s): tibbe (Johan Tibell)<br />
<br />
== Data.Binary ==<br />
<br />
updating to 6.8, adding smp parallel testsuite driver.<br />
<br />
Current hackers: dons<br />
<br />
== xmonad ==<br />
<br />
Testing, HPC coverage, code polishing., new layouts<br />
<br />
Current hackers: dons, ganesh, conrad, nomeata, tibbe<br />
<br />
== Probability monads ==<br />
<br />
A really cool existing implementation: [http://web.engr.oregonstate.edu/~erwig/pfp/ Probabilistic functional programming]<br />
<br />
[http://www.randomhacks.net/articles/2007/10/02/probability-monads-at-hac-07-ii Darcs repository and draft paper].<br />
<br />
Things to work on:<br />
<br />
# Get MaybeT into Hackage.<br />
# Is WriterT really the right monad transformer? We want the join and bind operations, but not the rest of the MonadWriter type class.<br />
# Should probabilities be represented as floats, fractions or a type class?<br />
# Can this run fast enough to be useful?<br />
<br />
Done:<br />
<br />
# [http://www.randomhacks.net/tmp/MaybeT/Control-Monad-Maybe.html MaybeT docs] and [http://code.haskell.org/maybet/ Darcs repository]. This should have all the features of [[New_monads/MaybeT]], except for the potentially ambiguous MonadPlus instance.<br />
# [http://code.haskell.org/monadrandom/ MonadRandom] is now documented and packaged.<br />
# The [http://www.randomhacks.net/darcs/probability/ Probability] library:<br />
#* Now builds using external MaybeT and MonadRandom.<br />
<br />
Current hacker(s): ekidd (Eric Kidd)<br />
<br />
== Yi hacking ==<br />
<br />
Yi needs a lot of love and doesn't work out of the box for me. One of the nice thing to try to do is to add the collaborative editing plugin to yi (in the spirit of the [http://gobby.0x539.de/trac/ Gobby editor]).<br />
* vincenz: Definitely would like to add some usability input here regarding Gobby functionality (having used it and having found it lacking in several areas, areas that could be improved through reusing some darcs theory).<br />
* ivant: also need to add unicode support to yi<br />
* vincenz: Move away from System.Filepath to something std supported<br />
* Cabalize the current 'Setup.hs' *Cabal hackers welcome for help*<br />
* Update the regex dependencies to work with the newest one.<br />
* Work splatch into Yi<br />
<br />
Current hacker(s): ivant (Ivan Tarasov), vincenz (Christophe Poucet)<br />
<br />
== Splatch ==<br />
Patching of splices, or otherwise said, a patch-model for working concurrently on one piece of text.<br />
<br />
Current hacker(s): ivant (Ivan Tarasov), vincenz (Christophe Poucet)<br />
<br />
== Tangible functional programming ==<br />
<br />
Some to-do items:<br />
* More built-ins<br />
* Save<br />
* Improved user experience for gestural composition, e.g., drag & drop<br />
* Does it work on MacOS? Linux?<br />
* Sum types<br />
* Code generation via hs-plugins or ghc-api or Harpy.<br />
<br />
Current hacker(s): [[User:Conal|conal]]<br />
<br />
== General composition tools ==<br />
<br />
=== Type composition & related ===<br />
<br />
[[TypeCompose]]: some classes & instances for forms of type composition (including contravariant functors and applicative functors)<br />
<br />
Current hacker(s): [[User:Conal|conal]]<br />
<br />
=== Deep arrows ===<br />
<br />
[[DeepArrow]]: a framework for composable "editors" of pure values<br />
<br />
Current hacker(s): [[User:Conal|conal]]<br />
<br />
== Source browsing ==<br />
<br />
[http://tiddlywiki.com TiddlyWiki]-based code & documentation browser. Syntax-colored and all identifiers fully hyperlinked to sources. Thanks to TiddlyWiki, the browsing experience is fluid & self-organizing.<br />
<br />
Bring together disparate functionality from HsColour & Haddock, and add auto-generated hyperlinking. Apply to all the code on Hackage.<br />
<br />
Current hacker(s): [[User:Conal|conal]]<br />
<br />
== Graphics ==<br />
<br />
Fast general, pure-Haskell image synthesis (speed of [http://conal.net/Pan Pan] or [http://conal.net/Pajama Pajama] but via ghc). Use Harpy or a new hs-plugins.<br />
<br />
Current hacker(s): [[User:Conal|conal]]<br />
<br />
== General dependency tracking & updating ==<br />
<br />
Simple, general dependency tracking & execution formulated as an [[applicative functor]] and using [[DataDriven]] computation. Applies uniformly to recompiling, re-executing, installing, compiler-recompiling, GUI specification and execution, etc. For compilation, it can give more precise (efficient) recompilation than language-specific tools (e.g., <code>hmake</code> and <code>ghc --make</code>) without being language-specific. Yields a continuous build system for free. No "make" info required (since inferred by construction). (Nontrivial language changes/improvements may be necessary.)<br />
<br />
Current hacker(s): [[User:Conal|conal]]<br />
<br />
== Backtraces in the GHCi debugger ==<br />
<br />
This has turned out to be really complicated, so look at [http://hackage.haskell.org/trac/ghc/wiki/LightweightCCSCallStack here] for the details. Sadly, Alexey stays only for the first day.<br />
<br />
Current hackers: pepe, Alexey<br />
<br />
== Coverage recording in the GHC testsuite ==<br />
<br />
We would like HPC coverage recording to be performed as a possible part of running the tests in the GHC testsuite. Code targeted by this could be the compiler code itself, the runtime system, the library code of a tested library, and the test code.<br />
<br />
Current hackers: thorkilnaur</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac_2007_II&diff=14318Hac 2007 II2007-07-14T11:23:22Z<p>Thorkilnaur: Added myself</p>
<hr />
<div>[[Image:Hac-axe-icon.png|Hac icon]]<br />
<br />
Please add yourself to this list if you are potentially interested in<br />
being part of a Hackathon colocated with<br />
[http://www.cse.unsw.edu.au/~keller/haskellws/HaskellWorkshop.html Haskell Workshop] and<br />
[http://www.informatik.uni-bonn.de/~ralf/icfp07.html ICFP] 2007 (i.e. in<br />
Freiburg, Germany, around the end of September/beginning of October).<br />
<br />
Note that it is not necessary to register for ICFP, or any of the associated conferences, if you only want to go to the Hackathon. The Hackathon itself will be free, but you will obviously have to pay for travel, accommodation, food, etc.<br />
<br />
* Ian Lynagh (Igloo)<br />
* Duncan Coutts (dcoutts)<br />
* Malcolm Wallace (malcolmw)<br />
* Don Stewart (dons)<br />
* Lennart Kolmodin (kolmodin)<br />
* Pepe Iborra (mnislaih)<br />
* Simon Marlow (JaffaCake)<br />
* Ben Lippmeier (benl23)<br />
* David Himmelstrup (Lemmih)<br />
* Björn Bringert (bringert)<br />
* David Waern (waern)<br />
* Rickard Nilsson (ricky)<br />
* Tim Chevalier (Binkley) (not sure yet)<br />
* Neil Mitchell (ndm) - I'll be at IFL, but may be able to meet up for a bit of hacking<br />
* Andy Gill (andyjgill)<br />
* Clemens Fruhwirth (therp)<br />
* Thorkil Naur (thorkilnaur)<br />
<br />
== Dates ==<br />
<br />
Hac 2007 II will take place on Fri 5 Oct to Sun 7 Oct.<br />
<br />
{| class="wikitable"<br />
|-<br />
|Date || Events<br />
|-<br />
|Thu 27 Sep || IFL<br />
|-<br />
|Fri 28 Sep || IFL<br />
|-<br />
|Sat 29 Sep || IFL<br />
|-<br />
|Sun 30 Sep || HW, Scheme<br />
|-<br />
|Mon 1 Oct || ICFP<br />
|-<br />
|Tue 2 Oct || ICFP<br />
|-<br />
|Wed 3 Oct || ICFP<br />
|-<br />
|Thu 4 Oct || CUFP, MM<br />
|-<br />
|Fri 5 Oct || '''Hac 2007 II''', Erlang, ML, PV<br />
|-<br />
|Sat 6 Oct || '''Hac 2007 II'''<br />
|-<br />
|Sun 7 Oct || '''Hac 2007 II'''<br />
|}<br />
<br />
== Location ==<br />
<br />
The Hackathon will be integrated with the university [http://sommercampus2007.informatik.uni-freiburg.de/WikiAbstract summer campus].<br />
<br />
This will give us all the infrastructure (room, Internet, etc) at minimal hassle.<br />
<br />
For local information (travel, accommodation etc) see the [http://proglang.informatik.uni-freiburg.de/ICFP2007/ ICFP local info page].<br />
<br />
== Potential topics for a group hack ==<br />
<br />
Add ideas here for which you think hacking together as a group (rather than individually) would be beneficial.<br />
<br />
* Building tests that give 100% code coverage for package base.<br />
* Lots of Cabal hacking still to be done<br />
* Bindings for <your favourite C library><br />
* Haskell library for <your favourite task><br />
<br />
Other things:<br />
<br />
* bytestring 1.0<br />
* bit layer on Data.Binary 1.0<br />
* Data.ByteString.Parallel<br />
* libxml<br />
* bytestring parsec<br />
* combine strictcheck and quickcheck once and for all<br />
* darcs hacking<br />
<br />
== Previous Haskell hackathons ==<br />
<br />
* [[Hac_2007|Hac 2007 - Oxford]]<br />
* [http://hackage.haskell.org/trac/ghc/wiki/Hackathon Hac 2006 - Portland]<br />
<br />
== Questions ==<br />
<br />
* AJG: Who is the overall organizer, who is the local organizer?<br />
* AJG: What can Galois do to help?<br />
<br />
[[Category:Community]]<br />
[[Category:Events]]</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Haskell_Cafe_migration&diff=14315Haskell Cafe migration2007-07-14T10:36:14Z<p>Thorkilnaur: Add myself and reorder slightly</p>
<hr />
<div>Often people post wonderful material to the mailing lists, hpaste.org or<br />
on #haskell. This can later be hard to find. The goal of this page is to<br />
collect a list of people who are happy for their contributions to the<br />
Haskell community, in any media, to be added directly to the Haskell wiki.<br />
<br />
If you are happy for your contributions (both new and old posts) on <br />
''any media that are part of the Haskell community'', including:<br />
<br />
* [[Mailing_lists|The mailing lists]] (haskell-cafe@, libraries@ and others)<br />
* [[IRC_channel|The IRC channel]]<br />
* [http://hpaste.org/ The Haskell Paste Bin]: hpaste.org<br />
* [[HaWiki_migration|The Old Haskell Wiki]]<br />
* And the new wiki.<br />
<br />
that ''are not specifically licensed'' to be treated as having been<br />
released under a [[HaskellWiki:Copyrights|Simple Permissive License]].<br />
please add your name to this list, so that others may move your<br />
contributions around haskell.org without fear.<br />
<br />
''Contributions will be licensed specifically under a<br />
[[HaskellWiki:Copyrights|Simple Permissive License]]''.<br />
<br />
* Brandon Allbery<br />
* Cale Gibbard<br />
* Chris Smith<br />
* Conor McBride<br />
* Conrad Parker<br />
* Dan Doel<br />
* Derek Elkins<br />
* Dominic Steinitz<br />
* Don Stewart<br />
* Eric Kow (kowey)<br />
* Jonathan Cast<br />
* Neil Mitchell (ndm)<br />
* Samuel Bronson (SamB)<br />
* Stefan O'Rear<br />
* Thorkil Naur<br />
* Tim Chevalier (aka Kirsten)<br />
* Tom Conway<br />
<br />
<br />
[[Category:Community]]</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=GHC/FAQ&diff=11420GHC/FAQ2007-02-19T18:31:29Z<p>Thorkilnaur: More LDBLStub things</p>
<hr />
<div>[[Category:GHC]] [[Category:FAQ]]<br />
Please feel free to add stuff here.<br />
<br />
This page is rather long. We've started to add some sub-headings, but would welcome your help in making it better organised.<br />
<br />
= GHC on particular platforms =<br />
<br />
== How do I port GHC to platform X? ==<br />
<br />
There are two distinct possibilities: either<br />
<br />
* The hardware architecture for your system is already supported by GHC, but you're running an OS that isn't supported (or perhaps has been supported in the past, but currently isn't). This is the easiest type of porting job, but it still requires some careful bootstrapping.<br />
<br />
* Your system's hardware architecture isn't supported by GHC. This will be a more difficult port (though by comparison perhaps not as difficult as porting gcc).<br />
<br />
Both ways require you to bootstrap from intermediate HC files: these are the stylised C files generated by GHC when it compiles Haskell source. Basically the idea is to take the HC files for GHC itself to the target machine and compile them with gcc to get a working GHC, and go from there.<br />
<br />
The [http://www.haskell.org/ghc/docs/latest/html/building Building Guide] has all the details on how to bootstrap GHC on a new platform.<br />
<br />
<br />
== GHC on Linux ==<br />
<br />
=== I Can't run GHCi on Linux, because it complains about a missing <tt>libreadline.so.3</tt>. ===<br />
<br />
The "correct" fix for this problem is to install the correct RPM for the particular flavour of Linux on your machine. If this isn't an option, however, there is a hack that might work: make a symbolic link from <tt>libreadline.so.4</tt> to <tt>libreadline.so.3</tt> in <tt>/usr/lib</tt>. We tried this on a SuSE 7.1 box and it seemed to work, but YMMV.<br />
<br />
=== Linking a program causes the following error on Linux: <tt>/usr/bin/ld: cannot open -lgmp: No such file or directory</tt> ===<br />
<br />
The problem is that your system doesn't have the GMP library installed. If this is a RedHat distribution, install the RedHat-supplied gmp-devel package, and the gmp package if you don't already have it. There have been reports that installing the RedHat packages also works for SuSE (SuSE doesn't supply a shared gmp library).<br />
<br />
=== GHC and SELinux ===<br />
<br />
If you have SELinux enabled on your system, then GHC may fail with a memory allocation error:<br />
<br />
ghc-6.4.1: internal error: mallocBytesRWX: failed to protect 0x0x1660730<br />
<br />
or maybe<br />
<br />
ghc: internal error: getMBlock: mmap: Permission denied <br />
<br />
The reason for this is that SELinux prevents allocation of writeable/executable memory regions, which GHC needs in order to implement certain parts of the FFI that require dynamic code generation. (See [http://hackage.haskell.org/trac/ghc/ticket/738 this bug report]).<br />
<br />
In GHC 6.4.2 we improved the situation somewhat, but not completely.<br />
<br />
Workarounds:<br />
<br />
* Set <tt>allow_execmem</tt> to 0, with the <tt>setsebool</tt> command.<br />
* do this on a per-program basis, for GHC and GHC-compiled programs. Apparently this is done by:<br />
<br />
<tt>/usr/bin/chcon -t unconfined_execmem_exec_t /path/to/binary/prog</tt><br />
<br />
== GHC on Solaris ==<br />
=== Solaris users may sometimes get link errors due to libraries needed by GNU Readline. ===<br />
<br />
We suggest you try linking in some combination of the termcap, curses and ncurses libraries, by giving <tt>-ltermcap</tt>, <tt>-lcurses</tt> and <tt>-lncurses</tt> respectively. If you encounter this problem, we would appreciate feedback on it, since we don't fully understand what's going on here.<br />
The build fails in readline.<br />
<br />
It has been reported that if you have multiple versions of the readline library installed on Linux, then this may cause the build to fail. If you have multiple versions of readline, try uninstalling all except the most recent version.<br />
<br />
== GHC on Windows ==<br />
=== My program that uses a really large heap crashes on Windows. ===<br />
<br />
For utterly horrible reasons, programs that use more than 128Mb of heap won't work when compiled dynamically on Windows (they should be fine statically compiled).<br />
<br />
=== I can't use readline under GHCi on Windows ===<br />
<br />
In order to load the readline package under GHCi on Windows, you need to make a version of the readline library that GHCi can load. Instructions for GHC 6.2.2. are here.<br />
<br />
=== Ctrl-C doesn't work on Windows ===<br />
<br />
When running GHC under a Cygwin shell on Windows, Ctrl-C sometimes doesn't work. A workaround is to use Ctrl-Break instead. Another workaround is to use the rlwrap program (cygwin package available) to invoke ghci : In addition to proper Ctrl-C, you also get emacs (or vi) key bindings and command history across sessions. <br />
<br />
=== How do I link Haskell with C++ code compiled by Visual Studio? ===<br />
<br />
==== Prerequisites ====<br />
<br />
It is assumed that the reader is familiar with the Haskell <br />
[http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi.html Foreign function interface (FFI)],<br />
and is able to compile Haskell programs with GHC and C++ programs with Visual Studio.<br />
<br />
==== Background ====<br />
<br />
GHC has two modes of code generation. It either compiles Haskell straight into object code<br />
(native mode), or translates Haskell into intermediate C code, and uses a C compiler as backend.<br />
<br />
The Windows distribution of GHC comes bundled with the GCC compiler, which is used as backend.<br />
That's why linking Haskell with Visual C++ is no different from linking GCC-generated code with<br />
the code generated by Visual C++.<br />
<br />
One cannot statically link together object files produced by those two compilers,<br />
but they can be linked dynamically: an executable produced by Visual C++ can invoke a DLL<br />
produced by GCC, and vice versa. Likewise, we can link Haskell with Visual C++ in one of these ways.<br />
<br />
''Note:'' when Haskell becomes able to use Visual C++ as a backend (see [http://hackage.haskell.org/trac/ghc/ticket/989]), we would not need to go via a DLL anymore. Instead, we would simply list<br />
all source files (Haskell and C++) on the command line of GHC.<br />
<br />
==== Invoking a Haskell DLL from a C++ executable ====<br />
<br />
#Make a Haskell DLL as explained in [http://www.haskell.org/ghc/docs/latest/html/users_guide/win32-dlls.html#win32-dlls-foreign]<br />
#Make a module definition file, such as<tt><br>LIBRARY Adder<br>EXPORTS<br>&nbsp;&nbsp;&nbsp;&nbsp;adder</tt><br />
#Create an import library using Visual Studio's <tt>lib.exe:<br>lib /DEF:adder.def /OUT:adder.lib</tt><br />
#Link the C++ program against the import library.<br />
<br />
==== Invoking a C++ DLL from a Haskell executable ====<br />
<br />
#Make a DLL project in Visual Studio. It will create a <tt>.vcproj</tt> and <tt>.sln</tt> files for you. Add your C++ source files to this project. <br />
#Create a <tt>.def</tt> file for your DLL. It might look like<tt><br>LIBRARY MyDLL<br>EXPORTS<br>&nbsp;&nbsp;&nbsp;&nbsp;function1<br>&nbsp;&nbsp;&nbsp;&nbsp;function2<br></tt> where <tt>function1</tt> and <tt>function2</tt> are the names of the C++ functions that you want to invoke from Haskell (there can be more of them, of course), <tt>MyDLL</tt> is the name of your DLL.<br />
#Create an import library that can be used by <tt>ghc:<br>dlltool -d MyDLL.def -l libMyDLL.a</tt> <br />
#Link your Haskell project, adding the library:<tt><br>ghc --make main.hs -optl-lMyDLL -optl-L.<br></tt>''mind the dot at the end of the command line!''<br> (<tt>[http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#forcing-options-through -optl]</tt> switch passes its argument as an option to the linker).<br />
<br />
== Why isn't GHC available for .NET? ==<br />
<br />
<br />
It would make a lot of sense to give GHC a .NET back end, and it's a<br />
question that comes up regularly. The reason that we haven't done it<br />
here, at GHC HQ, is because it's a more substantial undertaking than<br />
might at first appear (see below). Furthermore, it'd permanently add a<br />
complete new back-end platform for us to maintain. Given our rather<br />
limited development effort, we have so far not bitten<br />
the bullet, and we have no immediate plans to do so.<br />
<br />
It would be a good, well-defined project for someone else to tackle, and<br />
we would love to see it done. There is some good groundwork already done:<br />
<br />
* Sigbjorn Finne did a simple interop implementation that allows a Haskell program to be compiled to native code (as now) but to call .NET programs via a variant of the FFI. I don't think this work is in active use, and I'd be surprised if it worked out of the box, but it could probably be revived with modest effort<br />
<br />
* Andre Santos and his colleagues at UFPE in Brazil are working on a .NET back end, that generates CLR IL, though I don't know where they are up to.<br />
<br />
* Nigel Perry and Oliver Hunt have a Haskell.NET prototype that works using GHC to compile to Core, and then compiling Core to NET. I'm not sure what stage it is at.<br />
<br />
* GHC.Net would be extra attractive if there was a Visual Studio integration for GHC. Substantial progress on this has been made in 2004 by Simon Marlow, Krasimir Angelov, and Andre Santos and colleagues.<br />
<br />
There may be others that I don't know of. If anyone wants to join in<br />
this effort, do contact the above folk. And please keep us informed!<br />
<br />
Here's a summary of why it's a non-trivial thing to do:<br />
<br />
* The first thing is to generate native CLR Intermediate Language (IL). That's not really hard. Requires thinking about representations for thunks and functions, and it may not be particularly efficient, but it can surely be done. An open question is about whether to generate verifiable IL or not. The trouble here is that Haskell's type system is more expressive than the CLR's in some ways, notably the use of higher-kinded type variables. So, to generate verifiable IL one is bound to need some run-time casts, and it's not clear how to minimise these.<br />
<br />
At first blush this is *all* you need do. But it isn't!<br />
<br />
* Next, you need to think about how to inter-operate with .NET libraries. You don't really want to write "foreign import..." for each and every import. You'd like GHC to read the CLR meta-data directly. But there are lots of tricky issues here; see the paper that Mark Shields and I wrote about "Object-oriented style overloading for Haskell".<br />
<br />
* Now you need to figure out how to implement GHC's primitive operations:<br />
* the I/O monad<br />
* arbitrary precision arithmetic<br />
* concurrency<br />
* exceptions<br />
* finalisers<br />
* stable pointers<br />
* [[Software transactional memory]]<br />
<br />
Not all of these are necessary, of course, but many are used in the libraries. The CLR supports many of them (e.g. concurrency) but with a very different cost model.<br />
<br />
* Last, you have to figure out what to do for the libraries. GHC has a pretty large library, and you either have to implement the primops on which the library is based (see previous point), or re-implement it. For example, GHC's implementation of I/O uses mutable state, concurrency, and more besides. For each module, you need to decide either to re-implement it using .NET primitives, or to implement the stuff the module is based on.<br />
<br />
These challenges are mostly broad rather than deep. But to get a<br />
production quality implementation that runs a substantial majority of<br />
Haskell programs "out of the box" requires a decent stab at all of them.<br />
<br />
== GHC on Mac OS X ==<br />
<br />
=== Linking with ghc produces <tt>ld: Undefined symbols: _sprintf$LDBLStub ...</tt> ===<br />
<br />
This happens on a PowerPC Mac OS X 10.4 if gcc-3.3 is the default compiler and you try to compile with a ghc that has been built with gcc-4.0. For example:<br />
<br />
$ cat t2.hs <br />
module Main where<br />
main = putStr ("t2: Hello trac 1066 2007-Feb-17 19.48\n")<br />
$ gcc --version<br />
gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1819)<br />
...<br />
$ ghc --make t2.hs<br />
[1 of 1] Compiling Main ( t2.hs, t2.o )<br />
Linking t2 ...<br />
ld: Undefined symbols:<br />
_sprintf$LDBLStub<br />
_fprintf$LDBLStub<br />
_vfprintf$LDBLStub<br />
_sscanf$LDBLStub<br />
$ <br />
<br />
To correct this, set the default compiler to gcc-4.0 (<tt>sudo gcc_select 4.0</tt>) or include linking options <tt>-lHSrts -lSystemStubs</tt> in that order on the ghc command:<br />
<br />
$ ghc --make t2.hs -lHSrts -lSystemStubs<br />
[1 of 1] Skipping Main ( t2.hs, t2.o )<br />
Linking t2 ...<br />
$ <br />
<br />
The command<br />
<br />
for l in <ghc installation directory>/lib/ghc-<ghc version>/*.a; do nm $l 2>&1 | if grep LDBLStub 1>/dev/null; then echo $l; fi; done<br />
<br />
prints the list of libraries that may be needed instead of or in addition to <tt>-lHSrts</tt> before <tt>-lSystemStubs</tt> on the ghc command. For example:<br />
<br />
$ for l in /Users/thorkilnaur/tn/install/ghc-HEAD-for-1066-20070211_1657/lib/ghc-6.7.20070209/*.a; do nm $l 2>&1 | if grep LDBLStub 1>/dev/null; then echo $l; fi; done<br />
/Users/thorkilnaur/tn/install/ghc-HEAD-for-1066-20070211_1657/lib/ghc-6.7.20070209/libHSX11_cbits.a<br />
/Users/thorkilnaur/tn/install/ghc-HEAD-for-1066-20070211_1657/lib/ghc-6.7.20070209/libHSrts.a<br />
/Users/thorkilnaur/tn/install/ghc-HEAD-for-1066-20070211_1657/lib/ghc-6.7.20070209/libHSrts_debug.a<br />
/Users/thorkilnaur/tn/install/ghc-HEAD-for-1066-20070211_1657/lib/ghc-6.7.20070209/libHSrts_p.a<br />
/Users/thorkilnaur/tn/install/ghc-HEAD-for-1066-20070211_1657/lib/ghc-6.7.20070209/libHSrts_thr.a<br />
/Users/thorkilnaur/tn/install/ghc-HEAD-for-1066-20070211_1657/lib/ghc-6.7.20070209/libHSrts_thr_debug.a<br />
/Users/thorkilnaur/tn/install/ghc-HEAD-for-1066-20070211_1657/lib/ghc-6.7.20070209/libHSrts_thr_p.a<br />
$ <br />
<br />
[http://hackage.haskell.org/trac/ghc/ticket/1066] has additional details.<br />
<br />
---------------------------------------<br />
= Running GHC =<br />
<br />
== GHC doesn't like filenames containing +. ==<br />
<br />
Indeed not. You could change <tt>+</tt> to <tt>p</tt> or <tt>plus</tt>.<br />
<br />
== Why does linking take so long? ==<br />
<br />
Linking a small program should take no more than a few seconds. Larger programs can take longer, but even linking GHC itself only takes 3-4 seconds on our development machines.<br />
<br />
Long link times have been attributed to using Sun's linker on Solaris, as compared to GNU ld which appears to be much faster. So if you're on a Sun box, try switching to GNU ld. [http://www.haskell.org/pipermail/glasgow-haskell-users/2002-November/004477.html This article] from the mailing list has more information.<br />
<br />
== Why do I get errors about missing include files when compiling with -O or -prof? ==<br />
<br />
Certain options, such as -O, turn on via-C compilation, instead of using the native code generator. Include files named by -#include options or in foreign import declarations are only used in via-C compilation mode. See [http://www.haskell.org/ghc/docs/latest/html/users_guide/sec-ffi-ghc.html#finding-header-files Section 8.2.2.1, ´Finding Header files¡] for more details.<br />
<br />
== How do I compile my program for profiling without overwriting the object files and hi files I've already built? ==<br />
<br />
You can select alternative suffixes for object files and interface files, so you can have several builds of the same code coexisting in the same directory. For example, to compile with profiling, you might do this:<br />
<br />
<pre><br />
ghc --make -prof -o foo-prof -osuf p.o -hisuf p.hi Main<br />
</pre><br />
<br />
See [http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#options-output Section 4.6.4, ´Redirecting the compilation output(s)¡] for more details on the <tt>-osuf</tt> and <tt>-hisuf</tt> options.<br />
<br />
---------------------------------------<br />
= Syntax =<br />
<br />
== I can't get string gaps to work ==<br />
<br />
If you're also using CPP, beware of the known pitfall with string gaps mentioned in [http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#cpp-string-gaps Section 4.10.3.1, CPP and string gaps¡].<br />
<br />
---------------------------------------<br />
= GHCi =<br />
<br />
== GHCi complains about missing symbols like CC_LIST when loading a previously compiled .o file. ==<br />
<br />
This probably means the .o files in question were compiled for profiling (with -prof). Workaround: recompile them without profiling. We really ought to detect this situation and give a proper error message.<br />
<br />
== When I try to start ghci (probably one I compiled myself) it says <tt>ghc-5.02: not built for interactive use</tt> ==<br />
<br />
To build a working ghci, you need to build GHC 5.02 with itself; the above message appears if you build it with 4.08.X, for example. It'll still work fine for batch-mode compilation, though. Note that you really must build with exactly the same version of the compiler. Building 5.02 with 5.00.2, for example, may or may not give a working interactive system; it probably won't, and certainly isn't supported. Note also that you can build 5.02 with any older compiler, back to 4.08.1, if you don't want a working interactive system; that's OK, and supported.<br />
<br />
== I get an error message from GHCi about a "<tt>duplicate definition for symbol __module_registered</tt>" ==<br />
<br />
An error message like this:<br />
<br />
<pre><br />
GHCi runtime linker: fatal error: I found a duplicate definition for symbol<br />
__module_registered<br />
whilst processing object file<br />
/usr/local/lib/ghc-6.2/HSfgl.o<br />
</pre><br />
<br />
probably indicates that when building a library for GHCi (<tt>HSfgl.o</tt> in the above example), you should use the <tt>-x</tt> option to <tt>ld</tt>.<br />
<br />
---------------------------------------<br />
= The Foreign Function Interface =<br />
<br />
== When do other Haskell threads get blocked by an FFI call? ==<br />
<br />
{| border="1" align="center"<br />
|<br />
! safe<br />
! unsafe<br />
|-<br />
! -threaded<br />
| NO <br />
| YES<br />
|-<br />
! no -threaded<br />
| YES<br />
| YES<br />
|}<br />
<br />
The <tt>-threaded</tt> flag (given when linking; see the <br />
[http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html manual])<br />
allows other Haskell threads to run concurrently with a thread making an FFI call.<br />
This nice behaviour does not happen for foreign calls marked as `unsafe` (see<br />
the [http://www.cse.unsw.edu.au/~chak/haskell/ffi/ FFI Addendum]).<br />
<br />
There used to be another modifier, <tt>threadsafe</tt>, which is now deprecated. Use `safe` instead.<br />
<br />
== When I use a foreign function that takes or returns a float, it gives the wrong answer, or crashes. ==<br />
<br />
You should use the <tt>-#include</tt> option to bring the correct prototype into scope (see [http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#options-C-compiler Section 4.10.5, ´Options affecting the C compiler (if applicable)¡]).<br />
<br />
== How can I propagate a Haskell run-time error (e.g. pattern match failure) as an exception to a foreign caller of the Haskell function. ==<br />
<br />
If a runtime error occurs inside a DLL compiled by ghc (like <br />
"irrefutable pattern match failed" or exceptions caused by error),<br />
the application that called the DLL function dies. This is ok for <br />
development but unacceptable when it happens with a user sitting in <br />
front of the display. <br />
So the question is: Is there any way to catch and process runtime errors? <br />
I am looking for some way to map those errors to exceptions on the C++ <br />
side that can be caught if required. It would be ok to kill the Haskell <br />
runtime system and unload the DLL if necessary.<br />
<br />
Answer: The FFI doesn't provide any way to propagate exceptions from Haskell to <br />
the caller of a foreign export, because there's no standard way to do <br />
this. It is your responsibility to catch the exception in Haskell and <br />
return an appropriate error code to the caller. To raise a C++ <br />
exception, you would probably need another C++ wrapper around each <br />
foreign export, translating an error code into the C++ exception.<br />
<br />
<br />
---------------------------------------<br />
<br />
= Input/Output =<br />
<br />
== If I print out a string using <tt>putStr</tt>, and then attempt to read some input using <tt>hGetLine</tt>, I don't see the output from the <tt>putStr</tt>. ==<br />
<br />
The <tt>stdout</tt> handle is line-buffered by default, which means that output sent to the handle is only flushed when a newline (<tt>\n</tt>) is output, the buffer is full, or <tt>hFlush</tt> is called on the <tt>Handle</tt>. The right way to make the text appear without sending a newline is to use <tt>hFlush</tt>:<br />
<br />
<haskell><br />
import System.IO<br />
main = do<br />
putStr "how are you today? "<br />
hFlush stdout<br />
input <- hGetLine stdin<br />
process input<br />
</haskell><br />
<br />
You'll probably find that the behaviour differs when using GHCi: the hFlush isn't necessary to make the text appear. This is because in GHCi we turn off the buffering on stdout, because this is normally what you want in an interpreter: output appears as it is generated.<br />
<br />
== If I explicitly set the buffering on a Handle to <tt>NoBuffering</tt> I'm not able to enter EOF by typing "Ctrl-D". ==<br />
<br />
This is a consequence of Unixy terminal semantics. Unix does line buffering on terminals in the kernel as part of the terminal processing, unless you turn it off. However, the Ctrl-D processing is also part of the terminal processing which gets turned off when the kernel line buffering is disabled. So GHC tries its best to get NoBuffering semantics by turning off the kernel line buffering, but as a result you lose Ctrl-D. C'est la vie.<br />
<br />
== When I open a FIFO (named pipe) and try to read from it, I get EOF immediately. ==<br />
<br />
This is a consequence of the fact that GHC opens the FIFO in non-blocking mode. The behaviour varies from OS to OS: on Linux and Solaris you can wait for a writer by doing an explicit threadWaitRead on the file descriptor (gotten from <tt>Posix.handleToFd</tt>) before the first read, but this doesn't work on FreeBSD (although rumour has it that recent versions of FreeBSD changed the behaviour to match other OSs). A workaround for all systems is to open the FIFO for writing yourself, before (or at the same time as) opening it for reading.<br />
<br />
== When I foreign import a function that returns char or short, I get garbage back. ==<br />
<br />
This is a known bug in GHC versions prior to 5.02.2. GHC doesn't mask out the more significant bits of the result. It doesn't manifest with gcc 2.95, but apparently shows up with g++ and gcc 3.0.<br />
<br />
---------------------------------------<br />
= Optimization issues =<br />
<br />
== My program spent too much time doing garbage collection ==<br />
<br />
Add the "+RTS -A10m" option to the command line when you run your<br />
program. This sets the allocation area size used by the garbage<br />
collector to 10M, which should sufficiently decrease GC times (the<br />
default is 256K; see the section "Running a compiled program" in the<br />
users' guide). You can also add to your program C module containing<br />
statement<br />
<br />
char *ghc_rts_opts = "-A10m";<br />
<br />
to force your program to use this setting on each run.<br />
<br />
<br />
== Does GHC do common subexpression elimination? ==<br />
<br />
In general, GHC does not do CSE.<br />
It'd be a relatively easy pass for someone to add, but it can cause space leaks. And it can replace two strictly-evaluated calls with one lazy thunk:<br />
<haskell><br />
let { x = case e of ...; y = case e of ... } in ...<br />
==><br />
let { v = e; x = case v of ...; y = case v of ... } in ...<br />
</haskell><br />
Now <hask>v</hask> is allocated as a thunk. (Of course, that might be well worth it if <hask>e</hask> is an expensive expression.)<br />
<br />
Instead GHC does "opportunistic CSE". If you have <br />
<haskell><br />
let x = e in .... let y = e in ....<br />
</haskell><br />
then it'll discard the duplicate binding. This can still cause space<br />
leaks but it guarantees never to create a new thunk, and it turns out <br />
to be very useful in practice.<br />
<br />
Bottom line: if you care about sharing, do it yourself using <hask>let</hask> <br />
or <hask>where</hask>.<br />
<br />
== When can I rely on full laziness? ==<br />
<br />
Consider this program<br />
<haskell><br />
f x y = let r = expensive x <br />
in r+y<br />
g vs = map (f 2) vs<br />
</haskell><br />
Since r depends only on x, you might hope that <tt>(expensive 2)</tt> is computed just once. And that is indeed what will happen if you write<br />
<haskell><br />
f_opt x = let r = expensive x <br />
in \y -> r+y<br />
g_opt vs = map (f_opt 2) vs<br />
</haskell><br />
It's easy enough for a compiler to transform f into f_opt. (This is called the "full laziness" transformation.) BUT in the cases when f is fully-applied, f_opt is *less* efficient than f; consider<br />
<haskell><br />
h ys zs = zipWith f_opt ys zs<br />
</haskell><br />
Reason: it's much less efficient to have separate lambdas <tt>\x-> let ... in \y -> e</tt> than one compound lambda <tt>\xy -> e</tt>.<br />
<br />
So the best way to transform f depends on how it is used. When it's used locally and just once, GHC inlines it at the call site and all is good. But when it's exported or called many times, GHC's full laziness transformation uses the following rule: never "float" a let <em>between</em> two lambdas. So it won't transform f into f_opt. <br />
<br />
On the other hand, if you write f_opt, GHC will keep it that way. Furthermore, if a sub-expression can be floated right out of a complete lambda group, GHC will float it out. For example<br />
<haskell><br />
f x vs = map (\y -> y + expensive x) vs<br />
</haskell><br />
Here, the <tt>(expensive x)</tt> can be floated out of the <tt>\x->...</tt> lambda without separating two lambdas, and the full laziness transfom will do just that.<br />
<br />
---------------------------------------<br />
<br />
= Other frequently asked questions =<br />
<br />
== Do I have to recompile all my code if I upgrade GHC? ==<br />
<br />
Yes. There are two reasons for this:<br />
<br />
* GHC does a lot of cross-module optimisation, so compiled code will include parts of the libraries it was compiled against (including the Prelude), so will be deeply tied to the actual version of those libraries it was compiled against. When you upgrade GHC, the libraries may change; even if the external interface of the libraries doesn't change, sometimes internal details may change because GHC optimised the code in the library differently. <br />
* We sometimes change the ABI (application binary interface) between versions of GHC. Code compiled with one version of GHC is not necessarily compatible with code compiled by a different version, even if you arrange to keep the same libraries.<br />
<br />
== Why doesn't GHC use shared libraries? ==<br />
<br />
GHC does provide shared libraries, currently only on MacOS X. We are working on making shared libraries work on other platforms.<br />
<br />
However, GHC-compiled libraries are very tightly coupled, which means it's unlikely you'd be able to swap out a shared library for a newer version unless it was compiled with exactly the same compiler and set of libraries as the old version.<br />
<br />
== My program is failing with head [], or an array bounds error, or some other random error, and I have no idea how to find the bug. Can you help? ==<br />
<br />
Compile your program with <tt>-prof -auto-all</tt> (make sure you have the profiling libraries installed), and run it with <tt>+RTS -xc -RTS</tt> to get a ´stack trace¡ at the point at which the exception was raised. See [http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html#rts-options-debugging Section 4.14.4, ´RTS options for hackers, debuggers, and over-interested souls¡] for more details.<br />
<br />
== How do I increase the heap size permanently for a given binary? ==<br />
<br />
See [http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html#rts-hooks Section 4.14.5, ´´Hooks¡ to change RTS behaviour¡].<br />
<br />
== I'm trying to compile my program for parallel execution with the -parallel, and GHC complains with an error like ´failed to load interface file for Prelude¡. ==<br />
<br />
GHC doesn't ship with support for parallel execution; that support is provided separately by the [http://www.macs.hw.ac.uk/~dsg/gph/ GPH] project.<br />
<br />
== When is it safe to use [[unsafe functions]] such as <hask>unsafePerformIO</hask>? ==<br />
<br />
We'll give two answers to this question, each of which may be helpful. These criteria are not rigorous in any real sense (you'd need a formal semantics for Haskell in order to give a proper answer to this question), but should give you a feel for the kind of things you can and cannot do with unsafePerformIO.<br />
<br />
* It is safe to implement a function or API using unsafePerformIO if you could imagine also implementing the same function or API in Haskell without using unsafePerformIO (forget about efficiency, just consider the semantics).<br />
* In pure Haskell, the value of a function depends only on the values of its arguments (and free variables, if it has any). If you can implement the function using unsafePerformIO and still retain this invariant, then you're probably using unsafePerformIO in a safe way. Note that you need only consider the observable values of the arguments and result.<br />
<br />
For more information, see [http://www.haskell.org/pipermail/glasgow-haskell-users/2002-July/003681.html this thread].<br />
<br />
== I can't get finalizers to work properly. My program sometimes just prints <tt><<loop>></tt>. ==<br />
<br />
Chances are that your program is trying to write a message to stdout or stderr in the finalizer. Handles have finalizers themselves, and since finalizers don't keep other finalized values alive, the stdout and stderr Handles may be finalized before your finalizer runs. If this happens, your finalizer will block on the handle, and probably end up receiving a NonTermination exception (which is printed as <tt><<loop>></tt>).<br />
<br />
== Does GHC implement any kind of extensible records? ==<br />
<br />
No, extensible records are not implemented in GHC. [http://www.haskell.org/hugs/ Hugs] implements TRex, one extensible record variant. The problem is that the record design space is large, and seems to lack local optima. And all reasonable variants break backward compatibility. As a result, nothing much happens.</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=GHC/FAQ&diff=11419GHC/FAQ2007-02-19T17:57:47Z<p>Thorkilnaur: Adding Mac OS X section on ld: Undefined symbols: _sprintf$LDBLStub ...</p>
<hr />
<div>[[Category:GHC]] [[Category:FAQ]]<br />
Please feel free to add stuff here.<br />
<br />
This page is rather long. We've started to add some sub-headings, but would welcome your help in making it better organised.<br />
<br />
= GHC on particular platforms =<br />
<br />
== How do I port GHC to platform X? ==<br />
<br />
There are two distinct possibilities: either<br />
<br />
* The hardware architecture for your system is already supported by GHC, but you're running an OS that isn't supported (or perhaps has been supported in the past, but currently isn't). This is the easiest type of porting job, but it still requires some careful bootstrapping.<br />
<br />
* Your system's hardware architecture isn't supported by GHC. This will be a more difficult port (though by comparison perhaps not as difficult as porting gcc).<br />
<br />
Both ways require you to bootstrap from intermediate HC files: these are the stylised C files generated by GHC when it compiles Haskell source. Basically the idea is to take the HC files for GHC itself to the target machine and compile them with gcc to get a working GHC, and go from there.<br />
<br />
The [http://www.haskell.org/ghc/docs/latest/html/building Building Guide] has all the details on how to bootstrap GHC on a new platform.<br />
<br />
<br />
== GHC on Linux ==<br />
<br />
=== I Can't run GHCi on Linux, because it complains about a missing <tt>libreadline.so.3</tt>. ===<br />
<br />
The "correct" fix for this problem is to install the correct RPM for the particular flavour of Linux on your machine. If this isn't an option, however, there is a hack that might work: make a symbolic link from <tt>libreadline.so.4</tt> to <tt>libreadline.so.3</tt> in <tt>/usr/lib</tt>. We tried this on a SuSE 7.1 box and it seemed to work, but YMMV.<br />
<br />
=== Linking a program causes the following error on Linux: <tt>/usr/bin/ld: cannot open -lgmp: No such file or directory</tt> ===<br />
<br />
The problem is that your system doesn't have the GMP library installed. If this is a RedHat distribution, install the RedHat-supplied gmp-devel package, and the gmp package if you don't already have it. There have been reports that installing the RedHat packages also works for SuSE (SuSE doesn't supply a shared gmp library).<br />
<br />
=== GHC and SELinux ===<br />
<br />
If you have SELinux enabled on your system, then GHC may fail with a memory allocation error:<br />
<br />
ghc-6.4.1: internal error: mallocBytesRWX: failed to protect 0x0x1660730<br />
<br />
or maybe<br />
<br />
ghc: internal error: getMBlock: mmap: Permission denied <br />
<br />
The reason for this is that SELinux prevents allocation of writeable/executable memory regions, which GHC needs in order to implement certain parts of the FFI that require dynamic code generation. (See [http://hackage.haskell.org/trac/ghc/ticket/738 this bug report]).<br />
<br />
In GHC 6.4.2 we improved the situation somewhat, but not completely.<br />
<br />
Workarounds:<br />
<br />
* Set <tt>allow_execmem</tt> to 0, with the <tt>setsebool</tt> command.<br />
* do this on a per-program basis, for GHC and GHC-compiled programs. Apparently this is done by:<br />
<br />
<tt>/usr/bin/chcon -t unconfined_execmem_exec_t /path/to/binary/prog</tt><br />
<br />
== GHC on Solaris ==<br />
=== Solaris users may sometimes get link errors due to libraries needed by GNU Readline. ===<br />
<br />
We suggest you try linking in some combination of the termcap, curses and ncurses libraries, by giving <tt>-ltermcap</tt>, <tt>-lcurses</tt> and <tt>-lncurses</tt> respectively. If you encounter this problem, we would appreciate feedback on it, since we don't fully understand what's going on here.<br />
The build fails in readline.<br />
<br />
It has been reported that if you have multiple versions of the readline library installed on Linux, then this may cause the build to fail. If you have multiple versions of readline, try uninstalling all except the most recent version.<br />
<br />
== GHC on Windows ==<br />
=== My program that uses a really large heap crashes on Windows. ===<br />
<br />
For utterly horrible reasons, programs that use more than 128Mb of heap won't work when compiled dynamically on Windows (they should be fine statically compiled).<br />
<br />
=== I can't use readline under GHCi on Windows ===<br />
<br />
In order to load the readline package under GHCi on Windows, you need to make a version of the readline library that GHCi can load. Instructions for GHC 6.2.2. are here.<br />
<br />
=== Ctrl-C doesn't work on Windows ===<br />
<br />
When running GHC under a Cygwin shell on Windows, Ctrl-C sometimes doesn't work. A workaround is to use Ctrl-Break instead. Another workaround is to use the rlwrap program (cygwin package available) to invoke ghci : In addition to proper Ctrl-C, you also get emacs (or vi) key bindings and command history across sessions. <br />
<br />
=== How do I link Haskell with C++ code compiled by Visual Studio? ===<br />
<br />
==== Prerequisites ====<br />
<br />
It is assumed that the reader is familiar with the Haskell <br />
[http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi.html Foreign function interface (FFI)],<br />
and is able to compile Haskell programs with GHC and C++ programs with Visual Studio.<br />
<br />
==== Background ====<br />
<br />
GHC has two modes of code generation. It either compiles Haskell straight into object code<br />
(native mode), or translates Haskell into intermediate C code, and uses a C compiler as backend.<br />
<br />
The Windows distribution of GHC comes bundled with the GCC compiler, which is used as backend.<br />
That's why linking Haskell with Visual C++ is no different from linking GCC-generated code with<br />
the code generated by Visual C++.<br />
<br />
One cannot statically link together object files produced by those two compilers,<br />
but they can be linked dynamically: an executable produced by Visual C++ can invoke a DLL<br />
produced by GCC, and vice versa. Likewise, we can link Haskell with Visual C++ in one of these ways.<br />
<br />
''Note:'' when Haskell becomes able to use Visual C++ as a backend (see [http://hackage.haskell.org/trac/ghc/ticket/989]), we would not need to go via a DLL anymore. Instead, we would simply list<br />
all source files (Haskell and C++) on the command line of GHC.<br />
<br />
==== Invoking a Haskell DLL from a C++ executable ====<br />
<br />
#Make a Haskell DLL as explained in [http://www.haskell.org/ghc/docs/latest/html/users_guide/win32-dlls.html#win32-dlls-foreign]<br />
#Make a module definition file, such as<tt><br>LIBRARY Adder<br>EXPORTS<br>&nbsp;&nbsp;&nbsp;&nbsp;adder</tt><br />
#Create an import library using Visual Studio's <tt>lib.exe:<br>lib /DEF:adder.def /OUT:adder.lib</tt><br />
#Link the C++ program against the import library.<br />
<br />
==== Invoking a C++ DLL from a Haskell executable ====<br />
<br />
#Make a DLL project in Visual Studio. It will create a <tt>.vcproj</tt> and <tt>.sln</tt> files for you. Add your C++ source files to this project. <br />
#Create a <tt>.def</tt> file for your DLL. It might look like<tt><br>LIBRARY MyDLL<br>EXPORTS<br>&nbsp;&nbsp;&nbsp;&nbsp;function1<br>&nbsp;&nbsp;&nbsp;&nbsp;function2<br></tt> where <tt>function1</tt> and <tt>function2</tt> are the names of the C++ functions that you want to invoke from Haskell (there can be more of them, of course), <tt>MyDLL</tt> is the name of your DLL.<br />
#Create an import library that can be used by <tt>ghc:<br>dlltool -d MyDLL.def -l libMyDLL.a</tt> <br />
#Link your Haskell project, adding the library:<tt><br>ghc --make main.hs -optl-lMyDLL -optl-L.<br></tt>''mind the dot at the end of the command line!''<br> (<tt>[http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#forcing-options-through -optl]</tt> switch passes its argument as an option to the linker).<br />
<br />
== Why isn't GHC available for .NET? ==<br />
<br />
<br />
It would make a lot of sense to give GHC a .NET back end, and it's a<br />
question that comes up regularly. The reason that we haven't done it<br />
here, at GHC HQ, is because it's a more substantial undertaking than<br />
might at first appear (see below). Furthermore, it'd permanently add a<br />
complete new back-end platform for us to maintain. Given our rather<br />
limited development effort, we have so far not bitten<br />
the bullet, and we have no immediate plans to do so.<br />
<br />
It would be a good, well-defined project for someone else to tackle, and<br />
we would love to see it done. There is some good groundwork already done:<br />
<br />
* Sigbjorn Finne did a simple interop implementation that allows a Haskell program to be compiled to native code (as now) but to call .NET programs via a variant of the FFI. I don't think this work is in active use, and I'd be surprised if it worked out of the box, but it could probably be revived with modest effort<br />
<br />
* Andre Santos and his colleagues at UFPE in Brazil are working on a .NET back end, that generates CLR IL, though I don't know where they are up to.<br />
<br />
* Nigel Perry and Oliver Hunt have a Haskell.NET prototype that works using GHC to compile to Core, and then compiling Core to NET. I'm not sure what stage it is at.<br />
<br />
* GHC.Net would be extra attractive if there was a Visual Studio integration for GHC. Substantial progress on this has been made in 2004 by Simon Marlow, Krasimir Angelov, and Andre Santos and colleagues.<br />
<br />
There may be others that I don't know of. If anyone wants to join in<br />
this effort, do contact the above folk. And please keep us informed!<br />
<br />
Here's a summary of why it's a non-trivial thing to do:<br />
<br />
* The first thing is to generate native CLR Intermediate Language (IL). That's not really hard. Requires thinking about representations for thunks and functions, and it may not be particularly efficient, but it can surely be done. An open question is about whether to generate verifiable IL or not. The trouble here is that Haskell's type system is more expressive than the CLR's in some ways, notably the use of higher-kinded type variables. So, to generate verifiable IL one is bound to need some run-time casts, and it's not clear how to minimise these.<br />
<br />
At first blush this is *all* you need do. But it isn't!<br />
<br />
* Next, you need to think about how to inter-operate with .NET libraries. You don't really want to write "foreign import..." for each and every import. You'd like GHC to read the CLR meta-data directly. But there are lots of tricky issues here; see the paper that Mark Shields and I wrote about "Object-oriented style overloading for Haskell".<br />
<br />
* Now you need to figure out how to implement GHC's primitive operations:<br />
* the I/O monad<br />
* arbitrary precision arithmetic<br />
* concurrency<br />
* exceptions<br />
* finalisers<br />
* stable pointers<br />
* [[Software transactional memory]]<br />
<br />
Not all of these are necessary, of course, but many are used in the libraries. The CLR supports many of them (e.g. concurrency) but with a very different cost model.<br />
<br />
* Last, you have to figure out what to do for the libraries. GHC has a pretty large library, and you either have to implement the primops on which the library is based (see previous point), or re-implement it. For example, GHC's implementation of I/O uses mutable state, concurrency, and more besides. For each module, you need to decide either to re-implement it using .NET primitives, or to implement the stuff the module is based on.<br />
<br />
These challenges are mostly broad rather than deep. But to get a<br />
production quality implementation that runs a substantial majority of<br />
Haskell programs "out of the box" requires a decent stab at all of them.<br />
<br />
== GHC on Mac OS X ==<br />
<br />
=== Linking with ghc produces <tt>ld: Undefined symbols: _sprintf$LDBLStub ...</tt> ===<br />
<br />
This happens on a PowerPC Mac OS X 10.4 where gcc-3.3 is the default compiler if you try to compile with a ghc that has been built with gcc-4.0. For example:<br />
<br />
$ cat t2.hs <br />
module Main where<br />
main = putStr ("t2: Hello trac 1066 2007-Feb-17 19.48\n")<br />
$ gcc --version<br />
gcc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1819)<br />
...<br />
$ ghc --make t2.hs<br />
[1 of 1] Compiling Main ( t2.hs, t2.o )<br />
Linking t2 ...<br />
ld: Undefined symbols:<br />
_sprintf$LDBLStub<br />
_fprintf$LDBLStub<br />
_vfprintf$LDBLStub<br />
_sscanf$LDBLStub<br />
$ <br />
<br />
To correct this, set the default compiler to gcc-4.0 (<tt>sudo gcc_select 4.0</tt>) or include linking options <tt>-lHSrts -lSystemStubs</tt> in that order on the ghc command:<br />
<br />
$ ghc --make t2.hs -lHSrts -lSystemStubs<br />
[1 of 1] Skipping Main ( t2.hs, t2.o )<br />
Linking t2 ...<br />
$ <br />
<br />
[http://hackage.haskell.org/trac/ghc/ticket/1066] has additional details.<br />
<br />
---------------------------------------<br />
= Running GHC =<br />
<br />
== GHC doesn't like filenames containing +. ==<br />
<br />
Indeed not. You could change <tt>+</tt> to <tt>p</tt> or <tt>plus</tt>.<br />
<br />
== Why does linking take so long? ==<br />
<br />
Linking a small program should take no more than a few seconds. Larger programs can take longer, but even linking GHC itself only takes 3-4 seconds on our development machines.<br />
<br />
Long link times have been attributed to using Sun's linker on Solaris, as compared to GNU ld which appears to be much faster. So if you're on a Sun box, try switching to GNU ld. [http://www.haskell.org/pipermail/glasgow-haskell-users/2002-November/004477.html This article] from the mailing list has more information.<br />
<br />
== Why do I get errors about missing include files when compiling with -O or -prof? ==<br />
<br />
Certain options, such as -O, turn on via-C compilation, instead of using the native code generator. Include files named by -#include options or in foreign import declarations are only used in via-C compilation mode. See [http://www.haskell.org/ghc/docs/latest/html/users_guide/sec-ffi-ghc.html#finding-header-files Section 8.2.2.1, ´Finding Header files¡] for more details.<br />
<br />
== How do I compile my program for profiling without overwriting the object files and hi files I've already built? ==<br />
<br />
You can select alternative suffixes for object files and interface files, so you can have several builds of the same code coexisting in the same directory. For example, to compile with profiling, you might do this:<br />
<br />
<pre><br />
ghc --make -prof -o foo-prof -osuf p.o -hisuf p.hi Main<br />
</pre><br />
<br />
See [http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#options-output Section 4.6.4, ´Redirecting the compilation output(s)¡] for more details on the <tt>-osuf</tt> and <tt>-hisuf</tt> options.<br />
<br />
---------------------------------------<br />
= Syntax =<br />
<br />
== I can't get string gaps to work ==<br />
<br />
If you're also using CPP, beware of the known pitfall with string gaps mentioned in [http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#cpp-string-gaps Section 4.10.3.1, CPP and string gaps¡].<br />
<br />
---------------------------------------<br />
= GHCi =<br />
<br />
== GHCi complains about missing symbols like CC_LIST when loading a previously compiled .o file. ==<br />
<br />
This probably means the .o files in question were compiled for profiling (with -prof). Workaround: recompile them without profiling. We really ought to detect this situation and give a proper error message.<br />
<br />
== When I try to start ghci (probably one I compiled myself) it says <tt>ghc-5.02: not built for interactive use</tt> ==<br />
<br />
To build a working ghci, you need to build GHC 5.02 with itself; the above message appears if you build it with 4.08.X, for example. It'll still work fine for batch-mode compilation, though. Note that you really must build with exactly the same version of the compiler. Building 5.02 with 5.00.2, for example, may or may not give a working interactive system; it probably won't, and certainly isn't supported. Note also that you can build 5.02 with any older compiler, back to 4.08.1, if you don't want a working interactive system; that's OK, and supported.<br />
<br />
== I get an error message from GHCi about a "<tt>duplicate definition for symbol __module_registered</tt>" ==<br />
<br />
An error message like this:<br />
<br />
<pre><br />
GHCi runtime linker: fatal error: I found a duplicate definition for symbol<br />
__module_registered<br />
whilst processing object file<br />
/usr/local/lib/ghc-6.2/HSfgl.o<br />
</pre><br />
<br />
probably indicates that when building a library for GHCi (<tt>HSfgl.o</tt> in the above example), you should use the <tt>-x</tt> option to <tt>ld</tt>.<br />
<br />
---------------------------------------<br />
= The Foreign Function Interface =<br />
<br />
== When do other Haskell threads get blocked by an FFI call? ==<br />
<br />
{| border="1" align="center"<br />
|<br />
! safe<br />
! unsafe<br />
|-<br />
! -threaded<br />
| NO <br />
| YES<br />
|-<br />
! no -threaded<br />
| YES<br />
| YES<br />
|}<br />
<br />
The <tt>-threaded</tt> flag (given when linking; see the <br />
[http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html manual])<br />
allows other Haskell threads to run concurrently with a thread making an FFI call.<br />
This nice behaviour does not happen for foreign calls marked as `unsafe` (see<br />
the [http://www.cse.unsw.edu.au/~chak/haskell/ffi/ FFI Addendum]).<br />
<br />
There used to be another modifier, <tt>threadsafe</tt>, which is now deprecated. Use `safe` instead.<br />
<br />
== When I use a foreign function that takes or returns a float, it gives the wrong answer, or crashes. ==<br />
<br />
You should use the <tt>-#include</tt> option to bring the correct prototype into scope (see [http://www.haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#options-C-compiler Section 4.10.5, ´Options affecting the C compiler (if applicable)¡]).<br />
<br />
== How can I propagate a Haskell run-time error (e.g. pattern match failure) as an exception to a foreign caller of the Haskell function. ==<br />
<br />
If a runtime error occurs inside a DLL compiled by ghc (like <br />
"irrefutable pattern match failed" or exceptions caused by error),<br />
the application that called the DLL function dies. This is ok for <br />
development but unacceptable when it happens with a user sitting in <br />
front of the display. <br />
So the question is: Is there any way to catch and process runtime errors? <br />
I am looking for some way to map those errors to exceptions on the C++ <br />
side that can be caught if required. It would be ok to kill the Haskell <br />
runtime system and unload the DLL if necessary.<br />
<br />
Answer: The FFI doesn't provide any way to propagate exceptions from Haskell to <br />
the caller of a foreign export, because there's no standard way to do <br />
this. It is your responsibility to catch the exception in Haskell and <br />
return an appropriate error code to the caller. To raise a C++ <br />
exception, you would probably need another C++ wrapper around each <br />
foreign export, translating an error code into the C++ exception.<br />
<br />
<br />
---------------------------------------<br />
<br />
= Input/Output =<br />
<br />
== If I print out a string using <tt>putStr</tt>, and then attempt to read some input using <tt>hGetLine</tt>, I don't see the output from the <tt>putStr</tt>. ==<br />
<br />
The <tt>stdout</tt> handle is line-buffered by default, which means that output sent to the handle is only flushed when a newline (<tt>\n</tt>) is output, the buffer is full, or <tt>hFlush</tt> is called on the <tt>Handle</tt>. The right way to make the text appear without sending a newline is to use <tt>hFlush</tt>:<br />
<br />
<haskell><br />
import System.IO<br />
main = do<br />
putStr "how are you today? "<br />
hFlush stdout<br />
input <- hGetLine stdin<br />
process input<br />
</haskell><br />
<br />
You'll probably find that the behaviour differs when using GHCi: the hFlush isn't necessary to make the text appear. This is because in GHCi we turn off the buffering on stdout, because this is normally what you want in an interpreter: output appears as it is generated.<br />
<br />
== If I explicitly set the buffering on a Handle to <tt>NoBuffering</tt> I'm not able to enter EOF by typing "Ctrl-D". ==<br />
<br />
This is a consequence of Unixy terminal semantics. Unix does line buffering on terminals in the kernel as part of the terminal processing, unless you turn it off. However, the Ctrl-D processing is also part of the terminal processing which gets turned off when the kernel line buffering is disabled. So GHC tries its best to get NoBuffering semantics by turning off the kernel line buffering, but as a result you lose Ctrl-D. C'est la vie.<br />
<br />
== When I open a FIFO (named pipe) and try to read from it, I get EOF immediately. ==<br />
<br />
This is a consequence of the fact that GHC opens the FIFO in non-blocking mode. The behaviour varies from OS to OS: on Linux and Solaris you can wait for a writer by doing an explicit threadWaitRead on the file descriptor (gotten from <tt>Posix.handleToFd</tt>) before the first read, but this doesn't work on FreeBSD (although rumour has it that recent versions of FreeBSD changed the behaviour to match other OSs). A workaround for all systems is to open the FIFO for writing yourself, before (or at the same time as) opening it for reading.<br />
<br />
== When I foreign import a function that returns char or short, I get garbage back. ==<br />
<br />
This is a known bug in GHC versions prior to 5.02.2. GHC doesn't mask out the more significant bits of the result. It doesn't manifest with gcc 2.95, but apparently shows up with g++ and gcc 3.0.<br />
<br />
---------------------------------------<br />
= Optimization issues =<br />
<br />
== My program spent too much time doing garbage collection ==<br />
<br />
Add the "+RTS -A10m" option to the command line when you run your<br />
program. This sets the allocation area size used by the garbage<br />
collector to 10M, which should sufficiently decrease GC times (the<br />
default is 256K; see the section "Running a compiled program" in the<br />
users' guide). You can also add to your program C module containing<br />
statement<br />
<br />
char *ghc_rts_opts = "-A10m";<br />
<br />
to force your program to use this setting on each run.<br />
<br />
<br />
== Does GHC do common subexpression elimination? ==<br />
<br />
In general, GHC does not do CSE.<br />
It'd be a relatively easy pass for someone to add, but it can cause space leaks. And it can replace two strictly-evaluated calls with one lazy thunk:<br />
<haskell><br />
let { x = case e of ...; y = case e of ... } in ...<br />
==><br />
let { v = e; x = case v of ...; y = case v of ... } in ...<br />
</haskell><br />
Now <hask>v</hask> is allocated as a thunk. (Of course, that might be well worth it if <hask>e</hask> is an expensive expression.)<br />
<br />
Instead GHC does "opportunistic CSE". If you have <br />
<haskell><br />
let x = e in .... let y = e in ....<br />
</haskell><br />
then it'll discard the duplicate binding. This can still cause space<br />
leaks but it guarantees never to create a new thunk, and it turns out <br />
to be very useful in practice.<br />
<br />
Bottom line: if you care about sharing, do it yourself using <hask>let</hask> <br />
or <hask>where</hask>.<br />
<br />
== When can I rely on full laziness? ==<br />
<br />
Consider this program<br />
<haskell><br />
f x y = let r = expensive x <br />
in r+y<br />
g vs = map (f 2) vs<br />
</haskell><br />
Since r depends only on x, you might hope that <tt>(expensive 2)</tt> is computed just once. And that is indeed what will happen if you write<br />
<haskell><br />
f_opt x = let r = expensive x <br />
in \y -> r+y<br />
g_opt vs = map (f_opt 2) vs<br />
</haskell><br />
It's easy enough for a compiler to transform f into f_opt. (This is called the "full laziness" transformation.) BUT in the cases when f is fully-applied, f_opt is *less* efficient than f; consider<br />
<haskell><br />
h ys zs = zipWith f_opt ys zs<br />
</haskell><br />
Reason: it's much less efficient to have separate lambdas <tt>\x-> let ... in \y -> e</tt> than one compound lambda <tt>\xy -> e</tt>.<br />
<br />
So the best way to transform f depends on how it is used. When it's used locally and just once, GHC inlines it at the call site and all is good. But when it's exported or called many times, GHC's full laziness transformation uses the following rule: never "float" a let <em>between</em> two lambdas. So it won't transform f into f_opt. <br />
<br />
On the other hand, if you write f_opt, GHC will keep it that way. Furthermore, if a sub-expression can be floated right out of a complete lambda group, GHC will float it out. For example<br />
<haskell><br />
f x vs = map (\y -> y + expensive x) vs<br />
</haskell><br />
Here, the <tt>(expensive x)</tt> can be floated out of the <tt>\x->...</tt> lambda without separating two lambdas, and the full laziness transfom will do just that.<br />
<br />
---------------------------------------<br />
<br />
= Other frequently asked questions =<br />
<br />
== Do I have to recompile all my code if I upgrade GHC? ==<br />
<br />
Yes. There are two reasons for this:<br />
<br />
* GHC does a lot of cross-module optimisation, so compiled code will include parts of the libraries it was compiled against (including the Prelude), so will be deeply tied to the actual version of those libraries it was compiled against. When you upgrade GHC, the libraries may change; even if the external interface of the libraries doesn't change, sometimes internal details may change because GHC optimised the code in the library differently. <br />
* We sometimes change the ABI (application binary interface) between versions of GHC. Code compiled with one version of GHC is not necessarily compatible with code compiled by a different version, even if you arrange to keep the same libraries.<br />
<br />
== Why doesn't GHC use shared libraries? ==<br />
<br />
GHC does provide shared libraries, currently only on MacOS X. We are working on making shared libraries work on other platforms.<br />
<br />
However, GHC-compiled libraries are very tightly coupled, which means it's unlikely you'd be able to swap out a shared library for a newer version unless it was compiled with exactly the same compiler and set of libraries as the old version.<br />
<br />
== My program is failing with head [], or an array bounds error, or some other random error, and I have no idea how to find the bug. Can you help? ==<br />
<br />
Compile your program with <tt>-prof -auto-all</tt> (make sure you have the profiling libraries installed), and run it with <tt>+RTS -xc -RTS</tt> to get a ´stack trace¡ at the point at which the exception was raised. See [http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html#rts-options-debugging Section 4.14.4, ´RTS options for hackers, debuggers, and over-interested souls¡] for more details.<br />
<br />
== How do I increase the heap size permanently for a given binary? ==<br />
<br />
See [http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html#rts-hooks Section 4.14.5, ´´Hooks¡ to change RTS behaviour¡].<br />
<br />
== I'm trying to compile my program for parallel execution with the -parallel, and GHC complains with an error like ´failed to load interface file for Prelude¡. ==<br />
<br />
GHC doesn't ship with support for parallel execution; that support is provided separately by the [http://www.macs.hw.ac.uk/~dsg/gph/ GPH] project.<br />
<br />
== When is it safe to use [[unsafe functions]] such as <hask>unsafePerformIO</hask>? ==<br />
<br />
We'll give two answers to this question, each of which may be helpful. These criteria are not rigorous in any real sense (you'd need a formal semantics for Haskell in order to give a proper answer to this question), but should give you a feel for the kind of things you can and cannot do with unsafePerformIO.<br />
<br />
* It is safe to implement a function or API using unsafePerformIO if you could imagine also implementing the same function or API in Haskell without using unsafePerformIO (forget about efficiency, just consider the semantics).<br />
* In pure Haskell, the value of a function depends only on the values of its arguments (and free variables, if it has any). If you can implement the function using unsafePerformIO and still retain this invariant, then you're probably using unsafePerformIO in a safe way. Note that you need only consider the observable values of the arguments and result.<br />
<br />
For more information, see [http://www.haskell.org/pipermail/glasgow-haskell-users/2002-July/003681.html this thread].<br />
<br />
== I can't get finalizers to work properly. My program sometimes just prints <tt><<loop>></tt>. ==<br />
<br />
Chances are that your program is trying to write a message to stdout or stderr in the finalizer. Handles have finalizers themselves, and since finalizers don't keep other finalized values alive, the stdout and stderr Handles may be finalized before your finalizer runs. If this happens, your finalizer will block on the handle, and probably end up receiving a NonTermination exception (which is printed as <tt><<loop>></tt>).<br />
<br />
== Does GHC implement any kind of extensible records? ==<br />
<br />
No, extensible records are not implemented in GHC. [http://www.haskell.org/hugs/ Hugs] implements TRex, one extensible record variant. The problem is that the record design space is large, and seems to lack local optima. And all reasonable variants break backward compatibility. As a result, nothing much happens.</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac_2007/GroupPhoto&diff=10335Hac 2007/GroupPhoto2007-01-13T20:12:56Z<p>Thorkilnaur: Added my activities</p>
<hr />
<div>[[Image:Hac2007-group-outside.jpg]]<br />
<br />
Hac2007 peoples standing outside the Oxford university computing lab.<br />
11th Jan 2007.<br />
<br />
----<br />
<br />
'''Top Row'''<br />
<br />
From left: Thorkil Naur, Neil Mitchell (ndm), Ketil Malde, David Waern, Dominic Steinitz, Simon Marlow (JaffaCake), Ben Lippmeier (benl23)<br />
<br />
<br />
'''Middle Row'''<br />
<br />
From left: Benedikt Schmidt (beschmi), Pepe Iborra (mnislaih)<br />
<br />
'''Bottom Row'''<br />
<br />
From left: Ian Lynagh (Igloo), Duncan Coutts (dcoutts), Bjorn Bringert (bringert), Don Stewart (dons), Kirsten Chevalier (Binkley), Lennart Kolmodin (kolmodin), David Himmelstrup (Lemmih).<br />
<br />
<br />
== Summary ==<br />
<br />
dons: Worked on the new [http://darcs.haskell.org/binary binary] IO package,<br />
and patched hmp3 and lambdabot to use the new package. Lambdabot's now<br />
running live with 'binary' state<br />
<br />
kolmodin: Worked on the new [http://darcs.haskell.org/binary binary] IO package.<br />
<br />
Binkley: Worked on [http://hackage.haskell.org/trac/ghc/wiki/Commentary/Profiling ticky-ticky profiling in GHC]. Pending review, that code is ready to go into GHC's HEAD.<br />
<br />
pepe: Produced some GHC patches related to the [http://www.haskell.org/ghc/dist/current/docs/users_guide/ghci-debugger.html GHCi debugger], and joined<br />
forces with beschmi to integrate the debugger in Emacs, building on top of beschmi<br />
code to use the ghc-api from Emacs. A new project sponsored by Hac'07 !<br />
<br />
Lemmih: Worked on porting the parallel QuickCheck driver to QuickCheck-2.0. Did a little bit of 'binary' hacking.<br />
<br />
Igloo: Tidied up Cabal, implemented -fwarn-tabs in GHC, fixed a couple of other small things, took part in various design discussions (e.g. hackage stuff, some of Neil's bits), and other random stuff I've forgotten already.<br />
<br />
ndm: Index searching for Haddock. Gtk2Hs with waiting on Handles in Win32 (answer = doesn't work). DeferedBinary module, for Hoogle.<br />
<br />
Waern: Started working on generating correct links to external package modules in Haddock-GHC. Decided together with Simon to avoid having separate Haddock interface files and use GHC's .hi-files only. Needed to modify GHC to include some extra information in the .hi-files to be able to do this.<br />
<br />
beschmi: Started working on debugger support and improved ghci Emacs integration with Pepe (everyone should try the [http://haskell.org/haskellwiki/GHC/GHCiDebugger ghci debugger] in 6.7). Had some nice discussions about crypto+Haskell with Dominic Steinitz.<br />
<br />
kolmodin: binary<br />
<br />
dcoutts: binary, ...<br />
<br />
Thorkil Naur: Studies related to the GHC GMP replacement ([http://hackage.haskell.org/trac/ghc/ticket/601 trac ticket 601]).</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac_2007&diff=10334Hac 20072007-01-13T20:07:04Z<p>Thorkilnaur: </p>
<hr />
<div>[[Image:Hac07.png|Hac 07|center]]<br />
<br />
[[Image:Hac-axe-icon.png|Hac icon]]<br />
<br />
'''The 2007 Haskell Hackathon, Hac 07'''<br />
<br />
'''January 10-12, 2007'''<br />
<br />
'''Oxford University Computing Laboratory'''<br />
<br />
[[/Registration|Register]]<br />
<br />
[[/Attendees]]<br />
<br />
[[/GroupPhoto|Group photo at Oxford and raw summary of activities]]<br />
<br />
Following the success of the [http://hackage.haskell.org/trac/ghc/wiki/Hackathon GHC] [http://en.wikipedia.org/wiki/Hackathon Hackathon] <br />
at ICFP, we are pleased to announce that the inaugural Haskell<br />
Hackathon! The event will be held over 3 days, January 10-12 2007,<br />
at the Oxford University Computing Laboratory, in the UK. <br />
<br />
The plan is to hack on Haskell infrastructure, tools, libraries and<br />
compilers. To attend please [[/Registration|register]], and get ready to<br />
hack those lambdas! <br />
<br />
== Where ==<br />
<br />
Oxford University Computing Laboratory, Oxford, UK.<br />
<br />
== Important dates ==<br />
<br />
{| border="1" cellspacing="0" cellpadding="5"<br />
! Event <br />
! Date<br />
|-<br />
|Registration deadline<br />
|December 6th, 2006<br />
|-<br />
|Confirmation<br />
|December 10th, 2006<br />
|-<br />
|Hackathon<br />
|January 10-12, 2007<br />
|-<br />
|}<br />
<br />
'''10-12 January, 2007'''<br />
<br />
January 2007<br />
<br />
Su Mo Tu We Th Fr Sa<br />
1 2 3 4 5 6<br />
7 8 9 [10__11__12] 13 <br />
14 15 16 17 18 19 20<br />
21 22 23 24 25 26 27<br />
28 29 30 31<br />
<br />
From 10am until the code stops typechecking, at the Oxford University<br />
Computing Laboratory, UK.<br />
<br />
== Registration ==<br />
<br />
If you will be attending add your name to the [[/Registration|Registration page]].<br />
Numbers may be limited, depending on availablity of space.<br />
<br />
== Logistics ==<br />
<br />
=== The room ===<br />
<br />
http://urchin.earth.li/~ian/hackathon_room/<br />
<br />
Reception should let you in through a door to your left. Stairs are left again. Go up one flight, then follow the corridor round to the right. The room is on your left.<br />
<br />
=== Maps ===<br />
<br />
* http://urchin.earth.li/~ian/directions_comlab/<br />
* http://www.dailyinfo.co.uk/sheet/maps/map.htm The bottom map is a reasonable one for the center. The train station is in A10, the bus station C10 and the lab E7<br />
<br />
=== Accomodation ===<br />
<br />
* http://www.ox.ac.uk/visitors/<br />
* http://www.oxford.gov.uk/tourism/where-to-stay.cfm<br />
* http://www.dailyinfo.co.uk/venues.php?cat=hotel<br />
<br />
Cheeper end of the market:<br />
<br />
* The [http://www.hostels.co.uk/index.php?content=oxford.htm Backpackers Hostel], £14 per night<br />
* The [http://www.yha.org.uk/hostel/hostelpages/836.html Oxford YHA], £20.95 per night (an additional £3 for non-YHA/HI members) <br />
<br />
Todo: list of local hotels within walking distance.<br />
<br />
=== Travel ===<br />
<br />
''Oxford University Computing Laboratory''<br />
<br />
* http://web.comlab.ox.ac.uk/oucl/about/directions.html<br />
<br />
''Oxford''<br />
<br />
* http://www.ox.ac.uk/aboutoxford/how.shtml<br />
* http://www.oxford.gov.uk/tourism/how-to-get-to-oxford.cfm<br />
* http://www.dailyinfo.co.uk/guide/index.html<br />
<br />
''Flying''<br />
<br />
* London Heathrow (LHR) is the best airport.<br />
<br />
==== Airport busses ====<br />
* London Heathrow (LHR): 80-100 mins http://www.oxfordbus.co.uk/heathrow.html<br />
* London Gatwick (LGW): 120-150 mins http://www.oxfordbus.co.uk/gatwick.html<br />
* Stansted (STN): >3 hours http://www.nationalexpress.com/<br />
<br />
=== Food ===<br />
<br />
Arranged locally.<br />
<br />
== Facilities ==<br />
<br />
=== What to bring ===<br />
<br />
* Yourself<br />
* Laptop, wireless card, ethernet cable<br />
* Typechecker<br />
* Lambdas<br />
* Brain snacks<br />
<br />
=== Before you arrive ===<br />
<br />
* Install [http://darcs.net darcs]<br />
* Make sure you have an up to date [http://haskell.org/cabal Cabal]<br />
* Get a darcs [http://haskell.org/ghc GHC], [[Yhc]], [http://haskell.org/hugs Hugs] installed<br />
<br />
=== What we will bring ===<br />
<br />
* Wireless net access<br />
* Wired net access<br />
* Room to hack<br />
* Power points<br />
<br />
=== What to hack on ===<br />
<br />
[[/Projects|A list of projects]] people want to work on. Add your list!<br />
<br />
Scheduling is flexible, feel free to drop in any time during the 3 days.<br />
<br />
== Related events ==<br />
<br />
* PADL, Nice/France, January 14-15 2007<br />
* DAMP, Nice/France, January 16<br />
* TLDI, Nice/France, January 16<br />
* POPL, Nice/France, January 17-19 2007<br />
<br />
== Organisers ==<br />
<br />
* Duncan Coutts<br />
* [mailto:igloo@earth.li Ian Lynagh]<br />
* [http://www.cse.unsw.edu.au/~dons Don Stewart]<br />
<br />
[http://en.wikipedia.org/wiki/Image:Oxford_Skyline_Panorama_from_St_Mary%27s_Church_-_Oct_2006.jpg The Oxford background] is GFDLd, and copyright Diliff.<br />
<br />
== IRC channel ==<br />
<br />
A Hackathon [[IRC channel]] has been set up. Visit:<br />
<br />
#haskell.hac07<br />
<br />
on freenode.<br />
<br />
[[Category:Community]]</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac_2007/Attendees&diff=9970Hac 2007/Attendees2007-01-08T18:57:38Z<p>Thorkilnaur: My details</p>
<hr />
<div>[[Image:Hac-axe-icon.png|Hac icon]]<br />
<br />
Attendee list<br />
<br />
{|<br />
! Number<br />
! Name<br />
! IRC nick<br />
! Dates<br />
! Projects<br />
|-<br />
| 1<br />
| Don Stewart<br />
| dons<br />
| 10,11,12<br />
| hs-plugins for ghc 6.6, stream fusion bytestrings, the http package, hackage<br />
|-<br />
| 2<br />
| Duncan Coutts<br />
| dcoutts<br />
| 10,11,12<br />
|<br />
|-<br />
| 3<br />
| Ian Lynagh<br />
| Igloo<br />
| 10,11,12<br />
| GHC, Cabal, Hackage, and loads more besides<br />
|-<br />
| 4<br />
| Neil Mitchell<br />
| ndm<br />
| 10,11,12<br />
| I'd probably work on porting to Cabal, Cabal to Yhc, and the base libraries building with Cabal on Yhc.<br />
|-<br />
| 5<br />
| Thorkil Naur<br />
| naur<br />
| 10,11,12<br />
| Integer implementation (GMP), Porting, Factorization, Puzzles<br />
|-<br />
| 6<br />
| Pepe Iborra<br />
| mnislaih<br />
| 10,11,12<br />
| GHC, the GHCi debugger, Darcs does look sexy, infrastructure & tools.<br />
|-<br />
| 7<br />
| Dominic Steinitz<br />
|<br />
| 10,11,12<br />
| crypto, networking<br />
|-<br />
| 8<br />
| Ben Lippmeier<br />
| benl23<br />
| 10,11,12<br />
| GHC bug squashing.<br />
|-<br />
| 9<br />
| David Himmelstrup<br />
| Lemmih<br />
| 10,11,12<br />
| cabal-test, QuickCheck, Hackage, cabal-intall.<br />
|-<br />
| 10<br />
| Ross Paterson<br />
|<br />
| ?<br />
| Hackage<br />
|-<br />
| 11<br />
| Simon Marlow<br />
| JaffaCake<br />
| 1 or 2 days<br />
| Everything<br />
|- <br />
| 12<br />
| Björn Bringert<br />
| bringert<br />
| 10,11,12<br />
| Hackage, libraries, QuickCheck 2, GHC<br />
|-<br />
| 13<br />
| Benedikt Schmidt<br />
| beschmi<br />
| 10,11,12<br />
| darcs, GHC-api+Emacs, crypto<br />
|-<br />
| 14<br />
| Lennart Kolmodin<br />
| kolmodin<br />
| 10,11,12<br />
| Cabal, Binary ByteStrings, tools<br />
|-<br />
| 15<br />
| Kirsten Chevalier<br />
| Binkley<br />
| 10,11,12<br />
| GHC, whatever else looks interesting<br />
|-<br />
| 16<br />
| David Waern<br />
| waern<br />
| 10,11,12<br />
| Haddock-GHC<br />
|-<br />
| 17<br />
| Ketil Malde<br />
| kzm<br />
| 10,11,12<br />
| A GHC port, bio and concurrency<br />
|-<br />
|}<br />
<br />
== Arriving ==<br />
<br />
If you are arriving via air and want to meet up for the trip up to<br />
Oxford, add you details here, so people can arrange to travel together.<br />
<br />
Keep these sorted by airport/ arrival times.<br />
<br />
Arriving at Heathrow:<br />
<br />
{|<br />
|-<br />
! Name<br />
! Heathrow<br />
! Arrival date/time<br />
! Flight <br />
! Terminal<br />
|-<br />
| kolmodin<br />
| Heathrow<br />
| 2007-01-09 4:15pm<br />
| KL1021<br />
|<br />
|-<br />
| Binkley<br />
| Heathrow<br />
| 2007-01-10 5:55am<br />
| UA958<br />
|<br />
|-<br />
| dons<br />
| Heathrow<br />
| 2007-01-10 6:20am<br />
| QF31<br />
| 4<br />
|<br />
|-<br />
| bringert<br />
| Heathrow<br />
| 2007-01-10 8:25am<br />
| SK523<br />
|<br />
|}<br />
<br />
Suggested meeting place at Heathrow:<br />
<br />
Getting from Heathrow to Oxford can be done via bus, see the [http://www.oxfordbus.co.uk/pdfs/airlinetimesoct06.pdf timetable](pdf).<br />
<br />
Arriving at Gatwick:<br />
<br />
{|<br />
|-<br />
! Name<br />
! Gatwick<br />
! Arrival date/time<br />
! Flight<br />
|-<br />
| naur<br />
| Gatwick<br />
| 1007-01-09 6:55pm<br />
| NB433<br />
|-<br />
| lemmih<br />
| Gatwick<br />
| 1007-01-10 01:40pm<br />
| NB431<br />
|}<br />
<br />
Arriving at Stanstead:<br />
<br />
{|<br />
|-<br />
! Name<br />
! Stansted<br />
! Arrival date/time<br />
! Flight <br />
|-<br />
| waern<br />
| Stansted<br />
| 2007-01-09 11:10am<br />
| 965<br />
|-<br />
| pepe<br />
| Stansted<br />
| 2007-01-09 6:10pm<br />
| 3840<br />
|-<br />
| beschmi<br />
| Stansted<br />
| 2007-01-10 6:40am<br />
| 4U2332<br />
|-<br />
| Ketil<br />
| Stansted<br />
| 2007-01-09 19:30<br />
| DY1318<br />
|-<br />
|}<br />
<br />
Suggested meeting place at Stanstead:<br />
<br />
== Accomodation ==<br />
<br />
A number of accomdation options are available. To organise to share,<br />
contact other attendees on irc or via email. <br />
<br />
=== Eurobar ===<br />
<br />
The<br />
[http://www.activehotels.com/servlet/xmlbrochure/index.do?hotelid=116496& Eurobar Cafe & Hotel]. It's quite close to the center of town, and near the bus stop and train station.<br />
<br />
People staying here:<br />
<br />
* dons<br />
* bringert<br />
* beschmi<br />
* naur (4 nights, 9th-13th)<br />
<br />
=== YHA ===<br />
<br />
I (pepe) will go YHA in order to save some Euros (I need to stay for<br />
four nights, due to the few Valencia-London flight choices). If anyone<br />
else will go to YHA too, we could make a joint reservation.<br />
<br />
The hostel seems to be quite close to center and train station too.<br />
<br />
People staying at a YHA hostel:<br />
<br />
* pepe<br />
* ndm (3 nights, 10th-13th)<br />
* waern (4 nights, 9th-13th)<br />
* Ketil (probably - 9-12th)<br />
<br />
=== Backpackers' Hostel ===<br />
<br />
I (Binkley) am staying at the [http://www.hostels.co.uk/index.php?content=home.htm Oxford Backpackers' Hostel]. Anyone else?<br />
<br />
* Binkley (2 nights, 10th and 11th)<br />
<br />
=== Other accomdation ===<br />
<br />
These are full, but clicking on them gives you a list of alternatives:<br />
<br />
* [http://www.lintonlodge.activehotels.com/BBA&subid=R1543223 Linton Lodge]<br />
* [http://www.cotswoldlodgehotel.activehotels.com/BBA&subid=R1543223 Cotswold Lodge]</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac_2007/Projects&diff=9919Hac 2007/Projects2007-01-05T17:43:28Z<p>Thorkilnaur: </p>
<hr />
<div>* Darcs<br />
* GHC<br />
* libraries bugs<br />
* integrating SoC code<br />
* new releases <br />
* AJAX/HAppS?<br />
* Yhc + Cabal + Base<br />
* Haskell installer project, Gtk2Hs/GHC/Hugs/Cabal unified installer for Windows<br />
* Gtk2Hs + Gtk + GHC + Windows + Threads<br />
<br />
* porting libraries<br />
* new library/tool releases<br />
* compiler ports: want to get YHC running on your favourite machine?<br />
* new tools<br />
* infrastructure hacking: cabal, hackage<br />
* documentation<br />
* tutorials<br />
* bug squashing<br />
* feature implementations (walk the Trac list)<br />
* External core (Yhc and GHC): Making the (Haskell) external core interpreter in ghc/utils/ext-core work (again?)<br />
* A suitable low overhead GHC (+ others?) run time system interface to Integer C functions<br />
* http://hackage.haskell.org/trac/ghc/ticket/595 (Overhaul GHC's overlapping/non-exhaustive pattern checking)<br />
* Mac OS X test failures (ghc-6.6 and ghc-HEAD)</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Hac_2007/Projects&diff=9900Hac 2007/Projects2007-01-04T20:58:55Z<p>Thorkilnaur: Adding ext-core and RTS<->Integer function interface items</p>
<hr />
<div>* Darcs<br />
* GHC<br />
* libraries bugs<br />
* integrating SoC code<br />
* new releases <br />
* AJAX/HAppS?<br />
* Yhc + Cabal + Base<br />
* Haskell installer project, Gtk2Hs/GHC/Hugs/Cabal unified installer for Windows<br />
* Gtk2Hs + Gtk + GHC + Windows + Threads<br />
<br />
* porting libraries<br />
* new library/tool releases<br />
* compiler ports: want to get YHC running on your favourite machine?<br />
* new tools<br />
* infrastructure hacking: cabal, hackage<br />
* documentation<br />
* tutorials<br />
* bug squashing<br />
* feature implementations (walk the Trac list)<br />
* External core (Yhc and GHC): Making the (Haskell) external core interpreter in ghc/utils/ext-core work (again?)<br />
* A suitable low overhead GHC (+ others?) run time system interface to Integer C functions</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Sudoku&diff=4294Sudoku2006-06-08T18:48:11Z<p>Thorkilnaur: </p>
<hr />
<div>[[Category:Idioms]]<br />
<br />
Here are a few sodoku solvers coded up in Haskell...<br />
<br />
== Serious, Non-Deterministic Solver ==<br />
<br />
Here is a solver by CaleGibbard [http://www.haskell.org/hawiki/CaleGibbard/BSDLicense]. It possibly looks even more naïve than it actually is. This does a backtracking search, trying possibilities until it finds one which works, and backtracking when it can no longer make a legal move.<br />
<br />
<haskell><br />
import MonadNondet (option)<br />
import Sudoku<br />
import System<br />
import Control.Monad<br />
<br />
forM = flip mapM<br />
<br />
solve = forM [(i,j) | i <- [1..9], j <- [1..9]] $ \(i,j) -> do<br />
v <- valAt (i,j) -- ^ for each board position<br />
when (v == 0) $ do -- if it's empty (we represent that with a 0)<br />
a <- option [1..9] -- pick a number<br />
place (i,j) a -- and try to put it there<br />
<br />
main = do<br />
[f] <- getArgs<br />
xs <- readFile f<br />
putStrLn $ evalSudoku $ do { readSudoku xs; solve; showSudoku }<br />
</haskell><br />
<br />
Now, to the meat of the thing, the monad which makes the above look so nice. We construct a monad which is suitable for maintaining Sudoku grids and trying options nondeterministically. Note that outside of this module, it's impossible to create a state which has an invalid Sudoku grid, since the only way to update the state handles the check to ensure that the move is legal.<br />
<br />
<haskell><br />
{-# OPTIONS_GHC -fglasgow-exts #-}<br />
module Sudoku <br />
(Sudoku,<br />
readSudoku,<br />
runSudoku,<br />
evalSudoku,<br />
execSudoku,<br />
showSudoku,<br />
valAt, rowAt, colAt, boxAt,<br />
place)<br />
where<br />
import Data.Array.Diff<br />
import MonadNondet<br />
import Control.Monad.State<br />
<br />
-- Nondet here is a drop-in replacement for [] (the list monad) which just runs a little faster.<br />
newtype Sudoku a = Sudoku (StateT (DiffUArray (Int,Int) Int) Nondet a)<br />
deriving (Functor, Monad, MonadPlus)<br />
<br />
{- -- That is, we could also use the following, which works exactly the same way.<br />
newtype Sudoku a = Sudoku (StateT (DiffUArray (Int,Int) Int) [] a)<br />
deriving (Functor, Monad, MonadPlus)<br />
-}<br />
<br />
initialSudokuArray = listArray ((1,1),(9,9)) [0,0..]<br />
<br />
runSudoku (Sudoku k) = runNondet (runStateT k initialSudokuArray)<br />
<br />
evalSudoku = fst . runSudoku<br />
execSudoku = snd . runSudoku<br />
<br />
showSudoku = Sudoku $ do<br />
a <- get<br />
return $ unlines [unwords [show (a ! (i,j)) | j <- [1..9]] | i <- [1..9]]<br />
<br />
readSudoku :: String -> Sudoku ()<br />
readSudoku xs = sequence_ $ do<br />
(i,ys) <- zip [1..9] (lines xs)<br />
(j,n) <- zip [1..9] (words ys)<br />
return $ place (i,j) (read n)<br />
<br />
valAt' (i,j) = do<br />
a <- get<br />
return (a ! (i,j))<br />
<br />
rowAt' (i,j) = mapM valAt' [(i, k) | k <- [1..9]]<br />
<br />
colAt' (i,j) = mapM valAt' [(k, j) | k <- [1..9]] <br />
<br />
boxAt' (i,j) = mapM valAt' [(i' + u, j' + v) | u <- [1..3], v <- [1..3]]<br />
where i' = ((i-1) `div` 3) * 3<br />
j' = ((j-1) `div` 3) * 3<br />
<br />
valAt = Sudoku . valAt'<br />
rowAt = Sudoku . rowAt'<br />
colAt = Sudoku . colAt'<br />
boxAt = Sudoku . boxAt'<br />
<br />
-- This is the least trivial part.<br />
-- It just guards to make sure that the move is legal,<br />
-- and updates the array in the state if it is.<br />
place :: (Int,Int) -> Int -> Sudoku ()<br />
place (i,j) n = Sudoku $ do<br />
v <- valAt' (i,j)<br />
when (v == 0 && n /= 0) $ do<br />
rs <- rowAt' (i,j)<br />
cs <- colAt' (i,j)<br />
bs <- boxAt' (i,j)<br />
guard $ not . any (== n) $ rs ++ cs ++ bs<br />
a <- get<br />
put (a // [((i,j),n)])<br />
</haskell><br />
<br />
This is a fast NonDeterminism monad. It's a drop-in replacement for the list monad in this case. It's twice as fast when compiled with optimisations but a little slower without. You can also find it on the wiki at NonDeterminism.<br />
<br />
I've made a few small modifications to this one to hopefully make it more concretely readable.<br />
<br />
<haskell><br />
{-# OPTIONS_GHC -fglasgow-exts #-}<br />
<br />
module MonadNondet where<br />
<br />
import Control.Monad<br />
import Control.Monad.Trans<br />
<br />
import Control.Monad.Identity<br />
<br />
newtype NondetT m a<br />
= NondetT { foldNondetT :: (forall b. (a -> m b -> m b) -> m b -> m b) }<br />
<br />
runNondetT :: (Monad m) => NondetT m a -> m a<br />
runNondetT m = foldNondetT m (\x xs -> return x) (error "No solution found.")<br />
<br />
instance (Functor m) => Functor (NondetT m) where<br />
fmap f (NondetT g) = NondetT (\cons nil -> g (cons . f) nil)<br />
<br />
instance (Monad m) => Monad (NondetT m) where<br />
return a = NondetT (\cons nil -> cons a nil)<br />
m >>= k = NondetT (\cons nil -> foldNondetT m (\x -> foldNondetT (k x) cons) nil)<br />
<br />
instance (Monad m) => MonadPlus (NondetT m) where<br />
mzero = NondetT (\cons nil -> nil)<br />
m1 `mplus` m2 = NondetT (\cons -> foldNondetT m1 cons . foldNondetT m2 cons)<br />
<br />
instance MonadTrans NondetT where<br />
lift m = NondetT (\cons nil -> m >>= \a -> cons a nil)<br />
<br />
newtype Nondet a = Nondet (NondetT Identity a) deriving (Functor, Monad, MonadPlus)<br />
runNondet (Nondet x) = runIdentity (runNondetT x)<br />
<br />
foldNondet :: Nondet a -> (a -> b -> b) -> b -> b<br />
foldNondet (Nondet nd) cons nil =<br />
runIdentity $ foldNondetT nd (\x xs -> return (cons x (runIdentity xs))) (return nil)<br />
<br />
option :: (MonadPlus m) => [a] -> m a<br />
option = msum . map return<br />
</haskell><br />
<br />
<br />
<br />
<br />
== Simple Solver ==<br />
<br />
By AlsonKemp. This solver is probably similar to Cale's but I don't grok the non-deterministic monad...<br />
<br />
Note: this solver is exhaustive and will output all of the solutions, not just the first one. In order to make it non-exchaustive, add a case statement to solve' in order to check "r" and branch on the result.<br />
<br />
<haskell><br />
import System<br />
import Control.Monad<br />
import Data.List<br />
import Data.Array.IO<br />
<br />
type SodokuBoard = IOArray Int Int<br />
<br />
main = do<br />
[f] <- getArgs<br />
a <- newArray (1, 81) 0<br />
readFile f >>= readSodokuBoard a<br />
putStrLn "Original:"<br />
printSodokuBoard a<br />
putStrLn "Solutions:"<br />
solve a (1,1)<br />
<br />
readSodokuBoard a xs = sequence_ $ do (i,ys) <- zip [1..9] (lines xs)<br />
(j,n) <- zip [1..9] (words ys)<br />
return $ writeBoard a (j,i) (read n)<br />
<br />
printSodokuBoard a =<br />
let printLine a y =<br />
mapM (\x -> readBoard a (x,y)) [1..9] >>= mapM_ (putStr . show) in<br />
putStrLn "-----------" >> <br />
mapM_ (\y -> putStr "|" >> printLine a y >> putStrLn "|") [1..9] >> <br />
putStrLn "-----------"<br />
<br />
-- the meat of the program. Checks the current square.<br />
-- If 0, then get the list of nums and try to "solve' "<br />
-- Otherwise, go to the next square.<br />
solve :: SodokuBoard -> (Int, Int) -> IO (Maybe SodokuBoard)<br />
solve a (10,y) = solve a (1,y+1)<br />
solve a (_, 10)= printSodokuBoard a >> return (Just a)<br />
solve a (x,y) = do v <- readBoard a (x,y)<br />
case v of<br />
0 -> availableNums a (x,y) >>= solve' a (x,y)<br />
_ -> solve a (x+1,y)<br />
-- solve' handles the backtacking<br />
where solve' a (x,y) [] = return Nothing<br />
solve' a (x,y) (v:vs) = do writeBoard a (x,y) v -- put a guess onto the board<br />
r <- solve a (x+1,y)<br />
writeBoard a (x,y) 0 -- remove the guess from the board<br />
solve' a (x,y) vs -- recurse over the remainder of the list<br />
<br />
-- get the "taken" numbers from a row, col or box.<br />
getRowNums a y = sequence [readBoard a (x',y) | x' <- [1..9]]<br />
getColNums a x = sequence [readBoard a (x,y') | y' <- [1..9]]<br />
getBoxNums a (x,y) = sequence [readBoard a (x'+u, y'+v) | u <- [0..2], v <- [0..2]] <br />
where x' = (3 * ((x-1) `quot` 3)) + 1<br />
y' = (3 * ((y-1) `quot` 3)) + 1<br />
<br />
-- return the numbers that are available for a particular square<br />
availableNums a (x,y) = do r <- getRowNums a y <br />
c <- getColNums a x<br />
b <- getBoxNums a (x,y)<br />
return $ [0..9] \\ (r `union` c `union` b) <br />
<br />
-- aliases of read and write array that flatten the index<br />
readBoard a (x,y) = readArray a (x+9*(y-1))<br />
writeBoard a (x,y) e = writeArray a (x+9*(y-1)) e<br />
</haskell><br />
<br />
== Complete decision tree ==<br />
<br />
By Henning Thielemann.<br />
<br />
<haskell><br />
module Sudoku where<br />
<br />
{-<br />
This is inspired by John Hughes "Why Functional Programming Matters".<br />
We build a complete decision tree.<br />
That is, all alternatives in a certain depth<br />
have the same number of determined values.<br />
At the bottom of the tree all possible solutions can be found.<br />
Actually the algorithm is very stupid:<br />
In each depth we look for the field with the least admissible choices of numbers<br />
and prune the alternative branches for the other fields.<br />
-}<br />
<br />
import Data.Char (ord, chr)<br />
import Data.Array (Array, range, (!), (//))<br />
import Data.Tree (Tree)<br />
import qualified Data.Tree as Tree<br />
import Data.List (sort, minimumBy)<br />
import Data.Maybe (catMaybes, isNothing, fromMaybe, fromJust)<br />
import qualified Data.Array as Array<br />
<br />
{-<br />
Example:<br />
<br />
ghci -Wall Sudoku.hs<br />
<br />
*Sudoku> mapM putCLn (solutions exampleHawiki0)<br />
-}<br />
<br />
<br />
{- [[ATree]] contains a list of possible alternatives for each position -}<br />
data ATree a = ANode T [[ATree a]]<br />
<br />
type Coord = Int<br />
type Address = (Int,Int,Int,Int)<br />
type Element = Int<br />
<br />
type T = Array Address (Maybe Element)<br />
type Complete = Array Address Element<br />
<br />
fieldBounds :: (Address, Address)<br />
fieldBounds = ((0,0,0,0), (2,2,2,2))<br />
<br />
squareRange :: [(Coord, Coord)]<br />
squareRange = range ((0,0), (2,2))<br />
<br />
alphabet :: [Element]<br />
alphabet = [1..9]<br />
<br />
<br />
<br />
{- * solution -}<br />
<br />
{-<br />
Given two sorted lists,<br />
remove the elements of the first list from the second one.<br />
-}<br />
deleteSorted :: Ord a => [a] -> [a] -> [a]<br />
deleteSorted [] ys = ys<br />
deleteSorted _ [] = []<br />
deleteSorted (x:xs) (y:ys) =<br />
case compare x y of<br />
EQ -> deleteSorted xs ys<br />
LT -> deleteSorted xs (y:ys)<br />
GT -> y : deleteSorted (x:xs) ys<br />
<br />
admissibleNumbers :: [[Maybe Element]] -> [Element]<br />
admissibleNumbers =<br />
foldl (flip deleteSorted) alphabet .<br />
map (sort . catMaybes)<br />
<br />
admissibleAdditions :: T -> Address -> [Element]<br />
admissibleAdditions sudoku (i,j,k,l) =<br />
admissibleNumbers (map ($ sudoku)<br />
[selectRow (i,k),<br />
selectColumn (j,l),<br />
selectSquare (i,j)])<br />
<br />
allAdmissibleAdditions :: T -> [(Address, [Element])]<br />
allAdmissibleAdditions sudoku =<br />
let adds addr =<br />
(addr, admissibleAdditions sudoku addr)<br />
in map adds<br />
(map fst (filter (isNothing . snd)<br />
(Array.assocs sudoku)))<br />
<br />
<br />
<br />
solutionTree :: T -> ATree T<br />
solutionTree sudoku =<br />
let new (addr,elms) =<br />
map (\elm -> solutionTree (sudoku // [(addr, Just elm)])) elms<br />
in ANode sudoku (map new (allAdmissibleAdditions sudoku))<br />
<br />
treeAltToStandard :: ATree T -> Tree T<br />
treeAltToStandard (ANode sudoku subs) =<br />
Tree.Node sudoku (concatMap (map treeAltToStandard) subs)<br />
<br />
{- Convert a tree with alternatives for each position (ATree)<br />
into a normal tree by choosing one position and its alternative values.<br />
We need to consider only one position per level<br />
because the remaining positions are processed in the sub-levels.<br />
With other words: Choosing more than one position<br />
would lead to multiple reports of the same solution.<br />
<br />
For reasons of efficiency<br />
we choose the position with the least number of alternatives.<br />
If this number is zero, the numbers tried so far are wrong.<br />
If this number is one, then the choice is unique, but maybe still wrong.<br />
If the number of alternatives is larger,<br />
we have to check each alternative.<br />
-}<br />
treeAltToStandardOptimize :: ATree T -> Tree T<br />
treeAltToStandardOptimize (ANode sudoku subs) =<br />
let chooseMinLen [] = []<br />
chooseMinLen xs = minimumBy compareLength xs<br />
in Tree.Node sudoku (chooseMinLen<br />
(map (map treeAltToStandardOptimize) subs))<br />
<br />
maybeComplete :: T -> Maybe Complete<br />
maybeComplete sudoku =<br />
fmap (Array.array fieldBounds)<br />
(mapM (uncurry (fmap . (,))) (Array.assocs sudoku))<br />
<br />
{- All leafs are at the same depth,<br />
namely the number of undetermined fields.<br />
That's why we can safely select all Sudokus at the lowest level. -}<br />
solutions :: T -> [Complete]<br />
solutions sudoku =<br />
let err = error "The lowest level should contain complete Sudokus only."<br />
{- "last'" is more efficient than "last" here<br />
because the program does not have to check<br />
whether deeper levels exist.<br />
We know that the tree is as deep<br />
as the number of undefined fields.<br />
This means that dropMatch returns a singleton list.<br />
We don't check that<br />
because then we would lose the efficiency again. -}<br />
last' = head . dropMatch (filter isNothing (Array.elems sudoku))<br />
in map (fromMaybe err . maybeComplete)<br />
(last' (Tree.levels<br />
(treeAltToStandardOptimize (solutionTree sudoku))))<br />
<br />
<br />
<br />
{- * transformations (can be used for construction, too) -}<br />
<br />
standard :: Complete<br />
standard =<br />
Array.listArray fieldBounds<br />
(map (\(i,j,k,l) -> mod (j+k) 3 * 3 + mod (i+l) 3 + 1)<br />
(range fieldBounds))<br />
<br />
<br />
exampleHawiki0, exampleHawiki1 :: T<br />
exampleHawiki0 = fromString (unlines [<br />
" 5 6 1",<br />
" 48 7 ",<br />
"8 52",<br />
"2 57 3 ",<br />
" ",<br />
" 3 69 5",<br />
"79 8",<br />
" 1 65 ",<br />
"5 3 6 "<br />
])<br />
<br />
exampleHawiki1 = fromString (unlines [<br />
" 6 8 ",<br />
" 2 ",<br />
" 1 ",<br />
" 7 1 2",<br />
"5 3 ",<br />
" 4 ",<br />
" 42 1 ",<br />
"3 7 6 ",<br />
" 5 "<br />
])<br />
<br />
<br />
<br />
<br />
check :: Complete -> Bool<br />
check sudoku =<br />
let checkParts select =<br />
all (\addr -> sort (select addr sudoku) == alphabet) squareRange<br />
in all checkParts [selectRow, selectColumn, selectSquare]<br />
<br />
selectRow, selectColumn, selectSquare ::<br />
(Coord,Coord) -> Array Address element -> [element]<br />
selectRow (i,k) sudoku =<br />
map (sudoku!) (range ((i,0,k,0), (i,2,k,2)))<br />
-- map (sudoku!) (map (\(j,l) -> (i,j,k,l)) squareRange)<br />
selectColumn (j,l) sudoku =<br />
map (sudoku!) (range ((0,j,0,l), (2,j,2,l)))<br />
selectSquare (i,j) sudoku =<br />
map (sudoku!) (range ((i,j,0,0), (i,j,2,2)))<br />
<br />
<br />
{- * conversion from and to strings -}<br />
<br />
put, putLn :: T -> IO ()<br />
put sudoku = putStr (toString sudoku)<br />
putLn sudoku = putStrLn (toString sudoku)<br />
<br />
putC, putCLn :: Complete -> IO ()<br />
putC sudoku = putStr (toString (fmap Just sudoku))<br />
putCLn sudoku = putStrLn (toString (fmap Just sudoku))<br />
<br />
fromString :: String -> T<br />
fromString str =<br />
Array.array fieldBounds (concat<br />
(zipWith (\(i,k) -> map (\((j,l),x) -> ((i,j,k,l),x)))<br />
squareRange<br />
(map (zip squareRange . map charToElem) (lines str))))<br />
<br />
toString :: T -> String<br />
toString sudoku =<br />
unlines<br />
(map (\(i,k) -> map (\(j,l) -> elemToChar (sudoku!(i,j,k,l)))<br />
squareRange)<br />
squareRange)<br />
<br />
charToElem :: Char -> Maybe Element<br />
charToElem c =<br />
toMaybe ('0'<=c && c<='9') (ord c - ord '0')<br />
<br />
elemToChar :: Maybe Element -> Char<br />
elemToChar =<br />
maybe ' ' (\c -> chr (ord '0' + c))<br />
<br />
<br />
{- * helper functions -}<br />
<br />
nest :: Int -> (a -> a) -> a -> a<br />
nest 0 _ x = x<br />
nest n f x = f (nest (n-1) f x)<br />
<br />
toMaybe :: Bool -> a -> Maybe a<br />
toMaybe False _ = Nothing<br />
toMaybe True x = Just x<br />
<br />
compareLength :: [a] -> [b] -> Ordering<br />
compareLength (_:xs) (_:ys) = compareLength xs ys<br />
compareLength [] [] = EQ<br />
compareLength (_:_) [] = GT<br />
compareLength [] (_:_) = LT<br />
<br />
{- | Drop as many elements as the first list is long -}<br />
dropMatch :: [b] -> [a] -> [a]<br />
dropMatch xs ys =<br />
map fromJust (dropWhile isNothing<br />
(zipWith (toMaybe . null) (iterate (drop 1) xs) ys))<br />
</haskell><br />
<br />
<br />
== No guessing ==<br />
<br />
By Simon Peyton Jones.<br />
<br />
Since this page is here I thought I'd add a solver I wrote sometime last year. The main constraint I imposed is that it never guesses, and that it outputs a human-comprehensible explanation of every step of its reasoning. That means there are some puzzles it can't solve. I'd be interested to know if there are any puzzles that it gets stuck on where there is a no-guessing way forward. I made no attempt to make it fast.<br />
<br />
There are two files: [[Media:SudokuPJ.hs]] and [[Media:TestPJ.hs]]. The latter just contains a bunch of test cases; I was too lazy to write a proper parser.<br />
<br />
The main entry point is:<br />
<pre><br />
run1 :: Verbosity -> [String] -> Doc<br />
data Verbosity = All | Terse | Final<br />
</pre><br />
The <tt>[String]</tt> the starting board configuration (see the tests file).<br />
<br />
== Just guessing ==<br />
<br />
By Chris Kuklewicz<br />
<br />
This solver is an implementation of Knuth's "Dancing Links" algorithm for solving binary-cover problems. This algorithm represents the constraints as a sparse binary matrix, with 1's as linked nodes. The nodes are in a vertical and a horizontal doubly linked list, and each vertical list is headed by another node that represents one of the constraints. It is interesting as an example of the rare beast in Haskell: a mutable data structure. The code has been rewritten and cleaned up here [[Media:DancingSudoku.lhs]]. Its main routine is designed to handle the input from [http://www.csse.uwa.edu.au/~gordon/sudoku17 sudoku17] on stdin. Currently it only returns the first solution or calls an error, it can be modified (see comments in the file) to return all solutions in a list. An earlier version used ST.Lazy instead of ST.Strict which made operating on puzzles with many solutions more tractable.<br />
<br />
Other trivia: It uses "mdo" and lazyness to initialize some of the doubly linked lists.<br />
<br />
== Generalized solver ==<br />
<br />
By Thorkil Naur<br />
<br />
This Su Doku solver is able to solve classes of Su Doku puzzles that extend the ordinary 9*9 puzzles. The [[SuDokuThorkilNaurDocument|documentation]] describes the solver and also some (to the present author at least) surprising properties of various reduction strategies used when solving Su Doku puzzles.<br />
<br />
The following files comprise the Su Doku solver and related code:<br />
<br />
[[Media:Format.hs]]<br />
[[Media:Merge.hs]]<br />
[[Media:SdkMSol2.hs]]<br />
[[Media:SortByF.hs]]<br />
[[Media:SuDoku.hs]]<br />
[[Media:t40.hs]]<br />
[[Media:t44.hs]]<br />
[[Media:Test.hs]]<br />
<br />
For an example of use, the command<br />
<br />
<pre><br />
runhugs SdkMSol2 \<br />
tn1 \<br />
Traditional 3 \<br />
-#123456789 \<br />
1-53---9- \<br />
---6----- \<br />
------271 \<br />
82------- \<br />
---487--- \<br />
------53- \<br />
23------- \<br />
--7-59--- \<br />
--6---8-4<br />
</pre><br />
<br />
produces output that, among other things, contain<br />
<br />
<pre><br />
tn1: Solutions:<br />
1 7 5 3 2 8 4 9 6<br />
9 4 2 6 7 1 3 8 5<br />
3 6 8 5 9 4 2 7 1<br />
8 2 9 1 3 5 6 4 7<br />
6 5 3 4 8 7 9 1 2<br />
7 1 4 9 6 2 5 3 8<br />
2 3 1 8 4 6 7 5 9<br />
4 8 7 2 5 9 1 6 3<br />
5 9 6 7 1 3 8 2 4<br />
</pre><br />
<br />
== Simple Small Solver ==<br />
I haven't looked at the other solvers in detail yet, so I'm not sure what is good or bad about mine, but here it is:<br />
<br />
http://darcs.brianweb.net/sudoku/Sudoku.pdf<br />
http://darcs.brianweb.net/sudoku/src/Sudoku.lhs<br />
<br />
-Brian Alliet <brian@brianweb.net><br />
<br />
== Add Your Own ==<br />
<br />
If you have a Sudoku solver you're proud of, put it here. This ought to be a good way of helping people learn some fun, intermediate-advanced techniques in Haskell.<br />
<br />
== Test Boards ==<br />
<br />
Here's an input file to test the solvers on. Zeroes represent blanks.<br />
<pre><br />
0 5 0 0 6 0 0 0 1<br />
0 0 4 8 0 0 0 7 0<br />
8 0 0 0 0 0 0 5 2<br />
2 0 0 0 5 7 0 3 0<br />
0 0 0 0 0 0 0 0 0<br />
0 3 0 6 9 0 0 0 5<br />
7 9 0 0 0 0 0 0 8<br />
0 1 0 0 0 6 5 0 0<br />
5 0 0 0 3 0 0 6 0<br />
</pre><br />
<br />
A nefarious one:<br />
<br />
<pre><br />
0 0 0 0 6 0 0 8 0<br />
0 2 0 0 0 0 0 0 0<br />
0 0 1 0 0 0 0 0 0<br />
0 7 0 0 0 0 1 0 2<br />
5 0 0 0 3 0 0 0 0<br />
0 0 0 0 0 0 4 0 0<br />
0 0 4 2 0 1 0 0 0<br />
3 0 0 7 0 0 6 0 0<br />
0 0 0 0 0 0 0 5 0 <br />
</pre><br />
<br />
Chris Kuklewicz writes, "You can go get the 36,628 distict minimal puzzles from<br />
[http://www.csse.uwa.edu.au/~gordon/sudokumin.php csse.uwa.edu] that have only 17 clues. Then you can run all of them through your program to locate the most evil ones, and use them on your associates."</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Sudoku/Thorkil_Naur&diff=4293Sudoku/Thorkil Naur2006-06-08T18:45:41Z<p>Thorkilnaur: </p>
<hr />
<div>== Describing the Su Doku solver and related code ==<br />
<br />
2006-Jun-03 / Thorkil Naur<br />
<br />
== Introduction: Representing the board ==<br />
<br />
SuDoku.hs contains functions for solving SuDoku puzzles. The board<br />
under consideration is represented by a rectangular array of fields.<br />
(These "fields" are called "cells" in other SuDoku-related writings,<br />
sorry about that.) For each field, the set of possible elements that<br />
may be placed in the field is maintained.<br />
<br />
An ordinary SuDoku puzzle uses a 9*9 array and the possible elements<br />
are the digits 1, 2, .. 9. Initially, the fields with given contents<br />
in the SuDoku puzzle hold a set containing just the single given<br />
element. And the blank fields of the puzzle hold the set of all<br />
possible elements.<br />
<br />
== Solving: Reduction and trials ==<br />
<br />
Solving works by reducing the size of the sets that represent<br />
possible field contents in a sequence of steps. A solution has been<br />
found when each set contains exactly one element.<br />
<br />
If reduction alone fails to produce a solution, a single trial step<br />
is taken: A field with (the fewest number of) non-single possiblities<br />
is selected and each possibility is tried one by one. For each<br />
possibility, renewed reduction is performed recursively, possibly<br />
leading to further trial steps and so on, until a solution is found.<br />
The solutions produced by each trial are combined, thus all solutions<br />
will be found.<br />
<br />
This solution strategy is implemented by the sdkSolve function.<br />
<br />
== Constraint sets ==<br />
<br />
Basic reduction is performed on one constraint set at a time. A<br />
constraint set is some selection of fields that must fulfill the<br />
basic SoDuko condition: That each field must contain precisely one<br />
element. And that all fields in the constraint set must contain<br />
different elements.<br />
<br />
For ordinary SoDuko puzzles, the constraint sets are the nine rows,<br />
the nine columns and the nine 3*3 squares that subdivide the 9*9<br />
board.<br />
<br />
The SuDoku solver is parameterized over the constraint sets. It is<br />
not restricted to solve ordinary 9*9 SuDoku puzzles.<br />
<br />
The basic board is assumed to be a rectangular array of fields. A<br />
constraint set is then represented by the list of indexes that<br />
address the fields of the constraint set. For example, the upper<br />
right 3*3 square constraint set of an ordinary 9*9 SuDoku puzzle is<br />
represented by the list (array indexes are 0-based):<br />
<pre><br />
[(0,6),(0,7),(0,8),(1,6),(1,7),(1,8),(2,6),(2,7),(2,8)]<br />
</pre><br />
The function sdkConstraintSetsTraditional computes constraint sets<br />
for a class of SuDoku puzzles called "traditional" which is a n^2*n^2<br />
square that generalizes the ordinary SuDoku puzzle that has n=3. The<br />
function sdkConstraintSetsClover computes constraint sets for a<br />
class of puzzles called "clover" that consists of 5 n^2*n^2 squares<br />
in a clover-like pattern with a single n*n square of each "leaf"<br />
square overlapping the "center" square. The clover pattern is<br />
illustrated for n=3 as follows:<br />
<pre><br />
. . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . . . . .<br />
. . . . . . . . .<br />
. . . . . . . . .<br />
. . . . . . . . .<br />
. . . . . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . .<br />
. . . . . . . . . . . . . . . . . .<br />
</pre><br />
Additional classes of SuDoku puzzles may be defined similarly.<br />
<br />
== Reducing the board ==<br />
<br />
A single round of board reduction is performed by doing a basic<br />
reduction on each constraint set (the function sdkBoardReduceAll).<br />
Reduction closure, then, repeatedly performs single board reductions<br />
until the board changes no more (the function sdkBoardClosure).<br />
<br />
== Basic reduction strategies: By field and by element ==<br />
<br />
Two different basic reduction strategies are implemented for a<br />
constraint set: Reduction by field and reduction by element.<br />
<br />
Field reduction is based on the consideration of subsets of fields of<br />
the constraint set to be reduced. For some subset of the fields, the<br />
union of the elements that can be contained in any of the fields is<br />
computed. If the number of elements in this union is less or equal to<br />
the size of the subset, the subset is said to be reducing and the<br />
elements of the union cannot be used outside this subset of fields.<br />
Hence the elements of the union can be removed from all the other<br />
fields of the constraint set.<br />
<br />
As an obvious special case of this, if a single field can only<br />
contain a single element, then that element can be excluded from all<br />
the other fields.<br />
<br />
Field reduction uses this idea repeatedly: The non-empty subsets of<br />
the fields of the constraint set are considered in order of<br />
increasing size. If a subset is found to be reducing, the element<br />
union is excluded from the remaining fields of the constraint set and<br />
field reduction is repeated on this remaining set of fields. Field<br />
reduction is done by function sdkReduceByField.<br />
<br />
(Technical note: sdkListLengthLE is used rather than comparison of<br />
list lengths to improve performance.)<br />
<br />
For element reduction, subsets of elements are considered. For some<br />
subset of elements, the set of fields that can contain any of the<br />
elements is computed. If the number of such fields equals the number<br />
of elements in the subset, any additional elements recorded as<br />
candidates for these fields can be excluded.<br />
<br />
For example, consider the subset {1,2} of elements and assume that we<br />
find that the only fields that may contain 1 or 2 have {1,2} and<br />
{1,2,3} as candidate element sets. Then 1 and 2 must occupy precisely<br />
these two fields and 3 can be excluded as a possibility for the<br />
second field.<br />
<br />
As for field reduction, element reduction uses this idea repeatedly,<br />
considering at each step the shortest reducing element subset<br />
(function sdkReduceByElement).<br />
<br />
== Field reduction and element reduction produce identical results ==<br />
<br />
It has come as a significant surprise to me that the two reduction<br />
strategies, although they certainly appear quite different to me,<br />
nevertheless produce identical results. At least in the practical<br />
circumstances of solving real SuDoku puzzles. And since field<br />
reduction is much faster than element reduction, the present version<br />
of the code uses field reduction only to find the final solutions:<br />
The call of sdkSolve in sdkProcessSuDoku uses by=sdkReduceByField.<br />
The element reduction code has been retained, however, for possible<br />
further experiments.<br />
<br />
== Command line interface to sdkSolve ==<br />
<br />
The Main module contained in SdkMSol2.hs provides a command line<br />
interface to the SuDoku solver. Here is an example of a call of<br />
the solver that uses runhugs:<br />
<pre><br />
runhugs SdkMSol2 \<br />
tn1 \<br />
Traditional 3 \<br />
-#123456789 \<br />
1-53---9- \<br />
---6----- \<br />
------271 \<br />
82------- \<br />
---487--- \<br />
------53- \<br />
23------- \<br />
--7-59--- \<br />
--6---8-4<br />
</pre><br />
This is a command for a Linux system. A similar command can be used<br />
under Windows. (I usually keep these long commmands in individual<br />
command files, i.e. Shell scripts or BAT files.) And, of course,<br />
SdkMSol2 can be compiled by GHC and run in a similar manner.<br />
<br />
The first parameter "tn1" is simply a name for the puzzle used in the<br />
output. In this case, the first (and so far only) SuDoku puzzle<br />
invented by Yours Truly. The next parameter "Traditional" selects<br />
the class of puzzle desired. Following parameters may be used to<br />
qualify specific puzzles within the class, in this case the "3" which<br />
selects the ordinary 9*9 SuDoku puzzle.<br />
<br />
The remaining parameters lay out the initial contents of the<br />
rectangular board. Parameters of the form<br />
<pre><br />
<character>#<list of characters><br />
</pre><br />
("#" is used rather than "=" which gives problems in BAT files) are<br />
definitions where the first character is defined to represent the set<br />
of characters listed. Thus, the parameter "-#123456789" defines "-"<br />
to represent the set "123456789". Parameters not of this form<br />
represent rows of the, generally rectangular, board: In such a row,<br />
characters that have been "defined" represent their set, other<br />
characters represent the set containing that single character.<br />
<br />
(The command line interface thus restricts the elements used by the<br />
solver to be individual characters. However, the solver itself is not<br />
restricted to handle single-character elements.)<br />
<br />
Notice that the puzzle class with parameters represents the<br />
constraint sets used independently of the board, whose shape is<br />
basically defined by the number of rows specified and their maximum<br />
length. Conflicts are not verified explicitly, but generally result<br />
in (sometimes obscure) runtime errors.<br />
<br />
Selected lines from the output of running the above command:<br />
<pre><br />
SdkMSol2: 2006-Jun-04 13.37<br />
SdkMSol2(tn1)<br />
Height 9 Width 9<br />
1-53---9-<br />
---6-----<br />
------271<br />
82-------<br />
---487---<br />
------53-<br />
23-------<br />
--7-59---<br />
--6---8-4<br />
<br />
tn1: Problem:<br />
1 123456789 5 3 123456789 123456789 123456789 9 123456789<br />
123456789 123456789 123456789 6 123456789 123456789 123456789 123456789 123456789<br />
123456789 123456789 123456789 123456789 123456789 123456789 2 7 1<br />
8 2 123456789 123456789 123456789 123456789 123456789 123456789 123456789<br />
123456789 123456789 123456789 4 8 7 123456789 123456789 123456789<br />
123456789 123456789 123456789 123456789 123456789 123456789 5 3 123456789<br />
2 3 123456789 123456789 123456789 123456789 123456789 123456789 123456789<br />
123456789 123456789 7 123456789 5 9 123456789 123456789 123456789<br />
123456789 123456789 6 123456789 123456789 123456789 8 123456789 4<br />
<br />
tn1: Closure by field:<br />
...<br />
1 78 5 3 27 28 4 9 6<br />
79 479 2 6 1479 14 3 8 5<br />
369 4689 3489 589 49 458 2 7 1<br />
8 2 139 159 1369 1356 1679 4 79<br />
3569 1569 139 4 8 7 169 16 2<br />
679 14679 149 129 1269 126 5 3 8<br />
2 3 18 18 46 46 79 5 79<br />
4 18 7 128 5 9 16 126 3<br />
59 59 6 7 123 123 8 12 4<br />
<br />
<br />
tn1: Solutions:<br />
1 7 5 3 2 8 4 9 6<br />
9 4 2 6 7 1 3 8 5<br />
3 6 8 5 9 4 2 7 1<br />
8 2 9 1 3 5 6 4 7<br />
6 5 3 4 8 7 9 1 2<br />
7 1 4 9 6 2 5 3 8<br />
2 3 1 8 4 6 7 5 9<br />
4 8 7 2 5 9 1 6 3<br />
5 9 6 7 1 3 8 2 4<br />
<br />
<br />
tn1: Total of 1 solutions<br />
tn1: CPU Used: 53.4<br />
</pre><br />
Thus, the problem is stated (in two different ways), the sequence of<br />
intermediate boards resulting from performing field reduction on the<br />
initial board is printed and, finally, all the solutions are printed.<br />
<br />
(And since field reduction is also carried out, starting from the<br />
initial board, as part of finding the solution, field reduction of<br />
the initial board is actually carred out twice. Something that may be<br />
changed by editing the sdkProcessSuDoku function.)<br />
<br />
Here is an example of a command for solving a 16*16 SuDoku puzzle:<br />
<pre><br />
runhugs SdkMSol2 \<br />
MasterSUDOKU_106_20051208 \<br />
Traditional 4 \<br />
-#0123456789ABCDEF \<br />
--6--37--B-C--E- \<br />
-C4A08D-5-7-2--- \<br />
-9--F----0--C1-- \<br />
-1E8--6-2D-4--5- \<br />
F-CBE---12-39-7- \<br />
-A8-B-----F7---1 \<br />
7-D4-9---C-0---8 \<br />
--------D-9--B-- \<br />
--2--0-9-------- \<br />
E---8-A---4-12-B \<br />
4---67-----F-90- \<br />
-0-FD-C1---E38-5 \<br />
-B--4-97-E--80A- \<br />
--F0--2----9--3- \<br />
---E-F-3-A0B6C1- \<br />
-4--C-0--81--F--<br />
</pre><br />
The final example uses the clover class:<br />
<pre><br />
runhugs SdkMSol2 \<br />
JuleSuDoku_Fem_I_En_20060102 \<br />
Clover 3 \<br />
-#123456789 \<br />
---6327-1...--7---23- \<br />
--24--5-6...4--1----- \<br />
--85---9-...1-5-8--7- \<br />
94----127...-6----8-5 \<br />
1-5------...-3---714- \<br />
87--9----...-41-62-97 \<br />
5873-------3----3--19 \<br />
--4--8----4----52--6- \<br />
2---65-----9---7--58- \<br />
......5-----12-...... \<br />
......-8---67-9...... \<br />
......--1372---...... \<br />
64---9----14----4---- \<br />
--263-------------74- \<br />
-93-4----93----5-3--2 \<br />
----68-7-...2-5--8-9- \<br />
---------...84--9-57- \<br />
5--3--84-...-----5-26 \<br />
--54-36--...7-------- \<br />
2--9-5--7...-5438-61- \<br />
-3782----...--37694--<br />
</pre><br />
Notice the dots (".") used. They do not enter any constraint sets,<br />
but are needed to fill out the board.<br />
<br />
== Performance ==<br />
<br />
A single performance improvement has been implemented: It is the<br />
matter mentioned above that relates to sdkListLengthLE. I have no<br />
idea how the performance of this solver compares to other solvers.<br />
But it is clear that considerable improvement, I would guess<br />
certainly one, perhaps even two, orders of magnitude, would result<br />
from using bit vectors rather than Haskell Strings to represent<br />
sets.<br />
<br />
== Experimenting with reduction strategies ==<br />
<br />
The main module in T44.hs uses miscellaneous functions in SuDoku.hs<br />
to exhaustively check whether field reduction is identical to<br />
element reduction under reasonable assumptions.<br />
<br />
== Test ==<br />
<br />
The Main module in T40.hs contains test code.<br />
<br />
== Final words ==<br />
<br />
Best wishes<br />
Thorkil Naur</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=Sudoku&diff=4275Sudoku2006-06-07T21:50:19Z<p>Thorkilnaur: </p>
<hr />
<div>[[Category:Idioms]]<br />
<br />
Here are a few sodoku solvers coded up in Haskell...<br />
<br />
== Serious, Non-Deterministic Solver ==<br />
<br />
Here is a solver by CaleGibbard [http://www.haskell.org/hawiki/CaleGibbard/BSDLicense]. It possibly looks even more naïve than it actually is. This does a backtracking search, trying possibilities until it finds one which works, and backtracking when it can no longer make a legal move.<br />
<br />
<haskell><br />
import MonadNondet (option)<br />
import Sudoku<br />
import System<br />
import Control.Monad<br />
<br />
forM = flip mapM<br />
<br />
solve = forM [(i,j) | i <- [1..9], j <- [1..9]] $ \(i,j) -> do<br />
v <- valAt (i,j) -- ^ for each board position<br />
when (v == 0) $ do -- if it's empty (we represent that with a 0)<br />
a <- option [1..9] -- pick a number<br />
place (i,j) a -- and try to put it there<br />
<br />
main = do<br />
[f] <- getArgs<br />
xs <- readFile f<br />
putStrLn $ evalSudoku $ do { readSudoku xs; solve; showSudoku }<br />
</haskell><br />
<br />
Now, to the meat of the thing, the monad which makes the above look so nice. We construct a monad which is suitable for maintaining Sudoku grids and trying options nondeterministically. Note that outside of this module, it's impossible to create a state which has an invalid Sudoku grid, since the only way to update the state handles the check to ensure that the move is legal.<br />
<br />
<haskell><br />
{-# OPTIONS_GHC -fglasgow-exts #-}<br />
module Sudoku <br />
(Sudoku,<br />
readSudoku,<br />
runSudoku,<br />
evalSudoku,<br />
execSudoku,<br />
showSudoku,<br />
valAt, rowAt, colAt, boxAt,<br />
place)<br />
where<br />
import Data.Array.Diff<br />
import MonadNondet<br />
import Control.Monad.State<br />
<br />
-- Nondet here is a drop-in replacement for [] (the list monad) which just runs a little faster.<br />
newtype Sudoku a = Sudoku (StateT (DiffUArray (Int,Int) Int) Nondet a)<br />
deriving (Functor, Monad, MonadPlus)<br />
<br />
{- -- That is, we could also use the following, which works exactly the same way.<br />
newtype Sudoku a = Sudoku (StateT (DiffUArray (Int,Int) Int) [] a)<br />
deriving (Functor, Monad, MonadPlus)<br />
-}<br />
<br />
initialSudokuArray = listArray ((1,1),(9,9)) [0,0..]<br />
<br />
runSudoku (Sudoku k) = runNondet (runStateT k initialSudokuArray)<br />
<br />
evalSudoku = fst . runSudoku<br />
execSudoku = snd . runSudoku<br />
<br />
showSudoku = Sudoku $ do<br />
a <- get<br />
return $ unlines [unwords [show (a ! (i,j)) | j <- [1..9]] | i <- [1..9]]<br />
<br />
readSudoku :: String -> Sudoku ()<br />
readSudoku xs = sequence_ $ do<br />
(i,ys) <- zip [1..9] (lines xs)<br />
(j,n) <- zip [1..9] (words ys)<br />
return $ place (i,j) (read n)<br />
<br />
valAt' (i,j) = do<br />
a <- get<br />
return (a ! (i,j))<br />
<br />
rowAt' (i,j) = mapM valAt' [(i, k) | k <- [1..9]]<br />
<br />
colAt' (i,j) = mapM valAt' [(k, j) | k <- [1..9]] <br />
<br />
boxAt' (i,j) = mapM valAt' [(i' + u, j' + v) | u <- [1..3], v <- [1..3]]<br />
where i' = ((i-1) `div` 3) * 3<br />
j' = ((j-1) `div` 3) * 3<br />
<br />
valAt = Sudoku . valAt'<br />
rowAt = Sudoku . rowAt'<br />
colAt = Sudoku . colAt'<br />
boxAt = Sudoku . boxAt'<br />
<br />
-- This is the least trivial part.<br />
-- It just guards to make sure that the move is legal,<br />
-- and updates the array in the state if it is.<br />
place :: (Int,Int) -> Int -> Sudoku ()<br />
place (i,j) n = Sudoku $ do<br />
v <- valAt' (i,j)<br />
when (v == 0 && n /= 0) $ do<br />
rs <- rowAt' (i,j)<br />
cs <- colAt' (i,j)<br />
bs <- boxAt' (i,j)<br />
guard $ not . any (== n) $ rs ++ cs ++ bs<br />
a <- get<br />
put (a // [((i,j),n)])<br />
</haskell><br />
<br />
This is a fast NonDeterminism monad. It's a drop-in replacement for the list monad in this case. It's twice as fast when compiled with optimisations but a little slower without. You can also find it on the wiki at NonDeterminism.<br />
<br />
I've made a few small modifications to this one to hopefully make it more concretely readable.<br />
<br />
<haskell><br />
{-# OPTIONS_GHC -fglasgow-exts #-}<br />
<br />
module MonadNondet where<br />
<br />
import Control.Monad<br />
import Control.Monad.Trans<br />
<br />
import Control.Monad.Identity<br />
<br />
newtype NondetT m a<br />
= NondetT { foldNondetT :: (forall b. (a -> m b -> m b) -> m b -> m b) }<br />
<br />
runNondetT :: (Monad m) => NondetT m a -> m a<br />
runNondetT m = foldNondetT m (\x xs -> return x) (error "No solution found.")<br />
<br />
instance (Functor m) => Functor (NondetT m) where<br />
fmap f (NondetT g) = NondetT (\cons nil -> g (cons . f) nil)<br />
<br />
instance (Monad m) => Monad (NondetT m) where<br />
return a = NondetT (\cons nil -> cons a nil)<br />
m >>= k = NondetT (\cons nil -> foldNondetT m (\x -> foldNondetT (k x) cons) nil)<br />
<br />
instance (Monad m) => MonadPlus (NondetT m) where<br />
mzero = NondetT (\cons nil -> nil)<br />
m1 `mplus` m2 = NondetT (\cons -> foldNondetT m1 cons . foldNondetT m2 cons)<br />
<br />
instance MonadTrans NondetT where<br />
lift m = NondetT (\cons nil -> m >>= \a -> cons a nil)<br />
<br />
newtype Nondet a = Nondet (NondetT Identity a) deriving (Functor, Monad, MonadPlus)<br />
runNondet (Nondet x) = runIdentity (runNondetT x)<br />
<br />
foldNondet :: Nondet a -> (a -> b -> b) -> b -> b<br />
foldNondet (Nondet nd) cons nil =<br />
runIdentity $ foldNondetT nd (\x xs -> return (cons x (runIdentity xs))) (return nil)<br />
<br />
option :: (MonadPlus m) => [a] -> m a<br />
option = msum . map return<br />
</haskell><br />
<br />
<br />
<br />
<br />
== Simple Solver ==<br />
<br />
By AlsonKemp. This solver is probably similar to Cale's but I don't grok the non-deterministic monad...<br />
<br />
Note: this solver is exhaustive and will output all of the solutions, not just the first one. In order to make it non-exchaustive, add a case statement to solve' in order to check "r" and branch on the result.<br />
<br />
<haskell><br />
import System<br />
import Control.Monad<br />
import Data.List<br />
import Data.Array.IO<br />
<br />
type SodokuBoard = IOArray Int Int<br />
<br />
main = do<br />
[f] <- getArgs<br />
a <- newArray (1, 81) 0<br />
readFile f >>= readSodokuBoard a<br />
putStrLn "Original:"<br />
printSodokuBoard a<br />
putStrLn "Solutions:"<br />
solve a (1,1)<br />
<br />
readSodokuBoard a xs = sequence_ $ do (i,ys) <- zip [1..9] (lines xs)<br />
(j,n) <- zip [1..9] (words ys)<br />
return $ writeBoard a (j,i) (read n)<br />
<br />
printSodokuBoard a =<br />
let printLine a y =<br />
mapM (\x -> readBoard a (x,y)) [1..9] >>= mapM_ (putStr . show) in<br />
putStrLn "-----------" >> <br />
mapM_ (\y -> putStr "|" >> printLine a y >> putStrLn "|") [1..9] >> <br />
putStrLn "-----------"<br />
<br />
-- the meat of the program. Checks the current square.<br />
-- If 0, then get the list of nums and try to "solve' "<br />
-- Otherwise, go to the next square.<br />
solve :: SodokuBoard -> (Int, Int) -> IO (Maybe SodokuBoard)<br />
solve a (10,y) = solve a (1,y+1)<br />
solve a (_, 10)= printSodokuBoard a >> return (Just a)<br />
solve a (x,y) = do v <- readBoard a (x,y)<br />
case v of<br />
0 -> availableNums a (x,y) >>= solve' a (x,y)<br />
_ -> solve a (x+1,y)<br />
-- solve' handles the backtacking<br />
where solve' a (x,y) [] = return Nothing<br />
solve' a (x,y) (v:vs) = do writeBoard a (x,y) v -- put a guess onto the board<br />
r <- solve a (x+1,y)<br />
writeBoard a (x,y) 0 -- remove the guess from the board<br />
solve' a (x,y) vs -- recurse over the remainder of the list<br />
<br />
-- get the "taken" numbers from a row, col or box.<br />
getRowNums a y = sequence [readBoard a (x',y) | x' <- [1..9]]<br />
getColNums a x = sequence [readBoard a (x,y') | y' <- [1..9]]<br />
getBoxNums a (x,y) = sequence [readBoard a (x'+u, y'+v) | u <- [0..2], v <- [0..2]] <br />
where x' = (3 * ((x-1) `quot` 3)) + 1<br />
y' = (3 * ((y-1) `quot` 3)) + 1<br />
<br />
-- return the numbers that are available for a particular square<br />
availableNums a (x,y) = do r <- getRowNums a y <br />
c <- getColNums a x<br />
b <- getBoxNums a (x,y)<br />
return $ [0..9] \\ (r `union` c `union` b) <br />
<br />
-- aliases of read and write array that flatten the index<br />
readBoard a (x,y) = readArray a (x+9*(y-1))<br />
writeBoard a (x,y) e = writeArray a (x+9*(y-1)) e<br />
</haskell><br />
<br />
== Complete decision tree ==<br />
<br />
By Henning Thielemann.<br />
<br />
<haskell><br />
module Sudoku where<br />
<br />
{-<br />
This is inspired by John Hughes "Why Functional Programming Matters".<br />
We build a complete decision tree.<br />
That is, all alternatives in a certain depth<br />
have the same number of determined values.<br />
At the bottom of the tree all possible solutions can be found.<br />
Actually the algorithm is very stupid:<br />
In each depth we look for the field with the least admissible choices of numbers<br />
and prune the alternative branches for the other fields.<br />
-}<br />
<br />
import Data.Char (ord, chr)<br />
import Data.Array (Array, range, (!), (//))<br />
import Data.Tree (Tree)<br />
import qualified Data.Tree as Tree<br />
import Data.List (sort, minimumBy)<br />
import Data.Maybe (catMaybes, isNothing, fromMaybe, fromJust)<br />
import qualified Data.Array as Array<br />
<br />
{-<br />
Example:<br />
<br />
ghci -Wall Sudoku.hs<br />
<br />
*Sudoku> mapM putCLn (solutions exampleHawiki0)<br />
-}<br />
<br />
<br />
{- [[ATree]] contains a list of possible alternatives for each position -}<br />
data ATree a = ANode T [[ATree a]]<br />
<br />
type Coord = Int<br />
type Address = (Int,Int,Int,Int)<br />
type Element = Int<br />
<br />
type T = Array Address (Maybe Element)<br />
type Complete = Array Address Element<br />
<br />
fieldBounds :: (Address, Address)<br />
fieldBounds = ((0,0,0,0), (2,2,2,2))<br />
<br />
squareRange :: [(Coord, Coord)]<br />
squareRange = range ((0,0), (2,2))<br />
<br />
alphabet :: [Element]<br />
alphabet = [1..9]<br />
<br />
<br />
<br />
{- * solution -}<br />
<br />
{-<br />
Given two sorted lists,<br />
remove the elements of the first list from the second one.<br />
-}<br />
deleteSorted :: Ord a => [a] -> [a] -> [a]<br />
deleteSorted [] ys = ys<br />
deleteSorted _ [] = []<br />
deleteSorted (x:xs) (y:ys) =<br />
case compare x y of<br />
EQ -> deleteSorted xs ys<br />
LT -> deleteSorted xs (y:ys)<br />
GT -> y : deleteSorted (x:xs) ys<br />
<br />
admissibleNumbers :: [[Maybe Element]] -> [Element]<br />
admissibleNumbers =<br />
foldl (flip deleteSorted) alphabet .<br />
map (sort . catMaybes)<br />
<br />
admissibleAdditions :: T -> Address -> [Element]<br />
admissibleAdditions sudoku (i,j,k,l) =<br />
admissibleNumbers (map ($ sudoku)<br />
[selectRow (i,k),<br />
selectColumn (j,l),<br />
selectSquare (i,j)])<br />
<br />
allAdmissibleAdditions :: T -> [(Address, [Element])]<br />
allAdmissibleAdditions sudoku =<br />
let adds addr =<br />
(addr, admissibleAdditions sudoku addr)<br />
in map adds<br />
(map fst (filter (isNothing . snd)<br />
(Array.assocs sudoku)))<br />
<br />
<br />
<br />
solutionTree :: T -> ATree T<br />
solutionTree sudoku =<br />
let new (addr,elms) =<br />
map (\elm -> solutionTree (sudoku // [(addr, Just elm)])) elms<br />
in ANode sudoku (map new (allAdmissibleAdditions sudoku))<br />
<br />
treeAltToStandard :: ATree T -> Tree T<br />
treeAltToStandard (ANode sudoku subs) =<br />
Tree.Node sudoku (concatMap (map treeAltToStandard) subs)<br />
<br />
{- Convert a tree with alternatives for each position (ATree)<br />
into a normal tree by choosing one position and its alternative values.<br />
We need to consider only one position per level<br />
because the remaining positions are processed in the sub-levels.<br />
With other words: Choosing more than one position<br />
would lead to multiple reports of the same solution.<br />
<br />
For reasons of efficiency<br />
we choose the position with the least number of alternatives.<br />
If this number is zero, the numbers tried so far are wrong.<br />
If this number is one, then the choice is unique, but maybe still wrong.<br />
If the number of alternatives is larger,<br />
we have to check each alternative.<br />
-}<br />
treeAltToStandardOptimize :: ATree T -> Tree T<br />
treeAltToStandardOptimize (ANode sudoku subs) =<br />
let chooseMinLen [] = []<br />
chooseMinLen xs = minimumBy compareLength xs<br />
in Tree.Node sudoku (chooseMinLen<br />
(map (map treeAltToStandardOptimize) subs))<br />
<br />
maybeComplete :: T -> Maybe Complete<br />
maybeComplete sudoku =<br />
fmap (Array.array fieldBounds)<br />
(mapM (uncurry (fmap . (,))) (Array.assocs sudoku))<br />
<br />
{- All leafs are at the same depth,<br />
namely the number of undetermined fields.<br />
That's why we can safely select all Sudokus at the lowest level. -}<br />
solutions :: T -> [Complete]<br />
solutions sudoku =<br />
let err = error "The lowest level should contain complete Sudokus only."<br />
{- "last'" is more efficient than "last" here<br />
because the program does not have to check<br />
whether deeper levels exist.<br />
We know that the tree is as deep<br />
as the number of undefined fields.<br />
This means that dropMatch returns a singleton list.<br />
We don't check that<br />
because then we would lose the efficiency again. -}<br />
last' = head . dropMatch (filter isNothing (Array.elems sudoku))<br />
in map (fromMaybe err . maybeComplete)<br />
(last' (Tree.levels<br />
(treeAltToStandardOptimize (solutionTree sudoku))))<br />
<br />
<br />
<br />
{- * transformations (can be used for construction, too) -}<br />
<br />
standard :: Complete<br />
standard =<br />
Array.listArray fieldBounds<br />
(map (\(i,j,k,l) -> mod (j+k) 3 * 3 + mod (i+l) 3 + 1)<br />
(range fieldBounds))<br />
<br />
<br />
exampleHawiki0, exampleHawiki1 :: T<br />
exampleHawiki0 = fromString (unlines [<br />
" 5 6 1",<br />
" 48 7 ",<br />
"8 52",<br />
"2 57 3 ",<br />
" ",<br />
" 3 69 5",<br />
"79 8",<br />
" 1 65 ",<br />
"5 3 6 "<br />
])<br />
<br />
exampleHawiki1 = fromString (unlines [<br />
" 6 8 ",<br />
" 2 ",<br />
" 1 ",<br />
" 7 1 2",<br />
"5 3 ",<br />
" 4 ",<br />
" 42 1 ",<br />
"3 7 6 ",<br />
" 5 "<br />
])<br />
<br />
<br />
<br />
<br />
check :: Complete -> Bool<br />
check sudoku =<br />
let checkParts select =<br />
all (\addr -> sort (select addr sudoku) == alphabet) squareRange<br />
in all checkParts [selectRow, selectColumn, selectSquare]<br />
<br />
selectRow, selectColumn, selectSquare ::<br />
(Coord,Coord) -> Array Address element -> [element]<br />
selectRow (i,k) sudoku =<br />
map (sudoku!) (range ((i,0,k,0), (i,2,k,2)))<br />
-- map (sudoku!) (map (\(j,l) -> (i,j,k,l)) squareRange)<br />
selectColumn (j,l) sudoku =<br />
map (sudoku!) (range ((0,j,0,l), (2,j,2,l)))<br />
selectSquare (i,j) sudoku =<br />
map (sudoku!) (range ((i,j,0,0), (i,j,2,2)))<br />
<br />
<br />
{- * conversion from and to strings -}<br />
<br />
put, putLn :: T -> IO ()<br />
put sudoku = putStr (toString sudoku)<br />
putLn sudoku = putStrLn (toString sudoku)<br />
<br />
putC, putCLn :: Complete -> IO ()<br />
putC sudoku = putStr (toString (fmap Just sudoku))<br />
putCLn sudoku = putStrLn (toString (fmap Just sudoku))<br />
<br />
fromString :: String -> T<br />
fromString str =<br />
Array.array fieldBounds (concat<br />
(zipWith (\(i,k) -> map (\((j,l),x) -> ((i,j,k,l),x)))<br />
squareRange<br />
(map (zip squareRange . map charToElem) (lines str))))<br />
<br />
toString :: T -> String<br />
toString sudoku =<br />
unlines<br />
(map (\(i,k) -> map (\(j,l) -> elemToChar (sudoku!(i,j,k,l)))<br />
squareRange)<br />
squareRange)<br />
<br />
charToElem :: Char -> Maybe Element<br />
charToElem c =<br />
toMaybe ('0'<=c && c<='9') (ord c - ord '0')<br />
<br />
elemToChar :: Maybe Element -> Char<br />
elemToChar =<br />
maybe ' ' (\c -> chr (ord '0' + c))<br />
<br />
<br />
{- * helper functions -}<br />
<br />
nest :: Int -> (a -> a) -> a -> a<br />
nest 0 _ x = x<br />
nest n f x = f (nest (n-1) f x)<br />
<br />
toMaybe :: Bool -> a -> Maybe a<br />
toMaybe False _ = Nothing<br />
toMaybe True x = Just x<br />
<br />
compareLength :: [a] -> [b] -> Ordering<br />
compareLength (_:xs) (_:ys) = compareLength xs ys<br />
compareLength [] [] = EQ<br />
compareLength (_:_) [] = GT<br />
compareLength [] (_:_) = LT<br />
<br />
{- | Drop as many elements as the first list is long -}<br />
dropMatch :: [b] -> [a] -> [a]<br />
dropMatch xs ys =<br />
map fromJust (dropWhile isNothing<br />
(zipWith (toMaybe . null) (iterate (drop 1) xs) ys))<br />
</haskell><br />
<br />
<br />
== No guessing ==<br />
<br />
By Simon Peyton Jones.<br />
<br />
Since this page is here I thought I'd add a solver I wrote sometime last year. The main constraint I imposed is that it never guesses, and that it outputs a human-comprehensible explanation of every step of its reasoning. That means there are some puzzles it can't solve. I'd be interested to know if there are any puzzles that it gets stuck on where there is a no-guessing way forward. I made no attempt to make it fast.<br />
<br />
There are two files: [[Media:SudokuPJ.hs]] and [[Media:TestPJ.hs]]. The latter just contains a bunch of test cases; I was too lazy to write a proper parser.<br />
<br />
The main entry point is:<br />
<pre><br />
run1 :: Verbosity -> [String] -> Doc<br />
data Verbosity = All | Terse | Final<br />
</pre><br />
The <tt>[String]</tt> the starting board configuration (see the tests file).<br />
<br />
== Just guessing ==<br />
<br />
By Chris Kuklewicz<br />
<br />
This solver is an implementation of Knuth's "Dancing Links" algorithm for solving binary-cover problems. This algorithm represents the constraints as a sparse binary matrix, with 1's as linked nodes. The nodes are in a vertical and a horizontal doubly linked list, and each vertical list is headed by another node that represents one of the constraints. It is interesting as an example of the rare beast in Haskell: a mutable data structure. The code has been rewritten and cleaned up here [[Media:DancingSudoku.lhs]]. Its main routine is designed to handle the input from [http://www.csse.uwa.edu.au/~gordon/sudoku17 sudoku17] on stdin. Currently it only returns the first solution or calls an error, it can be modified (see comments in the file) to return all solutions in a list. An earlier version used ST.Lazy instead of ST.Strict which made operating on puzzles with many solutions more tractable.<br />
<br />
Other trivia: It uses "mdo" and lazyness to initialize some of the doubly linked lists.<br />
<br />
== Generalized solver ==<br />
<br />
By Thorkil Naur<br />
<br />
This Su Doku solver is able to solve classes of Su Doku puzzles that extend the ordinary 9*9 puzzles. The documentation ([[Media:SuDoku1.txt]]) describes the solver and also some (to the present author at least) surprising properties of various reduction strategies used when solving Su Doku puzzles.<br />
<br />
The following files comprise the Su Doku solver and related code:<br />
<br />
[[Media:Format.hs]]<br />
[[Media:Merge.hs]]<br />
[[Media:SdkMSol2.hs]]<br />
[[Media:SortByF.hs]]<br />
[[Media:SuDoku.hs]]<br />
[[Media:t40.hs]]<br />
[[Media:t44.hs]]<br />
[[Media:Test.hs]]<br />
<br />
For an example of use, the command<br />
<br />
<pre><br />
runhugs SdkMSol2 \<br />
tn1 \<br />
Traditional 3 \<br />
-#123456789 \<br />
1-53---9- \<br />
---6----- \<br />
------271 \<br />
82------- \<br />
---487--- \<br />
------53- \<br />
23------- \<br />
--7-59--- \<br />
--6---8-4<br />
</pre><br />
<br />
produces output that, among other things, contain<br />
<br />
<pre><br />
tn1: Solutions:<br />
1 7 5 3 2 8 4 9 6<br />
9 4 2 6 7 1 3 8 5<br />
3 6 8 5 9 4 2 7 1<br />
8 2 9 1 3 5 6 4 7<br />
6 5 3 4 8 7 9 1 2<br />
7 1 4 9 6 2 5 3 8<br />
2 3 1 8 4 6 7 5 9<br />
4 8 7 2 5 9 1 6 3<br />
5 9 6 7 1 3 8 2 4<br />
</pre><br />
<br />
== Add Your Own ==<br />
<br />
If you have a Sudoku solver you're proud of, put it here. This ought to be a good way of helping people learn some fun, intermediate-advanced techniques in Haskell.<br />
<br />
== Test Boards ==<br />
<br />
Here's an input file to test the solvers on. Zeroes represent blanks.<br />
<pre><br />
0 5 0 0 6 0 0 0 1<br />
0 0 4 8 0 0 0 7 0<br />
8 0 0 0 0 0 0 5 2<br />
2 0 0 0 5 7 0 3 0<br />
0 0 0 0 0 0 0 0 0<br />
0 3 0 6 9 0 0 0 5<br />
7 9 0 0 0 0 0 0 8<br />
0 1 0 0 0 6 5 0 0<br />
5 0 0 0 3 0 0 6 0<br />
</pre><br />
<br />
A nefarious one:<br />
<br />
<pre><br />
0 0 0 0 6 0 0 8 0<br />
0 2 0 0 0 0 0 0 0<br />
0 0 1 0 0 0 0 0 0<br />
0 7 0 0 0 0 1 0 2<br />
5 0 0 0 3 0 0 0 0<br />
0 0 0 0 0 0 4 0 0<br />
0 0 4 2 0 1 0 0 0<br />
3 0 0 7 0 0 6 0 0<br />
0 0 0 0 0 0 0 5 0 <br />
</pre><br />
<br />
Chris Kuklewicz writes, "You can go get the 36,628 distict minimal puzzles from<br />
[http://www.csse.uwa.edu.au/~gordon/sudokumin.php csse.uwa.edu] that have only 17 clues. Then you can run all of them through your program to locate the most evil ones, and use them on your associates."</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=File:Test.hs&diff=4274File:Test.hs2006-06-07T21:49:42Z<p>Thorkilnaur: Haskell code supporting test. / Thorkil Naur</p>
<hr />
<div>Haskell code supporting test. / Thorkil Naur</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=File:T44.hs&diff=4273File:T44.hs2006-06-07T21:49:02Z<p>Thorkilnaur: Haskell code that compares reduction strategies. / Thorkil Naur</p>
<hr />
<div>Haskell code that compares reduction strategies. / Thorkil Naur</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=File:T40.hs&diff=4272File:T40.hs2006-06-07T21:47:44Z<p>Thorkilnaur: Haskell code testing SuDoku.hs. / Thorkil Naur</p>
<hr />
<div>Haskell code testing SuDoku.hs. / Thorkil Naur</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=File:SuDoku.hs&diff=4271File:SuDoku.hs2006-06-07T21:46:41Z<p>Thorkilnaur: Haskell code solving Su Doku puzzles. / Thorkil Naur</p>
<hr />
<div>Haskell code solving Su Doku puzzles. / Thorkil Naur</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=File:SortByF.hs&diff=4270File:SortByF.hs2006-06-07T21:45:47Z<p>Thorkilnaur: Haskell code providing sort interface. / Thorkil Naur</p>
<hr />
<div>Haskell code providing sort interface. / Thorkil Naur</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=File:SdkMSol2.hs&diff=4269File:SdkMSol2.hs2006-06-07T21:44:25Z<p>Thorkilnaur: Haskell Main module providing command line interface to the Su Doku solver SuDoku.hs. / Thorkil Naur</p>
<hr />
<div>Haskell Main module providing command line interface to the Su Doku solver SuDoku.hs. / Thorkil Naur</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=File:Merge.hs&diff=4268File:Merge.hs2006-06-07T21:43:04Z<p>Thorkilnaur: Haskell code to merge. / Thorkil Naur</p>
<hr />
<div>Haskell code to merge. / Thorkil Naur</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=File:Format.hs&diff=4267File:Format.hs2006-06-07T21:42:14Z<p>Thorkilnaur: Haskell code to perform simple string formatting. / Thorkil Naur</p>
<hr />
<div>Haskell code to perform simple string formatting. / Thorkil Naur</div>Thorkilnaurhttps://wiki.haskell.org/index.php?title=File:SuDoku1.txt&diff=4266File:SuDoku1.txt2006-06-07T21:40:32Z<p>Thorkilnaur: Document SuDoku.hs and surroundings. / TN</p>
<hr />
<div>Document SuDoku.hs and surroundings. / TN</div>Thorkilnaur