Clojure - Getting Started

本文主要内容来自Clojure官方指南 https://clojure.org/guides/getting_started

我在win7 上试了其中一种方式很好用:

Local build

Download and build Clojure from source (requires Git, Java, and Maven):

git clone https://github.com/clojure/clojure.git
cd clojure
mvn -Plocal -Dmaven.test.skip=true package

Then start the REPL with the local jar:

java -jar clojure.jar

 

===========以下为官方指南主要内容:======================

Welcome to Clojure!

Check out Learn ClojureResources, or Books for learning the language!

Clojure installer and CLI tools

Clojure provides command line tools that can be used to start a Clojure repl, use Clojure and Java libraries, and start Clojure programs.

Installation on Mac via brew

Install the command line tools with brew:

brew install clojure

If you’ve already installed, you can upgrade to the latest release with:

brew upgrade clojure

Installation on Linux

  1. Ensure that the following dependencies are installed: bash, curl, rlwrap, and Java.

  2. Use the linux-install script to download and run the install, which will create /usr/local/bin/clj, /usr/local/bin/clojure, and /usr/local/lib/clojure:

curl -O https://download.clojure.org/install/linux-install-1.10.0.403.sh
chmod +x linux-install-1.10.0.403.sh
sudo ./linux-install-1.10.0.403.sh

Platform installers (apt-get, etc) will be available in the future.

Installation on Windows

Not yet available - see Leiningen or Boot instead.

Other ways to run Clojure

Local build

Download and build Clojure from source (requires Git, Java, and Maven):

git clone https://github.com/clojure/clojure.git
cd clojure
mvn -Plocal -Dmaven.test.skip=true package

Then start the REPL with the local jar:

java -jar clojure.jar

Try Clojure online

repl.it provides a browser-based Clojure repl for interactive exploration.

Build tools

Build tools provide a range of capabilities for building, running, and deploying Clojure libraries and applications. The two most popular Clojure build tools are Leiningen and Boot.

Original author: Alex Miller

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值