Something Same

Language, Expression and Design

Thursday

09

October 2014

lein-repack with cljs and java support

by Chris Zheng,

The newest version of lein-repack (0.2.3) has undergone a complete overhaul of its analyser. In addition to clojure source files, it now supports clojurescript and java source files as well as resource files. A sample project shows how all different types of files can be packaged into final packages, with the final file list printable via the lein repack manifest command {:root {:files [], :dependencies [[org.clojure/clojure "1.6.0"] [im.chit/korra "0.1.2"] [im.chit/repack.advance.resources "0.1.0-SNAPSHOT"] [im.chit/repack.advance.jvm "0.1.0-SNAPSHOT"] [im.chit/repack.advance.common "0.1.0-SNAPSHOT"] [im.chit/repack.advance.core "0.1.0-SNAPSHOT…

Tuesday

23

September 2014

A first encounter with improvisation

by Chris Zheng,

I grew up playing piano, which is a very typical past-time of most second generation chinese kids growing up in a western nation. My teacher, a very good family friend, was an archetypal first generation chinese professional straight out of the Beijing College of the Arts. I learnt piano the way my teacher had learnt to play piano - by replicating exactly how the cd player played those songs. It was stupidly hard. Firstly the cd sounds amazing, especially when the artist is Glenn Gould and I never got anywhere close to the level of the cd. Of course, that left a lot of room for me to 'improve' and…

Friday

12

September 2014

Of qufoids and the monad effect

by Chris Zheng,

Many objects can be turned into liquid. Ice Cubes, Screw Drivers, Spanners, Tyres, Bikes, etc... (Sorry about not coming up with better references... I'm writing this on a cycling trip). Other things can not be turned into a liquid - diamonds, sound waves, dreams. The ability to turn something into a liquid is a generic property of material objects and different objects have different methods to make them liquid (Leaving at Room Temperature, Using a Bunsen Burner, Dissolving in Water, Dissolving in Oil, Dissolving in Acid, etc...). We define a qufoid to be any object obeying the following quifoidic law: when the object is in the solid state, it can…

Thursday

04

September 2014

On the shoulders of giants

by Chris Zheng,

The name of this blog is called Something Same. People sometimes ask me why I call it that name... my answer for them usually goes along the lines of: "well... it's most definitely not Something Different". I honestly mean that. I am of the belief that ideas are never invented but rediscovered. We are always copying, rediscovering and repackaging works from the masters who themselves also copied the masters of their time in a never ending cycle of learning and discovery. On that note, I have to apologise for a remark that I have since redacted from a previous post. The effect was not what I had in mind when…

Tuesday

02

September 2014

hara.component - just a bit more structure

by Chris Zheng,

In using the stuartsierra/component library at Auspost for the past 3 months, I've decided to reimplement the components library in hara.component for the "2.1.3" release. There are a couple of differences with this library and its more famous predescessor: an array of components can now be constructed included started? and stopped? methods inspecting the entire system becomes nicer with pretty printing of a system the system is defined via a system topology and a corresponding system config. So there is a more relaxed definition of records through constructors and dependencies. I had a real-world use case for doing the array of components. In this case, it…

Thursday

28

August 2014

rethinking clojure.contrib

by Chris Zheng,

I used to be a huge fanboy of the c++ boost library even though I used probably 2% of the actual functionality provided (and understood even less than that). In the end, I chose python instead because I got sick of waiting half a day for boost to build. However, what amazed me about boost was the way the code was organised. At the time, I was fascinated by just how intricately all the libraries were linked to one another. Exploring the boost modules was more or less like exploring a finely weaved lattice. It was very beautiful (for c++ anyways) in the way these modules fit and depended upon…

Wednesday

27

August 2014

auto-documentation through tests

by Chris Zheng,

Those that have worked with me know that I love my tests and my documentation. I'm one of those developers that work best whilst lounging around on a tropical island somewhere. I'm not fond of repetitive work, I write only when I'm inspired and I'm not great with details once the code has been written. As such, I am very forgetful and so implementing tests and documentation have been my backup plan to manage large amounts of code without forgetting it all at a later point in time. Working with my limitations, I require all my functions to have tests containing of valid inputs and outputs. This means that it…

Monday

25

August 2014

cronj 1.4.0 released

by Chris Zheng,

I'm very excited to release version 1.4.0 of cronj, a timing library. More information can be found in the article immutability, time, and task schedulers. The current cronj has been updated to use version 2.1.2 of hara.ova. Not that much has changed in terms of functionality but its very exciting to be able to show an example of how the hara can be used to simplify the building of concurrent systems. Please have a play!…

Monday

25

August 2014

hara 2.1.2 - concurrency structures

by Chris Zheng,

I've merged two existing projects - ova and kiran into hara for the library's 2.1.2 release. In this version, I've focused on building up lower-level constructs that work well under concurrency: hara.concurrent.notification, useful for testing whether multithreaded functions have run or not hara.concurrent.latch, a general way to let one ref follow what another is doing. hara.concurrent.propagate , a simplified implementation of Sussman's propagators. hara.ova which provides a general purpose mutable array of refs. Other new namespaces in this release are: hara.data.map. It was common functions for dealing with nils in maps. hara.string.path for converting between vector [:a :b…

Monday

18

August 2014

hara documentation published

by Chris Zheng,

I've been chipping away at a small utility library called hara (in the spirit of useful, clojure-utils and medley) for the last 2.5 years. After much trial and error, two major rewrites as well as structural changes to the project, I'm now confident enough to release documentation to cover at least part of the functionality that won't change. It's also made me appreciate just how difficult it is to achieve simplicity. The documentation can be found here. There are a four highlights of the library that I would like to point out: The first is that you can use as little or as much of the library as you…

comments powered by Disqus