Clojure

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(Cassandra)
(数据库存储)
(未显示1个用户的40个中间版本)
第1行: 第1行:
{{top news}}
 
 
{{SeeWikipedia}}
 
{{SeeWikipedia}}
  
第5行: 第4行:
  
 
[[Lisp]] 是一种编程语言,以表达性和功能强大著称,但人们通常认为它不太适合应用于一般情况。Clojure 是一种运行在 [[Java]]平台上的 Lisp 方言,它的出现彻底改变了这一现状。如今,在任何具备 Java 虚拟机的地方,您都可以利用 Lisp 的强大功能。
 
[[Lisp]] 是一种编程语言,以表达性和功能强大著称,但人们通常认为它不太适合应用于一般情况。Clojure 是一种运行在 [[Java]]平台上的 Lisp 方言,它的出现彻底改变了这一现状。如今,在任何具备 Java 虚拟机的地方,您都可以利用 Lisp 的强大功能。
 +
 +
[[文件:clojure-logo.png|right]]
 +
 +
==简介==
 +
Clojure is about Data, [[Scala]] is about Types, [[Java]] is about Objects.
 +
 +
Eclipse Public License.
 +
 +
==虚拟机编译器==
 +
*[https://github.com/clojure/clojure-clr ClojureCLR]
 +
*[[ClojureScript]]
 +
 +
==语言==
 +
由[[Clojure]]开发的编程语言:
 +
*[https://github.com/jeaye/jank jank]
 +
*[https://github.com/LuxLang/lux lux]
 +
*[https://github.com/kanaka/mal/tree/master/clojure mal]
 +
*[https://github.com/turbopape/scheje scheje]
 +
 
==指南==
 
==指南==
 
  wget http://repo1.maven.org/maven2/org/clojure/clojure/1.8.0/clojure-1.8.0.zip
 
  wget http://repo1.maven.org/maven2/org/clojure/clojure/1.8.0/clojure-1.8.0.zip
第16行: 第34行:
 
或使用 Leiningen REPL,它比 Clojure 自带的 REPL 好很多。
 
或使用 Leiningen REPL,它比 Clojure 自带的 REPL 好很多。
 
  lein repl
 
  lein repl
 +
Web应用启动:
 +
lein run 或 lein ring server
  
 
== Leiningen==
 
== Leiningen==
第48行: 第68行:
  
 
==大数据==
 
==大数据==
*[http://cascalog.org/ Cascalog], 基于[[Apache Hadoop]]的数据处理。
+
*[[Apache Storm]]
 +
*[https://github.com/nathanmarz/cascalog Cascalog], 基于[[Apache Hadoop]]的数据处理。
 
*[https://github.com/onyx-platform/onyx Onyx]
 
*[https://github.com/onyx-platform/onyx Onyx]
 
*[https://github.com/gorillalabs/sparkling Sparkling] - A Clojure API for [[Apache Spark]]
 
*[https://github.com/gorillalabs/sparkling Sparkling] - A Clojure API for [[Apache Spark]]
 +
*[https://github.com/Netflix/PigPen PigPen] Map-Reduce for Clojure
 +
 +
==数据分析==
 +
数据分析和商业智能
 +
*[[Metabase]]
  
 
==机器学习==
 
==机器学习==
第56行: 第82行:
 
*[[deeplearning4j]]
 
*[[deeplearning4j]]
 
*[https://github.com/nuroko/nurokit nurokit] Toolkit for [[machine learning]] in Clojure.
 
*[https://github.com/nuroko/nurokit nurokit] Toolkit for [[machine learning]] in Clojure.
 +
*[https://github.com/gigasquid/k9 k9]
  
 
==计算机视觉==
 
==计算机视觉==
第70行: 第97行:
  
 
==事件CEP==
 
==事件CEP==
*[https://github.com/clojurewerkz/eep EEP], Embedded Event Processing in Clojure
+
*[https://github.com/clojurewerkz/eep EEP] Embedded Event Processing in Clojure
*[https://github.com/clojurewerkz/meltdown Meltdown], a Clojure Interface to Reactor
+
*[https://github.com/clojurewerkz/meltdown Meltdown] a Clojure Interface to Reactor
  
 
==并行并发==
 
==并行并发==
第80行: 第107行:
  
 
==金融货币==
 
==金融货币==
*[https://github.com/clojurewerkz/money ClojureWerkz Money], a Clojure Library to Work With Money
+
*[https://github.com/clojurewerkz/money ClojureWerkz Money] a Clojure Library to Work With Money
  
 
==验证授权==
 
==验证授权==
 
*[[Friend]]
 
*[[Friend]]
 
*[https://github.com/clojurewerkz/scrypt Clojure Scrypt Library]
 
*[https://github.com/clojurewerkz/scrypt Clojure Scrypt Library]
 +
*[https://github.com/funcool/buddy Buddy] - Security library for clojure.
  
==数据库==
+
==数据库存储==
 
*[[Datomic]]
 
*[[Datomic]]
 +
*[https://github.com/tonsky/datascript DataScript]
 
*[http://clojurewerkz.org/ Clojure libraries for MongoDB, RabbitMQ, validations, Neo4J, ElasticSearch, Apache Cassandra, Riak, Memcached, stream processing]
 
*[http://clojurewerkz.org/ Clojure libraries for MongoDB, RabbitMQ, validations, Neo4J, ElasticSearch, Apache Cassandra, Riak, Memcached, stream processing]
 
*[https://github.com/tomekw/hikari-cp hikari-cp] 连接池
 
*[https://github.com/tomekw/hikari-cp hikari-cp] 连接池
 
*[https://github.com/duelinmarkers/clj-record clj-record] 类似 Ruby on Rails ActiveRecord
 
*[https://github.com/duelinmarkers/clj-record clj-record] 类似 Ruby on Rails ActiveRecord
 +
*[https://github.com/puppetlabs/puppetdb PuppetDB]
  
 
===SQL===
 
===SQL===
*[https://github.com/korma/Korma Korma]: Tasty SQL for Clojure
+
*[https://github.com/korma/Korma Korma] Tasty SQL for Clojure
*[https://github.com/jkk/honeysql Honey SQL]: Turn Clojure data structures into SQL
+
*[https://github.com/jkk/honeysql Honey SQL] Turn Clojure data structures into SQL
*[https://github.com/krisajenkins/yesql yesql]: https://github.com/krisajenkins/yesql
+
*[https://github.com/krisajenkins/yesql yesql] https://github.com/krisajenkins/yesql
  
 
===PostgreSQL===
 
===PostgreSQL===
第118行: 第148行:
 
*[http://clojureelasticsearch.info/ Elastisch]
 
*[http://clojureelasticsearch.info/ Elastisch]
  
==HTTP==
+
==Web HTTP==
 
*[[ring]]
 
*[[ring]]
 +
*[[Compojure]]
 
*[https://github.com/dakrone/clj-http clj-http]
 
*[https://github.com/dakrone/clj-http clj-http]
 
*[https://github.com/http-kit/http-kit http-kit]
 
*[https://github.com/http-kit/http-kit http-kit]
*[https://github.com/ztellman/aleph aleph]
+
*[https://github.com/ztellman/aleph aleph] built on top of [[Netty]]
 
*[https://github.com/dakrone/cheshire Cheshire]
 
*[https://github.com/dakrone/cheshire Cheshire]
 +
*[https://github.com/brehaut/necessary-evil necessary-evil] [[XML-RPC]]
 +
*[https://github.com/nginx-clojure/nginx-clojure nginx-clojure]
 +
*[https://github.com/pedestal/pedestal Pedestal]
 +
*[https://github.com/weavejester/hiccup Hiccup]
  
 
==RESTful API==
 
==RESTful API==
第129行: 第164行:
 
*[https://github.com/clojure-liberator/liberator/ liberator]
 
*[https://github.com/clojure-liberator/liberator/ liberator]
 
*[https://github.com/metosin/ring-swagger ring-swagger], Swagger Spec for Clojure Web Apps
 
*[https://github.com/metosin/ring-swagger ring-swagger], Swagger Spec for Clojure Web Apps
 +
*[https://github.com/RJMetrics/sweet-liberty Sweet-Liberty]
  
 
==IDE和Editor==
 
==IDE和Editor==
 
*[[Light Table]]
 
*[[Light Table]]
 +
*[https://github.com/oakes/Nightcode Nightcode]
 
*[[Cursive|Cursive IDE]]
 
*[[Cursive|Cursive IDE]]
 
*[[CCW IDE]]
 
*[[CCW IDE]]
第137行: 第174行:
 
*[https://github.com/arthuredelstein/clooj clooj], a lightweight IDE for clojure
 
*[https://github.com/arthuredelstein/clooj clooj], a lightweight IDE for clojure
 
*[https://github.com/bodil/catnip Catnip], A web based Clojure IDE
 
*[https://github.com/bodil/catnip Catnip], A web based Clojure IDE
*[https://github.com/clojure-emacs/cider CIDER] for [[Emacs]]
+
*[https://github.com/clojure-emacs clojure-emacs] for [[Emacs]]
 
*[http://clojure-doc.org/articles/tutorials/emacs.html Clojure with Emacs]
 
*[http://clojure-doc.org/articles/tutorials/emacs.html Clojure with Emacs]
 
*[https://github.com/wuub/SublimeREPL SublimeREPL for SublimeText]
 
*[https://github.com/wuub/SublimeREPL SublimeREPL for SublimeText]
第153行: 第190行:
 
*[[Ring]]
 
*[[Ring]]
 
*[[Compojure]]
 
*[[Compojure]]
 +
*[https://github.com/robashton/cravendb CravenDB]文档数据库
 +
*[https://github.com/circleci/frontend CircleCI's frontend]
 
*[[Enlive]]
 
*[[Enlive]]
 
*[https://github.com/macourtney/Conjure Conjure] A Rails like framework for Clojure.
 
*[https://github.com/macourtney/Conjure Conjure] A Rails like framework for Clojure.
第159行: 第198行:
 
*[https://github.com/alda-lang alda] 音乐编程语言
 
*[https://github.com/alda-lang alda] 音乐编程语言
 
*用 [[overtone]] 来演奏歌曲
 
*用 [[overtone]] 来演奏歌曲
 +
*[https://github.com/plumatic/schema schema] 数据描述与验证
 +
*[https://github.com/ptaoussanis/timbre Timbre] 日志库
 +
*[https://github.com/zcaudate/cronj cronj] cron for clojure
 +
*[https://github.com/kyleburton/clj-bloom clj-bloom]
  
 
==文档==
 
==文档==
第170行: 第213行:
 
==用户==
 
==用户==
 
*[http://cognitect.com/ Cognitect], Clojue之父,[https://github.com/richhickey Rich Hickey] 是该公司Co-Founder & CTO。
 
*[http://cognitect.com/ Cognitect], Clojue之父,[https://github.com/richhickey Rich Hickey] 是该公司Co-Founder & CTO。
*花旗信⽤实时⻛险估值系统Java/Clojure后端(1500节点分布计算)花旗投⾏信⽤部实时⻛险计算系统,逻辑使⽤Clojure。
+
*花旗信用实时风险估值系统Java/Clojure后端(1500节点分布计算)花旗投资信用部实时风险计算系统,逻辑使用Clojure。
 
*[[Puppet]]: [https://github.com/puppetlabs/puppet-server Puppet Server], [https://github.com/puppetlabs/trapperkeeper Trapperkeeper], [https://github.com/puppetlabs/puppetdb PuppetDB], [https://github.com/puppetlabs/trapperkeeper-webserver-jetty9 Trapperkeeper Webserver Service]
 
*[[Puppet]]: [https://github.com/puppetlabs/puppet-server Puppet Server], [https://github.com/puppetlabs/trapperkeeper Trapperkeeper], [https://github.com/puppetlabs/puppetdb PuppetDB], [https://github.com/puppetlabs/trapperkeeper-webserver-jetty9 Trapperkeeper Webserver Service]
 
*沃尔玛: “Our Clojure system just handled its first Walmart black Friday and came out without a scratch.” - Walmart Labs
 
*沃尔玛: “Our Clojure system just handled its first Walmart black Friday and came out without a scratch.” - Walmart Labs
第193行: 第236行:
 
*[http://www.clojure-toolbox.com/ The Clojure Toolbox]
 
*[http://www.clojure-toolbox.com/ The Clojure Toolbox]
 
*[http://clojuredocs.org/ ClojureDocs]
 
*[http://clojuredocs.org/ ClojureDocs]
 +
*[https://www.conj.io/ Grimoire - Community Clojure Documentation]
 
*[http://docs.huihoo.com/clojure/clojure-api-cn/ Clojure API 中文文档], [https://github.com/huangz1990/clojure_api_cn Clojure API 文档的中文计划]
 
*[http://docs.huihoo.com/clojure/clojure-api-cn/ Clojure API 中文文档], [https://github.com/huangz1990/clojure_api_cn Clojure API 文档的中文计划]
 
*[https://crossclj.info/ CrossClj]: cross-referencing the Clojure ecosystem
 
*[https://crossclj.info/ CrossClj]: cross-referencing the Clojure ecosystem
第205行: 第249行:
 
*[http://www.ibm.com/developerworks/cn/java/j-jn1/index.html Java 下一代: Groovy、Scala 和 Clojure]
 
*[http://www.ibm.com/developerworks/cn/java/j-jn1/index.html Java 下一代: Groovy、Scala 和 Clojure]
 
*[http://www.infoq.com/cn/news/2013/04/Language-Expressiveness 研究指出:Clojure、CoffeeScript和Haskell是表现力最强的通用语言]
 
*[http://www.infoq.com/cn/news/2013/04/Language-Expressiveness 研究指出:Clojure、CoffeeScript和Haskell是表现力最强的通用语言]
 +
*[http://www.bestinclass.dk/best-class-blogposts Best In Class]
  
 
[[category:programming language]]
 
[[category:programming language]]
 
[[category:functional programming]]
 
[[category:functional programming]]
 +
[[category:lambda]]
 +
[[category:numerical analysis]]
 
[[category:concurrent computing]]
 
[[category:concurrent computing]]
 
[[category:data analysis]]
 
[[category:data analysis]]
 
[[category:JVM]]
 
[[category:JVM]]
 
[[category:lisp]]
 
[[category:lisp]]
 +
[[category:huihoo]]

2018年9月23日 (日) 16:20的版本

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Clojure Thanks, Wikipedia.

Clojure 是一个面向Java Virtual Machine 的动态语言。

Lisp 是一种编程语言,以表达性和功能强大著称,但人们通常认为它不太适合应用于一般情况。Clojure 是一种运行在 Java平台上的 Lisp 方言,它的出现彻底改变了这一现状。如今,在任何具备 Java 虚拟机的地方,您都可以利用 Lisp 的强大功能。

Clojure-logo.png

目录

简介

Clojure is about Data, Scala is about Types, Java is about Objects.

Eclipse Public License.

虚拟机编译器

语言

Clojure开发的编程语言:

指南

wget http://repo1.maven.org/maven2/org/clojure/clojure/1.8.0/clojure-1.8.0.zip
java -cp clojure-1.8.0.jar clojure.main
user=> (+ 1 2 3)
6
user=> (def hello (fn [] "Hello world"))
#'user/hello
user=> (hello)
"Hello world"

或使用 Leiningen REPL,它比 Clojure 自带的 REPL 好很多。

lein repl

Web应用启动:

lein run 或 lein ring server

Leiningen

使用leiningen工具来管理Clojure项目和Java配置。

brew install leiningen

或者获得 https://raw.github.com/technomancy/leiningen/preview/bin/lein 并放到 /bin 目录下,chmod 755

cd bin,执行 ./lein // 开始安装 Leiningen

lein help

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

插件

Leiningen Plugins

Clojars

大数据

数据分析

数据分析和商业智能

机器学习

计算机视觉

自然语言处理

消息通信

事件CEP

  • EEP Embedded Event Processing in Clojure
  • Meltdown a Clojure Interface to Reactor

并行并发

金融货币

验证授权

数据库存储

SQL

PostgreSQL

MongoDB

Clojure Monger, Monger @ GitHub

Cassandra

  • cassaforte 建议:暂不使用高版本Cassandar,因为可能不支持。
  • alia: High performance Cassandra client for clojure
  • hayt: CQL3 DSL for Clojure

Redis

HBase

BI

Elasticsearch

Web HTTP

RESTful API

IDE和Editor

GUI

项目

文档

图书

用户

  • Cognitect, Clojue之父,Rich Hickey 是该公司Co-Founder & CTO。
  • 花旗信用实时风险估值系统Java/Clojure后端(1500节点分布计算)花旗投资信用部实时风险计算系统,逻辑使用Clojure。
  • Puppet: Puppet Server, Trapperkeeper, PuppetDB, Trapperkeeper Webserver Service
  • 沃尔玛: “Our Clojure system just handled its first Walmart black Friday and came out without a scratch.” - Walmart Labs
  • Riemann
  • LeanCloud 采用了多种语言混合来构建整个后端系统,包括 Clojure、Java、Node.js、Scala 等。其中 Clojure 构建了整个网站门户、存储开放 API、推送、聊天等核心服务,Node.js构建了云端代码服务(类似应用代码托管),我们还使用 Scala 编写的 Spark 任务来处理离线数据分析,此外,还有大量的统计类 MapReduce 任务使用 Java 编写并运行在 Hadoop 集群上。不同服务之间使用 RESTful 协议、RPC 框架或者队列进行通信。

更多用户>>>

图集

链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱