News aggregator

Philip Wadler: Are the Greens or UKIP a major party? Have your say.

Planet Haskell - Sat, 01/10/2015 - 9:33am
Ofcom has issued a draft ruling that the Greens are not a 'major party' but that UKIP is. Hard to justify, one might think, given that Carolyn Lucas has been a sitting MP since September 2008, while UKIP did not acquire its first MP until a by-election in October 2014. One consequence of Ofcom's decision is that the Greens may be shut out of any televised national election debates, while Farage is given a seat.

It's a draft ruling, and there is still time to have your say.
My own response to Ofcom is below.

Question 1: Please provide your views on:a) the evidence of current support laid out in Annex 2, andb) whether there is any other relevant evidence which you consider Ofcom should take intoaccount for the purposes of the 2015 review of the list of major parties:
The Green Party has had a sitting MP since September 2008, while UKIP has only had a sitting MP since October 2014. This relevant point appears nowhere in the annex.
Question 2: Do you agree with our assessment in relation to each of:a) The existing major parties,b) Traditional Unionist Voice in Northern Ireland,c) The Green Party (including the Scottish Green Party), andd) UKIP?Please provide reasons for your views:
It is a scandal to include UKIP as a major party while excluding the Greens. Either both should be included, or both excluded. I would prefer to see both included.
While UKIP enjoys stronger support than the Greens in current opinion polls, this is a shortlived phenomenon in part driven by the increased coverage recently given to UKIP by news media. Ofcom's role should be to dampen the effect of media focus on the current bandwagon, not to amplify it.
Ofcom should ensure that all serious contenders have an opportunity to make their views heard. The cutoff for being a 'serious contender' should sit at support from around 5% of the electorate.
Question 3: Do you agree with the proposed amendment to Rule 9 of the PPRB Rules Procedures outlined in paragraph 3.7 above? Please provide reasons for your views:
I do not agree with the proposed amendment. It is stated the parties 'might'' raise unsustainable complaints, but no evidence is provided that this is a serious problem. It is more democratic to leave the decision to the Election Commission than to give Ofcom the ability to refuse complaints without any right of appeal.
[I note also that the reference on the web form to 'paragraph 3.7 above' is confusing. Not only does the relevant paragraph not appear on the web page with the question, the web page does not even contain a link to the document containing the paragraph.] 
Categories: Offsite Blogs

Option Monads in Rust

del.icio.us/haskell - Sat, 01/10/2015 - 8:57am
Categories: Offsite Blogs

Parsing 2d arrays from text?

Haskell on Reddit - Sat, 01/10/2015 - 6:56am

Hey everyone. I've just started learning about Haskell in the past month or so, and am interested in using it more in programming challenges.

Many of these problems involve parsing a 2d array out of text fed from stdin, preferably into an array-like structure, but I'm not finding a straightforward way to do this.

What I have is as follows - it should take text that has a X and Y dimension as the first line, followed by the array data:

2 3 1 2 3 4 5 6

The code looks like this. Feels like I'm trying to cram a round peg into a square hole.

import Data.Map import Control.Monad parseMap :: Map (Int, Int) (Int, Int) -> String -> Int -> Map (Int, Int) (Int, Int) parseMap map row rowindex = fst $ Prelude.foldl (\(accum,colindex) elem->(insert (rowindex, colindex) (elem, undefined) accum, colindex+1)) (map,0) (Prelude.map read $ words row :: [Int]) main :: IO () main = do limits <- getLine let [nrows, _] = words limits map <- replicateM (read nrows) getLine let c = fst $ Prelude.foldl (\(accum,index) row->(parseMap accum row index,index+1)) ((fromList []), 0) map putStrLn $ show c

Any recommendations? Much appreciated!

submitted by digggggggggg
[link] [5 comments]
Categories: Incoming News

What happened to Named field punning?

Haskell on Reddit - Sat, 01/10/2015 - 2:25am

Anyone here knows what happened to Named field punning?

The discussion that prompted it.

It was proposed to add named field punning (now available by Record puns) to the Haskell standard. There is no indication in the ticket as to what happened then.

submitted by togrof
[link] [6 comments]
Categories: Incoming News

99 Haskell Problems - [Beginner]

Haskell on Reddit - Fri, 01/09/2015 - 6:46pm

Hi fellow Haskellers... Haskellerians... whatever we're called! I'm a senior computer science student at USF trying to learn the magical ways of functional programming, but more specifically, Haskell! I recently fell in love with type theory in my Programming Languages course where I learned how to program in SML and a lot of what there is to know about programming language theory (though I still feel VERY lost in the universe of information there is on this subject).

Anyway, point is, I recently stumbled upon a list of 99 problems that newbies Haskellers can do to demonstrate how well they wield Haskell and to point out flaws in their understanding. I'm making it a semester goal (outside of any mandatory coursework) to complete every problem on this list:

https://www.haskell.org/haskellwiki/H-99:_Ninety-Nine_Haskell_Problems

I hope you'll join me and/or watch my repository here, and perhaps give me some valuable tips/tricks/advice along the way:

https://github.com/tdietert/99Haskells

I'm VERY excited about learning all there is to know about this language from a personal standpoint-- I don't think I can honestly say I've ever been more passionate about anything. I'm already 75% of the way through Learn you a Haskell, and have Real World Haskell waiting for me on my shelf as soon as I finish the former!

On top of all that, cheers to all you wonderful people who post/comment on this subreddit that echo my enthusiasm, and to all those who contribute so greatly to this community! Together we can learn us a Haskell for great good! XD

submitted by swingtheory
[link] [6 comments]
Categories: Incoming News

Philip Wadler: Joe Sacco: On Satire

Planet Haskell - Fri, 01/09/2015 - 6:22pm
Joe Sacco is my favourite graphic-novel journalist. All of us deplore the attack on Charlie Hebdo, but his response is the most thoughtful analysis I've seen.
Categories: Offsite Blogs

foobarcode.me

del.icio.us/haskell - Fri, 01/09/2015 - 5:40pm
Categories: Offsite Blogs

foobarcode.me

del.icio.us/haskell - Fri, 01/09/2015 - 5:40pm
Categories: Offsite Blogs

foobarcode.me

del.icio.us/haskell - Fri, 01/09/2015 - 5:40pm
Categories: Offsite Blogs

foobarcode.me

del.icio.us/haskell - Fri, 01/09/2015 - 5:40pm
Categories: Offsite Blogs

foobarcode.me

del.icio.us/haskell - Fri, 01/09/2015 - 5:40pm
Categories: Offsite Blogs

foobarcode.me

del.icio.us/haskell - Fri, 01/09/2015 - 5:40pm
Categories: Offsite Blogs

foobarcode.me

del.icio.us/haskell - Fri, 01/09/2015 - 5:40pm
Categories: Offsite Blogs

foobarcode.me

del.icio.us/haskell - Fri, 01/09/2015 - 5:40pm
Categories: Offsite Blogs

foobarcode.me

del.icio.us/haskell - Fri, 01/09/2015 - 5:40pm
Categories: Offsite Blogs

foobarcode.me

del.icio.us/haskell - Fri, 01/09/2015 - 5:40pm
Categories: Offsite Blogs

Is there collection of exercises similar to 1HAD?

Haskell on Reddit - Fri, 01/09/2015 - 11:31am

I like the format of https://github.com/1HaskellADay/1HAD

You need to write one simple function and you can view a solution. Is there something similar?

submitted by dotneter
[link] [7 comments]
Categories: Incoming News

Question about "Type Theory & Functional Programming"

Haskell on Reddit - Thu, 01/08/2015 - 9:20pm

Following an endorsement of type theory in a recent comment thread, I decided to actually learn what it was, and started to read Simon Thompson's Type Theory & Functional Programming (and errata) which is just great. Having never taken any class that used the notation, this is the first time I've really had someone explain the rules of propositional logic, and I think I'm finally starting to wrap my head around the concept of a type as proposition and an object as proof. I'm finding it to be a great introduction to the subject.

If this is all old hat to you, then maybe you can help me with a question I've got.

In Chapter 4 on page 76, Thompson says:

Formation Rule for ⊥ -------------------- (⊥F) ⊥ is a formula

and we have no introduction rule associated with ⊥, as we know of no way of forming proofs of the absurd proposition.

And then on page 77 says:

Rule of Assumption A is a formula ------------------ (AS) x : A

But couldn't those be combined to give an introduction rule for ⊥?

---------------- (⊥F) ⊥ is a formula -------------------- (AS) x : ⊥

Making ⊥ inhabited?

I'm only four chapters in, so this may be covered later, but it's a bit of a stumbling block for me.

submitted by rampion
[link] [17 comments]
Categories: Incoming News