Remix.run Logo
kousthub 4 days ago

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

znort_ 4 days ago | parent | next [-]

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 ...

maloga 3 days ago | parent [-]

Nah, whatever bug you're referring to is my fault, haha, don't blame the LLM. But in between game state bugs are very unlikely, haha: https://github.com/marianogappa/escoba-de-15/blob/main/src/A...

I can't imagine state surviving a location reload with nothing on local storage and no server.

garbagepatch 4 days ago | parent | prev [-]

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 4 days ago | parent | next [-]

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 4 days ago | parent | prev [-]

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.