Channels

Services

Harlan: A new GPU programming language

The young, declarative and domain-specific Harlan programming language promises to simplify the development of applications that run on the GPU. Behind its development is Erik Holk, a researcher at Indiana University. The language syntax itself is based on Scheme, a dialect of the Lisp functional programming language; various language creators regard Lisp as the ancestor of most good programming languages.

Harlan aims to help developers make productive and efficient use of GPUs without having to handle routine GPU programming tasks that would distract them from their actual work. Harlan was created when investigating which characteristics are required for a language that is designed from the start to support GPU programming. Other concepts tend to assume that GPU programming must be embedded into an existing language, which means, for example, that the existing system's special language characteristics must be taken into consideration.

Of course, there are other widely used languages and programming models for programming GPUs, for example OpenCL and CUDA – Harlan itself compiles to OpenCL, and the implementations of Intel's OpenCL SDK, NVIDIA's CUDA Toolkit and AMD's Accelerated Parallel Processing (APP) SDK appear to work with the generated OpenCL. In contrast to these approaches, the new language aims to offer programming abstractions that are more familiar from hardware-centred languages such as Python or Ruby. Holk has also thrown in some features of functional programming languages, for example an interpreter for lambda functions and the support of higher-order procedures.

Scheme serves as the basis because it has history at Indiana University, where some previous experience of building Scheme-based compilers has been gathered. Holk has also gained GPU programming experience working with the Rust programming language; unlike Harlan, however, this language works much closer to the hardware. Holk reveals that the name Harlan comes from a mishearing of fried chicken icon Colonel Sanders' first name, Harland, and this association is also why all the file extensions for Harlan programs are .kfc.