RSSAmplifier

Blog

Between Two Parens

A blog about life between two parens.

betweentwoparens.comRSS feed ↗11 posts

Latest posts

Rich Comment Blocks

The three main types of comments in Clojure are comment discard comment comment macro ( Rich Comment ) The last one, the Rich Comment , is a pretty cool feature of Clojure. Comment The first type of comment is a literal comment ; I'm a comment Anything that follows the ; is ignored by Clojure until the end of the line. A common use for a comment is to add human readable documentation to your code…

What are the Clojure Tools?

Want to install the Clojure CLI ? Visit the Official Getting Started Guide or watch Installing Clojure on Mac . Sorry Linux and Windows, friends. I will get to those videos in time! The Clojure Tools are a group of convenience tools which currently consist of: Clojure CLI tools.build The Clojure Tools . were designed to answer some of the following questions: How do I install Clojure? ( Clojure…

Manage your Java JDKs

Pro tip for anyone working with any programming language: Find a clean and easy way to switch versions of your programming language of choice. All it takes is a CI environment running a different version of your programming language and the world goes Pete Tong. My approach is to use a language version manager. If you're using JavaScript, nvm is a great option, Ruby has rvm and for Clojure…

Reagent & Hiccup

I'm writing this post because hiccup in the context of Reagent confused me and I wanted to work through some of the confusion. Things that confused me: I apparently don't need to import a library, modify my build tools or do anything and I just get to write hiccup for free? How is this possible? Also, what is hiccup and is it the same everywhere? In React (JavaScript) you primarily write your HTML…

Clojure Text Editors

One of the most common beginner Clojure/Script questions I see is, "which text editor should I use?". I can relate to this question because it's the same one I had when I started. Most of the answers I found led me to using emacs . So, I started to learn Clojure and emacs at the same time. This was a bad decision becuase it was simply too many things to learn at once. What I should have done is…

Deploy ClojureScript on Nginx

My first blog post outlined how to deploy a static ClojureScript website to Github Pages. This is an excellent choice for personal websites, or an open source project's documentation because you get free hosting infrastructure with relatively little effort. Having said this, what happens if you can't use static hosting providers like Github Pages or Netlify ? What if you need to control more of…

Students of the Game: Reloadable Code

About two years ago I built a small ClojureScript app that looks like this: The source code can be found here . This app was meant to be a bite sized learning project to level up my ClojureScript interop skills. Aside from being gorgeoous, it had only two things to do: User presses the Add button and 1 new Calendar Event is created User can see a List of Calendar Events I started the app as I…

ClojureScript Test Setup

This post will walk through how to setup a Test Toolchain from scratch for a ClojureScript app. When I say Test Toolchain I mean all the programming tools you need to write, find, run and report on the tests you write. Also, if you're following along please make sure you have Clojure setup on your local machine. If you haven't done this already, I've created a FREE youtube series that will show…

What the Reagent Component?!

Did you know that when you write a form-1 , form-2 or form-3 Reagent component they all default to becoming React class components ? For example, if you were to write this form-1 Reagent component: ( defn welcome [ ] [ :h1 "Hello, friend" ] ) By the time Reagent passes it to React it would be the equivalent of you writing this: class Welcome extends React . Component { render ( ) { return < h1 >…

Start a ClojureScript App from Scratch

In this post we'll walk through my approach to setting up a Clojure(Script) app from scratch. My ultimate goal is to help alleviate the nagging perectionist feelings we get when starting new projects. If you happen to get stuck along the way, I have a demo project which you can reference. Furthmore, while we aren't writing much ClojureScript in this post, feel free to reference this 15 minute…

Deploy ClojureScript to Github Pages

Here's a small example of what it looks like to deploy a static website with some ClojureScript to Github Pages. I'll start by introducing some key cocepts and then move into how we actually do the thing. What is ClojureScript? ClojureScript, like Elm or Reason , is a compile to js programming language. ClojureScript is different from JavaScript in a few ways. It's a functional language It's a…