SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
http://tinyurl.com/2fhzp5p
  (let ((buffer (url-retrieve-synchronously
          "http://tromey.com/elpa/package-install.el")))
  (save-excursion
    (set-buffer buffer)
    (goto-char (point-min))
    (re-search-forward "^$" nil 'move)
    (eval-region (point) (point-max))
    (kill-buffer (current-buffer))))
;;; This was installed by package-install.el.
;;; This provides support for the package system and
;;; interfacing with ELPA, the package archive.
;;; Move this code earlier if you want to reference
;;; packages in your .emacs.
(when
    (load
     (expand-file-name "~/.emacs.d/elpa/package.el"))
  (package-initialize))
M-x package-install <ret> slime




   (require 'slime)
M-x package-install <ret> slime-repl



  (require 'slime-repl)
  (setq slime-net-coding-system 'utf-8-unix
        slime-protocol-version 'ignore)
  (slime-setup '(slime-repl))
M-x package-install <ret> clojure-mode




  (require 'clojure-mode)
  (add-to-list 'auto-mode-alist
               '(".clj$" . clojure-mode))
(defproject sample-program "1.0.0-SNAPSHOT"
  :description "FIXME: write"
  :dependencies [[org.clojure/clojure "1.2.0"]
                 [org.clojure/clojure-contrib "1.2.0"]])




(defproject sample-program "1.0.0-SNAPSHOT"
  :description "FIXME: write"
  :dependencies [[org.clojure/clojure "1.2.0"]
                 [org.clojure/clojure-contrib "1.2.0"]]
  :dev-dependencies [[swank-clojure "1.2.1"]])
$ lein deps




$ lein swank
(ns sample-program.core)

(def fib-seq
     (lazy-cat [0 1] (map + (rest fib-seq) fib-seq)))

(defn fib [n]
  (nth fib-seq n))
とにかく始めるClojure

Mais conteúdo relacionado

Mais procurados

Move spfile from asm to file system
Move spfile from asm to file systemMove spfile from asm to file system
Move spfile from asm to file system
raviranchi02
 
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of BootkitsI/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
CrowdStrike
 
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]
Accumulo Summit
 
11 Things About 11gr2
11 Things About 11gr211 Things About 11gr2
11 Things About 11gr2
afa reg
 

Mais procurados (20)

Stacki: Remove Commands
Stacki: Remove CommandsStacki: Remove Commands
Stacki: Remove Commands
 
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
Move spfile from asm to file system
Move spfile from asm to file systemMove spfile from asm to file system
Move spfile from asm to file system
 
Lightweight DAS components in Perl
Lightweight DAS components in PerlLightweight DAS components in Perl
Lightweight DAS components in Perl
 
Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
 
Perl one-liners
Perl one-linersPerl one-liners
Perl one-liners
 
Introduction to linux day1
Introduction to linux day1Introduction to linux day1
Introduction to linux day1
 
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of BootkitsI/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
I/O, You Own: Regaining Control of Your Disk in the Presence of Bootkits
 
Shell Script Disk Usage Report and E-Mail Current Threshold Status
Shell Script  Disk Usage Report and E-Mail Current Threshold StatusShell Script  Disk Usage Report and E-Mail Current Threshold Status
Shell Script Disk Usage Report and E-Mail Current Threshold Status
 
ATS Internals
ATS InternalsATS Internals
ATS Internals
 
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]
Accumulo Summit 2015: Zookeeper, Accumulo, and You [Internals]
 
Python, Keras, Hello world, Installation, Binary Classification
Python, Keras, Hello world, Installation, Binary ClassificationPython, Keras, Hello world, Installation, Binary Classification
Python, Keras, Hello world, Installation, Binary Classification
 
Centos config
Centos configCentos config
Centos config
 
How to ride a whale
How to ride a whaleHow to ride a whale
How to ride a whale
 
Send mail-oracle11g-det
Send mail-oracle11g-detSend mail-oracle11g-det
Send mail-oracle11g-det
 
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
 
11 Things About 11gr2
11 Things About 11gr211 Things About 11gr2
11 Things About 11gr2
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
 
Crack.ba
Crack.baCrack.ba
Crack.ba
 
Firebird
FirebirdFirebird
Firebird
 

Destaque

Clojureシンタックスハイライター開発から考えるこれからのlispに必要なもの
Clojureシンタックスハイライター開発から考えるこれからのlispに必要なものClojureシンタックスハイライター開発から考えるこれからのlispに必要なもの
Clojureシンタックスハイライター開発から考えるこれからのlispに必要なもの
sohta
 
ClojureではじめるSTM入門
ClojureではじめるSTM入門ClojureではじめるSTM入門
ClojureではじめるSTM入門
sohta
 
渋谷JVM#1 Immutable時代のプログラミング言語 Clojure
渋谷JVM#1 Immutable時代のプログラミング言語 Clojure渋谷JVM#1 Immutable時代のプログラミング言語 Clojure
渋谷JVM#1 Immutable時代のプログラミング言語 Clojure
Yoshitaka Kawashima
 

Destaque (13)

REPLライフをもっと快適に
REPLライフをもっと快適にREPLライフをもっと快適に
REPLライフをもっと快適に
 
会社でClojure使ってみて分かったこと
会社でClojure使ってみて分かったこと会社でClojure使ってみて分かったこと
会社でClojure使ってみて分かったこと
 
高速!Clojure Web 開発入門
高速!Clojure Web 開発入門高速!Clojure Web 開発入門
高速!Clojure Web 開発入門
 
Light TableでClojure入門
Light TableでClojure入門Light TableでClojure入門
Light TableでClojure入門
 
Clojureシンタックスハイライター開発から考えるこれからのlispに必要なもの
Clojureシンタックスハイライター開発から考えるこれからのlispに必要なものClojureシンタックスハイライター開発から考えるこれからのlispに必要なもの
Clojureシンタックスハイライター開発から考えるこれからのlispに必要なもの
 
java-oneの話
java-oneの話java-oneの話
java-oneの話
 
ClojureではじめるSTM入門
ClojureではじめるSTM入門ClojureではじめるSTM入門
ClojureではじめるSTM入門
 
paizaのオンラインジャッジを支えるDockerとその周辺
paizaのオンラインジャッジを支えるDockerとその周辺paizaのオンラインジャッジを支えるDockerとその周辺
paizaのオンラインジャッジを支えるDockerとその周辺
 
渋谷JVM#1 Immutable時代のプログラミング言語 Clojure
渋谷JVM#1 Immutable時代のプログラミング言語 Clojure渋谷JVM#1 Immutable時代のプログラミング言語 Clojure
渋谷JVM#1 Immutable時代のプログラミング言語 Clojure
 
プログラミング言語Clojureのニャンパスでの活用事例
プログラミング言語Clojureのニャンパスでの活用事例プログラミング言語Clojureのニャンパスでの活用事例
プログラミング言語Clojureのニャンパスでの活用事例
 
JobStreamerではじめるJavaBatchのクラウド分散実行
JobStreamerではじめるJavaBatchのクラウド分散実行JobStreamerではじめるJavaBatchのクラウド分散実行
JobStreamerではじめるJavaBatchのクラウド分散実行
 
キメるClojure
キメるClojureキメるClojure
キメるClojure
 
イマドキのExcelスクショの撮り方
イマドキのExcelスクショの撮り方イマドキのExcelスクショの撮り方
イマドキのExcelスクショの撮り方
 

Semelhante a とにかく始めるClojure

Yy
YyYy
Yy
yygh
 
Yy
YyYy
Yy
yygh
 
Nouveau document texte
Nouveau document texteNouveau document texte
Nouveau document texte
Sai Ef
 
vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking
Sebastian Marek
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Carlos Sanchez
 

Semelhante a とにかく始めるClojure (20)

C99
C99C99
C99
 
C99
C99C99
C99
 
C99[2]
C99[2]C99[2]
C99[2]
 
Congfigure python as_ide
Congfigure python as_ideCongfigure python as_ide
Congfigure python as_ide
 
zinno
zinnozinno
zinno
 
WordPress 運用を支える Perl
WordPress 運用を支える PerlWordPress 運用を支える Perl
WordPress 運用を支える Perl
 
Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007Intro to pl/PHP Oscon2007
Intro to pl/PHP Oscon2007
 
Os Treat
Os TreatOs Treat
Os Treat
 
C99.php
C99.phpC99.php
C99.php
 
Loading Multiple Versions of an ASDF System in the Same Lisp Image
Loading Multiple Versions of an ASDF System in the Same Lisp ImageLoading Multiple Versions of an ASDF System in the Same Lisp Image
Loading Multiple Versions of an ASDF System in the Same Lisp Image
 
Yy
YyYy
Yy
 
Yy
YyYy
Yy
 
Nouveau document texte
Nouveau document texteNouveau document texte
Nouveau document texte
 
Cod
CodCod
Cod
 
Fisier.txt
Fisier.txtFisier.txt
Fisier.txt
 
BSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationBSDM with BASH: Command Interpolation
BSDM with BASH: Command Interpolation
 
vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking
 
eZ Publish Cluster Unleashed
eZ Publish Cluster UnleashedeZ Publish Cluster Unleashed
eZ Publish Cluster Unleashed
 
Pecl Picks
Pecl PicksPecl Picks
Pecl Picks
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 

とにかく始めるClojure

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.   (let ((buffer (url-retrieve-synchronously "http://tromey.com/elpa/package-install.el")))   (save-excursion     (set-buffer buffer)     (goto-char (point-min))     (re-search-forward "^$" nil 'move)     (eval-region (point) (point-max))     (kill-buffer (current-buffer))))
  • 24. ;;; This was installed by package-install.el. ;;; This provides support for the package system and ;;; interfacing with ELPA, the package archive. ;;; Move this code earlier if you want to reference ;;; packages in your .emacs. (when     (load      (expand-file-name "~/.emacs.d/elpa/package.el"))   (package-initialize))
  • 25. M-x package-install <ret> slime (require 'slime)
  • 26. M-x package-install <ret> slime-repl (require 'slime-repl) (setq slime-net-coding-system 'utf-8-unix       slime-protocol-version 'ignore) (slime-setup '(slime-repl))
  • 27. M-x package-install <ret> clojure-mode (require 'clojure-mode) (add-to-list 'auto-mode-alist '(".clj$" . clojure-mode))
  • 28.
  • 29.
  • 30.
  • 31.
  • 32. (defproject sample-program "1.0.0-SNAPSHOT"   :description "FIXME: write"   :dependencies [[org.clojure/clojure "1.2.0"]                  [org.clojure/clojure-contrib "1.2.0"]]) (defproject sample-program "1.0.0-SNAPSHOT"   :description "FIXME: write"   :dependencies [[org.clojure/clojure "1.2.0"]                  [org.clojure/clojure-contrib "1.2.0"]]   :dev-dependencies [[swank-clojure "1.2.1"]])
  • 33. $ lein deps $ lein swank
  • 34.
  • 35. (ns sample-program.core) (def fib-seq      (lazy-cat [0 1] (map + (rest fib-seq) fib-seq))) (defn fib [n]   (nth fib-seq n))