clj.orcery

Language, Expression and Design

Saturday

07

March 2015

gita - the introspective jgit wrapper

by Chris Zheng,

I'm stoked to announce gita - a new clojure wrapper for jgit. It looks somewhat like the shell version in that there is only a single top-level function (git). (use 'gita.core) (git) ; Subtasks for git are: ; ; [:add :apply :archive :blame :branch :checkout ; :cherry :clean :clone :commit :describe :diff ; :fetch :gc :init :log :ls :merge :name :notes ; :pull :push :rebase :reflog :reset :revert :rm ; :stash :status :submodule :tag] ; There's documentation already on the github page already on workflows for creating a repo, committing files and branching and there could be more but I'm a basic git user and so I don't know how all the other commands work. So I'm…

Sunday

15

February 2015

just how costly is reflection?

by Chris Zheng,

The other day, I got a message from ztellman to clean up my reflection warnings. I didn't know about this feature, where you can set your global vars in your project.clj and have it give out a warning every time the compiler sees a statement in the code that is ambiguous. In order to decide what method to use, the compiler needs to create reflection code in order to make the interop call work: Reflection warning, hara/reflect/pretty/classes.clj:14:13 - reference to field getName can't be resolved.` I find the meta ^ tags quite ugly, so marking up nice clean clojure code with type signatures didn't…

Saturday

14

February 2015

hy there clojars

by Chris Zheng,

I'm not sure if there is a REST api for clojars. If there isn't there should be. In any case, I couldn't find anything on the internet about it so I thought it'd be cool to scrape some usage statistics of my most-favorite lisp with with my second-most favorite lisp. I would honestly use hy alot more if it wasn't for the fact that I'm too used to immutable data structures. I discovered the language about 6 months ago and have been looking for any excuse to use it. I've used alot of python libraries for graphing and I do miss the some of the scientific visualisation libraries like mayavi…

Wednesday

11

February 2015

updates: vinyasa 0.3.2, lein-repack 0.2.9

by Chris Zheng,

I've been travelling around for the past 4 months and so it was hard to get too much done. Having said that, the time off gave me a much needed break and it's nice to be able to come back to some of my old projects with new eyes. lein-repack is a tool I created a while for splitting up a big project into a bunch of little ones for the purposes of deployment. It's been much neglected with minimal documentation for a while now so I've done some cleaning up of old code as well as improved documentation for the library. I've also included a nice diagram of what…

Friday

16

January 2015

iroh lives on

by Chris Zheng,

I've deprecated iroh. It's a little sad because he was one of my most favorite characters but the move made sense because it was really two libraries in one: Class reflection functions have been moved to hara.reflect, latest version at 2.1.8 Convenience macros have moved to vinyasa.reflection, latest version at 0.3.0 Not much has changed except a name change and a version increment. Please see the docs for more details.…

Thursday

30

October 2014

verbs, nouns and file watch semantics

by Chris Zheng,

I've recently had a fascination with file watchers semantics in clojure libraries. Having trialed bunch of them in the past, I decided that it was time to have a go at one myself and wanted to share some of my thoughts: Typically file watchers are implemented using either one of two patterns: verb based - (add-watch directory callback options) noun based - (start (watcher callback options)) The difference is very subtle and really centers around the verb start. If the verb start does not exist, we can treat the file-watch as an action on the file object. However if it does exist, we can treat the file-watch as an object…

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…

comments powered by Disqus