SlideShare une entreprise Scribd logo
1  sur  70
( P e rfe c t?

E n v ir o n m e
       nt)

C – means control key, M – means meta key
ClojureMadeSimple.co.uk
 Information covered in this presentation is also detailed on my website




           C – means control key, M – means meta key
slideshare.net/jr0cket
  This slide deck is available to follow along with on slideshare.net




          C – means control key, M – means meta key
Something simple
  to start with


   C – means control key, M – means meta key
C – means control key, M – means meta key
A taste of things
    to come


   C – means control key, M – means meta key
C – means control key, M – means meta key
Get Emacs
        (sorry vi people)




C – means control key, M – means meta key
Download & Install Emacs
Linux
sudo apt-add-repository
  ppa:cassou/emacs
sudo apt-get update
sudo apt-get install emacs-snapshot
Mac                                          Windows
EmacsForMacOSX.com                           Use Cygwin?


         C – means control key, M – means meta key
In the meantime: Usual Suspects

Netbeans
IntelliJ
Eclipse




           C – means control key, M – means meta key
Configure emacs
… you will have an .el of a time




  C – means control key, M – means meta key
Configs live in ~/.emacs.d folder

~/.emacs.d
    folder created when Emacs first run


~/.emacs.d/init.el
  main configuration file for Emacs
  You can define multiple .el config files as long as they are on the
 Emacs load path. init.el is the read first.




              C – means control key, M – means meta key
Give Emacs a
     Clojure injection
… lots of starter-kits, only one for Clojure




        C – means control key, M – means meta key
Automatic Clojure install
    … get your Clojure fix quickly




     C – means control key, M – means meta key
Add the package repository
;; Add Marmalade package archive for Emacs starter kit
;; and tonnes of other packages to your .emacs.d/init.el


(require 'package)
(add-to-list
   'package-archives
       '("marmalade" .
       "http://marmalade-
  repo.org/packages/"))
               C – means control key, M – means meta key
Specify package to load
(when (not package-archive-contents)
   (package-refresh-contents))


(defvar my-packages '(starter-kit
 starter-kit-lisp
                             starter-kit-
 eshell
                             starter-kit-
 bindings
                             clojure-mode
 clojure-test-mode M – means meta key
        C – means control key,
Didn't get all that typed??
 Clone my Emacs Clojure Kickstart repository on
  github.com/jr0cket


 git clone
  https://jr0cket@github.com/
     jr0cket/Emacs-clojure-
    kickstart.git
           ~/.emacs.d
The git clone command should all be on one line, but would not be as readable on the slide


                    C – means control key, M – means meta key
Re-start Emacs
… watch clojure and other goodies be
automatically downloaded and added.




     C – means control key, M – means meta key
In the meantime, Clooj

Clojure IDE in Clojure


github.com/arthuredelstein/clooj




         C – means control key, M – means meta key
github.com/arthuredelstein/clooj




      C – means control key, M – means meta key
Back to Emacs
… keyboard on stun !!




C – means control key, M – means meta key
Editing text...

...should be easy, right?



   C – means control key, M – means meta key
Using a mouse is bad for your
           health




     C – means control key, M – means meta key
C – means control key, M – means meta key
Moving along a line

     C – a
Go to start of a line


     C – e
 Go to end of a line


C – means control key, M – means meta key
Searching for something...

        C – s
          Search forward


        C – r
       Search backwards


   C – means control key, M – means meta key
Select / Copy / Paste



       C – @
Or to select, use the mouse, Luke




  C – means control key, M – means meta key
Select / Copy / Paste

     C – k
             cut line


     C – w
         cut selected


C – means control key, M – means meta key
Select / Copy / Paste


    C – y
Yank that text into your code




       C – means control key, M – means meta key
Undo / Redo



     C - _
Go back change by change




C – means control key, M – means meta key
Undo / Redo



C - ???
Go forward change by change




 C – means control key, M – means meta key
Some core keyboard
   commands



   C – means control key, M – means meta key
C – g
Hit as many times as necessary to
    cancel a keyboard command

       C – means control key, M – means meta key
Getting help with
keyboard commands



   C – means control key, M – means meta key
Just the bindings,
              ma'am


       C – h                                          b
List all the current keyboard bindings configured
                      in Emacs




          C – means control key, M – means meta key
Just the modes,
             ma'am


      C – h                                         m
Modes can be either major or minor and many
          can be used together.




        C – means control key, M – means meta key
Function keys Help

         F1 – b
         F1 – m
F1 function key is the same as help C - h


      C – means control key, M – means meta key
Funky stuff




C – means control key, M – means meta key
Transpose characters

                C – t
Swap the current character with the previous one
              - good for erratic typing




          C – means control key, M – means meta key
Coding Demo? – Super-size it!

               C – +
               C – -
Make your text big for the people at the back of
                    the room


         C – means control key, M – means meta key
Clojure project
 management



C – means control key, M – means meta key
Leiningen
… more fun than maven




C – means control key, M – means meta key
le in in g e n
   Leiningen
                                               .o rg




lein new              Create a new clojure project
lein deps             Download all dependencies
lein repl             Start the interactive shell (repl)
lein jack-in          Start repl server
            C – means control key, M – means meta key
Create a new project

lein new my-project
cd my-project
lein deps



    C – means control key, M – means meta key
Open project in emacs

cd my-project
emacs project.clj




    C – means control key, M – means meta key
Default project definition




   C – means control key, M – means meta key
Add a REPL server




C – means control key, M – means meta key
Dev Dependencies




Add libraries only needed for development
Not packaged when deployed

          C – means control key, M – means meta key
C – means control key, M – means meta key
Clojure project
management
   in Emacs


C – means control key, M – means meta key
Find file in project

        C – c f
Select one of the files available in the current
                Clojure project
 - the file doesnt have to be open in Emacs




        C – means control key, M – means meta key
Fire up the REPL

  M – x
clojure-
 jack-in
C – means control key, M – means meta key
Define your own Global short-cut
Open your .emacs.d/init.el file and add:

(global-set-key
    (kbd "C-c C-j") 'clojure-jack-
 in)

In Emacs, start the REPL with

  C – c                           C – j
         C – means control key, M – means meta key
More Cool short-cuts
       later

… but its easy, right!


   C – means control key, M – means meta key
Navigating functions
  (s-expressions)



   C – means control key, M – means meta key
Jump around in functions

C – M – f
C – M – b
C – M – u
   C – means control key, M – means meta key
Jump between function
         definitions

C – M – Home
C – M – End
Skip through your code function by function




       C – means control key, M – means meta key
Jump between function
           definitions

     C – M – a
     C – M – e
Jump to the start or end of a function definintion




          C – means control key, M – means meta key
Keep balanced,

                use

          ParEdit


C – means control key, M – means meta key
ParEdit matches ( [ { ' ”
Prevents unbalanced parents and quotes
Example
  Cant delete either parens that surround characters
   (fubar) without first deleting all the characters
  Pull code into brackets
  Reorganise code around brackets




           C – means control key, M – means meta key
Pull code in



        M – )
Pull the next block of code inside




   C – means control key, M – means meta key
Push code in



             M – (
Push the next block of code outside ??????




        C – means control key, M – means meta key
Clojure related commands
C-c TAB: Autocomplete symbol at point
C-x C-e: Eval the form under the point
C-c C-k: Compile the current buffer
 C-c C-l: Load current buffer and force
dependent namespaces to reload
M-.: Jump to the definition of a var
C-c S-i: Inspect a value
C-c C-m: Macroexpand the call under the point

         C – means control key, M – means meta key
Auto-complete




C – means control key, M – means meta key
The easy way
Clone Sam Aarons Live Coding repository
github.com/overtone/emacs-live




         C – means control key, M – means meta key
The manual way
Add the auto-complete package dependencies to
 ~/.emacs.d/init.el
popup


Download the Git repository
 https://github.com/m2ym/auto-complete
M – x load-file
      autocomplete/etc/install.el

           C – means control key, M – means meta key
Other cool stuff to help
 you discover Clojure



    C – means control key, M – means meta key
ClojureAtlas.com




C – means control key, M – means meta key
Light Table (On Kickstarter)




    C – means control key, M – means meta key
Th a n k yo u
   London Cl oj ur i ans



               @ r 0c ket
                 j
Cl oj ur eMadeSi m e. c o
                   pl
                      . uk
      C – means control key, M – means meta key

Contenu connexe

Similaire à Perfect? clojure environment

IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptxIIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptxrajkumar490591
 
C prog ppt
C prog pptC prog ppt
C prog pptxinoe
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptxMugilvannan11
 
Cocoa for Web Developers
Cocoa for Web DevelopersCocoa for Web Developers
Cocoa for Web Developersgeorgebrock
 
GNU Emacs Reference Card.pdf
GNU Emacs Reference Card.pdfGNU Emacs Reference Card.pdf
GNU Emacs Reference Card.pdfSergioLoaiza11
 
cs262_intro_slides.pptx
cs262_intro_slides.pptxcs262_intro_slides.pptx
cs262_intro_slides.pptxAnaLoreto13
 
Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language CourseVivek chan
 
Most Useful Mac Keyboard Shortcuts
Most Useful Mac Keyboard ShortcutsMost Useful Mac Keyboard Shortcuts
Most Useful Mac Keyboard ShortcutsROHANRANA40
 
Most Important Mac Keyboard Shortcuts
Most Important Mac Keyboard ShortcutsMost Important Mac Keyboard Shortcuts
Most Important Mac Keyboard ShortcutsROHANRANA40
 
Basics Of C++.pptx
Basics Of C++.pptxBasics Of C++.pptx
Basics Of C++.pptxDineshDhuri4
 
Most Important Mac Keyboard Shortcuts
Most Important Mac Keyboard ShortcutsMost Important Mac Keyboard Shortcuts
Most Important Mac Keyboard ShortcutsROHANRANA40
 

Similaire à Perfect? clojure environment (20)

C programming
C programmingC programming
C programming
 
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptxIIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
 
de Valpine NIMBLE
de Valpine NIMBLEde Valpine NIMBLE
de Valpine NIMBLE
 
C language tutorial
C language tutorialC language tutorial
C language tutorial
 
C prog ppt
C prog pptC prog ppt
C prog ppt
 
Lab 1.pptx
Lab 1.pptxLab 1.pptx
Lab 1.pptx
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
Cocoa for Web Developers
Cocoa for Web DevelopersCocoa for Web Developers
Cocoa for Web Developers
 
GNU Emacs Reference Card.pdf
GNU Emacs Reference Card.pdfGNU Emacs Reference Card.pdf
GNU Emacs Reference Card.pdf
 
Presentation 2.ppt
Presentation 2.pptPresentation 2.ppt
Presentation 2.ppt
 
cs262_intro_slides.pptx
cs262_intro_slides.pptxcs262_intro_slides.pptx
cs262_intro_slides.pptx
 
The basics of c programming
The basics of c programmingThe basics of c programming
The basics of c programming
 
Basics
BasicsBasics
Basics
 
Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language Course
 
Most Useful Mac Keyboard Shortcuts
Most Useful Mac Keyboard ShortcutsMost Useful Mac Keyboard Shortcuts
Most Useful Mac Keyboard Shortcuts
 
Learn Linux: Emacs
Learn Linux: EmacsLearn Linux: Emacs
Learn Linux: Emacs
 
Most Important Mac Keyboard Shortcuts
Most Important Mac Keyboard ShortcutsMost Important Mac Keyboard Shortcuts
Most Important Mac Keyboard Shortcuts
 
C#unit4
C#unit4C#unit4
C#unit4
 
Basics Of C++.pptx
Basics Of C++.pptxBasics Of C++.pptx
Basics Of C++.pptx
 
Most Important Mac Keyboard Shortcuts
Most Important Mac Keyboard ShortcutsMost Important Mac Keyboard Shortcuts
Most Important Mac Keyboard Shortcuts
 

Plus de John Stevenson

ClojureX Conference 2017 - 10 amazing years of Clojure
ClojureX Conference 2017 - 10 amazing years of ClojureClojureX Conference 2017 - 10 amazing years of Clojure
ClojureX Conference 2017 - 10 amazing years of ClojureJohn Stevenson
 
Confessions of a developer community builder
Confessions of a developer community builderConfessions of a developer community builder
Confessions of a developer community builderJohn Stevenson
 
Progscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in ClojurescriptProgscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in ClojurescriptJohn Stevenson
 
Introduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptIntroduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptJohn Stevenson
 
Thinking Functionally with Clojure
Thinking Functionally with ClojureThinking Functionally with Clojure
Thinking Functionally with ClojureJohn Stevenson
 
Communication improbable
Communication improbableCommunication improbable
Communication improbableJohn Stevenson
 
Getting into public speaking at conferences
Getting into public speaking at conferencesGetting into public speaking at conferences
Getting into public speaking at conferencesJohn Stevenson
 
Functional web with clojure
Functional web with clojureFunctional web with clojure
Functional web with clojureJohn Stevenson
 
Get into Functional Programming with Clojure
Get into Functional Programming with ClojureGet into Functional Programming with Clojure
Get into Functional Programming with ClojureJohn Stevenson
 
Guiding people into Clojure
Guiding people into ClojureGuiding people into Clojure
Guiding people into ClojureJohn Stevenson
 
Git and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperGit and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperJohn Stevenson
 
Get Functional Programming with Clojure
Get Functional Programming with ClojureGet Functional Programming with Clojure
Get Functional Programming with ClojureJohn Stevenson
 
So you want to run a developer event, are you crazy?
So you want to run a developer event, are you crazy?So you want to run a developer event, are you crazy?
So you want to run a developer event, are you crazy?John Stevenson
 
Trailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App CloudTrailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App CloudJohn Stevenson
 
Clojure for Java developers
Clojure for Java developersClojure for Java developers
Clojure for Java developersJohn Stevenson
 
Introducing the Salesforce platform
Introducing the Salesforce platformIntroducing the Salesforce platform
Introducing the Salesforce platformJohn Stevenson
 
Dreamforce14 Metadata Management with Git Version Control
Dreamforce14 Metadata Management with Git Version ControlDreamforce14 Metadata Management with Git Version Control
Dreamforce14 Metadata Management with Git Version ControlJohn Stevenson
 
Getting started with Clojure
Getting started with ClojureGetting started with Clojure
Getting started with ClojureJohn Stevenson
 
Salesforce Summer of Hacks London - Introduction
Salesforce Summer of Hacks London - IntroductionSalesforce Summer of Hacks London - Introduction
Salesforce Summer of Hacks London - IntroductionJohn Stevenson
 
Heroku Introduction: Scaling customer facing apps & services
Heroku Introduction: Scaling customer facing apps & servicesHeroku Introduction: Scaling customer facing apps & services
Heroku Introduction: Scaling customer facing apps & servicesJohn Stevenson
 

Plus de John Stevenson (20)

ClojureX Conference 2017 - 10 amazing years of Clojure
ClojureX Conference 2017 - 10 amazing years of ClojureClojureX Conference 2017 - 10 amazing years of Clojure
ClojureX Conference 2017 - 10 amazing years of Clojure
 
Confessions of a developer community builder
Confessions of a developer community builderConfessions of a developer community builder
Confessions of a developer community builder
 
Progscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in ClojurescriptProgscon 2017: Taming the wild fronteer - Adventures in Clojurescript
Progscon 2017: Taming the wild fronteer - Adventures in Clojurescript
 
Introduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptIntroduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with Clojurescript
 
Thinking Functionally with Clojure
Thinking Functionally with ClojureThinking Functionally with Clojure
Thinking Functionally with Clojure
 
Communication improbable
Communication improbableCommunication improbable
Communication improbable
 
Getting into public speaking at conferences
Getting into public speaking at conferencesGetting into public speaking at conferences
Getting into public speaking at conferences
 
Functional web with clojure
Functional web with clojureFunctional web with clojure
Functional web with clojure
 
Get into Functional Programming with Clojure
Get into Functional Programming with ClojureGet into Functional Programming with Clojure
Get into Functional Programming with Clojure
 
Guiding people into Clojure
Guiding people into ClojureGuiding people into Clojure
Guiding people into Clojure
 
Git and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperGit and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern Developer
 
Get Functional Programming with Clojure
Get Functional Programming with ClojureGet Functional Programming with Clojure
Get Functional Programming with Clojure
 
So you want to run a developer event, are you crazy?
So you want to run a developer event, are you crazy?So you want to run a developer event, are you crazy?
So you want to run a developer event, are you crazy?
 
Trailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App CloudTrailhead live - Overview of Salesforce App Cloud
Trailhead live - Overview of Salesforce App Cloud
 
Clojure for Java developers
Clojure for Java developersClojure for Java developers
Clojure for Java developers
 
Introducing the Salesforce platform
Introducing the Salesforce platformIntroducing the Salesforce platform
Introducing the Salesforce platform
 
Dreamforce14 Metadata Management with Git Version Control
Dreamforce14 Metadata Management with Git Version ControlDreamforce14 Metadata Management with Git Version Control
Dreamforce14 Metadata Management with Git Version Control
 
Getting started with Clojure
Getting started with ClojureGetting started with Clojure
Getting started with Clojure
 
Salesforce Summer of Hacks London - Introduction
Salesforce Summer of Hacks London - IntroductionSalesforce Summer of Hacks London - Introduction
Salesforce Summer of Hacks London - Introduction
 
Heroku Introduction: Scaling customer facing apps & services
Heroku Introduction: Scaling customer facing apps & servicesHeroku Introduction: Scaling customer facing apps & services
Heroku Introduction: Scaling customer facing apps & services
 

Dernier

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Dernier (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Perfect? clojure environment

  • 1. ( P e rfe c t? E n v ir o n m e nt) C – means control key, M – means meta key
  • 2. ClojureMadeSimple.co.uk Information covered in this presentation is also detailed on my website C – means control key, M – means meta key
  • 3. slideshare.net/jr0cket This slide deck is available to follow along with on slideshare.net C – means control key, M – means meta key
  • 4. Something simple to start with C – means control key, M – means meta key
  • 5. C – means control key, M – means meta key
  • 6. A taste of things to come C – means control key, M – means meta key
  • 7. C – means control key, M – means meta key
  • 8. Get Emacs (sorry vi people) C – means control key, M – means meta key
  • 9. Download & Install Emacs Linux sudo apt-add-repository ppa:cassou/emacs sudo apt-get update sudo apt-get install emacs-snapshot Mac Windows EmacsForMacOSX.com Use Cygwin? C – means control key, M – means meta key
  • 10. In the meantime: Usual Suspects Netbeans IntelliJ Eclipse C – means control key, M – means meta key
  • 11. Configure emacs … you will have an .el of a time C – means control key, M – means meta key
  • 12. Configs live in ~/.emacs.d folder ~/.emacs.d folder created when Emacs first run ~/.emacs.d/init.el main configuration file for Emacs You can define multiple .el config files as long as they are on the Emacs load path. init.el is the read first. C – means control key, M – means meta key
  • 13. Give Emacs a Clojure injection … lots of starter-kits, only one for Clojure C – means control key, M – means meta key
  • 14. Automatic Clojure install … get your Clojure fix quickly C – means control key, M – means meta key
  • 15. Add the package repository ;; Add Marmalade package archive for Emacs starter kit ;; and tonnes of other packages to your .emacs.d/init.el (require 'package) (add-to-list 'package-archives '("marmalade" . "http://marmalade- repo.org/packages/")) C – means control key, M – means meta key
  • 16. Specify package to load (when (not package-archive-contents) (package-refresh-contents)) (defvar my-packages '(starter-kit starter-kit-lisp starter-kit- eshell starter-kit- bindings clojure-mode clojure-test-mode M – means meta key C – means control key,
  • 17. Didn't get all that typed?? Clone my Emacs Clojure Kickstart repository on github.com/jr0cket git clone https://jr0cket@github.com/ jr0cket/Emacs-clojure- kickstart.git ~/.emacs.d The git clone command should all be on one line, but would not be as readable on the slide C – means control key, M – means meta key
  • 18. Re-start Emacs … watch clojure and other goodies be automatically downloaded and added. C – means control key, M – means meta key
  • 19. In the meantime, Clooj Clojure IDE in Clojure github.com/arthuredelstein/clooj C – means control key, M – means meta key
  • 20. github.com/arthuredelstein/clooj C – means control key, M – means meta key
  • 21. Back to Emacs … keyboard on stun !! C – means control key, M – means meta key
  • 22. Editing text... ...should be easy, right? C – means control key, M – means meta key
  • 23. Using a mouse is bad for your health C – means control key, M – means meta key
  • 24. C – means control key, M – means meta key
  • 25. Moving along a line C – a Go to start of a line C – e Go to end of a line C – means control key, M – means meta key
  • 26. Searching for something... C – s Search forward C – r Search backwards C – means control key, M – means meta key
  • 27. Select / Copy / Paste C – @ Or to select, use the mouse, Luke C – means control key, M – means meta key
  • 28. Select / Copy / Paste C – k cut line C – w cut selected C – means control key, M – means meta key
  • 29. Select / Copy / Paste C – y Yank that text into your code C – means control key, M – means meta key
  • 30. Undo / Redo C - _ Go back change by change C – means control key, M – means meta key
  • 31. Undo / Redo C - ??? Go forward change by change C – means control key, M – means meta key
  • 32. Some core keyboard commands C – means control key, M – means meta key
  • 33. C – g Hit as many times as necessary to cancel a keyboard command C – means control key, M – means meta key
  • 34. Getting help with keyboard commands C – means control key, M – means meta key
  • 35. Just the bindings, ma'am C – h b List all the current keyboard bindings configured in Emacs C – means control key, M – means meta key
  • 36. Just the modes, ma'am C – h m Modes can be either major or minor and many can be used together. C – means control key, M – means meta key
  • 37. Function keys Help F1 – b F1 – m F1 function key is the same as help C - h C – means control key, M – means meta key
  • 38. Funky stuff C – means control key, M – means meta key
  • 39. Transpose characters C – t Swap the current character with the previous one - good for erratic typing C – means control key, M – means meta key
  • 40. Coding Demo? – Super-size it! C – + C – - Make your text big for the people at the back of the room C – means control key, M – means meta key
  • 41. Clojure project management C – means control key, M – means meta key
  • 42. Leiningen … more fun than maven C – means control key, M – means meta key
  • 43. le in in g e n Leiningen .o rg lein new Create a new clojure project lein deps Download all dependencies lein repl Start the interactive shell (repl) lein jack-in Start repl server C – means control key, M – means meta key
  • 44. Create a new project lein new my-project cd my-project lein deps C – means control key, M – means meta key
  • 45. Open project in emacs cd my-project emacs project.clj C – means control key, M – means meta key
  • 46. Default project definition C – means control key, M – means meta key
  • 47. Add a REPL server C – means control key, M – means meta key
  • 48. Dev Dependencies Add libraries only needed for development Not packaged when deployed C – means control key, M – means meta key
  • 49. C – means control key, M – means meta key
  • 50. Clojure project management in Emacs C – means control key, M – means meta key
  • 51. Find file in project C – c f Select one of the files available in the current Clojure project - the file doesnt have to be open in Emacs C – means control key, M – means meta key
  • 52. Fire up the REPL M – x clojure- jack-in C – means control key, M – means meta key
  • 53. Define your own Global short-cut Open your .emacs.d/init.el file and add: (global-set-key (kbd "C-c C-j") 'clojure-jack- in) In Emacs, start the REPL with C – c C – j C – means control key, M – means meta key
  • 54. More Cool short-cuts later … but its easy, right! C – means control key, M – means meta key
  • 55. Navigating functions (s-expressions) C – means control key, M – means meta key
  • 56. Jump around in functions C – M – f C – M – b C – M – u C – means control key, M – means meta key
  • 57. Jump between function definitions C – M – Home C – M – End Skip through your code function by function C – means control key, M – means meta key
  • 58. Jump between function definitions C – M – a C – M – e Jump to the start or end of a function definintion C – means control key, M – means meta key
  • 59. Keep balanced, use ParEdit C – means control key, M – means meta key
  • 60. ParEdit matches ( [ { ' ” Prevents unbalanced parents and quotes Example Cant delete either parens that surround characters (fubar) without first deleting all the characters Pull code into brackets Reorganise code around brackets C – means control key, M – means meta key
  • 61. Pull code in M – ) Pull the next block of code inside C – means control key, M – means meta key
  • 62. Push code in M – ( Push the next block of code outside ?????? C – means control key, M – means meta key
  • 63. Clojure related commands C-c TAB: Autocomplete symbol at point C-x C-e: Eval the form under the point C-c C-k: Compile the current buffer C-c C-l: Load current buffer and force dependent namespaces to reload M-.: Jump to the definition of a var C-c S-i: Inspect a value C-c C-m: Macroexpand the call under the point C – means control key, M – means meta key
  • 64. Auto-complete C – means control key, M – means meta key
  • 65. The easy way Clone Sam Aarons Live Coding repository github.com/overtone/emacs-live C – means control key, M – means meta key
  • 66. The manual way Add the auto-complete package dependencies to ~/.emacs.d/init.el popup Download the Git repository https://github.com/m2ym/auto-complete M – x load-file autocomplete/etc/install.el C – means control key, M – means meta key
  • 67. Other cool stuff to help you discover Clojure C – means control key, M – means meta key
  • 68. ClojureAtlas.com C – means control key, M – means meta key
  • 69. Light Table (On Kickstarter) C – means control key, M – means meta key
  • 70. Th a n k yo u London Cl oj ur i ans @ r 0c ket j Cl oj ur eMadeSi m e. c o pl . uk C – means control key, M – means meta key