Category Archives: ClojSharp

Clojure: Links, News And Resources (32)

Previous Post
Next Post

More historic links about Clojure

Web Sockets

Thread Pool

Timothy Baldridge on Clojure’s Core.Async

Martin’s Programming Blog: Distributed Actors in Clojure

Why Clojure Rocks | kreuzwerker Blog

iOS plugin

Reagent 0.4.0: All arguments allowed


CQRS sample

Lucuma – A Web Components library for ClojureScript


There’s More to Life than Just Functions

Web Development – Datomic Antipatterns: Conn as a Value

ClojureScript routing

RockPaperScissorsMultimethodsClojure/rockpaperscissors/src/rockpaperscissors/core.clj at master · trikitrok/RockPaperScissorsMultimethodsClojure

Clojure Cheat Sheet (Clojure 1.3 – 1.5, sheet v12)

MapReduce Hadoop

Parallel Universe


Live coding with Clojure and Emacs ?

Jay Fields’ Thoughts: REPL Driven Development

My Links

Stay tuned!

Angel “Java” Lopez

New Month’s Resolutions: January 2015

A new year begins. Time to review past month’s resolutions:

– Add distributed features to AjErl, Erlang-like interpreter in C# [partial] see repo
– Improve ClojSharp [complete] see repo
– Improve SimpleLisp [complete] see repo
– Code generation with AjGenesis for Node [pending]
– Start Basic Script Language for C# [complete] see repo

Additionally, I was working on:

– Improve ScalaSharp [complete] see repo
– First operations in Chip8 emulator [complete] see repo
– Write Clojure samples (Ring, Compojure) [complete] see repo
– Work on Liqueed project [complete] see repo
– Improve AjScript [complete] see repo

This new month’s resolutions:

– Continue add distributed features to AjErl, Erlang-like interpreter in C#
– Improve ClojSharp
– Improve ScalaSharp
– Improve Chip8 emulator
– Code generation with AjGenesis for Node
– Improve Basic Script Language for C#
– Write JavaScript and Artificial Intelligence posts

Stay tuned!

Angel “Java” Lopez

New Month’s Resolutions: December 2014

It’s time to review past month’s resolutions:

– Give a talk about JavaScript and Artificial Intelligence [complete] see repo see talk read Spanish post
– Neural network in JavaScript example [complete] see repo
– Genetic Algorithms in JavaScript example [complete] see repo
– More Code Generation using AjGenesis for NodeJs [pending]
– Basic Script Language for C# [pending]
– Improve SimpleScript for JavaScript [complete] see repo

Also, I was working on:

– Improve SimpleLisp, Lisp to JavaScript compiler [complete] see repo
– Improve RuScript, Ruby interpreter in JavaScript [complete] see repo
– Improve RustScript, Rust-like interpreter in JavaScript [complete] see repo
– Create SimpleDT, simple decision tree in JavaScript [complete] see repo
– Improve ClojSharp, Clojure-like interpreter in C# [complete] see repo
– Backgammon evaluation page [complete] see repo

This new month’s resolutions:

– Add distributed features to AjElr, Erlang-like interpreter in C#
– Improve ClojSharp
– Improve SimpleLisp
– Code generation with AjGenesis for Node
– Start Basic Script Language for C#

Stay tuned!

Angel “Java” Lopez

ClojSharp Implementing Clojure In C# (1) The Project

Since the past decade I’m interested on Clojure. It’s a return to Lisp, but in modern times.. Clojure is implemented on the Java virtual machine, but is also implemented on. NET (AFAIK, using Dynamic Language Runtime). The version of Java compiles to Java bytecodes. There is also a version of JavaScript, called ClojureScript. The community is very active, and has brought an air of renewal within Java. It has features like immutability of his work-oriented structures in multithreading, avoiding concurrency problems. It supports Software Transactional Memory, but has been less used by what I see. Web frameworks have emerged, and has a project and dependencies manager called Leiningen. Some links in my Clojure posts.

To deliberate practice TDD (Test-Driven Development) and C#, I was building an interpreter (not a compiler to bytecodes, yet). The project:

Current status:

It has a class library project, and a test project. There is also a REPL (Read Eval Print Loop) simple console application.

In Lisp, an expressions is composed by a verb and arguments, written in a list enclosed by parenthesis. For example, a list that at evaluation returns the sum of 1, 2 and 3:

(+ 1 2 3)

Here, the plus + sign is a symbol that in Lisp/Clojure refers to a form. A form receives arguments, operates on them, and returns a result. A typical form receives its arguments as evaluated expressions: the expressions are evaluated BEFORE the evaluation of the form:

(+ 1 (- 3 4) 3)

In the above example, the first argument to plus is a constant 1, and the second argument is an expression that is evaluated to –1 before the evaluation of the outer list.

But there are forms that not need evaluated arguments. They receive the arguments without evaluation. They are called special forms. I have implemented:

And I have implemented some (non special) forms as primitives in C#. Most of them could be implemented in Lisp itself, but being so basic that I preferred to implement them directly in C#, using TDD as usual:

Next topics: the Machine implementation, Context, how to use Parser and Lexer, more about expression evaluation, macros, tail recursion, etc.

Stay tuned!

Angel “Java” Lopez

End Of Iteration 2014w20

Previous Post
Next Post


Go programming language interpreter in C#:

I added comparison operators in lexer, parse binary expression using arithmetic and comparison operators, add statements separated by semicolons, parse blocks, parse assignment. Go is a type language, so I’m building the Abstract Syntax Tree of to-be-typed nodes, before evaluating the expressions as in an untyped interpreter.


Simple HTML scraper, implemented in plain JavaScript, without dependencies:

It runs on Node.js, but it could run from browser. I improved the sample use cases, scraping two popular Argentinean news sites. The samples get an article or a frontpage, and produce JSON output.


Clojure interpreter in C#:

This week I added multi-functions: functions defined with different bodies according to arity (no argument, one argument, two arguments and rest, etc..) I started to add support for anonymous function macro reader


A minor refactor in my syntax highlighter in JavaScript, work in progress. I added some simple samples to I started to support the add of named nodes to compiler context in I also worked on three non-public projects. More fun is coming.

Keep tuned!

Angel “Java” Lopez

New Month’s Resolutions: May 2014

Time to review my April 2014 resolutions:

– Continue AjLispScala [pending]
– Continue AjGenesisNode-Express [partial] see repo
– Continue AjGenesisNode-PHP [pending]
– Continue RuScript [pending]
– Continue RustScript [complete] see repo
– Distributed Messages in AjErl [partial] see repo
– Give a talk Intro to Node.js [complete] see repo see online talk
– Publish a new Node.js video tutorial [complete] see post

Additionally, I worked on:

– Start SharpGo interpreter [complete] see repo
– Start SimpleNeuron in JavaScript [complete] see repo
– Refactor, extend and publish new version of SimpleFlow [complete] see repo
– Improve SimpleScraper [complete] see repo
– Improve ClojSharp [complete] see repo
– Improve Aktores [complete] see repo

The resolutions for the new month, May 2014:

– Work on SimpleScraper, first use cases
– Continue RuScript
– Continue RustScript
– Continue SharpGo
– Continue Distributed Messages in AjErl
– Improve Mass Language
– Continue Aktores (first distributed features)

More fun is coming!

Keep tuned!

Angel “Java” Lopez

End Of Iteration 2014w18

Previous Post
Next Post

Node Samples

I added a Picasa API search demo application


I added more basic functionality to my JavaScript scraper:

Now, each document element has a list of attributes. As a concrete use case, there are two console samples that generate structured JSON data from two  popular Argentinean news sites:


An interpreter of Go programming language written in C#, work in progress

Some lexer pieces in place, and the first parse expression method.


Artificial Neurons in JavaScript:

I removed events: no use case for them, yet. I added the construction of a multilayer network. Next step: automatic learning using back-propagation.


Clojure interpreter in C#:

I implemented metadata reader. Big surgical refactor: now adding metadata produces a new object (in previous naive implementation, the metadata was attached to the original object). Now, it follows Clojure expected semantics. But TDD saved my day!

Google Code Jam

I participated in Round 1B:

I solved only one problem, check

For another problem, Lottery, I had a not written solution with O(n,m). I thought that it was not good enough for processing large dataset. But, apparently, the large dataset had no hard problem. Some contestants solved the problem using O(n,m) solutions. It was an interesting problem, that deserve more thought. I didn’t understand the third problem (I confused tickets with flights)


There is a new empty Laravel PHP sample at Some new node parse methods in ScalaSharp I added first map, reduce implementations to I added more features to serialization in

I worked on three non-public projects, too.

More fun is coming.

Keep tuned!

Angel “Java” Lopez