clojure在python之上实现

clojure_p的Python项目详细描述


#clojure py

用纯python实现clojure。[![生成状态](https://secure.travis-ci.org/halgari/clojure-py.png?branch=master)](http://travis-ci.org/halgari/clojure-py

##为什么是Python?

我们相信,静态虚拟机对于动态语言来说运行时非常糟糕。它们将语言限制在对“世界应该是什么样子”的看法上,并限制了语言实现者可用的选项。我们试图通过编写运行在python vm上的clojure实现来证明这一点。我们相信,有了适当的动态jit(如pypy),在动态vm上运行的clojure版本可以优于其jvm和clr对应版本。

除此之外,还有许多python库,如pyside(qt-gui)、numpy、scipy和stackless,它们没有jvm对应项,或者至少python实现更易于使用和学习。clojure py将与python vm紧密集成,并能够使用所有这些库。

##基本概念

python内置代码在py/命名空间下可用。实际的python字节码可以通过py.bytecodes/op注入

查看位于https://github.com/halgari/clojure-py/blob/master/clojure/core.clj的代码可能是了解可能的情况以及clojure py如何实现某些函数的最佳方法。

注意:clojure py实现了clojurescript中使用的新“property vs calling method”设计:

(.__name__ (module)) ; same as module.__name__() in python

(.-__name__ (module)) ; same as module.__name__ in python

##我能帮忙吗?

在这一点上,找到一个需要,并填补它!使用clojure py,开始移植您最喜欢的clojure库,看看缺少了什么。也可以加入我们的[邮件列表](http://groups.google.com/group/clojure-py-dev)。我们(clojure py开发人员)通常只发送一条消息,要么我们计划在clojure py的某个方面进行工作(要么通过问题报告,要么通过邮件列表)。目前clojure.core中有很多函数需要移植。请访问邮件列表,让我们知道你的兴趣是什么,我们很乐意提供建议和帮助,但我们可以。

博客
我们会不时地将状态更新、想法和计划发布到这个博客http://clojure-py.blogspot.com/

##安装 安装0.1.0版本:

easy_install clojure-py clojurepy

从github签出运行:

python ./clojure.py

##单元测试

# (must ‘easy_install nose’ or ‘pip install nose’ first) nosetests

##运行

clojurepy

##许可证 不是rich hickey认可的,但此项目包含基于其工作的代码

Clojure-Py Copyright (c) Rich Hickey. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为什么我不能在try/catch中键入多个输入?   当文件名为泰语时,enctype=“multipart/formdata”的java upload file获得了奇怪的文件名   java使用jsp在tomcat中开发kerberos   Java\JSON:无法识别的属性异常:无法识别的字段“CefMessagesGenerators”错误   java在片段中删除工具栏   java ActionListener无法处理所有对象   JAVA调用从其他包继承的类的成员(其他类类型)   java RestyGWT和GWT集成:无法获取资源   java如何检查正在执行的类   java JavaFX自定义节点不呈现子节点   持久性如何在java中非持久地存储列表的内容   java EditText在禁用时恢复为灰色文本