Jim Cheung

Sunday, September 01, 2024

read this back in June, Start all of your commands with a comma

as the number of my tiny scripts grows, I finally decided to adapt the idea

Tuesday, September 03, 2024

Greppability is an underrated code metric

I have my own grep-like tool (cli and web) to help me navigate code base, it's much faster and flexible than using an IDE

however it has it's limitation, I'm trying to enhance it by treesitter, I've been collecting tools for testing later:

Wednesday, September 11, 2024

to check a distroless docker image:

FROM [image-id] AS src
FROM alpine:latest
COPY --from=src / /
CMD ["/bin/sh"]


for docker compose, use depends_on to control startup order and use profiles to run optional services

Tuesday, September 17, 2024

reading Server-Driven Web Apps with htmx

learned a new trick: lazy load an element, use revealed trigger:

<table hx-get=​"/weather/forecast"​ hx-trigger=​"revealed"​></table>

Friday, September 27, 2024

llm is very good at Java, I used it to write many tiny GUI programs to improve my workflow

mostly it's just pure Java, I used a makefile to run it:

APP_NAME = DrawRectanglesAnywhere

.PHONY: all clean

all: compile run

compile:
	mkdir -p build
	javac -d build $(APP_NAME).java

run:
	java -cp build $(APP_NAME)

clean:
	rm -rf build

I have another more complicated makefile that can handle dependencies, resources and fat jar

Sunday, September 29, 2024

tried a new editor: Haystack

first I don't really like it, but after using for a while, I can't go back to the normal tab based editor

more similar apps and papers:


I changed my local llm model to Llama 3.2 1B, it's fast and reasonably good

Blog Archive