CIDER Distilled: A Common Foundation for Clojure Tooling

CIDER Distilled: A Common Foundation for Clojure Tooling

Slide deck from my Clojure/south 2019 presentation.

1be785d1d788b82929e55fc83a9f0aaa?s=128

Bozhidar Batsov

September 01, 2019
Tweet

Transcript

  1. None
  2. M-x

  3. Bom dia!

  4. Божидар

  5. Bozhidar

  6. Bozhidar

  7. Bojidar

  8. None
  9. Bug cool

  10. Sofia, Bulgaria Sofia, Bulgaria

  11. None
  12. Top 10 Bulgarian “White” Hackers

  13. #NRALeaks

  14. None
  15. Expert in cyber security

  16. Expert in the following programming languages: Unix, Emacs, Perl and

    Ruby
  17. The Don Juan of IT in Bulgaria

  18. None
  19. None
  20. First time in Brazil!

  21. Second time in Brazil!

  22. None
  23. None
  24. None
  25. First time in São Paulo!

  26. First time at a conference in Brazil!

  27. Cultural Exchange

  28. None
  29. None
  30. None
  31. None
  32. None
  33. None
  34. None
  35. None
  36. None
  37. None
  38. Population of São Paulo: 12 (22) million

  39. Population of Bulgaria: 7 million

  40. Artur Malabarba

  41. None
  42. None
  43. @bbatsov

  44. metaredux.com

  45. emacsredux.com

  46. slide intentionally left blank

  47. Cider?

  48. None
  49. None
  50. Clojure Interactive Development Environment that Rocks

  51. … for Emacs

  52. CIDER Distilled: Beyond emacs

  53. CIDER’s Architecture

  54. None
  55. None
  56. None
  57. None
  58. CIDER’s Orchard

  59. Orchard?

  60. None
  61. noun 1. a piece of enclosed land planted with fruit

    trees. an apple orchard 2. (in the context of Clojure) a fertile ground for Clojure tooling. CIDER’s Orchard
  62. None
  63. Created especially for REPL- powered tooling

  64. Extremely flexible

  65. Transports •bencode (default) •tty (built-in) •http(s) (via Drawbridge) •transit (via

    Fastlane) •EDN (coming in nREPL 0.7)
  66. Extendable

  67. Piggieback (ClojureScript Support)

  68. shadow-cljs (ClojureScript Support)

  69. cider-nrepl

  70. None
  71. Common functionality for interactive programming environments

  72. Thin wrapper around (many) nREPL-agnostic libraries

  73. Fundamental Tooling Approaches •REPL-driven (runtime state inspection) •Static analysis based

    (parses and analyses the code)
  74. unrepl prepl nREPL

  75. orchard (swiss army knife)

  76. compliment (code completion)

  77. cljs-tooling (too hard to explain)

  78. thunknyc/profile (self-explanatory)

  79. fipp & puget (pretty printing)

  80. •cljfmt •tools.namespace •tools.trace •tools.reader

  81. REPL-powered tooling runs alongside your application code

  82. Mr. Anderson (dependency inlining)

  83. There’s a lot going on here!

  84. And we haven’t mentioned a single Emacs library…

  85. But wait, there’s more!

  86. sayid (debugging tool)

  87. weasel (ClojureScript REPL)

  88. refactor-nrepl

  89. None
  90. None
  91. None
  92. The Lay of the Land

  93. Calva (VS Code)

  94. Calva -> Calvados

  95. None
  96. Calvados is distilled from cider.

  97. Calva is distilled from CIDER.

  98. vim-fireplace

  99. vim-iced

  100. acid.vim

  101. CCW (Eclipse)

  102. Proto REPL (Atom)

  103. Non-nREPL tools

  104. Chlorine (Atom, prepl)

  105. Conjure (vim, prepl)

  106. vimpire (vim, unrepl)

  107. Cursive (IntelliJ, static analysis)

  108. clojure-lsp (cross-editor, static analysis)

  109. •cider-nrepl -> orchard-nrepl •cljs-tooling -> orchard-cljs

  110. Naming is hard!

  111. cljs-tooling compliment orchard

  112. Clojure’s Orchard

  113. Case Study: Improving ClojureScript code completion for everyone

  114. cljs-tooling => compliment

  115. clj-suitable

  116. None
  117. slide intentionally left blank

  118. Language Server Protocol

  119. None
  120. LSP or nREPL?

  121. •You can run them side by side •You can implement

    LSP in terms of nREPL •You can proxy nREPL requests to an LSP server •You can implement LSP in terms of the same underlying libraries*
  122. None
  123. The State of Affairs

  124. The Challenges

  125. 25% 5% 70% Yes Maybe I already have Notepad No

    Do you want great Clojure development tools?
  126. 69% 25% 5% 1% Yes Maybe I already have Notepad

    No Are you willing to work on Clojure development tools?
  127. Few maintainers, many libraries

  128. Areas of Interest •sayid •refactor-nrepl

  129. ClojureScript

  130. Areas of Interest •Piggieback •cider-nrepl •orchard •compliment •weasel

  131. Where’s my hammock time?

  132. Inconsistent APIs

  133. Documentation

  134. cljdoc

  135. https://docs.cider.mx

  136. https://nrepl.org

  137. AsciiDoc + Antora

  138. Funding

  139. None
  140. 2013-2017 (estimated) •$5000 in donations •~3000 hours of work on

    the projects
  141. Definition of Work •Writing code •Reviewing code •Discussing ideas •Educating

    myself so I can write/review code and discuss ideas •Supporting end users via Slack, email, etc •Collaborating with other tool authors
  142. 2018 •$4000 (OpenCollective) •$5400 (Clojurists Together)

  143. 2019 (projected) •$18,000 (OpenCollective) •$9,000 (Clojurists Together)

  144. 2,250/month

  145. Little support from Clojure companies

  146. Development tools are a high leverage investment

  147. Clojurists Together

  148. opencollective.com/cider

  149. opencollective.com/nrepl

  150. GitHub Sponsors

  151. Future of the Orchard

  152. Sustainable

  153. Stable

  154. Community Driven

  155. Community Supported

  156. Open Source is not about You

  157. CIDER’s Orchard is all about YOU!!!

  158. Help Clojure’s Orchard…

  159. …to help yourselves

  160. Felina

  161. Resources • https://metaredux.com/posts/2018/10/29/nrepl-redux.html • https://metaredux.com/posts/2018/11/09/ciders-orchard- the-heart.html • https://metaredux.com/posts/2018/11/11/ciders-orchard- the-periphery.html •

    https://www.youtube.com/watch?v=4X-1fJm25Ww
  162. One more thing…

  163. CIDER 0.22 (Lima) is out!

  164. CIDER 0.22 (São Paulo)

  165. None
  166. None
  167. Credits twitter: @bbatsov github: @bbatsov https://metaredux.com https://emacsredux.com Clojure/south São Paulo,

    Brazil 01.09.2019