Better HN
topnewbestaskshowjobs
Log inSign up

18nleung

515 karma · joined Jul 6, 2015 (11y ago) · 93 submissions

natecation.com

my public key: https://keybase.io/nathanleung; my proof: https://keybase.io/nathanleung/sigs/21RQELlB81U9ezo98QC5Ypm7DXkaUdVo--fOyCR9Gws

Submissions

1.

Building audit logging in Postgres without triggers(runharbor.com ↗)

3 points · by 18nleung · 6mo ago · discuss

2.

Notes on YC P26, halfway through the batch(natecation.com ↗)

2 points · by 18nleung · 6mo ago · discuss

3.

NPM website was down(status.npmjs.org ↗)

126 points · by 18nleung · 7mo ago · 61 comments

4.

Naming rights to street auctioned in San Francisco(paintastreet.com ↗)

21 points · by 18nleung · 7mo ago · 16 comments

5.

How We Model Clinical Trial Data When Every Trial's Data Model Is Different(runharbor.com ↗)

2 points · by 18nleung · 8mo ago · discuss

6.

Why We Love Functional Programming But Don't Use Effect-TS(runharbor.com ↗)

2 points · by 18nleung · 12mo ago · discuss

7.

Using Atomic State to Improve React Performance in Deeply Nested Component Trees(runharbor.com ↗)

10 points · by 18nleung · 1y ago · 1 comment

comment 1y ago · link · parent

Author here. Wrote a bit about how we use Terraform for local dev at work. In brief:

Our Docker Compose local dev setup started to break down once we had to model more complicated production behavior locally – things like table-specific Postgres roles for audit logs and dynamically provisioned databases per-clinical-trial. We were drifting toward a bespoke Bash mess to keep dev and prod in sync.

Our core idea was instead to embrace Terraform in the local dev environment too. We were already using Terraform heavily in prod, and Terraform's robust provider ecosystem meant that we could e.g. substitute Docker containers for RDS and MinIO for S3 without deviating too far from our production configuration.

The really fun part is how we use Terraform to handle dynamic provisioning, which we need for isolated, per-clinical-trial databases. The way we do it in prod is by giving each clinical trial its own, isolated Terraform state, stored in a cloud storage bucket. By writing an equivalent local Terraform config for this provisioning step, we enable the app to run the same `terraform apply` command as it does in prod to locally to spin up a new database, with the individual state for that new db stored in a local MinIO bucket... which is itself created by the original `terraform apply` that sets up the initial local dev infrastructure.

Altogether, Terraform gives us a super high-fidelity local environment that lets us test complex application behavior and infrastructure logic without the full overhead of spinning up a local k8s cluster (which is what I imagine the next best alternative might be?). It's readable, declarative, and required no new tooling on our side since we were already using Docker and Terraform anyways.

Curious to hear how other folks are managing complex local dev setups, especially if you're not on Kubernetes!

9.

Using Terraform in *Local* Dev for Reproducible, High-Fidelity Dev Environments(runharbor.com ↗)

3 points · by 18nleung · 1y ago · 3 comments

10.

Show HN: Terraform for *Local* Dev Infra(runharbor.com ↗)

2 points · by 18nleung · 1y ago · discuss

11.

Show HN: Prompt-to-code Webpack loader for generating LLM output at build-time(github.com ↗)

1 points · by 18nleung · 1y ago · discuss

comment 1y ago · link · parent

I would have written a shorter source, but I did not have the time.

comment 1y ago · link · parent

You're right that IDE/dev-time performance might be slower than using generated types since this relies on "dynamic" TypeScript inference rather than static codegen'd types.

That said, depending on how your codegen works and how you're using protos at runtime, this approach might actually be faster at runtime. Types are stripped at compile-time and there’s no generated class or constructor logic — in the compiled output, you're left with plain JS objects which potentially avoids the serialization or class overhead that some proto codegen tools introduce.

(FWIW, type inference in VSCode seemed reasonably fast with the toy examples I was playing with)

comment 1y ago · link · parent

I biked with the author from SF to Sacramento — we went up to Marin over GGB, then over the Richmond–San Rafael bridge to the EB

15.

Show HN: Zero-codegen, no-compile TypeScript type inference from Protobufs(github.com ↗)

138 points · by 18nleung · 1y ago · 73 comments

16.

Protobuf-ts-types: zero-codegen TypeScript type inference from protobuf messages(github.com ↗)

2 points · by 18nleung · 1y ago · discuss

17.

New York’s Hottest Steakhouse Was a Fake, Until Saturday Night(nytimes.com ↗)

2 points · by 18nleung · 3y ago · discuss

18.

I lived in LA and commuted to Berkeley by plane to save on rent(old.reddit.com ↗)

145 points · by 18nleung · 3y ago · 115 comments

19.

Region-beta Paradox(en.wikipedia.org ↗)

3 points · by 18nleung · 3y ago · discuss

20.

Show HN: fallback() – write web apps in Solidity and serve HTTP over Ethereum(github.com ↗)

9 points · by 18nleung · 3y ago · 1 comment

comment 4y ago · link · parent

How does this work? (I thought volatility mainly affected the value of options, not the underlying cash flows?)

22.

Investing in Startups by Passing the Series 65(natecation.com ↗)

102 points · by 18nleung · 5y ago · 80 comments

23.

‘Operation Varsity Blues: The College Admissions Scandal’ Review(wsj.com ↗)

2 points · by 18nleung · 5y ago · discuss

24.

Gen Z Are Hustling for Their Post-Covid Futures(bloomberg.com ↗)

2 points · by 18nleung · 5y ago · discuss

comment 5y ago · link · parent

Thank you, Nino, for a great app!
1234