hp
toc

Got hooked: error backing

2024-01-20, post № 282

systems-design, #implementation-pattern, #lang:go

‘Got hooked’ is a miniseries about my experiences and findings pursuing proper Go.

At first glance, type error interface{Error() string} may suggest a named abstraction ⸺“the error”⸺ with which one can only interact by querying its character representation.
Mindful of the inherent complexity spawned by the plethora of erroneous states a system might find itself in, and in lieu of academic progress the last decades could have brought infusing type systems with benign systems-engineering-relevant semantics, more pragmatically-inclined folks have substituted lack of semantics expressible within commonly understood typing concepts with soft contracts one is expected to follow does one wish to attain wholistic system cohesion. Most unfortunately, these soft contracts are most pitifully communicated.

It is not wise to depend on an error’s textual representation. It would be a shame if in 2815 the Extraterrestrial Orbit Federation’s explicit declaration of outage signalled the error-free termination of a response stream:

package comms

import "errors"

var (
    ErrOutage = errors.New("pkg.eof.io/interplanetary/comms: EOF outage")
    ...
)

Because of this, e. g. operating system errors since Go 1 are unerasable to an *os.PathError with explicitly marked domain-specific semantics. To prevent the above feared, ==io.EOF or errors.Is(,io.EOF) are superior to any atrocities one may come up with in strict compliance to the error interface, for example strings.Index(.Error(),"EOF")!=-1.

As such, it becomes apparent that more than just its character representation is expected of an error. If it is obtained by an os-mediated syscall, it is expected to be backed by *os.PathError. If it is to signal the end to a byte stream, it is expected to be (equality is not expressed through its interface) what io declares.
And since the specifics of an error’s implementation are not sufficiently abstracted away by the error interface as presently interpreted, due care needs to be put into deciding on such a backing implementation. Herein, I will present four I discovered in Go’s std source and through my personal development efforts.

A collection of theses

2023-12-23, post № 281

opinion, #future, #technology

’Tis the season, it might: I herein present a handful of theses [1] prospecting the non-past. For each, there has existed at least one day for which I rigorously upheld it.

-=-

a) Climate change’s increasing biotope transformations spawn novel living conditions in which adapted novel creatures thrive. Widespread fear about extinctions gives way to excitement witnessing new forms of life. Humanity quickly adapts and the decade-old fearmongering halts. Reflecting on how the optimisation engine that is emergent evolution has not marooned us, a new era of futuristic excitement is ushered in akin to the third quarter of last century.

b) State executive incompetence regarding internationally organised crime can no longer be upheld by societies making way for mandatory backdoors in all cryptographic processes. Soon, efficiency considerations lead to a wide-spread acceptance of unprotected communication. In turn, implementation pressure is massively reduced on now defunct cryptographic libraries, sparking a resurgence in new programming languages which are able to carve out a foothold in industry since the barriers for being a usable language have fallen. This explosion in artistic expression nestles into the fabric of human art output, is handed down across generations and respected as a societal cornerstone.

c) Politically powerful lobby-backed forces are offered resignation in political affairs with full compensation in all monetary regards by the state indefinetely; since this is most likely less expensive for the population. I see few other ways apart from utter mayhem how societal problems the likes of sugar consumption or web reliance could be resolved.

d) Privacy enthusiasts more and more retreat into a background of insignificance, leaving the majority of our population with a vacuum of position which is swiftly filled by rhetoric supporting the general desinterest in ethical or philosophical endeavours regarding data.

e) One fascinating fact about the about fifty year old saga of conducted high-frequency computing is how few software exists. Compared with the plethora of minds buzzing around on this planet, there are only a few dozen programming languages worth considering. Only a few terminal emulators in common repositories. Only a few browsers to choose from. Not a single e-mail client at offer. Comparing, any half-decent pottery has an order of magnitude more variety to show for itself. This monopoly inherent to computing appears to be an entirely new facet to human endeavours, representing the culmination of end-user-used high-complexity technology. It sustains itself and culminates in literally one or no option.

f) Big media’s profit-oriented scheming leads to products of such pittyful quality that animation pictures leave the public’s minds out of boredom.

g) Many technologies taken for granted in the olden days (C++, Git, popular UNIX kernels, ...) reach a tipping point of complexity and die overburdened by their own heritage: no compiler is able to confidently claim correctness, no file is safe in the humongous stack of abstraction meddling with bits and getting anything to boot is a miracle. Technological progress (progress here interpreted as the ratio of achieved state compared with the olden days’ status quo) falls back but probably gains a similar track as it once had. I’d wager intrinsic complexity’s convergence is nigh impossible to steer away from.

h) Due to English being a predominant tongue which both simplifies itself as it creeps into other languages whose diversity in dialects twindles the same, under linguistic constructivism the realm of thoughts humanity can conceive shrivels to a uniform, puny version of its former glorious potential.

November

2023-11-25, post № 280

poetry, #sonnet

Early, fleeting rays of sunlight gave way
to desolation grave, whole and proper:
what was presumed a mediocre day
began with ‘games’ gone awry and nowhere.
Having fled the scene quite crudely, swiftly,
November’s wet tears held me in stasis.
Of mere minutes; I sighed regrettably.
Thru cold winds I trudged to work, if remiss.
Empty faces were all I saw: blank, void.
It seemed time had left me, dug a vast rut.
Does salvation come to those who have toyed
with fin, the fiercest one of any cut?
A trembling kept me ’wake for far too long
for I detest what only will prolong.

Autumn thoughts.

2023-10-28, post № 279

conducted-computing, #politics, #brief, #ai

Of late, one pervasive thought has evermore clouded my mind: “I am only interested in the uninteresting.”

I am interested in self-emitting ANSI escape codes for light formatting. I am interested in the mere structure of UTF-8 and its implications for byte output. I see an innate beauty in discrete information representation, in ordering the soon-to-be-trashed. In classifying the unimportant.
But also in sincerely tackling the digital, its ways to see information in a purer light: unconstrained from physical representation medias, formatting idiosyncrasies or chronical decay. I find these properties a driving force in realising that the digital holds vast amounts of untapped possibilities. Untapped most likely due to their lack of sheen.

Scrolling through my university’s lecture timetable, I stumbled upon a lecture called [generative language model currently of economic relevance] in rhetoric. I am unsure if these tools will ever reach people outside the very small intersection of academic insiders and hazy fad. When the workflow gains of the humble text file were not able to penetrate the rock-like wall of ignorance over the past fifty years, how should a tool of such intricacy?

I was today (a lot of moons past the last calling had been) called a missionary in regards to digital privacy, potentially the broader topic of morally passable human-computer interaction. I don’t know if I am. But I am certainly trying to bring something to the grand table at which those infected with the malady of knowing about bits sit. And with my recent hiccough in my (bit-alien!) studies implying a delay, freeing up time for frivolous bit-minded thought, Brief development is bound to pick up speed once more.

Truly do I wonder what there is for me personally to gain from these machines. Lingering in this murk of thought, I evermore edge closer to the realisation that there nothing lies.

Giddily Gitting it wrong

2023-09-30, post № 278

programming, #git, #database, #lang:go

With GitHub soon closing its door for me with their ongoing 2FA fad [1] and the winter semester starting tomorrow, it’s about time to yank the Joy Assembler repo out of US-controlled grasp and refactor the project into a 2023-presentable state. Fortunately, I have not made use of GitHub’s non-Git offerings (wiki, issue tracker, CI/CD, …), making the hostage rescue a simple git clone --mirror.

Skimming the Git log, however, to my dismay I realised inconsistencies in my author and committer names and e-mail addresses: git log --pretty=format:'%an <%ae> | %cn <%ce>' | sort | uniq even reports the committer “GitHub <noreply@github.com>” for the initial commit which I find a tad odd since it implies I only authored my project’s first commit, GitHub immortalising its brand as the committer: meddling with the very first commit, after all, invalidates all object IDs.
Following a bettered SemVer [2] understanding, I also want to re-tag v1.0 to v0.1.0. So fully obliterating compatibility poses no hindrance for me.
Thus, seeing October as a fresh start, I want to both move repo hosting as well as sanitise my repo history’s metadata. All without losing project history, which I find important to keep: bug introductions, design considerations and personal development in how to code make a repo’s history worthwile. Defining the HEAD tree as the new initial commit, consequently, is not an option. But neither is mucking around with Git’s default CLI as losing a commit or accidentally updating the committer date to today are too likely of an outcome.
What to do?⸺Write a full Git database implementation from scratch (at least enough to read in my repo of interest) and use said API to write a one-off tool to perform the above described facelift.

Liquescent Lolly

2023-09-02, post № 277

photography, #street-photography

I do shed tears; tied down, tormented:
too many tales of tech pervailing.
In its reckless path engulfing, spreading
I find myself forever stuck.
Yet should all these horrors be let to imply
the only reasonable, to abstain?
Or can the vile potential of entropic capture
⸺ perpetuated by a figment of an agent alien ⸺
be cast aside when one does cross paths
with fleeting scenes forthwith dear to one?
2023-09-01_jonathan-frech_liquescent-lolly.jpg

It’s the clients that betray you.

2023-08-05, post № 276

software-design, #text-editor, #e-mail, #chain-of-trust, #web, #digital-politics

One of the saddest realisations I have come across while exploring the web on its protocol level over the past few years is how the majority of mineable data only crosses the wire due to compliance on the victim’s end: there is no ‘singular stateful backend’ that tracks; it is an oligarchic network of machines constantly fed back this state. Referer:, Cookie:, User-Agent:, client hints and from unfuzzed headers extractables as well as foreign-controlled scripts with a plethora of probes are all solely client-powered.
Techniques employing stochastics powered by the bits of leftover bits such as not explicitly client-informative headers, traffic correlation and profiling based on underlying IP properties is most likely still powerful enough to warrant hardening, yet undoubtedly the bulk is provided by clients.

This begs the question why so many clients are not subordinate to their users but a trojan window into a foreign-controlled service.

Yet this fight I leave to more politically-inclined folks such as the IETF, the Tor Project, Brave Software, the FreeBSD Foundation and what is left of the FSF, GNU and Mozilla to name a few. I wish them the very best but do not expect to be alive to witness their certain (!) victory.

Leaving aside the morally still inexplicit principals of data collection, what troubles me is another kind of clients’ breach of trust: forwarding unsanitised content heedlessly imbued by the client with the trust its user allotted it.

Doubter

2023-07-08, post № 275

poetry, #elektronenhirnkritik

I doubt efficiency is understood:
I doubt it not to be a mere façade,
a ploy advancing niche technologies’ proliferation
in a habitus ill-suited.
They say, escape from bits is futile
⸺at least that’s what I’ve heard.
I doubt they ever truly tried
and doubt they stand above the ploy.
A ‘fight’, some call it, with vague ideals.
I doubt they’ll ever be understood.
To force grass roots into this wasteland
I doubt to be an endeavour proper.
So the right and only goal is invardly rejection,
the obstacle oneself precisely.
Jonathan Frech's blog; built 2024/01/20 22:02:34 CET