Hacker News new | past | comments | ask | show | jobs | submit | buffaloPizzaBoy's comments login

Whats not mentioned in the article is that this particular intersection has a

(15mph residential access road - top right) (25 mph farmland road - bottom) (50mph country highway - left and right)

Previously, only drivers from the 15mph and 25mph roads had to stop!

Visibility coming from the south would also be terrible to check for incoming highway drivers (left is blocked by foliage, right the road curves out of sight), so getting the highway drivers to slow down is a welcome improvement here.

There is also not enough space to add at the intersection here either, its seemingly bordered entirely by private land.


They can eminent domain whatever land they need to expand the intersection.

The area borders wetlands and a very steep hillside where one of the roads intersects. And the regular flow of traffic pre-roundabout was more like 60-65 mph.

A roundabout was the correct choice.


It is interesting to see the use of the A* path finding algorithm for finding optimal matchings of nodes.

The approach from Chawathe et. al splits nodes from the before/after trees into chains by their label in the syntax grammar, and then runs myers’ longest common subsequence on each pair of chains. Some parameters t, f are used to have an approximate ‘equals’ method for subtrees.

This iteratively builds a set of matchings between equivalent nodes from the old and new trees. Here’s the paper https://dl.acm.org/doi/10.1145/235968.233366

I’d be curious to see if this approach handles re-ordering of nodes better. The ‘fastMatch’ algorithm described above will typically miss matching cases where a node that is not order sensitive (i.e a function in a namespace can be moved somewhere else in that namespace).


I've looked at several tree diffing papers, including Chawathe et al, but it's not always easy to assess whether their approach would suit difftastic.

I know that sdiff by Arun Isaac is based on applying that paper to Scheme: https://archive.fosdem.org/2021/schedule/event/sexpressiondi... , although he also reports performance challenges.

Most tree diffing papers that I've seen focus on either (1) providing a minimal diff and accepting the performance cost or (2) providing a relatively minimal diff and focusing on the performance.

I've generally found that you need a minimal diff to get a good result, so papers in (2) are less applicable. I've also found several cases where there are several possible minimal diffs, but there's a clear 'correct' answer from the user's perspective.

Difftastic doesn't handle moves: the edit set is add, remove, or replace similar comment. If you reorder functions, it will take the largest unchanged subset. Moves are hard to model in a diffing algorithm, but they're also very hard to display coherently in the UI.

I know a few code forge websites (e.g. Phabricator) show moves in a fairly comprehensible way, although they're all based on line-based diffs.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: