## 2013-02-23

### Coffee tasting

Cafe at DU. Java bean double ristretto: nutty and a bit herbal, like anise; but also it's bitter, and metallic, sour towards the end. I suspect an uneven tamp; but really, I'm a bit too noob to tell. Pastry's been sitting on the counter a bit too long. Also, the dough seems to have been rolled too hard.

Just learnt about GHC as a library. Duh. Should have read more on this, earlier. So I guess I'm not far from having no excuse to pick up the GHC Core dialect. #ohgawd

On Freenode:

Hi! Has anyone used System.IO to run "runghc" and to get dynamic results at run time? Just curious. (I mean, you could have a .hs script that compiles another .hs script, saves the file, runs runghc on it, then take the printout from stdout back into the parent process.)

And I get this very helpful response:
[13:23] @google hint haskell [13:23] http://hackage.haskell.org/package/hint

ghc -e "haskell code"
Progress is good in the last few hours before I attempt to head back to an easy sleep.

### Car stats

My 1996 Kancil 654cc auto: 1.9 years owned; 22,000 km (33km/day) travelled; total costing about 25 MYR/day and dropping.

### Endless

For the last eight years I've focused on small, meaningful, studies, and mostly avoided projects that yield quick results. The next ten will probably be the same.

Coding software is sculpture. It's n-dimensional, touchy feely, goal oriented, and endless. Just like love, sex, and corporate finance.

Going to postpone sleep again.

Laundry. Poached egg experiment. Toast on the flame. Apples. Bach. Loud. This is how we roll...

INCOMING . ### Dumping Hamlet Righto. This library and its dependence on Template Haskell are getting a bit too complicated for a noob/minimalist like me to tolerate. I must be quite the idiot, but I can't even figure out where in the source code the [(Text,Text)] parameter of Render a is defined. If I want to use the minimum subset of Haskellian dialects to get this simple web framework done, I should attempt at this point to do it without Hamlet. Let's see how far I can go. (Moreover, if I want to do compile-time trickery, I'm going to try and get it done via a build-system that spits out fairly transparent, noob-readable, Haskell scripts.) Lunch time. 4am bike ride. A little cardio. And I found a third 24-hour mamak in this township. The clean start to this project is going well, so far. Bed time. ## 2013-02-22 ### Still on standby Rise and shine, motherfuckers. One strives to be... productive. Must separate more design and implementation. Two little apples to break the fast. Breast of chicken, defrosting in the sink. Ceylon tea. Not too dark. Men, and their roving eyes. What about tastes? Pitching our partnership to foodies. We need some on board, soon. Let's read more coffee history. Hacking Haskell. Pondering scope. Going to push the limits of dynamic Haskell to see how this goes... #whereDidIPutMyPoisonPill Erlang vs. Haskell - one little thing I miss about Erlang: ATOMS. GHC is doing weird things to my code. :( Still can't make it through a blog post accounting the political dynamics of various large commercial deals. #malaysia #duh Not sure if I feel dumber now because last year was full of dumbassery, or if last year was full of dumbassery because I was a dumbass. When the compiler starts to insert entities into mystery lists... it's time to take a nap. Break time. Bored and in pain from hobbies. Work is on standby, so not providing any distractions. Typical. The only value I seem to appreciate from my parents, is iconoclasm. Without a cohort of any meaningful sort, but still too close to the rabble. Need to distance myself from the rabble, cohort, or not. The sound of machinery outside is really distracting. It makes me miss playing with heavy machinery. Orgelbuchlein to calm the soul. This is like popping pills just to figure out which one will work. -_- Momentarily disgusted by the mewling pedants. What can one do but leave them be to their... sentiments. We are all mewling pedants. 2011 and 2012 were really bad years for me. But I guess in a little while, I'll be able to be glad that I survived. lol Am I trying too hard? I still think, I am not trying hard enough. One thing's for sure, the strategic investment with lowest ROI, has been the dilution of my thoughts with intellectual peonary. The absence of routine for two years probably killed my thought processes. My hobbies are traumatic; routine work helps to bring balance. Thoughts on mechanical R&D are interrupted every 15 seconds by the delicious sound of the angle-grinder across the street. Giving up. (Turns out, it's the gas release value at the shit sink.) So much for programming, this first half of the day. Retreating to the chore of that horribly non-linear history book on coffee. Didn't get very far with reading. Maybe it's lunch, and the lack of caffeine. Bloody desk jobs. Drugging up! #badCoffee Vocal trance hits the spot. ### Break time Wondering how many other people in Malaysia actually study Haskell programming. Ran Siege again localhost, "hello world" vs "dynamic routing hello world", 1000 concurrent connections, the latter resulted in just a few percent fewer transactions per second. I am moderately pleased, while acknowledging that is a trivial achievement. Now let's see how much else I can do with this web framework. Orgelbuchlein at 4am. I can't believe it's Friday. ## 2013-02-21 ### Occupy contribution I was just told that an old video camera that I donated to OccuyDataran was quite useful. Footage from it was used in court, apparently - who knows, to what end. Cool. ## 2013-02-20 ### Slow studies Studying an unfamiliar, complicated, system... while standing by to take emergency calls for other work... essentially comes down to sitting at a desk all day, opening eyes to read briefly, then closing them when thoughts cease to follow. It's kinda like an extended nap. Risk-taking opportunities are curbed. Coffee. Feeling old and stupid. And bored. Very bored. I'm missing something. I've been looking at the same code for a few days now. No clean abstractions. On standby at work. Killing time with hobbies, and my head hurts. One of the rare times where I'm slow enough to miss the woman I love. A little progress, post-reflection on how to navigate the Haskellian namespacing terrera. Doing disgustingly hackery scaffolding. Ah, I see now, it is static typing which I am tripping over. Muscles tight from too much caffeine, and too little exercise. Wondering if I should give up on studying Haskell. Not improving quickly. My coding instincts have gone to sleep, and my business instincts are waiting for a meeting. #HELP #SOUNPRODUCTIVE Feeling so much the dumb asshat today. Even discovering a "dynamic" type in a statically typed language (Haskell) seems mindblowing. Funny how I wouldn't bother with either computer programming, or commerce, if they didn't help me get more math done. Do they, really? (After getting dynamic URL routing to work with Data.Dynamic.) Sweet. Now that I've figured out that programming problem, I'd even make time to fuck a girl. #priorities ### Teleology Art (and science as a subset) differ from engineering (and business as a subset), by optimising for other than a specific goal. I am just up to the gills with businessfolk who tell me... "you're interested in math? we do math here! you'll have fun!" Fuck off... bunch of posers. So every so often I run into someone who tries to sell me a job by saying "here, we combine art, and science," - THEY HAVE NEITHER. So fucking tired of all this folly. Comforting myself by focusing on the work at hand. ### Sleep quota I can do 8 hr/day for office / business work, less for manual labour - but for art/science, only 10 will do:P Benchpresses and pullups. A little exercise is good for the soul. ### Template Haskell Digging in. Further down the rabbit hole. ASTs. Right, a different syntax than the language, Haskell, itself, somewhat. I am beginning to see why some people have issues with Template Haskell. Wish I had time to understand this fully. The compilation output is in a different dialect - this means effectively having to learn another dialect just to metaprogram in this one. Crap. Beginning to have second thoughts about the usefulness of this. There must be a way to compile to user-level Haskell, at compile-time. Fuck this shit, I don't want to program in non-user-level Haskell, so I'm just going to toy with the dangers of writing a Haskell script that generates another Haskell script, etc. The whole point of learning a high level scripting language is to have simpler language, damn it. Getting some useful conversations about this off the Freenode channel. Overall, I'm not satisfied with my understanding of Haskell, let alone the lower level ASTs / GHC bytecodes. Haskell headache. At least this quarter, I don't have to worry about losing a girl, or losing half my life savings, while studying this. Haha. Figured out Builders. Sorta. My 2008 Microsoft mouse has finally expired. Not bad 5-year averages on these things. Web development framework design again. Pen and paper. Starting with the obvious noobish path of using Show and Read to convert between strings and source code. Making decent progress on massaging the MVC control flow, for a web framework in Haskell. Chill day. Staying aligned with priorities. Work first, hobbies second. Hobbies are giving me a headache, though. Actually, more like a brain freeze. Recalling a pattern that I used in an Erlang web framework. Ah, yes. From CakePHP. The controller should return control to a renderer. Breaktime. Learning the limit of module/interface import/export flexibility in Haskell. Bed time again. Toast and coffee - maillard reactions all the way. All I want is for my grasp of Haskell to equal my grasp of Erlang. That's all... About to attempt an OOPesque encapsulation of library functions. I hope this doesn't go awry. Codefu is hard today. :( Rest. Then more practice. Plumbing, plumbing, plumbing. Named fields in Haskell data constructors: just sugar - so I need to pass the data type definition around somehow, perhaps via a commonly imported library. Sticking to strategy of using simple data types. Avoiding Data.Map until I run out of options. Ok. Passing a single library around (using symlinks, because it's hard to call a library file from a parent directory). But now I have much boilerplate. Hmm. So much for encapsulation. I shouldn't need to invent a DSL... or is that just the Haskellian way. Time, perhaps, to read up on packaging things with .cabal files. It seems hard to do MVC-style separation of concerns, inversion of control etc, in Haskell. Maybe I am missing something. Something about the mechanism for variable interpolation in Hamlet irks me. If variables to-be-interpolated need to be top-level-entities in the same module as the function containing the hamlet, then... this seems to mean that I need one module per ACTION, not per controller, just to enable proper encapsulation. :-S Okkkie... I might have figured out that we can meet Hamlet's variable scoping requirements by rendering views in do notation. So the scope is contained very closely, while variables don't have to be in a module of their own. Maybe I'm just slow at learning this :( Almost certainly, actually. On to try Data.Dynamic, and to relook Typeable. HOLY SHIT, dynamic URL routing in Haskell... it works! #thatFuckingTookAWhile #dataDotDynamic So much for Template Haskell. But I might end up having to use it to reduce boilerplate anyway. Maybe not. We'll see. ## 2013-02-19 ### Trauma Trauma for you is meeting your ex. For me, meeting the languages they speak in, to our machines. Perhaps I'm just a sucker for pain. All evil begins with boredom. The top learning last year, was don't entertain anyone just for the sake of doing so. Not even my mother. Bullfrogs out in full force, after the rain. River flowing merrily by streetlight. Football is played loudly at the shop below. Cheers. Listening to people with IQ level X, discuss people with IQ level (Y, where Y < X), as a separate class of people; is often amusing or sick. (Listening to a podcast on rape, intellectual disability, consent, and legislature.) otakku, oh otakku, kenape kau sakit? ### Protective pedagogy Whenever I'm learning a new Framework and docs say, ".. don't worry about X, Framework will automatically create X for you..." FUCK YOU. Do these documentors think that my fleshy memory is outfitted with unlimited callbacks? This is precisely the reason I eschew classrooms... because my hit rate for instructors who teach like this is very high. ### Happstack? Is it just me, or is the Happstack documentation a hellavulot more transparent than the Yesod documentation? Ok - given that I don't really need a production-quality web application, I guess I should just vacate my head of all these advanced engineering frameworks, and just focus on minimal work in WAI. :( I've spent too much of my life in web development already. Maybe. This probably means that I'm going to end up with a minimal crappy web framework of my own. :( :( Meanwhile - trying to figure out how to prettify the use of pattern guard syntax. Shiat... it works. Figured out Hamlet in external files via Template Haskell wtf ; just realised that quasi-quotation and Template Haskell are two different features #godamisuckathis Right. So, I should be able to write a TH macro to suck in all the .hamlet files in a directory. Let's try that first. (Ending up figuring out variable interpolation first.) (And, widget interpolation.) (Gradually figuring out how many extraneous entities there are to getting things done. Might want to write a wrapper for them, but that would make things slower, just a bit, wouldn't it?) (Figured out how to get dynamic URLs.) (Still haven't done the original task of a directory crawl, but I have more information about what to do once I get to the directory crawl.) Ok - I know how to do a bunch of stuff with Haskell's Hamlet now. Ho hum. If I was freer with my time, I'd do a Harlem Shake with fifteen copies of myself... :P Post lunch. Next: to figure out how to use the new Conduits instead of the old Lazy ByteStrings. Revising function composition. Great. Successfully ditched Lazy ByteStrings in favour of Builders. PS. It's raining in Sungai Long. Digging into Template Haskell. ### Nightlife Not the most productive day. A droll day. Lunch soon. Half a book of history, to go! Coke and crullers for breakfast. Ew. 1936. Exploring the nightlife of... Balakong... on a Monday night. Balakong, dead. Proceeded to the Mines, dead. Returned to chinktown. More middling espresso. Rain pours down in chinktown. Kinda cute: Gangnam Style's ass-ogling crescendo makes most males in this cafe turning to look at two chicks in the corner. #psycho Wondering how much nasi kandar I can eat before I get sick of it and go back to cooking. ## 2013-02-18 ### Business abstractions A blight to the pursuit of the most abstract learnings: employers with short-term business objectives, who claim to offer opportunities in this or that abstract field. I would not intentionally work with Internet marketers, only to study the axioms of consciousness. Nor would I work with business intelligence professionals, only to question the notation of statistics. What are the chances that any of these parties is interested in more knowledge than can be quickly translated to the top- or bottom-lines? To call some of these claim pretentious would be incorrect: "we have PhDs who can help you to learn what you are interested in learning," "we have a job that combines linguistics and math within the domain of your interests." These claims are simply obtuse. Let marketers focus on marketing insights, and let business intelligence focus on business results. As far as it pays, I will work. As far as I seek to understand fields outside of a company's core competency, I would rather not pretend to be satisfied by the frivolity of functional servitude. Geez. All that being said, I may simply be a pathological idiophobe. ### Rock it? Word on the street is, Rocket Internet's still hiring in Malaysia... but the hiring managers are cagey. Hehe. I remember interviewing there last year... it was a disaster, and I got offered half my asking rate at the time. There were these two founders who had obviously dropped out of MBB who were popping silly questions like the Gauss-1-to-100, which I knew the answer to not because I am into math, but because these were textbook entry-level analyst questions for the IB/MC route. LOL *grabs popcorn* whose lunch goes next? ### Iffy nonsense More iffy nonsense removed from my calendar. Great. It was a tripartite meeting with no set topic, outside of a vague possibility that I would be able to supply the human resource for a role in a startup company of unspecified business model, run by Internet marketers. The organiser finally locked down a date for lunch, presumably to talk shop, after weeks of faffing about meeting up. Then the organiser cancelled after a vacation, upon hearing that I was already busy with other work. Drat - I was hoping for at least an informative discussion. Now it just feels like I've played ping-pong with emails and shuffled up my calendar for no reward whatsoever. What a waste of time. The organiser was confused, that I seemed to be interested in the industry, but that I was unwilling to take on any challenges. I said, Jobs are just jobs to me. They pay the bills for my hobbies - language design and math. That being said, I usually become very good at any job that I take. We simply have not been available at the right times for each other. I do not find it more complicated than that... I will cancel the lunch appointment in my calendar. Feel free to get in touch for chit-chat - but if you're not into that sort of thing, nevermind - I was under the impression that lunch with X was just chit-chat anyway, since no details of the topic had been divulged. The organiser agreed that this might have been the point of confusion, and suggested that I find a venue to combine my employment and hobbies. I said, I actually am finding that it is easier to go to work in the arts, and to go home to hobbies in science. Commercialisation of my interests typically means that I have to compromise breadth of study, for client/employer requirements which are usually more focused on a business objective - my own studies are not focused on short-term business objectives. Also, because my hobbies are rather desk-bound, I am finding it more attractive at this time to have a job that requires manual labour. That being said, I have always been open to taking desk-bound, business roles, in the area of my hobbies... so long as the price is right. :) Good luck finding people who are both available, and affordable for all your projects! I do think that timing is often a matter of luck. ### Bach Going to start a brief study of Bach's works. Found free downloads for much of it. I must have covered a bit of this in Music Hell - the introduction to world music, all-day, 5-week course that I had to do as preparation for the music major in college. (I switched majors soon after, figuring that this was one of those fields that I could study on my own at a future point.) Let us begin with the organ works. ### Highly privileged In a meditative mood, after a day of house work, computer programming, and reading about coffee for work. I ponder my recent trading venture, and the ability to have staked two years' wages in exchange for the minimum return of the experience of having lost two years wages in a commercial venture. A conscious decision, I have hoped that it will give me an accelerated sense of urgency, and increase my sensitivity to the value of cash. Now, I am only worried that even that which has been paid, will prove insufficient to give me an interest in commerce. I hope that my worries are for naught, and that my commercial appetite grows robustly. But really, life still bores me. Meanwhile, I try to make the most of it. Read a third of a book on the history of coffee. Not the most polished prose, but certainly, *historyesque*. LOL. Almost 6am. Bedtime is soon. I have been drinking tea and reading for work, while downloading legal Bach. The sky lightens up, as the mountains for miles around are dampened by a mist. Some men just want to watch the world burn. And when they tire of watching it burn, they build it up, so that they can burn it again. ## 2013-02-17 ### Ninja Math and coding are tools for my hobbies; nowadays they call programmers rockstars... poyo betul... (these coders have no idea what rockstars --realllly-- do :P) Frankly, I find it hard to apply for jobs where "rockstar" is in the job description. #lebihPoyoDariPoyo Oh, my friend just reminded me on Facebook. NINJA... that's another word for programmers these days. LOL. NINJA!!! "Rockstar coders," the star does not manage admiration from his colleagues; rather, the star manages admiration from his machines. BTW - this isn't exclusive to programmers - I've heard them bandy this "rockstar," terminology around in the vainglorious halls of marketing... ;) and it probably happens in IB too. ### Melalang "Malaysian Insider: Dr M prefers government censorship to alternative media: KUALA LUMPUR, Feb 17" Dr M prefers.... HOW IS THIS NEWS?!? #whatDecadeDidYouGrowUpIn It's like 1987 all over again - 25 #%^&*( years of this... MI must be targeting ignorant millennials.

Fuck all you fools who need to take a stand on issues ;)

### Hamlet

Oh. Shit. I'm using raw Hamlet, not Yesod. Should have upgraded the Hamlet module instead.

S-expressions aren't what they sound like. #fuckMachina

Something just doesn't seem clean... about the way Yesod.Hamlet and Text.Hamlet have different APIs. :(

Ok - so Yesod.Hamlet just wraps Text.Hamlet...

Cleaning up dependencies.

Where did the term "Oxford brackets," come from?

Cleaning up "import," statements.

Being reminded to prefer eta-reduction over eta-expansion.

I seem to have forgotten what little I knew about how monadic lifting works. Fucking noisy chinks and their fireworks... guy can't get some peace and quiet for work around here... :P RAGE AGAINST THE FIREWORKS :( not easy trying to study strange languages WHEN THE BOMBS ARE GOING OFF... in the background....

Code runs, but can't get debug out of the realm of monadic expressions. Sigh. A worthy challenge. Hope I figure it out by this year.

Ok. Made a little progress. WAI-only code is about as clean as I care for it to be. Now to dive into Yesod, I guess. Feeling old and stupid, and... leaning into the end of a wasted life.

Moving coding exercises out of short-term memory, into longer-term spaces. Clearing space for other work. Reading? Not feeling gutsy enough to attempt poached eggs, but I will soon. Gonna act like the dumbfuck salaryman that I am, and eat out because I'm lazy. Mari mamak...

hokkien, hakka, fakka, I don't care what you are... go to sleep already!

I am the listless and the bored. Likely looking at months before there'll be any manual work to do. Must keep mind active via hobbies. After a meal, I resume reading for work.

### Melon

I had a quarter watermelon for breakfast. Fruit after days of eating out... makes me happy. Probably just acidity washing out the leftover taste of gunk.

Meat is defrosting in the sink. Laundry is swirling in the washer.