什么是最生产级的 Haskell 到 JavaScript 编译器,用于编写在浏览器中运行的代码?

发布于 2024-11-14 18:45:55 字数 1539 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

无人问我粥可暖 2024-11-21 18:45:55

这里有一个更完整的列表:

http://www.haskell.org/haskellwiki/The_JavaScript_Problem

还有 Fay(虽然它只是 haskell 的子集)

https://github.com/faylang/fay

There is a more complete list here:

http://www.haskell.org/haskellwiki/The_JavaScript_Problem

and there is also Fay (although it is only a subset of haskell)

https://github.com/faylang/fay

呢古 2024-11-21 18:45:55

您可能会发现此列表很有用:
https://github.com/jashkenas/coffee-script/ wiki/List-of-languages-that-c​​ompile-to-JS

从列表中:

* UHC (Utrecht Haskell Compiler) backend converts UHC core to JavaScript, allowing the compiling of Haskell code to JS.
* YHC (York Haskell Compiler) backend, as above but with YHC core language.
* jshaskell

我知道它不是 Haskell,但 Coffee 脚本是基于表达式的,而且相当优雅。

You may find this List useful:
https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS

From the List:

* UHC (Utrecht Haskell Compiler) backend converts UHC core to JavaScript, allowing the compiling of Haskell code to JS.
* YHC (York Haskell Compiler) backend, as above but with YHC core language.
* jshaskell

I know its not Haskell but Coffee script is expression based and rather elegant IMHO.

ζ澈沫 2024-11-21 18:45:55

我偶然发现了这个名为 ghcjs 的项目,

它看起来很有前途!

引用自述文件:

Haskell 到 Javascript 转换器

项目旨在提供解决方案

  • 将现代 Haskell 库编译为 Javascript 文件并使用
    它们在 Ajax 应用程序中或
  • 使用 Haskell 语言开发整个 Ajax 应用程序

项目的先前版本位于vir.mskhug.ru

I have stumbled upon this project called ghcjs

It seems promising!

Quote from the README:

Haskell to Javascript translator

Project aims to provide solution to

  • compile modern Haskell libraries to Javascript files and use
    them in Ajax applications or
  • develop entire Ajax application in Haskell language

Previous version of project is located at vir.mskhug.ru.

森末i 2024-11-21 18:45:55

虽然 GHCJS 似乎没有得到积极维护,但 Emscripten 似乎相当流行。

  • Emscripten 将 LLVM 位代码编译为 JavaScript。
  • GHC 的 LLVM 后端 似乎正在积极开发中。
  • 直观上,要回答这个问题,以下管道可能离“生产质量”并不遥远: Haskell lexemes (-> GHC ->) LLVM lexemes (-> Emscripten ->) JavaScript lexemes

我承认这是一个推测性的帖子。

While GHCJS does not seem to be actively maintained, Emscripten seems to be quite current.

  • Emscripten compiles LLVM bitcode to JavaScript.
  • GHC's LLVM backend appears to be actively developed.
  • Intuitively, to answer the question, the following pipeline might not be very far from "production quality": Haskell lexemes (-> GHC ->) LLVM lexemes (-> Emscripten ->) JavaScript lexemes

I'll admit that this is a speculative post.

烛影斜 2024-11-21 18:45:55

这种语言,Roy,也许不是真正的 Haskell(?),但看起来非常相似:

http ://roy.brianmckenna.org/

罗伊似乎还活着; GitHub 存储库中有许多分支: https://github.com/pufuwozu/roy
它似乎还活着: https://github.com/pufuwozu/roy/graphs

< br>
如果您使用的是 Play Framework 2.0,则有一个插件 Ray,可以在 Play Framework 2.0 上运行 Roy:

http://brianmckenna.org/blog/ray
https://github.com/pufuwozu/ray

最后一次提交是四个月前,时间相当长请记住,Play Framework 2 可能是在 4 或 5 个月前发布的。

This language, Roy, is perhaps not really Haskell (?), but it seems very similar:

http://roy.brianmckenna.org/

Roy seems to be alive; there are many forks in the GitHub repo: https://github.com/pufuwozu/roy
and it seems to be alive: https://github.com/pufuwozu/roy/graphs

If you're using Play Framework 2.0, then there's a plugin, Ray, to run Roy on Play Framework 2.0:

http://brianmckenna.org/blog/ray
https://github.com/pufuwozu/ray

The last commit was four months ago, which is rather long ago keeping in mind that Play Framework 2 was released perhaps 4 or 5 months ago.

执笔绘流年 2024-11-21 18:45:55

Yesod 有一个“最高生产级别”候选列表: https://github.com /yesodweb/yesod/wiki/Javascript-Options (Yesod 是一个非常流行的 Haskell 网络框架,所以他们可能知道他们在说什么)

There is a list of "most production level" candidates from Yesod: https://github.com/yesodweb/yesod/wiki/Javascript-Options (Yesod is a very popular Haskell webframework so they may know what they are talking about)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文