Saturday, December 31, 2022

Get Off Yer Damn Phone When Yer Talkin' With Me, You Cretin!

The last day of the year in this time zone---let's write some thing, and no, it will not be a retrospective, as retrospectives are usually reserved for the quick summary posts that I do some time on/after the first day of the new year.

It'll be a good old fashioned rant.

So there's a group of people that I really dislike---the ``I am stuck to a phone'' type of people. They may be articulate, they may be pleasant, but when they aren't talking, they seem to plaster their faces onto the screens of their smartphones, doing God knows what ``important'' thing.

Friend, whatever's on the phone can usually wait. I am here, I am now, and I am here, now. Talk to me, communicate with me damnit, not stare at your God-damned phone for Christ's sake.

If the phone rings, sure it is urgent; go for it, with an apologetic grin---this I understand. When the phone buzzes, maybe a quick check; not a faux pas if it occurs infrequently in our encounter.

Flipping through the phone when it was doing absolutely nothing, that disrespects the me who has come out to meet up with you. Seriously.

``Don't worry, I can multi-task'' doesn't cut it because while you think you can multi-task, the reality of it all is that we are generally conditioned to handle active thinking in a serial manner. Perhaps if we did not think in words in our heads that such multi-tasking is possible, but I sincerely do not believe this to be true for the vast majority of people.

It angers me a great deal because of the blatant disrespect of the other party who took the time to come out. Recall once more that time is the most expensive resource that one can make use of, for once that second is gone, it is gone, and no amount of conversion to and fro money can replace it. If there were any substitution used, it would at best be an imperfect one, since time is not exactly fungible---that day you missed when you were five years old means something significantly different from the day that you just missed some thirty years later.

``MT, why are you so butthurt about all these? Live with the times man!''

No, fuck you. An advancement in technology (i.e. improving/providing the ability to do something) is not equivalent to an advancement in our social behaviours (i.e. deciding if an action/ability ought to be used given a context). Just because it can be done doesn't imply that it ought to be done [given a context].

Recast into our current terms, it means that just because the smartphone makes it easy to connect to external information sources does not mean that one should be doing that all the time.

As for why I am ``butthurt'', it's because I have seen one too many of such behaviours just within this year alone. It makes me sad; me, a misanthrope, realising that somehow I was the least misanthropic person among those who claim to be more of a ``people-person'', all because of this anti-social behaviour of frequently digging into one's smartphone while still being in the presence of others.

Anyway, that's the rant for now. Till the next update.

Sunday, December 18, 2022

Slow Entry

Okay, we're in the end stretch for 2022. What better thing to do than to write something here now?

It's been one interesting ride for the past two weeks. My team had been a cosy small number of full-timers until our numbers suddenly swelled up by fifty percent due to the new staff finally coming in.

I'm excited at what we can achieve. I'm fearful of the mis-steps I might take being their leader.

Moving on, I've been reading The Science of Nutrition (4th Edition) by Janice L. Thompson, Melinda M. Manore, & Linda A. Vaughan, and a thought came to me.

Just what is the power rating of an ``average'' human?

Using the 2000 kcal per day requirement, that's about 8.368 MJ (1 kcal being equivalent to 4.184 kJ). A day has 86.4 ks, so the average power of a human (assuming no nett change in mass) is around... 96.9 W. Combining this terrible estimate against the around 20% of energy use of brain (as seen from the table in this Wikipedia entry), we're looking at a crude estimate of 19.4 W for thinking, on average.

What does it mean? No idea. Just a random thought.

I have been mulling over getting a Kindle Paperwhite Signature Edition (32 GB) for the next iteration of the Eirian series of e-ink readers, mostly because Eirian-IV has been with me since January 2016, nearly seven years. But Eirian-IV is still generally in good operating form, battery-wise. I'm still running close to the 4 GB space limit, but it is not that big a problem for the most part.

Ah well.

Anyway, it's a short entry. I lost a lot of momentum while writing this---it is getting a bit late, and I really ought to go turn in earlier.

Till the next update then.

Monday, November 28, 2022

4 Busy Day(s)

And so concludes another 4-day long weekend that is completely of my own devising through strategic deployment of paid time off on a Friday and a Monday.

What did I do over these four days?

Frankly, nothing much, which is completely as intended.

Looking back, I...
  • Finished the third and final volume of The Complete Calvin and Hobbes series;
  • Caught up on Hololive/Holostars EN folks;
  • Chat with Brian and Wangki for a bit;
  • Restarted rehearsals for TGCO;
  • Restocked my medication;
  • Ate a nice unagi meal at 鰻満;
  • Tried the new tater-tots at McDonald's;
  • Had century egg lean meat porridge from Sin Heng Kee Porridge;
  • Bought a 70 cL bottle of Nikka Black Clear Whisky from Don Don Donki;
  • Started to get used to playing concert G-major on my alto saxophone;
  • Took said saxophone to WindWorks to fix a cork bumper that fell off near the G♯-key;
  • Wrote a PDF generator that combined the NKJV summaries that I typed out with the ESV text into a single easy-to-refer-to 2-column compendium using my favourite Atkinson Hyperlegible font all typeset with LaTeX;
  • Started laying out the foundation of the central castle within the walls of my Minecraft single player world;
  • Tried out the Silent in Slay the Spire; and
  • Curated a small part of my reading list.
It's definitely not a lot, but it is fulfilling in many ways.

The realisation that Calvin and Hobbes had its run ended about 3 years before I first heard of it in secondary school came as a shock. But then again, it did have a great run since 1985, and the whole late 80s to mid 90s feel was very strong and nostalgic in it. It ended at roughly the time when the Internet (that's with the capital `I') was starting to become a big thing, and I suppose it was just about right. I cannot think of how Calvin and Hobbes might succeed with its original formula with an increasing base of children and young adults who never really understood what it meant to have a childhood that did not involve electronic devices more personalised than the family television.

In fact, I would say that Hobbes would probably be forgotten rather quickly when the Calvin-equivalent had his first net-enabled phone/tablet. The story would have gone a completely different way, and it may not even be good, for much of the fun of Calvin and Hobbes lies in the ironic observations of a smart but isolated six-year-old with his tiger who may or may not be a figment of his imagination (there had always been evidence that worked either way). I wonder if Watterson stopped when he did when he realised what I have now realised, more than twenty years on.

The new whisky (notice the lack of an `e'---this is deliberate because that's why Nikka calls it) is deceptively smooth. It lacked the rough edges of the Suntory that I grabbed from the nearly 7-eleven that demanded it drunk on the rocks. It reminded me much of a VSOP, or even XO. An interesting whisky indeed. While researching for the proper URL to reference the whisky, I learnt that many Japanese distilleries have discontinued some of their longer aged whiskeys because of too much demand---the new batches of the old stuff seem to be coming out only from 2030 onwards.

I suppose that is something to look forward to?

Anyway, that's all for the planned breaks for now. The next one is on Dec 30---not sure why I took it because I'm too lazy to pull up the calendar, but I suppose it is just to have another 4-day long weekend?

That's about it for now. Till the next update then.

Friday, November 25, 2022

Dig It All Realisation---Done!

Ah... I've not seen the interior of Q10 for 3 days---the last time I used Q10 was to fill in the last 2.8k to my NaNoWriMo entry for 2022. Weighing in at 50127 words, Dig It All Realisation is a play on a break down of the word ``digitalisation''. Now, this should not be confused with ``digitisation''.

If we use what SAP says, the gist of their definitions can be understood as thus:
digitisation
Process of converting analogue data into digital form.
digitalisation
The processing of digitised using advanced information technologies to improve/change fundamental processes.
Hence the title break down of dig ([data] mining), it (quantification, i.e. making everything into an object, an ``it''), all (everything), and realisation (the combination of all the steps leading to a system).

And that's the basic story line behind this year's entry.

I would rate this year's attempt as being average---there was no point in time where I was particularly inspired to sprint harder than the usual 2k words per day, nor did it got so difficult that I could not come up with enough words to cover the day. A nice difficulty curve.

That's all I want to write about this on this off-day I took leave for no other reason than to have an off day. I've put it on my personal domain, so download and read it if you'd like.

Till the next update.

Sunday, November 20, 2022

Mini Stupid O'Clock

O-kay, let's write a little something here that isn't NaNoWriMo.

I had wanted to write a spiel on ``Does the end justify the means?'' but my brain is starting to get woozy from the anti-histamines, so I need to change tact.

Welcome to pre-stupid o'clock, I suppose.

Last time I wrote here, we were talking about bad coping mechanisms, bad skin, and other bad thoughts.

You would be horribly deluded to believe that after two weeks, things have changed.

Skin is still bad, coping mechanisms are still bad (I'm still picking away at said skin... urgh), and thoughts are also still bad (not the point of suicidal, but definitely not in a completely ``safe'' positive space).

What happened?

Life... life happened. Not a specific grumble, just a general observation. In many other ways, I live a blessed life, but like all things involving life, what we gain in blessings in one area of life, we trade-off with something less blessed in this life.

Why? Because fuck you, that's why. Theologically, it's because God is in complete control, and being in complete control while also un-knowable means that while we may observe such inequities or even inequalities, we can never really judge if the observations are a net good or net bad, leastways not at the same time scales that God sees.

So putting it in the extreme case, to be dead on earth is probably a bad thing for most of us, while it is actually a good thing from God's perspective, especially if we have reconciled our relationship with Him---no more flesh body for you to sin in.

If we can define some state function per person that returns a real number measuring the amount of blessedness after taking in the current state of the person, then we can characterise a few interesting observations:
  1. People tend to live peak to peak---they either remember most of the good stuff, most of the bad stuff, or more commonly, a mixture of the good stuff and bad stuff. Most people do not remember anything else that are not extrema in this function.
  2. A cultish superstition occurs whenever these people start approaching an extrema---they will either keep some ritualistic activities to either bring in the good omens or to ward off the ill ones, or start slinging praises or condemnation at whichever god is to their fancy.
  3. In expanding upon the cultish superstition, this is more related to the fact that people believe that whatever they do strongly influences the amount of blessedness or dastardliness, which is a roundabout way of saying ``justification by works, not faith''.
Now I'm not saying that we just lie down and let things happen because ``God is in control''---I'm saying that because we have free will, we should exercise whatever we can within our locus of control, but be ready to accept that there are interdependencies and other related things completely outside of our control.

The sooner one realises that, I suppose the better it is for one's mood.

Anyway, I'm less than 10k-words away from this year's NaNoWriMo entry. Insasmuch as I love NaNoWriMo, I feel that every story thus begun should end, and am looking forward to completing this novel by the end of the upcoming week. It'll be a soft grind, but it will be done. And then at that point, perhaps I will treat myself to some fancy sushi. Mmmm mmm!

And that's about it. A short entry. I can feel myself nodding off---it's time to go. Till the next update.

Monday, November 07, 2022

Compressed and Distressed

I know that writing here like this is wasted words, considering that it is NaNoWriMo now. But I suppose it is nice to write something not relating to work nor my NaNoWriMo entry ever so often.

The end of the year is fast coming upon us. Even as I write, we are already passed the first week (i.e. seven days) of the month, and by the end of this week, the first third would have been gone. And then December will arrive, and 2023 will begin it all anew again.

This upcoming season is much more compressed than usual. Work-wise, things are heating up in strange ways. We are trying to hire, so interview season is in. Some other stuff is also increasing in activity as folks are in a rush to expend the tranch of funding, and it impacts me through the quasi-official support of a tool that these folks use.

Then there's the actual holiday season. Christmas, New Year, and Chinese New Year are all happening within a tight 33-day window. Not to mention the loss of my birthday throughout the messed mass of holidays---perhaps it is the first (and only?) year that I ``age'' only twice in one year as opposed to thrice?

Perhaps that's why I am in some form of distress, and it does show. My skin's getting worse, obviously. I find myself scraping away at various parts of my skin almost compulsively to the point of breaking skin and what-not.

It's terrible.

With shit skin and even shittier coping mechanisms like that, the last thing I feel is that of being desirable, let alone to be desired. Perhaps at the end of the day, this is truly what will make me decide to commit towards a no-spouse route, as opposed to ``only'' a no-children route. Ain't wanna be in a relationship to be ``taken care of'' by someone else.

Also, it isn't easy to be ``loved'' by someone with such shitty skin. As they say, those who look attractive win at life, and those who don't need to make do with wealth or power. And since I have little of the two, it's better to just live through this life quietly and then move on.

A rant? A cry for help? You decide; or not---it matters little.

Till the next update.

Monday, October 24, 2022

Recalling the Last Four Days

As I write here, the day is ending.

A trite observation in some sense, but then again, this is one of two ``mandated'' long weekends for this year from my employer due to the addition of a gazetted break day to the government declared one.

So four days. Across these four days I...
  • Finished re-reading The Sandman;
  • Caught up on the latest for One-Punch Man manga adaptation;
  • Caught up on Komi Can't Communicate manga;
  • Completed A Hat in Time;
  • Completed version 1.0 of Vampire Survivors;
  • Replaced my 12-year-old mattress with a new one;
  • Finally started on The Complete Calvin and Hobbes: Book One (1985--1988);
  • Completed the perimeter wall shape for my castle project in Minecraft;
  • Hung out with some friends old and new playing games (Singapore Dream, Splendor, and Unstable Unicorns);
  • Finally picked up Aurelia to doodle on---I've been meaning to do so, but kept being distracted on other instruments like Eliana, and Mio;
  • Accidentally partook in the Deepavali lighting festivities out in Little India while on the last bus heading home (the police presence was heavy with deployed riot police command centres);
  • Continued with a summoning build that I started quite a long time ago in Grim Dawn; and
  • Catch up on some of the Hololive/Holostars EN folks.
It was definitely a feature-filled four days, coupled with generally adequate amounts of sleep (that is going to go awry when the work week begins anew).

Head is comfortably empty; I feel fairly relaxed. With that new mattress, there is definitely a break between before this four-day break, and the last quarter of the year.

Oh, and NaNoWriMo is coming up. I've a rough idea of my new novel, currently titled Dig It All Realisation. Still needs to have the draft structure set up though... which I think I will do some time later this week.

I think that's about it. It's a really short post as these posts go. Just wanted to make a note of it here so that perhaps some time in the future, I can look back on this date and summon up the memories that I didn't write in here.

Till the next update.

Saturday, October 22, 2022

lang-aware Domain

Yeah yeah, I know. No word from me for a while, and then suddenly two posts in quick order.

🤷‍♂️

I finished reading The Sandman series once again. The last time I read it was back nearly 10 years ago, from way back when. To say that The Sandman was influential to me is an understatement---I have previously written about how Death of the Endless is my handphone wallpaper, as evidenced from 2015, and once again in 2013. That was roughly when I started to fear less about Death and think of Death not necessarily as a cute goth chick, but as an inevitable old friend who will come visit in time to come.

Dream though, he's too bloody moody in his Morpheus aspect. Reading the CBRs in the full glory of my vertical monitor is a much different feel from reading it off the puny tablets and even punier phone.

But I didn't come here to write about reading The Sandman, and catching up on Komi Can't Communicate (till Chapter 376) and One-Punch Man (till Chapter 172), though they are tangentially related.

I recently updated the Unifont version from 13.0.04 to the more recent 15.0.01. While doing that, I observed that I was having a Variant Chinese character problem (this is where the tangential relatedness occurs).

First, have a look at this simulated screenshot (font used is Unifont):
Look carefully at the third CJK character after the punctuation parentheses in the second line for each (underlined in red).

Do you see a difference?

You should. The first one is the 素 glyph, rendered in in Chinese, and then later on, rendered in in Japanese. They are of the same Unicode codepoint---32032---but have different forms as determined solely by the context of the language that is used.

If you do not or cannot see a difference in what I wrote in this entry (as opposed to the screenshot), it is likely that you are viewing this on a set up that do not have the correct fallback fonts installed, leading to some strange glyph being rendered instead.

In any case, the screenshot shows the outcome of the quality of life improvement I did. In updating my hosted copy of Unifont, I also uploaded another version of Unifont that is tuned for Japanese text. I also replaced the TrueType format with the OpenType format where applicable, solely to transfer less bytes overall when these fallback versions of the fonts are used to handle combining character algorithms (about 4.8 MiB compared to around 15 MiB).

Now that the outcome is demonstrated, let me talk about what exactly I did.

I went through my entire website and added lang attributes to all text fragments that deviate from standard English. For each of the lang attributes used, I defined a list of fonts (most likely to appear on the Big 3 operating systems) and styles to best represent it. These included:
  • ``fonipa'' for International Phonetic Alphabet;
  • ``zh-Latn'' for the romanised pinyin (think dizi and the like);
  • ``zh'' for regular Chinese; and
  • ``ja'' for Japanese.
These language tags also allow anyone else who have different settings for rendering different languages (see this old rant about CJK font sizes).

I know that it is a short blurb of what I did, but it involved quite a bit of digging and updating through all the files. But all of these are worth it as it helps improve the readability of my personal domain.

And that's about all I want to talk about for this for now, I suppose.

Till the next update.

Thursday, October 20, 2022

Tension Headaches... Again

This week... was a bust.

I was hit with a nasty tension headache that was ameliorated only through a few days of mandated rest and orphenadrine-infused paracetamol from the doctor.

In addition, I was also hit with random bouts of low grade fever (the so-called febricula).

The combination of it all meant intense brain fog that made thinking hard to impossible.

I absolutely hate that. That's why as part of my own thought experiments, I think I'd rather euthanise myself when I eventually get diagnosed with dementia---I'd rather leave the mortal coil on my own terms while I am still mentally competent than to lose what is essentially me, leaving behind a husk of a body. But part of that difficulty is defining where the boundary of the point of no return should be---should it be at the moment where I am diagnosed as having dementia, or should it be when I realise that I am losing it, diagnosed or otherwise, or should it be left to the consensus of the people whom I interact with?

Each has its pros and cons, and I have not figured out the best strategy yet. Which is why there is still no page on my own domain that leaves behind explicit instructions on how to handle me when I am no longer competent. Whatever I may end up putting up needs to be sufficiently ironclad that no one can collude and harm me, while at the same time, not prolong my own suffering---a difficult trade-off.

Anyway, thanks to all that, this week is a bust. Thankfully there's yet another mandated ``wellness day'' thing that is a declared day-off on Friday, which when combined with Deepavali on Monday, leads to an excessively long four-day weekend.

Whatever shall I do with all that time?

Not completely sure. There are some partial plans that I am not at liberty to reveal here till perhaps after the fact, and apart from that, I don't have much else in mind.

Maybe restarting my more ``hard-core'' practising of flute/dizi. Or building more of my Minecraft castle. Or grind through the Son of Sparda difficulty of Devil May Cry 5, the ``true'' starting difficulty of the game.

Who knows?

This post is fairly short... just wanted to note that I'm still not dead yet, and that the days are still bloody hot and muggy.

Till the next update then.

Saturday, October 08, 2022

AI Art?

Ah, October, the oddly named tenth month of the year. Probably the month where the on-rush of inertia towards the end of this year and the start of the next is the strongest. After the last entry involving tiny fonts, I didn't really feel a need to say anything. Until now.

The recent release of DALL·E for unfettered public use combined with how an artist winning top honours at a fine arts competition with AI generated image has fanned flames of arguments for and against the recognition of AI generated images as art.

I won't list the arguments down here, but instead share my perspective on this and on related aspects of this in general.

See, scientific and technological progress leaves an indelible mark on the overall psyche of the human race. In many cases, the belief that something is possible has proven to be enough of an impetus to drive someone to make that belief a reality. If they can explain it, we get new science. If they can replicate it consistently, we get new technology. In that sense, the progress of science and technology cannot be halted.

In the case of having faster computational hardware, or the ability to make more money with less labour in the world of manufacturing and business, almost everyone is in agreement that such progress is beneficial. And the near optimism of the ingenuity of humanity to solve problems in the future (especially the problems that the solutions of today have created) creates this self-feeding and self-expanding loop of advancement.

Due to the generally dehumanised aspects of manufacturing, business, and computation, most people do not see a threat of sorts. There were once those who fought against the rise of the machines in industrialisation, but their fight was more about how the former labourers were ill-treated in the rise of higher productivity tools than how the tools were of higher productivity, despite their group (the ``Luddites'') being used these days to mean an opposition to industrialisation/automation.

So, why the brouhaha over AI generated images as art?

It's not just an issue about labour the way the original Luddites were fighting against (though I suspect that this will eventually become the real argument in time to come), but it seems to, at some level, impinge upon what some claim to be a quality of what is essentially human---art. ``Art'' is a loaded term, and with the post-modern movement being a thing, is even more loaded than ever before.

At the risk of oversimplification, ``art'' can be thought of as the outcome from the sum total of an expression of qualities that have not been adequately expressed/explained in a quantitative manner that permits a consistently deterministic and predictable outcome. You know, the thematic opposite of ``science''.

Art is older than science---we have been expressing/creating things long before we knew how to characterise, explain, and replicate them at scale. Despite all the new gadgets that we have created over time, art still exists, though to be fair, art has also evolved.

Evolved to make use of the newest gadgets to assist in the expression.

Finger painting was among the first forms of visual art. Then different pigments were discovered, and other media to use them were also created. Art evolved from depicting the past to depicting the future, from symbolisms of reality to abstractions to hyper-realism, from the still to the animated to full multimedia extravaganza---you name it, art has and will continue to explore it.

AI generated images is just another gadget that is created that incumbents have not gotten used to. After all, no one seems to bat an eyelid when the ``clone stamp'' is used in art, or even more dumbly, when three-point perspective is used---both of the cited examples are gadgets/technological tools that artists have accepted as part of their toolkit of expression.

AI generated images are going to be that, eventually. There is no running away from it, and I am sure that many artists know this.

But what they are angry about is the same as what the Luddites are angry about back in the day: the ill-treatment of the specialists of the art by the Johnny-come-lately wielders of the latest geegaw brashly proclaiming deceptively that they were also artists without acknowledging that their apparent powers came about through the use of a new high-productivity tool as opposed to walking the hard path that the specialists of old used to get to where they were.

Thus, it is about the deception that are ruffling the feathers of the naysayers against AI generated images as art, and not necessarily the AI itself. There are some arguments about how the AI model is somehow stealing intellectual property through amassing the images of artists to train from, but I do not see how this argument can be fought comfortably, considering that even the regular training of a human artist involves studying the artwork of other artists.

As someone from tech-land, I want to point out that the representation of something does not make it that something, i.e. ``a map is not the territory''. If the representation used in the AI model is a literal copy of the image, then there are strong grounds for how the AI model is truly a copying-plagiarist. However, if the representation used is an abstracted form of the image, then the argument is severely weakened---even in the case of human-land, when an artist is sued for copyright infringement through what is claimed to be a derivative work, the burden of proof for the actual copying aspect is subtle enough that a lawsuit in front of a judge is needed to sort it out, because factors other than the representation in the head of the allegedly infringing artist will come into play to determine culpability.

There may be strong arguments about attribution of the training data source images, especially if they are digital in nature, mostly because in the land of the discrete, a map of the territory is the cheapest when it can be a literal copy of the territory itself. For the confused, this means that if I want a ``map'' (i.e. representation) of the digital ``territory'' (say an image, or a video, or even a plain text document), it will cost me negligible amounts to simply copy bit-for-bit of the digital ``territory'' than to re-create a ``map'' of it (through transcoding for example).

Other than that though, it is probably best to dissuade deception by making it clear when a work is made from these AI tools, at least until their use are so ubiquitous that it seems a bit silly to do so (no one ever declares their use of three-point perspective for example).

And when will that be? Who knows... I've written a fairly long and rambling post, and it is time to head back into Minecraft to prepare the perimeter for my traditional stone brick castle.

Till the next update then.

Friday, September 23, 2022

Prototype 5×10 Font Arrives!

Ooo... buckle up. This is a sequel to Stupid O'Clock is the Font of Stupidity.

Our sequel begins where the math was grokked. To wit:
For those, I can bring the terminal screen to use the full extent of the 1920 horizontal pixels. Easy. And without going that far, Vim has no text decoration that eats up cells, which gives us the full 80 characters (I refuse to use line numbers on the side of the simple reason that the ruler in my status already shows the line number of the cursor). Zipf's Law suggests that very long lines are rare, and thus as long as I can find a font for my terminal emulator to handle about 161 characters for half the screen (math says that each character needs to have about 1920/2/161=5.962 pixels), I'm gold.
That 6×11 font that I put together is displayed here:
In comparison, this is the 6×10 font of Opti Small:
Thus, the last time we ended that post, it was decided that I would stick with Opti Small because I figured that interpreting the width of 5.962 pixels as 6 pixels was good enough to support the vertical split screen with the 80-character line length limit.

Well, after nearly a week of using that set up, the answer was a resounding no.

Even a simple vertical split would leave one screen be good at showing only 79 characters for some reason, and with the word-delimiter soft-wrapping option that I use in Vim, it made everything very misleading.

Thus I had to choose the next best width, that of 5 pixels. There were, unfortunately, some problems. I mentioned in my previous post that CG Mono had some problems. Specifically, this was what I said:
It was fine, but still looked a bit off because the `>' glyph was bogus---it lacked the crispness that came from bitmap fonts, and looked like some other font was chosen to render it instead.
More specifically, this is how CG Mono looks like when it is at 7pt (or 6×10):
Notice that weirdness in the `>' glyph---I didn't do anything. All the screenshots are directly taken from whatever was rendered in mintty.

The only font that I had lying around that had 5 pixels of width was CG Mono at 6pt (or 5×9):
See, the problem with this font is that the parts where it is used most often (i.e. the characters between 0x20 to 0x7f) have instances where they are smushed into each other in the bid to preserve some of the fine detail (like the tines in `M', `w', and the like). Compare this against the sample of Opti Small above---Opti Small is so much more readable with the enforced vertical pixel of spacing.

The only problem was that Opti Small was not 5 pixels wide---it was 6.

And so, I decided to take Opti Small as the starting point, and make my own 5×10 font.

Why 5×10 and not 5×9 like the one in CG Mono? It's about the verticality (108 lines versus 120 lines) with the overall need for spacing, and the reduction of the number of dimensions of downsampling I needed to worry about (I only needed to eliminate one column of pixels as opposed to one column and one row of pixels).

The general observation here is that while the Opti Small font has each character sitting in a 6×10 cell, the actual character is designed to keep within a 5×7 grid, not counting descenders and ascenders. This means that Opti Small actually has a rough 3-pixel of whitespace that separates each line. Comparatively, CG Mono at 6pt (or 5×9) had only a 2-pixel of whitespace that separates each line. It doesn't sound like much, but at these scales, that's a huge difference between quickly deciphering what the character is from developing a headache.

Thus my real task is to approximate a 4×7 character out of the 5×7 that Opti Small uses. It was mostly quite straightforward---I followed these rules of thumb that I came up with:
  • Eliminate the third column of pixels if possible;
  • If a key feature of the glyph requires pixels in the centre, offset it such that we eliminate pixels to the left of it;
  • When in doubt, eyeball and trust what the eyeball says.
That led to this current version of my cobbled-together 5×10 font:
The eagle-eyed might ask: how did I manage to do this so fast considering that I had mentioned that I was test running the set up for the week before deciding to change things up more?

More pertinently, how did I begin with a bitmap of Opti Small that was accurate and without excessive amounts of labour?

The answer lies in FontForge, and the use of the BitmapFont section of the SFD file format. I loaded the .FON file of Opti Small into FontForge, and exported an SFD file. Then I extracted out the BitmapFont section, and wrote a simple parser in Python3 that looked out for each BDFChar command before using base64.a85decode() to decode the bitmap string and write it out in a file format that was compatible with Simon Tatham's font tools.

From that generated file, it was just a straightforward exercise in adjusting it so that it becomes a 5×10 font that I built into a .FON file, giving the result as shown above.

There are some things I'm still unhappy with this new 5×10 font, but it is mostly to do with the characters of the range 0x80 to 0xff, ranges that I rarely use. I suppose I could iteratively refine them over time.

One other thing that I forgot to mention is that in the bid to keep the vertical columns of whitespace to make individual character recognition easier, I had to decide how I was to deal with the ``high contrast'' tines that appear in glyphs like `M', `W', and the like. Using my experience of working in the text editor of the Pico-8 Fantasy Console, I've learnt of/and gotten used to the rather tiny and stylised font of the Pico-8---the idea of using thicker lines to represent implicit high-contrast vertical lines was no longer abhorrent.

And now, with a font that is 5 pixels wide, my half-screen set up permits 1920/2/5=192 characters across. It's wonderful. The ample amount of unused pixels in both the horizontal and vertical directions made reading with such a font surprisingly comfortable and no less different from reading something in Opti Small.

Will I be releasing this 5×10 font? I'm not sure. Like I said, there are still things that I need to tweak and fix. In addition, the original author of Opti Small, Nicolas Botti, left behind a little confusing bit of copyright:
Copyright: Nicolas Botti 2004. Use it, distribute it, change it.
I'm no lawyer, so I don't know how best to interpret this. I suppose it is fairly safe to release the 5×10 font, but it'll be ``when it's done'', perhaps even when I figured out how to generate a version of the font that can be directly used in the Linux terminal emulator in the desktop GUI.

Anyway, that's all I have for today. Till the next update then.

Friday, September 16, 2022

Stupid O'Clock is the Font of Stupidity. Who'd Thunk?

Man, I slept at 0230hrs this morning and woke up at 0825hrs.

The reason is quite banal---I was creating my own 6×11 bitmap font for use in my terminal emulator when I realised that the one I was using had a bad render of the `>' glyph. What ate much of the time was trying to figure out why the blazes my terminal emulator (mintty for the curious---it's from Cygwin) was still rendering that font as 6×13 instead.

Spoiler alert: semi-hidden option of AutoLeading was screwing up the vertical pixel count. 🤦‍♂️ But more on that later.

I need to begin the story where it will make more sense. I had thought long and hard, and have decided to move away from my default maximum character width of 76 characters for source files to that of 80 characters instead, especially for Python.

The reasons were as follows:
  1. That missing 4 characters was enough to cause an unnecessary break for a line that would fit exactly within 80 characters;
  2. By Zipf's Law, most of the code lines aren't ever going to be that long anyway, which means that it was usually safe to keep it at 80 characters as opposed to 76;
  3. My old comment on needing the extra columns to allow the additional decoration for TUI editors hasn't been applicable for more than two decades now.
By ``additional decoration'', I mean the following (text editor is Multi-Edit Lite running in DOSBox-X, originally shareware from Multi-Edit Software, but the company seems dead as at time of writing):
Notice how line-drawing characters are used to define the borders of the text window, together with the old school representation of scroll bars and the like? Those take up character cells, and with a starting point of 80, the left and right window edges immediately take it down to 78 characters being the maximum amount of visible text without scrolling. The 76 was derived from the observation that if one reaches the end of the line through any regular cursor movement, it will often end up one character beyond the last character, which can trigger a horizontal scroll.

In short, it is annoying to use the full complement of 80 characters, and it was better to use something like 76.

But I'm using Vim now---I've been using Vim for a long time now. That shouldn't matter any more.

The only thing that can matter is the idea of vertical split screens, either from looking at differences between two files, or three in the event of a three-way merge.

For those, I can bring the terminal screen to use the full extent of the 1920 horizontal pixels. Easy. And without going that far, Vim has no text decoration that eats up cells, which gives us the full 80 characters (I refuse to use line numbers on the side of the simple reason that the ruler in my status already shows the line number of the cursor). Zipf's Law suggests that very long lines are rare, and thus as long as I can find a font for my terminal emulator to handle about 161 characters for half the screen (math says that each character needs to have about 1920/2/161=5.962 pixels), I'm gold.

Vaguely, this means a font that has about 6 pixels of width. My go-to of Proggyfonts (or more specifically, Opti Small is already 6 pixels wide, but thanks to some fuckery from mintty, it looked off to me. That, and I wanted something that yielded more than 161 characters at the half-screen mark to have more room for other niceties.

I then started looking into using CG Mono instead. It was fine, but still looked a bit off because the `>' glyph was bogus---it lacked the crispness that came from bitmap fonts, and looked like some other font was chosen to render it instead.

Why? I don't know. Looking at it through FontForge showed nothing out of the ordinary. The time was about 2300hrs or so. And that's when I went to Simon Tatham's Fonts Page to grab his scripts and samples to build my own 6×11 font to fix this issue.

I completed the font, but when I tested it, it was... very off. The vertical extent as compared through the gridded version of MSPaint showed that it was consistently 2 pixels larger than what was stated. I read through Simon's code to see if he was doing anything strange, and found nothing.

It was then that I decided to go read the fine manual of mintty, to see if there was something I was missing.

Oh yeah, I was missing something all right---the completely inaccessible via configuration screen option of AutoLeading. It defaulted to 2 for some damn reason, and there was no way to change it in the pop-up configuration menu. Mangling the associated .minttyrc file allowed me to set it to 0, and everything worked well once more.

At that point, I switched away from CG Mono and back to my usual font, and it looks peachy.

🤦‍♂️

So what's the moral of the story then?

Don't do weird shit at stupid o'clock---one really ends up doing stupid things at stupid o'clock. I mean, redesigning an entire bitmap font when all that was needed was a tiny configuration change in some semi-obscure file? What an ``excellent'' use of 3 hours.

Till the next update.

Tuesday, September 13, 2022

I Can Haz Steam Deck Plz?

Okay, it's getting late, so I will keep this short.

This week is going to be a short week for me due to me taking leave on Friday for no other reason than to take a day off. After all, that's what paid time off or ``annual leave'' is for.

It's not a privilege but an entitlement. It's good to have a small break ever so often just to keep the burn-out monster at bay.

I'm waiting on the Steam Deck to be released in SIN city. So far, there is no indication that it will make its way here, though many signs are pointing towards that, considering how the availability blurb refers to Komodo making it available to South Korea, Taiwan, and Hong Kong, in addition to the originating country of Japan.

Okay, maybe not just SIN city, but SEA countries.

I'd love to have the Steam Deck. I used to have a Dingoo from way back when and enjoyed the times that I played it. It was mostly emulator-heavy, which was not a problem. Eventually I stopped playing on it because let's face it, many old games need to remain in the past because their interface was just atrocious as compared to what we have now, and that it was actually possible to exhaust the number of retro-games I wanted to play. I had to junk it a few months ago because the lithium battery pack was swollen.

But a Steam Deck? I can see myself playing/grinding games from my Steam library on it. The ability to carry a game's progress between systems over Steam is a big part of why the Steam Deck is so appealling despite my earlier lost of interest in the Dingoo. This means that I could [say] grind games of Binding of Isaac on either PC or the Steam Deck without worrying about having to replicate the feats to unlock features, nor do I have to worry about doing the synchronisation manually.

I'm not expecting to use the Steam Deck for long gaming periods---that's what Eileen-II is for, and also why I didn't get on board with the Nintendo portables, up to and including the Switch. Small 30-minute plays in commute are the most likely use cases---I can't keep reading forever. There are other handhelds similar to the Steam Deck (like the Aya Neo, or offerings from GPD), but they cost at least 50% more than the most pricey variant of the Steam Deck, and are Windows exclusive machines.

That latter part is a bit off-putting. For what is to be a dedicated gaming portable, running a two-ton gorilla like Windows as opposed to the gaming-centric SteamOS feels like a lot of the precious battery juice will get lost somewhere.

Anyway, as I said, this is short. Till the next time then.

Thursday, September 08, 2022

Consigning Ramblings to Records

To feel loved is something that comes naturally to humanity. Hell, even I cannot run away from it sometimes, as misanthropic as I claim to be.

But what does it mean to ``feel loved''? Is it the same as ``being loved''? Does ``feel loved'' actively require an other entity outside of the soul/consciousness that is currently piloting this meat body? Is it something purely bio-chemical that we attach more signficance to due to our insatiable need to derive meaning and symbology? If so, do animals other than humans ``feel loved'' as well?

I've been walking about the past couple of weeks in a semi-trance, in the sense that while I am fully aware and present wherever I am, I cannot help but notice that there is nothing inherently ``real'' about the world. All the physical sensations that we have, be they sight, sound, taste, and all others, are merely emergent behaviour built upon the interactions of unfathomably large numbers of primal components that are smaller than the atoms that we sort of understand.

Much of the world is emptiness, literally. Atomic structure itself is mostly space, though what is that space is something that I don't think we have an answer to. Feelings of friction, Newton's Third Law observations, and other human-scale phenomena are interactions of invisible electromagnetic fields as the atoms repel each other. Smaller-than-human-scale phenomenon that allow us to ``run'' a consciousness in the form of biochemistry is even more difficult to comprehend---stupendously large numbers of chemicals are synthesised, interacted with, and broken down, all without necessarily having awareness of the larger ``I'' that has emerged from their collective behaviour.

Where then does ``I'' begin? And if I cannot tell where ``I'' begins, where then can I start talking about ``feeling loved''?

God is unknowable because He isn't one of us even as we are made in the image of Him. Yet we are reminded to know God relationally, to bear in mind of His sovereign will over reality, of His Perfect Plan, and of His indescribable power in influencing and changing things according to the said Plan.

Is this what it means to ``feel loved''? That, despite how every other human may not give a rat's ass about us, we have a Creator God out there beyond our ken who made us through His cunning ways of manipulating extremely complex behavioural systems of remarkably simple axioms who cares enough about us that it does not matter if the rest of the world hates us.

Is ``feeling loved'' something that is bound by time, or in other words, is the existence of a specific direction of time necessary to allow one to ``feel loved''? Time is necessary for cause and effect---the very definition of cause and effect demands that a certain sequence occurs, and from such a sequence, a direction of time may be inferred.

If the house of God is beyond the observable universe, does it also mean that it has no direction of time the way we innately experience and ``know''? If so, when we are in the house of God in the end days, are we still loved, if ``feeling loved'' is indeed dependent on a cause and effect? We have hints in Scripture about the timeless nature of things, at least from the definition as derived from cause and effect, in that our salvation (and thus our reconnection with God the Father) comes not from works but from faith---it defies what we understand as a regular cause and effect.

If that is the purest and best form of love, does it mean that all other earthly emotions of ``feeling loved'' is just a shadow that we need to learn to disregard and discard?

The confused might ask ``MT, where are you going with this?''

And I reply, ``Like hell I know. Not every blog post is about making a point that makes sense.''

Till the next update.

Monday, September 05, 2022

Making the Common Word List Source Technically Correct at 95% by Mentions

Okay, I couldn't let it go. I mentioned about the true count being one processing step away from getting, and just did it. The true total mentions is 2.00T rounded off (or 1997515570677 versus the original 1991804657887) a difference of 5.71G (or 5710912790). This mass difference directly led to 2.23k words more than the original 26.8k words.

Will that make a noticeable difference? No clue because I'm too lazy to do a diff between the two top 95% words by total mentions and perform the necessary qualitative analysis---it's just not worth it.

I've updated the bit-array for the Bloom filter, and so things are more correct than before.

I've also added a couple of warnings for when the counting statistics yield something that may make all the estimated readability metrics even more suspect. In addition, I chased down the actual paper regarding the automated readability test, and realised that the Wikipedia article misrepresented it (the horrors!).

The actual links and what-not are updated on the readability test page itself.

Okay, that's about it. I've deliberately set this publishing time to be the next day to not overshadow the last entry's triumph.

Till the next update.

Sunday, September 04, 2022

Readability Test

Hoo-wee. Let's nerd out a little.

This online readability test has been a project that I have been working on and off for quite a while. While it is not something ground-breakingly new, it does get fed some rather beefy data to become the thing it is.

First off, let's get the big picture right. The tool implements three readability tests:
  1. Flesch reading ease;
  2. Flesch-Kincaid grade level; and
  3. Automated readability index.
The first two methods involve messing with word, sentence, and syllable counts, while the last involves only characters, words, and sentences.

I know that MSWord has such readability tests built in. However, I don't have MSWord accessible most of the time, so having a tool on my own is probably better.

Character counts, word counts, and sentence counts are lexicographically mechanical in nature---the heuristics for English (my primary language) are quite straightforward to use. The tricky one is syllable counting---coming with heuristics that can work for a large quantity of words is both challenging and time-consuming.

To deal with that in the laziest means possible, I decided to just build a simple linear model to handle it. In theory, I could just grab a list of words with their syllable counts and use that as is, but then you get faced with the word ``omphaloskepsis'' that is rare enough to not appear in the list and you are faced with the question of ``what's the syllable count of this word?''.

So some level of generalisability is necessary, and to do that, a model is needed.

Like any model, two big things need to be taken into account: ground truth and features. Roughly, we need ground truth to ``know'' what the mapping of word to syllable count (my learning problem) should be, while features are used to derive general properties of the word that may be generalisable to handle new unseen words.

I'll skip all the experimentation and just describe the stuff in point form.
  • The ground truth is derived from the CMU pronunciation dictionary, using a heuristic that maps one syllable count to one appearance of a vowel phoneme.
  • Features are binary (present or absent), no matter how represented they are.
  • I used skip-digrams as features: a skip-digram is a digram with a certain number of other characters (between 0 to 4) in between.
  • I used trigrams as features as well.
  • I used ``book-end'' features: it's a trigram made of the first character of the word, and the last two characters of the word.
  • I encoded the length of the word as a one-hot encoded feature for up to 10 characters, and one feature for words longer than 10 characters.
  • To ensure that the short words are generally more correct (most likely to be exceptions to any generalisable rule), I also added in a special short cut-off, storing words up to and including 4 characters as features.
  • The weight vector for the features are obtained through solving the system of linear equations using a sparse implementation of the least squares algorithm.
  • The final stored weight vector rounds off to 3 decimal places, and the final predicted syllable count from the model is rounded to nearest 1.
To use the model, I just created a JSON file of them, and made a small JavaScript interpreter to use that JSON data.

The final model took the 117k words extracted from the CMUdict dataset (~1.34M bytes) to the 473k bytes long JSON file. That's good enough I suppose.

The logistics of training the model was... funny. Due to the number of features involved (47.6k) and number of entries (117k), the matrix (5.57G entries, or about 44.6G bytes of memory for double-sized in dense mode) can only be solved using sparse linear algebra techniques. I can't run it in Cygwin due to the choice of library, but it can be run in Anaconda on Windows.

The only problem was that it was slow. Running it in a Xubuntu OS in VirtualBox was easily 3× faster.

Why? I have no idea. But it was done. And with only using 300M bytes of memory out of 2G bytes available too.

🤷‍♂️

So that solves the syllable count. Hurrah!

Well, that's not enough. If you've read the limitations of the measures, you'll realise that obscure words that happen to be short can break things. To deal with that, I decided to just add a list of discovered obscure words.

But it's quite nasty to add a list of obscure words to compare too---there are far too many of them. It's much easier to create a list of common words, and then report that a word is obscure if it does not appear in this list.

There are two issues to that approach:
  1. Where do I get such a word list?
  2. How do I store and search through such a word list in a way that is space and time time efficient?
Let's start with the second question since the answer is simpler: Bloom filters.

Put simply, Bloom filters implement a probabilistic data structure based around hashing and a fixed-sized bit array where the false negative rate is zero. The false positive rate can be set with a whole bunch of other parameters tuned to fit that---I think the linked to article does a better job to explain things.

So for my obscure words detector, I created a Bloom filter with false positive probability of 0.00001, or 1 in 100k. The resultant bit-array and support code in JavaScript to implement the data structure weighed in at around 217k bytes. All these without actually storing any of the words.

So how many words went in to this Bloom filter? About 26.8k words that constitute the top 95% of word uses.

Which brings us to the first question: where to get such a word list?

I only know one source for this: Google NGrams. More specifically, the 1gram dataset. I used the Google NGrams dataset before a long time ago to build some tetragrams as part of an evaluator for my experiments on automated cryptogram solvers, but the newest dataset (from 2020) has a slightly different data format.

No matter. Getting the data is easy. Processing the downloaded files yielded 79.1M ``words''. Dropping off all the specially marked words (hence the quotation marks) yielded 36.9M words. But that wasn't enough since this was case sensitive. One more round of processing yielded 29.0M case-insensitive words. This yielded a total mention of 1.99T mentions, of which I filtered off to the most popular words (by mention) that added up to 95% of the mentions (or about 1.89T mentions). This led to that 26.8k words, which sits at 216k bytes.

The more astute should realise that I should use a different sum total because of the ``minimum of 40 mentions to appear in the individual word list''. Yeah, but it's already done, and I am quite satisfied with the results, even though including those extra counts of ultra-obscure words will increase the number of frequently used words.

And so, we have the final result: the online Readability Test.

Phew, that's quite a big nerd out. The only other thing I want to add is the use of tqdm as a quick way to show progress in terms of total time, as well as the rate of processing in iterations per second, all while using unit scaling to show large numbers in nice SI-prefix notation.

Till the next update.

Saturday, August 27, 2022

Heyo Stupid O'Clock Ho!

Well well well... it's stupid o'clock. Has it really been this long since a stupid o'clock post?

I don't know... you tell me.

We are way past the halfway mark of 2022, and are rapidly heading towards its end and eventual start of 2023. I'm not really the type to do a mid-year review of the goings-on, but a stupid o'clock post has little holds barred.

Anyway, let's go back to some old topics: writing as catharsis.

I enjoy writing. Some see writing as a creative outlet, but I find that writing serves its purpose as a means for me to do a mental purge. Anything, be they related to work or personal issues, once committed to the metaphorical paper, becomes something that I have removed from the immediate working memory of my mind. Because of this phenomenon, I have a tendency to take indexing of my written items a little more seriously than most---if I do not index something, it will be lost to the ages.

Fiction is a little bit different in that there is an attempt to perform a reframing of something that I had experienced/read about into a situation where that said experience (vicarious or otherwise) can be somehow applied, while retaining the overall make-believe nature that is demanded of fictional works.

Strangely though, I find that I am preferring prose over poetry these days. Not sure why. Maybe it is connected to the whole lowered affect that I have about things? Poems have a tendency to relate more strongly towards that of song/music, and are usually powered/inspired by emotive moments.

These days, the only emotion I feel is just... is ``tired'' an emotion? Maybe the closest word is ``ennui'', though that ``dissatisfaction'' bit seems to be less apt in describing my true inner state. I want to claim that I am at peace with the world, but that isn't right---I still get riled up by some of the more blatant but obviously stupid things that I observe. Thoughts of death have come by at a much reduced frequency now, and I suspect that part of it is due to me being ``tricked'' into having responsibilities in the form of holding a job.

Speaking of jobs, hiring of extra help is always painful. Let's see what God wills for us. Many strange things are afoot, and I am not a liberty to discuss them anywhere. Needless to say, I am still preparing for the worst case scenario of having to tank everything, and that over-sized task is daunting, to say the least. If it does reach that point, there is a pretty large chance that I will just leave my current role when things go beyond what I can comfortably bear.

Let's hope it doesn't get to that point.

Emotions... I had an epiphany recently. I started cutting off more people whom I think are better to leave out of whatever is left of my sad life. Most of them, I've not spoken to in a decade; their lives have diverged greatly from mine, and being sober enough to realise that apart from that one very forced meet up, neither they nor I have bothered to keep in contact.

So I just felt it best to cut them off. They don't need to know what I am doing, and I don't care about how their children are growing up.

Then there are those who are loosely acquainted to me only through her. It's her social circle, not mine---without her as a catalyst, any relationship that I might have with them will not stand up to anything. No need to let them worry about any potential awkwardness---I didn't exist in their lives before she introduced them, and even after introduction I played little to no part in their lives thereafter.

So I just felt it best to cut them off. It's not like they would care about me anyway.

I picked up my dizi and played a little on it today. It was nothing serious, just a little noodling on a beidadi that required stretching of the fingers, even for someone like me. I guess that's an improvement over the whole sentiment of quitting music altogether. I did sort through my overly thick ``practice'' music folder to reduce its weight through careful selection of pieces that I wanted to work on, so that's also a great restart.

I finally completed AI: The Somnium Files, not-so-accidentally 100-percenting it. The story was a little more complex than any of the Zero Escape games, and the later puzzles could get frustrating at times, but I like the character development for the most part. A fun game.

Will I start on AI: THE SOMNIUM FILES---nirvanA Initiative? Eh, maybe not so soon. I feel a little gamed-out on the adventure visual novel puzzle genre of games. I might try to complete A Hat in Time (not 100-percenting it for sure), and get back to What the Golf? (unsure if I want to 100-percent it), with splatterings of rogue-likes in between (I'm staring at you, Jupiter Hell, Binding of Isaac: Rebirth, FTL, and Enter the Breach).

The weather for the past week has been unusually nice---lots of rain, not a lot of mugginess despite the humidity, and not a lot of crazy sunshine. Such weather conditions aren't likely to last anyway due to the whole convectional rain that SIN city has a tendency to undergo. Ah well.

I think that's enough of a brain dump for a stupid o'clock post. Till the next update then.

Tuesday, August 23, 2022

CSS User-defined Constants and Auto Font Size Scaling

Okay, the last post was quite negative and triggering, so let's change gears a little and talk about something different.

I've been tweaking my personal domain in the recent few days, partly to streamline a bit to make things more maintainable, and partly to fix some long-standing aesthetic issues.

One of the first things that I figured out is the use of CSS variables, or more specifically, the global ones. I use them not as variables, but as some kind of symbolic constant to keep those magic numbers away from appearing from within the CSS file itself. Some examples of the magic numbers that I magicked away include:
  • The basic indentation space;
  • Highlight colours of various sorts; and
  • Contrast colours of various sorts.
That made it much easier to set various HTML elements' properties in a more consistent manner.

The other thing that I was tweaking involved what I would call ``font size rescaling''. The problem I was facing was this: when I was using (say) <pre> tags to create ASCII art, they tend to stay more or less the same, until the browser window is sufficiently narrowed to the point that the original text extends out to scroll horizontally.

I fixed that issue (and the other one involving tables, most notoriously for my Instrument Range Visualiser) through auto-injected JavaScript that does funky-ass mathematics and DOM manipulation to sort-of achieve the effect of rescaling the font sizes so that things fit correctly.

That solution was very flaky, and did not solve the problem well. There were two reasons:
  1. Setting the minimum font size of the browser to anything other than 0 would screw things over---this was to be expected.
  2. All that DOM manipulation nonsense didn't sit right with me due to all the arbitrariness.
And that's where I learnt of the vw unit. Simply put, 1vw expands to 1% of the view port's width in pixels.

Combining that with the calc() function and the storage of variables in the :root element to be used as global variables allowed me to define a new scaling factor that is based on both the ``ideal'' width that I had defined, as well as the current width of the view port. That allowed me to eliminate all the funny JavaScript code that was doing the manipulation, and reduce everything down to just a few lines of CSS code.

There was still on technicality though---I didn't want to up-scale the fonts if the width of the view port exceeded my defined ``best fit'' design. This was easily solved through judicial application of the min() function, the original designed value, and the scaled version accordingly.

I liked the end result.

That's about it. Till the next update then.

Saturday, August 20, 2022

Vitriolic Catharsis

Warning, the kid gloves are off in this post. Go away if you don't want to be triggered.

Vg unf orra dhvgr fbzr gvzr, naq V unir orra nygreangvat orgjrra frrguvat va fvyrag natre naq dhvrg npprcgnapr bs jung unf unccrarq. V unir gevrq gb sbetvir, ohg V sbhaq vg ynpxvat. V unir gevrq gb sbetrg, ohg bayl gvzr pna cebivqr rabhtu qvfgnapr sbe vg gb jbex zber rssrpgviryl.

Gur natre vf ng gur ybff bs qernzf bs gur shgher. Gur gevttre vf fhecevfvatyl onany---gur nofbyhgr erzbiny bs nyy Tbbtyr qbphzragf gung jrer bapr funerq orsber nobhg ohpxrg yvfgf naq bgure funerq gubhtugf nobhg gur shgher gung jr jrer cynaavat gb unir gbtrgure.

V chg va guvatf gung V jnagrq gb qb jvgu ure nf cneg bs bhe ohpxrg yvfg, guvatf gung V crefbanyyl jbhyq jnag gb qb ng fbzr cbvag ohg arire ernyyl gubhtug zhpu nobhg gvyy fur pnzr vagb zl yvsr naq jr jrer ng n yriry gung V gubhtug jnf ernql gb urnq ba gb gur shgher gbtrgure.

Fur qryrgrq gur ragver qbphzrag. V arire unq gur punapr gb znxr n onpx-hc sbe vg---vg jnf n yvivat qbphzrag, V jnfa'g rkcrpgvat vg gb or tbar whfg yvxr gung gur zbzrag V npxabjyrqtrq erprvcg bs gur oernx-hc yrggre.

Shpx.

Juvyr gur zrgncubevpny ybff bs n shgher vf zber be yrff tbggra bire, gur npghny culfvpny ybff bs erpbeqf bs n funerq shgher sbe zr gb hagnatyr onpx gb jung jnf bevtvanyyl zvar naq jung jnfa'g vf jung znqr zr yncfr vagb natre rire fb bsgra.

Fbeel Ybeq, V pnaabg sbetvir---V npxabjyrqtr gung guvf jvyy or zl nyongebff sbe dhvgr fbzr gvzr gb pbzr. V fcrag zber guna svir lrnef jvgu guvf jbzna, gnxvat zl gvzr gb pnershyyl ohvyq hc gehfg jvgu ure, znxvat pbzcebzvfrf nybat gur jnl erfcbafvoyr nqhygf qb gb erfbyir ceboyrzf. Jr obgu npxabjyrqtrq gung pbzzhavpngvba jnf xrl, naq V jnf qbvat zl orfg gb zrrg gubfr rkcrpgngvbaf nf orfg nf V pbhyq, xabjvat shyy jryy gung V jnf zber bs gur xvaq gb abg gnyx zhpu nobhg zlfrys va trareny, rira va fvghngvbaf jurer V xarj gung V pbhyq abg pbzzhavpngr jung V jnf srryvat---V fgvyy gevrq gb yrg ure xabj bs zl cerqvpnzrag.

Jung V tbg va erghea jnf zber guna whfg n fync va gur snpr, be n fgno va gur purfg. Vg jnf n evccvat bs gur ovg bs zl fbhy gung V unq funerq jvgu ure.

V qvqa'g whfg ybfr gur ybir bs zl yvsr gura; V ybfg n ovt puhax bs zlfrys nf jryy.

Gung shpxvat uheg.

Vg jnf bayl irel erpragyl gung V znantrq gb gnxr fgbpx bs whfg ubj zhpu qnzntr V jnf uvg jvgu.

Zl vagrerfg va zhfvp unf qebccrq gb cerpvcvgbhf yriryf, juvpu jnf abg urycrq ol gelvat pbaqvgvbaf gung PBIVQ-19 unf oebhtug nybat jvgu erfcrpg gb erurnefnyf naq cresbeznaprf. V qvqa'g rira jnag gb cvpx hc zl syhgr/qvmv/jungrire vafgehzrag gb cynl. V qvqa'g rira jnag gb jevgr nal zhfvp, naq gurer jrer gvzrf jurer V jnf gblvat jvgu gur vqrn bs fryyvat/qvfcbfvat nyy bs gur zhfvp vafgehzragf gung V unir.

Zl gnfgr va ivqrb tnzrf unir nyfb punatrq, juvyr zl vagrerfgf va gurz unir fgnegrq jnavat nf jryy. V nz nyfb fgnegvat gb trg jnel bs ernqvat, naq nz rira zber bs n fuhg-va guna orsber.

V cnff rnpu qnl nf vg vf. Vs gurer'f n gnfx gb or qbar, V pbzcyrgr vg jvgubhg srryvat zhpu. Znlor n fznyy frafr bs fngvfsnpgvba, ohg gung'f nobhg vg. Gurer vf ab bar gb funer zl qnl jvgu, naq V unir fgnegrq gb abg obgure jvgu jnagvat gb funer jung vf rssrpgviryl n ebhgvar qnl.

Gur hetr gb whfg vfbyngr naq xrrc va fgnfvf gb nibvq perngvat arj zrzbevrf naq trarengvat snyfr shgherf vf rire-vapernfvat. Bayl erfcbafvovyvgl unf xrcg zr sebz tbvat nyy-va ba guvf cngu.

V pna'g frrx uryc---jung xvaq bs uryc vf gurer gb or fbhtug? FVA pvgl unf fuvggl zragny urnygupner gb ortva jvgu, naq V senaxyl qb abg arrq gur fgvtzn va jung vf rffragvnyyl n tybevsvrq ``qrirybcrq'' pbhagel jvgu n fgebat qrirybcvat pbhagel zvaqfrg. Nf sne nf fbpvrgl vf pbaprearq, V'z fgvyy shapgvbany---jurgure be abg V nz shpxrq va gur urnq vf bs ab pbaprea gb fbpvrgl ng ynetr.

V qba'g rira jnag gb ratntr jvgu npdhnvagnaprf naq/be sevraqf gung zhpu, orpnhfr V xabj gung gurl pnaabg uryc zr, naq gung V qba'g jnag gb chyy gurz qbja gb zl yriry---gurl unir gurve bja snzvyvrf gb ybbx bhg sbe, naq gurl ner nyfb abg nqrdhngryl rdhvccrq gb uryc zr naljnl.

Orfvqrf, jnf V ernyyl ybbxvat sbe uryc sebz gurz?

V arire jnag gb pbagnpg ure ntnva---fur unf gnxra njnl zhpu bs jung znqr zr uhzna njnl sebz zr, nyy va ure frysvfu jnlf hfvat gur Ybeq'f anzr nf ure svt yrns. V bayl pbagnpgrq ure gung bar gvzr gb shysvyy n cebzvfr V znqr; V unir abg pbagnpgrq ure rire fvapr. Bu naq gur tnyy gb cersnpr n frrzvat bssre bs na byvir oenapu bs n pbssrr jvgu ``...vs lbh ner pbzsbegnoyr''.

Jryy, shpx gung. Shpx univat ure npgvbaf yvivat erag-serr va zl urnq nyy gurfr juvyr. Gung jnf gur ynfg wno gung V jbhyq rire gnxr sebz ure---ab zber.

Gurer. V'ir fcrjrq vg nyy bhg urer. Creuncf guvf jvyy uryc zr er-senzr guvatf zber pbzsbegnoyl naq svanyyl zbir gur shpx ba.

Midnight Locke

Man, I'm really getting old. Just past midnight and my eyes are barely able to keep themselves open.

So the weekend has arrived once again. Hurrah!

The past week has been a mixed bag. Lots of work was done, and I also made some headway in AI: The Somnium Files. I've also read some more books, including John Locke's Treatise of Civil Government and A Letter Concerning Toleration.

I would like to talk a little about Locke's work here, even as my mind slows down from the lateness and the exertions of the day.

Locke presents an interesting thesis with respect to ``Toleration'' which I find to be resonant with my own personal thoughts that can be summarised simply as a proverb:
What is good for the goose, is good for the gander.
Our behaviours in the cosmopolitan society need to take into account that we share living space with others who may not believe in the same things that we do. We know through our belief that they are wrong, but it is not our place to force them to conform to our beliefs, just as they know through their belief that we are wrong, and that it is not their place to force us to conform to their beliefs.

``MT, how can both of your beliefs can be simultaneously right and wrong?''

It's a belief---it's experiential, and deeply personal. It's an axiom within our own system of reasoning, something that is truthful on its own, a tautology. A base case in the inductive reasoning that we are wont to make. There are ways to test the extent of the truth of the belief, but eventually we run out of derived truths (i.e. theorems) and reach a set of statements that can only be described as belief.

We will only know who's wrong at the end. And it is not the end just yet.

Anyway, Locke's work here spends quite a bit of time talking about the role in which the civil government plays. And he quite rightly summarises it as being about the protection of one's possessions and property. Mind you, this is circal 17th century, nearly 70 years before the founding of the United States of America. This means that the possessions and properties being covered are that of the material and physical ones.

He states then that the civil government maintains and upholds laws that preserve the right of [material] property that people can hold, and has no jurisdiction over aspects involving the spiritual. Similarly, systems that deal with the spiritual have no jurisdiction over aspects of the material, especially since much of such doctrine either has nothing to say about it, or says something that makes sense for the time, but is of net harm to society in the now.

Locke's work spans 200 pages or so; any form of summary I can contrive will necessarily be insufficient and incomplete. But the point to be made here is that if we choose to live as a community, then the rules/laws that we as a community set ought to be even-handed for all the members of the community. Moreover, such rules/laws should strengthen one's freedom of choice, as opposed to strengthening coercion of the tyranny of the majority.

Reading all that just made me feel sad when I looked at the world today. Morality and ethics are considered liabilities, and the less that they can be bothered with, the better the overall outcome. All these just for the accruing of wealth and power in the fallen world. No wonder Scripture points out that it is impossible to serve both God and Mammon---one inevitably has to make the choice as no amount of finagling can change the fact that these two contraindicate each other.

Other than those observations, there is no other new point that I have not made before that I want to be making here---I just found it interesting that someone some three hundred years ago have made similar observations and statements as me so far in the future relative to him.

But let's divert away from civil government and go back to more godly matters---the overpowering sense of the ego trumping over doing what is pleasing to God.

There are many things that God declares as sin. Sadly, almost all of human behaviour is sinful in nature. And no, I'm not even thinking about the ``big sins'' that most people associate with immediately when ``sin'' is heard---I mean the ``tolerable sins'' in the sense of what Jerry Bridges wrote in Respectable Sins: Confronting the Sins We Tolerate. There is no one who has told a lie (white or otherwise), there is no one who hasn't forgiven someone, and there is definitely no one who doesn't give in to anger at some point. All these are sins---they seem tolerable and ``all natural'', but they are still sins nonetheless in the eyes of God.

``Who said that all these things are sins? This is human nature! It's normal variation of human behaviour!''

And that is why everyone of us needs a saviour to intercede on our behalf with God to forgive us our sins. The ``who'' here is God---God is perfect, God is ``good'' defined. But we have our own ego, our own free will. We defy God by trying to seek our own self-justification and self-identity away from God.

That whole self-identity and self-justification is the start of the long way down the path of sin among all the contentious issues that many modern-day Christians claim controversy over. We self-justify because we believe that we are more enlightened than those who came before us, and that our technological prowess can even defy God's power as well. Our hubris in medical technology has kept alive way more people that could be au naturale, and our development in information sciences allow us to collate, process, and promulgate data/knowledge in ways that seemingly beat that of the Bible, the earthly representation of the inspired Word of God. We rely heavily on our empiricism to prove many factual observations that seemingly mock and challenge God, and most show no respect to the Almighty.

With so much power, it is of little wonder that Man thinks of his own identity as being of paramount importance as compared to that of God---such pride is a great cause for much sin. And even among those who claim to be Christians, their arguments to justify the sinful actions that they take are no different from the biblical Pharisees' actions.

So what point am I making here?

Nothing more than just a small reminder to always take a few steps back to look at the bigger picture to understand things for what they are as opposed to getting some serious tunnel vision from parrotting the latest sound bite.

And with that, I'm spent and need to crash out before I burn out.

Till the next update.

Tuesday, August 09, 2022

Old Man Rant

Happy National Day I suppose?

Niceties aside, welcome to Tuesday in SIN city, which also happens to be a public holiday.

Bah... both attempts at openers ring hollow, because I really just want to mouth off on something completely unrelated to those two things.

So the thing about hitting middle-aged in life, and hitting ``lead engineer'' level in professional terms is the gradual realisation that these changes in epoch also mark the change between ``one who follows orders'' to ``one who decides the orders'', or to paraphrase, from being a mere follower to being a leader (not manager!). The unsubtle difference between a follower and a leader is that the follower is almost always assured of safety guide rails to keep them in spaces that are well-trodden, with mostly understood risks, and clearly defined activities that obviously needs doing with little to no argument, while the leader is often operating in a mostly unstructured space with some sense of a framework (moral, ethical, budgetary, woolly ``strategic concerns'') and a need to make decisions on how to carve out that safety space for his/her team of followers to operate in.

That last bit on decision making is truly what makes the role of a leader a more difficult one than a follower. Managers are not the same as leaders despite their equivalent superior status as compared to followers---while managers make decisions as well, often their decisions are more towards that of the management of people (hence ``managers''), and less about some of the harder abstract technical engineering parts. Leaders cannot operate alone inasmuch as managers cannot operate alone---both have their roles to play within an organisation, and they must communicate with each other to keep in sync on what they are doing so ensure that the net direction of the organisation is ``forwards in the direction of the organisation's vision''.

It's a tough role to play. The mentality required to be a leader is quite different from that of a follower. For the sake of proper debate/discussion to rationally determine the overall best outcome given the environment and resources available, a strong sense of rationality (i.e. objectively defensible decisions) is required, though a large part of the decision's progenition lies in the murky world of experience-driven intuition. The leader needs to have at least two minds at once---on the one hand, the need to have one foot within the technical engineering parts to ensure currency of knowledge to keep abreast of what is available in the field, and on the other hand, to have one foot firmly within one's experience to make sense of all the information that is coming in to continually update and strengthen the correctness of one's intution to avoid the dreaded ``analysis paralysis'' or its counterpart of ``extinct by instinct''.

Some say that leaders are born, not made. I say that the predilection towards being a leader is correlated with certain character traits, but there is definitely a path of training that can take such people and fashion them into future leaders. And funnily enough, it requires such people to learn to make decisions from as early an age as possible to increase the number of decisions (and associated consequences to learn from!) that they make so that they become effective leaders.

Am I a leader? Never thought of myself that way, though I will admit that I am thrusted into that position in almost everywhere I go. I suppose it's not that I am a leader-type, but that circumstances often end up with me being a strong candidate for taking on a leadership role.

The sooner I embrace this, the happier I will become as I continuously make decisions and learn of my consequences to further inform my future decisions. Can't keep resisting what keeps coming my way. I suppose God has His way of making us realise certain aspects of ourselves that becomes hard to dodge.

I mentioned two things though, so let's talk about being middle-aged in life. Being middle-aged shares similar trajectories as that of being ``lead engineer'' in professional terms in the sense that the number of frameworks that constrain and control us in life are much reduced. When younger, the education system acts as the safety guide rail of what is permissible; the discriminative (in the technical sense!) laws for minors act as society's trade off between punishing bad behaviour against the fact that younger members of society may not have a well-developed sense of ethics and control. As one steadily progresses in age, other forms of safety guide rails fall into place: student loans start to constrain one's decisions on what to study (need to get a good enough job after studies to pay back said loans), giving in to one's libido eventually leads to wed-lock that further constrains what one can do (generally don't do things that jeopardises the family), having children further guides one towards making decisions that prioritises the children/family over other activities that contribute less to personal values.

That's for normies. (=

For single middle-aged men like me, we... don't really have such constraints. By now, all student loans (and their equivalents like scholarship bonds and what-not) are settled, one's general career direction is more or less on a known trajectory (known does not mean permanent), and there's copious free time compared to those who are running their own families.

In a way, we are the free variables in the equations that govern society. This is a very strange but strong power. If we choose to, we can be movers and shakers of societies in ways that cannot be beat, because we can reduce the attack vector surface against ad hominem more readily than someone with a family in tow.

Or we can realise that the world's fucked because the vast majority of normies don't give too much of a shit of anything that is beyond a two-year time horizon and/or affects themselves or their immediate relatives and let them all face the consequences of their own hubris, leading to us just doing whatever the hell we want that makes us feel not-too-bad, and let the damned be damned.

I wonder where on the spectrum I am.

As to why this rant came about, check out this video from Veritasium about becoming an expert.

------

In other news, I've been experimenting with fail2ban, an intrusion detection system (IDS). It operates through analysing logs of several net-facing services, and then automatically manipulates the firewall rules to block/unblock IP addresses according to search patterns that are defined as ``bad behaviour''.

I was getting sick of watching my server logs being filled up with many exploit attempts. So it was time to experiment with this. As to which server this is running on, I'm not going to talk about it. Suffice to say, the list of IP addresses is steadily growing. Hopefully I don't have to worry about seeing these exploit log entries/attempts.

Till the next update.