What are the interesting abstract and general concepts that a Haskeller might want to learn about? (when I say concepts I mean monads, lenses, ...) What are the examples of application of these concepts?
I would be most grateful for mentions of concepts based on some actual theory (in other words I prefer reading about discovered stuff rather than invented, to use the differentiation I hear from Philip Wadler).submitted by jd823592
[link] [2 comments]
Im using winGHCi but Im not quite sure how to install haste, I have downloaded and installet the haste installer from their website but then Im not sure how to use it. Do I have to install in in a certain path or something?
Cheers.submitted by Kablaow
[link] [2 comments]
Hi. I'm planning to (maybe) write a game of Hex in Haskell. How would I represent the board? Should I use a quadtree, or Vectors of Vectors, or something else? I need to be able to check easily if both ends are connected.
I'm planning to call it Hexal.
I'm planning to use minmax and I want to use pure code.submitted by jkabrg
[link] [27 comments]
Since Google also has a few projects in Haskell I was wondering if there is a styleguide that they use? It appears there are quite a few of them for other languages, see e.g. here.submitted by kapuzineralex
[link] [26 comments]
"Monadic Parsers: Implementing a micro Parsec" -- Omer Iqbal
"Explaining type classes that seem difficult for beginners" -- Tim Oxley and Michał J. GajdaMnO2
The rule of the people has the fairest name of all, isonomia, and does none of the things that a monarch does. The lot determines offices, power is held accountable, and deliberation is conducted in public. — Herodotus
In Athenian democracy, sortition was used to select their magistrates in order to avoid the oligarchs buying their way into the office. What would happen if we used a form of sortition to to select our parliament? Since most people are too busy and unprepared to sit in parliament, I propose the next best thing: the drawing of lots in a riding to select a person to chose the representative for the riding. What would happen?
The resulting system is a unique system that provides local representation and approximately proportional representation. Each party gets a chance to represent a riding in roughly proportion to the amount of support they have in the riding. Democracy means “rule of people”, not “rule of the majority” (nor “rule of the plurality”). Not only is it perfectly democratic for the minority to get an opportunity to be represented in parliament, it is more democratic than what we have in Canada now.
Of course, directly selecting a random person in a riding is fraught with difficulties, so instead one would vote, as we do now, for one’s preferred candidate. Then, once the votes are tallied, a candidate is selected randomly with probability proportional to the vote they received. In this system it is always best to vote for your preferred candidate. There will be no more strategic votes or vote splitting. Voting participation would go up since every vote increases the chances of your preferred candidate being selected. The resulting parliament will be close to the proportion of the number of votes received for each party without having MPs selected from a party list.
Imagine a world where we have Stochastic Elections Canada. Stochastic Election law requires that all counts be validated and recounted, if requested, before seat selection takes place. Because in every vote influences the outcome, we must await the return of the writs, scheduled by electoral law for Monday, November 9, 2015. For now, we can bring you our seat expectation chart based on preliminary 2015 election results:Expected Seat Distribution Party Expected Number of Seats
(95% confidence) Distribution Shape Animal Alliance/Environment Voters 0 – 1 ATN 0 Bloc Québécois 9 – 22 Canada Party 0 CAP 0 Christian Heritage Party 0 – 2 Communist 0 – 1 Conservative 91 – 122 Democratic Advancement 0 – 1 Forces et Démocratie - Allier les forces de nos régions 0 – 1 Green Party 5 – 18 Liberal 119 – 153 Libertarian 0 – 3 Marxist-Leninist 0 – 1 NDP-New Democratic Party 54 – 81 PACT 0 PC Party 0 – 1 Pirate 0 Radical Marijuana 0 – 1 Rhinoceros 0 – 1 Seniors Party 0 The Bridge 0 United Party 0 Independent 0 – 3 No Affiliation 0 – 1