Something Same

Language, Expression and Design

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…

Sunday

03

August 2014

A more refined vinyasa.inject

by Chris Zheng,

vinyasa.inject has been made a little bit more user friendly following the advice of mascip, Version 0.2.2 has quite a few breaking changes: Instead of injecting directly into clojure.core with a prefix, we can get the same effect with a short namespace. For example, instead of typing >pprint, we inject into the > namespace and type >/pprint. By default, vars will be exported to the . namespace, ie: ./pprint, ./doc, ./source etc... Secondly, there is now an vinyasa.inject/in which provides similar semantics as the ns macro. Here is an example of a typical profiles.clj configuration: {:user {:plugins [...] :dependencies [[org.clojure/tools.namespace…

Saturday

26

July 2014

Cassandra as a big nested map

by Chris Zheng,

I'm stoked to announce that our team at MyPost has open sourced a library that has been used by our development team for the past couple of months. The repository is here. The whole release was quite unexpected and very exciting. It's not a common occurance at all to have a big government-owned corporation (in Australia anyway) allow developers to use emacs and lisp, let alone allow work to be open sourced. Thanks to all who waded through a whole bunch of bureaucratic and legal hurdles, helping to streamline the next set of potential projects that we can open source. I quote Andy our technology lead: This is the first…

comments powered by Disqus