#### Types, Kinds, Classes, hinting
- Types may affect different layers of data flow. The economics of
type systems ( policy design and enforcement ) comes down to the
trade-off between PREEMPTIVE and AD HOC checks.
- Lexing : Lexical layer : specific graphemes may indicate tokens which are
about the type system.
- Parsing of semantics : Abstract syntax layer(s) : Tokens may indicate
1. that specific data is of a specific type,
2. that specific types are related in certain ways, or
3. that specific types are required, allowed, or prohibited,
from any operation.
This is essentially a "compile time" opportunity to find data
that is not where it is wanted. The complexity of analysis at
this phase may vary, throughout various stages before the final
machine code is produced.
- Runtime type checking : this may be implemented in both
interpreted or compiled runtimes. The most performant code is of
course, compiled code with no runtime checks, WHEN CODE IS
PREDICTABLE. Whereas, CODE THAT BRANCHES HEAVILY may be more
performant with just-in-time type checking, depending on the
specific nature of the code.
2025-06-04 at 4:02 pm
Type Systems and Politics : prejudice
Poverty and Disempowerment in Malaysian Culture
I have made interesting friends in Malaysia. Some are rich, and some are poor. Some are rich or poor, by accident; others work hard, to stay rich or poor. I am happy for all of them, as long as they are each individually happy.
But all live in a poor society. A poor society means that, power is unequally skewed towards the few. A rich society means that, power is distributed rather equally among everyone.
It is a very specific strategy, to aim to be among the few powerful people in a poor society. Choosing this strategy means that you must work hard to maintain and increase inequality. An obvious tactic, is persuading the powerless many, either (a) to be ignorant of their disempowerment, or (b) to believe that their disempowerment is good for them.
- A variety of (a, b) is spreading the belief that disempowered people should gamble on their improbable chance of joining the powerful few.
- A variety of (b) is spreading slave morality, a more complicated subject.
Where do you see yourself in Malaysian society? Do you think it's better if most of us are poor, and a few are powerful? Or if power is available to everyone?
After all, however, it doesn't matter, as long as you are happy.
Doctors are Engineers : Healthcare mismanagement in Malaysia
Malaysia is one of those places where STEM goes to die.
Don't believe me? You just look at KKM.
- 1. Medicine is an engineering discipline. Hah?
- 2. Yes lah. Engineering is the application of science under operational urgency.
- 3. Just follow the money. When KKM fails, you will understand.
- 4. Look at how we treat out people. Look at how we treat the people, who treat our people.
- 5. Our doctors are mistreated.
You all don't know how to manage engineering talent.
2025-06-03 at 11:09 pm
Going Global : after a hiatus of nearly 20 years
Reddit was founded in 2005, the year I graduated. HackerNews was 2007.
At those times, I had very little working knowledge of the software engineering industry, and I was in no rush to pick it up since I was under the impression that I was far-far-far behind everyone else, and should just focus on anthropology in Malaysia for some years. ( Moreover it was a known quantum that documentation would improve over time, and that quant work being more deskbound than anthro, would be something more suitable for older than younger age. )
I really didn't get into Reddit and HN for a very long time. I might have chucked a few fanciful posts at it, but there was no need to plumb the network very seriously - even my hipster colleagues used Reddit more than I did, for their non-technical interests. Anyway, in 2025 I'm amused to be finally more active on these two sites. As I frequently tell folks in my circles ... Malaysia is where STEM goes to die, and since I'm looking into very upstream stuff like Programming Lanaguage Design, Type Theory, Set Theory, and Foundations of Logic and Mathematics ... I pretty much have no local groups to harass, not even online.
On we go ... such is the student life.
Data Flow Terminology : Symmetries ( conventional, and otherwise )
Symmetricalising some dataflow terms :
- - input, output; 0-to-N, Q-to-0; pipe-from-source, -to-sink; generator, consumer;
- - fanout, fanin; N-to-P, P-to-Q; unfold, fold; increase, reduce; infer, filter;
- - map; P-to-P
Common : Matrices as Lenses upon Graphs
Adjacency List
- X : single-column
- Y : node-pair list -> fairly dense
Adjacency Matrix
- X : node list
- Y : node list
- Z : edge count -> a sparse matrix
Incident Matrix
- X : edge list
- Y : node list
- Z : properties of edges, e.g. weight -> a sparse matrix
Degree Matrix
- X : node list
- Y : node list
- Z : degree of each edge -> a diagonal matrix
- [ Degree Matrix ] minus [ Adjacency Matrix ]
Communication Tendencies, and the Consequences of Personality in Teams
The more stressed an extrovert is, the more they communicate, and this results in a negative feedback loop and a self-correcting system. The more stressed an introvert is, the less they communicate, and this results in a positive feedback loop and a non-correcting system.
As an extrovert in the workforce, I was unfortunate to encounter too few bad soldiers over the early parts of my career. When I was first tasked to run an entire business, one of the first mistakes I made was not anticipating the group behaviour of introverts.
Many introverts were incapable of coherent arguments among each other, such that my intervention was required at various points. From this I had to learn to increase the strictness of my protocol definition, in setting mandates for staff.
Of course, this is just one definition for introversion and extroversion. In other texts, you might find other definitions being used.
2025-06-02 at 3:54 am
an Underpants Gnome Model for Collecting Maths
Preparing my tools to study maths
Day 2 of the monthend. Good time to chill and reflect. Current attack plan is :
1 : the TPL generator
Outputs : TPL, via LDD and SGAS
Write a friendly UI, that helps the user to specific the parameters of an arbitrary target programming language ( TPL ), compiling to some programming language description document ( LDD ). From the LDD, generate exemplary source code in the described language. Upon the exemplary source code, show the user how a lexer and parser will operate. Inconsistencies in the LDD should become obvious, so it may be possible to lead the user to iteratively debug the LDD. The parser should output some sort of standardised generic abstract syntax ( SGAS ). Compile the SGAS to JavaScript. Use JavaScript because it is easy, and also a vastly deployable medium.
( In the future, hardware idioms should be presented, to demonstrate target implementation concerns, during the iterative LDD creation process. At least include : bare metal vs. virtual machine, memory layout, OS processes and threads, green threads and alternatives, memory management and locking, async, etc. Eventually it should be possible to model all intermediate storage representations and the operations conducted upon them, in varying degrees of detail, depending on the present needs of the user. )
Implement Program 2 using Program 1, as a matter of dogfooding.
2 : the TPL
Outputs : a study tool, via CND and GLDO
Design and implement a simple TPL, which has a lexical layer capable of easily representing the most common notation, used in the quantitative reasoning stack, of our current civilisation. In other words, the TPL should be good at representing the various notations used in STEM subjects, particularly the arbitrary 2D layout of text and numbers, without much concern for how that is subsequently processed. This capability is the capture of notational data ( CND ), terminating in a regularised object storage format. This should be the main frontend concern of the TPL.
The TPL's middleend concern should be, to have available internally, various idioms of operating upon arbitrary data, from first principles. This will require a review of information processing techniques, across rudimentary logic, grammar, set theory, arithmetic, and geometry ( the liberal arts ), and the subsequent creation of some sort of generic library for data operations ( GLDO ), during the iterative process of LDD development.
The TPL's backend should be mosly handled by the TPLG, so it should not be highly concerning to the user at the early stages of using the TPL.
Finally, the UX of the TPL must be facilitated with a practical guide to iteratively mapping, from the output of CND, to the GLDO. Thus the TPL will provide an environment for the user to study unfamiliar notational data used in STEM.
3 : Profit
Finally, should the above be accomplished to a reasonable degree, then I will finally regain hope that my study of maths can begin, upon reasonable tooling.
2025-06-01 at 7:24 pm
Aligning maths, humans, computers, and everything else.
"Consciousness" is a rule-oriented* process - by which a part A of the universe, models a part B as an information system. A and B may overlap. One says *oriented vaguely, so as to casually preclude epistemic overreach.
"Language" is simply the operation of consciousness. Languages may be more or less precise.
"Maths" is simply language for professionals. We speak of "pure maths" being oriented about the 'a priori' machinery of thought itself ( grammar, logic, and friends ), and we speak of "applied maths" being oriented about the 'a posteriori' data from beyond the machine which it ingests ( the domain of the arts, history, and the natural and social sciences ). That is why traditionally, 4/7 of the liberal arts subjects are about language and maths : these are the things to be pursued by the Free, defined as those who are not the Slaves.
"Computers" are simply machines whose purpose is to do maths. Thus given the definitions above, computers exist to pursue consciousness.
The "usability" of a computer system, is intrinsically found in the coherence between its consciousness, and that of its human users. This is canonised in the field of "human computer interaction / HCI " studies, which subsumes the study of "user interfaces / UIs" and "user experience / UX".
I write this brief recap in between my daily work ... where currently I am trying to build a tidier computing system, for myself. Particularly this week, I am studying the theory of Types and Sets, and how it is implemented in our everyday Programming Languages.