Haskell into Nine Constructors

British computer scientist talks about Haskell and Erlang
22 August 2017   845

Erlang and Haskell are childhood friends who grew up together. Throughout the years, they took a lot from each other.

GHC translates all of Haskell into a tiny but super-expressive intermediate language called Core, does a lot of optimisations on Core, and then generates executable code. Core is statically typed, making GHC one of the very few production compilers that is statically typed all the way through to code generation. It pulls off this trick by drawing directly on System F, a mathematical calculus from type theory. Functional programming is amazing: serious theory leads directly to beautiful implementations.

In this talk Simon Peyton Jones will take you on a journey into Core and its design choices.

You will learn about:

  • Core’s type system,
  • the optimisations that GHC implements in Core, including
    • let-floating,
    • strictness analysis,
    • specialisation,
    • inlining,
    • the case-of-case transformation.

Haskell and Erlang are both functional languages, albeit with significant differences (strict vs lazy, untyped vs typed). I hope that the talk may lead to dialogue about how these similarities and differences show up in a compiler.

About the speaker: 

Simon Peyton Jones is a British computer scientist who researches the implementation and applications of functional programming languages, particularly lazy functional programming. He is an honorary Professor of Computer Science at the University of Glasgow and co-supervises PhD students at the University of Cambridge.

Aeternity and Erlang unite forces to address blockchain scalability

The partnership will strive to effectively serve billions of potential users
29 January 2018   406

Last week distributed computing platform aeternity partnered with fault-tolerant systems developer Erlang Solutions. Aeternity is going to scale its distributed network with fault-tolerant systems with the assistance of Erlang. It will allow to serve billions of users to further drive the adoption of blockchain technology. In addition to scalability, the partnership aims to address consensus-related mechanisms.

To achieve the scalability, aeternity brings in the concept of “state channels”: because only the people affected by the transaction need to know about it, then the parties instantiate some state on a blockchain and send signed updates to this state between each other. Thus, transactions are conducted as fast as information can travel, and channels stay independent from each other which in turn allow parallel transactions.

Regarding the consensus mechanism, it is a hybrid of Proof-of-Work and Proof-of-Stake: Proof-of-Work determines block-order, while the hybrid algorithm will determine the answers of oracle questions and system variables.

As for Erlang, the blockchain itself, the contract language, the virtual machine, the oracle and governance mechanisms are written in Erlang. The specifics of the language is that it allows to write code that can respond to many requests and doesn’t crash. On top of that, the servers with the highest uptime in the world are based on Erlang.

The launch of main network is scheduled for Q2 of 2018.

The users on Reddit reacted positively on the news about the partnership some gave predictions:

@murt «Aeternity has been one of the best kept secrets in crypto but looks like it's starting to break out now. Will be $1B market cap in no time».

@davidsho1 «That's huge partnership. Erlang solutions processes for billions of users. Possibly biggest news in blockchain period. Too bad noone knows aeternity. Only a matter of time before word gets out. 100$ aeternity on mainnet very likely. This project has enormous potential».

@izroda «AE bull run, important new partnership, what more can you want from a Saturday».