Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

January 8, 2012

Spark: Cluster Computing with Working Sets

Filed under: Clustering (servers),Functional Programming — Patrick Durusau @ 7:38 pm

Spark: Cluster Computing with Working Sets

From the post:

One of the aspects you can’t miss even as you just begin reading this paper is the strong scent of functional programming that the design of Spark bears. The use of FP idioms is quite widespread across the architecture of Spark such as the ability to restore a partition from by applying a closure block, operations such as reduce and map/collect, distributed accumulators etc. It would suffice to say that it is a very functional system. Pun intended!

Spark is written in Scala and is well suited for the class of applications that reuse a working set of data across multiple parallel operations. It claims to outperform Hadoop by 10x in iterative machine learning jobs, and has been tried successfully to interactively query a 39 GB dataset with sub-second response time!

Its is built on top of Mesos, a resource management infrastructure, that lets multiple parallel applications share a cluster in a fine-grained manner and provides an API for applications to launch tasks on a cluster.

Developers write a driving program that orchestrates various parallel operations. Spark’s programming model provides two abstractions to work with large datasets : resilient distributed datasets and parallel operations. In addition it supports two kinds of shared variables.

If more technical papers had previews like this one, more technical papers would be read!

Interesting approach on first blush. Not sure I make that much out of sub-second queries on 39 GB dataset as that is a physical memory issue these days. I do like the idea of sets of data, subject to repeated operations.


New: Spark Project Homepage.

New: Spark technical report published.

January 6, 2012

Functional Thinking: Thinking Functionally, Part 3

Filed under: Functional Programming — Patrick Durusau @ 11:36 am

Functional Thinking: Thinking Functionally, Part 3

From the summary:

Functional thinking series author Neal Ford continues his guided tour of functional programming constructs and paradigms. You’ll look at number-classification code in Scala and take a glance at unit testing in the functional world. Then you’ll learn about partial application and currying — two functional approaches that facilitate code reuse — and see how recursion fits into the functional way of thinking.

Perhaps you will (also) learn a new way to think this year! 😉

Question: If data is too big to move, it is also too big to change and maintain referential integrity? Or is size an issue or simply an excuse? In an open and distributed architecture we cannot know (or find) all the references to our data.

December 20, 2011

Extreme Cleverness: Functional Data Structures in Scala

Filed under: Data Structures,Functional Programming,Scala — Patrick Durusau @ 8:22 pm

Extreme Cleverness: Functional Data Structure in Scala

From the description:

Daniel Spiewak shows how to create immutable data that supports structural sharing, such as: Singly-linked List, Banker’s Queue, 2-3 Finger Tree, Red-Black Tree, Patricia Trie, Bitmapped Vector Trie.

Every now and again I see a presentation that is head and shoulders above even very good presentations. This is one of those.

The coverage of the Bitmapped Vector Trie merits your close attention. Amazing performance characteristics.

Satisfy yourself, see: http://github.com/djspiewak/extreme-cleverness

November 14, 2011

Single Build Tool for Clojure

Filed under: Clojure,Functional Programming — Patrick Durusau @ 7:16 pm

Single Build Tool for Clojure

Cake and Leningen are going to merge for the Leningen 2.0 release.

From the post by Justin Balthrop:

Please join the Leiningen mailing list if you haven’t already (http://groups.google.com/group/leiningen) and join us in #leiningen on irc.freenode.com too. Phil also set up a wiki page for brainstorming version 2.0 changes (https://github.com/technomancy/leiningen/wiki/VersionTwo).

As I told those of you I talked to at the Conj, I feel really positive about this transition. For those of us who have contributed to Cake, it means our contributions will have a bigger impact and user base than they previously did. I’m also really excited to be working with Phil. He’s done a terrific job on Leiningen, and he has an amazing ability to organize and motivate open-source contributors.

One more note: I’m planning to rename the Cake mailing list to Flatland as I did for the IRC channel (#cake.clj -> #flatland). Feel free to unsubscribe if you aren’t interested in http://flatland.org open source projects, but we’d love for you to stay 😉

Must be nice to have a small enough body of highly motivated people to make this sort of merger work.

Will be a nice advantage for Clojure programmers in general. And for those wanting to take a functional approach to topic map engines.

October 3, 2011

Write Yourself a Scheme in 48 Hours

Filed under: Functional Programming,Haskell,Scheme — Patrick Durusau @ 7:08 pm

Write Yourself a Scheme in 48 Hours

From the webpage:

Most Haskell tutorials on the web seem to take a language-reference-manual approach to teaching. They show you the syntax of the language, a few language constructs, and then have you construct a few simple functions at the interactive prompt. The “hard stuff” of how to write a functioning, useful program is left to the end, or sometimes omitted entirely.

This tutorial takes a different tack. You’ll start off with command-line arguments and parsing, and progress to writing a fully-functional Scheme interpreter that implements a good-sized subset of R5RS Scheme. Along the way, you’ll learn Haskell’s I/O, mutable state, dynamic typing, error handling, and parsing features. By the time you finish, you should be fairly fluent in both Haskell and Scheme.

Functional programming is gaining ground. Are you?

October 1, 2011

OCaml for the Masses – Readable vs. Documented Code

Filed under: Functional Programming — Patrick Durusau @ 8:26 pm

OCaml for the Masses by Yaron Minsky (Appears in ACM’s Queue)

Great article and merits a close read.

As does the first comment, which gives a concrete example of “readable” code not preserving even for its author, “why” a particular code block was written? As the commenter points out, literate programming is the key to capturing “why” code was written, which is a prerequisite to effective long-term maintenance.

Curious what you see as the upsides/downsides to using topic map as overlays on code to provide literate programming?

True enough, it is “quicker” to write comments inline, but are your comments consistent from one instance of being written inline to another? And do your comments in code tend to be briefer than if you are writing them separately? Or are you deceiving yourself in thinking your code is “commented” when the comments are as cryptic as your code? (Not that topic maps can help with that issue, just curious.)

I see downsides in the fragility of pointing into code that may change frequently but that may be a matter of how pointers are constructed. Could experiment with strings of varying lengths as identifiers. If of sufficient length, do you really want to have different documentation for each instance? Hmmm, could create identifiers by highlighting text and after some time period, app returns you to each of those so you can write the documentation.

Other upsides/downsides?

September 26, 2011

The HasGP user manual

Filed under: Functional Programming,Guassian Processes,Haskell — Patrick Durusau @ 6:58 pm

The HasGP user manual (pdf)

Abstract:

HasGP is an experimental library implementing methods for supervised learning using Gaussian process (GP) inference, in both the regression and classification settings. It has been developed in the functional language Haskell as an investigation into whether the well known advantages of the functional paradigm can be exploited in the field of machine learning, which traditionally has been dominated by the procedural/object-oriented approach, particularly involving C/C++ and Matlab. HasGP is open-source software released under the GPL3 license. This manual provides a short introduction on how install the library, and how to apply it to supervised learning problems. It also provides some more in-depth information on the implementation of the library, which is aimed at developers. In the latter, we also show how some of the specific functional features of Haskell, in particular the ability to treat functions as first-class objects, and the use of typeclasses and monads, have informed the design of the library. This manual applies to HasGP version 0.1, which is the initial release of the library.

HasGP website

What a nice surprise for a Monday morning, something new and different (not the same thing). Just scanning the pages before a conference call I would say you need to both read and forward this to your Haskell/Gaussian friends.

Comes with demo programs. Release 0.1 so it will be interesting to see what the future holds.

The project does need a mailing list so users can easily discuss their experiences, suggestions, etc. (One may already exist but isn’t apparent from the project webpage. If so, apologies.)

September 18, 2011

Functional Data Structures – Chris Okasaki Publications

Filed under: Data Structures,Functional Programming — Patrick Durusau @ 7:28 pm

Functional Data Structures – Chris Okasaki Publications

I was trying to find a paper that Daniel Spiewak mentions in: Extreme Cleverness: Functional Data Structures in Scala when I ran across this listing of publications by Chris Okasaki.

Facing the choice of burying the reference in what seems like an endless list of bookmarks or putting it in my blog where I may find it again and/or it may benefit someone else, I chose the latter course.

Enjoy.

Extreme Cleverness: Functional Data Structures in Scala

Filed under: Functional Programming,Scala — Patrick Durusau @ 7:27 pm

Extreme Cleverness: Functional Data Structures in Scala by Daniel Spiewak.

Daniel is an enthusiastic and engaging speaker.

The graphics are particularly helpful.

The influence of chip architecture on the usefulness of data structures was interesting.

All the code, etc., at: http://www.github.com/djspiewak/extreme-cleverness

September 14, 2011

Clojure Zippers

Filed under: Clojure,Functional Programming — Patrick Durusau @ 7:02 pm

Clojure Zippers

Loke VanderHart on zippers in Clojure.

From the website:

An introduction to the Clojure zip data structure, which supports fully functional tree navigation and editing. Includes a discussion of how to use the data structure effectively, as well as an overview of its performance characteristics.

I would supplement this presentation with:

“Editing” trees in Clojure with clojure.zip by Brian Marick.

Zippers – Functional Tree Editing (its under Other Included Libraries)

From the webpage:

Clojure includes purely functional, generic tree walking and editing, using a technique called a zipper (in namespace zip) . For background, see the paper by Huet. A zipper is a data structure representing a location in a hierarchical data structure, and the path it took to get there. It provides down/up/left/right navigation, and localized functional ‘editing’, insertion and removal of nodes. With zippers you can write code that looks like an imperative, destructive walk through a tree, call root when you are done and get a new tree reflecting all the changes, when in fact nothing at all is mutated – it’s all thread safe and shareable.

Oh, and the library documentation: API for Clojure.zip

August 21, 2011

Functional Programming Is Hard, That’s Why It’s Good

Filed under: Functional Programming — Patrick Durusau @ 7:06 pm

Functional Programming Is Hard, That’s Why It’s Good by David Fayrum.

From the post:

Odds are, you don’t use a functional programming language every day. You probably aren’t getting paid to write code in Scala, Haskell, Erlang, F#, or a Lisp Dialect. The vast majority of people in the industry use OO languages like Python, Ruby, Java or C#–and they’re happy with them. Sure, they might occasionally use a “functional feature” like “blocks” now and then, but they aren’t writing functional code.

And yet, for years we’ve been told that functional languages are awesome. I still remember how confused I was when I first read ESR’s famous essay about learning Lisp. Most people are probably more familiar with Paul Graham’s “Beating The Averages” which makes the case that:

But with Lisp our development cycle was so fast that we could sometimes duplicate a new feature within a day or two of a competitor announcing it in a press release. By the time journalists covering the press release got round to calling us, we would have the new feature too.

A common thread among people proselytizing functional programming is that learning this new, functional language is “good for you”; almost like someone prescribing 30m in the gym a day will “make you fit,” but it also implies difficulty and dedication. Haskell, Ocaml, and Scala are different from Lisp in that they have a certain notoriety for being very hard to learn. Polite people call this “being broad & deep”. Less polite people call it “mental masturbation” or “academic wankery” or just plain “unnecessary.” I submit that this difficulty is a familiar situation, and it’s a strong indicator that learning one of these languages will make you more productive and competent at writing software.

I will leave you to read the rest for yourself.

August 14, 2011

disclojure

Filed under: Clojure,Functional Programming — Patrick Durusau @ 7:12 pm

disclojure: public disclosure of all things clojure

The “Where To Get Started With Clojure” tab is particularly helpful.

July 3, 2011

Clojure – Functional Programming for the JVM

Filed under: Clojure,Functional Programming — Patrick Durusau @ 7:31 pm

Clojure – Functional Programming for the JVM by R. Mark Volkmann.

From the introduction:

The goal of this article is to provide a fairly comprehensive introduction to the Clojure programming language. A large number of features are covered, each in a fairly brief manner. Feel free to skip around to the sections of most interest. The section names in the table of contents are hyperlinks to make this easier when reading on-line.

June 30, 2011

Guide to Programming in Clojure for Beginners

Filed under: Clojure,Functional Programming — Patrick Durusau @ 4:05 pm

Guide to Programming in Clojure for Beginners

Now there’s a learn a programming language exercise! Write a blogging platform in it!

Any Clojure experts want to venture an evaluation?

June 27, 2011

Implementation of Functional Programming
Languages – Graph Reduction

Filed under: Functional Programming,Graphs — Patrick Durusau @ 6:33 pm

The Implementation of Functional Programming Languages by Simon L Peyton-Jones. (1987)

From the Preface:

This book is about implementing functional programming languages using graph reduction.

There appear to be two main approaches to the efficient implementation of functional languages. The first is an environment-based scheme, exemplified by Cardelli’s ML implementation, which derives from the experience of the Lisp community. The other is graph reduction, a much newer technique first invented by Wadsworth [Wadsworth, 1971], and on which the Ponder and Lazy ML implementations are founded. Despite the radical differences in beginnings, the most sophisticated examples from each approach show remarkable similarities.

This book is intended to have two main applications:

(i) As a course text for part of an undergraduate or postgraduate course on the implementation of functional languages.

(ii) As a handbook for those attempting to write a functional language implementation based on graph reduction.

You may also enjoy:

Implementing functional languages: a tutorial by Simon Peyton-Jones and David Lester. (1992)

You may be thinking that 1971 is a bit old for a newer technique (it’s not) but in that case you need to look at the homepage of Simon Peyton-Jones. Current work includes Parallel Haskell, Haskell in the Cloud, etc. Be prepared to get lost for some time.

June 14, 2011

Functional thinking: Thinking functionally, Part 2

Filed under: Functional Programming — Patrick Durusau @ 10:23 am

Functional thinking: Thinking functionally, Part 2

From the post:

In the first installment of this series, I began discussing some of the characteristics of functional programming, showing how those ideas manifest in both Java and more-functional languages. In this article, I’ll continue this tour of concepts by talking about first-class functions, optimizations, and closures. But the underlying theme of this installment is control: when you want it, when you need it, and when you should let it go.

Functional thinking:…Part 1

May 11, 2011

The Functional Web

Filed under: Functional Programming — Patrick Durusau @ 6:58 pm

The Functional Web

Steve Vinoski’s column from the IEEE Internet Computing magazine.

Very nice set of columns on functional programming and the Web.

May 4, 2011

Functional thinking: Thinking functionally, Part 1

Filed under: Functional Programming — Patrick Durusau @ 12:11 pm

Functional thinking: Thinking functionally, Part 1

Summary:

Functional programming has generated a recent surge of interest with claims of fewer bugs and greater productivity. But many developers have tried and failed to understand what makes functional languages compelling for some types of jobs. Learning the syntax of a new language is easy, but learning to think in a different way is hard. In the first installment of his Functional thinking column series, Neal Ford introduces some functional programming concepts and discusses how to use them in both Java™ and Groovy.

The first in a series of articles on functional programming by Neal Ford.

From the article:

Welcome to Functional thinking. This series explores the subject of functional programming but isn’t solely about functional programming languages. As I’ll illustrate, writing code in a “functional” manner touches on design, trade-offs, different reusable building blocks, and a host of other insights. As much as possible, I’ll try to show functional-programming concepts in Java (or close-to-Java languages) and move to other languages to demonstrate capabilities that don’t yet exist in the Java language. I won’t leap off the deep end and talk about funky things like monads (see Resources) right away (although we’ll get there). Instead, I’ll gradually show you a new way of thinking about problems (which you’re already applying in some places — you just don’t realize it yet).

A functional approach to topic maps has been around since the first edition of the topic maps standard announced:

The two or more topic links may be merged, and/or applications may process and/or render them as if they have been merged. (ISO/IEC 13250:2000, 5.2.1 Topic Link Architectural Form)

I read that to mean, merging without side effects.

Functional merging, that is merging without side effects, is useful for:

  1. Exploring merging strategies for a data set (before choosing one or more merging strategies)
  2. Offering alternative views of a common data set
  3. Enabling user specified merging (without consequences for other users)
  4. etc.

Thoughts/suggestions?

April 20, 2011

CUFP: Commercial Users of Functional Programming

Filed under: Conferences,Functional Programming — Patrick Durusau @ 2:19 pm

CUFP: Commercial Users of Functional Programming

The How Twitter Scales post lead me to the CUFP site that has free videos from previous conferences!

The call for participation for CUFP 2011 has gone out and proposals are due by 15 June 2011.

Co-located with the ACM International Conference on Functional Programming (ICFP) conference in Toyko. September 19-21, 2011.

Video: How Twitter Scales with Scala

Filed under: Functional Programming,Scala — Patrick Durusau @ 2:18 pm

Video: How Twitter Scales with Scala

From the post:

Last week we told you about how Twitter is migrating its search stack from Ruby to Java. But Twitter is also known for being an early adopter of Scala. This presentation by Marius Eriksen at the Commercial Users of Funtional Programming 2010 conference explains how Twitter uses Scala to scale.

April 19, 2011

Functional Scala – Mario Gleichmann

Filed under: Functional Programming,Scala — Patrick Durusau @ 9:36 am

Functional Scala – Mario Gleichmann

I ran across this delightful series of posts by Mario on Functional Scala.

To facilitate finding posts of interest, I have created this listing:

  1. Functional Scala: Introduction
  2. Functional Scala: Functions
  3. Functional Scala: Functions as Objects as Functions
  4. Functional Scala: Closures
  5. Functional Scala: Comprehending Comprehensions
  6. Functional Scala: High, Higher, Higher Order Functions
  7. Functional Scala: Lambdas and other shortcuts
  8. Functional Scala: Turning Methods into Functions (or WTF is eta expansion?)
  9. Functional Scala: Polymorphic Functions ?!?
  10. Functional Scala: Algebraic Datatypes – Enumerated Types
  11. Functional Scala: Algebraic Datatypes – Sum and Product Types
  12. Functional Scala: Algebraic Datatypes – ‘Sum of Products’ Types
  13. Functional Scala: Pattern Matching – the basics
  14. Functional Scala: Combinatoric Pattern Matching
  15. Functional Scala: Pattern Matching on product types
  16. Functional Scala: a little expression language with algebraic datatypes and pattern matching
  17. Functional Scala: Expressions, Extensions and Extractors
  18. Functional Scala: Tinkerbell, Frogs and Lists
  19. Functional Scala: List sugarization
  20. Functional Scala: Essential list functions
  21. Functional Scala: Quiz with Lists – common list functions, handcraftet

I will be updating this list as new posts appear.

A couple of general Scala you may find of interest:

Scala in practice: Composing Traits – Lego style

Scala Introduction – Slides available

March 8, 2011

The 16th ACM SIGPLAN International Conference on Functional Programming (ICFP 2011)

Filed under: Conferences,Functional Programming — Patrick Durusau @ 9:57 am

The 16th ACM SIGPLAN International Conference on Functional Programming (ICFP 2011)

From the call for papers:

ICFP 2011 seeks original papers on the art and science
of functional programming. Submissions are invited on all
topics from principles to practice, from foundations to
features, and from abstraction to application. The scope
includes all languages that encourage functional
programming, including both purely applicative and
imperative languages, as well as languages with objects,
concurrency, or parallelism. Particular topics of
interest include

  • Language Design: type systems; concurrency and
    distribution; modules; components and composition;
    metaprogramming; relations to imperative,
    object-oriented, or logic programming;
    interoperability
  • Implementation: abstract machines; virtual
    machines; interpretation; compilation; compile-time and
    run-time optimization; memory management;
    multi-threading; exploiting parallel hardware;
    interfaces to foreign functions, services, components,
    or low-level machine resources
  • Software-Development Techniques: algorithms and
    data structures; design patterns; specification;
    verification; validation; proof assistants; debugging;
    testing; tracing; profiling
  • Foundations: formal semantics; lambda calculus;
    rewriting; type theory; mathematical logic; monads;
    continuations; delimited continuations; global,
    delimited, or local effects
  • Transformation and Analysis: abstract
    interpretation; partial evaluation; program
    transformation; program calculation; program proofs;
    normalization by evaluation
  • Applications and Domain-Specific Languages:
    symbolic computing; formal-methods tools; artificial
    intelligence; systems programming; distributed-systems
    and web programming; hardware design; databases; XML
    processing; scientific and numerical computing;
    graphical user interfaces; multimedia programming;
    scripting; system administration; security;
    education
  • Functional Pearls: elegant, instructive, and fun
    essays on functional programming
  • Experience Reports: short papers that provide
    evidence that functional programming really works or
    describe obstacles that have kept it from working in a
    particular application

Important Dates:

Titles, abstracts & keywords due: Thursday 17 March 2011 at 14:00 UTC
Submissions due: Thursday 24 March 2011 at 14:00 UTC
Author response: Tuesday & Wednesday 17-18 May
Notification: Monday 30 May 2011
Final copy due: Friday 01 July 2011
Conference: Monday-Wednesday 19-21 September 2011

« Newer Posts

Powered by WordPress