Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dcre
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
38 ms
·
631.
▲
by
dcre
3y ago
We use cookie auth only for the Remix server. The API uses OAuth, or something close to it. So when a user logs in, we get a token from the API (scoped to the particular user, not a special backend super-token) and store it in the session (
632.
▲
by
dcre
3y ago
Ah. In that case, that is not a mode (which is why I misunderstood), that is the default way Remix works and it's more or less what every user of Remix is doing. Some people might implement API endpoints in Remix itself, but for the mo
633.
▲
by
dcre
3y ago
SPA mode (what I assume you mean by BFF mode) is brand new, so almost nobody has used it. However, a close example would be the Oxide web console, which we build as an SPA because we want to serve it as static assets from a Rust backend. It
634.
▲
by
dcre
3y ago
React Router is still great, and in fact has gotten dramatically better as a result of its place at the core of Remix. Data router eliminates loading spinners and makes your SPA feel like a real application.
635.
▲
by
dcre
3y ago
I can't reproduce in Firefox on macOS. Tell us more about your setup!
636.
▲
by
dcre
3y ago
Yeah, that can be annoying. Until pattern matching makes it into JS, the main way people deal with this is to use a library. For example, ts-pattern lets you stick `.exhaustive()` at the end of a match call and I believe you get the error a
637.
▲
by
dcre
3y ago
It has sum types! Type unions with a discriminator.
638.
▲
by
dcre
3y ago
Recently learned about Gleam and am very interested in it as someone who always wanted to like Elixir but dislikes the Ruby syntax and lack of static typing. Love this approach to demonstrating the language in context. As a mostly frontend
639.
▲
by
dcre
3y ago
One thing I noticed is that when it’s playing chords, it seems a lot more likely than human players to put both major and minor thirds in. This isn’t unheard of — the famous Hendrix chord in “Purple Haze” consists of root, major third, 7th,
640.
▲
by
dcre
3y ago
“Among cohort studies in children, each additional serving per day of 100% fruit juice was associated with a 0.03 (95% CI, 0.01-0.05) higher BMI change.” Isn’t that a tiny effect? How much juice can a person drink? 5 additional servings per
641.
▲
by
dcre
3y ago
...no
642.
▲
Unison Cloud
(unison.cloud)
281 points
by
dcre
3y ago
|
152 comments
643.
▲
by
dcre
3y ago
This is a useful connection, but I think “in our minds” is misleading. Like you say, the forms of particular things like tables are not the same forms that are the conditions of possibility of experience. The latter forms are more abstract
644.
▲
by
dcre
3y ago
It actually works pretty well for me in iOS Safari — the main problem is that the visualization is sandwiched between the two sidebars, so it's about half an inch wide. If the three divs stacked vertically on small screens, that would
645.
▲
by
dcre
3y ago
He said on Twitter that it will! https://twitter.com/Jonathan_Blow/status/1722709573071433996
646.
▲
by
dcre
3y ago
Can't repro in FF with JS off (not exactly NoScript). Could it be an extension doing something weird? Curious if you see normal text when you view source on the page.
647.
▲
by
dcre
3y ago
We have two!
648.
▲
by
dcre
3y ago
Sounds like the very few people who are concerned about this can easily get a smaller install.
649.
▲
by
dcre
3y ago
For me, the fact that every dev server tab I open is its own fresh server instance is really useful. We can run our tests in parallel with no server. We can deploy a live preview as a static site. https://oxide-console-preview.ve
650.
▲
by
dcre
3y ago
Yeah, basically. We do it with a function call where the argument to the function is that interface representing all the API endpoints. `makeHandlers` handles parsing path params, query params, and request body and passes them to each endpo
651.
▲
by
dcre
3y ago
Worth noting that in my experience it's the combination of MSW and code generated from an OpenAPI spec that really makes it special, not just MSW alone. The other reply covers it but I want to slice it slightly differently. I see two t
652.
▲
by
dcre
3y ago
We more or less did that too. We generate typed wrappers for every handler, and then we manually implement the internal logic for each endpoint. I doubt reliably generating 100% of the logic is possible, but even if it is, I would guess it
653.
▲
by
dcre
3y ago
At my job we've found working with MSW + OpenAPI to be near miraculous. I work on a web frontend and do most of my development against a mock API powered by MSW. This live preview runs against the mock API running fully in-browser. ht
654.
▲
by
dcre
3y ago
Sure, it's a lot of fanfare, but at my job we've found working with MSW + OpenAPI to be near miraculous. I work on a web frontend and do most of my development against a mock API powered by MSW. This live preview runs against the
655.
▲
by
dcre
3y ago
This article is far too generous to the argument. Matt Bruenig’s analysis will likely appeal to some here. https://mattbruenig.com/2023/09/20/doing-the-marriage-thing-... https://mattbruenig.com&#x
656.
▲
The Future of CSS: Easy Light-Dark Mode Color Switching with Light-Dark()
(bram.us)
127 points
by
dcre
3y ago
|
70 comments
657.
▲
by
dcre
3y ago
In the talk it’s short for getting Jeff Bezos’d, i.e., someone with deep pockets easily replicating what you’ve built on top of their own infrastructure (often cheaper for them because of that infrastructure) after you showed there was a ma
658.
▲
by
dcre
3y ago
IMO TypeScript’s unsoundness is a red herring. It’s a wise pragmatic design choice, and the alternatives have tradeoffs that were judged to be worse. Whether people run into the particular problems caused by TypeScript’s particular sources
659.
▲
by
dcre
3y ago
I used Elm for a while (even gave a conference talk about it in 2015) but I don’t really know what Elm would add to the discussion. Elm’s template syntax is only superficially different from JSX. It’s nested function calls, which is exactly
660.
▲
by
dcre
3y ago
Things have slowed down a lot compared to 5 or 10 years ago. The recent shiny new things are all quite similar to each other. The amount of churn is overstated at this point. For beginners I’m sure it’s still tough because there’s a lot of
More ›