Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
throwitaway1123
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
61.
▲
by
throwitaway1123
2y ago
> Plus in most cases showing error messages too fast is terrible UX. The solution to that problem is to debounce or throttle your error messages. That allows you to report validation issues to the user quickly, but not overwhelmingly fas
62.
▲
by
throwitaway1123
2y ago
React and react-dom are peer dependencies (npmgraph lists them but doesn't graph them visually). The actual full installation command is: `npm install next@latest react@latest react-dom@latest`[1]. Even if you include react and react-d
63.
▲
by
throwitaway1123
2y ago
> The alternative is the npm hellscape where you have a package for "isOdd" and a package for "is even" that can break the entire ecosystem if the owner is disgruntled because everything depends on them. The is-odd an
64.
▲
by
throwitaway1123
2y ago
> Look at the dependency tree for a next Looks ok to me: https://npmgraph.js.org/?q=next Ironically, most of the dependencies are actually Rust crates used by swc and turbopack [1][2]. Try running `cargo tree` on either
65.
▲
by
throwitaway1123
2y ago
Yeah it is surprising because it seems like a relatively obvious solution. The Watch doesn't use electromyography though [1], it looks like it currently uses "the accelerometer, gyroscope, and optical heart sensor with a new machi
66.
▲
by
throwitaway1123
2y ago
That was the part that stood out to me as well after watching The Verge's video: https://youtu.be/mpKKcqWnTus?t=98 The Vision Pro uses optical sensors for hand tracking, so if your hands aren't visible to the devi
67.
▲
by
throwitaway1123
2y ago
The built in DOM types for the browser's `crypto.randomUUID` function actually already use this technique to a lesser extent: https://github.com/microsoft/TypeScript/blob/121c5dd36bd87e4...
68.
▲
by
throwitaway1123
2y ago
> "2 or 2000..." statement is just a jab toward mathematicians. It's a jab towards mathematicians in the context of criticizing a language proposal. He's comparing the complexity of mathematicians and their 2000 line
69.
▲
by
throwitaway1123
2y ago
> You don't need to try putting words in his mouth after he specifically stated that maintaining a simple user interface is higher priority. I'm not trying to put words in his mouth (I'm pretty sure I delineated his direct
70.
▲
by
throwitaway1123
2y ago
From the blog post you linked: "But the complexity of any proposed solution for this puzzle is immense, to me: it requires the parser (or more precisely, the lexer) to be able to switch back and forth between indent-sensitive and inden
71.
▲
by
throwitaway1123
2y ago
If a callback function gets really unwieldy then you should probably extract it from the call site and define it elsewhere, but that should happen because you decided to, not because the language's limitations coerced you into doing it
72.
▲
by
throwitaway1123
2y ago
Using a list combined with the walrus operator is a clever hack, but it's nice to not be limited to expressions. In JS you can define the equivalent of a multi-line lambda function with any number of statements (which is helpful when y
73.
▲
by
throwitaway1123
2y ago
I also disliked unqualified imports. I can never get used to languages where you can 'import foo' or 'use foo' and it just dumps a bunch of symbols into the current scope. That combined with Swift's 'implicit m
74.
▲
by
throwitaway1123
2y ago
It might have been confusing since there's another project operating in this space called Neutralinojs.
75.
▲
by
throwitaway1123
2y ago
Dexie supports observable queries, but it operates on IndexedDB rather than plain JS objects: https://dexie.org/docs/liveQuery()#vanilla-js
76.
▲
by
throwitaway1123
2y ago
Wow, that might be the best part of the update. System Integrity Protection shields /usr, /bin, and /sbin, so I prefer to use the system provided executables in those directories when possible.
77.
▲
by
throwitaway1123
2y ago
This is actually a pretty decent use case for something like this. You could technically convert a user provided filter function to a string to serialize it, then recreate it using the Function() constructor, but that requires adding '
78.
▲
by
throwitaway1123
2y ago
It sounds like you have an aversion to sports because you were forced to participate in them as a child, which is completely understandable. If someone had coerced you into the school's drama program you might find theater revolting as
79.
▲
by
throwitaway1123
2y ago
They definitely could, but it would likely cost Apple more to have two sets of sensors, not to mention take up more space in the device itself. Isn't that how they justified removing the headphone jack? And of course this is Apple we&#
80.
▲
by
throwitaway1123
2y ago
The rest of the industry seems to be moving towards under-screen ultrasonic fingerprint readers, which if Apple adopted, would allow them to shrink the notch by getting rid of the Face ID sensors. I think they've dug in their heels on
81.
▲
by
throwitaway1123
2y ago
> Plus they only work with JS enabled, unlike React+SSR where you can progressively enhance your app. You can SSR web components using the Declarative Shadow DOM API, which is finally supported in all of the major browsers and works with
82.
▲
by
throwitaway1123
2y ago
I personally believe that Prettier strikes a decent balance between being configurable vs being opinionated. I've used formatters that are much less opinionated than Prettier (e.g. the last time I used XCode it only handled indentation
83.
▲
by
throwitaway1123
2y ago
Since we're on the topic of higher order functions, arrow functions allow you to express function currying very succinctly (which some people prefer). This is a contrived example to illustrate the syntactical differences: const arr
84.
▲
by
throwitaway1123
2y ago
ESLint and Prettier are the de facto default linter/formatter combo in JS. There are rules you can enable to enforce your preferred style of function [1][2]. [1] https://eslint.org/docs/latest/rules/func-
85.
▲
by
throwitaway1123
2y ago
> code execution could be mapped to diffs between state transitions to provide rewind functionality and debugging for free. Some of what you're saying reminds me of the JS library Immer. Using JS proxies (which can intercept and det
86.
▲
by
throwitaway1123
2y ago
Yes, this is correct. If you're using IP address allowlists then you also have to check the Host HTTP header (Cloudflare won't allow their other customers to forge that header). Or, you can use mTLS (as another commenter pointed o
87.
▲
by
throwitaway1123
2y ago
Agreed. It also can't hurt to setup a firewall or EC2 Security Group that only allows ingress from Cloudflare IPs: https://www.cloudflare.com/ips/ Alternatively, you can use Cloudflare Tunnel, and then block all i
88.
▲
by
throwitaway1123
2y ago
> It does not matter - all the ports are closed. Yeah and I have a lock on my door. I still won't post my address on HN. It's all about defense in depth. Another thing I forgot to mention is that port knocking only works if you
89.
▲
by
throwitaway1123
2y ago
You are both slightly wrong, and slightly misunderstanding what I'm saying. > TLS is not mandatory in all cases, but if you want to use it, it is not an issue having a certificate. TLS is mandatory if you want to ensure your connect
90.
▲
by
throwitaway1123
2y ago
Port knocking only handles authentication (it's basically a crude password). It doesn't ensure the integrity (tamper prevention) or privacy of your connection. You would need to set up SSL certificates to handle that. You also nee
More ›