Pages tagged functional:

K. Scott Allen : Function.apply and Function.call in JavaScript
http://odetocode.com/Blogs/scott/archive/2007/07/04/11067.aspx

function.apply and .call control the scope of the this keyword
Function.apply and Function.call
Programming Textbooks
http://t3x.org/books/
Object Computing, Inc. — Java News Brief — March 2009
http://ociweb.com/jnb/jnbMar2009.html
Clojure is a LISP implementation for the Java Virtual Machine.
"The goal of this article is to provide a fairly comprehensive introduction to the Clojure programming language."
Informatics 1 – Functional Programming Homepage
http://www.inf.ed.ac.uk/teaching/courses/inf1/fp/
The course teaches the basics of functional programming using the language Haskell. The main goal is to acquaint the student with fundamental programming concepts such as recursion, abstraction, higher-order functions and data types, whilst at the same time emphasizing the practical use of such constructs by applying them within a graphical environment.
haskell教程
PLOT: Table of Contents
http://users.rcn.com/david-moon/PLOT/
“Programming Language for Old Timers (PLOT) is a new dialect of Lisp designed by Dave Moon in February 2006, and thoroughly revised and simplified November 2007 and March 2008. I have been developing PLOT as a hobby, with the idea of for once having a programming language which does everything the right way. You know it is right when both simplicity and power are maximized, while at the same time confusion and the need for kludges are minimized.”
A LISP-style programming language by David A. Moon.
Notable features: - structural macros
cs252r Record
http://www.eecs.harvard.edu/~govereau/cs252r/
Advanced Functional Programming - Fall 2006
These pages are a record of the in-class discussions for the graduate class "Advanced Functional Programming" given at Harvard University in the Fall of 2006.
Nimrod Programming Language
http://force7.de/nimrod/
This page is about the Nimrod programming language, which combines Lisp's power with Python's readability and C's performance.
Nimrod Programming Language - efficient, expressive, elegant, statically typed, imperative, procedural, object-oriented, functional and generic
Nimrod is a new statically typed, imperative programming language, that supports procedural, object oriented, functional and generic programming styles while remaining simple and efficient. A special feature that Nimrod inherited from Lisp is that Nimrod's abstract syntax tree (AST) is part of the specification - this allows a powerful macro system which allows domain specific languages. Nimrod is a compiled, garbage-collected systems programming language which has an excellent productivity/performance ratio. Nimrod's design focuses on the 3E: efficiency, expressiveness, elegance (in the order of priority)...
Nimrod is a new statically typed, imperative programming language, that supports procedural, object oriented, functional and generic programming styles while remaining simple and efficient. A special feature that Nimrod inherited from Lisp is that Nimrod's abstract syntax tree (AST) is part of the specification - this allows a powerful macro system which allows domain specific languages.
Object Computing, Inc. - Java News Brief - March 2009
http://java.ociweb.com/mark/clojure/article.html
Clojure - Functional Programming for the JVM
Matt Sears | 20 Clojure Links To Get You Up To Speed
http://mattsears.com/2009/6/6/20-clojure-links-to-get-you-up-to-speed
Clojure is a functional programming language for the Java Virtual Machine with several powerful features for building concurrent applications. In addition, Clojure is fast, robust, and a powerful general-purpose programming language. A dialect of Lisp, Clojure embraces traditional code-as-data philosophy and a powerful macro system, plus some syntactic sugar tailored to Java.
lambdaj - Google Code
http://code.google.com/p/lambdaj/
a functional-style library, built on hamcrest, for operating on Java collections
ambdaj is a library that makes easier to address this issue by allowing to manipulate collections in a pseudo-functional and statically typed way. In our experience to iterate over collection, especially in nested loops, is often error prone and makes the code less readable. The purpose of this library is to alleviate these problems employing some functional programming techniques but without losing the static typing of java. We impose this last constraint to make refactoring easier and safer and allow the compiler to do its job.
lambdaj is a library that makes easier to address this issue by allowing to manipulate collections in a pseudo-functional and statically typed way. In our experience to iterate over collection, especially in nested loops, is often error prone and makes the code less readable. The purpose of this library is to alleviate these problems employing some functional programming techniques but without losing the static typing of java. We impose this last constraint to make refactoring easier and safer and allow the compiler to do its job.
jLinq - Javascript Query Language
http://www.hugoware.net/
jLinq is a Javascript library that lets you write queries against arrays of javascript objects. jLinq is completely extensible so you can write your add-ins and they will work with the rest of the framework without any additional programming!
jLinq is a javascript library that lets you write queries against arrays of javascript objects. It's completely extensible so you can write your add-ins and they will work with the rest of the framework without any additional programming.
Potion, a Short Pamphlet
http://hackety.org/potion/
A dynamically typed, object oriented and functional language by _why the lucky stiff. Potion’s mantra is: Everything is an object. But objects aren’t everything ('cause everything's a function).
Tiny language from _why in which everything is an object and a function.
Simply Scheme: Introducing Computer Science
http://www.cs.berkeley.edu/~bh/ss-toc2.html
book
http://mythryl.org/
http://mythryl.org/index.html
geiles intro. allein deshalb schon lesenswert :)
New programming language
Go Ahead: Next Generation Java Programming Style | Code Monkeyism
http://codemonkeyism.com/generation-java-programming-style/
Object Computing, Inc. - Java News Brief - September 2009
http://java.ociweb.com/mark/stm/article.html
Software Transactional Memory
http://queue.acm.org/detail.cfm?id=1454466
An Introduction to Lambda Calculus and Scheme
http://www.jetcafe.org/jim/lambda.html
A function accepts input and produces an output. Suppose we have a "chocolate-covering" function that produces the following outputs for the corresponding inputs: peanuts -> chocolate-covered peanuts rasins -> chocolate-covered rasins ants -> chocolate-covered ants We can use Lambda-calculus to describe such a function: Lx.chocolate-covered x This is called a lambda-expression. (Here the "L" is supposed to be a lowercase Greek "lambda" character). If we want to apply the function to an argument, we use the following syntax: Functions can also be the result of applying a lambda-expression, as with this "covering function maker": Ly.Lx.y-covered x We can use this to create a caramel-covering function: (Ly.Lx.y-covered x)caramel -> Lx.caramel-covered x (Lx.caramel-covered x)peanuts -> caramel-covered peanuts Functions can also be the inputs to other functions, as with this "apply-to-ants" function: Lf.(f)ants
Журнал «Практика функционального программирования» Выпуск 1, июль 2009
http://fprog.ru/2009/issue1/
Parallel Programming in Haskell: A Reading List « Control.Monad.Writer
http://donsbot.wordpress.com/2009/09/03/parallel-programming-in-haskell-a-reading-list/
Here’s my basic “How to learn about parallel programming in Haskell” reading list.
A haskell reading material
Haskell Platform Download (Beta)
http://hackage.haskell.org/platform/
“The Haskell Platform is a blessed library and tool suite for Haskell distilled from Hackage, along with installers for a wide variety of machines. The contents of the platform is specified here: Haskell: Batteries Included.”
This is the the Haskell Platform, version 2009.2.0.2: a single, standard Haskell distribution for every system. The Haskell Platform is a blessed library and tool suite for Haskell distilled from Hackage, along with installers for a wide variety of machines. The contents of the platform is specified here: Haskell: Batteries Included.
This is the the Haskell Platform, version 2009.2.0.2: a single, standard Haskell distribution for every system.
InfoQ: Persistent Data Structures and Managed References
http://www.infoq.com/presentations/Value-Identity-State-Rich-Hickey
Persistent Data Structures and Managed References
Rich Hickey
good overview of concurrent data structures, refs and STM in Clojure
Rich Hickey is my new favourite presenter. The bloke is awesome (well except for the mullet you can see in this video)! In this video he discusses time as it relates to variable state, briefly applying it to clojure. What makes it great is his practical focus and his use of a really simple example to get across the point.
Lambda Calculus (at Safalra's Website)
http://safalra.com/science/lambda-calculus/
al introduction to lambda calculus
InfoQ: Joe Armstrong and Simon Peyton Jones discuss Erlang and Haskell
http://www.infoq.com/interviews/armstrong-peyton-jones-erlang-haskell
Joe Armstrong and Simon Peyton Jones discuss Erlang and Haskell
Interesting video where Joe Armstrong and Simon Peyton Jones engage in some friendly banter about functional programming and Erlang vs Haskell.
ooc
http://ooc-lang.org/
ooc is a modern, object-oriented, functional-ish, high-level, low-level, sexy programming language. it's translated to pure C with a source-to-source compiler.
Jack Cough on Software: Teaching Functional Programming To Kids
http://jackcoughonsoftware.blogspot.com/2009/05/teaching-functional-programming-to-kids.html
http://www.lilyapp.org/about/
SICP in Clojure
http://sicpinclojure.com/
This site exists to make it easier to use Clojure rather than Scheme while working through SICP.
This site exists to make it easier to use Clojure rather than Scheme while working through SICP. The folks behind SICP were kind enough to release it under a Creative Commons Attribution-Noncommercial 3.0 Unported License, which will allow me to annotate the text and adapt its source code and exercises to fit the Clojure language.
Underscore.js
http://documentcloud.github.com/underscore/
Underscore provides 44-odd functions that support both the usual functional suspects: map, select, invoke — as well as more specialized helpers: function binding, javascript templating, deep equality testing, and so on. It delegates to built-in functions, if present, so Javascript 1.6 compliant browsers will use the native implementations of forEach, map, filter, every, some and indexOf. Underscore includes a complete Test & Benchmark Suite for your perusal. The unabridged source code is available on GitHub.
Underscore is a utility-belt library for Javascript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in Javascript objects. It's the tie to go along with jQuery's tux. Underscore provides 44-odd functions that support both the usual functional suspects: map, select, invoke — as well as more specialized helpers: function binding, javascript templating, deep equality testing, and so on. It delegates to built-in functions, if present, so Javascript 1.6 compliant browsers will use the native implementations of forEach, map, filter, every, some and indexOf.
Why Haskell is beyond ready for Prime Time « Integer Overflow
http://intoverflow.wordpress.com/2009/01/13/why-haskell-is-beyond-ready-for-prime-time/
Why Haskell is beyond ready for Prime Time
Here’s a concrete example: I’ve got a list of numbers, and I want to split it up into two lists — one consisting of the evens, one consisting of the odds. This seems like a pretty specialized task, so I doubt there’s a function written for it explicitly. So let’s look for a function that takes a list, and a boolean test, and splits it into two lists — one consisting of the elements satisfying the test, and the other consisting of the elements that don’t. That is, I need a function that takes a list of integers, and a function from integers to bools, and produces two lists of integers. No problem: I jump over to Hoogle and search for functions of type [Int] -> (Int -> Bool) -> ([Int], [Int]). It produces a short list of results, tells me what library they are in, and even gives a brief description of what the function does. I quickly see that partition is the function I want.
**** Great Haskell Advocacy . We’ve got all the usual things — source control by darcs, unit testing by HUnit, automated testing by Quick Check, and source documentation by Haddock. We’ve also got package management by Cabal (tied into Hackage, of course). We’ve got one other tool that is perhaps the strongest reason for the language — the Glorious Glasgow Haskell Compiler. You won’t find a more advanced compiler anywhere on earth. It produces code that is performance-competitive with C, has built in support for profiling, and features a rich interactive mode that both helps you test code and also explore types and interfaces.
Functional Geometry
http://www.frank-buss.de/lisp/functional.html
Nice bit of drawing code.
関数プログラミングで扱う幾何学について。
Functional Programming for Everyday .NET Development
http://msdn.microsoft.com/en-us/magazine/ee309512.aspx
Computational Semantics with Functional Programming
http://homepages.cwi.nl/~jve/cs/
Preziosissima risorsa.
This book is on applications of logic in the semantic analysis of language.
The Magic Behind Parser Combinators - Code Commit
http://www.codecommit.com/blog/scala/the-magic-behind-parser-combinators
If you’re like me, one of the first things that attracted you to Scala was its parser combinators. Well, maybe that wasn’t the first thing for me, but it was pretty far up there. Parser combinators make it almost too easy to create a parser for a complex language without ever leaving the comfortable play-pen afforded by Scala. Incidentally, if you aren’t familiar with the fundamentals of text parsing, context-free grammars and/or parser generators, then you might want to do some reading before you continue with this article.
If you ever want to write a basic parser in Scala, take a look at this.
need
Finally: Finger Trees! : Good Math, Bad Math
http://scienceblogs.com/goodmath/2009/05/finally_finger_trees.php
What finger trees do is give me a way of representing a list that has both the convenience of the traditional cons list, and the search efficiency of the array based method. The basic idea of the finger tree is amazingly simple. It's a balanced tree where you store all of the data in the leaves. The internal nodes are just a structure on which you can hang annotations, which you can use for optimizing search operations on the tree.
"The basic idea of the finger tree is amazingly simple. It's a balanced tree where you store all of the data in the leaves. The internal nodes are just a structure on which you can hang annotations, which you can use for optimizing search operations on the tree. What makes the finger tree so elegant is the way that some very smart people have generalized the idea of annotations to make finger trees into a single, easily customizable structure that's useful for so many different purposes: you customize the annotations that you're going to store in the internal nodes according to the main use of your tree." A commentator says regarding the article however, "Ørjan Johanse is right. You described a monoid-annotated-binary-tree, which is not enough to be a finger tree."
Benefits of automated functional testing (was: Why unit testing is a waste of time) » SDK
http://sdk.org.nz/2009/02/25/why-unit-testing-is-a-waste-of-time/
do you get the application up and running on your development environment. If you’re lucky, there’ll be some up-to-date instructions for getting it to kind of start up. Then you’ll get one of the other developers to show you how to run a few
http://www.developers.org.ua/archives/vseloved/2009/07/03/weekly-linkdump-182/
http://intensivesystems.net/tutorials/monads_101.html
http://intensivesystems.net/tutorials/monads_101.html
Monoids and Finger Trees
http://apfelmus.nfshost.com/monoid-fingertree.html
"A very powerful application of monoids are 2-3 finger trees, first described by Ralf Hinze and Ross Patterson. Basically, they allow you to write fast implementations for pretty much every abstract data type mentioned in Okasaki's book on purely functional data structures. For example, you can do sequences, priority queues, search trees and priority search queues. Moreover, any fancy and custom data structures like interval trees or something for stock trading are likely to be implementable in this framework as well. How can one tree be useful for so many different data structures? The answer: monoids! Namely, the finger tree works with elements that are related to a monoid, and all the different data structures mentioned above arise by different choices for this monoid. Let me explain how this monoid magic works."
Hello Haskell, Goodbye Lisp - Lost in Technopolis
http://www.newartisans.com/2009/03/hello-haskell-goodbye-lisp.html
Comparison of the LISP and HASKELL (functional) languages
Interesting read on some programming languages I hadn't heard of until today, they are still very useful apparently
How I finally understood the Y Combinator (and blew my damn mind) « noeit
http://noeit.wordpress.com/2009/04/28/how-i-finally-understood-the-y-combinator-and-blew-my-damn-mind/
Try Haskell!
http://tryhaskell.org/
Welcome to your first taste of Haskell! Let's try Haskell right now! Beginners Type help to start the tutorial. Or try typing these out and see what happens: * 23*36 * reverse "hello" Learn More Real World Haskell book cover Get stuck into a book with Real World Haskell (readable online!), published by O'Reilly Media. Checkout Haskell.org for more information about Haskell.
netzhansa: Trying Clojure...
http://netzhansa.blogspot.com/2008/10/trying-clojure.html
XML example
Shows good examples of XML and HTTP processing in Clojure
Scott Hanselman's Computer Zen - The Weekly Source Code 34 - The Rise of F#
http://www.hanselman.com/blog/TheWeeklySourceCode34TheRiseOfF.aspx
Some very good notes about F#.
Great list of F# links and tutorials and other stuff.
Abstract Heresies: You knew I'd say something.
http://funcall.blogspot.com/2009/04/you-knew-id-say-something.html
An exhaustive exploration of recursion, tail calls and TCO
2009-04-09 - きしだのはてな
http://d.hatena.ne.jp/nowokay/20090409#1239268405
メタ役立ちそう
後者関数のラムダ式に書き間違いがある気がする。 succ = λx.λf.λx.f(n f x) => succ = λn.λf.λx.f(n f x) だと思うんだけど、どうなんだろう…。
Tupil Code Blog » Blog Archive » Look ma, no callbacks!
http://blog.tupil.com/look-ma-no-callbacks/
Arrowlets
"Arrows are a concept from functional programming, and we’ll see how they can make our life in Javascript a lot easier. Our code uses the excellent Arrowlets library. It’s still alpha code, but it’s already quite useful."
Web λ.0 - Functional programming for the Web: Sky is the limit
http://weblambdazero.blogspot.com/2008/09/sky-is-limit.html
Using tokyocabinet as backing store for Mnesia
This is only the 3rd blog post I found about mnesiaex and support for tokyocabinet. The comments are worth reading!
Is the Supremacy of Object-Oriented Programming Over?
http://blog.objectmentor.com/articles/2009/04/20/is-the-supremacy-of-object-oriented-programming-over
I never expected to see this. When I started my career, Object-Oriented Programming (OOP) was going mainstream. For many problems, it was and still is a natural way to modularize an application. It grew to (mostly) rule the world. Now it seems that the supremacy of objects may be coming to an end, of sorts.
talking about object oriented programming and functional programming...leads you to believe the best designs leverage both.
Hybrid languages = OOP FP. CouchDB Map-Reduce Concurrency
In the comments: "On the computer science front, pure OO, based on late-binding and message sends has always built on functional ideas and encourages a declarative programming style. Lisp and Smalltalk have much in common. The best way to look at it is that a function can be an object too. So I see no or very little conflict between OO and functional programming. The real issue is that pure OO has been viewed (rightly so) as a disruptive technology. The incumbent technology base, built on C and Unix have found ways to neutralise the potential disruptive effect and hold on to their market. As a consequence we have spent the last 20 years using curly bracket languages that are ‘OO’ in name only. [...] Pure OO is still in obscurity. Languages like Ruby and Python show what is possible with Pure OO ideas and late-binding, but they do not extend these ideas or take them even as far as Smalltalk did."
The fact is, for a lot of these applications, it’s just data. The ceremony of object wrappers doesn’t carry its weight. Just put the data in a hash map (or a list if you don’t need the bits “labeled”) and then process the collection with your iterate, map, and reduce functions. This may sound heretical, but how much Java code could you delete today if you replaced it with a stored procedure?
Snap: A Haskell Web Framework: Home
http://snapframework.com/
Snap Framework: a web framework for Haskell
Snap is a simple web development framework for unix systems, written in the Haskell programming language. A fast HTTP server library with an optional high-concurrency backend using the libev event loop library A sensible and clean monad for web programming An XML-based templating system for generating HTML
What is Snap? Snap is a simple web development framework for unix systems, written in the Haskell programming language. Snap is well-documented and has a test suite with a high level of code coverage, but it is early-stage software with still-evolving interfaces. Snap is therefore likely to be most appropriate for early adopters and potential contributors.
Racket
http://racket-lang.org/
Formerly PLT/Dr Scheme
With Racket, you can script command shells and web servers; you can quickly prototype animations and complex GUIs; regexps and threads are here to serve you. To organize your systems, you can mix and match classes, modules or components. Best of all, you start without writing down types.
wu.js
http://fitzgen.github.com/wu.js/
Wu.js is a library for lazy, functional programming in Javascript. Works great in the browser, and also with CommonJS (including node and Narwhal). The largest part of wu is dedicated to iterators. Iterators are lazy sequences with a number of methods that encourage functional programming.
map reduce, iterator, range and more functional language feature
Wu.js is a library for lazy, functional programming in Javascript. Works great in the browser, and also with CommonJS (including node and Narwhal). The largest part of wu is dedicated to iterators. Iterators are lazy sequences with a number of methods that encourage functional programming. What does it mean to be lazy? Many people might expect the following code to log "1 squared is 1", "2 squared is 4", and "3 squared is 9" immediately.
Interesting lazy functional library for javascript.
Wu.js is a library for lazy, functional programming in Javascript. Works great in the browser, and also with CommonJS (including node and Narwhal).
Wu.js is a library for lazy, functional programming in Javascript.
Ruby Procs And Lambdas (And The Difference Between Them)
http://www.skorks.com/2010/05/ruby-procs-and-lambdas-and-the-difference-between-them/