Category Archives: ClojSharp

Clojure: Links, News And Resources (32)

Previous Post
Next Post

More historic links about Clojure

ptaoussanis/sente
https://github.com/ptaoussanis/sente
Web Sockets

TheClimateCorporation/claypoole
https://github.com/TheClimateCorporation/claypoole/
Thread Pool

Timothy Baldridge on Clojure’s Core.Async
http://www.infoq.com/interviews/baldridge-core-async

Martin’s Programming Blog: Distributed Actors in Clojure
http://martinsprogrammingblog.blogspot.com.ar/2012/05/distributed-actors-in-clojure.html

Why Clojure Rocks | kreuzwerker Blog
http://www.kreuzwerker.de/en/blog/posts/why-clojure-rocks-2/

oakes/lein-fruit
https://github.com/oakes/lein-fruit
iOS plugin

Reagent 0.4.0: All arguments allowed
http://holmsand.github.io/reagent/news/any-arguments.html

holmsand/reagent
https://github.com/holmsand/reagent

weejulius/raiseup
https://github.com/weejulius/raiseup
CQRS sample

Lucuma – A Web Components library for ClojureScript
http://jeluard.github.io/lucuma/

JonyEpsilon/gorilla-repl
https://github.com/JonyEpsilon/gorilla-repl

There’s More to Life than Just Functions
http://bodil.org/more-than-functions/#/

webnf/webnf
https://github.com/webnf/webnf
Web Development

rkn.io – Datomic Antipatterns: Conn as a Value
http://www.rkn.io/2014/02/10/datomic-antipatterns-connnnn/

gf3/secretary
https://github.com/gf3/secretary
ClojureScript routing

RockPaperScissorsMultimethodsClojure/rockpaperscissors/src/rockpaperscissors/core.clj at master · trikitrok/RockPaperScissorsMultimethodsClojure
https://github.com/trikitrok/RockPaperScissorsMultimethodsClojure/blob/master/rockpaperscissors/src/rockpaperscissors/core.clj

Clojure Cheat Sheet (Clojure 1.3 – 1.5, sheet v12)
http://jafingerhut.github.io/cheatsheet-clj-1.3/cheatsheet-tiptip-cdocs-summary.html

damballa/parkour
https://github.com/damballa/parkour
MapReduce Hadoop

Parallel Universe
http://blog.paralleluniverse.co/2014/02/06/fibers-threads-strands/

Factual/durable-queue
https://github.com/Factual/durable-queue
Queue

Live coding with Clojure and Emacs ?
http://danielsz.github.io/2014/01/20/Live-coding-with-Clojure-and-Emacs/

Jay Fields’ Thoughts: REPL Driven Development
http://blog.jayfields.com/2014/01/repl-driven-development.html

My Links
http://delicious.com/ajlopez/clojure

Stay tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

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
http://www.ajlopez.com
http://twitter.com/ajlopez

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
http://www.ajlopez.com
http://twitter.com/ajlopez

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:

https://github.com/ajlopez/ClojSharp

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

http://www.ajlopez.com

http://twitter.com/ajlopez

End Of Iteration 2014w20

Previous Post
Next Post

SharpGo

Go programming language interpreter in C#:

https://github.com/ajlopez/SharpGo

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.

SimpleScraper

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

https://github.com/ajlopez/SimpleScraper

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.

ClojSharp

Clojure interpreter in C#:

https://github.com/ajlopez/ClojSharp

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

Others

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

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

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
http://www.ajlopez.com
http://twitter.com/ajlopez

End Of Iteration 2014w18

Previous Post
Next Post

Node Samples

I added a Picasa API search demo application

https://github.com/ajlopez/ExpressSamples/tree/master/MyPicasa

https://twitter.com/ajlopez/status/462919814701281281/photo/1

SimpleScraper

I added more basic functionality to my JavaScript scraper:

https://github.com/ajlopez/SimpleScraper

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:

https://github.com/ajlopez/SimpleScraper/tree/master/samples/clarin
https://github.com/ajlopez/SimpleScraper/tree/master/samples/lanacion

https://twitter.com/ajlopez/status/463006440660017153/photo/1

SharpGo

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

https://github.com/ajlopez/SharpGo

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

SimpleNeuron

Artificial Neurons in JavaScript:

https://github.com/ajlopez/SimpleNeuron

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

ClojSharp

Clojure interpreter in C#:

https://github.com/ajlopez/ClojSharp

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:

https://code.google.com/codejam/contest/2994486/dashboard

I solved only one problem, check

https://github.com/ajlopez/TddRocks/tree/master/Gcj2014/Repeater

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)

Others

There is a new empty Laravel PHP sample at https://github.com/ajlopez/PhpSamples/tree/master/Laravel/MyLaravel. Some new node parse methods in ScalaSharp https://github.com/ajlopez/ScalaSharp. I added first map, reduce implementations to https://github.com/ajlopez/SimpleFlow. I added more features to serialization in https://github.com/ajlopez/AjErl.

I worked on three non-public projects, too.

More fun is coming.

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez