<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: chenglou</title><link>https://news.ycombinator.com/user?id=chenglou</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sun, 12 Apr 2026 09:44:25 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=chenglou" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[Kolmogorov Complexity of Neutral Networks]]></title><description><![CDATA[
<p>Article URL: <a href="https://twitter.com/BrantonDeMoss/status/1868666711890706675">https://twitter.com/BrantonDeMoss/status/1868666711890706675</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=42439999">https://news.ycombinator.com/item?id=42439999</a></p>
<p>Points: 1</p>
<p># Comments: 0</p>
]]></description><pubDate>Tue, 17 Dec 2024 10:04:00 +0000</pubDate><link>https://twitter.com/BrantonDeMoss/status/1868666711890706675</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=42439999</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42439999</guid></item><item><title><![CDATA[New comment by chenglou in "Midjourney web experience is now open to everyone"]]></title><description><![CDATA[
<p>Website contributor here! Answering some of the technical questions on Twitter: <a href="https://x.com/_chenglou/status/1826425720522080480" rel="nofollow">https://x.com/_chenglou/status/1826425720522080480</a></p>
]]></description><pubDate>Thu, 22 Aug 2024 05:01:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=41316983</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=41316983</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41316983</guid></item><item><title><![CDATA[New comment by chenglou in "Writing Shaders in Pure CSS"]]></title><description><![CDATA[
<p>Oh hey =D<p>The ring's source code in particular had to be transcribed from an actual shader I made (<a href="https://www.shadertoy.com/view/msd3R2" rel="nofollow noreferrer">https://www.shadertoy.com/view/msd3R2</a>). I didn't have the patience to write it directly in CSS. It's neither the right semantic nor the medium for it (which does make you wonder what CSS' medium was supposed to be).<p>Out of curiosity, I've transcribed that ring, which runs at <1 fps with pure CSS, into a JS version with requestionAnimationFrame + setting the background color (<a href="https://github.com/chenglou/pure-css-shaders-art/blob/master/ringjs.html">https://github.com/chenglou/pure-css-shaders-art/blob/master...</a>).<p>Perhaps unsurprisingly, it runs at full 120fps on a decent laptop (it's just 21*21 JS style setting really). I've tried to make a half-JS, half-CSS version, and the speed is somewhere in-between. Basically, CSS variables are _extremely_ slow across all browsers, and I don't believe I've hit some particular edge-case. They're not used idiomatically here, but still, we shouldn't hit this drastic of slowdowns when updating 441 styles. They're also pretty hard to read the moment the calculation isn't some trivial basic arithmetics; and even then...<p>The true shader version runs at basically infinite fps =)</p>
]]></description><pubDate>Sun, 12 Nov 2023 04:25:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=38237295</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=38237295</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38237295</guid></item><item><title><![CDATA[Pitfalls of Callback-Based APIs]]></title><description><![CDATA[
<p>Article URL: <a href="https://thelig.ht/callbacks/">https://thelig.ht/callbacks/</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=37620949">https://news.ycombinator.com/item?id=37620949</a></p>
<p>Points: 2</p>
<p># Comments: 0</p>
]]></description><pubDate>Sat, 23 Sep 2023 06:04:26 +0000</pubDate><link>https://thelig.ht/callbacks/</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=37620949</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37620949</guid></item><item><title><![CDATA[Markprompt: Open-Source GPT-4 for Markdown, Markdoc and MDX]]></title><description><![CDATA[
<p>Article URL: <a href="https://github.com/motifland/markprompt">https://github.com/motifland/markprompt</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=35297215">https://news.ycombinator.com/item?id=35297215</a></p>
<p>Points: 9</p>
<p># Comments: 3</p>
]]></description><pubDate>Fri, 24 Mar 2023 23:47:42 +0000</pubDate><link>https://github.com/motifland/markprompt</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=35297215</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=35297215</guid></item><item><title><![CDATA[New comment by chenglou in "“Clean” code, horrible performance"]]></title><description><![CDATA[
<p>Yeah I was only talking about quantities. Equivalently, assume that it's a linear algorithm in the child and a linear one in the parent. Ultimately it ends up as O(nm) being some big number, but when people do runtime analysis in the real world, they don't tend to consider the composition of these blackboxes since there'd be too many combinations. (Composition of two polynomial runtimes would be even worse, yeah.)<p>Basically, performance doesn't compose well under current paradigms, and you can see Casey's methods as starting from the assumption of wanting to preserve performance (the cycles count is just an example, although it might not appeal to some crowds), and working backward toward a paradigm.<p>There was a good quote that programming should be more like physics than math.</p>
]]></description><pubDate>Thu, 02 Mar 2023 03:55:44 +0000</pubDate><link>https://news.ycombinator.com/item?id=34991808</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=34991808</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34991808</guid></item><item><title><![CDATA[New comment by chenglou in "“Clean” code, horrible performance"]]></title><description><![CDATA[
<p>It's more than that. The way black box composition is done in modern software, your n=100 code (say, a component) gets reused into a another thing somewhere above, and now you're being iterated through m=100 times. Oops, now n=10k<p>Generally, Casey seems to preach holistic thinking, finding the right mental model and just write the most straightforward code (which is harder than it looks; people get distracted in the gigantic state space of solutions all the time). However this requires 1. a small team of 2. good engineers. Folks argue that this isn't always feasible, which is true, but the point of these presentations is to spread the coding patterns & knowledge to train the next gen of engineers to be more aware of these issues and work toward said smaller team & better engineers direction, knowing that we might never reach it. Most modern patterns (and org structures) don't incentivize these 2 qualities.</p>
]]></description><pubDate>Wed, 01 Mar 2023 01:57:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=34977781</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=34977781</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=34977781</guid></item><item><title><![CDATA[New comment by chenglou in "Always use [closed, open) intervals"]]></title><description><![CDATA[
<p>Quite a few APIs use a pair of `{start, length}` instead, which in the context of the post's example, is even clearer. Empty interval would be `length == 0`, time interval would be a single array of `starts`, etc. Fewer subtractions (to get length) usually end up nicer too.</p>
]]></description><pubDate>Tue, 22 Nov 2022 12:08:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=33704868</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=33704868</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=33704868</guid></item><item><title><![CDATA[So you want to build a generator (10k Bowls of Oatmeal)]]></title><description><![CDATA[
<p>Article URL: <a href="https://galaxykate0.tumblr.com/post/139774965871/so-you-want-to-build-a-generator">https://galaxykate0.tumblr.com/post/139774965871/so-you-want-to-build-a-generator</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=31717765">https://news.ycombinator.com/item?id=31717765</a></p>
<p>Points: 1</p>
<p># Comments: 0</p>
]]></description><pubDate>Sun, 12 Jun 2022 20:03:34 +0000</pubDate><link>https://galaxykate0.tumblr.com/post/139774965871/so-you-want-to-build-a-generator</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=31717765</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31717765</guid></item><item><title><![CDATA[New comment by chenglou in "Four Eras of JavaScript Frameworks"]]></title><description><![CDATA[
<p>Personally I feel that Cappuccino is one of the last frameworks that still cared about a kind of interaction design that’s no longer discussed on the web, replaced mostly by more devops/abstraction-oriented discussions.<p>I manage a web UI programming language in my free time, and the juxtaposition of folks claiming FP ergonomics benefits, then upon my request, showing a static, interaction-less end result whose improved version would obviate their pristine architecture, is pretty staggering. The typical defense is "hey we're not designers" but if you zoom out a bit you realize the whole environment doesn't foster engineers to care about design concerns anymore (barring a niche but valuable vertical of optimizing for payload size). This in turn puts pressure back onto designers who come to expect less and less of what they care about on the web.<p>Just the other day a newcomer shipped an animated row transition after fighting her framework for 3 weeks. The designer was delighted, but the manager didn't even get the point because he matured in whichever era of JS framework that de-emphasized acquiring taste in interactions.<p>I myself come from a Flash background, so rather than seeing an upward trend, I see a decline in UX concerns, followed by an incline of devops-related concerns in UI frameworks (accompanied by HN comments saying that in both cases the web should have stayed as a document format, only to end up with an awkward mix of document + app architecture their desktop apps through Electron anyway).<p>If I were to categorize these "eras", I'd rather take the perspective of wondering at which point, and why, framework process ended up more important than the product. Heck, a similar thing is happening on native too, unfortunately. Where did all the interaction designers go?<p>Maybe AR would nudge more folks to learn and focus on rendering, gestures, transitions, framerate, intent and the rest.</p>
]]></description><pubDate>Wed, 27 Apr 2022 19:47:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=31184853</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=31184853</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=31184853</guid></item><item><title><![CDATA[New comment by chenglou in "Show HN: Pure CSS Shaders Art"]]></title><description><![CDATA[
<p>No not really. It’s just a bunch of spans styles</p>
]]></description><pubDate>Sun, 20 Feb 2022 23:43:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=30410364</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=30410364</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30410364</guid></item><item><title><![CDATA[Show HN: Pure CSS Shaders Art]]></title><description><![CDATA[
<p>Article URL: <a href="https://github.com/chenglou/pure-css-shaders-art">https://github.com/chenglou/pure-css-shaders-art</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=30401284">https://news.ycombinator.com/item?id=30401284</a></p>
<p>Points: 11</p>
<p># Comments: 4</p>
]]></description><pubDate>Sat, 19 Feb 2022 22:51:41 +0000</pubDate><link>https://github.com/chenglou/pure-css-shaders-art</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=30401284</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30401284</guid></item><item><title><![CDATA[New comment by chenglou in "The Elements of Cache Programming Style (2000)"]]></title><description><![CDATA[
<p>Some upcoming languages like Zig and Jai have features to allow you to easily switch from array-of-structures to structure-of-arrays at writing time (<a href="https://www.youtube.com/watch?v=zgoqZtu15kI" rel="nofollow">https://www.youtube.com/watch?v=zgoqZtu15kI</a>). Some edge cases also require rather unique ways of chopping up data, that wouldn't lend themselves well to be shoehorned in one of the canned categories of transforms.<p>Although constraint declaration is orthogonal to data-oriented development, I'd say that the philosophy of using generic constraint solvers (or other overly generalized CS ideas) goes against the spirit of DOD, which is to "just simply do the work". It is after all reacting against object-orientation (and even modern FP) which tended to think too much in the abstract and worrying too much about some form of taxonomy, as opposed to coding against plain data.</p>
]]></description><pubDate>Wed, 16 Feb 2022 22:45:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=30366872</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=30366872</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30366872</guid></item><item><title><![CDATA[New comment by chenglou in "Are modules without imports “considered harmful”?"]]></title><description><![CDATA[
<p>I help maintain ReScript (<a href="https://rescript-lang.org" rel="nofollow">https://rescript-lang.org</a>) and we've been rolling without an import statement for years now (basically OCaml's module system). The default is to just write `MyModule.doThis` at callsites. Sometime you do wildcard open (`open MyModule`) within the right scope. Sometime you do it at the top level for convenience (e.g. stdlib), but folks try to be judicious. And yes, you can alias a module path, e.g. `module Student = School.Class.Student`. Worth noting: the reason why fully qualified `MyModule.doThis` can be the default, is that we _usually_ dictate filenames to be unique within a project, so there's no verbose path issue nor refactoring issues (and yes this works fine... Facebook does it too).<p>Static analysis-wise (which is what most of the blog post's about), things are basically the same. The tradeoffs are mostly just in terms of readability. I used to be ambivalent about this myself, but looking at the growing body of GitHub TypeScript code with mountains of imports automated by VSCode, imo we've landed on a decent enough design space.</p>
]]></description><pubDate>Tue, 08 Feb 2022 19:17:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=30263122</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=30263122</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30263122</guid></item><item><title><![CDATA[New comment by chenglou in "Thoughts on Return, Break and Continue"]]></title><description><![CDATA[
<p>Jai is, imo, doing it right! For custom iteration one really _just_ wants it to be a little syntax sugar over a regular loop. Most other languages end up constructing some paradigm for iteration that drags in OO, FP, some interface concepts, generics, etc. Never mind that some edge-case async generator iteration can't leverage the `for` syntax; they deserve to stand out and be examined anyway. Especially in the case of Jai, where you'd want assurance that the for loop isn't incurring some weird function, allocation and other hidden overhead. No sufficiently smart compiler needed.<p>Compare that to e.g. Swift's iteration, with corners of undefined behaviors, potential allocations, and a collection types hierarchy that feels more like doing taxonomy than just looping.<p>Though to be fair, Jai's loop is rather intense in its usage of a macro system's features.<p>Related: Common Lisp loop macro: <a href="http://www.ai.sri.com/pkarp/loop.html" rel="nofollow">http://www.ai.sri.com/pkarp/loop.html</a></p>
]]></description><pubDate>Fri, 07 Jan 2022 23:40:14 +0000</pubDate><link>https://news.ycombinator.com/item?id=29846565</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=29846565</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29846565</guid></item><item><title><![CDATA[The Countries Apple Cares About Most]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.justinobeirne.com/apple-priority-countries">https://www.justinobeirne.com/apple-priority-countries</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=29820438">https://news.ycombinator.com/item?id=29820438</a></p>
<p>Points: 1</p>
<p># Comments: 0</p>
]]></description><pubDate>Thu, 06 Jan 2022 07:22:24 +0000</pubDate><link>https://www.justinobeirne.com/apple-priority-countries</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=29820438</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29820438</guid></item><item><title><![CDATA[Guy Steele: Fortress Features and Lessons Learned]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.youtube.com/watch?v=EZD3Scuv02g">https://www.youtube.com/watch?v=EZD3Scuv02g</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=29455923">https://news.ycombinator.com/item?id=29455923</a></p>
<p>Points: 3</p>
<p># Comments: 0</p>
]]></description><pubDate>Mon, 06 Dec 2021 03:51:37 +0000</pubDate><link>https://www.youtube.com/watch?v=EZD3Scuv02g</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=29455923</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29455923</guid></item><item><title><![CDATA[Alien Mathematics]]></title><description><![CDATA[
<p>Article URL: <a href="https://troynikov.io/alien-mathematics/">https://troynikov.io/alien-mathematics/</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=29402436">https://news.ycombinator.com/item?id=29402436</a></p>
<p>Points: 67</p>
<p># Comments: 27</p>
]]></description><pubDate>Wed, 01 Dec 2021 10:22:17 +0000</pubDate><link>https://troynikov.io/alien-mathematics/</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=29402436</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29402436</guid></item><item><title><![CDATA[Refterm Lecture Part 1 – Philosophies of Optimization]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.youtube.com/watch?v=pgoetgxecw8">https://www.youtube.com/watch?v=pgoetgxecw8</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=29089265">https://news.ycombinator.com/item?id=29089265</a></p>
<p>Points: 2</p>
<p># Comments: 0</p>
]]></description><pubDate>Wed, 03 Nov 2021 00:00:24 +0000</pubDate><link>https://www.youtube.com/watch?v=pgoetgxecw8</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=29089265</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29089265</guid></item><item><title><![CDATA[Apple Maps: Why Is “Look Around” Rolling Out So Slowly?]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.justinobeirne.com/look-around-rollout">https://www.justinobeirne.com/look-around-rollout</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=28966121">https://news.ycombinator.com/item?id=28966121</a></p>
<p>Points: 1</p>
<p># Comments: 0</p>
]]></description><pubDate>Sat, 23 Oct 2021 05:58:29 +0000</pubDate><link>https://www.justinobeirne.com/look-around-rollout</link><dc:creator>chenglou</dc:creator><comments>https://news.ycombinator.com/item?id=28966121</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=28966121</guid></item></channel></rss>