Real World Haskell Bryan O'Sullivan, John Goerzen, Don Stewart on Amazon.com.FREE. shipping on qualifying offers. This easy-to-use, fast-moving tutorial introduces you to functional programming with Haskell. What quali es for this talk? Mature, usable and (somewhat) popluar Written in Haskell Useful1 for non-programmers Does not require knowledge of Haskell 1or a game Real World Haskell Joachim Breitner.
Having been an imperative developer for some years now, I had never had the urge to learn functional programming.
A couple months ago at last I decided to learn Haskell. It's quite a cool language, but I'm puzzled about how an event driven real app would be programmed in such a language. Do you know of a good tutorial about it?
Download PrintMaster Platinum. PrintMaster Platinum has around 577 templates with more than 305,000 images to create a calender of your liking. In addition to the calender templates, this calender making software has more than 21,000 project templates to design greeting cards, stationary, stickers. Printmaster gold free full download.
Note: When I say 'real app' I'm not talking of a real world, production ready app. I just mean a little sample app, just to get the grasp of it. I think something like a simplified version of the windows caculator would be great, and then perhaps something a bit more complex.
ravenravenclosed as primarily opinion-based by Robert Longson, joran, John Doyle, Ozzy, WrikkenJul 17 '13 at 23:46
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
7 Answers
When you say 'real world' examples you are presumably thinking about problems that are inherently sequential or stateful or do lots of I/O, right?
Real World Haskell Pdf
So, how about games?
- Frag is a Quake clone, implemented for an undergraduate thesis (Functional Programming and 3D Games, Mun Hon Cheong, 2005). Here's a video of it in action.
- Super Monao Bros. (formerly known as Super Nario Bros.) is, well, you can probably figure out which game it is a clone of. (This is the author's English language weblog.)
- Purely Functional Retrogames is a 4-part series of blog articles about how to write games in a purely functional language, explained using Pacman as the example. (Part 2, Part 3, Part 4.)
Or, what about an X Window Manager, an extensible Emacs clone text editor or an IDE?
Then, there is the book, which even has your question already in the title: Real World Haskelland which is also available for free!
Another thing you might want to look at, is Functional Reactive Programming. (It is used in Frag, for example.) The interesting thing about FRP is that it allows you to look at the problem of, say, GUI programming from a very different angle. If you read the GUI chapter in the RWH book, you will see that it talks about how you can write a GUI application just like in C, only better. FRP OTOH allows you to write it in a totally different way that wouldn't even be possible in C.
A lot of times (I'm not saying that this is the case in your question, but it is a recurring pattern) when someone says 'but can Haskell be used in the real world', what they are really saying is 'I know how to do this in C, and in Haskell I cannot do it in exactly the same way, therefore it must be impossible in Haskell, therefore Haskell is not ready for the real world'. But what they are missing out on, is that there might be a totally different and much better way to solve the problem. (It's like saying 'Erlang doesn't have threads, therefore it cannot possibly be used to implement concurrent systems.') And FRP is just one example.
Jörg W MittagJörg W MittagFor a lightning talk today I have assembled this list of show-case Haskell applications, deliberately excluding anything that only targets programmers:
Asus ranger motherboard drivers. Products certified by the Federal Communications Commission and Industry Canada will be distributed in the United States and Canada. Please visit the ASUS USA and ASUS Canada websites for information about locally available products. All specifications are subject to change without notice. Please check with your supplier for exact offers. Products certified by the Federal Communications Commission and Industry Canada will be distributed in the United States and Canada. Please visit the ASUS USA and ASUS Canada websites for information about locally available products. All specifications are subject to change without notice.
- darcs (since 2002, 35 000 loc): Distributedversion control system with an innovative focus on changes insteadof states.
- xmonad (since 2007, 30000 loc): Well knowntiling window manager with a huge library of layout and otherplugins. Made it into the list despite its configuration file beinga Haskell file.
- hledger (since 2007, 9000 loc): Text-filebased double-ledger accounting tool, a clone ofledger.
- Raincat (since 2008, 2000 loc):Platform game with a cat that does not want to get wet.
- arbtt (since 2009, 2000 loc): Myautomatic rule-based time tracker. Made it into the list as ashameless plug; probably not that popular. It has now a proper webpage contributed by Waldir Pimenta.
- detexify (since 2010, 500 loc): Theback end of the very useful LaTeX character command finder iswritten in Haskell.
- git-annex (since 2010, 28 000loc): Manages your files and their location, a mixture of dropboxand git. Written by famous Joey Hess, who made a living from it viakickstarterHe is currently running a second round offunding!
- Nikki and the Robots (since 2010, 18 000loc): Platform game with Nikki and, well, his robots. It wasproduced as a commercial independent game and sold via apay-what-you-like scheme, but the company unfortunately closed down.
- hoodle (since 2011, 13 000 loc): Anote-taking and PDF annotation software likexournal.
- Chordify (since 2012, ? loc): Analysesmusic, e.g. from a YouTube video, and calculates the correspondingguitar chords. Closed software, but supposedly written in Haskell.
(Also featured on my blog, and on the slides of the talk, with nice representative pictures of each program.)
Joachim BreitnerJoachim Breitnerxmonad is event driven (literally). It has a listener loop that wakes up on events, modifying an internal state modelling the X server, which is then rendered to the screen.
Don StewartDon StewartI once found this irc bot written in haskell:
Mercer TraiesteMercer TraiesteHere are some links as you requested.
This one explains a lot of things that doesn't 'make sense' to an imperative programmer about Haskell
This one is a very good easy to follow tutorial
Option 1: Update drivers automaticallyThe for Acer devices is intelligent software which automatically recognizes your computer’s operating system and Laptop model and finds the most up-to-date drivers for it. You’ll need some computer skills to use this method. The Driver Update Utility downloads and installs your drivers quickly and easily.You can scan for driver updates automatically with the FREE version of the Driver Update Utility for Acer, and complete all necessary driver updates using the premium version.Tech Tip: The will back up your current drivers for you. Your old drivers can even be backed up and restored in case any problems occur.OR- Find the correct driver for your Laptop and operating system, then install it by following the step by step instructions below. There is no risk of installing the wrong driver. Wifi drivers for acer laptop.
Options add a company logo and colors make it easy to comply with the image of the brand.Various Media - Interactive documents with rich media to effectively present ideas. You can create, manage, execute, and share common tasks sequences. PDF files can insert sounds, videos, compatible with Flash Player and interactive elements that are also available in Adobe Reader X and Reader 9Action Wizard - Routine tasks that require several steps can be automated with the assistance of preparing the operation. Adobe acrobat pro 8.0 free download.
Raytracer written in Haskell
You can download Glasgow Haskell Compiler from here.GHC
Indy9000Indy9000you should check out Real World Haskell. The book is freely available and shows how Haskell can be applied to real world problems. I wouldn't call it a tutorial, tho, as it is much more comprehensive.