29,749 karma · joined Sep 16, 2009 (17y ago) · 3,593 submissions
1051.
The perils of federated protocols (2016)(lwn.net ↗)
1 points · by panic · 7y ago · discuss
comment 7y ago · link · parent
comment 7y ago · link · parent
Early prototyping, designers and developers working together directly, continuous builds, frequent feedback from users—all of these things feed into this improvement process and make the end result better. I'd worry that formal specifications would have the opposite effect.
comment 7y ago · link · parent
1055.
Operator Precedence: We can do better(blog.adamant-lang.org ↗)
3 points · by panic · 7y ago · discuss
comment 7y ago · link · parent
> Our military organization today bears little relation to that known by any of my predecessors in peacetime, or indeed by the fighting men of World War II or Korea.
> Until the latest of our world conflicts, the United States had no armaments industry. American makers of plowshares could, with time and as required, make swords as well. But now we can no longer risk emergency improvisation of national defense; we have been compelled to create a permanent armaments industry of vast proportions. Added to this, three and a half million men and women are directly engaged in the defense establishment. We annually spend on military security more than the net income of all United States corporations.
> This conjunction of an immense military establishment and a large arms industry is new in the American experience. The total influence -- economic, political, even spiritual -- is felt in every city, every State house, every office of the Federal government. We recognize the imperative need for this development. Yet we must not fail to comprehend its grave implications. Our toil, resources and livelihood are all involved; so is the very structure of our society.
Stopping this "total influence" from affecting the values of your employer is a separate goal from ending war altogether.
1057.
Quotes from 1992(apenwarr.ca ↗)
1 points · by panic · 7y ago · discuss
comment 7y ago · link · parent
1060.
3 points · by panic · 7y ago · 1 comment
comment 7y ago · link · parent
comment 7y ago · link · parent
def touchDown():
velocity = 0
lastTime = now
def touchMoved(from, to):
velocity = (to - from) / (now - lastTime)
lastTime = now
def touchFinished():
if velocity.x > threshold:
performGesture()
You test it out, and discover that the gesture is kind of flaky. Sometimes it works properly, but just as often it fails when it feels like it should have worked. It turns out that maintaining a constant velocity is hard—as your finger moves across the screen, the velocity can fluctuate around between samples. The test in touchFinished() looks at only the last sample taken, which is often the worst, as your finger has just lifted off from the screen.So instead of just looking at the last velocity, you keep track of a "smoothedVelocity" which averages your velocity samples together:
def touchDown():
smoothedVelocity = 0
lastTime = now
def touchMoved(from, to):
velocity = (to - from) / (now - lastTime)
smoothedVelocity = 0.25 * velocity + 0.75 * smoothedVelocity
lastTime = now
def touchFinished():
if smoothedVelocity.x > threshold:
performGesture()
With this change, your smoothedVelocity moves a bit toward the measured velocity with each sample, but won't jump directly there. This feels a lot more predictable. Stopping your finger momentarily as it lifts off the screen won't stop the gesture from being performed, for example.The smoothedVelocity code implements a low-pass IIR filter (it filters out the high-frequency fluctuations while letting the lower-frequency motion pass through). You could also imagine just keeping the last 2 velocities and averaging them together at the end: that would be an FIR filter.
comment 7y ago · link · parent
y[t] = a*x[t] + b*x[t-1]
Whereas a simple IIR filter might look like: y[t] = a*x[t] + b*y[t-1]
In the first equation, only two input samples (x[t] and x[t-1]) are used to compute each output sample. A sharp "impulse" at x[0] will only affect the values of y[0] and y[1]. That's what makes it an FIR filter—the number of output samples affected by an impulse is finite.On the other hand, the second equation has a y[t-1] term on the right hand side. Each output sample feeds back into the next one. To see what this looks like purely in terms of x samples, you can substitute using the equation for y[t], then multiply:
y[t] = a*x[t] + b*y[t-1]
y[t] = a*x[t] + b*(a*x[t-1] + b*y[t-2])
y[t] = a*x[t] + b*a*x[t-1] + b^2*y[t-2]
y[t] = a*x[t] + b*a*x[t-1] + b^2*(a*x[t-2] + b*y[t-3])
y[t] = a*x[t] + b*a*x[t-1] + b^2*a*x[t-2] + b^3*y[t-3]
...
Eventually you'll get the sum (assuming the samples start at x[0]): y[t] = sum from n=0 to t of b^n*a*x[t-n]
The sum ranges over the entire array of samples, all the way back to the beginning. Each input sample from x influences every output sample afterward. The output for an impulse—a single positive x[0] sample followed by x[1] = x[2] = ... = 0—is y[t] = b^t*a*x[0]
Since these samples are non-zero for all t (though decaying exponentially according to the value of b), the second equation describes a filter with infinite impulse response.1064.
Time Travel (2006)(scottaaronson.com ↗)
119 points · by panic · 7y ago · 82 comments
comment 7y ago · link · parent
comment 7y ago · link · parent
It's the same idea for the reals; we don't actually care about the vast majority of the real numbers, but since it's hard to know ahead of time which ones we will care about, we might as well prove things about all of them!
comment 7y ago · link · parent
Say you're playing basketball. You're thinking in terms of the ball, the net, the other players, and so on, not thinking in terms of a language.
I can imagine that (for example) a bird building its nest finds itself in a similar situation. It's thinking in terms of the nest -- what shaped sticks to gather and where to place them -- even though it doesn't have any capacity for language.
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
1072.
On low-tech (2007)(mail-archive.com ↗)
1 points · by panic · 7y ago · discuss
1074.
Making the Polyhedra Viewer (2018)(blog.tessera.li ↗)
2 points · by panic · 7y ago · discuss
1075.
Silicon Inquiry(notesfrombelow.org ↗)
1 points · by panic · 7y ago · discuss