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》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

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

算法交易与套利交易

算法交易与套利交易

赵胜民 / 厦门大学出版社 / 2010-9 / 35.00元

《算法交易与套利交易》主要介绍算法交易和一些套利交易的策略,以便于读者对相关方面的内容进行阅读和学习。在《算法交易与套利交易》的第一部分,我们回顾了投资学一些相关的基本内容。其中,前两章介绍了证券投资的收益和风险等特征,以及马可维茨的最优资产配置模型。第3章则介绍了股票投资分析当中常用的资本资产定价模型(CAPM)、套利定价模型(APT),以及因素模型。然后,第4、5章分别讲到了金融证券估值模型、......一起来看看 《算法交易与套利交易》 这本书的介绍吧!

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

在线压缩/解压 JS 代码

在线进制转换器
在线进制转换器

各进制数互转换器

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具