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

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

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

查看所有标签

猜你喜欢:

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

谷歌和亚马逊如何做产品

谷歌和亚马逊如何做产品

梅 (Chris Vander Mey) / 刘亦舟 / 人民邮电出版社 / 2014-6-1 / CNY 49.00

软件在交付之前,面临产品、方案、项目和工程管理等诸多挑战,如何做到游刃有余并打造出极致产品?本书作者曾任谷歌和亚马逊高级产品经理、现任Facebook产品经理,他将自己在达特茅斯学院钻研的理论知识和在领先的互联网公司十年的工作经验尽数总结在此,从定义产品开始,一步步指导你完成管理项目、迭代、发布、市场推广等交付流程,让你身临其境地体验到极致产品如何取得成功。 本书主要内容: 如何清晰定......一起来看看 《谷歌和亚马逊如何做产品》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

MD5 加密
MD5 加密

MD5 加密工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具