Steve
ZZod
•Created by Steve on 10/21/2024 in #questions
Steve - Is there any data on performance compar...
7 replies
ZZod
•Created by Steve on 10/21/2024 in #questions
Steve - Is there any data on performance compar...
Colin (Zod maintainer) and Guilo (@effect/schema maintainer) are friendly with each other, so I don't think there is any big competition going on there.Wait, some people aren't competitive with friends??
If you're a fan of the effect ecosystem, I'd probably go all-in on @effect/schema.Yeah I totally love the Either-monad they introduce there. I think you might be able to guess why.
@e/s also has some interesting affordances, like codecs, that are not part of Zod's own design space, and could be a good fit for your specific issue where you might not always be parsing from unknown but trying to convert between different known typesInteresting
7 replies
ZZod
•Created by Bence (Arzen) on 10/16/2024 in #questions
Bence (Arzen) - Hi guys 🙂 Is there a way to cr...
Be very aware that recursion and polymorphism will probably memory leak quite easily
10 replies
ZZod
•Created by Bence (Arzen) on 10/16/2024 in #questions
Bence (Arzen) - Hi guys 🙂 Is there a way to cr...
@Bence (Arzen) are you using zod for a serious project?
10 replies
ZZod
•Created by Bence (Arzen) on 10/16/2024 in #questions
Bence (Arzen) - Hi guys 🙂 Is there a way to cr...
It will memory leak and there probably is a exponential correlation about the depth of recursion, and how bad it will memory leak
10 replies
ZZod
•Created by Steve on 10/16/2024 in #questions
Steve - Would this be valid, or would it possib...
PS we are making it to the deadline 🙂
6 replies
ZZod
•Created by Steve on 10/16/2024 in #questions
Steve - Would this be valid, or would it possib...
@Scott Trinh refactored a bit, got something valid out
6 replies
ZZod
•Created by Bence (Arzen) on 10/16/2024 in #questions
Bence (Arzen) - Hi guys 🙂 Is there a way to cr...
P.S. don't use
z.transform()
with recursive types10 replies
ZZod
•Created by Bence (Arzen) on 10/16/2024 in #questions
Bence (Arzen) - Hi guys 🙂 Is there a way to cr...
https://gitlab.com/toegang-voor-iedereen/specification/types/typescript/-/blob/develop/src/resources.ts?ref_type=heads#L140-165 Pay close attention to the definition of the Input type (
DefinitionDetailsInput
), The Output Type (DefinitionDetails
), extending a base (DefinitionDetailsBase
) and passing Input and Output types to the function signature to Zod, as well to the use of z.lazy()
10 replies
ZZod
•Created by Bence (Arzen) on 10/16/2024 in #questions
Bence (Arzen) - Hi guys 🙂 Is there a way to cr...
Certainly, you can see an example here: https://zod.dev/?id=recursive-types or my implementation here: https://gitlab.com/toegang-voor-iedereen/specification/types/typescript/-/blob/develop/src/resources.ts?ref_type=heads
10 replies
ZZod
•Created by Steve on 10/15/2024 in #questions
Steve - We have some performance issues with bi...
Are you also doing stuff on the BEAM professionally for clients?
32 replies
ZZod
•Created by Steve on 10/15/2024 in #questions
Steve - We have some performance issues with bi...
Explain a lot
32 replies
ZZod
•Created by Steve on 10/15/2024 in #questions
Steve - We have some performance issues with bi...
ah yeah
32 replies
ZZod
•Created by Steve on 10/15/2024 in #questions
Steve - We have some performance issues with bi...
But
z.transform()
's.. never again! 😛32 replies
ZZod
•Created by Steve on 10/15/2024 in #questions
Steve - We have some performance issues with bi...
Given the environment, it probably is the best schema-thing in the world of TypeScript at this current moment.
32 replies
ZZod
•Created by Steve on 10/15/2024 in #questions
Steve - We have some performance issues with bi...
Most languages seem to be notoriously bad at recursive stuff so I don't really blame Zod for that
32 replies
ZZod
•Created by Steve on 10/15/2024 in #questions
Steve - We have some performance issues with bi...
But the recursiveness, yeah that keeps an issues in Zod because on runtime you cannot reference to what is not defined, so you have to keep using
z.lazy()
32 replies
ZZod
•Created by Steve on 10/15/2024 in #questions
Steve - We have some performance issues with bi...
And Zod can do that well, in theory, except for my memory going to > 10 GiB
32 replies