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, Hendriksubmitted by SeveQStorm
[link] [9 comments]
I'm reading Hitchhiker's guide to Haskell, and chanced upon this list comprehensionlet solve x = [ y | x <- [0..], y<-[0..], y == x * x ]
I tried running this on ghci and it doesn't evaluated, neither doestake 10 $ solve 16
My understanding is that they <- [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]
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:…).
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!
Is it possible to do a parser of OWL (Web Ontology Language) from the XMLSchema: http://www.w3.org/2007/OWL/wiki/OWL_XML_Schema ? 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]
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?
Thanks!submitted by the_tractatus
[link] [9 comments]
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]
I am trying to install the dependencies for a project but I am running into this error:
Failed to install base-unicode-symbols-0.2.2.4 cabal: Error: some packages failed to install: base-unicode-symbols-0.2.2.4 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?
Jamessubmitted by jamesl22
[link] [7 comments]
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.
(The diagram was produced with Haskell Diagrams)