My current Clojure CLR project

Mick Duprez
2 min readAug 27, 2016
Screenshot of the home built IDE so far

In my efforts to learn how Clojure and Clojure CLR in particular works I’m in the process of building a simple plugin IDE for the Bricscad CADD application (an AutoCAD alternative that is better in many ways IMO).

I started programming in AutoCAD many years ago now using VBA and AutoLisp then onto ObjectARX with C/C++ and have since branched out into web dev and other areas but CAD programming is my bread and butter.
In my day to day work I build plugins for these CAD app’s which involves writing class libraries in C# and I find the ‘ceremony’ of writing this OO code tedious, hence my venture into Clojure.

To aid me in my work I thought I’d develop some tools to make my job easier and so far it has been a great learning experience and very productive!
For the code editor I’m using the ScintillaNET control which takes a bit of configuration but works well. For the REPL I have used a basic TextBox control with a bit of code to handle the I/O from the read and eval methods I have in the C# code to process Clojure code snippets.
This is all built into a very small C# class library I load into the host app and from there I can start coding in Clojure and testing with the REPL in host app and so far it’s working quite well.

The screenshot above shows a sample of how to use the IDE in a CAD session, It shows how I can write some functions and some tests and run them. It’s a bit contrived as I wouldn’t really write 2 sets of functions or tests but it shows how it all works together. The add1 functions would be the first iteration and add2 is the corrected 2nd iteration of code an test.

Anyway, this was just a quick post just to brag really :)
I will be putting this all up on GitHub soon and will continue the Clojure CLR from Scratch posts using some of the insights and lessons I’ve picked up during this project.

Stay Well,
Mick.

--

--