mode for Emacs There are many Emacs packages and modules for Haskell. The most prominent ones are haskell-mode, ghc-mod and Scion. 1 Newbie guide Emacs is an extensible texteditor which can be extended with so-called "modes" and makes great use of keystrokes. 2 Haskell-mode The haskell-mode package is a set of major modes for Emacs for writing Haskell code and working with Haskell projects. Haskell-mode is maintained by Philip Weaver. 3 Scion The Scion IDE library can be used to complement the haskell-mode with additional features, such as (quoting the documentation): Highlights error messages directly in the source, together with a tool-tip Optional on-the-fly typechecking (idle-time based, or whenever file is saved) Completion on `LANGUAGE` names, pragmas, external module names and `OPTIONS`-flags Go to definition sites of symbols at point Documentation on how to use `scion.el` can be found in the `README.markdown` file. The primary repository is at nominolo/scion. 4 ghc-mod 5 Hugs mode 6 LaTeX 7 Cabal
Math.Statistics modes :: Ord a => [a] -> [(Int, a)]Source Modes returns a sorted list of modes in descending order quantile :: (Fractional b, Ord b) => Double -> [b] -> bSource Sample variance Interquartile range Arbitrary quantile q of an unsorted list. linreg :: Floating b => [(b, b)] -> (b, b, b)Source Least-squares linear regression of y against x for a |collection of (x, y) data, in the form of (b0, b1, r) |where the regression is y = b0 + b1 * x with Pearson |coefficient r devsq :: Floating a => [a] -> aSource Returns the sum of square deviations from their sample mean. On undoing, fixing, or removing commits in git A git choose-your-own-adventure!ⓡ <h3><em>Warning! This document is an attempt to be a fairly comprehensive guide to recovering from what you did not mean to do when using git. If you have problems after clicking through this document, please copy-paste the "Path" you took (what links you clicked on, automatically presented to you if javascript is available) when asking for further help, since doing so will explain very precisely what you were trying to do, and that you at least tried to help yourself. First step Strongly consider taking a backup of your current working directory and .git to avoid any possibility of losing data as a result of the use or misuse of these instructions. Answer the questions posed by clicking the link for that section. Proceed to the first question Are you trying to find that which is lost or fix a change that was made? Due to previous activities (thrashing about), you may have lost some work which you would like to find and restore. Have you committed? Oh dear.
AJAX Control Toolkit ASP.NET AJAX Control Toolkit Welcome to the ASP.NET AJAX Control Toolkit. Choose from any of the samples on the left to see the live controls in action, and experiment with their different possibilities. What is the ASP.NET AJAX Control Toolkit? The ASP.NET AJAX Control Toolkit is an open-source project built on top of the Microsoft ASP.NET AJAX framework. It is a joint effort between Microsoft and the ASP.NET AJAX community that provides a powerful infrastructure to write reusable, customizable and extensible ASP.NET AJAX extenders and controls, as well as a rich array of controls that can be used out of the box to create an interactive Web experience. The AJAX Control Toolkit contains more than 30 controls that enable you to easily create rich, interactive web pages. To get started, and to install the Ajax Control Toolkit, visit the AJAX Control Toolkit Project Page on CodePlex.
4.12. Using shared libraries On some platforms GHC supports building Haskell code into shared libraries. Shared libraries are also sometimes known as dynamic libraries, in particular on Windows they are referred to as dynamic link libraries (DLLs). Shared libraries allow a single instance of some pre-compiled code to be shared between several programs. In contrast, with static linking the code is copied into each program. In GHC version 6.12 building shared libraries is supported for Linux on x86 and x86-64 architectures and there is partial support on Windows (see Section 11.6, “Building and using Win32 DLLs ”). Building and using shared libraries is slightly more complicated than building and using static libraries. 4.12.1. To build a simple program and have it use shared libraries for the runtime system and the base libraries use the -dynamic flag: ghc --make -dynamic Main.hs This has two effects. 4.12.2. You can build Haskell code into a shared library and make a package to be used by other Haskell programs.
Data.ByteString.Char8 O(n) The unfoldrN function is analogous to the List 'unfoldr'. unfoldrN builds a ByteString from a seed value. The function takes the element and returns Nothing if it is done producing the ByteString or returns Just (a,b), in which case, a is a prepending to the ByteString and b is used as the next element in a recursive call. To preven unfoldrN having O(n^2) complexity (as prepending a character to a ByteString is O(n), this unfoldr requires a maximum final size of the ByteString as an argument. cons can then be implemented in O(1) (i.e. a poke), and the unfoldr itself has linear complexity. Examples: unfoldrN 10 (\x -> Just (x, chr (ord x + 1))) '0' == "0123456789" The following equation connects the depth-limited unfoldr to the List unfoldr: unfoldrN n == take n $ List.unfoldr
Project Rain World by Rain World » AMAZING! ASTONISHING! Thanks to your overwhelming support and enthusiasm for Rain World, we are ~80% funded in less than 2 days. Unreal! Our inbox is absolutely brimming with messages of encouragement, thank you all so much! We have had a ton of questions from curious funders, and we will try to tackle as many as we can in this and subsequent updates. Q: Will Rain World be available on Steam? A: We would like for it to be! Q: Will you be doing a Linux version? A: We would like to do that too! Q: Do you accept PayPal? A: Yes! Although, it must be said: PayPal funds won't help us achieve our Kickstarter fundraising goal, so if you *do* have the option to use Kickstarter please do that instead. Now onto some fun stuff! A lot of the positive feedback we've gotten surrounds the art and animation style, specifically the fluidity of the character movement. You can see some of this leg and body movement action with the help of our little friend the see-through slugcat. Thanks for reading! --James & Joar
XTips.ru C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals, Chapter 1 of 13 | Going Deep Welcome to a new technical series on Channel 9 folded into a different kind of 9 format: C9 Lectures. These are what you think they are, lectures. They are not conversational in nature (like most of what you're used to on 9), but rather these pieces are entirely focused on education, coming to you in the form of a series of high quality technical lectures (1 or more per topic) on a single topic. We kick off C9 Lectures with a journey into the world of Functional Programming with functional language purist and high priest of the lambda calculus, Dr. Erik Meijer (you can thank Erik for many of the functional constructs that have shown up in languages like C# and VB.NET. Lecture Context: Over the past two years, you've learned a fair amount about the functional programming paradigm's foray into general purpose imperative progamming languages (LINQ, Lambda's, etc in C# and VB.NET). Dr. In Chapter 1, Dr. Welcome to C9 Lectures. ALWAYS ask questions right here. Welcome to C9 Lectures!
Data.Map An efficient implementation of maps from keys to values (dictionaries). Since many function names (but not the type name) clash with Prelude names, this module is usually imported qualified, e.g. import Data.Map (Map) import qualified Data.Map as Map The implementation of Map is based on size balanced binary trees (or trees of bounded balance) as described by: Stephen Adams, "Efficient sets: a balancing act", Journal of Functional Programming 3(4):553-562, October 1993, J. Note that the implementation is left-biased -- the elements of a first argument are always preferred to the second, for example in union or insert. Operation comments contain the operation time complexity in the Big-O notation Home « Tom Dalling Tom Dalling Effective Effective Books I'm getting ready to start work on Effective C++11 (about which I'll have more to say in a later blog post), and this week I've been reviewing a manuscript for a new book in my Effective Software Development Series, so recently I've been thinking a lot about what makes an effective Effective book. Effective books consist of a collection of technical essays ("Items"), where each essay's title comprises advice you should follow, and each essay's body consists of a rationale for the advice. In the third edition of Effective C++, for example, Item 37 is "Never redefine a function's inherited default parameter value." This format has always seemed pretty straightforward to me, but having reviewed dozens of proposals and manuscripts for my series, it's clear that it's not straightforward to everybody. A few years ago, I wrote up the following guidelines for authors of prospective Effective books. Item 1: Keep Items short. Think about your goals for your book. Item 4: Word Item titles carefully.
Neil Mitchell - HLint HLint (formerly Dr. Haskell) reads Haskell programs and suggests changes that hopefully make them easier to read. HLint also makes it easy to disable unwanted suggestions, and to add your own custom suggestions. Running the tool over the darcs source code, we can generate an interactive report with --report, or view the results in the console: $ hlint darcs-2.1.2 CommandLine.lhs:49:1: Warning, eta reduce Found: quotedArg ftable = between (char '"') (char '"') $ quoteContent ftable Why not: quotedArg = between (char '"') (char '"') . quoteContent CommandLine.lhs:94:1: Error, use concatMap Found: concat $ map escapeC s Why not: concatMap escapeC s Ssh.hs:155:17: Error, use isPrefixOf Found: take 1 path == "~" Why not: "~" `isPrefixOf` path ... many other suggestions ... HLint can only be compiled by GHC 6.10.1 or above (it makes use of view patterns), but does not require any copy of GHC to run. Related work Haskell Style Scanner - check for poor layout/spacing etc. Downloads