Real World Haskell Epublibre

Posted on
Active6 years, 1 month ago
  1. Real World Haskell Amazon
  2. Real World Haskell

Having been an imperative developer for some years now, I had never had the urge to learn functional programming.

The rap on haskell in the real world is that haskell is easy for beginner programmers and very powerful for advanced programmers who know it well, but it is one of the more difficult languages for intermediate programmers facing real-world complexity. The NY Times video I mention above even acknowledges some or the obstacles. Choice for real-world Haskell, it tends to be used in an id-iosyncratic way—with small transactions and with heavy use of the retry mechanism, which allows a transaction to wait for a programmer-specified precondition. We believe that a more performant implementation of STM in Haskell would allow it to be used effectively in a. Real World Haskell takes you through the basics of functional programming at a brisk pace, and then helps you increase your understanding of Haskell in real-worl You'll learn how to use Haskell in a variety of practical ways, from short scripts to large and demanding applications. 本文档是 Real World Haskell一书的简体中文翻译版本, 翻译工作正在进行中, 欢迎加入。 以下列出的是本文档各个章节目前的翻译进度, 以及完成这些翻译的译者们, 感谢所有译者为本文档所做的贡献! 章节 译者 翻译进度 第 1. Haskell without the theory — beginner-friendly, real-world Haskell tutorials. Download real-world-haskell or read real-world-haskell online books in PDF, EPUB and Mobi Format. Click Download or Read Online button to get real-world-haskell book now. This site is like a library, Use search box in the widget to get ebook that you want.

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?

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.

ravenraven
1,3022 gold badges20 silver badges46 bronze badges

closed 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?

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?

Pumpkin patch maternity leggings

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 Mittag
301k64 gold badges371 silver badges568 bronze badges

For a lightning talk today I have assembled this list of show-case Haskell applications, deliberately excluding anything that only targets programmers:

  • 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 BreitnerReal World Haskell EpublibreJoachim Breitner
20.8k5 gold badges65 silver badges116 bronze badges

Real World Haskell Amazon

xmonad 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 Stewart
130k33 gold badges342 silver badges451 bronze badges

I once found this irc bot written in haskell:

Mercer TraiesteMercer Traieste
4,1913 gold badges20 silver badges24 bronze badges

Here are some links as you requested.

This one explains a lot of things that doesn't 'make sense' to an imperative programmer about Haskell

If search results are not what you looking for please give us feedback on where we can/or should improve. When you search for files (video, music, software, documents etc), you will always find high-quality ps2 classic placeholder pkg files recently uploaded on DownloadJoy or other most popular shared hosts. With our unique approach to crawling we index shared files withing hours after Upload. Rap file for ps2 classics manager Our goal is to provide top notch user experience for our visitors. As an file sharing search engine DownloadJoy finds ps2 classic placeholder pkg files matching your search criteria among the files that has been seen recently in uploading sites by our search spider.

This one is a very good easy to follow tutorial

Raytracer written in Haskell

Real World Haskell

You can download Glasgow Haskell Compiler from here.GHC

Indy9000Indy9000
7,3542 gold badges24 silver badges32 bronze badges

you 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.

Nils WlokaNils Wloka
starbluestarblue
46.4k11 gold badges79 silver badges139 bronze badges

Not the answer you're looking for? Browse other questions tagged haskellfunctional-programming or ask your own question.

Table of Contents

  1. Preface
    1. Have We Got a Deal for You!
    2. What to Expect from This Book
    3. What to Expect from Haskell
    4. A Brief Sketch of Haskell’s History
    5. Helpful Resources
    6. Acknowledgments
  2. 1. Getting Started
    1. Basic Interaction: Using ghci as a Calculator
    2. Lists
  3. 2. Types and Functions
    1. Haskell’s Type System
    2. Functions over Lists and Tuples
    3. Haskell Source Files, and Writing Simple Functions
    4. Understanding Evaluation by Example
    5. Polymorphism in Haskell
  4. 3. Defining Types, Streamlining Functions
    1. Defining a New Data Type
    2. Algebraic Data Types
      1. Analogues to Algebraic Data Types in Other Languages
    3. Pattern Matching
    4. Reporting Errors
    5. Introducing Local Variables
    6. The Offside Rule and Whitespace in an Expression
    7. Common Beginner Mistakes with Patterns
  5. 4. Functional Programming
    1. Warming Up: Portably Splitting Lines of Text
    2. Working with Lists
    3. How to Think About Loops
    4. Partial Function Application and Currying
    5. Code Reuse Through Composition
    6. Space Leaks and Strict Evaluation
  6. 5. Writing a Library: Working with JSON Data
    1. Fleshing Out the Pretty-Printing Library
    2. Creating a Package
  7. 6. Using Typeclasses
    1. Important Built-in Typeclasses
    2. Typeclasses at Work: Making JSON Easier to Use
    3. Living in an Open World
    4. How to Give a Type a New Identity
  8. 7. I/O
    1. Classic I/O in Haskell
    2. Working with Files and Handles
    3. Lazy I/O
      1. interact
    4. The IO Monad
    5. Buffering
  9. 8. Efficient File Processing, Regular Expressions, and Filename Matching
    1. Efficient File Processing
    2. Regular Expressions in Haskell
    3. More About Regular Expressions
  10. 9. I/O Case Study: A Library for Searching the Filesystem
    1. Starting Simple: Recursively Listing a Directory
    2. Sizing a File Safely
    3. A Domain-Specific Language for Predicates
    4. Useful Coding Guidelines
  11. 10. Code Case Study: Parsing a Binary Data Format
    1. Implicit State
    2. Introducing Functors
  12. 11. Testing and Quality Assurance
    1. QuickCheck: Type-Based Testing
    2. Testing Case Study: Specifying a Pretty Printer
  13. 12. Barcode Recognition
    1. A Little Bit About Barcodes
    2. Introducing Arrays
    3. Turning a Color Image into Something Tractable
    4. Finding Matching Digits
      1. Remembering a Match’s Parity
    5. Life Without Arrays or Hash Tables
      1. A Brief Introduction to Maps
    6. Turning Digit Soup into an Answer
  14. 13. Data Structures
    1. Extended Example: Numeric Types
    2. Taking Advantage of Functions as Data
  15. 14. Monads
    1. Revisiting Earlier Code Examples
    2. Using a New Monad: Show Your Work!
    3. Building the Logger Monad
    4. The Maybe Monad
    5. The List Monad
    6. Desugaring of do Blocks
    7. The State Monad
    8. Monads and Functors
  16. 15. Programming with Monads
    1. Looking for Alternatives
    2. Adventures in Hiding the Plumbing
    3. Separating Interface from Implementation
    4. Hiding the IO Monad
  17. 16. Using Parsec
    1. Choices and Errors
    2. Parsing a HTTP Request
  18. 17. Interfacing with C: The FFI
    1. Foreign Language Bindings: The Basics
    2. Regular Expressions for Haskell: A Binding for PCRE
    3. Passing String Data Between Haskell and C
    4. Matching on Strings
  19. 18. Monad Transformers
    1. Stacking Multiple Monad Transformers
    2. Moving Down the Stack
    3. Understanding Monad Transformers by Building One
    4. Putting Monads and Monad Transformers into Perspective
  20. 19. Error Handling
    1. Error Handling with Data Types
      1. Use of Maybe
      2. Use of Either
    2. Exceptions
    3. Error Handling in Monads
  21. 20. Systems Programming in Haskell
    1. Dates and Times
      1. ClockTime and CalendarTime
    2. Extended Example: Piping
  22. 21. Using Databases
    1. Reading Results
  23. 22. Extended Example: Web Client Programming
  24. 23. GUI Programming with gtk2hs
    1. User Interface Design with Glade
  25. 24. Concurrent and Multicore Programming
    1. Concurrent Programming with Threads
    2. The Main Thread and Waiting for Other Threads
    3. Useful Things to Know About
    4. Shared-State Concurrency Is Still Hard
    5. Using Multiple Cores with GHC
    6. Parallel Programming in Haskell
    7. Parallel Strategies and MapReduce
      1. Sizing Work Appropriately
  26. 25. Profiling and Optimization
    1. Profiling Haskell Programs
    2. Controlling Evaluation
      1. Adding Strictness
    3. Advanced Techniques: Fusion
  27. 26. Advanced Library Design: Building a Bloom Filter
    1. Basic Design
    2. Creating a Friendly Interface
    3. Creating a Cabal Package
    4. Testing with QuickCheck
    5. Performance Analysis and Tuning
  28. 27. Sockets and Syslog
    1. Communicating with UDP
    2. Communicating with TCP
  29. 28. Software Transactional Memory
    1. Retrying a Transaction
    2. Choosing Between Alternatives
    3. A Concurrent Web Link Checker
    4. Practical Aspects of STM
  30. A. Installing GHC and Haskell Libraries
    1. Installing GHC
      1. Mac OS X
    2. Installing Haskell Software
      1. Automated Download and Installation with cabal
  31. B. Characters, Strings, and Escaping Rules
    1. Escaping Text