Readit News logoReadit News
exogen commented on A Broken Heart   allenpike.com/2026/a-brok... · Posted by u/memalign
exogen · 4 days ago
> It is still a string, even if a template string or whatever it is called, no?

No.

> That still leaves the door open for XSS.

The door for that in React is called `dangerouslySetInnerHTML`, but it's extremely rarely used.

> jsx needs to rename HTML attributes, because of overlap with JS keywords like "class"

That's not really inherent to JSX, just React's use of it. SolidJS, for example, uses `class` instead. But in any case – JSX didn't make up those names. Those are the property names on JavaScript's DOM classes. The fact that there's confusion between "attributes" and "properties" is pretty baked-in to the Web platform, even causing confusion in standard Web Components. Every DOM library and framework (even jQuery) has needed to decide whether it's operating on properties or attributes.

    const div = document.createElement('div');
    div.className = 'foo';
> It also comes with hacks like "<>" or fragment.

The DOM has the same concept, DocumentFragment. How else would you represent e.g. "two sibling nodes with no parent node"?

> It lacks the awareness of context and therefore is not truly like HTML.

On the contrary, I'd argue it has way more context. It knows, and will warn you, if you try to do any DOM element nesting that the HTML spec forbids, for example.

> can be structurally pattern matched upon and iterated through, like a proper tree structure.

You are literally describing the output of JSX. Glad you like it ;)

exogen commented on A Broken Heart   allenpike.com/2026/a-brok... · Posted by u/memalign
zelphirkalt · 4 days ago
But it is not really XML like syntax, is it? It is still a string, even if a template string or whatever it is called, no?

That still leaves the door open for XSS. A good (proper?) (e?)DSL would have the things that make the DOM as keywords in the language, and then we could ensure, that things which should merely be a text, are really only rendered as text, not injected DOM nodes. And the next failure is, that this DSL that is jsx needs to rename HTML attributes, because of overlap with JS keywords like "class". It lacks the awareness of context and therefore is not truly like HTML, no matter how hard it tries to be. It also comes with hacks like "<>" or fragment.

Overall it is usable, but not a particularly well made DSL. It might be as good as it gets with JS.

For inspiration check SXML in various lisps, which comes with immunity to XSS and which works just like the rest of the language, can be structurally pattern matched upon and iterated through, like a proper tree structure.

exogen · 4 days ago
> It is still a string, even if a template string or whatever it is called, no?

No.

> That still leaves the door open for XSS.

The door for that in React is called `dangerouslySetInnerHTML`, but it's extremely rarely used.

> jsx needs to rename HTML attributes, because of overlap with JS keywords like "class"

That's not really inherent to JSX, just React's use of it. SolidJS, for example, uses `class` instead. But in any case – JSX didn't make up those names. Those are the property names on JavaScript's DOM classes. The fact that there's confusion between "attributes" and "properties" is pretty baked-in to the Web platform, even causing confusion in standard Web Components. Every DOM library and framework (even jQuery) has needed to decide whether it's operating on properties or attributes.

    const div = document.createElement('div');
    div.className = 'foo';
> It also comes with hacks like "<>" or fragment.

The DOM has the same concept, DocumentFragment. How else would you represent e.g. "two sibling nodes with no parent node"?

> It lacks the awareness of context and therefore is not truly like HTML.

On the contrary, I'd argue it has way more context. It knows, and will warn you, if you try to do any DOM element nesting that the HTML spec forbids, for example.

> can be structurally pattern matched upon and iterated through, like a proper tree structure.

You are literally describing the output of JSX. Glad you like it ;)

exogen commented on A Broken Heart   allenpike.com/2026/a-brok... · Posted by u/memalign
nananana9 · 4 days ago
> And despite being the least-bad approach for web frontends today, the React ecosystem...

As if anyone has seriously tried anything other than the "reactive UI hacked together with callbacks or proxies, with weird XML-like syntax in the JS code" paradigm for the last 10 years.

At this point I just have to conclude that anyone who believes this stuff is good is either too indoctrinated into this workflow or just lacks ability to do even the tiniest amount of cost/benefit analysis.

exogen · 4 days ago
I'd give people the benefit of the doubt. Personally, having built UI with Win32, WinForms, VisualBasic, Cocoa/Interface Builder, Qt, Tcl/Tk, XSLT, vanilla HTML/JS, jQuery, Backbone, Ember, Knockout, Bootstrap, MooTools, YUI, ExtJS, Svelte, Web Components, and React (including Preact, SolidJS…)… I'll happily choose the React approach. The only other one I would even describe as "good" was Qt.

I also don't get why "XML-like syntax in the JS code" is even a point worth complaining about. If anything, we should be encouraging people to experiment with more DSLs for building UIs. Make your tools suit the task. Who the fuck cares, if it's clear and productive?

exogen commented on Resurrecting Crimsonland – Decompiling and preserving a cult 2003 classic game   banteg.xyz/posts/crimsonl... · Posted by u/banteg
jamesu · 5 days ago
Bumped into your project a while back - pretty impressive. I was a little disappointed it seemed to just convert the resources rather than use the original runtime formats (since there are a features that don't directly translate to gltf), but for a viewer it's perfectly reasonable. Are you planning on supporting tribes 1 maps at all? Theres still quite a surprising interest in reverse engineering and extending the life of torque games. I'm hoping on publicly releasing a refresh of the original torque codebase this year which improves support for modern platforms including wasm. It's amazingly easy these days to reverse engineer stuff and revive old codebases!
exogen · 5 days ago
It would be possible to have it decode the .dts and .dif formats on demand - that was my original plan - just much less efficient for users, as the .glb files are about 1/5 of the file size on average. (I also assume glTF loading/rendering has had a lot more optimization work put into it than what I'd be able to accomplish.) For these reasons it seemed more productive to have it work on the Blender addons as a starting point rather than JavaScript/TypeScript parsers for the original formats. I still ship the original assets alongside the .glb files (meaning they have URLs just aren't loaded) in case I want to switch it someday.

Some of the custom features you may be referring to I implemented as custom properties in the glTF output - like surface flags. "Outside Visible" is one example, it's a flag baked into each .dif surface that determines whether rays can reach it from the outside, so the engine knows whether to apply the map's directional sunlight, or just ambient and light map lighting. So, even though it technically could try to render with modern PBR, dynamic lighting/shadows and all that, it instead renders as close to the original as possible using the same (or similar) techniques. Comparing screenshots with actual Tribes 2 renders is often indistinguishable unless you really know what to look for!

exogen commented on Resurrecting Crimsonland – Decompiling and preserving a cult 2003 classic game   banteg.xyz/posts/crimsonl... · Posted by u/banteg
exogen · 6 days ago
I've been thinking about this topic and am glad to see it come up: AI is going to be a huge boon for digital preservation & restoration projects like this. I realized this while building this project (a map explorer for Tribes 2): https://exogen.github.io/t2-mapper/

Old games like this have a small (and shrinking) audience of people who care about them. With Tribes 2, for example, there are only ~50 people who actively play on a regular basis. A subset of those people are programmers, and a subset of those have the time & energy to put into a project like t2-mapper, assuming they're even interested. I got a basic version working, but then Claude Code helped decode and convert obsolete Dynamix/Torque3D file formats (improving existing Blender addons that were incomplete), got TorqueScript running in the browser, wrote shaders, and generally helped figure out what the original C++ code was doing.

In the past, you'd need the stars to perfectly align for stuff like this to happen: a passionate super-fan with the time, resources, knowledge, and persistence to see it through. Now, you mostly just need the persistence (and maybe a couple hundred bucks for tokens). I foresee people with niche interests (but not necessarily a programmer's skillset) being able to extend the lifetime (and maybe audience) of their obscure or obsolete software.

exogen commented on Find 'Abbey Road when type 'Beatles abbey rd': Fuzzy/Semantic search in Postgres   rendiment.io/postgresql/2... · Posted by u/nethalo
exogen · 11 days ago
This could also be applied to record linkage. With search, there will usually be multiple results, and there's always a "top" match even if its confidence/score is quite low. In record linkage, at least if you're automating it, you need to minimize false positives and only automatically link records if confidence is super high that they're a match – and that doesn't just mean the top scoring match has high confidence, but that there's also no 2nd best match with a good score. If that's not the case, leave the records for manual human review.

My experience here is also related to music. Here are some cases to think about:

What's the actual title of the song "Mambo #5" vs. how you might search for it or find it referenced in other records? Mambo #5? Mambo No. 5? Mambo No. Five? Mambo Number 5? Mambo Number Five? And that's not even getting to the fact that the actual title is actually longer, with a parenthetical. This is a case where bigrams, trigrams, or other string similarly metrics wouldn't perform very well. Same with the Beatles song, is it "Dr. Robert" or "Doctor Robert"? Most string similarly algorithms put "Dr" and "Doctor" pretty far apart, but with vectors they should be practically equivalent.

How about "You've Lost that Loving Feeling"? Aren't there some dropped Gs in those gerunds? Is it You've Lost That Lovin' Feeling? You've Lost That Lovin' Feelin'? You've Lost That Loving Feelin'? In this case, string similarity (including trigrams) perform very well.

How about songs with censored titles? Some records will certainly have profanity censored, but would it be like "F*ck", "F**k", "F@$k", or what? And is the censorship actually part of the canonical song title, or just some references to it?

In the "#5" and "Dr." cases, this could be solved pretty effectively by the normalization step described in the article (hardcoding what #, No., and Dr. expand to) – although even that can get pretty complicated: what do you do about numbers? Do you normalize every numerical reference, e.g. "10 Thousand", to digits, or words? What about rarely used abbreviations, or cases where an abbreviation is ambiguous and could mean different things in different contexts? If someone has a song called "PT Cruiser" are you gonna accidentally normalize that to "Part Cruiser"? For this reason, I like to see this not as a "normalization" step, where there's a single normalized form, but rather a "query expansion" step – generate all the possible permutations, and those are your actual comparison strings.

It seems like embeddings could do the job of automatically considering different spellings/abbreviations of words as equivalent. I'm just a casual observer here, but I'm sure this is also a well-explored topic in speech-to-text, since you have to convert someone's utterances to match actual entity names, like movie titles for example.

exogen commented on Mozilla appoints new CEO Anthony Enzor-Demeo   blog.mozilla.org/en/mozil... · Posted by u/recvonline
dawnerd · 2 months ago
Safari is fast and performant but once you load a heavy web app that uses a lot of memory safari will kill the tab. It’s incredibly frustrating to have a page reload with a banner simply saying the site was using too much memory and was reloaded. Especially when you’re on a maxed out MacBook with plenty of resources.
exogen · 2 months ago
I agree, in practice I see this occasionally on gigantic GitHub pull requests with 1000+ files, or very clunky Atlassian/Confluence pages. I'd say both sides need to work on their resource management!

(On that note, many complaints about Safari I hear from developers fall on my ears as "I don't care about web compatibility!" as it has never NOT been the case on the web that you need to care about feature support and resource management.)

exogen commented on Mozilla appoints new CEO Anthony Enzor-Demeo   blog.mozilla.org/en/mozil... · Posted by u/recvonline
ksec · 2 months ago
>Technically.....

Since its birth, Firefox is still the only browser that manage multiple ( hundreds or in some cases, thousands! [1] ) tabs better than any browser. And in my view in the past 12 - 24 months Firefox has managed to be as fast as chrome. While Chrome also improved on its multiple Tab browsing experience.

Safari.... I dont know why this battery life argument keeps coming up because it is not the case. It hasn't been so for at least 5 - 6 years.

Mozilla could have played the trust angle when they have the good will and money. They could have invested into SaaS that provides better revenue generations other than getting it from Google. They could also have partnered with Wikipedia before they got rotten. But now I am not even sure if they still have the "trust" card anymore. Gekco is still hard to be embedded, XULRunner could have been Electron. They will need to get into survival mode and think about what is next.

[1] https://www.tomshardware.com/software/mozilla-firefox/firefo...

exogen · 2 months ago
No doubt the browsers are constantly leapfrogging each other, so this isn't always the case. But, anecdotally: switching from Chrome to Safari actually felt like I got a new computer. The difference was that apparent.
exogen commented on Ask HN: What Are You Working On? (December 2025)    · Posted by u/david927
exogen · 2 months ago
A few years ago, I made a model skinner for Tribes 2, a ~25 year old game that still has a loyal following: https://exogen.github.io/t2-model-skinner/ (if you check out the Gallery link there, you'll notice this app resulted in a whole new wave of skins, and even a Halloween skin contest)

To satisfy the urge of doing something else ambitious in the browser, I'm now doing the same thing for Tribes 2 maps: trying to make a web-based map viewer and editor: https://exogen.github.io/t2-mapper/ (editing/creation part still in progress)

I got this working for most maps pretty quickly. It translates the mission object tree from the Torque .mis files into a Three.js scene graph. Eventually though, I noticed that some mission definitions were more dynamic – Torque .mis files are really just TorqueScript .cs files with a different extension and some pragma/magic comments. So, to actually handle every map would require not just a mission file parser, but a whole TorqueScript runtime. Implementing THAT part seemed really tedious and, frankly, uninteresting to me. So I had Claude Code get a whole TorqueScript transpiler and runtime working. Now, when you load a mission, it actually runs all the same scripts that Tribes 2 runs to load the mission, all the way from server.cs and its `CreateServer()` function.

Currently, I'm continuing to get its rendering matching Tribes 2 as closely as possible, and setting things up so that live editing of missions will work.

Source: https://github.com/exogen/t2-mapper

Deleted Comment

u/exogen

KarmaCake day3360March 7, 2007
About
JavaScript, Python, and general web hacker.

Web: https://brianbeck.com/

Mastodon: https://hachyderm.io/@exogen

View Original