ClojureScript 的 Go 编译器 Cljs2go

码农软件 · 软件分类 · 编译器 · 2019-12-08 08:44:17

软件介绍

Cljs2go 是 ClojureScript 转换为 Go 的编译器。

ClojureScript 转换到 Go,不是分支出来,而是直接覆盖到 ClojureScript 上。Go 是从 cljs.go.compiler 上发行出去,而 cljs.go.compiler 是 cljs.compiler 的一个补丁版本。在运行时,会提供简单的 JS 兼容以避免接触 cljs.core,这些 js 和 goog 包不打算对用户开放使用。

一旦编译器开始工作,该计划将提供第二个猴子补丁(monkey patch),这回是提供 Java 依赖,像 java.io.File 和其他 Clojure 副本,clojure.java.io。此补丁可以将编译器本身编译成 Go。这既不会改变运行时编译程序的特点,也不会引入 eval,它只是充分利用了 Go 来建造管道。

示例代码:

# Clone and build the Go packages:
$ go get github.com/hraberg/cljs2go
# The repo itself lives under src by convention:
$ cd $GOPATH/src/github.com/hraberg/cljs2go
# go test, for Go tests checked into git, both generated and handwritten ones:
$ go test -v ./...
# To re-generate the tests from ClojureScript (this might dirty the repo):
$ lein test
# (This also generates and runs some tests under target/generated which aren't checked in.)
# To re-generate the Go for ClojureScript itself:
$ go generate

本文地址:https://www.codercto.com/soft/d/20679.html

jQuery基础教程

jQuery基础教程

Jonathan Chaffer、Karl Swedberg / 李松峰、卢玉平 / 人民邮电出版社 / 2009-11 / 49.00元

《jQuery基础教程(第2版)》作为《jQuery基础教程》的升级版,涵盖了jQuery 1.3的全部新特性,特别是新增了介绍jQuery UI(jQuery官方用户界面插件库)的内容。《jQuery基础教程(第2版)》前6章以通俗易懂的方式介绍了jQuery的基本概念,主要包括jQuery的选择符、事件、效果、DOM操作、AJAX支持等。随后3章从理论到实践,通过表格操作、构建功能型表单、实现......一起来看看 《jQuery基础教程》 这本书的介绍吧!

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

多种字符组合密码

SHA 加密
SHA 加密

SHA 加密工具

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

在线XML、JSON转换工具