hp
toc

Crashing GC in 57 bytes

2024-05-27, post № 287

programming, #lang:go, #internal-compiler-error

Terser than GCC’s C++ (cf. 235), Go’s standard implementation can be forced to doubt itself in a mere 57 bytes:

$ go version
go version go1.22.1 linux/amd64
$ printf 'package main;func main(){panic(0);x:=0;l:for{goto l};_=x}' >/tmp/ice.go
$ wc -c /tmp/ice.go
57 /tmp/ice.go
$ go run /tmp/ice.go
# command-line-arguments
CLOSURE [/tmp/ice.go:1:56:var x int]
<unknown line number>: internal compiler error: assertion failed

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new

Without having analyzed the compiler, black-box behavioural poking revealed that truly fickly a panic has to be followed with a variable declaration whose use entwines a label; else all one gets is an immediately-panicking or non-terminating executable:

package main

func main() {
	panic(0)

	x := 0

l:
	for {
		goto l
	}

	_ = x
}

At first, it irritates you, since⸺although you expect a plethora of compilation and test failures whilst developing⸺the error looks off. At closer inspection, a joyful rush grips you as you might be the first human being engaging in this specific dialogue with your compiler. So you stop everything else and golf away to extract an erroring nub. Whole swaths of code you rip out without a care for your program you once developed. The tiniest of changes⸺even ones which go in between equivalent source formulations⸺make the compiler snap out of its delusions, rendering it able to produce an executable. But you persevere, wanting the compiler to fail again and again at compiling a program without any use.

Cf. Go issue #67661

Schwund

2024-05-11, post № 286

politics, #diary, #elektronenhirnkritik

“Mir gelingen keine Lieder mehr, die ich mit wohl­ge­stimm­tem Saiten­klang begleite. Denn Lieder sind das Werk sorg­loser Phanta­sie. (...) Ich schreibe, und meine Au­gen werden be­taut von quel­len­den Tränen.” [N [1], S. 158—171: XV: Sappho Phaoni]

Es fällt mir zunehmed schwer, einen frohen Gedanken zu fassen, wenn ich die Haustür verlasse: ein erschreckender Teil meiner gemeinhin als Mitmenschen Bezeichneten ist dahin über­ge­gangen, Spion in Auge und Ohr für Unbekanntes zu spielen: in Videochats zwingen sie, ohne meine Person zu beachten, mein Abbild in die diffusen Zwänge der Cloud, in ihren Spionage-getunten Auto­mobilen überfahren sie überlegen grinsend meine Persönlich­keits­rechte, Überwachungs­kameras werden weit auf den Bürger­steig geneigt und Tür­klingeln filmen auf die Straße, wo sie meine Privat­sphären­ansprüche als EU-Bürger im öffentlichen Raum zertreten.

Ich halte für eine besonders in den letzten Jahren grundlegend verschlafene Komponente die durch unsere Gesellschaft triefende Inkompetenz, aus der sich im Lichte der komplexen Folgen von Digital­technologie­nutzung schnell gefühlte Boshaftigkeit entwickelt: Anscheinend werden rechtlich oder moralisch vertretbare Winkel für Festmonturkameras nicht beachtet, Systeme wer­den in mangel­haft bis ungenügendem Zustand — erstellt von Individualvorteil-fröhnenden Ig­noranten ohne Gespür für Gesamtgesellschaftliches — ausgeliefert und in Betrieb genommen.
Cyber­security hat sich von einer geistig lohnenden Spiel­wiese diskreter Strukturen im Schnitt­gebiet zur Wirklich­keit zu einem eintönigen Er­nüchterungs­fest mensch­licher Ab­stumpfung ge­wandelt.

In diesem Sinne steht der Hoffnugsvollerer erdachten “friedlichen Koexistenz” [B24 [2]] gegenwärtig nicht bloß ein erschütternder Identitätsverlust entgegen sondern mithin eine kindliche Blindheit ihrer Unmöglichkeit [H80 [3]] der Implementation gegenüber.

Der dadurch resultierende, weitreichende Vertrauensverlust sollte auch nicht vernach­lässigt wer­den: falls sich nicht in vielen Köpfen eine Entprüdung bezüglich Datenverfügbarkeit breit macht — eine Gesellschaft ohne Geheimnisse der einzelnen Teilnehmenden ist zumindest im Grauen durch­aus denkbar — halte ich einen abrupten Kipppunkt, ab dem die kontinuierlich auftretenden, jedes Mal un­ver­zeih­lichen Sicherheits­patzer schlicht zu viel und un­trag­bar werden, für un­ab­wend­bar.

Ich gucke tatenlos zu, wie eine Welt, derer ich kein Bürger sein konnte und deren Schönheit mir bloß in aufgebauschten Erzählungen und brüchigen Artifakten vorliegt, unwiederbringbar in Trüm­mern versinkt.
Sollte es tatsächlich so sein, dass mir diese Gesellschaft einen Platz in ihr nicht verwehrt, so zeich­net sich fortschreitend klarer ab, dass ich das, was sie mir vorlegt, aus tiefem Ekel ablehne.

Dead nonmatter

2024-04-13, post № 285

poetry, #bits, #sonnet

Is seeing living but a ploy of mind?
Homogeneity’s attractive lure?
A proof between all beings of one kind,
shutting the door to wicked truths; fait sûr.
A bit’s nigh nothing: can’t breathe, can’t be, can’t.
Though huddling is their keen forge of jesters.
United by a vivid, voiceless chant;
unconstrained by time, certain to best us.
Sweet the scent of already having met,
cold states are gifted kindly a free pass.
Lost in their glamour, it is mine to fret
deeply felt ambiguities too crass.
Fusing nothingness with emptiness with ∅,
sparringly portraying themselves as kith.
wnlevol.png
Extra assets: wnlevol.go

Conceding to complexity

2024-03-16, post № 284

complexity, design, #language, #lang:c, #lang:go, #lang:haskell

In learning natural languages at higher levels paralleled with learning about their rich histories interconnecting peoples across millennia, I came to realise how shallow programming languages truly are: in some sense, everything is C or embedded into a world resting on it. Quite possibly such is not to be surprised by in view of the immense limitations an encased die cannot circumvent in our real world: computing is all done in structures borne by information state, discrete and conceptually restricted as they are.

Possibly in growing up, I grew dull to the glamour: isomorphic notation chit-chattering about same old, grand abstraction promises shattering at the coasts of implementability. What’s left after peeling off all rouge, all blush seems to me to be but one: complexity itself.
Unveiled it stares at me, neither grinning nor sighing: unconcerned with oh so many human sightings, never able to contain it, engineering failures galore.

I had an experience of late which shook me to the core when a linearily implemented base64 decoder of mine in Haskell lead to a complete program crash due to memory exhaustion (on a system boasting 16 GiB RAM plus swap), most likely due to exorbitant thunk creation. Coupled with awfully obtuse dependency and test management, I began feeling overburdened with the thought of writing in this lovely and expressive tongue I held dear for so long.
While beautiful five lines long, shapen into systems on which the outside world may press, complexity oozes out of every nook.

Appreciating the intrinsic nature of complexity, it evermore bothered me the last couple of months what I wrote in 250. a) Its claim is factually wrong: due to the subtleties involving the interplay of interface satisfaction depending only on a method’s name, removed from its provenance, yet non-exporting fully isolating a name, implementing package-bound sum types is supported in contemporary Go: sumtype.tar
b) Of even greater concern, however, is its subliminal stance valuing feature implementation as a meaningful action to overcome felt shortcomings. Here of particular relevance is the comment that recursive ADT definitions are not implementable without indirection (as infinite types exceed any finite bit representation), excerting conceptual pressure on the value classification (meaning non-pointer syntax in a recursive setting would have to either be forbidden or implemented differently to how it looks on the page). It is oh so easy to get blinded by supposed features that amount to little as rewritings, serving as distractions from the tiny specks of complexity one is seldom lucky enough to woolily make out.

Hitherto exactly one tool has been found to contain complexity: ruthless adherence to simplicity. One shouldn’t give it up in exchange for but shinier polish.

Nothing left.

2024-03-02, post № 283

politics, #software

Apparently⸺I am consciously out of the loop⸺, hot in academia nowadays is reacting to the societally desastrous questions raised about the indivdiual and their rights in the advent of profitable NLP; inventing some notion of anonimity. A tough sell when for years one perfected methods to reconstruct uniquely identifiable traits out of anything which wasn’t true noise.

At FOSDEM’24, A. Kergon [1] claimed that telemetry would be necessary in the present day with free software (in the original MIT sense exempt of monetary obligations) extinct and open source fools running out of spending power. He postulated industry-accepted anonymisation practices may lead to a synthesis of keeping certain parts of the free software promise while alleviating the development burden for underfunded teams by supplying them with data about how to effectively allocate their resources.

When we have reached a point where open source is in its semantics being stretched wide enough to allow flat-out telemetry on the operating system level, I have to seriously ask: What is there left?

Free software existed for as long as it existed on the fringes: hardware support was for decades lagging five or ten years behind and has in modern times only been solved by including proprietary blobs directly into the kernel. Free software never interoperated well with the proprietary formats required to look into the fabric of reality, forever more banishing it to its fringes.
For years I have been silently lamenting the seemingly omnipresent and never-halting urge popular projects seem to feel to become lacklustre copies of profit-interestedly successful products: Gnome copies Cupertino, KDE copies Redmond. AppImage copies Remond in program distribution who copy Cupertino in software indexing which is copied by FlatHub, a joint venture of Gnome and KDE. Modern open source is barren of any invention, barren of any identity observable from within the product.
Interwoven with its identity is putting up with mediocre functionality kept alive by an intrinsically political, quenchless hope for a morally acceptable usage of computing.

And yet, with arguments to now cater to the usager incompétent (cf. 271, 265), demolishing this last pillar is entertained.

But who truly is this usager incompétent who installs open source? I claim they don’t exist: when Thunderbird, one of the larger projects which is available around both Redmond and Cupertino, proudly counts around eleven million users [2] [3], I claim the principals I thought to fractionally share are being abandoned for a group comprised of no one.

Free software is dead. There is nothing left.

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.
Jonathan Frech's blog; built 2024/05/27 06:43:58 CEST