Yes! You know what it is, don’t you boy? Shall I tell you? It’s the least I can do. Steel isn’t strong, boy, flesh is stronger! Look around you. There, on the rocks; a beautiful girl. Come to me, my child.
I’ve been writing my own render framework and component library for about a year now.
One thing I enjoy most about it is that the types are automatically inferred. There’s a lot of Typescript wrangling going on, and it gets really deep into what TS is capable of and barely capable of (polymorphic this, dynamic return types based on input, Class type reconstruction, mixins that influence both static and instance properties, event listeners based on event name, typed property watchers based on property name).
It’s all written in JavaScript with “JSDocs”. It’s not really JSDocs because there’s a lot of recursion that’s not possible with regular JSDocs. It’s TS type information slipped into JSDoc comments.
But that is to setup the ability to tap into inferred types. The actual code that’s written (eg: components) is fully typed check with little or no type declaration.
The reality is, no complex piece of code should be written without some form of type checking. TS isn’t perfect and if there were something better, I’d move. Alliances are stupid. There are problems with some things that have not been, and likely will never be, fixed. But what type-checkers should do best is infer types dynamically.
The result means all my code today just runs in the browser. I don’t have to wrangle builders or compilers (bye Webpack!). At most, I use just esbuild to minify, though it’s an optional step, not a mandatory one. If I want to mess around on Codepen with my library, I can refer to a git commit directly and load the file. I don’t need npm to package and release. (CodePen Sample)
It’s becoming a lot easier to use the internet a lot less. It’s been turned into such a user-hostile space so domineered by corporations and fascists that most of the internet doesn’t really hold much of an appeal anymore, at least for me.
If the internet died tomorrow and didn’t come back, I’d be annoyed about not being able to use it to order food, manage my bank account, or watch shows/movies, but the world would likely be an overall better place once logistics re-adapted to not having it.
The internet was cool for the first 10-15 years, but it’s been a rapidly worsening cesspit for a long time. Nothing the internet can offer us is worth also tolerating it as a tool for inescapable government and corporate surveillance, and as the most effective imagineable breeding ground for fascism and disinformation.
The internet makes our lives worse in so many more ways than it imporves them, and people are too fucking addicted to it to give a shit.
One cool thing is that the comments are self documenting. I read the program earlier and it’s quite clear what it does. Excellent accomplishment, dear colleague!
programmer_humor
Top
This magazine is from a federated server and may be incomplete. Browse more on the original instance.