background preloader

Functional Programming For The Rest of Us

Functional Programming For The Rest of Us
Monday, June 19, 2006 Introduction Programmers are procrastinators. Get in, get some coffee, check the mailbox, read the RSS feeds, read the news, check out latest articles on techie websites, browse through political discussions on the designated sections of the programming forums. Rinse and repeat to make sure nothing is missed. Go to lunch. The only thing, every once in a while challenging articles actually do pop up. I don't know about your list, but a large chunk of the articles in mine are about functional programming. It's true that FP articles and papers are hard to understand, but they don't have to be. So what is FP? A Walk In The Park Fire up the time machine. "Look at these two students", said Plato carefully picking words to make the question educational. Plato smiled. So was born the first attempt to understand the nature of mathematics. Philosophy of mathematics is a very complex subject. A Bit of History3 Let's shift gears in our time machine. Functional Programming Currying

http://www.defmacro.org/ramblings/fp.html

Related:  Programming LanguagesProgrammingHaskellvardanpetrosyan

Higher Logics: On the Importance of Purity The benefits of advanced programmings languages are sometimes difficult to grasp for everyday programmers. The features of such languages and how they relate to industrial software development are sometimes hard to understand, especially since the arguments are couched in terms such as "referential transparency", "totality", "side-effect-free", "monads", "non-determinism", "strong static typing", "algebraic data types", "higher-order functions", "laziness/call-by-need", and so on. Many of these features are attributed to "pure" languages, but purity is also a nebulous concept. I will explain the importance of a number of these features and how they impact the everyday programmer's life.

Use functional programming techniques to write elegant JavaScript Introduction Functional programming languages have been in academia for quite some time, but historically they do not have extensive tools and libraries available. With the advent of Haskell in the .NET platform, functional programming is becoming more popular. Some traditional programming languages, such as C++ and JavaScript, import constructs and features from functional programming.

How to read Haskell like Python tl;dr — Save this page for future reference. Have you ever been in the situation where you need to quickly understand what a piece of code in some unfamiliar language does? If the language looks a lot like what you’re comfortable with, you can usually guess what large amounts of the code does; even if you may not be completely familiar how all the language features work.

openvmtil - openVm : Tookit for Implementing (and exploring) Languages - a bottom-up vm that is an extensible scripting language Lastest downloads at An Exploration of Language Theory - and its Machine Implementation Imagine a low level, optimizing, virtual machine (like llvm) that is an extensible scripting language and that is small enough to be easily verified, where even the runtime is reconfigurable - minimize that. Current focus (to do) : minimal bootstrap, self-hosting, patterns/sets, logic, tail call, type checking, gui The Turing Machine, the Lambda Calculus and Type/Category Theory are the theoretical foundations. JCS – Java Caching System Java Caching System JCS is a distributed caching system written in Java. It is intended to speed up applications by providing a means to manage cached data of various dynamic natures. Like any caching system, JCS is most useful for high read, low put applications.

VsHaskell See also [LanguageComparisons]. Haskell Haskell is a modern functional language (like lisp). An Introduction to Programming by Contract · andresteingress/gcontracts Wiki An Example Programming by Contract is known under the name of Design by Contract™ first implemented by Eiffel, a programming language introduced by Bertrand Meyer1. The main principle of programming by contract is to actually add a program’s specification as expressions in the form of meta-data to certain elements in the source code. Let us take a look at the Rocket class below: import org.gcontracts.annotations.* @Invariant({ (started == true && speed > 0) || (started == false && speed == 0) })class Rocket { boolean started = false int speed = 0 @Requires({ !started }) @Ensures({ started && speed > 0 }) def start() { speed += 10 started = true } @Requires({ started }) @Ensures({ old -> speed - old.speed > 0 }) def accelerate() { speed += 10 }}

Hibernate EHCache Second Level Caching Example Tutorial One of the major benefit of using Hibernate in large application is it’s support for caching, hence reducing database queries and better performance. In earlier example, we looked into the Hibernate First Level Cache and today we will look into Hibernate Second Level Cache using Hibernate EHCache implementation. Hibernate Second Level cache providers include EHCache and Infinispan, but EHCache is more popular and we will use it for our example project. However before we move to our project, we should know different strategies for caching an object.

Why the world needs Haskell - Devalot This is a technical review of Haskell and why software developers should care about functional programming. For a non-technical review of why your company should be using Haskell you might want to watch this introduction to Haskell video by FP Complete. TL;DR: Writing high-quality, bug-free software isn’t easy. Haskell (and similar languages) provide the programmer with the tools necessary to get closer than ever before. By removing entire categories of bugs (such as those caused by null pointers and nil objects, type coercions, accidental mutation, etc.) and introducing a powerful type system, programmers can write better code in the same amount of time (and often less) than more traditional languages. Null Pointers and Undefined Values

Welcome Welcome! This page was created in year 2000 and initially contains only one my article "How to create programming language and compiler" (written in year 1997). In year 2002 this article was fully rewritten and partially translated to english. It describe relatively simple demonstration compiler and more complex compiler of Context language. Demonstration compiler are obsolete now, in archive You may find very small self-compiler of Context subset. Some other articles (about program languages and common algorithms) available only in russian.

The Interactive Activation and Competition Network: How Neural Networks Process Information Copyright © Simon Dennis, 1997. * These sections contain some mathematics which can be omitted on a first reading if desired. Introduction The Interactive Activation and Competition network (IAC, McClelland 1981; McClelland & Rumelhart 1981; Rumelhart & McClelland 1982) embodies many of the properties that make neural networks useful information processing models. In this chapter, we will use the IAC network to demonstrate several of these properties including content addressability, robustness in the face of noise, generalisation across exemplars and the ability to provide plausible default values for unknown variables. The chapter begins with an example of an IAC network to allow you to see a full network in action.

Hoogle Hoogle is a Haskell API search engine, which allows you to search many standard Haskell libraries by either function name, or by approximate type signature. Example searches: map (a -> b) -> [a] -> [b] Ord a => [a] -> [a] Data.Map.insert Enter your own search at the top of the page. The Hoogle manual contains more details, including further details on search queries, how to install Hoogle as a command line application and how to integrate Hoogle with Firefox/Emacs/Vim etc. I am very interested in any feedback you may have. Please email me, or add an entry to my bug tracker.

Related: