News for hackers. Stuff that matters.
Re:D1: We turned it up to 11 by pier25 on Friday May 19, 2023 @10:17AM (#36002286)
Has the DX of Workers improved?

I think Deno is lightyears ahead.

Re:D1: We turned it up to 11 by KRAKRISMOTT on Friday May 19, 2023 @10:31AM (#36002442)
Still no compatibility with standard ORMs like Prisma either.

And the team has been aware of the issue for years now

https://github.com/cloudflare/workers-sdk/issues/2701

https://news.ycombinator.com/item?id=31341513

Re:D1: We turned it up to 11 by kentonv on Friday May 19, 2023 @10:45AM (#36002584)
Sorry that D1 has been slow out the gate. Now that we've solved the basic technical issues we can really focus on improving DX.
Re:D1: We turned it up to 11 by Akkuma on Friday May 19, 2023 @11:47AM (#36003304)
You can use drizzle-orm with Cloudflare and that is fully compatible.
Re:D1: We turned it up to 11 by rozenmd on Friday May 19, 2023 @02:40PM (#36005405)
Drizzle is amazing.
Re:D1: We turned it up to 11 by Akkuma on Friday May 19, 2023 @03:13PM (#36005742)
This is my first time using it and I've been very pleased with it so far. It keeps it simple, has solid typing & schema building, and reminds me of LINQ. I'm also a thin models kind of person and the fact this is just an object without needing to build ORM classes is even better.
Re:D1: We turned it up to 11 by radiofmd on Saturday May 20, 2023 @12:44AM (#36009443)
> standard ORMs like Prisma

Prisma isn't standard and too slow anyway.

Re:D1: We turned it up to 11 by re-thc on Saturday May 20, 2023 @03:21AM (#36010027)
They recently have a new json protocol that’s faster.
Re:D1: We turned it up to 11 by radiofmd on Saturday May 20, 2023 @03:42AM (#36010118)
Still way to slow (coldstart, throughput and general latency), I was referring to the latest version which has still a convoluted, nonsense stack. I'd stay away from Prisma, there's enough info online.
Re:D1: We turned it up to 11 by igalklebanov on Saturday May 20, 2023 @07:52AM (#36011106)
You can use D1 with Kysely (the typesafe sql query builder) via the kysely-d1 3rd party dialect.

https://github.com/kysely-org/kysely

https://github.com/aidenwallis/kysely-d1

Re:D1: We turned it up to 11 by kentonv on Friday May 19, 2023 @10:43AM (#36002563)
Hard to say without knowing what specific problem you have had but we are improving all the time. Several improvements announced just this week, take a look at the blog.

Among other things, we made Wrangler (Workers CLI tool) use the open source workerd by default for local development, so local dev should produce a much more precise simulation now (since it's literally running the same code).

Re:D1: We turned it up to 11 by pier25 on Friday May 19, 2023 @11:10AM (#36002893)
And what about the DX of using Workers with Pages?

I tried to use that recently and it was a disaster. I wrote about my experience here:

https://twitter.com/pierbover/status/1641474067013271552

I then opened these two issues:

https://github.com/cloudflare/workers-sdk/issues/2962

https://github.com/cloudflare/workers-sdk/issues/2964

I ended up moving the project over to Netlify + Edge functions. I had it all working in like 5-10 mins as it should. Took me two hours to figure out why Workers weren't working in my Pages project, and could never get Workers working properly with my Astro project.

I think you're working exclusively on the engine of Workers which is really top notch, but Cloudflare really needs to improve the outer layer which affects DX considerably.

Re:D1: We turned it up to 11 by kentonv on Friday May 19, 2023 @12:30PM (#36003795)
Sorry you experienced that. FWIW this announcement from Wednesday should help address the problems you ran into:

https://blog.cloudflare.com/pages-and-workers-are-converging...

Re:D1: We turned it up to 11 by mscccc on Friday May 19, 2023 @11:04AM (#36002812)
I've been using workers on & off since it launched. Just tried it again recently and the local dev experience with wrangler is excellent now.