欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Clojure
来自开放百科 - 灰狐
您可以在Wikipedia上了解到此条目的英文信息 Clojure Thanks, Wikipedia. |
Clojure 是一个面向Java Virtual Machine 的动态语言。
Lisp 是一种编程语言,以表达性和功能强大著称,但人们通常认为它不太适合应用于一般情况。Clojure 是一种运行在 Java平台上的 Lisp 方言,它的出现彻底改变了这一现状。如今,在任何具备 Java 虚拟机的地方,您都可以利用 Lisp 的强大功能。
指南
wget http://repo1.maven.org/maven2/org/clojure/clojure/1.6.0/clojure-1.6.0.zip java -cp clojure-1.6.0.jar clojure.main user=> (+ 1 2 3) 6
OS X
使用leiningen工具来管理Clojure项目和Java配置。
获得 https://raw.github.com/technomancy/leiningen/preview/bin/lein 并放到 /bin 目录下,chmod 755
cd bin,执行 ./lein // 开始安装 Leiningen
Leiningen is a tool for working with Clojure projects.
Several tasks are available:
check Check syntax and warn on reflection. classpath Write the classpath of the current project to output-file. clean Remove all files from project's target-path. compile Compile Clojure source into .class files. deploy Build jar and deploy to remote repository. deps Show details about dependencies. do Higher-order task to perform other tasks in succession. help Display a list of tasks or help for a given task. install Install current project to the local repository. jar Package up all the project's files into a jar file. javac Compile Java source files. new Generate project scaffolding based on a template. plugin DEPRECATED. Please use the :user profile instead. pom Write a pom.xml file to disk for Maven interoperability. repl Start a repl session either with the current project or standalone. retest Run only the test namespaces which failed last time around. run Run the project's -main function. search Search remote maven repositories for matching jars. show-profiles List all available profiles or display one if given an argument. test Run the project's tests. trampoline Run a task without nesting the project's JVM inside Leiningen's. uberjar Package up the project files and all dependencies into a jar file. upgrade Upgrade Leiningen to specified version or latest stable. version Print version for Leiningen and the current JVM. with-profile Apply the given task with the profile(s) specified.
Run lein help $TASK for details.
接着:
lein new start-clojure cd start-clojure lein repl 将获得一些jar,如: Retrieving org/clojure/clojure/1.4.0/clojure-1.4.0.jar ... user=> (println "Give me some Clojure!") Give me some Clojure! nil
链接
分享您的观点