Thursday, October 23, 2014

On Reading...

Not exactly on a roll here, but might as well write something, yes?

It isn't a secret that I am making my way through the King James Version of the Bible from Project Gutenberg. If it's something new, I highly recommend checking out my reading list to keep track of what I am currently reading.

The purpose is actually quite simple. The Bible is a book that is heavily alluded to (and even quoted from!) in the literature of the western hemisphere, and I cannot call myself a reader of English literature if I hadn't actually had the chance to look at the source material itself. So it is of a more mundane linguistic and semiotic reason that I am tackling the holy book than a sudden epiphany in following the Christian faith.

With that out of the way, some progress updates. I'm up to the Psalms now, and the experience thus far has been rather interesting. Some of the text can be quite laborious (counting off people?), while others lay out some basic principles behind what is deemed to be a moral life (commandmants and the stuff from the Judges and the Kings), as well as the rather petty nature of the almighty as depicted in the early sections (someone accidentally touches the Ark and boom! that person died). Pretty gory stuff for a holy book, but it is still quite interesting. The language itself hasn't bothered me a bit---I suspect I am getting used to the proto-modern English that was used here. A version of the actual form from which the modern allusions come from are well told in the text for the most part, but they often lack the embellishment that specific retellings have. Somehow though there is a realness behind them that defies the fantastical form of the nature that is being described.

Man, I wish I could write like that and be read nearly 700+ years later (KJV was translated sometime in 1400-1500s).

Maybe I'm not as secure in my own thoughts on morality that I thought, because just as I began on the KJV, I started on Feynman's first book of lectures on Physics, covering classical mechanics and special relativity as well as basic quantum mechanics. I won't claim that I am an expert in those branches of physics, but at least I have a better understanding (and a slightly better tuned intuition) behind the more modern aspects of physics compared to the simplified models that I learnt up to the `A'-levels. Feynman has an easy-to-read style that transcends the often crazy equations which govern the underlying physical phenomenon. Or maybe it's from my general lack of exposure to physics proper since my last physics-related class on astronomy and experimental physics back in college. I'll start on the second volume some time in the future---I am getting rather sick of reading too many large volumes at once; KJV is even more brick-like than ol' Hugo's Les Misérables.

I did manage to squeeze in some short stories and novels and even a version of the Singapore Constitution just for a change. Of the lot, the Handmaid's Tale is rather thought provoking. It provides yet another type of dystopian future scenario that hits even closer to home than Nineteen Eighty-Four, Brave New World or even Blade Runner (the movie of course). That a theocratic movement can overcome democratic processes to end up with a type of strict autocratic society is something that cannot be dismissed as implausible given the constant rise of religious fundamentalism and personality cults. It takes the strongly patriarchical hierarchy and marries it with the perversely impersonal utilitarianism to create a formal society that is abhorred by all secretly but loved by all outwardly.

So, what's next?

More KJV for sure---apparently there are ``good news'' in the New Testament stuff, which will probably give me more cause to appreciate the things about St Thomas Aquinas that my old ethics professor talked about when I was taking that course in the Philosophy department. Apart from KJV, I should probably continue with the next volume of the Arabian Nights before marathoning Dune. Reading throughput is likely to be slow next month due to NaNoWriMo.

Speaking of NaNoWriMo, I think I have enough ideas to carry on with the original concept of Tales of the City. The main reason for my sudden lack of confidence came from a post I saw online that tried to characterise Singaporean writing. I found that my story concept was already taken to be a stereotype, and was quite shaken about it, since I thought I was doing something that was a little bit new. But now, after watching the riots in Hong Kong, and remembering Hemingway, I have discovered a new challenge for myself: to write Tales of the City using concise writing instead of the usual verbiage one uses to pad up the draft to hit the magical 50k. Does this mean that there's a chance of failure this year? Yes. But I suppose I will be much better from it as a writer.

The general plot of Tales of the City ought to be similar to my original concept, except this time, we can use more of a dystopian future setting to introduce the tales. This allows different voices and styles not unlike my 2013 entry, which featured that except it was too disturbing even to post online.

It should be fun.

And with that, it is time for me to sign off. I could go on and talk more, but a nine-hundred word blog post of almost no substance is probably enough for most people's palates. Till next time.

Friday, October 17, 2014

Discipline

Today's rant will be about the overly attached emotions one has for the artificial construct of a ``discipline of knowledge''.

I was in a discussion with a friend not too long ago about the state of affairs of machine thought versus human thought regarding the issue of medical decisions. It started off innocently enough, but it rapidly devolved into a slinging match between the two of us as to how humans will always remain ``superior'' to the thinking machines because the former can make judgement calls while the latter cannot. I vehemently disagreed to the premise, of course, since I was of the opinion that any form of human judgement is not completely devoid of stimuli, and can be codified into a system of logics combined with the balancing of probabilities, sort of a mix of regular first (or even second) order logic with associated Bayesian prior distributions over various theorems that get updated with new information. My friend's argument was that machines are too limited and are unable to make judgement calls nonetheless, wherein I brought in the point that the way in which human judgement calls and machine calls are used are completely different.

A human has continuous stimuli in the form of faster feedback loops, while the machine is often forced to make a single judgement given only one chance at getting ``observations'' in the form of some type of sensory/test output. Such a test protocol is obviously unfair and imbalanced.

We wisely ceased continuing the conversation when it was clearly obvious that each of us thought that we were right while the other was a complete moron and completely wrong.

I reflected upon the conversation and came to a much simpler conclusion as to what was going on. We were talking from too deep within our own disciplines. Had the domain of discourse been substituted from medical decisions so something more neutral (in comparison anyway) like that of a judicial ruling, a more productive outcome would have ensued, with some of the points of differing test protocols, types of codified knowledge, relative likelihood assignment and the like be debated on a more neutral territory.

But I was coming from the machine learning/knowledge representation/probabilistic modelling perspective, while my friend was coming in at full speed from the perspective of a medical doctor in training. There are turfs to guard, and that's what the notion of a discipline in human knowledge teaches us. That I was advocating for a more fair assessment of how machine intelligence can help provide medical decisions was seen, rightly or not, as an encroachment on the sacrosanct turf of the learned practitioner of the medical arts, who of course see the computer scientist who looks at data as ``that silly guy who does not have a medical degree'', which prompted the robust response, be it good or bad.

That got me thinking even more about the whole concept of a discipline.

Having disciplines in human knowledge is a good thing. It partitions the vastness of human knowledge into mostly self-consistent chunks, with dogma codifying the founding characteristics of that particular chunk of knowledge. Great advances in human knowledge have come from the explorations of researchers who are a part of each of their discipline, contributing much from their perspective, and sometimes even challenging the dogma to update it with the newly acquired data.

But defining disciplines, like all forms of discrimination, have a dark side. It makes experts in their own discipline arrogant. It makes them complacent; many feel that since they are masters of their discipline, it makes them qualified to criticise seriously on the work of others from other disciplines at best, and at worst, find that it is in their perogative to downplay or even slam the work of others outside of their chosen discipline. Hence the attack on developing machine intelligence for medical decision making by my friend. The world view was strongly distorted from the long periods of time that my friend had spent in the medical world.

Then there's the rise of so-called ``inter-disciplinary'' work. So much talk about marrying engineering with science and what-not. I'm too tired to write more on this, but I'll leave with this Feynman quote from the first book of the lectures:

``...because the separation of fields, as we have emphasized, is merely a human convenience, and an unnatural thing.''

Friday, October 10, 2014

Polarity

I must say that this is rather anomalous.

I lost my voice for quite a while, even before I started on the story-a-day challenge that I had since given up on. Somehow I felt that I had nothing to say, and that's why I said nothing at all.

Yet this fortnight has seen me writing enough entries that can be considered as an obtuse sense of ``frequent blogging''. I cannot tell though if this is an indication that I have finally found mhy voice, or if it is merely a phase to pass through before I go back to long periods of silence.

Work has been harrowing yet interesting. We are close to a major delivery date for the thing we were working on, and so there were the countless tests and re-tests, bug-fixing, feature-inducing, change request masquerading that come along with it. At this point as I write, I can feel that tension headache starting from the crown of my skull and slowly spreading itself as I count the number of hours that I had slept over the past two days.

Of course I'm tired. Giving that final polish on a thing that we had put so much time into building and tweaking is always the 80% of the 80-20 effort. Cognitively, I am quite distended. But there is this deep sense of satisfaction that I can barely start to describe. If it all works out, t'is good.

Yet beyond the satisfaction lies that compulsion to suddenly erupt into a primal scream, as if to release the pent up tension and angst that had been mercilessly gathering within my soul, like the eye of the maelstrom of interactions with the world. Reading and observing people who are no better than imbeciles keep trying my patience at maintaining a sense of outward calm. I took the bus home from the MRT station as always, and I met the most unruly and ill-mannered brats that I had the displeasure of seeing.

They couldn't be more than sixteen. Their diction was poor; vulgarities and obscenities punctuated whatever few conversational words they knew. Their sense of fun was jejune and consisted of spending the entire thirty minutes of taking turns to surreptiously smack each other in the head. Their choice of fashion was poor---mis-coloured hair, shabby looking T-shirts and bermudas, uncharacteristically short blouse that was at best a plain looking piece of brassiere, and tiny shorts with inseams that suggest better use as an inner garment. Their behaviour unruly as they took over the front half of the bus with their antics while the rest of us stared at them in disdain, annoyed enough to show it but not annoyed enough to step into put a stop to it.

When I saw them, what came to mind was not rebellion, it was idiocracy. And I was suddenly aware at just how screwed up a world we live in.

And that's why I avoid going out of the apartment unless it is absolutely necessary.

Tuesday, October 07, 2014

Creativity

I don't really have bursts of creativity. Hell, I doubt the very premise that I'm somehow a creative person. But I try to do my bit of innovation, be it for work or even for my own personal growth and development.

Something about never wanting to be in the herd.

It's an old thing of mine to never move in the same direction as everyone else. It's a habit I sort of picked up along the way, unintentionally at first, but now more deliberate than not.

The road less taken is the road that is most interesting, since by virtue of it being less taken means that the sights and sounds that come with it are never cliches. Avoiding cliches is paramount to living a fulfilling life -- somehow I suspect that the meaning of life is to generate and live through surprises, i.e. the things that are out of the ordinary for a life.

In more material terms, it means doing what you love, going where you want, and loving who you want without restrictions from silly social norms and mores.

It sounds mildly anarchic, this I will admit. Social norms and mores exist for the reason of allowing larger groups of people to work and live in closer proximity and at higher densities that are possible from a more egalitarian approach, but they do not mean that all of their rules and rituals need to be obeyed blindly. This means that one may follow the social norms and mores when interacting with others, but outside of the sphere of interaction, one should be at liberty to dictate one's terms on living life.

Which makes anything that borders on autocracy is an antithesis to living. Innovation may come from bending around rules through creative interpretation, but slap too many rules on and it becomes too much of a hassle to attempt any sort of innovation whatsoever. Where there's no innovation, there's no life as we know it, and this is a problem that we will be facing in our generation. Hard work and deep thinking are what makes the world go round, not going through cliches after cliches in leading one's life.

Imagine the combined creative power of everyone who thinks critically for themselves.

Friday, October 03, 2014

Typewriterisms

I feel sort of bad. But it was something that I needed at some point given my various experiments.

I wrote this recently and pushed it out on my personal domain: Typewriter-like Line Printer Emulator. I had to; it needed to be done.

There wasn't an easy way to capture the output from a text file (or typewriter-like input) into a PDF or something of that sort. One's at the mercy of the multitude of printer drivers that are out there, which demanded all kinds of... things.

Even notepad/vim is hopeless at this. Control over the number of lines and columns in the page are non-existent.

And cute typewriterisms like overstriking ____________ are missing.

And non-cute typewriterisms like the bad register of the keys on impact.

Of course, apart from the more obvious fun factor of figuring out how to emulate all these line-printer analogues in the precise nature of the digital realm, there are some other practical aspects of it.

It is of no secret that I have an interest in typography in a while. Typography and typesetting. I know LaTeX and even groff/troff/nroff exist and enjoy what they do, but somehow something is lacking. That old rustic charm from an antiquated means of typesetting, the world of monospaced fonts. The type of output one would find in say HAKMEM. It's not practical I know, but to me, it's the artistic merits of it.

And so that's my side project. To build stuff that recreates the old processes in a way that is still usable even in the modern era. Which of course explains the monstrosity that I linked to earlier.

Conceptually, it's simple. All it does is to take in a stream of ASCII characters from stdin and dump them to stdout which can be redirected into a PostScript file in a way that is consistent with a typewriter. This means, of course, the use of Courier (for now), and requiring a predefined paper size as well as font size. The program merrily dumps each line from the input stream to the output stream subjected to the ``physical'' constraints of the defined paper and font size. The outcome is a barebones PostScript file that can be sent into a post-processor to convert into a PDF or some other format.

It doesn't handle the typesetting of the page, or even the enforcement of line wrapping for the current trend of ``single-line paragraphs'' like this blog post. We have other programs for that (think fmt and par) for now---I will be rewriting some of these for my own needs later on.

One big beef is the lack of handling of Unicode, which I will look into once I can figure out how to get a pan-unicode monospace font to work with PostScript (yes, I am looking at GNU Unifont for this).

We'll see how it goes.

On another note, here's an example output of this blog post using the tool and some pre and post processing chains:



Till next time.

Edit: Adjusted to provide the PDF version on click.

Wednesday, October 01, 2014

Keyboard Adventures

Time for more asinine writing. If this isn't your sort of thing, I suppose it is a hint to move on with life and wait for the next non-whiney post.

Still here? Cool.

I'm just looking for an excuse to exercise the new Happy Hacking Keyboard Professional 2 that I ordered from EliteKeyboards (see link). It seems like an exercise in excess, considering that I already have the HHKB2 Lite version, but the need to use up the SGD600 worth of ``Flexi'' benefits was the main force behind the choice of purchase. And by a strange coincidence, the one day before the delivery was supposed to be done at my place, my HHKB2 Lite mysteriously decided to suicide. The hardware could not be detected by the machines that it was connected to, and it was frustrating and confusing for a while. In the end, I had to break out the potato keyboard that came with my workstation, the flimsy-feeling Dell keyboard that was still mint in box. Typing with that potato was harrowing, and I was glad that I had brought along Edythe-II to do most of the typing on with regards to the work that I was doing---I will talk about that in a bit.

That the HHKB2 Lite suicided was an excuse on its own to take it apart for a much needed washing. The keys and the tray itself had accumulated nearly five years worth of skin flakes, hair and what not, and it felt more hygenic to send them all through the wash while I was taking apart the keyboard itself in an attempt to figure out what was the reason for its inoperability. From what I can tell, it seems that the controller card was not broken---it was more likely that there's a short in the USB cable that was set up to connect the keyboard controller to the computer itself. I stripped the cable out, and now I will need to get hold of a multimeter and other electronic/electrical tools to confirm my suspicions. If proven correct, perhaps I can resurrect the HHKB2 Lite by rewiring the connector cable.

My experience with Edythe-II has been quite interesting lately. As you may already know, Edythe-II's native screen resolution is 2560×1440 over a 16:9 screen 13.3" large. That's a pretty high PPI right there (I'm too lazy to do the math to find out just how much it is, but I think a back-of-the-envelope calculation yielded something to the order of 220+ PPI). I hadn't been using her at the native resolution thus far---something about the Windows 8.1 ability of ``rescaling'' the font size and what not that ended with the display being used at what was effectively 2048×1152. I had tried the native resolution on the get go, but I think my eyes hadn't figured out how to focus on it yet, and the rescaled resolution was more comfortable.

Until recently that is.

Now I operate at the native resolution, and holy cow it's awesome. Four 78+ columns of text windows for coding on a screen that is no larger than an A4 piece of paper---actual bliss. That alone though was not the only reason why operating at the native resolution was a good thing.

You see, I have discovered a couple of Windows keyboard shortcuts that had changed the way I operate the machines forever.

The new shortcuts that I discovered were the Windows + Left Arrow, Windows + Right Arrow and Windows + Up Arrow commands. Windows + Left/Right Arrow will automatically resize the window to take up the entire height and half the screen width, either left or right, while Windows + Up Arrow will maximise the window. This means that in a crude way, there is an easy means of performing tiling with Windows. This also means that I don't have to fiddle with the mouse to adjust the actual size of the windows when I want to code and refer to the documentation at the same time. Combining this with the X-Windows style mouse of achieving focus by hovering instead of clicking meant that my overall operability of the Windows operating system just shot through the roof.

Alright, I am done with the simple stuff that I want to write. Going to post this up and carry on with work once again.

Till the next update.