Sunday, February 27, 2022

Fine-tuning Timestamps, and The Great Aquarium

Ah. Night time. Not quite stupid o'clock, but I feel like writing something here.

I spent some time working on a little bit of code between yesterday and today to fine-tune my publishing process for my personal domain. For the uninitiated, I have a customised Python3 script that does minification of the hand-written static HTML/CSS pages, and generates a GZip version to be served faster. I had added a sitemap XML file that is autogenerated as part of the build+deploy process. The final step is to make use of rsync to update the actual files on the server, but without incurring the complete cost of copying all 38M+ bytes.

The bit that requires fine-tuning was something to do with timestamps. Practically speaking, there are three different timestamps associated with the HTML/CSS files. They are:
  1. Logical timestamp as seen by the ``Updated at 2022-02-26T23:44:31+0800'' lines in the pages;
  2. The physical file's timestamp as reported by the operating system through the stat(), more practically observed through output of ls -ltra or whatever the modified date is under Windows Explorer;
  3. And the timestamp of last commit as stored in the Subversion database.
The logical timestamp is useful for the human viewing the page after it is served, but the various caching mechanisms (as well as the rsync process) of the HTTP server uses the physical file's timestamp. There is a fourth (stored timestamp within the GZip file), but that has been adjusted to ensure that it matches the source physical file's timestamp.

The timestamp business affects how many bytes get sent via rsync to the HTTP server. This is because rsync transfers the differences among the files over, and I was frankly getting annoyed with seeing a long list of files that were changed even though I did not change them. Another side problem occurs when I checkout the Subversion repository into a new machine---the physical file times of the same file from that new machine will be different from the ones of my other machines. This means that rsync-ing from one machine to the HTTP server and rsync-ing from the other machine to the HTTP server will guarantee more unnecessary bytes being sent due to the different timestamps.

Thus, I decided to just force set all the local files' timestamps to match what the commit timestamp was for it in the Subversion repository. With the help of this Python3 svn library, I could access the Subversion information for any given file (assuming it's in the repository in the first place). Using that, I managed to update all the timestamps of my files to match those exactly in the Subversion repository yesterday.

But that was insufficient in the long run, because the moment I edit any file, save and then commit, the timestamps [of the physical files] are no longer in sync. And using the simple script that I put together yesterday (till late) meant waiting for 2+ min just to update all the timestamps of the files, even though I only touched like... 2 files. Thus, I spent this morning working on a smaller delta-version that, instead of crawling through the Subversion repository (slow), crawled through the local file system (fast-er), and only triggering the Subversion repository look up if the file in question is ``sufficiently recent''. This strategy only added about 1.0+ s to the overall run-time, but kept the timestamps in sync.

That was a fun little exercise to update my process.

-----

I spent much of my afternoon clearing the other half of the hill in Minecraft. I had this thought of creating a large aquarium using the space beneath my large ``industrial complex'' platform. It was much easier to clear out the space because I didn't have to be as careful as clearing the mountain beneath my brick apartment---I didn't have to worry about accidentally puncturing the dedicated ``floor space''. Being near to my large beacons with the Haste II and Jump II enchantments made my mining speed superlatively high. So by the time I took a break and start writing this, I have already cleared something like three quarters of the hill.

After clearing out the space, I will lay out some sand to form the base. There's a ravine cutting through though, and I need to decide how I want to deal with it. One way could be to set up a glass ceiling in the ravine and lay the sand on top---the other is to set up a network of signs and lay the sand on top of that. The second is much trickier to do, but consumes more wood than glass.

Sand aside, the walls of the space above the sea-level will be made of glass blocks that I have. The hard part after is how to populate the space thus walled up with water---I have an idea, but I need to try it out to see if really works.

Anyway, it's late. I'm tired. I think I'll go take a shower, and then turn in for the night. Till the next update.

Tuesday, February 22, 2022

Jump Cuts

I just felt like I needed to say something on this date 2022-02-22.

First of all, it's no palindrome in ISO-8601. It's kinda like a palindrome in the UK traditional format of 22-02-2022, which I don't use any more because of ambiguity.

Second of all, it being Tuesday and coincidentally (is it, really?) the twenty-second day of the Chinese calendar is also somewhat noteworthy.

But it's one of the few lights over the past 2 years, so it's nice to live a little.

------

For those who visit my blog via mobile, I hate to point out that while there is a nice ``mobile-friendly'' version that Blogger automatically generates, it is woefully incomplete---I had to do some serious tweaking just to even get the disclaimer in place. Check out the non-mobile version. There is a nice collapsible history of all entries ever made here, as well as a tag collection of posts as well.

I sure as hell didn't ``only'' write fourteen entries a la the mobile friendly version. Fixing up the blog's template/formatting system to work well even in mobile mode is nasty,

------

That COVID-19 omicron variant is really ripping through SIN city. Previously the case numbers were just that, numbers, with no faces put to them. But now, I already personally know three people who have tested positive on an ART (Antigen Rapid Test) self-test kit. One I dodged completely, one was a passing interaction at a meeting, with all participants fully masked up and more than a metre apart, and the latest was with masks fully on unless we were eating.

It's harrowing. Somehow, I feel that it's just going to be a matter of when that I will eventually be tested COVID-19 positive at one of the weekly ART self-reports that my current work place requires us to do.

Or alternatively, I had already been hit with COVID-19 without realising it as the symptoms were mild enough that my threshold of tolerance was never breached, and that they were subsided long enough that the weekly ART did not pick it up.

One can hope, I suppose.

------

The demons I talked about yesterday, they're mostly in remission for today. Maybe it was the little bit of playing some familiar music on the S.O.S. (my Armstrong 204 piccolo) before I wrote the entry, or perhaps it was the sleep I got, or even the sense of purpose as I tackled a rather awkward enhancement/bug at work. In any case, I feel better.

I did stray in thought about how it would feel like standing at the epicentre of a nuclear bomb blast, a thought that came about only because I was reading Hiroshima by John Hersey. It was a different kind of bad compared to Grave of the Fireflies---there is emotion, but there is also a certain amount of journalistic detachment, a near omniscient view of the goings on to provide that perspective for one who did not live through that horror to learn what it was like.

Anyway, I'm tired. I'll probably turn in now. Sorry for all the incoherent vignettes---just felt like dumping what was on my mind. No big thoughts for today.

Till the next update.

Monday, February 21, 2022

Demons Came Out to Play Today

The demons came out to play today. But I managed to keep them at bay. For now.

I was walking home from the bus, and just thinking to myself, realising that at some point, I would simply forget about that particular moment. And I asked myself, how would I feel when I forgot that particular moment that just passed?

And I was sad to realise that since I had forgotten about that particular moment, there was nothing to feel about.

It was... surreal at the very least, and rather disturbing all in all. I don't know why the demons of nihilism chose today to show up, and in that form.

Apart from that little episode, I wafted through the whole day, quietly working on things in the mostly empty office.

The week that had ended yesterday was alright for the most part. I met up with some ex-colleagues who miraculously avoided getting hit with COVID-19 for dinner on Friday, and got a lot of stuff done throughout that week itself. The week that begins today is likely to be of a near opposite nature, with more introspection being necessary as compared to action. Such is the work life.

I have managed to successfully maintain my mass for the most part. It's good, except that I was trying to lose weight. I think I need to muster more self-discipline to stick to the one meal a day set up, and not get tempted by tasty lunch food made even more tempting through the massive amounts of body heat I lose each day from overly cold air conditioning in the office. I do muse every now and then on whether it was truly better to just work from home instead---it was allowed after all, and my presence in the office was mostly my own decision to head on back to ensure that my psychological separation of work time and me-time was backed by actual physical separation.

February is almost up, and March will be upon us. How quickly the days go on by.

I think I'll turn in earlier this night. Those demons have got to go, and the best way is to have my mind not in a state of exhaustion.

Till the next update.

Sunday, February 13, 2022

Metaverse?

Okay, let's talk about something a little different.

The ``metaverse''. An old concept that was recently made new all over again. For the lost, this is referring to the idea of having people interacting within a virtual world, with as many real-world equivalent concepts being brought into it as possible to literally be a space that people can live in.

I call it an old concept because virtual worlds have been the mainstay for much of the multi-player experience ever since computer networking was a thing. The key difference though is that the ``metaverse'' tries to have a stronger tie-in between the virtual world and this one that we live in, mostly in the form of linking what we would call ``valuable'' in this real world with what is in the virtual one. Another big difference is that unlike a multi-player game, the ``metaverse'' might not have game-like mechanics of goals and/or progression, both of which are replaced with metrics that are more closely aligned with how the real world operate, like real-world money.

Some might say that the ``metaverse'' is defined by the extensive use of virtual reality technologies, but I beg to differ. Virtual reality technology might be cool (well, cooler these days compared to before), but the technology companies involved in them aren't really looking at these technologies for the coolness---they are looking at them from the perspective of how much value capture they can exploit the way how old school industrial capitalism is always about exploiting the surplus labour of the workers to generate value. In the work by Zuboff (The Age of Surveillance Capitalism for the confused), it has been established that a large part of modern day capitalism is tied around the exploitation of behavioural surplus, an information-type resource that is used both directly and indirectly to manufacture real-world demands through [targetted] advertising. The ``metaverse'' can be seen as the extreme version of that surveillance capitalism, where the very physics of the world itself is controlled, observed, and milked by the companies that own the infrastructure to run and use them.

What separates the ``metaverse'' from the previous concepts of virtual worlds is the very strong tie-in with the real world, as I have stated earlier. Instead of role-playing a character in the virtual worlds like the old way, the ``metaverse'' demands that you appear in the system as yourself. This bit is important because it forces you to bring in everything that you do in the real world into the virtual world, and it also allows the owners of that ``metaverse'' to use the real-world clout of personalities/intellectual properties within their ``metaverse'' to create the strong false equivalence that whatever that happens in the ``metaverse'' is as valid as what is happening in the real world.

Suddenly no one can role-play their favourite celebrity any more---if Real World Celebrity So-and-So shows up within the ``metaverse'', it can be ascertained that it really is who it claims to be, and not one of their many fans who are role-playing as them. Similarly, if you are fed-up with being an office drone and want to go into the ``metaverse'' to role-play as a rock star, you probably can't do that because your real world identity is immediately shown to everyone---there's no way to hide that away.

Or maybe you could hide it away... for a price and a limited amount of time as dictated by the company who owns that ``metaverse''.

Real-world money that goes into the ``metaverse'' to pay for anything does not come out of the company that runs it---it is a means of capturing money. Throw in some equivalent of digital real estate and add the human value of prestige, and the most successful company running that particular ``metaverse'' will make bank.

I think that's too much power for any single company or even conglomerate of companies to hold. And I don't think that it takes a genius to realise that all that hype on ``metaverse'' is just the techno-gasm equivalent of Centrally Planned State Control. And that's not counting the obvious subscription fees that are needed just to keep one's place within the ``metaverse''. I mean, in real-life, we sort of have such ``subscription fees''---we call them taxes---and even then, the tax rules tend to be a little more progressive, with a general slant towards being used mostly for the social good.

Would a company do that? Especially for a company that is built around the modern day principles of ensuring that their quarterly reports show great progress?

Maybe this ``metaverse'' would be the equivalent of this duodecade's version of the dotcom bust in the early 2000s.

Maybe.

Saturday, February 12, 2022

An Early Will

In the event that I am dead, here is roughly what I would like done:
  1. Cremate and scatter my cremains into the waters off the Singapore coast---ashes to ashes, dust to dust.
  2. All physical objects I possess, burn in a great bonfire as they are no longer of any value to anyone.
  3. The money that I might have in my accounts, let them lie in oblivion in where they are stored in.
Yes, I'm well aware how this post is probably triggering all kinds of red flags. No, I am not about to off myself---perish the thought. Considering that one of the most likely futures that I am going to end up in is one where I live alone, I felt it necessary to start leaving some ``future instructions'' in case the inevitable does happen and I did not have the opportunity to write a ``proper'' will.

Naturally what is written here can and will change in the event that circumstances change. Now that I am well on my way through the middle age phase, I feel less invincible as compared to being in my teenage years, and it will progressively be worse as time goes on.

That's all I will write here for now, till the next update.

Sunday, February 06, 2022

Clearing Some More FPSes in My Steam Library

I feel much better today, with the much cooler weather and having a good night's rest.

I completed Serious Sam 3: BFE. Man, it was such a grind, with wave after wave of enemies. It made Doom Eternal and Doom 2016 feel like a relative walk in the part (except maybe in Nightmare! difficulty). As someone has said before, never before has a first person shooter game demonstrate extensive use of the `S'-key. For the uninitiated, the `S'-key is the backpedal key, a completely necessary movement just for survival purposes. It is one of the few first person shooter games where I relied more heavily on my rocket launcher for area damage to take out the large swarms of mobs as compared to using the most powerful shotgun that is available a la Doom. The final fight was gruelling, with a new mechanic of a jet pack and associated poles that needed to be thrown like javelins into the back of the Big Bad Final Boss to draw lightning to stun/slow down its regeneration just so that lasting damage can be done via the heavy weaponry that I had.

Very cathartic, to be had.

I also completed Bright Memory Infinite, an interesting one-developer first person shooter with mechanics that remind me of Shadow Warrior and Shadow Warrior 2. There is a mix of both gunplay, and a variety of powers-based melee attacks, sort of like the class-specific specials from say Borderlands, but without too much of the skill tree elements. It is the ``full game'' version of the original Bright Memory, a sort of tech demo of sorts. I completed this on ``easy'' though, because I really wasn't in the mood to be dealing with unnecessary difficulty.

It was still quite fun. My favourite combo was to alternate sword strikes with shotgun blasts while dealing with the ``ancient warrior'' enemies. It was also the combination that I used a lot when fighting the boss characters as well.

I tried to play a bit more Ion Fury, but was a little turned off by the rather weak weaponry. I suppose it might be time to start on Crysis---I seem to have it in my Steam library.

And with that, I'll probably turn in for the night or something. Till the next update.

Saturday, February 05, 2022

My First [Proper] Pyramid in Minecraft

This is a prepared entry; it wasn't written near the time in which it was posted.

This week... it has been a bust of sorts. I had been feeling a tad under the weather, partly due to annoyance from work, partly because my stupid finger tips are still having those cracked fissures in them (and I need to type on the keyboard for a living, so go figure), and partly because the weather has been erratic and causing me to feel awkward in the head due to poor quality sleep.

It wasn't a complete bust, because I managed to completely clear the peninsula sand-desert that I was referring to, and built my first pyramid in Minecraft. That's right, my first pyramid. I've never really built one of those properly before---the iron block pyramids needed to sustain the beacons don't quite count.

I wanted to build the largest orthogonal pyramid (i.e. with edges parallel to the natural grid structure in Minecraft) in the cleared space, and settled with a base that was 2×20+10=50 blocks by 2×20+9=49 blocks, and a height of 37 blocks arranged in a 1--2 step pattern from the base. I ended up with that 1--2 step pattern because a single-step height increase seemed to create a pyramid that felt a little too short relative to the base dimensions.

The main building block was the sandstone that I obtained from clearing the land. But I didn't stop there---I covered each top surface with smooth quartz slabs to deal with the mob-spawn problem (I didn't want to mar the pyramid with ugly torches, and mobs did not spawn on surfaces where the lower half was a slab), and to fit the aesthetic of the original limestone pyramids being covered with white ``casing stones'' for the smooth and flat finish. Considering it is Minecraft, there was a limit on what ``smooth'' meant in an angled structure like a pyramid.

Anyway, here's how the pyramid looks at night from some height (in spectator mode, obviously):
Here's the same pyramid, but at ground level:
And here's the interior, which houses the fully-powered up two-beacon set up (Jump II and Speed II were used to make navigation on the surface of the pyramid faster) with their own topping of smooth quartz slabs for the same reason why the exterior was topped the same way.
The observant might realise that the beams from the beacon in the interior are of a different colour as compared to the ones to the exterior. That's because I added a yellow glass and a white glass at the very top of the pyramid to further shade the beam colour.

Note that the base is completely hollowed out of all sandstone and sand, with glass replacing at sea level. Mobs don't spawn on top of glass, but they spawn on the non-glass blocks below it due to the darkness of the interior. They are completely contained by the glass though, so I can keep the hollow interior of the pyramid looking as mysterious as it is this way.

That's about it for this entry. Again, this is a prepared entry that was not written at the time when it was posted---I am in no condition to be writing anything today.

Till the next update.