We're currently evaluating both Zod and ArkType as a replacement for earlier JSON schema validations. The thing I can't get over with Zod is the syntax is _so_ different from defining TS types.
On the ArkType website they talk about speed and DX, but no mention of bundle size. I assume, and maybe this is an unfair assumption, that's because it's bad. I haven't come across ArkType until just now, but I was just checking out Valibot today because it's got a small bundle size.
These numbers don't reflect anything useful. This is the total size of the code in the package, most of which will be tree-shaken. In Zod's case, the package now contains three independent sub-libraries. I recommend plugging a script into bundlejs.com[0] to see bundle size numbers for a particular script
We also chose ArkType after evaluating Zod, Valibot, and Effect Schema, among others. It seemed to have the best developer experience while also being much faster. It also supports the Standard Schema project which I believe Effect Schema does not fully support.
Could you elaborate on how exactly do you use these? I was assuming its for some kind of contract testing, but there are mentions of bundle size, is it used on fetching data to fail early if the format is wrong, something like that?
I believe Effect Schema fully supports Standard Schema, the issue is that it supports much more than Standard Schema, so not all schemas will work and thus provide compile time errors.
Yes that's correct, it's more powerful but we wanted to maintain full compatibility just for the future as well. But if you're all in on the Effect ecosystem, it's quite nice.
Everyone else is using Zod so the LLMs understand it well, there’s a big ecosystem, it’s unlikely to disappear overnight, and new hires may well already use it. It’s the boring solution.
I have a literal pile of bricks in my backyard. I thought this was going to be an app that I could scan them with and tell me how to build a pizza oven.
I have been part of the beta test for kagi search engine (kagi.com) and my favorite feature is you can prefer/mute websites. So for example I prefer MDN so the site is ranked higher if it shows in the search results. Note I’m unaffiliated with them but the product/team is great so rooting for them to succeed.
I'm using Kagi at the moment and not only does it have nice features like this but it is also a fantastic search engine.
Maybe the best way to explain how fantastic it is is that I think it has a bang operator like DDG but I have never tested it because when I look at the results they are obviously better than DDG or Google.
Yes. The basic structure of a CMOS sensor looks a lot like a DRAM array, but instead of a capacitor you have a photo diode and the "bit lines" / column lines go into a programmable gain amplifier and then into a 12 or 14 bit ADC with some DSP [1] and a parallel-to-serial interface. The exposure is determined by the readout (row for row), that's what gives you rolling shutter.
Some sensors have global shutter instead, which makes it even more like DRAM: Conceptually each pixel has a capacitor and a photodiode, and a transistor connecting the two, all of these transistors are connected in parallel and form the "global shutter signal".
Some sensors have faster ADCs and use one ADC for a bunch of columns, which has been claimed as the source of column-banding in some sensors (unclear if correct).
[1] Sensors that are intended for both photo and video typically support things like pixel binning, where the sensor itself averages e.g. 2x2 blocks of pixels internally. A lower quality alternative is line skipping, where the sensor is told to only read out every nth line, thus reducing resolution considerably. The higher quality alternative is "full-sensor readout", i.e. the camera reads all pixels and downsamples the image to the video resolution. I believe some (announced?) sensors can do this in the sensor itself now.
Note: A lot of this is "somewhat informed speculation" on my part, because image sensor manufacturers tend to be very secretive of their sensor's details.
Are there reasons to go with Zod over ArkType?