lab

9/2/2024

Reading more about service workers after round-tripping from SvelteKit -> Eleventy -> Astro -> SvelteKit (not because one was “better” than the other, still has tradeoffs). With MPAs (Multi-page Apps) the chossing a cache strategy usually involved deciding if it was worth saving each pages. Then to get a list of cached pages:

caches.keys().then((keys) => {
	keys.forEach(async (k) => {
		const cache = await caches.open(k)
		const keys = await cache.keys()
		console.log(keys)
		pages.push(
			...keys.filter(
				(k) => k.url.includes('html') 
					&& !k.url.includes('offline.html')
			)
		)
	})
})

With the Client-side Routing from SvelteKit, that tradeoff is gone. Individual components get saved separately, so I can cache the lab/[slug].js file needed to create this page once and then only request and savecontent.json to display these words without downloading an identical copy of Nav, Next/Prev, or <head> again.


7/1/2024

Refactored the code for nft-folder, as I’ve been getting a hang of Rust’s borrowing and tokio. This let me loop a cursor through API requests so I could start the download process before getting a complete list of items in the wallet.


10/9/2022

#3d

graphics card glitching out whenever my computer sleeps… 😳 I think I like it


8/24/2022

#software

personal software has good vibes