News aggregator

The beauty of Haskell

Haskell on Reddit - Wed, 04/30/2014 - 4:38am
Categories: Incoming News

ELI5: How do you write complete complex applications with Haskell?

Haskell on Reddit - Wed, 04/30/2014 - 3:38am

Hi folks,

Every time I look at functional programming languages (I've been a software developer for about two decades now but have never made more intense contact to functional languages) I wonder how you actually write applications with them? All examples that I have seen yet just deal with specific problems like sorting, searching, data aggregation and mathematical problems. But I haven't seen any real complete application yet that has a UI and all that fancy stuff an application consists of.

So are functional languages like Haskell only suitable for solving specific problems and algorithms and are other paradigms necessary to build the actual application around the functional algorithm? Or am I getting something completely wrong here?

Can someone please explain this to me? I'll be very grateful!

Cheers, Hendrik

submitted by SeveQStorm
[link] [9 comments]
Categories: Incoming News

The Identity monad trick

Haskell on Reddit - Wed, 04/30/2014 - 2:27am
Categories: Incoming News - Wed, 04/30/2014 - 1:46am
Categories: Offsite Blogs

Question on list comprehension

Haskell on Reddit - Wed, 04/30/2014 - 12:08am

I'm reading Hitchhiker's guide to Haskell, and chanced upon this list comprehension

let solve x = [ y | x <- [0..], y<-[0..], y == x * x ]

I tried running this on ghci and it doesn't evaluated, neither does

take 10 $ solve 16

My understanding is that the

y <- [0..]

does not ever end, hence the expression isn't evaluated

my second confusion is that below the list comprehension the author mentions

Yes, I know that finding a square root does not require list traversals,

which seem to suggest that the list comprehension above is used to find square root, but to me it looks like it wants to find the squares instead of the square root. Is that right?

submitted by ngzhian
[link] [8 comments]
Categories: Incoming News

The Identity monad trick - Tue, 04/29/2014 - 6:11pm
Categories: Offsite Blogs

Christopher Done: Presentations update

Planet Haskell - Tue, 04/29/2014 - 6:00pm

Just a small update. I took 15 mins and updated the haskell-mode printer a bit so that everything is indented by default, and lists are expanded as [1,2,…] rather than 1:(2:…).

Video demonstration!

Andrew Gibiansky contacted me about getting a front-end added for IHaskell, which would be lovely! I designed the present package specifically aimed at working on Emacs or the browser or wherever. So I sent him back an excessively long email about how to integrate it.

It might also be worth adding to tryhaskell, too. It’d be rather easy and helpful to newbies.

Also, update to the loeb example:

λ> :present loeb (map (\i l -> Node i (map (fmap (+1)) l)) [1..3]) [Node 1 [Tree Integer ,Node 3 [Node 3 [Tree Integer ,Tree Integer ,Node 6 [Node 5 [Node 6 [Tree Integer ,[Tree Integer]] ,[Tree Integer]] ,[Tree Integer]]] ,[Tree Integer]] ,Tree Integer] ,Tree Integer ,Tree Integer]

You can really drill down into those structures!

Categories: Offsite Blogs

OWL parser in Haskell

Haskell on Reddit - Tue, 04/29/2014 - 3:28pm

Is it possible to do a parser of OWL (Web Ontology Language) from the XMLSchema: ? And in the end of the parsing we have a structure in haskell that can be fetched. Using HXT or HaXML?

submitted by naoyrib
[link] [8 comments]
Categories: Incoming News

Summer Internships in Haskell

Haskell on Reddit - Tue, 04/29/2014 - 2:18pm

I'm an undergrad (a junior) and I'm looking for something to do over the summer. I love programming in Haskell. Does anyone know of any internships for programming in Haskell or companies which may be interested in hiring such an intern?


submitted by the_tractatus
[link] [9 comments]
Categories: Incoming News

Constrained monad overview for the naive?

Haskell on Reddit - Tue, 04/29/2014 - 12:11pm

I'm a dabbler in Haskell. A few months ago, I made another attempt at it, but ran into the constrained monad problem in my first toy project (dice probabilities, monad over map needs ord).

Now that I know the phrases "constrained monad" and "restricted monad", I can read up on it. I can find Oleg talking about it. I can find the ICFP paper by Sculthorpe, et al. What I can't find, though, is the recommended solution for beginners who run into the problem.

  • Should I just avoid it? I can't re-use the monadic machinery, but I can define my own functions easily.
  • Is there a ghc extension that I could use, that's reasonably well-accepted, that will make the problem go away?
  • Should I just buckle down and try one of the proposed work-arounds? If so, which one?
  • Is there a solution in the works?

Basically, is there a consensus recommendation for what to do?

submitted by oddthink
[link] [10 comments]
Categories: Incoming News

mapAccumL - Hoogle - Tue, 04/29/2014 - 11:58am
Categories: Offsite Blogs

Problem installing dependencies

Haskell on Reddit - Tue, 04/29/2014 - 10:19am

I am trying to install the dependencies for a project but I am running into this error:

Failed to install base-unicode-symbols- cabal: Error: some packages failed to install: base-unicode-symbols- failed during the final install step. The exception was: /tmp/pkgConf-base-unicode-symbols-0.2.25614.4: hGetContents: invalid argument (invalid byte sequence)

How do I fix it?



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

Chris Reade: Red-Black Neighbourhood Stencil Diagrams

Planet Haskell - Tue, 04/29/2014 - 10:05am
Red-Black Neighbourhood Stencil Diagrams (for Laplace)

In a previous blog Repa Laplace and SOR, I used Repa to implement a Laplace solver using the Red-Black scheme. The explanation of alternating stencils probably needed a diagram, so here it is.

This diagram illustrates the shapes of the stencils for adding neighbours of red and black cells. It shows that two different stencils are needed (for odd and even rows) and these are swapped over for red and black.

Red-Black Neighbour Stencils

(The diagram was produced with Haskell Diagrams)

Categories: Offsite Blogs