First off, I've never posted on here before, so I hope I'm doing this correctly.
Anyways I was wondering how I, as a new student, can expand my knowledge/familiarity with what haskell can be used for in the real world. My haskell class that I'm taking is kinda slow for me and my experience with coding, so I want to get a head start with some personal projects. Unfortunately, I'm not sure where to find exercises/projects that I can solve with haskell on my own, and I was hoping someone could point me in the right direction.
Basically, I'm asking what small project can I create using Haskell? A video game? A database? Something on a website?
I don't know much about Haskell, or functional programming, since I am mostly familiar with object oriented Java and Python, so again, not sure what to pursue to fully understand this aspect of the programming language.
I know I can read books and articles and such but for me and many other programmers I know, the best way to learn is to program in the language itself.
So again, I'm looking for what I can pursue as a small project to help me get ahead with familiarity with the language.
Any references or examples to get started would be much appreciated.
Thanks! -Presidentsubmitted by Clown_For_President
[link] [20 comments]
To celebrate the 750th anniversary of the first meeting of the British parliament, the BBC Today programme sponsored a special edition of The Public Philosopher, asking the question Why Democracy? The programme spent much time wondering why folk felt disenfranchised but spent barely two minutes on the question of how wealth distorts politics. (Three cheers to Shirley Williams for raising the issue.) An odd contrast, if you compare it to yesterday's story that the wealthiest 1% now own as much as the other 99% combined; or to Lawrence Lessig's Mayday campaign to stop politicians slanting their votes to what will help fund their reelection; or to Thomas Picketty's analysis of why the wealthy inevitably get wealthier. (tl;dr: "Piketty's thesis has been shorthanded as r > g: that the rate of return on capital today -- and through most of history -- has been higher than general economic growth. This means that simply having money is the best way to get more money.")
Given the proof of concept code below I'd like to be able to somehow perform my foo function with the ability to output the string Paul! and the possibility of getting its return value inside the InputT monad-transformer without using unsafePerformIO to remove the IO wrapper after runExceptT.import Control.Monad.Except import System.IO.Unsafe (unsafePerformIO) import System.Console.Haskeline type ErrorWithIO = ExceptT String IO foo :: String -> ErrorWithIO String foo "paul" = do liftIO $ putStrLn "Paul!" return "OK!" foo _ = throwError "ERROR!" runRepl :: IO () runRepl = runInputT defaultSettings $ loop loop :: InputT IO () loop = do line <- getInputLine "> " case line of Nothing -> return () Just input -> do return $ putStrLn "asd" case unsafePerformIO $ runExceptT $ foo input of Left err -> outputStrLn err >> loop Right res -> do x <- outputStrLn . show $ res loop main :: IO () main = runRepl >> putStrLn "Goodbye!"
Am I missing something obvious here?submitted by paullik
[link] [12 comments]
[Solved]I got it now sudo yum remove ghc* sudo yum autoremove sudo yum-config-manager --add-repo https://copr.fedoraproject.org/coprs/petersen/ghc-7.8.4/repo/fedora-21/petersen-ghc-7.8.4-fedora-21.repo sudo yum install ghc-7.8.4submitted by hornysama
[link] [22 comments]
I don't think I ever mentioned it here but, last semester I took a much-needed sabbatical. The main thing was to take a break from all the pressures of work and grad school and get back into a healthy headspace. Along the way I ended up pretty much dropping off the internet entirely. So if you've been missing me from various mailing lists and online communities, that's why. I'm back now. If you've tried getting in touch by email, irc, etc, and don't hear from me in the next few weeks, feel free ping me again.
This semester I'm teaching foundations of programming language theory with Jeremy Siek, and work on the dissertation continues apace. Over the break I had a few breakthrough moments thinking about the type system for chiastic lambda-calculi— which should help to clean up the normal forms for terms, as well as making room for extending the theory to include eta-conversion. Once the dust settles a bit I'll write some posts about it, as well as continuing the unification-fd tutorial I started last month.