News for hackers. Stuff that matters.
Re:Zod 4 by koakuma-chan on Monday May 19, 2025 @12:01PM (#44031238)
> For projects that rely heavily on Zod, it feels like a daunting task ahead—one that will demand a lot of developer attention and time to navigate.

Or just use an LLM.

Re:Zod 4 by cscheid on Monday May 19, 2025 @12:09PM (#44031345)
This is the kind of task that LLMs are precisely terrible at; there isn't an abundance of Zod 4 examples, and the LLM will sure as shit will give you _something_ you are now by definition ill-equipped to assess.

I'm confident about this assessment because I maintain a large-ish piece of software and perenially have to decipher user reports of hallucinated LLM syntax for new features.

Re:Zod 4 by koakuma-chan on Monday May 19, 2025 @12:18PM (#44031434)
Are you sure that's not a skill issue? Zod v4 has .mdx documentation which can be given to the LLM as context, including a migration guide. A reasoning LLM should be able to manage.
Re:Zod 4 by collingreen on Monday May 19, 2025 @12:51PM (#44031799)
"It will solve all your problems!"

"It didn't solve my problems"

"You're the problem!"

Re:Zod 4 by koakuma-chan on Monday May 19, 2025 @01:15PM (#44032119)
> "You're the problem!"

He said users sent reports with hallucinated syntax, he wasn't even the one who used LLMs.

Re:Zod 4 by elanora96 on Monday May 19, 2025 @07:05PM (#44035902)
I've only tried Claude in Cursor's free trial, but it became very confused during a React 19 upgrade even after showing it a guide. It also kept telling me to install irrelevant dependencies saying my code would not work without them. My experience was more or less shared with several other senior devs using their companies AI subscriptions. Are we all using the tools wrong? Or is there just an expected amount of having to fight with the machine to get a usable result?
Re:Zod 4 by koakuma-chan on Tuesday May 20, 2025 @07:17AM (#44040205)
> I've only tried Claude in Cursor's free trial, but it became very confused during a React 19 upgrade even after showing it a guide.

I have never used Cursor, but I see more and more people who used LLMs specifically via Cursor complain. It makes me think there's an issue specifically with Cursor, e.g., they try to save on tokens and end up not including enough context in the prompt.

> I've only tried Claude in Cursor's free trial, but it became very confused during a React 19 upgrade even after showing it a guide.

I am working on a Next.js 15 / React 19 app, and at least 95% of code is written by Gemini 2.5 Pro Preview, and I barely ever need to "fight" it really. But it's not a Cursor workflow of course. I keep a directory with LLM-readable documentation[0], use a repository serialization tool to serialize my repository into a prompt (this includes both the source code and the LLM-readable documentation), and send it to Gemini 2.5 Pro Preview. It ends up being over 100K tokens per query but works really well for me.

[0]: https://llmstxt.org/

Re:Zod 4 by camgunz on Monday May 19, 2025 @12:02PM (#44031258)
And then pick through all the LLM's mistakes.
Re:Zod 4 by rvnx on Monday May 19, 2025 @12:07PM (#44031321)
Ask another LLM to pick for you
Re:Zod 4 by owebmaster on Monday May 19, 2025 @12:06PM (#44031317)
better yet: use an LLM to generate a subset of Zod that is fit for the project
Re:Zod 4 by sensanaty on Monday May 19, 2025 @12:50PM (#44031781)
LLMs can't even not write React when you explicitly tell them not to write React in your Vue codebase. I still, with Gemini 2.5 Pro and Claude 3.7 both, get this annoying ass interaction almost daily, despite a universe of context there that should make it obvious I don't want a React component in my Vue codebase.
Re:Zod 4 by 9dev on Monday May 19, 2025 @05:12PM (#44034920)
Do you mean TSX? Because Vue supports that. Might be worth asking it to create a SFC file and no TSX explicitly in your case!