Cov txheej txheem:

Kuv yuav ua li cas thiaj li khiav qhov kev pab cuam Clojure?
Kuv yuav ua li cas thiaj li khiav qhov kev pab cuam Clojure?

Video: Kuv yuav ua li cas thiaj li khiav qhov kev pab cuam Clojure?

Video: Kuv yuav ua li cas thiaj li khiav qhov kev pab cuam Clojure?
Video: Yuav ua li cas thiaj khiav dim lub ntiajteb no 2024, Kaum ib hlis
Anonim

Tsim thiab khiav Clojure program manually:

  1. Load lub Clojure repl.
  2. Thauj koj Clojure code (kom paub tseeb tias nws suav nrog: gen-class)
  3. Sau koj Clojure code. Los ntawm default code tau muab tso rau hauv cov chav kawm directory.
  4. Khiav koj cov cai, kom paub tseeb tias cov classpath suav nrog cov chav kawm thiab clojure. thawv.

Ib yam li ntawd, tib neeg nug, ua li cas koj khiav REPL?

Txhawm rau tso tawm REPL (Node plhaub), qhib qhov hais kom ua (hauv Windows) lossis lub davhlau ya nyob twg (hauv Mac lossis UNIX / Linux) thiab ntaus ntawv raws li qhia hauv qab no. Nws yuav hloov cov lus qhia rau> hauv Windows thiab MAC. Tam sim no koj tuaj yeem sim zoo nkauj npaum li cas ntawm Node. js/JavaScript qhia hauv REPL.

Ib yam li ntawd, kuv yuav tawm Clojure REPL li cas? Koj ua tau tawm tus REPL los ntawm kev ntaus Ctrl + D (nias Ctrl thiab D nyob rau tib lub sijhawm).

Tib neeg kuj nug, Kuv yuav nruab Clojure li cas?

Clojure Command-Line Interface

  1. Nruab qhov kev vam meej sudo apt-tau nruab -y bash curl rlwrap.
  2. Rub tawm cov ntawv nruab curl -O
  3. Ntxiv cov ntawv tso cai rau nruab chmod +x linux-install-1.10.1.462.sh.

Dab tsi yog clojure siv rau?

Clojure yog tsim los ua ib hom lus, sib koom JVM hom system, GC, threads thiab lwm yam. Txhua lub zog tau muab tso ua ke rau JVM bytecode. Clojure yog ib lub tsev qiv ntawv Java zoo rau cov neeg siv khoom, muab cov cim taw qhia-cov tswv cuab rau kev hu rau Java. Clojure txhawb nqa kev siv dynamic ntawm Java interfaces thiab cov chav kawm.

Pom zoo: