<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: pdlug</title><link>https://news.ycombinator.com/user?id=pdlug</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Fri, 24 Jul 2026 03:20:37 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=pdlug" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[Show HN: TypeGraph – Type-safe graphs on Postgres/SQLite (no graph DB required)]]></title><description><![CDATA[
<p>Hi HN, I built TypeGraph, a type-safe knowledge graph library that runs on your existing Postgres or SQLite.<p>After years of building knowledge graphs and other graphy things, I had the same issues whenever an application’s relationship modeling (permissions, RAG context, recommendations) outgrew standard ORMs: deploy a dedicated graph database (heavy ops, separate infra, data syncing headaches), or roll a graph-in-SQL implementation by hand.<p>I've hand-rolled enough of these to know the drill: same table structures, same traversal boilerplate, same performance surprises. I wanted graph semantics without graph infrastructure so I built TypeGraph as that pattern packaged as a library. It runs on anything from in-memory SQLite to a full Postgres cluster, using Zod for a single source of truth (driving your DB schema, API validation, and TS types).<p>You query it with a fluent builder that's fully typed through traversals:<p><pre><code>    const results = await store
      .query()
      .from("Person", "p")
      .traverse("worksAt", "e")
      .to("Company", "c")
      .whereNode("c", (c) => c.industry.eq("Tech"))
      .select((ctx) => ({
        person: ctx.p.name,
        company: ctx.c.name,
        role: ctx.e.role,
      }))
      .execute();
</code></pre>
Eject at any time and you're left with clean, well-structured SQL tables and nothing proprietary to untangle.<p>A few things that set it apart from rolling your own:<p>* Ontology reasoning: subClassOf, implies, inverseOf — query for "Media" and automatically get Podcasts and Articles. Define "Admin implies Editor" and permission checks expand automatically.<p>* Vector + graph queries: combine embedding similarity search with graph traversal in one query. Uses pgvector on Postgres, sqlite-vec on SQLite.<p>* Incremental adoption: builds on Drizzle. Add graph capabilities to an existing project without replacing your ORM or migrating your database.<p>Where it works well: knowledge graphs for RAG (vector similarity + graph context), relationship-based access control, recommendations, social features, any domain where multi-hop relationships are core.<p>Where it doesn't: billions of edges (use a graph database), heavy graph algorithms like PageRank (use specialized tools), distributed graph processing.<p>Docs: <a href="https://typegraph.dev" rel="nofollow">https://typegraph.dev</a><p>GitHub: <a href="https://github.com/nicia-ai/typegraph/" rel="nofollow">https://github.com/nicia-ai/typegraph/</a><p>Happy to answer questions about the design, implementation, or tradeoffs.</p>
<hr>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=47137908">https://news.ycombinator.com/item?id=47137908</a></p>
<p>Points: 5</p>
<p># Comments: 0</p>
]]></description><pubDate>Tue, 24 Feb 2026 14:54:10 +0000</pubDate><link>https://typegraph.dev</link><dc:creator>pdlug</dc:creator><comments>https://news.ycombinator.com/item?id=47137908</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47137908</guid></item><item><title><![CDATA[New comment by pdlug in "JsMath: Including Mathematics in Web Pages"]]></title><description><![CDATA[
<p>There's a rewrite of jsMath on the way called MathJax which will provide even better rendering of math on the web.<p><a href="http://www.mathjax.com/" rel="nofollow">http://www.mathjax.com/</a></p>
]]></description><pubDate>Fri, 11 Sep 2009 20:57:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=818117</link><dc:creator>pdlug</dc:creator><comments>https://news.ycombinator.com/item?id=818117</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=818117</guid></item></channel></rss>