Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 3.15 KB

Clojure.md

File metadata and controls

45 lines (31 loc) · 3.15 KB

toc: no ...

The Clojure logo

Clojure is language from the Lisp family. The language itself is very opinionated: a lot of design decisions were made by its author Rich Hickey. That's why most of the clojurians don't have to "built a language for the domain" as it often happens with users of other lisps.

Clojure has a rich (ha-ha, Rich) standard library and gives its user an ability to write high-concurrent code with ease. This simplicity of the concurrency model is possible because of the /FP-first nature of language.

Me /who/astynax personally like to write some Clojure from time to time. It isn't statically typed but the design process itself is pretty fun because it is interactive: "the REPL-driven development" they say. You can even program a WebApp without any stops of the server, pure fun!

One can even write a shell-script in Clojure with babashka or just use bb as a chunk of big pipe:

$ ls | bb -i '(take 2 *input*)'
("CHANGES.md" "LICENSE")

Tools to start quickly

  • Leiningen, a popular all-in-one tool for project scaffolding, test running, dependency management
  • nREPL, a "network REPL" (just keep in mind: Leiningen uses it implicitly)
  • sublime-clojure, the "Clojure support for Sublime Text 4"

Notable libraries

  • ring, an abstraction of the HTTP server, the foundation for any WebApp
  • compojure, a routing DSL for Ring
  • hiccup, a DSL for HTML templating
  • Quil, a library for creating interactive drawings and animations (based on Processing)
  • dali, a hiccup-like DSL for creating the SVG graphics (also, dali can render SVG as PNG)
  • aleph (GitHub), a library for client and server network programming with "stream" abstraction
  • re-frame. "re-frame is a ClojureScript framework for building user interfaces. It has a data-oriented, functional design. Its primary focus is on high programmer productivity and scaling up to larger Single-Page applications."

Interesting projects

  • Dactyl Keyboard, a parametrized split keyboard (Clojure program defines the 3D model)
  • Overtone, an audio environment for music live-coding (I saw pretty impressive stuff made with it!)
  • /asciinema, a screen capture tool for your terminal
  • /babashka, a native, fast starting Clojure interpreter for scripting

My projects

  • /PixCell (a Clojure implementation of it) - a simple Pixel Art editor