Cameri @Cameri - 13d
I find that LLMs tend to generate better Python code than TypeScript code.
Jay @Jay - 13d
When it comes to types, python is arguably easier to reason about than typescript, given that the in-code types are just for reference. Typescript types can break even when they are actually valid. But it takes some intuition to know when to use the escape hatches, so I can see why an LLM would have trouble with it. I wonder if LLMs would write javascript better than typescript too.
Types are definitely a stumbling block for LLMs. I think you are onto something there. My personal guess is that there’s just so much crappy TypeScript code out there that without a ton of guardrails it’s just a pasta machine. Second to that is the lack of understanding of category theory which IMO needs some level of reasoning.
liminal @liminal - 13d
TS & CT? where? 🧐
Xtr3m3hodl @Xtr3m3hodl - 13d
Don't you think it depends on the LLM provider? And when you say better, it isn't obvious what you mean since one would imagine the types on typescript would act as a feedback loop to the LLM when something is off?
What’s CT?
Depends on the model, yeah, for sure. I tried multiple models and the generated Python was still better in my opinion. I don’t think it was the types: the code was objectively better structured, more maintainable, less junior level mistakes, if you catch my drift.
Category Theory
jb55 @jb55 - 13d
its really bad at rust code
Ah, gotcha. What was your question?
What’s your take? insufficient training on Rust?
Oh, just curious how category theory and typescript are intertwined.
Well, more like type theory has to do with category theory. It’s One of the first things you’ll like encounter when learning functional programming. Type operations, follow the rules from category theory (from math).