<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Phosphor on Phosphor BBS</title>
		<link>https://phosphorbbs.net/tags/phosphor/</link>
		<description>Recent content in Phosphor on Phosphor BBS</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Sat, 19 Sep 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://phosphorbbs.net/tags/phosphor/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Blackjack in Phosphor: A Door Game as a Language Test</title>
				<link>https://phosphorbbs.net/blog/blackjack-in-phosphor-a-door-game-as-a-language-test/</link>
				<pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://phosphorbbs.net/blog/blackjack-in-phosphor-a-door-game-as-a-language-test/</guid>
				<description>&lt;p&gt;Every language looks fine in its own test suite. The tests were written&#xA;by the same people who wrote the language, with the same blind spots.&#xA;The only honest benchmark is a program someone actually wants to run.&lt;/p&gt;&#xA;&lt;p&gt;So when the question came up — &amp;ldquo;would it be easy to create a simple&#xA;blackjack game for the BBS?&amp;rdquo; — the answer was: yes, and that&amp;rsquo;s exactly&#xA;the test Phosphor needs. Blackjack is a sweet spot for a scripting&#xA;language&amp;rsquo;s first real workload. It has genuine state (a shuffled deck,&#xA;two hands, a bankroll), real control flow (a dealer AI that hits to&#xA;17, ace soft/hard counting), string wrangling (card glyphs), user&#xA;input, and persistence. If the parser, the evaluator, and the door&#xA;bridge can carry all of that, the language is real. If they can&amp;rsquo;t, we&#xA;find out where.&lt;/p&gt;</description>
			</item>
			<item>
				<title>UserDefaults for a BBS: A Generic Preferences and State API</title>
				<link>https://phosphorbbs.net/blog/userdefaults-for-a-bbs-a-generic-preferences-and-state-api/</link>
				<pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate>
				<guid>https://phosphorbbs.net/blog/userdefaults-for-a-bbs-a-generic-preferences-and-state-api/</guid>
				<description>&lt;p&gt;Every non-trivial app eventually faces the same question: where does&#xA;small user configuration live, and where does user &lt;em&gt;data&lt;/em&gt; live? macOS&#xA;answered this decades ago with two separate systems — &lt;code&gt;UserDefaults&lt;/code&gt;&#xA;for typed, user-visible settings, and the file system for documents.&#xA;We had been living with neither, and it showed.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-mess-we-had&#34;&gt;The mess we had&lt;/h2&gt;&#xA;&lt;p&gt;Phosphor already had a real preference engine. &lt;code&gt;PreferenceResolver&lt;/code&gt;&#xA;resolves settings through three levels — user, then group, then&#xA;global — backed by the database, cached with proper invalidation, and&#xA;connected across processes with Postgres &lt;code&gt;LISTEN/NOTIFY&lt;/code&gt;. Screens&#xA;could even bind to a preference reactively, so flipping a toggle&#xA;redraws every open screen instantly. For the language side, &lt;code&gt;.phos&lt;/code&gt;&#xA;scripts read settings with &lt;code&gt;pref(&amp;quot;key&amp;quot;)&lt;/code&gt; and write them with&#xA;&lt;code&gt;set_pref(&amp;quot;key&amp;quot;, value)&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
