A minimalist hypertext browser

This reminds me a lot of the Help Browser in Squeak and Pharo Smalltalk. The common point is encoding rich text using the features of the language.

My own attitude towards this approach is ambivalent. I have used this approach for scientific data in the past, storing a database as Python code snippets. Very powerful, in a very simple implementation, but I wouldn’t do it again, at least for that use case. Inevitably, users of my code (including myself) ended up collaborating with users of different software and wanted to share data with them. If the data has a baked-in dependency on Python plus a few Python libraries, that’s difficult.

Another counterargument is the Rule of Least Power. You are not violating it as long as you restrict yourself to passive Lua data structures. But unless you build a validator for this into your browser (more code!), you will one day succumb to the temptation of generating text by Lua code rather than entering it as literals. And then your documents have Lua as a dependency.

2 Likes