Higher order functions might be a big “Ah” moment in FP, but the concept is really very simple and basic in OO.
In this InfoQ interview filmed at RubyFringe 2008, Tom Preston-Werner talks about how both Powerset and GitHub use Ruby and Erlang, as well as tools like Fuzed, god, and more.
A short introduction to Scala written after a tutorial with Bill Venners. Scala is kind of a mix of Java and ML - and a really cool language.
If the source object has a longer lifetime than the listener, and the listener doesn't need the events anymore when there are no other references to it, using normal .NET events causes a memory leak: the source object holds listener objects in memory that should be garbage collected.
There are lots of different approaches to this problem. This article will explain some of them and discuss their advantages and disadvantages. I have sorted the approaches in two categories: first, we will assume that the event source is an existing class with a normal C# event; after that, we will allow modifying the event source to allow different approaches.
David Strupl, Technical Lead for JavaFX Support in NetBeans is interviewed for the NetBeans Podcast. He talks about upcoming support for JavaFX in the NetBeans IDE. (Audio only.)
I have been asked a few times in different circumstances why I feel the need to create my own language instead of just working with Io. That is a very valid question, so I’m going to try to answer it here.
First of all, I like Io a lot. Ioke is close enough to Io that it will be obvious who the parent is. In my mind at least, the differences are in many ways cosmetic and in those that are not it’s because I have some fairly specific things in mind.
“Cloud computing” is becoming such a popular buzzword that it now even has its very own backlash. Since I designed Freenet, I’ve been interested in the problem of building computing systems that can scale effectively. While Freenet focused on the storage and retrieval of information, I’ve often wondered whether something similar could be created for computation in general.
The result of this is “Swarm”. Before anyone gets too excited, note that Swarm is currently just a proof-of-concept prototype, not anywhere close to being suitable for actual use.
In this conversation Microsoft Technical Fellow and Chief Architect of C# Anders Hejlsberg sits down with programming language design legend and computer scientist Guy Steele (creator of Scheme and expert in several languages ranging from LISP to Java).
The fact is that there are a lot of problems that are hard to solve in a purely-functional style. That’s not to say that no solution exists, but certain problems are very difficult to model without shared state. In such situations, a slightly different approach to concurrency must be considered. Actors are inapplicable, seeing as they are the embodiment of “shared-nothing” continuation passing, and fork/join doesn’t really help us.
In this video Anders Hejlsberg takes a look at the future of programming languages and sees the trends; declarative, dynamic and concurrent. As the chief designer of the C# programming language and a key participant in the development of the .NET Framework Anders Hejlsberg has a lot to say about this development - not just as a wish but also as something that can be realized.
We use different concepts than typical XML based interop solutions by providing a seamless default mapping between Java, .NET and C++ objects. We have several customers who use mixed teams, usually .NET team which develop user interfaces for the desktop and Java or C++ server side processing teams. In our solution the objects are mapped to a canonical efficient representation. It is the framework's role to do the mapping and conversion and not of the user's. For this reason we can apply very sophisticated optimization which makes language boundaries unnoticeable from performance and efficiency perspectives.
An important concept in functional programming is pure functions. This post describes how to possibly implement verification of function purity in the Scala compiler.
A tutorial to create a newsletter application for your website. It allows users to subscribe and unsubscribe from the newsletter. A simple online administration interface (an ASP.NET page) allows the admin to create and send newsletters/emails.
In this second post in the Real-World Scala series I am going to discuss how to implement/achieve Depenency Injection (DI) in Scala. Scala is a very rich and deep language that gives you several ways of doing DI solely based on language constructs, but nothing prevents you from using existing Java DI frameworks, if that is preferred.
It is obvious that we live in interesting times for programming languages. But are they interesting enough? What are the current trends in cutting edge programming languages?
Er.js piggybacks on Neil Mix’s Thread.js which fakes threading in JavaScript 1.7 using coroutines and nested generator continuations. The goal is to replicate Erlang’s concurrent lockless process model and message-passing APIs in JavaScript.
The birth of object-oriented programming is often traced back to Simula 67, which was released in -- you guessed it -- 1967. However, I recently encountered an example that goes back even further. That example is in the Data Control Block (DCB) that was an integral part of the user interface to IBM's mainframe operating system, OS/360, that I believe first saw the light of day in 1964. I haven't kept in touch with that system's successors, but I would be surprised if a similar data structure does not still exist today.
I’ve been a big fan of closures for years. I was first introduced to them in Smalltalk, where they were just called blocks. Ruby has them and also calls them blocks. Java does not have them, though there are proposals (such as this one) to add them to a future version of the language. Groovy has them now, and while they aren’t as shiny as those in Ruby, they do work.
One of the authors of the Fan programming language (http://www.fandev.org) talks about his experience at the JVM Summit.
Don’t know why I didn’t write this before; it makes code very readable. Often when you write anything graphics related, you want to constrain coordinates to window edges (for example).
I needed a List with fast random access capabilities. Standard implementations of a List takes O(i) to access the ith element. I am using Scala and arrays do not really cut as a well-behaved functional data structure. Besides I needed dynamic resizing, persistence and good worst case complexity. Anyway I was trying to justify implementing Okasaki's Purely Functional Random Access Lists ..
I’ve been very busy continuing my C# 3.0 and .NET 3.5 self-education. I’ve been focusing primarily on LINQ, but before I cover that here, which will take several postings, I wanted to cover Lambda Expressions. If you have been reading about LINQ and its related technologies at all, you’ve surely come across this term already. If you’ve already read some about Lambdas, then perhaps you came to the same conclusion I did: a lot of writers covering Lambda Expressions seem to want you to be boggled by them.
A few days back, Robert Virding released a stable version of LFE - Lisp Flavored Erlang, a concurrent Lisp based on the features and limitations of the Erlang VM. Unlike Lisp it doesn't have global data or mutating operations. Instead it has the goodness of Lisp macros, sexprs, code-as-data together with the Erlang power of pattern matching and binary comprehensions. And the best part is that LFE hosts seamlessly with vanilla Erlang/OTP.
I am becoming increasingly frustrated by Common Lisp's age. On the one hand, history makes it what it is: Mature, well-documented, thoroughly understood and practical. On the other, it fails to keep up with current system designs, lacking convenient native support for rich data structures, infrastructure access and parallel programming. No programming language choice is without tradeoffs and in that respect, and I'll still chose Common Lisp in many situations. Realistically, though, Common Lisp cannot be the only language in my tool chest. For browser work, Javascript is much more practical, and for parallel programming, I'm on the lookout.
Different programming languages have different takes on how to handle I/O. The basic way is to wrap the kernel syscalls, here's the basic open() call in assembler:
Generally, when we talk about programming languages, we usually mean things like, C, C++, Java, Perl, PHP, etc. I think that, over time, this narrow definition of what a programming language is has actually hindered our ability to engineer software.
Ioke is a strongly typed, extremely dynamic, prototype based object oriented language. It’s homoiconic and got built in support for several kinds of macros. The languages that most closely influence Ioke is Io, Smalltalk, Self, Ruby and Lisp (Specifically Common Lisp).
Let me apologize up front for the tone of this article. I have nothing against single assignment languages. I love Erlang. If you are a fan of single assignment, I wish in no way to discourage you from using Erlang. There’s nothing intrinsically wrong with single assignment and it has its place in languages which wish to function like the untyped lambda calculus.
There must be a name for that particular form of programming masochism which involves wringing the maximum effect out of the minimum of code. If not, someone should invent one!
The last nine months I have been running my own business together with some friends (Triental AB). We are building a product suite for private banking and wealth management with a focus on portfolio management, analysis and simulation.
I spent last week at the JVM Language Summit, a small conference focused on non-Java JVM-based languages. It was populated almost solely by either JVM implementors or bytecodes-are-my-new-assembler types.