Better HN
topnewbestaskshowjobs
Log inSign up

panic

29,749 karma · joined Sep 16, 2009 (17y ago) · 3,593 submissions

Submissions

1051.

The perils of federated protocols (2016)(lwn.net ↗)

1 points · by panic · 7y ago · discuss

comment 7y ago · link · parent

Also worth mentioning is Danny Dubé's SILex (http://wiki.call-cc.org/eggref/5/silex), which extracts submatches from a DFA trace by walking the trace in reverse, reconstructing the corresponding NFA trace (or traces) using a side table generated during determinization. The technique is described in these two papers: http://www.iro.umontreal.ca/~feeley/papers/DubeFeeleyACTAINF... http://www.schemeworkshop.org/2006/14-dube.pdf

comment 7y ago · link · parent

The more work you have to do to change anything in the UI, the more improvements you end up saying "no" to. Great UIs typically get that way via an enormous number of tweaks and improvements (both small and large) at every stage of the design and implementation process.

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

I'm a fan of formal methods in general, but I'm not sure they're a good fit for UI specification. Building user interfaces is all about flexibility—you need to be able to change the UI as you discover what works and what doesn't. A rigid, pre-specified UI is almost always a bad UI.

1055.

Operator Precedence: We can do better(blog.adamant-lang.org ↗)

3 points · by panic · 7y ago · discuss

comment 7y ago · link · parent

I think this is an oversimplification of the reasons people could have for protesting. The military is not just about resolving conflict through material power. It supervises a massive industrial machine which twists our entire country around its values. Dwight D. Eisenhower described the situation in 1961:

> 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

As far as I can tell, these companies convinced their investors that they're going to be the next Uber, so they need to look like they're making direct progress toward that goal. Driving around a retirement home might seem like a distraction when Tesla claims to be shipping a fully autonomous car by the end of 2019.

comment 7y ago · link · parent

Authoritarianism by definition requires a strong central power. Whatever you're talking about isn't authoritarianism.

1060.

White Words(popula.com ↗)

3 points · by panic · 7y ago · 1 comment

comment 7y ago · link · parent

Part of the problem is that it's hard to determine all the possible situations you could be in -- changing the time during a DST transition while using the Islamic calendar and so on. Formal methods are relatively inaccessible in general, but I wonder if you could make an easy-to-use verification tool specifically focused on date/time code.

comment 7y ago · link · parent

Yeah; say for example you're trying to recognize a swipe with a certain velocity on a touchscreen:

    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

If x is an array of input samples and y is an array of output samples, a simple FIR filter might look like:

  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

My point didn't have anything to do with birds in particular. You can think about a cat planning how to pounce on a bird instead if you want. The pouncing cat is thinking in terms of its body, the space around it, and the movement of the bird, without really involving language.

comment 7y ago · link · parent

The amount of paper in the universe is finite, not countably infinite, which means almost all natural numbers can't be written down either. But despite its philosophical dubiousness, the set of natural numbers is still useful. If we can prove things about all natural numbers, it doesn't matter how much paper we have; the things we prove will still be true for any individual natural number we can write.

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 drawing a picture, paying attention to what looks good or not and making small corrections. You're thinking in terms of the picture, not in terms of a language.

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

The beauty of Forth is that you can write at as low or as high a level as you'd like. I think most Forth programmers would factor out some of these operations into their own words rather than writing such a low-level definition, but there's nothing preventing you from writing your web server like it's assembly code.

comment 7y ago · link · parent

A somewhat off-the-wall solution to this problem would be to require major versions to start at some arbitrary lower limit much greater than 1. For example, imagine every semantic version started at 123.0.0. It's less of a big deal to go from version 123 to 124 than it is to go from 1 to 2.

comment 7y ago · link · parent

> There's also the search selection (command-E), which is pretty much only usable for moving the selection to the search box.

In most apps, Command-E followed by Command-G will search for the selected text without even going through the search box!

comment 7y ago · link · parent

Part of the problem is this industrialist idea of using time efficiently. Where we originally quantified our use of time at work in order to make our managers more money, we now apply this ideology to our entire lives. We don't want to waste our time consuming anything but the highest-rated, most-upvoted, best-liked content. We end up having to manage not just our working life, but our free time too.

1072.

On low-tech (2007)(mail-archive.com ↗)

1 points · by panic · 7y ago · discuss

comment 7y ago · link · parent

Not all authors will respond to email promptly. And many have retired or even died -- there are decades-old papers still behind paywalls.

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

1
353637
120