Phantoms
2023-08-23   dejbug.github.io

Phantoms

Happiness is waking up and nobody telling you what to do or by when to have done it. But more precisely it is waking up and immediately thinking, being able to think, about some of the many little projects you have going. It's only once you get a good, let's call it overview about a problem that the amorphous blob acquires structure and structure is what the mind can get to work on readily. Happiness is having something for the mind to latch onto.

TRF Syntax Definition

I would make the syntax file as complex as you want, but for a first version, a version that other people will be looking at and working off of maybe, it would be wise to keep things simple. So let's stick with best-practice and conventional recommendations for a minute.
The scopes documented below are a recommended base set of scope names to use when creating a syntax definition. -- st
The /opt/sublime_text/Packages/C++.sublime-package zip is actually all one needs, scope-reference-wise. Morover the syntax_test_c.c by itself is already more than sufficient; having the same function as a painter's color palette, essentially. So I've moved things into their own repo gh and have written up what had cropped up in the README there gh. Ok. I've found an okay use for Sublime Text over and above the highlights. Though in the process I was frequently wondering whether I should have worked on a SciTE integration instead . The old way of adding syntax to SciTE is deprecated scintilla in favor of Lexilla scintilla gh. The last paragraph hints at the possibility of adding new lexers dynamically, without recompilation. Also I remember vaguely that PEG bford.info bford.info lexers used to be supported via Lua inf.puc-rio.br staff.fnwi.uva.nl. But the syntax highlighting is half the story. It feels like in SciTE you have more control over the editor. The code is old-school and hierarchical. And the docs are far superior!
For languages that can not be lexed with the existing lexers, a new lexer can be coded in C++. These can either be built into Lexilla, or put into an external module and loaded when SciTE runs. See Lexilla and the lexilla.path property. -- scintilla

RTFM

The Sublime Text docs are so abysmal that users had to write their own gh. Futhermore, these unofficial docs were so popular and useful to the hoi polloi that some of them were willing to pay app.bountysource.com for it. Even though there is still much more left to write trello.com! Also see this gh and this gh about BountySource wiki.

Still, Sublime Text

I'm stuck with it for now. The syntax highlighter is fine. And there's no recompilation necessary, which was its major selling point. The auto hinting system I imagined can be realized after all, I reckon, with ViewEventListener st and (the somewhat under-documented) #Phantoms st. And it does look beautiful. With the industrial_coding theme packagecontrol.io and the Mersi color scheme packagecontrol.io.

Future Creep

I will have to complicate the syntax anyway. It's not very useful in the current form. I hope they have provided for a mechanism to avoid gratuitous nesting. It would make sense for a thing like that to be there. There's this unfortunate detail about Phantoms; they remind me of how ST handles bookmarks. It binds to ranges, selections, not to line numbers. You could end up having dozens of bookmarks all on the same line and then wonder why toggling doesn't seem to work. I really miss the clunky feel of SciTE but: Python over Lua, Lua over Emacs Lisp, Lisp over ... what was it that vim uses, what was vimscript? They are differnt tools for different things, I feel. SciTE has no macros, which sucks. ST has better macros than it used to have, but some things still don't work, apparently (copy and pasting mid-macro, for example). Vim would be perfect if it didn't feel like the console editor that it truly is, and most wonderfully so. Let's not even talk of the new ones, VS Code for instance, which are trying to be too helpful only to be getting in the way. The editor should never draw attention to itself. Writing in those hyper-assisting editors feels like going to the disco. All those flashing lights. Triggering seizures. There's also TextAdept orbitalquark:gh gh aur:arch, which wants to be what I would love it to be but last time I checked the startup script looked a bit too messy and I moved on. It's time to give it another look. If it were Python based rather than Lua I'd jump on it immediately. I feel like SublimeText is good for now. Writing extensions for it is not too much of a pain. Vim is #1 for a great many things, remote work being one. If there only were a proper GUI mode for it! Instead it feels like there's a thick hard glassy pane between us. Like you can't reach through to it. It's clunky in a bad way. Don't ask me to define the feeling but it's not just phantoms of the mind. It has real effects on my behavior. There really should be nothing far more beautiful than a nicely colored screen of code.

TIL

Static sites with Vue vuepress.vuejs.org. You can wiki crowdfund an experiment experiment.com.

Transcending Binaries

This warms the heart :
FIDE and its member federations more often receive recognition requests from individual members who identify themselves as transgender. doc:fide
guardian wp npr nyt fortune.com edition:cnn The passage that was of universal interest to the press:
If a player holds any of the women titles, but the gender has been changed to a man, the women titles are to be abolished. ... If a player has changed the gender from a man into a woman, all the previous titles remain eligible. hb:fide
Makes sense. WGM is after all the gendered version of GM. But that is all the charity they had time for really in their new regulations.
FIDE's transgender policy is ridiculous and dangerous. It's obvious they didn't consult with any transgender players in constructing it. -- WGM Jennifer Shahade chess.com
I am lucky I was trite / My parents guessed my gender right .

GitHub MFA

Github gh just asked me to get real csrc:nist and be adding one more auth factor and stuff. gh.blog Apparently this was going on since March already. Open source being ubiquitous openuk.uk, deserving to be safeguarded from impersonation. We've all heard the horror stories. They are probably going to switch to something called passkeys soon fidoalliance.org. They made me think about purchasing a YubiKey yubico.com support.yubico.com yubico.com. I feel a little less secure knowing that I could lock myself out by simply losing my phone. Forces one to think about things. Which is probably a good thing. w3c:gh dev:moz

Auditing

Remind me to go audit all the ST packages I've installed. Mostly themes. For now I've disabled Package Control's auto-upgrade feature, just because one never knows and really there is no need to update anything with the themes I have so far. I don't particularly enjoy people being able to push self-executing code to my machine at will. Such things should be run in a sandbox, WebAssembly style. I guess I wanted my cake and be eating it too. Pass the potatoes please?
A perennial plant (Solanum tuberosum) in the nightshade family that was first cultivated in South America and is widely grown for its starchy edible tubers. -- wordnik.com