Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
stephen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
stephen
1y ago
I want to use/try Niri, but have been staying on Hyprland from my safety blanket of Omarchy [1], and really liking its hyprscrolling plugin: https://github.com/hyprwm/hyprland-plugins/tree/main/hyprs
32.
▲
by
stephen
1y ago
I've been using Ghostty, and other GPU-based apps like Alacritty / WezTerm / Zed, because they're ofc better/faster... Ironically they've all made my DX worse, by highlighting how terrible the nvidia drivers ac
33.
▲
by
stephen
1y ago
I was wondering the same, about their backend domain model (or lack of it). Fwiw in the TypeScript space, we built Joist ( https://joist-orm.io/ ) to do exactly this. Granted, we went with a Rails/ActiveRecord minimalist
34.
▲
by
stephen
1y ago
> Microservices are a design pattern for organisations as opposed > to technology ... breakout into multiple teams I agree, but just saying "multiple teams" has led many eng directors to think "I have two squads now --&
35.
▲
by
stephen
1y ago
Well, we're not the "go to" yet :-) but if you want an entity-based ORM that isn't just a query builder, Joist has several amazing features (no N+1s) and great ergonomics https://joist-orm.io/
36.
▲
by
stephen
2y ago
Do queue operations (enqueue a job & mark this job as complete) happen in the same transaction as my business logic? Imo that's the killer feature of database-based queues, because it dramatically simplifies reasoning about retries
37.
▲
by
stephen
2y ago
Working on v2 of our n+1-proof/reactive TypeScript ORM, Joist ( https://joist-orm.io/ ), that moves to using the new-ish postgres.js driver (instead of knex/node-pg), so that we can leverage postgres.js's state
38.
▲
by
stephen
2y ago
Same! We've also been using the polyfill in production for a ~year or so. We recently configured the node-pg driver to leave the postgres DATE / TIMESTAMP / TIMESTAMPTZ dates as "just strings" (instead of its defaul
39.
▲
by
stephen
2y ago
> don't want to build in a language w/o types Yep; that's the only reason I don't use Rails. I'm building "ActiveRecord but with type(script)" at https://joist-orm.io/ and have our own
40.
▲
by
stephen
2y ago
Using raw SQL directly is doable, but it means you're responsible for maintaining the business logic & validation rules of every single hand-written INSERT, UPDATE, and DELETE query in your codebase. Personally I don't trust m
41.
▲
by
stephen
2y ago
I mean, of course they are a good idea, what we need is more examples of actually doing them in practice. :-) I.e. quoting from the post: - monolithic databases need to be broken up - Tables must be grouped by module and isolated from other
42.
▲
by
stephen
2y ago
We built Joist, an ActiveRecord-style ORM in TypeScript, on top of Facebook's dataloader library, and haven't had a single N+1 in ~4 years: https://joist-orm.io/docs/goals/avoiding-n-plus-1s Any "qu
43.
▲
by
stephen
2y ago
Maybe its Stockholm syndrome after ~4-5 years of TypeScript, but I like knowing "this method call is going to do I/O somewhere" (that its red). To the point where I consider "colorless functions" to be a leaky abs
44.
▲
by
stephen
2y ago
> So if you access a1.b then it will also fetch a2.b and > cache it if you loaded a2 within that same transaction. Ah ha! I'd implemented the same trick in this older Java ORM: https://github.com/stephenh/joi
45.
▲
by
stephen
2y ago
Definitely appreciate your "sometimes ORMs/sometime raw SQL" pragmatic stance. I agree! > then if you join on both you now are loading A * B * C rows I'm realizing it's not actually written up in our proper docs,
46.
▲
by
stephen
2y ago
I can assure you that brandur knows SQL. :-) (I don't know him personally, but have been following his blog for years.) What these "just write SQL" rants are missing is encapsulation--let's say you've got a business
47.
▲
by
stephen
2y ago
Besides pitching Joist, going through OP, I'm not following how verbose the nested examples would get, i.e. ProductLoadBundle is loading "products & widgets". But what if I need "products & widgets & widget o
48.
▲
by
stephen
2y ago
Ah, I look forward to every brandur post! :-) If he can give up Go, we've got a TypeScript ORM that will de-N+1 basically everything* that is not a paginated/limit-offset query: https://joist-orm.io/docs/goals
49.
▲
Show HN: Joist, the Best ORM, Ever?
(joist-orm.io)
5 points
by
stephen
2y ago
|
1 comments
50.
▲
by
stephen
2y ago
I worked in a Rails app in ~2018 & hunting down N+1s by sprinkling `includes` in just the right places was tedious, despite being a regular occurrence. Since then I've been building Joist, which is written in TypeScript, and has da
51.
▲
by
stephen
3y ago
> reading through the documentation and putting your distro together gives you way more insight into the inner workings which is invaluable for when it breaks. I definitely feel that way about the core libraries/frameworks I'm
52.
▲
by
stephen
3y ago
Love a tiling WM post! Reading the "twos days to get setup" reminds me of fighting a blank xmonad setup back in the day :-), and makes me all the more appreciative of Regolith Desktop, a super-minimal Ubuntu+i3wm (and sway) setup;
53.
▲
by
stephen
3y ago
Nice! Thanks for the reply! > hosted infra is hard to bootstrap. Ah yeah, that definitely makes sense... > a lot of the core infrastructure needed for that service branches > into a lot of other products Ah, I think I see what you
54.
▲
by
stephen
3y ago
Wow, looks great! We currently happily use graphile-worker, and have two questions: > full transactional enqueueing Do you mean transactional within the same transaction as the application's own state? My guess is no (from looking a
55.
▲
by
stephen
3y ago
If you're cloning parts of TypeScript, please bring along mapped & conditional types! Feel free to experiment on the syntax, but the concept is amazing, especially if you're planning on being dynamic-ish.
56.
▲
by
stephen
3y ago
Nice! We copied StyleX's "type-safe extensions" in Truss [1] so things like `<MyButton xss={Css.mt5.$} />` are allowed (setting margin is fine) while disallowing `<MyButton xss={Css.dg.$} />` (anything &
57.
▲
by
stephen
3y ago
Fwiw I appreciate your effort! That sounds really frustrating. I agree the recent bun/tsx/esbuild (but bun especially) has shown the node CJS/ESM fiasco was a bit of an emperor-wearing-no-clothes moment, where I think us ever
58.
▲
by
stephen
3y ago
Kinda surprised by all the "stuck on Yarn v1" comments so far... We went through the same "~2015 everyone uses yarn", "~2020 everyone goes back to npm" cycle, but in the last ~year or so are back on yarn v3 for
59.
▲
Prettier Plugin for SQL Files
(github.com)
1 points
by
stephen
3y ago
|
0 comments
60.
▲
by
stephen
3y ago
One of Bun's assertions is that their AsyncLocalStorage is significantly faster than Node's, b/c it purposefully only implements the subset of async_hooks that can be implemented w/o affecting performance: https:/&
More ›