background preloader

Learn You a Haskell for Great Good! - Chapters

Learn You a Haskell for Great Good! - Chapters

http://learnyouahaskell.com/chapters

Haskell: The Confusing Parts If you’re used to the C family of languages, or the closely related family of “scripting languages,” Haskell’s syntax (mainly) is a bit baffling at first. For some people, it can even seem like it’s sneaking out from under you every time you think you understand it. This is sort of a FAQ for people who are new to Haskell, or scared away by its syntax. Use this as a cheat sheet, not a textbook. Misc. Software Tools in Haskell Haskell is a strongly typed, pure, lazy functional programming language. That sentence should give you all the information you need to know to deal with it, although it leaves out a lot of details, including: the type system (Hindly-Milner-ish, with beaucoup extensions),the syntax (ML-ish), andhow a pure, lazy functional language does sequenced things like IO (monadically, with sugared syntax). This is not a tutorial on Haskell.

H-99: Ninety-Nine Haskell Problems These are Haskell translations of Ninety-Nine Lisp Problems, which are themselves translations of Ninety-Nine Prolog Problems. If you want to work on one of these, put your name in the block so we know someone's working on it. Then, change n in your block to the appropriate problem number, and fill in the <Problem description>,<example in Haskell>,<solution in haskell> and <description of implementation> fields. Then be sure to update the status on this page to indicate that we have a solution! 1 The problems These problems have been split into 11 parts, for ease of access. Go for Java programmers This text is intended to help Java programmers come up to speed quickly with Go. It starts with an example highlighting features easily recognized by all Java programmers, then gives a fairly detailed description of Go’s building blocks, and ends with an example illustrating constructs that have no immediate counterpart in Java. Hello stack (example) To whet your appetite, we start with a small but complete and idiomatic example corresponding to this Stack.java program. Comments that appear directly before top-level declarations are documentation comments.

A Gentle Introduction to Haskell, Version 98 This is the master HTML version of the Gentle Introduction To Haskell, version 98. Revised June, 2000 by Reuben Thomas. You may download the following: Brief Table of Contents. All code in this tutorial, with additional commentary, is found in the code directory packaged with this tutorial. On Haskell and C++ Following the 0.0.1 release of Freekick and an update to 0.0.2, I started noticing some problems in the implementation that showed a need for code refactoring. There were certain issues that implied I should find out about the internal workings of Haskell, as in, trying to figure out how the language and the implementation I use (Glasgow Haskell Compiler) works in general, especially with regards to threading, scheduling and performance. The first issue I ran into was about my physics engine. I had defined a maximum velocity for my players of 8 m/s, but after some measurements I found out they were instead quite a bit slower. (A tip for the future: implement a debug panel for having such information when you need it. Measuring something like that shouldn’t be necessary.)

All About Monads All About Monads is a tutorial on monads and monad transformers and a walk-through of common monad instances. You can download a PDF version here or here. And here is a version of the article which includes source code. Clockwise/Spiral Rule [This was posted to comp.lang.c by its author, David Anderson, on 1994-05-06.] There is a technique known as the ``Clockwise/Spiral Rule'' which enables any C programmer to parse in their head any C declaration! There are three simple steps to follow: Starting with the unknown element, move in a spiral/clockwise direction; when ecountering the following elements replace them with the corresponding english statements: [X] or [] => Array X size of... or Array undefined size of... (type1, type2) => function passing type1 and type2 returning... * => pointer(s) to... Keep doing this in a spiral/clockwise direction until all tokens have been covered.

Related: