Hamler – Haskell-style functional programming language running on Erlang VM

栏目: IT技术 · 发布时间: 4年前

内容简介:2020-06-11We are proud to announce the first public release of a new open-sourceFor almost a decade, we have been developing software systems based on Erlang/OTP, especially our main product

2020-06-11

We are proud to announce the first public release of a new open-source functional programming language - Hamler . Hamler is a strongly-typed language with compile-time type checking and built-in support for concurrency and distribution. It empowers industries to build the next generation of scalable, reliable, realtime applications, especially for 5G, IoT and edge computing.

Why Hamler?

For almost a decade, we have been developing software systems based on Erlang/OTP, especially our main product EMQ X - the scalable open-source MQTT broker. So, we have always believed that Erlang is a masterpiece of engineering. With amazing concurrency, distribution and fault tolerance, it is one of the few general-purpose language platforms able to properly handle concurrency and soft realtime.

However, from years of experience developing Erlang programs, we have been looking to solve two problems: the compile-time type system and the more friendly language syntax. A powerful compile-time type system helps build more reliable software systems; while a more friendly syntax helps to build a prosperous developer community.

It has taken nearly 20 years for academia and industry to find a solution. Started with Prof. Philip Wadler and Simon Marlow in 2000, type annotation and Dialyzer a static analysis tool were introduced for Erlang.

Since 2008, there have been about 20 projects in the industry trying to solve the problem. Elixir language project introduced Ruby syntax and attracted developers from the Ruby On Rails community! The Akka project imitated the implementation of Erlang/OTP, but lost the soft real-time feature of Erlang/OTP. Well-Typed 's the Cloud Haskell project attempts to simulate the implementation of Erlang/ OTP in Haskell, the project is currently stalled. There are others like lfe introduced Lisp syntax, alpacaefeneelchemygleam etc. have attempted to introduce ML style syntax and static types, most of which are still in their early stage of development.

The EMQ team has made another attempt to address these issues with a new design approach. And today, we present the industry the release of Hamler Language 0.1!

Hamler Core Features

The core features of Hamler, a functional programming language running on Erlang VM with the Haskell-like syntax, can be summarized as follows:

  • Haskell and ML-like friendly syntax
  • Type checking and inference at compile time
  • Concurrency, soft real-time support at runtime

Combined with our years of experience and understanding in developing Erlang and Haskell programs, the Hamler language supports most of the major features of functional programming that we believe will help the industry better prepare for the coming wave of development in 5G, IoT and edge computing, and attract more developers to use the Erlang VM - BEAM.

  • Functional programming
  • Haskell and ML style
  • ADT and Type Checking/Inference
  • Functions, higher-order functions
  • Currying and partial application
  • Pattern matching, and Guards
  • List comprehension
  • Applicative and Monad
  • Advanced module system
  • Built-in concurrency

The Hamler Compiler

The Hamler source code is parsed to generate CST, then CoreErlang's IR is generated after CST -> AST -> CoreFn's syntax tree transformation, syntax analysis and type checking. The code is then used by the Erlang compiler to generate the final Beam bytecode.

The Hamler compiler architecture is shown below:

Hamler – Haskell-style functional programming language running on Erlang VM

The Hamler 0.1 compiler was initially attempted to be implemented based on the GHC 8.10.1, but was later changed to adapt from Purescript Compiler 0.13.6's implementation.

Documentation

Community, discussion and supports

You can reach the Hamler community and core team via the following channels:

Contributing

To contribute to Hamler project:

  • Report issues: submit any bugs, issues to hamler/issues
  • Contribute code: Fork the project, and submit feature requests to hamler-lang/hamler .
  • Submit a proposal: Fork the hamler-wiki project and submit pull request

Core Team

The Hamler core team comes from EMQ Technologies Co., Ltd. now.

About EMQ

EMQ is an open source software company providing highly-scalable, real-time messaging and streaming platform for IoT applications in 5G Era.


以上所述就是小编给大家介绍的《Hamler – Haskell-style functional programming language running on Erlang VM》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

20个月赚130亿

20个月赚130亿

陈士骏、张黎明 / 中国华侨出版社 / 2011-11-17 / 35.00元

YouTube联合创始人陈士骏在书中以朴实亲切的口吻讲述了他的人生经历,以及对学业、事业、梦想、财富、生死等的种种感悟。 童年随全家去美国小镇定居,少年时代迷上计算机编程; 离大学毕业还有几个月时放弃学位,怀揣200美元奔赴硅谷,加入创业公司PayPal,公司上市后成为百万富翁; 因为无法接受PayPal被EbayeBay收购后工程师丧失发言权,和好友一起开创视频网站YouTub......一起来看看 《20个月赚130亿》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

URL 编码/解码
URL 编码/解码

URL 编码/解码