How to save Slideshare presentation as pdf file with Clojure and clj-pdf library

Clojure is a dynamical functional language runs on JVM. Its also a modern LISP with elegant syntax and powerful data structures. And whats more, Clojure is fully inter operatable with JAVA, all the JAVA libraries are readily available.

This post introduce you an easy way to save a slideshare as one pdf file with Clojure.

Why waitFor method in java.lang.Process hang

In last post Executing shell command in Clojure REPL. I present a function that can execute shell command from Clojure REPL.

Well, the script will work in most situations but you will find it not work in some edge cases because there are something missing in our implementation.

Executing shell command in Clojure REPL

When you are working in Clojure REPL and want do something in shell. How to do it ? Most of the time I will Ctrl + C break from REPL and switch back after shell interaction.

And its inconvenient, and most importantly, if I already defined something in REPL , I have to restore them after switching back.

Clojure map and mapv

I was reading The Joy Of Clojure the first edition and looking at chapter 7, and experimenting the A* path finding code.

And it gives me this error

The magic of Clojure trampoline function

The trampoline function is Clojure's way to explicitly optimize mutual recursion.

A quick Wikipedia check you will get the idea, but lets just get an simple overview right here.

Understand Clojure recur and tail recursion optimization

Or naive recursion, linear recursion, mundane recursion. They are semantically equivalent to iteration. But recursive version consumes more memory. At each loop, recursive function call creates a new stack frame and all the local variables have a new copy , by doing this, the recursive version don't have to mutate anything, the cost is stack frame consumption.

Why the cons car cdr are missing in Clojure

was playing with Clojure REPL and when I try to use cons car that existed in LISP ... to resolve symbol: car in this context, compiling:(NO_SOURCE_PATH:6:1) user=> (cons 1 2 ... :505) user=> Looks like these functions are different in Clojure. Use cons in Clojure ... 1 '(1 2 3 4)) (1) user=> (car '(1 2 3 4 )) CompilerException java.lang.RuntimeException: Unable
Previous Page 1 ... 5 6