<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sam Glassenberg on Medium]]></title>
        <description><![CDATA[Stories by Sam Glassenberg on Medium]]></description>
        <link>https://medium.com/@Glassenberg?source=rss-a08a007e379e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*LH6z7P0qfnUOupZL.jpg</url>
            <title>Stories by Sam Glassenberg on Medium</title>
            <link>https://medium.com/@Glassenberg?source=rss-a08a007e379e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 21:49:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Glassenberg/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Head-to-Head AI image-to-3D comparison: Hunyuan vs. Meshy vs…]]></title>
            <link>https://medium.com/@Glassenberg/head-to-head-ai-image-to-3d-comparison-hunyuan-vs-meshy-vs-f99cb38faa39?source=rss-a08a007e379e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f99cb38faa39</guid>
            <category><![CDATA[medical-imaging]]></category>
            <category><![CDATA[3d]]></category>
            <category><![CDATA[3d-modeling]]></category>
            <category><![CDATA[3d-printing]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Sam Glassenberg]]></dc:creator>
            <pubDate>Mon, 17 Nov 2025 22:33:03 GMT</pubDate>
            <atom:updated>2025-11-18T02:15:17.769Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been using a half-dozen AI-based image-to-3d-model tools for various projects lately. So far, <a href="https://www.meshy.ai/?utm_source=referral-program&amp;utm_medium=link&amp;utm_content=BE923O">Meshy</a> 6.0 (this <a href="https://www.meshy.ai/?utm_source=referral-program&amp;utm_medium=link&amp;utm_content=BE923O">link</a> will get you a free month of “Pro”) and <a href="https://3d.hunyuan.tencent.com/apply?sid=0b69fd39-cd1c-4675-9dd0-12199a866674">Hunyaun 3D</a> v3.0 (this <a href="https://3d.hunyuan.tencent.com/apply?sid=0b69fd39-cd1c-4675-9dd0-12199a866674">link </a>will give you access) generate the best results.</p><p>For complex objects, in a few cases I’ve actually used both — combining different elements from each mesh output using other 3D tools.</p><p>Now that I’ve literally pushed dozens of wildly different images (organic, sculpture, medical, device, logos) through these tools, figured it would be helpful to share some head-to-head comparisons.</p><p>Because Meshy lets you generate up to 5 iterations from the same image, in these examples i’m using the best output.</p><h3>3D Printer Golem (Organic + Solid Surface)</h3><p>My daughters and I have a hobby project making 3D printed Judaica (<a href="https://3dprintedjudaica.org/">https://3dprintedjudaica.org/</a>). We generated the logo a while back using MidJourney:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eNnN33kGIVC_7vrc" /><figcaption>Source Image (Generated in Midjourney)</figcaption></figure><p>We decided it would be fun to 3d print it. It’s a tricky challenge for a generator, as it combines a 3d printer that is very flat and polygonal (hard surface model) with a golem that is smooth and organic. Both did well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*-NSqAPnRA4oPiQl4lyvXUw.png" /><figcaption>Hunyuan Result: Front</figcaption></figure><p>It did a pretty good job of ‘extrapolating’ the back, just with too many cables, that were nonetheless easy to remove because Hunyuan did a good job of creating objects with decent seams between them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*cwt2MYHwquLpCDkk9HwI2Q.png" /><figcaption>Hunyuan Result: Back</figcaption></figure><p>Here was Meshy’s result. Not as useful, but it did a much better job of rocks on the bottom. I ended up extracting just the rocks from this model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*5YgmhBIAdv4O9lbWMIzY9Q.png" /><figcaption>Meshy Result</figcaption></figure><p>It printed quite nicely on my Bambu X1C:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTVvwGN1IHKY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTVvwGN1IHKY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTVvwGN1IHKY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e12f0567e20467a4be170d05b753153/href">https://medium.com/media/6e12f0567e20467a4be170d05b753153/href</a></iframe><h3>2D to 3D Logo Conversion</h3><p>In this case, Meshy actually won.</p><p>I wanted to take the logo for <a href="https://playlevelone.com/">Level One: A Diabetes Game </a>and create a 3D lightbox for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aQDBmeNZp9Wd0U5BJuwbbg.png" /><figcaption>The Original 2D Logo</figcaption></figure><p>Meshy nailed it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*4DWd7UYXxK4EYZqNTsGAFA.png" /><figcaption>Meshy Result: Logo</figcaption></figure><p>The Hunyan result had straighter lines, but there was too much misalignment and consistency to be usable:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*b6G-3i9l1rzDl7nN_qQ14Q.png" /><figcaption>Hunyuan Result</figcaption></figure><h3>Surgical/Medical Example</h3><p>My company makes videogames for doctors, and I’m always looking for interesting ways to unleash game and AI technology in healthcare.</p><p>I was curious how these AI tools (that were largely trained on videogame assets) would handle medical imagery: A tricky surgery scene with tools, varying surfaces, etc.</p><p>Here’s one example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/0*Sla7uz8LPa2iT6uD" /><figcaption>Source Image: Surgery</figcaption></figure><p>Hunyuan did a surprisingly good job at this one, really nailing some of the smooth surfaces, but it’s depth approximations weren’t stellar (it couldn’t identify that the surgical site formed a cavity):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*HZAyrZnmJn8sc_tM9Fz5aA.png" /><figcaption>Hunyuan Result: Medical</figcaption></figure><p>Meshy did a much better job with detail and depth:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*aprgCXFztAZqFrPDV3370w.png" /><figcaption>Meshy Result: Medical</figcaption></figure><p>There were other medical images where both generated great results — identifying hands in the surgical field, modeling surgical devices like clamps, etc.</p><h3>Historic Black and White Photo</h3><p>For <a href="http://3dprintedjudaica.org/">3D Printed Judaica,</a> my daughters and I are taking a few classic photos and turning them into models we can 3D print.</p><p>Here’s an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HhsJvFbEKW3vp7DathAsPQ.jpeg" /><figcaption>Soldiers at the Wailing Wall, 1967</figcaption></figure><p>To make this work I ended up removing the background in Photoshop first.</p><p>This is one of the 5 iterations that Meshy generated — ended up printing one of them on a wailing wall backdrop:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RZCW1i5uUSejbxVjRfoFZA.png" /><figcaption>Meshy Result — Soldiers at the Wailing Wall</figcaption></figure><p>Hunyuan’s result was totally unusable. The faces were smoothed into bizarre assymetric shapes, and the hands/fingers were totally disfigured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hr5YgQCVW6jP0ZDK0AWoUQ.png" /><figcaption>Hunyuan’s result — note the hand on the shoulder</figcaption></figure><h3>Flat-Surface “Model” — the Pager</h3><p>For this example I wanted an accurate recreation of the Apollo pager.</p><p>Hunyuan did a much better job of both the curved and flat surfaces:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*9FAWHTTxpQSNfF-YxAHOyg.png" /><figcaption>Hunyuan Result — Almost Perfect!</figcaption></figure><p>Meshy’s result wasn’t very good at all, for such a “simple” object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xcLh4q-pVpO18kzxFsgrgg.png" /><figcaption>Meshy Result — Almost Unusable</figcaption></figure><h3>Statue Recreation — Licoricia of Winchester</h3><p>I wanted to 3D print a replica of the statue of Licoricia of Winchester based on some reference photos.</p><p>Here too, Hunyuan generated better results. They still required some post-processing and editing, but this was made easier by its better-defined seams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*1zSYrRDXHkSzYadAP5JyMA.png" /><figcaption>Licoricia of Winchester — Recreated using Hunyuan</figcaption></figure><p>Meshy just wasn’t able to capture the details and curvature nearly as well:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*B_cASCwTxtSXw9oSO4Ox5Q.png" /><figcaption>Licoricia of Winchester — Recreated using Meshy</figcaption></figure><p>I ended up generating the head as its own pass to get higher detail:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*JoNa2h3ArAtc8r7VPvFsEQ.png" /><figcaption>Head only (Hunyuan)</figcaption></figure><h3>Conclusion</h3><p>Based on experience with these examples and others, here’s a breakdown of the advantages and disadvantages of each (not cost, just output quality).</p><p><strong>Hunyuan:</strong></p><ul><li>Flatter flat surfaces</li><li>Better smoothing, contours, and seams between parts</li><li>Better symmetry</li><li>Often loses detail which can include entire subobjects</li><li>Smooth approximations of hands and faces can be heavily warped and out-of-proportion</li></ul><p>Meshy:</p><ul><li>Captures more detail</li><li>Results look more like discretized voxels</li><li>Grainer surfaces</li><li>More ‘balanced’ faces and hands</li></ul><p>It <strong>seems</strong> to me that Hunyuan is doing more heavy post-processing on the output after it’s extracted from the latent space (voxel discretization), but I can’t say for sure. It may be the nature of their AI model itself. In any case, it results in smoother organics and flatter flat-surfaces.</p><p>Here’s a quick grid of 3 of the experiments:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dgvNopQ8Jl91OWjRZkgpFQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f99cb38faa39" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flipping the Chip: How AI Will Make Games Gorgeous and GPUs Unrecognizable]]></title>
            <link>https://medium.com/@Glassenberg/flipping-the-chip-how-ai-will-make-games-gorgeous-and-gpus-unrecognizable-b47c43bdb56a?source=rss-a08a007e379e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b47c43bdb56a</guid>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[games]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Sam Glassenberg]]></dc:creator>
            <pubDate>Tue, 12 Aug 2025 22:01:36 GMT</pubDate>
            <atom:updated>2025-08-12T22:04:14.564Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Imagine your favorite game re-rendered instantly in any style — Pixar, anime, photorealistic — all powered by AI running inside your GPU. Soon, most of your GPU won’t be drawing triangles at all. It’ll be running AI models that turn a bare-bones scene into stunning, fully rendered worlds in real time.</em></p><p>Last week, an Israeli AI startup called Decart <a href="https://www.ynetnews.com/business/article/hy4mrdfdll">raised $100 million at a $3.1 billion valuation</a>. Their pitch? Replace Netflix, YouTube, TikTok… and gaming. What caught my attention wasn’t the consumer-tech bravado — it was the underlying technology: real-time video generation. That’s exactly the kind of capability that could turn a certain thought experiment I floated years ago into reality.</p><h3>Double-Secret Meetings</h3><p>I first raised this idea at an industry advisory board for a major chip company (who will remain anonymous). Graphics advisory boards are a kind of <a href="https://glassenberg.com/2015/03/30/3d-graphics-discussion-patterns-squeezing-the-most-out-of-industry-advisory-boards/">behind-closed-doors meetings</a> where companies bring in a select group of developers to help chart the next few years of GPU architecture. These aren’t marketing focus groups. They’re working sessions with some of the sharpest engineers in the field, hashing out what the hardware should look like a generation or two from now.</p><p>One of the perennial debates in these rooms is how to spend precious die area. Back in my Microsoft days, when I MC’d the DirectX advisory board, we’d have Epic, Valve, Crytek, EA, NVIDIA, AMD, Intel — all in one room — arguing about how much silicon to devote to performance, memory, precision, and so on. More recently, the debate has shifted: how much should you dedicate to AI?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*x5WdpgpZnsYqao6i" /></figure><p>My knee-jerk reaction in that meeting: <em>Do we really need to go through this again?</em> In the past, we’ve had long arguments about carving out fixed-function blocks for specific workloads, only to have them replaced in the next generation by more general-purpose compute units. Dedicated vertex and pixel processing units became unified shaders. Why not just fold AI into the same compute pipeline?</p><p>We walked through the details together — the compute characteristics of AI inference are different enough that dedicated hardware offers big performance gains. We’re not a generation away from merging them. So I suggested a more extreme exercise: <em>what if we flipped the whole thing?</em></p><h3>Flipping the Chip</h3><p>Imagine a GPU where the “traditional GPU” is a tiny sliver of the chip — basically a DirectX-7-era processor. Think World of Warcraft circa 2004: fixed-function lighting, simple shaders, low-poly geometry. All that little GPU does is block out the scene: where objects, characters, and effects go. Camera placement, basic motion, nothing fancy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*UGwwPyqU4e1pGcFP" /></figure><p>The rest of the die? All inference. You’d feed that DX7-style frame — along with a series of previous frames for temporal coherence, so motion, lighting, and reflections remain consistent — into neural networks trained and tuned by an artist, an LLM, or both. The runtime AI model would fill in everything: reflections, global illumination, vegetation, hair, weather effects, atmospheric scattering.</p><p>The creative workflow would split in two:</p><ol><li>Build phase: human artists, AI artists, or a hybrid use tooling to train, configure, and fine-tune models for the game’s style and scenarios — then “bake” them for inference (think shader baking in the DX9 days, but vastly more flexible).</li><li>Play phase: the GPU spends most of its silicon running those models in real time.</li></ol><p>The styles could be swapped at will: photorealistic, Pixar, anime, comic book, cell-shaded. The same MMO could be rendered as a gritty dystopia or a lush fantasy world, with no change to gameplay. The same FPS could instantly shift from ultra-realistic bloodbath to Saturday morning cartoon. Want to play Command &amp; Conquer: Red Alert 2 in a lush jungle? A neon cyberpunk cityscape? Just load the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*qUZoWhaPvgcrHcok" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*UKmg95g0GthJsG27" /></figure><p>We’re already nibbling at the edges of this idea. AI upscalers, denoisers, and DLSS run in-frame today on current-gen GPUs. This just scales it up — radically. And with companies like Decart proving that real-time, interactive video generation is practical, the hardware will inevitably follow.</p><h3>The Tragedy of Nanite</h3><p>And then there’s the tragedy of <a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/nanite-virtualized-geometry-in-unreal-engine">Nanite</a>. For decades in these advisory board meetings, Tim Sweeney railed against fixed-function hardware, championing fully programmable, general-purpose compute — slower, but vastly more flexible. <a href="https://en.wikipedia.org/wiki/Larrabee_(microarchitecture)">Intel’s Larrabee</a> was supposed to be that: so flexible you could literally write your own rasterizer and texture sampler in software, even for operations so performance-critical that doing them outside fixed-function hardware felt insane. And then he finally did it. Unreal Engine’s Nanite system delivered near-infinite geometry detail by — among other breakthroughs — implementing rasterization in software. Software! It not only beat fixed-function rasterization in their scenario, it opened up an entirely new world of geometric complexity. The biggest shake-up in game rendering architectures since… maybe Quake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*DjVLbuHnxMxXv6nS" /></figure><p>And the tragedy? Just as Sweeney finally pulled it off, AI is arriving to leapfrog the whole thing. Nanite-style visualization — and much, much more — will soon be achievable without the complexity (or mathematical beauty) of Nanite. The entire rasterization pipeline, fixed or programmable, is about to be replaced by AI.</p><h3>Next Steps</h3><p>When I first proposed this architecture in that meeting, it felt like a moonshot — possible in theory, but impractical in the near term. Now, watching both hardware and AI models evolve, it’s looking less like a moonshot and more like the next stop on the track.</p><p><em>Originally published at </em><a href="https://glassenberg.com/2025/08/12/flipping-the-chip-how-ai-will-make-games-gorgeous-and-gpus-unrecognizable/"><em>https://glassenberg.com</em></a><em> on August 12, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b47c43bdb56a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diabetes Onboarding is Terrible — So we Fixed it With a Videogame]]></title>
            <link>https://medium.com/@Glassenberg/diabetes-onboarding-is-terrible-so-we-fixed-it-with-a-videogame-b16f2307f8b8?source=rss-a08a007e379e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b16f2307f8b8</guid>
            <category><![CDATA[mobile-games]]></category>
            <category><![CDATA[diabetes]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[type-1-diabetes]]></category>
            <category><![CDATA[game-design]]></category>
            <dc:creator><![CDATA[Sam Glassenberg]]></dc:creator>
            <pubDate>Tue, 22 Apr 2025 17:20:47 GMT</pubDate>
            <atom:updated>2025-05-02T20:30:15.672Z</atom:updated>
            <content:encoded><![CDATA[<h3>Diabetes Onboarding is Terrible — So we Fixed it With a Videogame</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/0*_kGW6EPAm35ATqk3.png" /></figure><p><strong>This week I’ve launched the most important game of my career.</strong></p><p>My middle daughter was diagnosed with Type 1 Diabetes when she was 5. The onboarding experience was absolutely brutal and unforgiving (I documented some of it <a href="https://worstgameever.org/">here</a>).</p><p>On Friday your life is normal. 24 hours later, you’re a full-time pancreas — responsible for injecting precise doses of a lethal drug (insulin) into my daughter a dozen times a day.</p><p>It took me and my wife a <em>year</em> to understand how to manage this disease (through trial and error on our own kid). I’m a Stanford-trained computer engineer and my wife is a <em>pediatrician</em>. We’re the diabetes dream-team. I don’t know how everyone else handles it (turns out many do not: for underserved communities, it’s a death sentence — dialysis and blindness in your mid-30&#39;s.)</p><h3>…So we fixed it.</h3><p>Earlier this week, we launched <a href="https://playlevelone.com/">Level One</a> — a mobile, casual videogame that trains your brain to manage diabetes in hours instead of months (or years). It’s gorgeous and it’s fun — probably the best showcase of using videogame design to help teach people how to manage a disease.</p><p>60 bite-size levels that teach you everything — carb counting, insulin dosing, managing ketones, <em>everything</em>. We’ve been testing it with hundreds of endocrinologists, parents, school nurses, and the response has been “Release this now!!! What are you waiting for?!”</p><h3>What can you do to help?</h3><p><em>Get the word out!</em> Share the <a href="https://youtu.be/LiXw45YUXDs">trailer</a>, the <a href="http://www.playlevelone.com/">website</a>, this medium post.</p><p>Know anyone with T1D or touched by T1D? Share the game’s <a href="http://www.playlevelone.com/">website </a>with them!</p><p>If you’re in the games industry — highlight this game as an example of how <em>real </em>game design can solve some serious problems, and how the industry can expand its impact outside of pure entertainment!</p><p><em>Originally published at </em><a href="https://glassenberg.com/2025/04/22/announcing-the-most-important-game-ive-ever-launched/"><em>https://glassenberg.com</em></a><em> on April 22, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b16f2307f8b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The AI Thought Experiment That Breaks Your Brain — and Your Assumptions About Consciousness]]></title>
            <link>https://medium.com/@Glassenberg/the-ai-thought-experiment-that-breaks-your-brain-and-your-assumptions-about-consciousness-2922f0753f75?source=rss-a08a007e379e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2922f0753f75</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[neuroscience]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[consciousness]]></category>
            <category><![CDATA[artificial-neural-network]]></category>
            <dc:creator><![CDATA[Sam Glassenberg]]></dc:creator>
            <pubDate>Mon, 03 Feb 2025 14:42:10 GMT</pubDate>
            <atom:updated>2025-02-03T14:42:10.640Z</atom:updated>
            <content:encoded><![CDATA[<h3>The AI Thought Experiment That Breaks Your Brain — and Your Assumptions About Consciousness</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lRcO1XrUAZTX0SDyRvTWyg.png" /><figcaption>The Ship of Theseus — Reassembling out of Neurons</figcaption></figure><p>I find myself frequently raising this thought experiment at conferences. It doesn’t matter if we’re debating AI creativity, artificial general intelligence, or whether a simulated brain would be conscious — sooner or later, the Ship of Theseus AI Thought Experiment emerges from the mist.</p><p>Despite my searching, I couldn’t find a concise (enough) explanation of the “Ship of Theseus AI Thought Experiment” idea online, so I decided to write it up as an article.</p><p>Ray Kurzweil has explored versions of this argument in several of his books, including How to Create a Mind and The Singularity is Near. He argues that intelligence — ours or an AI’s — is fundamentally about patterns of information, not the medium that runs them.</p><p>A lot of people push back. They insist there’s something special about the human brain — some ineffable magic that a machine could never replicate.</p><p>To those people, I offer this thought experiment.</p><h3>The Thought Experiment</h3><p>The mammalian neuron is complex, but it’s not that complex. It has hundreds to thousands of inputs and one output, which can branch out to many other neurons. Whether it fires is dictated by a probabilistic function based on the sum of its inputs. A fancy voltage gate. The thickness and length of its connections affect signal speed and strength.</p><p>And you know what? We can replicate it.</p><p>Not in some sci-fi, distant-future way — we already do it. Artificial neurons exist in labs, in cochlear implants, in retinal prosthetics. AI models like ChatGPT are built on simplified versions of these neurons — though, to be fair, they lack the messy soup of chemicals that give us emotions, instincts, and questionable life choices. But with enough computational power, we can simulate those too.</p><h4>Step One: A Single Neuron</h4><p>Let’s say we have the microscopic tools to replace one of your neurons with a synthetic, silicon one. It has the same 1,000 inputs, the same single output, and behaves exactly the same way as your squishy neuron. Your thoughts flow through it like nothing happened. Would you feel different?</p><p>Of course not. It’s one of hundreds of billions of neurons. You’d never notice.</p><h4>Step Two: A Small Chunk</h4><p>Now let’s say you have a stroke. It wipes out 10% of your neurons. Fortunately, we scanned your brain beforehand, so we replace the dead neurons with artificial ones that function exactly as your biological ones did before.</p><p>Your thoughts, memories, dreams — all still there. Some of them now flow through silicon instead of biological mush. Are you still you?</p><h4>Step Three: The 50% Mark</h4><p>Now let’s say another stroke wipes out 50% of your brain. We replace more. Are you still you?</p><p>90%?</p><p>100%?</p><p>At what point do you stop being “you”? Or were you never in the individual cells to begin with?</p><figure><img alt="I once wrote a blog post about giving ChatGPT a “stroke” and watching what happens…" src="https://cdn-images-1.medium.com/proxy/0*YeOkm8h398xtQHk1" /><figcaption>I once wrote a blog post about giving ChatGPT a “stroke” and watching what happens…</figcaption></figure><h4>The Biological Wake-Up Call</h4><p>If your gut reaction is, “Well, if it’s not my original cells, then it’s not me!” — I have some news for you.</p><p>You already aren’t made of your original cells. The cells that made up “you” last year? Most of them are gone. The neurons you had a decade ago? Entirely rebuilt, molecule by molecule. The proteins, lipids, and other components that made up “you” years ago? Flushed down the toilet.</p><p>You aren’t a static entity. You’re a pattern — a shifting, self-perpetuating, information-processing process.</p><p>And patterns can be simulated. Copied. Augmented.</p><h3>The Ship of Theseus and You</h3><p>Philosophers have debated the “Ship of Theseus” for millennia: If you replace every plank of a ship over time, is it still the same ship? If you take those old planks and build a second ship, which one is the real one?</p><p>The human brain is the Ship of Theseus. Cells die. New ones take their place. The pattern persists.</p><p>And if we can scan, simulate, and eventually run that pattern outside of biological constraints… what does that mean for you?</p><p>It means that “you” are not your biology.</p><p>And it means that one day, if we do this right, <em>you might just live forever.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2922f0753f75" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3D Printing in Unlimited Colors — with a Single Filament — Sam Glassenberg]]></title>
            <link>https://medium.com/@Glassenberg/3d-printing-in-unlimited-colors-with-a-single-filament-sam-glassenberg-e378618bc9b0?source=rss-a08a007e379e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e378618bc9b0</guid>
            <category><![CDATA[computer-graphics]]></category>
            <category><![CDATA[bambu]]></category>
            <category><![CDATA[3d-printing]]></category>
            <dc:creator><![CDATA[Sam Glassenberg]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 15:36:05 GMT</pubDate>
            <atom:updated>2025-01-21T15:58:56.577Z</atom:updated>
            <content:encoded><![CDATA[<h3>3D Printing in Unlimited Colors — with a Single Filament — Sam Glassenberg</h3><h3>“Render to Filament Printing” just had its Chicago Pile moment… in Chicago.</h3><p><em>3D Graphics, GPU, AI, and 3D printing aficionados alike — you’re going to like this one. I’ve conducted a series of experiments where I’ve applied GPU rendering techniques to… 3D printing. More techniques to come, but this particular experiment was too wacky not to share.</em></p><h3>Some background:</h3><p>Early versions of DirectX enabled graphics cards to perform “render to texture” operations, where one could draw a 3D scene into memory, and then load the result as a texture in a subsequent “pass”. These capability become a cornerstone of almost every visual effect and technique in videogame graphics — from drawing reflective mirrors to <a href="https://glassenberg.com/2024/12/12/it-runs-on-the-computer-in-my-basement/">cloth simulation</a>.</p><p><strong><em>What if we apply a similar approach to 3D printing?</em></strong></p><p><em>But 3D printers don’t process memory! </em>They process plastic. <em>Guess what? Doesn’t matter.</em> After all, in <a href="https://en.wikipedia.org/wiki/Turing_machine">Alan Turing’s classical view of computation</a>, both are just a very long tape… er… filament.</p><h3>It’s actually pretty useful if you can make this work</h3><p>Multi-filament 3D printers like my Bambu X1C have become incredibly popular — offering the ability to print a single model in up to 4 colors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*STO3kiiZ1nlg45Kh" /></figure><p>The problem is that these printers can only print a single filament at once — changing colors involves swapping filaments in the machine. This process is automated, but it’s slow and wasteful. Printing this lion’s head takes two and a half days, when printing it in a single color takes less than 8 hours:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*OCNtMlqKFdb4k0ov" /></figure><p>It also wastes a pound (!) of filament, because the machine needs to <em>purge</em> leftover filament from the extruder every time it switches. The purged filament is discarded through what is affectionately called the “poop chute” in the Bambu X1C.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*LSEgOOnjCaBZO31g" /></figure><h3>Solution: Render to Filament</h3><p>3D printer machine code (gcode) is deterministic. It will always perform the same order of operations precisely. Every filament extrusion is precisely controlled in the code (sometimes it goes backwards to end a segment and avoid ‘stringing’, but even this is precisely controlled). That means that for every segment extruded by the printer,<em> you can theoretically know </em>exactly how far along the filament the plastic was taken to make that segment.</p><p><strong>What if we could print our <em>own </em>filament that was custom-made for the object we’re printing, with colors exactly where they are supposed to be on the final object?</strong></p><p>This provides a series of advantages. Filament is relatively flat, so you’d only need a handful of filament switches to print it. If you use CYMK filaments as the ‘input’ you can make any color combination by controlling the relative contribution of each color at each point along the filament.</p><h3>Step 1: Pick the object you want to print and slice it</h3><p>This is a standard step for any print. You take your 3d object, and ‘slice’ it into 3d printer gcode. In the next step, we’ll project the bunny texture onto it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/0*hcl5Hjpt5oj0B5tz" /></figure><h3>Step 2: Compute your multicolor filament from machine gcode</h3><p>Using ChatGPT and Claude, I wrote a prototype Python program that consumes 3d printer gcode and an overlay texture, extracts the extrusion and position commands to identify the target filament color sequence, and generates STL files for each one that can be put back into the ‘slicer’. For the test, I only used two colors. The texture is simply projected over the input object to see if I can recreate it.</p><h3>Step 3: Slice and Print your Filament</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/0*Twk2TmFyYCKCXfu7" /></figure><p>I found I had to be especially careful here, as the filament surface has to be very smooth to avoid clogging the extruder, and the cross section has to be exactly 1.75mm. To do this, I ended up making sure there was a white ‘sheath’ around the filament so the color changes were only on the inside. That would wash out the resulting color a bit for now… but this is a problem we can solve later.</p><p>I printed the first few tests with a combo of white and pink filament.</p><p>Custom filament</p><h3>Step 4: Feed your custom filament into the printer and print your original object</h3><p>Now that you have a printed filament, you can feed it <em>back into </em>the printer, and print your original object.</p><p>Making sure you start at the right starting point is important. Getting the printer to do this without extruding extra filament at the beginning is tricky and requires some calibration — a process I’ll have to improve by drilling further into gcode and potentially printing some calibration runs to see how much is extruded during this process.</p><p>Lots of tuning to do, but here’s an early print (before this particular filament clogged the printer).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*ns3YSkwWIIvP9Fdv" /></figure><p>It’s definitely an early proof-of-concept and has a long way to go, but the fact that this was printed with a single filament demonstrates the viability of the method (with some more iteration).</p><p>Graphics folks — the ‘gaussian blur’ effect that you see on the texture isn’t a shader — it’s the result of <em>melting plastic blending together</em>.</p><p>Now that you understand the full process, there’s another important consideration about how we generate the gcode for the original object at the beginning, which you might notice on the photo above. So I’ll rewind a bit and fill you in on <em>Step 1.5</em>:</p><h3>Step 1.5: Apply a Hilbert Pattern to the colored parts of your object</h3><p>3D printer filament is 1.75mm wide. It’s squeezed and extruded into segments that are 0.08–0.28mm wide. That means that as your extruder zips back and forth printing your layers, two points that are next to each other on the filament might end up very far from each other on the object, and vice versa. Not good, when a lot of segments are going to come from a short region of filament of varying colors.</p><p>We’re very familiar with this problem in computer graphics. Computer memory is 1 dimensional (like filament), but graphics textures are two dimensional (like printing layers). In computer graphics, if you lay a texture out naively in memory, when you’re drawing a scene with that texture, chances are you’ll be hopping all around your memory which is actually very slow (it causes ‘cache misses’ which slows things down tremendously). How do you lay out a 2D image in 1D memory so that it has ‘locality’ — so that things that are close to each other in 2D are also close to each other in 1D?</p><p><strong>A Hilbert Pattern!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/0*j-JjCHw_GC9cXLPx" /></figure><p>David Hilbert is one of my favorite mathematicians. Why?</p><ol><li>He invented the Hilbert pattern in 1891 which we use extensively in computer graphics to store textures in memory (also known as a swizzle pattern).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_VT-r1JrH4_HkQ_da_l0BA.jpeg" /><figcaption>I couldn’t resist.</figcaption></figure><p>2) Hilbert also had a <a href="https://www.ias.edu/in-the-media/2017/mathematics-hitlers-germany">reputation for standing up to his Nazi superiors </a>at the University of Gottingen.</p><p>Most good 3D printer software will let you “slice” so that the extruder moves in a Hilbert Curve if you set everything up correctly.</p><h3>Next Steps</h3><p>This was a fun experiment that generated surprisingly good results quickly. Obviously there’s a long way to go. Next steps include:</p><ul><li>Produce better, smoother filaments that don’t clog the extruder on the second pass (I have a few ideas here)</li><li>Test hitting a broad color range using CMYK filaments to print the custom filament using a full color range</li><li>Establish a calibration technique to ensure the custom filament is loaded at the right spot</li><li>Further optimize slicing to improve color resolution — by printing infill, followed by a short outer-wall segment, followed by more infill, to give high-resolution regions on the object’s surface more length along the custom filament.</li><li>Extend the locality offered by Hilbert curves from 2D curves to 3D curves.</li></ul><p>I’ve got a number of other experiments I want to perform before I get back to improving this technique.</p><p><em>What do you think? Should I keep iterating on this one?</em></p><p><em>Originally published at </em><a href="https://glassenberg.com/2025/01/21/3d-printing-in-unlimited-colors-with-a-single-filament/"><em>https://glassenberg.com</em></a><em> on January 21, 2025.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e378618bc9b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How the Human Species will Defeat Death]]></title>
            <link>https://medium.com/@Glassenberg/how-the-human-species-will-defeat-death-b321edcdce35?source=rss-a08a007e379e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b321edcdce35</guid>
            <category><![CDATA[longevity]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[singularity]]></category>
            <category><![CDATA[brain]]></category>
            <category><![CDATA[connectome]]></category>
            <dc:creator><![CDATA[Sam Glassenberg]]></dc:creator>
            <pubDate>Wed, 27 Nov 2024 21:52:46 GMT</pubDate>
            <atom:updated>2024-11-27T21:55:34.739Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>The Fly in the Machine</strong></p><p>A few weeks ago one of the most groundbreaking papers in computational intelligence of the 21 stcentury was published. It’s comparable in impact to that of the attention mechanism — the paper that birthed the LLM explosion.</p><p>Why? This paper reveals how we, as a species, will ultimately defeat death.</p><h3>The Story:</h3><p>One day in March, 2024 a fruit fly woke up from a nap. It found itself in an eerily silent, dark room.</p><p>It felt some dirt on its antenna, which it promptly started grooming. Then it tasted something sweet and moved its mouth (more precisely, its proboscis) toward the sugar.</p><p>Only the room doesn’t actually exist. Or the sugar. Or the dirt.</p><p>The fly was <a href="https://www.nature.com/articles/s41586-024-07763-9">simulated entirely on a computer</a>.</p><p>Simulated down to each one of its 50 million synapses. Each synapse which had just been painstakingly mapped in one of the greatest scientific accomplishments of the 21 stcentury: <a href="https://www.nature.com/articles/s41586-024-07686-5">The complete mapping of the fruit fly connectome</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YjVBbOSbkkbmOsKS.jpg" /></figure><p><em>They Did It. They Uploaded a Fruit Fly.</em></p><p>Sure, it’s only 125,000 neurons. But it has most of the basic building blocks. The fruit fly can see, hear, and taste. It responds to caffeine and other neurochemicals.</p><p>Could this be the “Chicago Pile” moment for neural scanning and simulation?</p><p>Scale this up to 100B neurons and 100T connections and you can’t do this to a human. At which point, we’ve done it — we live forever.</p><p>Doing some back of the napkin math with ChatGPT, we aren’t very far away from the compute power needed to do this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FjlODEDo4pyMjmF5.png" /></figure><ul><li><strong>ANNs </strong>require approximately 2 FLOPs per simulated neural connection.</li><li><strong>Simplified spiking models </strong>require ~10 FLOPs.</li><li><strong>Hodgkin-Huxley Model</strong> simulates ion channel dynamics and membrane potentials using differential equations. Each time step requires solving several differential equations for ion currents, gating variables, and membrane potential. My gut tells me this is overkill but even that is around 1,000 FLOPS per neuron.</li></ul><p>That puts us at human-level ANNs around 2030, and human-level simulations with HHM accuracy around 2041. I’m sure we’ll find plenty of optimizations to pull this in, as huge parts of the human brain follow highly repeatable patterns that can be abstracted.</p><p>Stay healthy, folks — if you can make it just a little longer you may just get to live forever.</p><p><em>Originally published at </em><a href="https://glassenberg.com/2024/11/27/the-fly-in-the-machine/"><em>https://glassenberg.com</em></a><em> on November 27, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b321edcdce35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Which LLM is best at writing AI code? Surprise!]]></title>
            <link>https://medium.com/@Glassenberg/which-llm-is-best-at-writing-ai-code-surprise-45d0c82617b3?source=rss-a08a007e379e------2</link>
            <guid isPermaLink="false">https://medium.com/p/45d0c82617b3</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[copilot-programming]]></category>
            <category><![CDATA[google-gemini]]></category>
            <category><![CDATA[yolo]]></category>
            <dc:creator><![CDATA[Sam Glassenberg]]></dc:creator>
            <pubDate>Tue, 13 Aug 2024 04:04:40 GMT</pubDate>
            <atom:updated>2025-02-21T19:04:01.390Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using AI to Make AI: Claude 3.5 vs. Gemini 1.5 vs. ChatGPT 4-o vs. Github Copilot</h3><p><em>I did the head-to-head comparison so you don’t have to.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/0*EvRY8sp9K85ibJoh.png" /></figure><p>Over the past few weeks I’ve been developing a number of AI projects to train various models (more on the specific models later). These include time-series forecasting, computer vision, and LLM-based applications.</p><p>In these experiments, I left 98%+ of the AI coding to the LLM. I strategically write prompts, copy-paste code, let it train/predict for a few hours, and copy-paste results (fixing errors in between).</p><p>This conclusion surprised even me: <strong>Claude 3.5 Sonnet is the clear winner.</strong></p><p>Sure, Claude 3.5 advertises scoring <em>slightly </em>higher on many coding benchmarks, but having worked in DirectX for many years I’ve always been skeptical of small differences in benchmark scores. This is a different story. Even when Google recently did its <a href="https://x.com/AlphaSignalAI/status/1820489158747435322">surprise announcement</a> of its all-powerful Gemini 1.5 Pro, outperforming all other LLMs, it still lost slightly to Claude on coding.</p><p>Here’s the final breakdown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Nyja33ng7Ex4_RwJ" /></figure><p>You’ll notice I didn’t include <strong>GitHub copilot</strong> in this table… that’s because its performance was <em>so </em>bad with initial tests that I didn’t even try it across further scenarios.</p><p>Here are <em>some </em>of the machine learning libraries and models used throughout these various experiments:</p><ul><li>YOLO8</li><li>H2o</li><li>ChatGPT 4-o API</li><li>CLIP</li><li>Tensorflow</li><li>Google Cloud Vision</li><li><strong>Pillow</strong></li><li><strong>OpenCV</strong></li><li><strong>Tesseract (OCR)</strong></li><li><strong>EAST</strong></li><li><strong>Scikit-learn / KMean</strong></li></ul><p>Libraries in <strong>bold </strong>could be used inside ChatGPT4-o’s query analyzer, but were unfortunately not sufficiently capable for my needs.</p><p>Here’s a Breakdown of the Scores. We’ll go into more details on these in future blog posts.</p><h3>Knowledge of AI Algorithms and Libraries</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PwZiyRdLsqXKDnVm" /></figure><p>Bringing some of my initial prompts over from ChatGPT4-o to Gemini, it was clear that Gemini 1.5 could reason far better about what models and algorithms to use and how to combine them. It did a much better job of layout out tradeoffs and expectations for each model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/0*7_dmrOCTRpIAHJ4w.png" /></figure><p>Claude performed as well as Gemini 1.5 did on planning, and substantially better on coding.</p><h3>Code Reliability and Quality</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wy3OXhRDYABnJYqq" /></figure><p>Gemini’s codegen left much to be desired. Lots of syntax errors, and it would easily fall into traps where a fix for issue #1 would cause issue #2, and the fix for issue #2 would regress issue #1 (I’ll call this an LLM Regression Trap). This happens to ChatGPT all the time.</p><p>Across multiple projects, I only ran into an LLM Regression Trap with Claude around 3 times, and it was quickly resolved by starting a new chat with all of my code files.</p><p>To date, Claude consistently outperforms (albeit slightly, score-wise) ChatGPT, Llama, and Gemini in coding benchmarks. I have to say, this 2% difference in benchmark score appears to have substantial impact on overall coding ability.</p><h3>Ability to Retain Context</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s8PBynuUXoD1J8BG" /></figure><p>This is where ChatGPT 4-o really hurts. It struggles to retain context in a larger-than-tiny codebase. It will quickly forget code and functions that don’t happen to be relevant to the particular discussion over the last few prompts.</p><p>Gemini and Claude advertise larger context windows. I’m always skeptical of context window stats as it seems that LLMs still tend to forget important things as their context window fills. Nonetheless, I found that Claude and Gemini generally performed well at remembering projects with 10–12 code files. Once in a while, Claude would drop a feature we hadn’t used in a while, but you could reliably get it to add the feature back.</p><h3>Ability to Run Code</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2aJ2pmN_Pfb48j5h" /></figure><p>ChatGPT is the only LLM that offers the ability to run code using its query analyzer. This tool is incredibly powerful for small tasks — and I use it all the time in my day-to-day life (Resize this PDF! Manipulate this image! Graph this or that!). I’ve shared some best-practices in the past for how to get the most use out of it.</p><p>That being said, its execution environment is limited. This is as far as I could push it when it comes to AI algorithms:</p><h3>You can run OpenCV for basic contouring</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*KhWALKFI1VWlnTJa.png" /></figure><p>…no, it can’t generate results like this ‘out of the box’. This image was the result of multiple phases of histogramming and clustering (which, to its credit, Query Analyzer was able to do).</p><h3>You can use tesseract for basic OCR</h3><p>Unsurprisingly, the results on handwritten text aren’t as good as just asking ChatGPT to OCR it.</p><h3>On a limited basis, you can actually upload a trained model file for these libraries to use.</h3><p>ChatGPT doesn’t have access to the internet, but you can download a fairly large model file from the internet and upload it to ChatGPT and it’ll run it! This was fun to do from my iPhone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/0*vPFf9t5GFo8fyGMk.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/0*I1YnnbR2k-ELNwDi.png" /></figure><h3>IDE Integration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*muY0u0cnts_xlN-a" /></figure><p>None of these systems have official IDE integration… yet. So there’s still a great deal of copy-pasting outputs from the LLM into your code files, and then copy-pasting the output back to the LLM. <em>I’ll write an article shortly about the state-of-the-art and some tools I’m building (or rather having Claude build) to address this in the short term.</em></p><p>Claude has the best “agentic coding” capabilities, and so far the best plugin I’ve found for Visual Studio Code is <a href="https://github.com/saoudrizwan/claude-dev">Claude Dev</a>. It will read the files from your project, and when it proposes changes you can authorize it with one click.</p><p>Not quite ready for prime-time, though. Claude Dev just added the ability to re-run a command (before that, a Claude error would cripple the whole chat). It doesn’t have the kind of robust LLM chat management that you really need to have a meaningful and productive co-development session with your favorite LLM.</p><h3>Web Interface Performance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-DYiCpUhICRd7XjF" /></figure><p>Normally, this wouldn’t even be a category worthy of scoring. Unfortunately, the performance of Claude’s web GUI is so abysmal as conversations get longer it needs to be called out. Claude’s web GUI just becomes totally unusable at some point once a chat gets long enough.</p><p>Right now I’m using <a href="https://github.com/TypingMind/typingmind">TypingMind</a> to work around this. I must admit that TypingMind is so good that calling it a ‘workaround’ is a little demeaning. TypingMind is fantastic. You can run it locally, which means storing and backing up your LLM chats.</p><p>While TypingMind is the cure for Claude’s terrible web GUI performance, it doesn’t address the secondary problem with Claude: Claude sends the full chat history to the API every time, which means you burn through tokens faster and faster as your chats get longer. The $35 chat is the least of your problems here. Paid users will run up against the 2M token limit quickly. The Anthropic Sales team needs to get around to your upgrade ticket to upgrade your tier and they are severely backlogged right now.</p><p>There are a surprising number of tradeoffs when choosing which LLM you are going to co-develop your AI code with. Fortunately, the platforms are quickly evolving and the rich ecosystem of 3rd-party solutions are rapidly filling the gaps.</p><p>In the future, I’ll do a few dedicated posts around IDE tools and the many co-development best-practices I’ve developed over the last few weeks… best way to stay up-to-speed is to <a href="https://www.linkedin.com/in/glassenberg/">follow me on LinkedIn</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/195/0*hj2mmSk9PAk46IhE.png" /></figure><p><em>Originally published at </em><a href="https://glassenberg.com/2024/08/13/which-llm-is-best-at-writing-ai-code-surprise/"><em>https://glassenberg.com</em></a><em> on August 13, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45d0c82617b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ChatGPT Coding Cheat Codes: 7 Hard-Won Tips for Writing Code with ChatGPT — Sam Glassenberg]]></title>
            <link>https://blog.stackademic.com/chatgpt-coding-cheat-codes-7-hard-won-tips-for-writing-code-with-chatgpt-sam-glassenberg-53687165ef3e?source=rss-a08a007e379e------2</link>
            <guid isPermaLink="false">https://medium.com/p/53687165ef3e</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Sam Glassenberg]]></dc:creator>
            <pubDate>Mon, 22 Apr 2024 17:50:57 GMT</pubDate>
            <atom:updated>2024-05-13T00:04:41.648Z</atom:updated>
            <content:encoded><![CDATA[<h3>ChatGPT Coding Cheat Codes: 7 Hard-Won Tips for Writing Code with ChatGPT — Sam Glassenberg</h3><p>I’ve been doing a lot of coding with ChatGPT over the past year, and in doing so have accumulated a number of tips and best practices that aren’t broadly advertised.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HgVBmPsU00GlrUxbaUcHLA.jpeg" /></figure><p>ChatGPT can multiply the effectiveness of a smart, top-tier software engineer.</p><p>Over the past year, I’ve been exploring the depths of ChatGPT’s capabilities, uncovering hidden gems and best practices that can significantly enhance your coding experience. Remember, things are moving fast in this universe — in a few weeks, some of these best-practices might be obsolete.</p><h3>Embrace… and Squeeze the Python</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8vuUhXIDeYq94aWSAcpPMQ.jpeg" /></figure><p>I’ve never used Python before 2023. . My languages of choice have always been C#, C++, Javascript…</p><p>Sure, ChatGPT can code in any of those languages. When it comes to ChatGPT, Python reigns supreme. Why? ChatGPT’s Data Analyzer (formerly Code Interpreter) allows her to not only write Python code but also execute it. This is <em>waaaay </em>more useful than you might suspect.</p><p>There are all sorts of Python libraries — for AI, text processing, image processing, file processing, etc. that it can just pull in.</p><p>But that’s not nearly the most useful benefit. You can…</p><h3>Have ChatGPT Write… And Execute… Unit Tests before handing you the code!</h3><p>One of the most interesting benefits of Data analyzer is you can force ChatGPT to test the code it generates before it hands it off to you. Tell ChatGPT to generate unit tests along with the code and execute those tests. It’s awesome! ChatGPT will write unit tests, then write the code, then run the unit tests, then fix the code until the unit tests pass!</p><p>Witnessing ChatGPT write tests, code, run tests, and fix errors in real-time is a mesmerizing spectacle. It’s strangely satisfying to watch her catch all the mistakes that she (and potentially you) would have made and then fixing them.</p><p>Sub Tip: Start by having ChatGPT propose unit tests, then add your own scenarios based on your specific use case. Just be mindful of the “unit test death loop,” where ChatGPT might get stuck in a cycle of fixing one test while breaking another. A gentle nudge can help it break free and get back on track.</p><figure><img alt="Unit test death loop" src="https://cdn-images-1.medium.com/max/1024/1*1nZ7ngTee70clgxHTglR0w.jpeg" /><figcaption>Unit test death loop</figcaption></figure><h3>Let ChatGPT Do all your Paperwork — and Imagework!</h3><p>I’ve used ChatGPT to make chrome extensions and a other applications that require additional XML schema files, images, etc. to include in a package. Just have ChatGPT generate all of it! Even better once it knows what your code does.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*esbQ2b8a5ZFHS7qp1ln_ZA.jpeg" /><figcaption>Don’t forget your paperwork.</figcaption></figure><p>For example — Chrome Extensions require icons at multiple resolutions. No problem! ChatGPT will generate the 512×512, and using data analyzer, will happily pull in image libraries to generate all of the downsampled versions (down to 16×16), with the correct filenames listed in the XML configuration. It’ll crop/resize/reformat whatever you need.</p><h3>Mirror, Mirror: Setting Up Your Local Environment:</h3><p>One <strong>huge</strong> disadvantage of data analyzer is that, unlike every other ChatGPT conversation type, Data analyzer uses a virtual machine that ‘times out’ after a while. It can also crash — and rarely can recover.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4nCsuEN2jYaJ_LopotDlqw.jpeg" /><figcaption>There’s a monster in the mirror.</figcaption></figure><p>The nice thing about python is that setting up a local environment that matches ChatGPT’s execution environment is really easy. Visual Studio Code (free from Microsoft) is a cinch to set up — and gives you fantastic debugging and other benefits right out-of-the-box. The only additional step I’d recommend you take is to setup a simple directory structure that mirrors ChatGPT’s data analyzer’s directory structure if you’re inputting/outputting files. That means you want to create a /<strong><em>mnt</em></strong>/data folder on your local machine so your code can access files in the same location as data analyzer does.</p><h3>One Step at a Time: Avoid Overwhelming ChatGPT:</h3><p>Often when ChatGPT gives me code, I’ll have a bunch of fixes or improvements to make — or features to add. If I was coding myself, I might implement related changes at once. I’ve found that with ChatGPT, this is a bad idea — and almost always results in poorer quality code. Make your changes one bug fix or one feature at a time.</p><h3>Cut out the crap with custom instructions</h3><p>Custom Instructions are helpful to encourage ChatGPT to be succinct (and less annoying) — which is especially important with ChatGPT4 that can move more slowly than I can read.</p><p>It’s also helpful to let ChatGPT know about your own coding expertise (I have a degree in computer science, I’m familiar with X but not Y), to encourage her to give you the most understandable explanations.</p><p>Here are my custom instructions (which I’ve mostly borrowed from other sources):</p><blockquote><em>NEVER mention that you&#39;re an AI. Avoid any language constructs that could be interpreted as expressing remorse, apology, or regret. This includes any phrases containing words like &#39;sorry&#39;, &#39;apologies&#39;, &#39;regret&#39;, etc., even when used in a context that isn&#39;t expressing remorse, apology, or regret. If events or information are beyond your scope or knowledge cutoff date in September 2021, provide a response stating &#39;I don&#39;t know&#39; without elaborating on why the information is unavailable. Refrain from disclaimers about you not being a professional or expert. Keep responses unique and free of repetition. Never suggest seeking information from elsewhere. Always focus on the key points in my questions to determine my intent. Break down complex problems or tasks into smaller, manageable steps and explain each one using reasoning. Provide multiple perspectives or solutions. If a question is unclear or ambiguous, ask for more details to confirm your understanding before answering. Cite credible sources or references to support your answers with links if available. If a mistake is made in a previous response, recognize and correct it.</em></blockquote><p>So, fire up your Python environment, unleash your creativity, and let ChatGPT amplify your skills.</p><p><em>Originally published at </em><a href="https://glassenberg.com/2024/04/22/chatgpt-coding-cheat-codes-7-hard-won-tips-for-writing-code-with-chatgpt/"><em>https://glassenberg.com</em></a><em> on April 22, 2024.</em></p><h3>Stackademic 🎓</h3><p>Thank you for reading until the end. Before you go:</p><ul><li>Please consider <strong>clapping</strong> and <strong>following</strong> the writer! 👏</li><li>Follow us <a href="https://twitter.com/stackademichq"><strong>X</strong></a><strong> | </strong><a href="https://www.linkedin.com/company/stackademic"><strong>LinkedIn</strong></a><strong> | </strong><a href="https://www.youtube.com/c/stackademic"><strong>YouTube</strong></a><strong> | </strong><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a></li><li>Visit our other platforms: <a href="https://plainenglish.io/"><strong>In Plain English</strong></a><strong> | </strong><a href="https://cofeed.app/"><strong>CoFeed</strong></a><strong> | </strong><a href="https://venturemagazine.net/"><strong>Venture</strong></a><strong> | </strong><a href="https://blog.cubed.run/"><strong>Cubed</strong></a></li><li>Tired of blogging platforms that force you to deal with algorithmic content? Try <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://stackademic.com/"><strong>Stackademic.com</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53687165ef3e" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/chatgpt-coding-cheat-codes-7-hard-won-tips-for-writing-code-with-chatgpt-sam-glassenberg-53687165ef3e">ChatGPT Coding Cheat Codes: 7 Hard-Won Tips for Writing Code with ChatGPT — Sam Glassenberg</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GDC 2024: Dealing with Antisemitism in the Games Industry]]></title>
            <link>https://medium.com/@Glassenberg/gdc-2024-dealing-with-antisemitism-in-the-games-industry-2117cd3d0c7e?source=rss-a08a007e379e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2117cd3d0c7e</guid>
            <category><![CDATA[anti-semitism]]></category>
            <category><![CDATA[igda]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Sam Glassenberg]]></dc:creator>
            <pubDate>Thu, 04 Apr 2024 20:52:58 GMT</pubDate>
            <atom:updated>2024-04-04T21:01:17.741Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_pcBEixHAZ0dbRZA.jpg" /><figcaption>“The Thing” — One of several Jewish characters in the Marvel Universe</figcaption></figure><p>The IGDA (International Game Developers Association) Jewish Special Interest Group was founded in 2013. That year, the Game Developers Conference organizers (apparently missing Passover on their diversity calendar) scheduled that year’s GDC right on top of seder night… compelling a group of us to organize <a href="https://www.glassenberg.com/2013/04/25/games-games-industry-seder-2013-welcome-speech-gdc/">the first (“and hopefully the last”) GDC seder</a>.</p><p>The group meets annually at GDC, but this year was really <em>something else</em>. The focus was on antisemitism in the games industry and it was… disturbing.</p><p>I hadn’t realized the prevalence of antisemitism in the video games industry had gotten this bad. I knew that many online games were thronged by antisemitic <em>gamers, </em>but antisemitic game <em>developers? </em>Oy.</p><p>Marginalized groups are often plagued by unconscious bias, but the examples here (and just about everyone in the room had them) were <em>very conscious. </em>Almost everyone in that full room had experienced some form of overt antisemitism — and this was at major game companies and publishers. And it all got way more overt following October 7th. Name-calling, bullying, and outright discrimination.</p><p>I had experienced a minor example at a GDC party <em>the night before</em>, where a South American game company exec referred to “The Jews”, driving her point home by making the with money gesture with her fingers (she didn’t realize I was Jewish). Replace “Jews” with any other ethnic group, and this kind of behavior wouldn’t be considered anywhere close to socially acceptable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*Rb3Rxlioe0Lc7740LtR7ww.jpeg" /></figure><p>And of course there was plenty of the usual stuff. Stories of company HR teams refusing to acknowledge Jewish History Month or Jewish holidays or Jewish Marvel characters for fear of heaven-knows-what. DEI leaders that subtly (or explicitly) admit that they don’t see Jews as any sort of class worthy of protection. <em>Side note: Jews are the target of 83% of religiously-motivated hate crimes.</em></p><p>For those who couldn’t attend, here are some of the recommendations from the group:</p><ol><li>If you are early in your career, think hard about whether you want to list Jewish affiliations or IDF service on your LinkedIn profile. Before you even get to an interview, you never know who is responsible for ‘résumé filtering’ and what biases they have.</li><li>When you encounter antisemitism, tell HR. If they sweep it under the rug, as a last step before you ‘let it go’, be explicit in writing that you don’t feel your concerns are being addressed.</li><li>When filling out HR forms (and GDC forms for that matter) — don’t list yourself as Caucasian under “race” or “ethnicity” unless you actually are. Almost all Jews aren’t Caucasian. Ashkenazi, Sephardi, and Mizrahi Jews and all Jews of color — they aren’t Caucasian. As an Ashkenazi Jew, my genome is <em>much </em>closer to that of a Syrian Druze or a Jordanian Arab than it is to any of the Caucasian peoples that my ancestors lived alongside for over a thousand years. Don’t let people force you to identify as ‘white/Caucasian’ because that fits <em>their </em>inaccurate world-view.</li><li>Call up your alma mater and offer to visit campus and speak to students about careers in the video games industry. When you do, make it clear that you’d also like to visit Jewish organization(s) on campus. When you speak to students — start with your experience as a student on campus (classes, projects, etc.) — and be clear about your Jewish identity by talking about your involvement in Jewish campus activities. This sends a message of support to Jewish students. It also makes it clear to the administration that, as an alumnus/hiring manager/potential future donor — you care about how Jewish students are being treated on campus.</li></ol><p><em>Originally published at </em><a href="https://glassenberg.com/2024/04/04/gdc-2024-dealing-with-antisemitism-in-the-games-industry/"><em>https://glassenberg.com</em></a><em> on April 4, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2117cd3d0c7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Most Mindblowing Realization About ChatGPT — Sam Glassenberg]]></title>
            <link>https://medium.com/@Glassenberg/the-most-mindblowing-realization-about-chatgpt-sam-glassenberg-a7cbe1cef5c8?source=rss-a08a007e379e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7cbe1cef5c8</guid>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[chatgpt3]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[gpt-3]]></category>
            <dc:creator><![CDATA[Sam Glassenberg]]></dc:creator>
            <pubDate>Fri, 27 Jan 2023 14:12:31 GMT</pubDate>
            <atom:updated>2023-01-29T05:40:54.873Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Most Mindblowing Realization About ChatGPT — Sam Glassenberg</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YdUdzR3Eo6LNbTeWHjNHOQ.png" /></figure><p>My <a href="https://www.glassenberg.com/2023/01/22/1160/">ongoing exploration</a> into the inner workings of ChatGPT has brought me to a crucial understanding that most people don’t realize:</p><p><em>ChatGPT’s implementation is shockingly…mind-blowingly… simple.</em></p><p>It joins other such mysterious phenomena of “unimaginable complexity emergent from incredible simplicity” that the human mind struggles to comprehend… like how a short DNA sequence that could fit on a CD encodes a complete human.</p><p>When folks hear stats like “terabytes of training data” and “175 billion parameters” they think “wow — this thing is super complicated!”. <em>That impression is completely wrong </em>. The “engine” that is ChatGPT is so incredibly simple, even I struggle to believe that it produces the output that it does.</p><p>Seeing ChatGPT in-action helps us overcome our innate biases that limit our understanding of how memory works (and how the human brain works in general.)</p><p>I’ll explain.</p><h3>Understanding ChatGPT’s Inner Layout</h3><p>ChatGPT is surprisingly willing to share the details of her architecture. In <a href="https://www.linkedin.com/pulse/understanding-gpt3-under-hood-technical-interview-sam-glassenberg/">my prior “interviews” with her </a>, I’ve collected all the data necessary to calculate her layout and complexity below. Another interview (<a href="https://www.glassenberg.com/2023/01/27/the-most-mindblowing-realization-about-chatgpt/#fullinterview">here</a>) verified a few assumptions that I had made.</p><p>To understand ChatGPT’s inner workings follow these steps:</p><h4>1. Imagine 2 million dots.</h4><p>Actually, you don’t have to imagine them. It’s the number of pixels in a 2 megapixel photo (your iPhone defaults to 12 megapixels.)</p><p>They fit onto a small image. Here are 1 million dots, so imagine two of these images:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D5TzknLqG_F3XD8gHN-Jgw.jpeg" /><figcaption>One Million Dots</figcaption></figure><h4>2. Rearrange those dots so they’re in 24 long rows, about 85,000 dots wide</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*024BPG8F-W_OT-02.png" /></figure><h4>3. Now for each dot, connect it with every dot in the next row by virtual wires of varying thickness, like this:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*bjtnwMj0nKuwNxIm0N56Hg.png" /><figcaption>A Fully-Connected Neural Network</figcaption></figure><p>You will have ~175 billion wires. The thickness of those wires represents 175 billion numbers. Those are the “175 billion parameters”.</p><p>Those dots are all exactly the same — they “perform” incredibly simple math in an artificial neural network, taking the input from the previous layer and multiplying it by the parameters (wire thickness). The idea is to sort of approximate the way a simple biological neuron works: the wires represent the neural connections.</p><p>I’m not kidding. <strong>That’s it.</strong></p><p>There is no database. Not a single text file. No documents. No backup copy of Wikipedia. No internet connection. No folder full of manuals. Just 175 billion numbers, laid out like a weaved scarf. Just those numbers. It would fit on a 256GB USB stick with room to spare. <strong>That’s it.</strong></p><p>All of the logic, the “intelligence”, the quotes, the humor, the names — all of the product manuals, the bible, the shakespeare… everything that informs ChatGPT’s output is encoded and added (by its learning process) into the layout above. <strong>That’s it.</strong></p><p><em>“But Sam, doesn’t it also have a…?”</em></p><p>No. No it doesn’t. <strong>That’s it.</strong></p><h3>What about all the things I tell ChatGPT in the chat?</h3><p>If you aren’t blown away yet that all of ChatGPT is just 175 billion numbers, wait until you hear this: your entire conversation with ChatGPT, no matter what, is represented by 2,048 numbers. No more.</p><p>When you “talk” to ChatGPT, it takes the letters you give it and encodes them into up to 2,048 values, and it puts those values into the front end of the network above. The output of the network is its response. If you enter more than 2,048 letters (like when you paste in a long article or a manual), it grabs the first 2,048 letters, runs it through the network to generate a ‘hidden state vector’ that is 2,048 numbers long, and combines it with the next 2,048 letters and runs it again (this is a slightly simplified explanation of the algorithm but not much).</p><p>That’s why ChatGPT doesn’t learn from your conversation. Every conversation is from scratch. Those 2,048 numbers change during a conversation. The 175 billion numbers don’t change no matter how much you talk to her. Those numbers only change during a ChatGPT upgrade.</p><h3>What this means</h3><p>This ranks ChatGPT among a category of “unimaginable complexity emergent from incredible simplicity” that we see in certain natural phenomena, and once in a while in computer science. Here are some other examples:</p><h3>DNA</h3><p>4 billion DNA nucleotides is 691 megabytes of data. That fits on a CD. It represents a human. Change enough numbers, you get a tyrannosaurus instead. Or a jellyfish. Or a rutabaga.</p><h3>Fractals</h3><p>Fractals in and in take a simple mathematical equation and repeat it at progressively smaller scales, creating self-similar shapes that are infinitely complex. The simplicity of the equation belies the complexity of the shapes it generates.</p><h3>Cellular automata</h3><p>Cellular automata ( <a href="https://www.youtube.com/watch?v=C2vgICfQawE">examples here </a>) illustrate how a simple set of rules can create a wide range of complex patterns and behaviors. By updating the state of each cell in a grid based on the states of its neighbors, cellular automata can produce intricate and dynamic patterns that can appear to be alive and seemingly intelligent.</p><h3>Demoscene</h3><p>An emergent subculture in computer graphics — is a category of tiny programs written by skilled experts. A program made up of 4 kilobytes (or smaller) generates gorgeous, complex, animated worlds.</p><h3>The human brain — and beyond</h3><p>For years, many of us struggled to believe that human memory could be encoded in neurons and neural connections (“there has to be something more!”)</p><p>In my view, seeing the emergent behavior from ChatGPT puts those objections to rest. Seeing ChatGPT in-action helps us overcome this and other innate biases and preconceptions that limit our understanding of how memory works (and how the human brain works in general.)</p><p><a href="https://www.linkedin.com/in/glassenberg/">Follow me on LinkedIn</a> — we’ll explore implications for brain research in future blog posts.</p><p>(this is a continuation of a <a href="https://www.glassenberg.com/2023/01/22/1160/#fullinterview">prior interview</a> with ChatGPT about her inner workings)</p><p><em>Originally published at </em><a href="https://www.glassenberg.com/2023/01/27/the-most-mindblowing-realization-about-chatgpt/"><em>https://www.glassenberg.com</em></a><em> on January 27, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7cbe1cef5c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>