A Path Less Travelled



Posts (Whole List: 8Subscribe

  • 05
    Mar 2014

    Monads as EDSL

    DSLs are mostly standalone scripts or snippets, with a syntax different any other general purpose languages (otherwise they're not in DSL, but just this language). It's easy to tell what is a DSL: not C++, but can be loaded and executed by a C++ program; and what's not: C++.

    However, for EDSLs, the water is not this clear. At one extreme of the spectrum, EDSLs in Lisp is undeniably a DSL, but embedded in Lisp. On the other end, Ruby EDSLs are just ruby code that needs more explanation to clarify its meaning, and looks a little bit cooler than other code.

  • 04
    Mar 2014

    Haskell My Destination

    Sadly, people around me, even programmers, don't read much science fiction, so in case you don't recognize, the title is an allusion to Alfred Bester's book (find it out and read it!).

    Well, I come to realize that Haskell may be my last language. Well, I'd like to learn Clojure when I'm free and play with it, but I will always come back to write things in Haskell if possible. I've had such realizations before. Over time, Smalltalk, Ruby, Common Lisp, have all been my last language for some time, but Haskell is going to stick, I think.

  • 29
    Dec 2013

    Programming in C++ in a More Functional Way

    Recently I'm playing with libcppa, by implementing the Raft consensus protocol.

    When I am writing tests, I become more and more certain that classes is not the right pieces to make up a program. A class, or its encapsulation by using private members and methods can make some tests hard or impossible. If you lift the members to public, then the class is not necessary any more.

  • 06
    Oct 2013

    Introducing Python dbtxn Library

    The python-dbtxn is a library I wrote to ease db accessing from Python programs. Directly calling Python DBI leaves a lot of boilerplate code all over the place, and boilerplate code is bad. I googled, and there are no dbtxn like libraries, so I wrote my own.

  • 28
    Sep 2013

    My First Blog Post Here

    This is my very first blog post on this Jekyll powered static blog site.

    Posts are generated from Markdown drafts. Layouts and other HTML files are generated using Blaze HTML. Raw HTML feels ugly, especially with unbreakable long strings as attribute values. Generating HTMLs with DSLs solves this problem effectively. I am considering switching to some Ruby DSL later.