clj.orcery

Language, Expression and Design

Monday

07

March 2016

hara.time - time as a clojure map

by Chris Zheng,

cronj was the first real world project I ever wrote with clojure and my first library that was properly concurrent. I remember sitting there in my living room about 4 years watching Rich Hickey's ants demo thinking to myself: "this guy's got 100 threads running simultaneously and I can't even get 2 threads to coordinate properly". As much as I despaired back then, it provided the impetus to start learning about concurrency. I set my sights high. What better way to do it than to build a task scheduler? Although the code for cronj has evolved, the architecture has not. Each part of the system has been kept very clean…

Wednesday

17

February 2016

oren - os and hardware information

by Chris Zheng,

Having been a big fan of system monitoring, I started looking into alternatives to sigar and found oshi - a JNA-based (native) operating system information library for Java. While it's functionality is much less than sigar, I spent some time experimenting with wrapping the functionity with hara.object. The result is oren: (require '[oren.core :as oren]) (oren/all) => {:operating-system {:family "Mac OS X", :manufacturer "Apple", :version {:build-number "15D21", :code-name "El Capitan", :version "10.11.3"}} :hardware {:file-stores [{:description "Local Disk", :name "Macintosh HD (/)", :total-space 249821663232, :usable-space 6691004416}], :memory {:available 5489655808, :total 17179869184}, :power-sources [{:name "InternalBattery-0", :remaining-capacity 1.0, :time-remaining -2.0}], :displays [{:edid [... ]}], :processor {:vendor "GenuineIntel", ... ... :model…

Thursday

21

January 2016

hydrox - design driven development

by Chris Zheng,

I've put two videos up on how to work with hydrox, a tool for maintaining documentation. Here they are: 0 - Introduction to Hydrox 1 - Getting Started …

Friday

08

January 2016

adi is graphql for datomic

by Chris Zheng,

Or rather, graphql and adi work on the same principle - that the query should be of the same structure as the result. It's quite obvious why this is a good thing - and the reason mongodb became so popular because it was just so easy to use. The novelty with adi is that it works with relational data to enable document-style search and retrieval for both forward and backward relationships, enabling very efficient queries to be constructed. Furthermore, the library provides a very extensive list of data filtering options based purely on access data models. I've neglected this library for too long since coming up with the first version…

Saturday

26

December 2015

think data, escape encapsulation - hara.object

by Chris Zheng,

If there was one superpower I wanted when working with java, it was to be able to visualize the object exactly the way I wanted. Fine, there was the watch function on the IDEs but that was slow and unwieldy - I had to set breakpoints and run to that particular point in time and it was such a hassle to click on the + sign to expand the object that I wanted to inspect. Working with clojure's repl has lessened the need for inspection but I found that there was still something about working with java objects that made it such as pain as opposed to the simplicity of clojure…

Friday

18

December 2015

parameterised execution - hara.concurrent.procedure

by Chris Zheng,

The release of hara 2.2.13 and the finalization of hara.concurrent.procedure is another milestone in my understanding of computation. The concept of execution, like the concept of a continuation has taken me almost 2 years to grok and then another 6 months to expand upon this idea of what I think it implies. There is a very simple idea used all the time in programming - that a function could be replaced by a lookup. When I first heard mentioned, the concept completely blew my mind. It's a really simple idea but it held enormous consequences for how we build and use functions. This concept holds true…

Tuesday

08

December 2015

hara 2.2.12 release with docs

by Chris Zheng,

We've been doing some really cool stuff at Helpshift so it's been a while since any significant updates on my open source projects. Clojure wise, I took a trip in November to Israel and met up with the Tel Aviv Clojure Group and it was great to be shown around by Daniel and to meet with everyone. There's some real exciting work going on there and I look forward to going again in the future. hara is now at version 2.2.12. I've managed to get most of the documentation up for hara for easier consumption. There are still two namespaces - hara.concurrent.procedure and hara.object that…

Friday

21

August 2015

lein midje-doc is now hydrox

by Chris Zheng,

midje-doc was hacked out in about a week and a half at a very critical junction of my life. The backstory was that I became unemployed and took a trip up to Bali. I lived frugally, did yoga and hacked during the wee hours of the night. The situation was not entirely desperate as such but I knew that I had to do SOMETHING so that it did not get to that. At the time I had a bunch of libraries that I had been working on for close to a year and a half. I had been doing show and tell on my laptop, but it wasn't really a…

Tuesday

11

August 2015

to visualise with style

by Chris Zheng,

I started travelling with just a backpack and a sitar ever since August of last year. It's been an extremely rewarding and life changing experience and I've finally have found a place to call home in Pune. Career wise, I'm working with Helpshift - an in-app mobile support platform founded by two amazing individuals - Abinash and BG. Helpshift has amazing people and a superb engineering culture. It's a real treat to be able to work here. Coupled with the great weather and amazing food, I consider myself extremely lucky. One of the things that I have been tasked with is to be able to make sense of a code…

Thursday

23

July 2015

hara is not a framework

by Chris Zheng,

When clojure libraries reach a certain size, they tend to be broken down into smaller pieces. Examples of such projects are pinot and lamina where one project suddenly turns into 5 overnight. The most ambitious effort was clojure.contrib - and that was broken down into something like 30 different pieces, each with a seperate repo, maintainer, etc. hara bucks the trend with an emphasis on integration and wholistic design. Progress has been stop, start and painfully slow at times. It has taken more 3 years for the code to reach critical mass and for me to get a half decent website off the ground. In terms of its evolution…