Functional Programming

Validity Checks using Clojure

Reading Time: 2 minutes For putting Validation checks using Clojure code, clojure noir library checks are used. One needs to first create a form page using basic html for placing the checks.As an Example here, I am using a registration page text boxes to put the validation checks over the required fields. <label for="id"> {% if id-error %} <div>{{id-error}}</div> {% endif %} <input id="id" name="id" placeholder="User Name" type="text" value={{id}}></input> Continue Reading

Facebook Sign-in using Clojure

Reading Time: 2 minutes In order to provide Facebook sign-in functionality you need to create a new Facebook App from this url: https://developers.facebook.com/docs/facebook-login. Provide the redirection URI that you’ll use for the App. After setting up the app you’ll get an App ID and App Secret key. We’ll use “clj-oauth2.client” to redirect a user to the authentication page, “clj-http.client” for HTTP requests, “cheshire.core” to parse Json string in order Continue Reading

Maintaing Database in Clojure for New registered User

Reading Time: < 1 minute Clojure is the most popular Lisp dialect today for starting new development. The Clojure web stack is based on the Ring and Compojure libraries. Ring is the base HTTP library, while Compojure provides routing on top of it. Clojure makes a number of powerful libraries available, and we can put these libraries together in a way that makes sense for our particular project. The below Continue Reading

Parallelism in Clojure, Part I

Reading Time: 4 minutes An axiom of microprocessor development stating that the number of transistors on integrated circuits doubles approximately every two years is analogous to the fact the processing power doubles during the same period, relative to the cost or size. This has lead to the need of parallelism in programming languages and Clojure is one such language which provides a variety of functions for your multi-threaded code. Continue Reading