August 9, 2019

Clojure to Common Lisp - Part 3 - Sample CRUD App

This post deals with writing a simple CRUD application in Common Lisp. The code for this demo project is available on github Introduction We will write a simple TODO list application which will store its data in a postgres database. This application will have a basic terminal based interface. Running The Application Clone the git repository into a location where asdf can find it. $ cd ~/common-lisp $ git clone https://github. Read more

August 5, 2019

Clojure to Common Lisp - Part 2 - Projects

This post is meant to be a quick start guide to setup a CL project and writing code. If you do not have a CL Environment yet, please check out my previous post. In Clojure you could use lein or boot to quickly create the skeleton of a project and you could start coding away. In common lisp we use a library called cl-project to achieve the same Quick Note about Project Location Modern CommonLisp implementations use asdf to define systems/projects. Read more

August 1, 2019

Clojure to Common Lisp - Part 1 - Getting Started

Clojure is a great language and has a great community surrounding it. It is opinionated, and if you want to get down to business and write code that solves problems, it mostly just gets out of your way. It also lets me write lisp at work instead of Java! Clojure has also allowed me to become less intimidated with lisp in general, and when I started working on a personal hobby project I decided to pick up another lisp language. Read more

July 30, 2019

Using Argon for Password Hashes

Include the argon2-jvm dependency in your build.boot or project.clj file. [de.mkammerer/argon2-jvm "2.5"] In the module you need to use argon hashes, import the necessary classes in you namespace (ns) declaration: (:import (de.mkammerer.argon2 Argon2Factory Argon2Factory$Argon2Types)) Now you can generate a hash or verify if a string matches a hash like below: (defonce ^:private ^:const arg2-iterations 8) (defonce ^:private ^:const arg2-memory 65536) (defonce ^:private ^:const arg2-parallelism 1) (defn- argon2-hash "Hash string with Argon2id" [str-to-be-hashed] (. Read more

August 30, 2018

Using Buddy for Authentication with JWT

buddy is a set of clojure modules and libraries to incorporate various security feature in your ring application. It is also fairly non-opinionated allowing you to decide how to handle various scenarios. Check out their github page to know more about the library. Their documentation can be found here. They also have basic examples for using various authentication schemes here. In this tutorial we will configure our webapp to use signed JSON Web Tokens (JWT) and also setup access rules to make sure certain routes can only be accessed with specific authorization levels. Read more

Powered by Hugo & Kiss.