Jim Cheung

Thursday, November 02, 2023

super crazy stuff: Cosmopolitan Third Edition

don't have time to try yet, but really want to test the redbean web server

interesting: Tracking SQLite Database Changes in Git

Why I Won't Use Next.js

have to say the next.js stack I'm currently working on is very complicated LOL

maybe I'll try out remix someday

Friday, November 10, 2023

ishan0102/vimGPT: Browse the web with GPT-4V and Vimium

an interesting idea to use Vimium in webdriver for navigation, I also played a lot webdriver these days, I should try it

the next thing I'm going to try: How to write a linter using tree-sitter in an hour

Surprising Facts About New CSS Selectors

I should move my css to nesting selectors

while this is useful: Find and Replace Code at AST-level with Semgrep

but the real interesting tool I found is ast-grep/ast-grep: A CLI tool for code structural search, lint and rewriting.

when you have teammates who love rebase LOL:

git rebase: what can go wrong?

I also like the top HN comment:

The golden rule of rebasing

Once you understand what rebasing is, the most important thing to learn is when not to do it. The golden rule of git rebase is to never use it on public branches.

good read: Understanding the Origins and the Evolution of Vi & Vim

Thursday, November 16, 2023

while adding more and more tools to my notebook app, I found myself constantly switching tabs and got frustrated quickly

I tried setup a layout with iframe, usable but hard to resize. then I remembered I played a little winbox before...

winbox is great, plug n play, with a custom right click menu now I have a virtual desktop

one thing is still missing – terminal, I checked many options, settled down to gotty. too bad it removed hterm, can't customize colors now, but still the easiest solution

some good reads:

Friday, November 17, 2023

start playing tree-sitter, first watched this video: Tree-sitter - a new parsing system for programming tools - Strange Loop

$ npm -g install tree-sitter-cli
$ tree-sitter init-config

it prints out the generated config file path, edit parser-directories to include folder that you checked out grammars

the cli comes with few tools (if the language supports): parse, query, tags, highlight

some docs here: Tree-sitter|Code Navigation Systems

the tags are not ctags, here's a project I found to generate ctags npezza93/ttags: Generate ctags using Tree Sitter

the highlight output I can used to replace prism, ansi2html is the tool I used

the next todo is extract symbols from a file (just like github) and able to quickly preview it

Wednesday, November 22, 2023

finally upgrading to emacs 29.1

it has tsx-ts-mode built-in, but need to setup tree-sitter first

treesit-install-language-grammar and do the interactive config

tsx as example, the language is tsx, repo is https://github.com/tree-sitter/tree-sitter-typescript, tsx/src for parser.c, all the rest just press enter

then enable the language server m-x eglot

I have right click menu enabled, easier to access basic navigation

(when (display-graphic-p)

the whole setup is really simple, now I should learn Combobulate: Structured Movement and Editing with Tree-Sitter

Blog Archive