I’m pleased to announce the launch of my latest Mastodon bot, Sun Tzu’s The Art of eBooks . It’s a Markov chain bot trained on (you guessed it) The Art of War.
Continue reading “Statistically Probable Ancient Wisdom”Category: Code
Unix Principle: Don’t prevent foolish things, because that prevents clever things
Application group at dayjob ran into a guardrail today.
They need an FE-generated ID token, low-security, unique in a low-volume setting. Sounds like a UUID to me!
But.
`crypto.randomUUID()`, in order to prevent low-security IDs being used where high-security is needed, is not accessible outside a secure context, and the application in question runs in an insecure context.
On the core team, our go-to “unique-enough id” is nanoid. nanoid is pretty spiffy; if available, it’ll use the browser crypto API to generate good-quality entropy and good random numbers. But! If not available, it’ll fall back, all the way to Math.random() if it needs to.
Secure? No! But not everything is a health info transfer, sometimes we just need a quick and handy number to tie some stuff together.
Moral of the story:
If you prevent your user (user-developer) doing dangerous things, you’ll also prevent them doing clever things. Document the scary bits and mark the holes, but don’t put up impassible guardrails or users will just find another way.
Initial Release: Masto-DL
After seeing several people ask about a tool to download their toots, I’ve started building one.
Masto-DL will archive all your toots into individual json files to grep and analyze to your heart’s content.
After seeing several people ask about a tool to download their toots, I’ve started putting together a tool to do just that.
Masto-DL will archive all your toots into individual files (json right now, yaml to come, more as needed/requested).
Continue reading “Initial Release: Masto-DL”Full 1.0.0 release: Fedi-follow Widget
My Fedi-Follow widget is ready for a full 1.0.0 release!
The widget provides an interface for Fediverse users to easily follow or share a url from their home instance. It’s the first stage in my plan to make it easier to integrate Fediverse sharing and following into other platforms, like WordPress or other site engines.
Continue reading “Full 1.0.0 release: Fedi-follow Widget”Bits of Galaxy
So, I’ve been toying with the idea of putting together an online space game. Inspiration comes from things like TradeWars 2002, Escape Velocity: Nova and FTL, with multiplayer in the theme of a MUD. Real-time, but a bit chill, maybe as much a shared experience as a ”game”. In particular, I’m aiming for the server API to be conducive to AI/ML agents running around exploring.
Continue reading “Bits of Galaxy”Open-Source: Covidbot-Ontario
I built a #MastoBot to post local #Covid19 numbers. In the process, I found Ontario Public Health’s data feeds and ended up building something much more generic and reusable than I initially intended. Aside from the very local hospitalization and ICU numbers from KHSC, the Ontario feeds can be filtered to be useful anywhere in the province.
Continue reading “Open-Source: Covidbot-Ontario”iPad as a Dev Console, Part 1: SSH
I recently got an iPad to replace my venerable Huawei tablet, and I’ve been exploring how to use it for dev work.
I work mostly in nodejs on Linux, so my requirements are pretty modest:
- ssh terminal
- sftp for file management
- Code editor with sftp
MastoBot 0.1.0-2
I’ve published another prerelease of #MastoBot to #npm; this prerelease expands coverage of the MastoBotAPI class and significantly improves method documentation coverage.
Continue reading “MastoBot 0.1.0-2”