<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: alexpetros</title><link>https://news.ycombinator.com/user?id=alexpetros</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Wed, 12 Aug 2026 14:25:23 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=alexpetros" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by alexpetros in "The Difference Between a Button and a Link"]]></title><description><![CDATA[
<p>Totally, this is part of the problem I'm trying to solve. I wrote a little about these "call to action links" that you're describing in the proposal.[0] The tl;dr is that I think it would be easier to hold the line that "links should look like links" if we supported the legitimate use cases for navigating with buttons.<p>I would <i>love</i> more feedback from the accessibility engineering community so please look up my email or comment on the proposal if you think I've missed something.<p>[0] <a href="https://triptychproject.org/proposals/button-actions#what-about-ctas" rel="nofollow">https://triptychproject.org/proposals/button-actions#what-ab...</a></p>
]]></description><pubDate>Wed, 29 Jul 2026 04:40:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=49093487</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=49093487</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49093487</guid></item><item><title><![CDATA[New comment by alexpetros in "The Difference Between a Button and a Link"]]></title><description><![CDATA[
<p>> Cancel doesn't navigate. In fact, neither of them do.<p>This is correct. The point of the proposal is that you <i>should</i> be able to implement this pattern with just navigations, and that implementing it differently doesn't change the user semantics.<p>> If you've taken the twenty lines of css to make a button look like anything other than the default browser styles, you can add the two lines of progressive enhancement JavaScript to handle space.<p>One important stakeholder for the proposal is governments and other websites that care about building accessible web experiences that work without JavaScript enabled. There are also many differences in the behaviors that can't be rectified with JavaScript (some examples are in the original article as well as the linked proposal).</p>
]]></description><pubDate>Wed, 29 Jul 2026 04:33:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=49093449</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=49093449</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49093449</guid></item><item><title><![CDATA[New comment by alexpetros in "The Difference Between a Button and a Link"]]></title><description><![CDATA[
<p>What if I want the cancel button to be to the left of the submit button? This is how GitHub lays out those buttons, for instance. There's fundamentally no reason why a button's functionality should be dictated by its position on the page.<p>The proposal has an in-depth explanation of why this and other workarounds (like using the `form` attribute and a bunch of dangling forms) aren't sufficient.[0]<p>[0] <a href="https://triptychproject.org/proposals/button-actions#existing-workarounds" rel="nofollow">https://triptychproject.org/proposals/button-actions#existin...</a></p>
]]></description><pubDate>Wed, 29 Jul 2026 04:01:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=49093278</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=49093278</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49093278</guid></item><item><title><![CDATA[New comment by alexpetros in "The Difference Between a Button and a Link"]]></title><description><![CDATA[
<p>I'm not entirely sure what you mean by "in-between" element, but that's not what this proposal does. This proposal simply augments the button's existing ability to navigate the current context by removing the need to wrap it in a form. This is useful because sometimes buttons are already the right semantic element to use, but you can't use them to do this without JavaScript.<p>Also, that link has a lot of wrong information and is not an official W3C site. It even has a LinkedIn page.[0]<p>[0]<a href="https://www.linkedin.com/company/thewcagcom/" rel="nofollow">https://www.linkedin.com/company/thewcagcom/</a></p>
]]></description><pubDate>Wed, 29 Jul 2026 03:56:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=49093249</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=49093249</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49093249</guid></item><item><title><![CDATA[New comment by alexpetros in "The Difference Between a Button and a Link"]]></title><description><![CDATA[
<p>You linked to `formaction`, which allows buttons to control the action of their nested form. This proposal allows buttons to make actions independent of forms, and the blog has an example of how independent button actions compose nicely with the existing `formaction` and `formmethod` controls.</p>
]]></description><pubDate>Wed, 29 Jul 2026 03:47:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=49093195</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=49093195</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49093195</guid></item><item><title><![CDATA[New comment by alexpetros in "The Difference Between a Button and a Link"]]></title><description><![CDATA[
<p>> And that's partially because "Cancel" is pretending you're in a desktop app with desktop idioms. No real, actual person designs websites like this.<p>If I click "Edit" on a GitHub comment, it shows me two buttons, "Cancel" and "Update Comment." Patterns like this can be found all over the web on sites you certainly use.<p>> There's functionally no reason to do this. It doesn't add anything for the user, it only takes things away in the name of making it feel "more native".<p>There are many functional differences between buttons and links and it's not true that links are strictly more capable. Buttons, for instance, can be activated with the spacebar.<p>> I've been building websites for 25 years and I've literally never had this problem.<p>I included a link that showcases how this problem exists both in Django itself and for developers who build websites with Django.[0] This is representative of a durable, hypertext-driven, webapp design that the proposals are intended to support.<p>[0] <a href="https://www.djangoproject.com/weblog/2026/jul/15/supporting-the-triptych-project/" rel="nofollow">https://www.djangoproject.com/weblog/2026/jul/15/supporting-...</a></p>
]]></description><pubDate>Wed, 29 Jul 2026 03:44:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=49093185</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=49093185</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49093185</guid></item><item><title><![CDATA[New comment by alexpetros in "The Difference Between a Button and a Link"]]></title><description><![CDATA[
<p>> This seems to conflate appearance with semantics. If an element causes a navigation, I make it a link.<p>Neither of my examples work with links. Logout buttons must be buttons because they trigger unsafe requests, and "search" buttons are buttons because they submit the form as a query parameter. Both of these examples, are, however, navigations.[0]<p>> Whether it looks like a button is irrelevant, that’s CSS.<p>It's not irrelevant, because even if you style a link like a button (or vice versa), it will still behave like the thing it actually is. That's why it's important to have native HTML behavior that lets people use the right semantic element.<p>[0] <a href="https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigation-and-session-history" rel="nofollow">https://html.spec.whatwg.org/multipage/browsing-the-web.html...</a></p>
]]></description><pubDate>Wed, 29 Jul 2026 03:38:23 +0000</pubDate><link>https://news.ycombinator.com/item?id=49093152</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=49093152</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49093152</guid></item><item><title><![CDATA[The Difference Between a Button and a Link]]></title><description><![CDATA[
<p>Article URL: <a href="https://unplannedobsolescence.com/blog/buttons-vs-links/">https://unplannedobsolescence.com/blog/buttons-vs-links/</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=49091738">https://news.ycombinator.com/item?id=49091738</a></p>
<p>Points: 67</p>
<p># Comments: 51</p>
]]></description><pubDate>Wed, 29 Jul 2026 00:12:14 +0000</pubDate><link>https://unplannedobsolescence.com/blog/buttons-vs-links/</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=49091738</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49091738</guid></item><item><title><![CDATA[New comment by alexpetros in "Prolog Basics Explained with Pokémon"]]></title><description><![CDATA[
<p>Thank you!</p>
]]></description><pubDate>Sun, 17 May 2026 23:14:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=48173986</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=48173986</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48173986</guid></item><item><title><![CDATA[New comment by alexpetros in "Prolog Basics Explained with Pokémon"]]></title><description><![CDATA[
<p>I'm not as familiar with Magic, but I've always been curious if that community has tooling at a comparable level of maturity to Pokemon Showdown.</p>
]]></description><pubDate>Sun, 17 May 2026 23:12:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=48173977</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=48173977</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48173977</guid></item><item><title><![CDATA[New comment by alexpetros in "XML Is a Cheap DSL"]]></title><description><![CDATA[
<p>For what it's worth, I think that an embedded DSL to represent most expressions tersely is a worthwhile idea to explore—it's just a more expensive one. That's a cost-effective choice at a some levels of resourcing, but not <i>every</i> level of resourcing.</p>
]]></description><pubDate>Sat, 14 Mar 2026 17:09:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=47378761</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=47378761</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47378761</guid></item><item><title><![CDATA[New comment by alexpetros in "XML is a cheap DSL"]]></title><description><![CDATA[
<p>In the blog I link to a Prolog post I wrote in January because I am <i>very</i> interested in the possibility of using Prolog to prove things about the Fact Graph. I have a personal branch where I try to build some tools for it with DCGs. The nice thing about XML is that I can easily explore it as Prolog terms with committing the entire project to Prolog.</p>
]]></description><pubDate>Sat, 14 Mar 2026 14:29:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=47377064</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=47377064</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47377064</guid></item><item><title><![CDATA[New comment by alexpetros in "XML Is a Cheap DSL"]]></title><description><![CDATA[
<p>In the context of the article, "cheap" means "easy to set up" not "computationally efficient." The article is making the argument that there are situations in which you benefit from sacrificing the latter in favor of the former. You're right that it's annoyingly slow to parse though and that does cause issues I'd like to fix.</p>
]]></description><pubDate>Sat, 14 Mar 2026 14:16:42 +0000</pubDate><link>https://news.ycombinator.com/item?id=47376943</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=47376943</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47376943</guid></item><item><title><![CDATA[New comment by alexpetros in "XML is a cheap DSL"]]></title><description><![CDATA[
<p>This is a good question! We do it, it works, and it's definitely an advantage of XML over alternatives. I just personally haven't had the time to dig in and learn it well enough to write a blog post about it. In practice I think people update the Fact Dictionary largely based on pattern matching, so that's what I focused on here.</p>
]]></description><pubDate>Sat, 14 Mar 2026 14:12:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=47376897</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=47376897</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47376897</guid></item><item><title><![CDATA[New comment by alexpetros in "XML is a cheap DSL"]]></title><description><![CDATA[
<p>Author here. I agree with all this, and I think it's important to note that nothing precludes you from doing a declarative specification that looks like imperative math notation, but it's also somewhat besides the point. Yes, you could make your own custom language, but then you have created the problem that the article is about: You need to port your parser to every single different place you want to use it.<p>That's to say nothing of all the syntax decisions you have to make now. If you want to do infix math notation, you're going to be making a lot of choices about operator precedence. The article is using a lot of simple functions to explain the domain, but we also have switch statements—how are those going to expressed? Ditto functions that don't have a common math notation, like stepwise multiply. All of these can be solved, but they also make your parser much more complicated and create a situation where you are likely to only have one implementation of it.<p>If you try to solve that by standardizing on prefix notations and parenthesis, well, now you have s-expressions (an option also discussed in the post).<p>That's what "cheap" means in this context: There's a library in every environment that can immediately parse it and mature tooling to query the document. Adding new ideas to your XML DSL does not at all increase the complexity of your parsing. That's really helpful on a small team! I agonized over the word "cheap" in the title and considered using something more obviously positive like "cost-effective" but I still think "cheap" is the right one. You're making a cost-cutting choice with the syntax, and that has expressiveness tradeoffs like OP notes, but it's a decision that is absolutely correct in many domains, especially one where you want people to be able to widely (and cheaply) build on the thing you're specifying.</p>
]]></description><pubDate>Sat, 14 Mar 2026 13:58:04 +0000</pubDate><link>https://news.ycombinator.com/item?id=47376743</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=47376743</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47376743</guid></item><item><title><![CDATA[New comment by alexpetros in "</> Htmx – The Fetch()ening"]]></title><description><![CDATA[
<p>So here's the htmx example for click to edit: [0]<p><button hx-get="/contact/1/edit"><p>And here's the datastar one, edited for parity: [1]<p><button data-on:click="@get('/contact/1/edit')"><p>The htmx one is simpler. There's fewer mini-languages to learn and the API makes more assumptions about what you want. As you noted, Datastar has more generalized mechanisms that are certainly less clunky than htmx's if you lean heavily into more signals- or event-driven behavior, but for (what I believe to be) the majority use-case of a CRUD website, htmx's simpler interface is easier to implement and debug.(For example: you will see the response associated with the request in the browser network tab; I'm not sure if Datastar has a non-SSE mode to support that but it wouldn't be true for SSE.) To each their own.<p>As for "well then why implement X, Y, or Z," as the OP notes, refactoring to use fetch() means you get them largely for free, without compromising the nice interface. So why not?<p>[0] <a href="https://htmx.org/examples/click-to-edit/" rel="nofollow">https://htmx.org/examples/click-to-edit/</a><p>[1] <a href="https://data-star.dev/examples/click_to_edit" rel="nofollow">https://data-star.dev/examples/click_to_edit</a></p>
]]></description><pubDate>Tue, 04 Nov 2025 00:06:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=45806038</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=45806038</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45806038</guid></item><item><title><![CDATA[New comment by alexpetros in "</> Htmx – The Fetch()ening"]]></title><description><![CDATA[
<p>Yes! I expect that I will mostly be sticking to `hx-target` though, for the reasons stated above.<p>My interest in htmx is more on the coarse-grained aspects of its interface, not the finer ones, which is a consistent theme in my writings about it [0].<p>[0] <a href="https://alexanderpetros.com/triptych/" rel="nofollow">https://alexanderpetros.com/triptych/</a></p>
]]></description><pubDate>Mon, 03 Nov 2025 23:56:41 +0000</pubDate><link>https://news.ycombinator.com/item?id=45805960</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=45805960</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45805960</guid></item><item><title><![CDATA[New comment by alexpetros in "</> Htmx – The Fetch()ening"]]></title><description><![CDATA[
<p>> Why bother with v4 at all? If it dilutes that simpler interface?<p>v4 makes almost no changes to the interface, other than to flip inheritance to be off by default.<p>> I think that even with req/resp morph leads to a simpler majority use case and that's what Turbo and Datastar have both shown. No?<p>Although you can use the idiomorph extension for htmx, I personally don't think idiomorph is simpler, because there's an algorithm choosing what parts of the page get replaced based on the server response; I prefer to specify exactly what parts of the page get replaced in much simpler terms, a CSS selector, with `hx-target`.<p>Per [1] above, my style is minimize partial page responses wherever possible, so the ones that I do have are bespoke and replace a specific thing.</p>
]]></description><pubDate>Mon, 03 Nov 2025 23:16:36 +0000</pubDate><link>https://news.ycombinator.com/item?id=45805649</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=45805649</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45805649</guid></item><item><title><![CDATA[New comment by alexpetros in "</> Htmx – The Fetch()ening"]]></title><description><![CDATA[
<p>> why use HTMX when it really seems like (a heavier) Datastar-lite?<p>The reason to use htmx is that it has a simpler interface optimized for the majority use-case.<p>With htmx, you are largely tied to a request/reply paradigm. Something happens that triggers a request (e.g. user clicks a button, or some element scrolls into view), htmx sends the request, and then it processes the response. The htmx interface (`hx-get`, hx-trigger`) is optimized to make this paradigm extremely simple and concise to specify.<p>Datastar's focus (last I checked) is on decoupling these two things. Events may stream to the client at any time, regardless of whether or not they were triggered by a specific action on the client, and they get processed by Datastar and have some effect on the page. htmx has affordances for listening to events (SEE extension, new fetch support) and for placing items arbitrarily on the page (out-of-band swaps) but if your use-case is a video game or a dashboard or something else where the updates are frequently uncorrelated with user actions, Datastar makes a lot of sense. It's a bit like driving a manual transmission.<p>Delaney is fond of saying that there's no need for htmx when Datastar can technically do everything htmx can [0]. But I think this misses the point of what makes htmx so popular: most people's applications <i>do</i> fit within a largely request/reply paradigm, and using a library that assumes this paradigm is both simpler to implement and simpler to debug. As an htmx maintainer, I often encourage people to even use <i>htmx</i> less than they want to, because the request/reply paradigm is very powerful and the more you can adhere to browser's understanding of it, the more durable and maintainable your website will be [1].<p>[0] <a href="https://data-star.dev/essays/v1_and_beyond" rel="nofollow">https://data-star.dev/essays/v1_and_beyond</a><p>[1] <a href="https://unplannedobsolescence.com/blog/less-htmx-is-more/" rel="nofollow">https://unplannedobsolescence.com/blog/less-htmx-is-more/</a></p>
]]></description><pubDate>Mon, 03 Nov 2025 22:18:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=45805126</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=45805126</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45805126</guid></item><item><title><![CDATA[New comment by alexpetros in "Context engineering is sleeping on the humble hyperlink"]]></title><description><![CDATA[
<p>Altering the presentation layer is possible precisely <i>because</i> HTML is a semantic API definition: one broad enough to enable self-description across a variety of domains, but specific enough that those applications can still be re-contextualized according to the user's needs and preferences.</p>
]]></description><pubDate>Sat, 25 Oct 2025 05:36:31 +0000</pubDate><link>https://news.ycombinator.com/item?id=45701560</link><dc:creator>alexpetros</dc:creator><comments>https://news.ycombinator.com/item?id=45701560</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45701560</guid></item></channel></rss>