Journal

34 entries under "code"

Friday, February 2, 2024

Tenets

Instead of striving to be the fastest or smallest or whateverest, we explicitly aim to be the framework with the best vibes.

HTML, The Mother Language

There’s a subtle line between something feeling magical, and something feeling like magic. We want Svelte to feel magical — we want you to feel like a wizard when you’re writing Svelte code. Historically I think Svelte went too far into magic territory, where it’s not 100% clear why things work a certain way, and that’s something that we’re rectifying with Svelte 5.

So when we design things we need to think about the people who haven’t read the docs in a while, if at all, and don’t care about things like fine-grained rendering or configuring their build tool. This means that things need to be intuitive, that we shouldn’t need to worry about manual optimisations like memoisation, that we should have as few APIs as possible, and that things need to be discoverable — for example you should be able to hover over a rune and get a link to comprehensive documentation.

Saturday, January 27, 2024

Paul’s notes on how JSON-LD works

[The JSON-LD data model is a graph with documents as nodes and properties as edges to other nodes or ‘values’.]

[@vocab maps a default prefix to keys not mapped explicitly in @context].

[@context provides only definitions to map your keys, it’s not a type. @type is a type, and can be defined with a URL or a term from @context.

[@id’s value is a reference to another object or node.]

Friday, January 26, 2024

At this point I basically upgrade iOS when there are new Progressive Web App features.

Thursday, January 25, 2024

Apple System Preferences URL Schemes

Open a macOS preference pane via URL like file:///System/Library/PreferencePanes/Keyboard.prefPane or terminal with open "x-apple.systempreferences:<PaneID>"

Wednesday, January 24, 2024

How to concatenate two MP4 files using FFmpeg?

(echo file '/alfa/bravo.mp4' & echo file '/charlie/delta.mp4' ) > echo.txt
ffmpeg -f concat -safe 0 -i echo.txt -c copy foxtrot.mp4

Tuesday, January 23, 2024

a “protocol” sync engine, with multiple storage backends, and hooks to tie into “storage providers”, would be an amazing public good

Friday, December 15, 2023

No more raw data

[Sometimes it’s better not to decide what data you share, and defer the choice to someone with more expertise, such as medical data being provisioned by your doctor (who likely knows better how to respond to the request).]

Not only can my pod automatically fill out such forms; the forms don’t need to be there in the first place, because my pod can just share the needed data, machine to machine.

[Recipients will want to keep the trust envelope because it’s their proof to an auditor that they comply with its policy.]

Thursday, November 23, 2023

Plausible: GDPR, CCPA and cookie law compliant site analytics

Old salts are deleted every 24 hours to avoid the possibility of linking visitor information from one day to the next. Forgetting used salts also removes the possibility of the original IP addresses being revealed in a brute-force attack.

Tuesday, November 21, 2023

ChatGPT as muse, not oracle

In rubber duck debugging, talking to a silent rubber duck helps a person figure out the problem by forcing them to put it into words. The Oblique Strategies card deck promotes creative ideas based on general loose strategies. ELIZA can ask super basic questions and cause people to feel a therapeutic relationship. In all these cases, a person gets a boost in the creative process from interacting with a tool that’s clearly far from intelligent. It seems like large language models could do at least as well as these tools, and have a much higher ceiling.

Wednesday, October 11, 2023

“Platform data” and “Other” disk usage

Reclaim Docker storage:

docker image prune
# or
docker image prune -a

docker volume prune

How do I free up disk space?

# remove downloaded packages
sudo apt-get clean

# clear package caches that can't be downloaded
sudo apt-get autoclean

# remove unused packages
sudo apt-get autoremove

5 Linux commands to check free disk space

# show disk space in human-readable format
df -h

# show disk usage in human-readable format for all directories and subdirectories
du -h

Cannot update due to one tiny app filling up 20GB drive

Remove swap storage

sudo swapoff -a
# or
sudo swapoff /apps.swap

# if desired
truncate -s 1G /apps.swap

sudo rm /apps.swap

Monday, September 11, 2023

Tried to understand why my Kobo doesn’t mount to the computer when connecting via cable. Best solution I’ve found is to try a different computer.


Kobo not connecting to computer…

[Use the cable that came with the Kobo.]

[Try a different cable.]

[Try a different computer.]

[USB 3 ports may cause issues. Try a cheap USB 2 hub in between.]

[Some USB cables are charge-only!]


Kobo Aura H2O keeps Connecting and Disconnecting USB issue [Solved-ish]

[Try turning off Wi-Fi.] Seems that the WiFi and the USB subsystems might be sharing a data path to the processor, so there can be conflicts between them.


Aura H2O Kobo won’t connect to a PC anymore


Kobo not recognized by computer

Transferring over wifi: Calibre has a content server (you can find it under preferences, sharing, sharing over the net), your Kobo can connect to it with its browser (under extra’s). The default port is 8080, there’s a more detailed explanation on the content server dialog.

More Wi-Fi possibilities in Add Books Over WiFi?, but the filenames tend to get mangled when importing this way, so I don’t like it.


Official documentation discusses none of these issues


Would love to recommend a ‘Canadian alternative’ to Amazon, but no longer wish anyone to experience ‘fussy’ electronics.