top | item 45006099

(no title)

kousthub | 6 months ago

Asking for information - Is Go/wasm doing something here which React/JavaScript cannot?

discuss

order

znort_|6 months ago

in this case, no. it's a client game and performance isn't at all critical, so the state and loop could be trivially handled by a regular js function. if at some point a server architecture was desired, it would be trivial to host that function on node.

my take: as a backend developer he was fixated with the idea of having a server no matter what (if your only tool is a hammer, everything looks like a nail), and as go was his main language he just went with that. then he figured out it didn't really have a point, but instead of just translating that simple logic to js he overengineered the whole thing and overcomplicated his design and build process by transpiling to wasm.

there are some bugs, though. i just won a couple of matches at escoba (very nice little game, i hadn't played this for ... decades!) and the game state wasn't properly reset for the next. that's probably the llm ...

garbagepatch|6 months ago

The front end is still react. But I'd be curious to know if LLM's are less prone to errors generating code for strongly typed languages over others like Javascript.

furyofantares|6 months ago

From experience: A static type system is MUCH better for agents than dynamic. I've done a few projects both ways - the agent is just much, much better with the static system because it sees compile errors right away, and also has access to better static analysis tools. I don't know how much the types themselves help the LLM, it's better context but more tokens, but the agent seeing errors is just a huge difference.

It's also much easier for you as a developer to digest the code if you need to refactor because you got lazy and accepted some slop.

adastra22|6 months ago

In my experience, a massive YES. At least with agenetic models that have an iteration loop, and in languages like Rust where the type system is strong enough to prevent categories of bugs.