Finding the source element of an HTMX syntax error

Tags:

I really like HTMX. But its error reporting is severely lacking. For example, typos or wrong keywords in hx-trigger or other hx- attributes do only result in a nondescript console entry and a stack trace:

htmx:syntax:error

htmx:syntax:error stacktrace

The HTMX documentation suggests only source-diving as a way to find where the attribute parser chokes. While this works, it is not convenient. I have to switch from the minified HTMX library to the development version, and then set a breakpoint on the logging routine, and from there work my way backwards to the origin of the error. Which is most of the time a typo or wrong keyword in an attribute.

Luckily, HTMX can invoke a callback on the htmx:syntax:error event, so we can list the offending elements in the console and make them easily clickable:

htmx.on("htmx:syntax:error", (elt) => { console.log("htmx.syntax.error",elt)});

This still does not report the offending hx- attribute, and also does not tell us, what keyword was wrong or where the expression went bad, but it is a lot closer and does not require us to go source diving.

Now (not) playing: Fallout London

Tags:

Fallout London

Fallout London is a large, user-made mod for Fallout 4. It reimagines London as a postapocalyptic place with several factions.

The mod is certainly a labour of love, and the area is vast and promises interesting setups. Not having played Fallout 4 itself, the whole setting is far too unpaced for my taste.

Fallout London logo

The scenery certainly looks great in the screenshots, but I could not muster the patience to grind through the game to see these parts of the city.

Fallout London scenery

2 Minute Acid with Strudel

Tags:

A colleague reminded me of this:

2 Minute Acid with Strudel

Video thumbnail

Strudel is very much like Supercollider / Sonic Pi, but as a (Haskel and) Javascript library that can do live editing in the browser.

They also have a tutorial .

What I like about this are the built-in sliders / visualizers. Connecting this to MIDI inputs for live performances could also be fun, if I was doing live performances or performances at all.

Now playing: Alan Wake (2010)

Tags:

https://www.remedygames.com/games/alan-wake

Alan Wake game logo

The game is old, from 2010, and thus isn't as humungous as current games, and it runs well on current hardware.

The story is OKish, it follows a writer as he discovers he is in his own story, in a Stephen King / Maine setting. Some darkness takes over people and you have to fight these.

The gameplay is serviceable as well. The whole game is made up like a TV series, with distinct chapters and recaps at the start of each new chapter.

You control Alan Wake from a third-person perspective. The game alternates between a walking simulator and fights where you have to first burn the darkness away from creatures and then shoot them with a gun. Often the creatures come from off-screen behind you, which is not helped by the close perspective.

Now (not) playing: Dead Space (2023 remake)

Tags:

Dead Space (2023 remake)

[Dead Space logo]

I had played the original Dead Space (2008). The 2023 remake is a take-for-take remake. I felt it was too slow. The combination of slow gameplay and waiting through cutscenes again and again after dieing in combat, combined with the instability (3 crashes within 4 hours of play, on a Windows 10 machine) made me not want to slog through the game again.

The Game setup is always the same. You enter a dark room. Monsters spawn behind you. You kill them by cutting off their limbs. Sometimes you enter a lit room. But then the light goes out and monsters spawn behind you.

There is the occasional jump scare. The fates of the crew are told through text and audio logs. Sometimes there are cutscenes, which are OK, but sometimes there are cutscenes d or long dialogs uring missions, and ypu can't skip them.

I feel that Prey (2017) is more my avenue. It's not dark and there is far more game variety to the gameplay and the enemies.