Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
colinmcd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
27 ms
·
151.
▲
by
colinmcd
6y ago
I'm not using "static" to imply "non-interactive", just that there shouldn't be a server that does any rendering/data loading.
152.
▲
by
colinmcd
6y ago
What kinds of rich content? React + TypeScript, or something else? Have you used the Hugo babel plugin?
153.
▲
The ideal tech stack for a personal developer blog in 2020
(vriad.com)
192 points
by
colinmcd
6y ago
|
269 comments
154.
▲
Ask HN: A JSON standard for SQL schemas?
1 points
by
colinmcd
6y ago
|
1 comments
155.
▲
by
colinmcd
7y ago
Just published an update to Zod that overhauls the error reporting. Now you can get the exact location in your complex/nested object where each validation error occurred. Plus all detected validation errors are reported simultaneously
156.
▲
by
colinmcd
7y ago
Been meaning to respond to this properly. I tried this exact approach initially but gave up after experiencing a series of frustrations. 1. I'm operating in a highly-connected, relation-heavy data domain (medical) where the queries I n
157.
▲
Ask HN: A tool for Covid patients to “flag” people/places they may have exposed?
1 points
by
colinmcd
7y ago
|
1 comments
158.
▲
A doctor-lawyer’s guide to all things Covid-19
(dpcfrontier.com)
2 points
by
colinmcd
7y ago
|
1 comments
159.
▲
by
colinmcd
7y ago
I guess it's something in the air! Given the popularity of the other libraries, it's surprising that there's isn't an optimal one. And yeah, unless you've gone down the rabbit hole of type safety obsession, it'
160.
▲
by
colinmcd
7y ago
Fixed! I'd done exactly zero testing on mobile (built the site from scratch yesterday).
161.
▲
by
colinmcd
7y ago
Consider the thread derailed :P Just fixed this! I'd done exactly zero testing on mobile (built the site from scratch yesterday).
162.
▲
by
colinmcd
7y ago
Ah I see I misread your comment. You're right, Cujo also shouldn't have validated. In a previous version of the post `neutered` was nullable and `age` was optional, but I decided to save the discussion of nullables/optional u
163.
▲
by
colinmcd
7y ago
Re: runtypes. Not sure how I missed this, it looks like an excellent tool. No support for recursive types (which I personally want/need for my project). I really like their API for constraint checking...might have to steal that... [UPD
164.
▲
by
colinmcd
7y ago
I personally prefer to standardize everything as a function. It also leaves some breathing room in case I decide to include parameters as part of a future API augmentation.
165.
▲
by
colinmcd
7y ago
Huh, not sure how I missed this. I don't love the class-based declarations: it's a bit verbose and doesn't allow you to use things like the spread operator to "mix in" fields into objects. There's also some red
166.
▲
by
colinmcd
7y ago
Huh. Totally missed this, it looks like an excellent tool. No support for recursive types (which I personally want/need for my project). I really like their API for constraint checking...might have to steal that... [UPDATE] runtypes ac
167.
▲
by
colinmcd
7y ago
Whoops! Should be `dogsList.parse(...)`. Also fixed the other typo :) Thanks!!
168.
▲
by
colinmcd
7y ago
You can generate JSON Schema from TS with this library: https://github.com/YousefED/typescript-json-schema It's certainly conceivable to build an equivalent for Zod but you'll eventually want to validate type
169.
▲
by
colinmcd
7y ago
I should point out that there's nothing in Zod (yet) that isn't expressible in Typescript. I'll eventually get around to doing string/numerical validations (`.isEmail()`, etc) that go beyond TS but currently all function
170.
▲
by
colinmcd
7y ago
I look forward to that! It's definitely possible to wrap `io-ts` to get a better interface, especially if you spend some (or rather, a LOT) of time figuring out the type declarations...
171.
▲
by
colinmcd
7y ago
Good question! It wasn't easy to get the question mark on the left-hand side, but it is possible. Here's the Zod equivalent: const C = z.object({ foo: z.string(), bar: z.number().optional(), }); type C = t.TypeO
172.
▲
by
colinmcd
7y ago
Just made it significantly more obvious...Thanks for pointing that out!
173.
▲
Designing the perfect TypeScript schema validation library
(vriad.com)
98 points
by
colinmcd
7y ago
|
75 comments
174.
▲
by
colinmcd
7y ago
You can get health insurance without being employed! Or check out the “healthcare cost-sharing” groups like Sedera - it’s great for freelancers.
175.
▲
by
colinmcd
7y ago
Great concept! Basically human-powered ensemble learning...clever. How many images are you able to process daily?
176.
▲
by
colinmcd
8y ago
Bagel Health (YC W19) First employee (Full-stack engineer) REMOTE Work at a YC startup trying to fix healthcare! Bagel is a new electronic health record for the growing direct primary care (DPC) movement. Read more about DPC at dpcnation.or
177.
▲
by
colinmcd
8y ago
Bagel Health (YC W19) First employee (Full-stack engineer) Decent cash salary plus first-employee equity (standard vesting) REMOTE Work at a YC startup trying to fix healthcare! Or at least improve a small part of it. Bagel is a new electro
178.
▲
Ask HN: Best way to get pre-orders for software products?
2 points
by
colinmcd
9y ago
|
3 comments
179.
▲
Show HN: Bye-React – Migrate from React to Preact with One Command
(github.com)
7 points
by
colinmcd
9y ago
|
1 comments
180.
▲
by
colinmcd
9y ago
Wow that's an unfortunate bug. It's fixed now, sorry about that. Email me once you've signed up and I'll give you a discount (say, 100%).
More ›