Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ajanuary
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
151.
▲
by
ajanuary
11y ago
People don't scan linearly; they recognise the pagination controls as a block. It's much quicker to jump to the end of the pagination block to find the "next" link than to scan through all of the numbers to find the curr
152.
▲
by
ajanuary
11y ago
That's not the half of it - if you knew what that cookie contained…
153.
▲
by
ajanuary
11y ago
Seems I might be outdated, and ES6 does define an order.
154.
▲
by
ajanuary
11y ago
JavaScript doesn't guarantee the order of keys. [edit] Also, the API makes less sense because JavaScript isn't statically typed so you can make up the result object on the fly. match('^(?<user>\w+)@(?<host>[
155.
▲
by
ajanuary
11y ago
My understanding is that they were both, depending on context.
156.
▲
by
ajanuary
11y ago
The advantage of foo/bar/baz is the cultural understanding that the contents isn't important. It's prevalence in programming is because programming languages have strict rules about where tokens are needed. We can't
157.
▲
by
ajanuary
11y ago
Java defines the scope of a local variable to be "the rest of the block in which the declaration appears". The variable declaration is 'hoisted' to the top of the scope, which is defined as where the variable declaration
158.
▲
by
ajanuary
11y ago
I've never liked the phrase 'variable hoisting'. It implies the compiler actively moves the variable declaration. What's actually happening is lexical scoping - a variable declaration is associated with a lexical scope.
159.
▲
by
ajanuary
11y ago
The website does a really poor job of emphasising that it's using asymmetric cryptography and some sort of challenge/response protocol, and how that is really where the improvement over the status quo is. It's _not_ just send
160.
▲
by
ajanuary
11y ago
From "Introducing Incremental DOM" [1] Incremental DOM changes the model to be a single phase: While creating the new (virtual) DOM tree walk along the existing tree and figure out changes as you go. Allocate no mem
161.
▲
by
ajanuary
11y ago
I don't know that "semantic" is what you mean here. Semantics in HTML is about exposing the meaning of content through the DOM. Adding data-binding via attributes doesn't change that at all. <label>Name <i
162.
▲
by
ajanuary
11y ago
> sound as part of the 4GL bullshit Actually it's primarily early languages plus Lua. [0] https://en.m.wikipedia.org/wiki/Comparison_of_programming_la...
163.
▲
by
ajanuary
11y ago
Pick the one with the most black?
164.
▲
by
ajanuary
11y ago
In Chrome right click the CAPTCHA image, click "Search Google for this image", copy and paste the resulting text search back as the results.
165.
▲
by
ajanuary
11y ago
Temporary plaintext passwords are rare; I don't think I've ever seen one. If you've got as far as temporary plaintext passwords, I'd argue it's a better UX to provide a simple link instead of forcing them to copy an
166.
▲
by
ajanuary
11y ago
When implemented correctly, password reset links a) Work once. If you click on a password reset link and it says it's already been used, you know something is up, v.s. someone using the plaintext password to log in before you and you a
167.
▲
by
ajanuary
11y ago
It wasn't the case here, but Oracle effectively treats empty string and null as the same value.
168.
▲
by
ajanuary
11y ago
Ruby (and most languages) evaluates the arguments before passing them through to the function. So it first evaluates server.accept, which blocks until a new connection, then passes the return value through to Thread.new which spawns the new
169.
▲
by
ajanuary
11y ago
The "/" is automatically added after you type the month, so you're never left with "0515". Try out the demo [1] and it should be a bit clearer. [1] https://s3.amazonaws.com/gabe-cc-form/ind
170.
▲
by
ajanuary
11y ago
It breaks down as soon as you reach a single layer of nesting. (a + b) / ((c + d) * e) would be (with pure whitespace) a+b / c+d * e you'd probably end up mix-and-matching a+b / (c+d * e)
171.
▲
by
ajanuary
11y ago
iOS doesn't expose the necessary APIs to be able to filter calls.
172.
▲
by
ajanuary
11y ago
If you attacked that formulation with the normal assumptions for logic problems, the answer would be the same. If you break the assumption that you can trust all logical statements in the problem, regardless of their origin, then you could
173.
▲
by
ajanuary
11y ago
I'm not convinced the fact one label "challenges" the other should change how you attack the problem. I think you have to be able to apply the same reasoning to the following problem: James says he is shorter than Alex.
174.
▲
by
ajanuary
11y ago
With logic problems the assumption is that logical information is always relevant to the solution, no matter what the source of the information is. It's interesting to have that assumption challenged though. https://www.yout
175.
▲
by
ajanuary
11y ago
I've been pretty vague which probably isn't very helpful so I'll try to be a bit more precise: for a mutable implementation it's quadratic in the number of times render is called over the lifetime of the component; for a
176.
▲
by
ajanuary
11y ago
That doesn't help reduce the computational complexity in this instance. After appending, the lists are different, so it renders the component, which starts iterating the children and checking each one in turn to see if it's change
177.
▲
by
ajanuary
11y ago
Yup, there is a bunch of things you can do to reduce the constants, but even with chunking the computational complexity is the same. In this case, it's not hard to reduce the constants to a point where the complexity doesn't reall
178.
▲
by
ajanuary
11y ago
It still needs to compare them, it will just do a reference comparison rather than a deep comparison on the fields. So again, it will be (a lot) quicker, but the complexity is still the same.
179.
▲
by
ajanuary
11y ago
How does ImmutableJS work? If it was turned into a straight list of immutable records, each comparison would be quicker but the complexity would remain the same. You'd have to something like turn it into a tree to reduce the complexity
180.
▲
by
ajanuary
11y ago
It's called at different times so will return different values, which is important.
More ›