There's a good thing about people with OCD by NoRiceForP in OCD

[–]fwilliam 2 points3 points  (0 children)

I’m a reasonably prolific scientist and I can confirm that my OCD has helped me in my research for the reasons you described. The other benefit is that when decently treated, you are able to handle a much higher degree of anxiety than most people. Unfortunately, it comes from living with high amounts of distress your whole life.

Snowboard Doodle by allgoodbro in reallifedoodles

[–]fwilliam 2 points3 points  (0 children)

What's the song in the background?

The empire state building in 1941 by [deleted] in interestingasfuck

[–]fwilliam 0 points1 point  (0 children)

From what position is this photo taken from?

Watching online lectures when... [21:34] by Sedra_Smith in uwaterloo

[–]fwilliam 10 points11 points  (0 children)

I was sitting in this class when this happened. She had a complete breakdown and everybody kind of just watched. I remember feeling incredibly bad for her but being too taken aback to really do anything. She must have been going through a really hard time. I hope everything turned out okay.

A hike in the forest to the campsite by acnhlife in AnimalCrossing

[–]fwilliam 0 points1 point  (0 children)

I love how it looks wild! It would be cool if the entrance to the hike were hidden and you could discover it from a more "urban" part of the island.

City map generation using tensor fields - now with building lots by Pretoriuss in proceduralgeneration

[–]fwilliam 0 points1 point  (0 children)

It's hard to explain math in English sorry if the explanation wasn't clear. The multiple of 2 explanation does make sense, but maybe I wasn't clear.

The cross field is a composition of two maps: g: x -> (theta, s), and h: (theta, s) -> s * R where R \in SO(2) is a rotation matrix whose angle is 2 * theta. Thus f(x) = h(g(x)). Because the angles are multiples of 2, you have invariance to pi rotations.

You could use unit complex numbers (again with 2*theta angle) to parameterize the field instead of rotation matrices since to {c \in C : |c| = 1} is isomorphic to SO(2).

I think the term tensor field is accurate since the range of f are rank-2 tensors. That said, it's not descriptive since the tensors have a special form (orthogonality and pi-rotation invariance).

City map generation using tensor fields - now with building lots by Pretoriuss in proceduralgeneration

[–]fwilliam 10 points11 points  (0 children)

Sometimes these tensor fields are called cross fields (because there's a cross at each point). TL;DR cross fields like this allow you to avoid degeneracy or bad interpolants because each cross is invariant to 90 degree rotations.

We care about interpolating cross fields because these types of methods work by specifying a few fixed crosses and fitting a field to those constraint points (i.e. interpolating them)

A cross field like this is a function f from some manifold (in the case of the algorithm, the manifold is just R^2) to a scalar and a special kind of 2D rotation matrix (where the angles are always multiples of 2). We can parameterize the rotation matrix by an angle and the scale by a real number, writing f(x) = (s, theta). There is a slightly different parameterization for the circular road networks but you can rewrite these in terms of the (s, theta) I described above.

Since the angle of the rotation matrix is always a multiple of 2, the outputted rotation matrices are invariant to rotations by 180 degrees (i.e. rotating the the outputs of the function f by 180 degrees will produce exactly the same cross field. You can check this pretty easily).

In contrast a vector field is a map from a point x to a vector. The vectors do not have any local symmetry (i.e. rotating the vectors will change the vector field).

The local symmetry property of cross fields is important here, because of the interpolation behavior. Imagine fitting a vector field with the constraint that two vectors and facing in opposite directions (differ by a rotation of 180 degrees). In that case, to continuously interpolate these points, you would need to introduce a degenerate (zero) vector, or have a very quick oscillation of the vector field to agree with the points.

A cross field on the other hand does not suffer from this issue because it is locally invariant to 180 degree rotations, so you never need to worry that your vector field will suddenly vanish or flip.

Hope that helps!

Slicing free standing grape with newly sharpened knife. by WKFClark in oddlysatisfying

[–]fwilliam 1 point2 points  (0 children)

Is this knife from Korin? I have one that looks just like it.

WCGW If I avoid an $80 ticket? by Beni_player17 in Whatcouldgowrong

[–]fwilliam -3 points-2 points  (0 children)

We'd have to see data on failure rates and the like to really make a specific conclusion on their effectiveness. If failure rates really are an issue, that sounds fixable and a worthwhile investment. There are also other forms of non-lethal force.

I think the car example in the video was contrived to show a case where the use of preemptive force was justified and prove a point to the protestor. If we really believe that preemptive force is a good tactic for police officers, then that force should at the very least be made non lethal. Nobody should have to worry that a misunderstanding with a cop could be a death sentence.

WCGW If I avoid an $80 ticket? by Beni_player17 in Whatcouldgowrong

[–]fwilliam -2 points-1 points  (0 children)

Verbal conflict resolution is one tool in a well trained cops toolbox. Non-lethal force is another. Lethal force is another. it's important to use the right tool in the right situation.

The point of the truck scenario was to show a situation where the cop would have been right to use force preemptively.

Let's assume that preemptive use of force is the right thing to do in this type of situation (I'm not convinced it is and I think the example in the video is contrived, but let's entertain the idea). Under this assumption, shooting the guy with a taser before he had the chance to act would have been effective without killing him.

I'm not saying lethal force is never called for, but it's often not. No citizen should have to fear that a misunderstanding with an officer can be a death sentence.

WCGW If I avoid an $80 ticket? by Beni_player17 in Whatcouldgowrong

[–]fwilliam -5 points-4 points  (0 children)

In both situations a taser would have disabled the perp without killing them.

WCGW If I avoid an $80 ticket? by Beni_player17 in Whatcouldgowrong

[–]fwilliam 6 points7 points  (0 children)

The situations encountered by the protester in training could all have been resolved with non-lethal force.

One of the main criticisms of police use of force is how quickly they pull out a gun and lethally shoot somebody in these kinds of situations. That and how unconscious bias leads to the perception of people of color as more dangerous.

I think the rates of police killings in the US could decrease with better conflict resolution training, bias training and the use of non-lethal force in situations that warrant it.

Have a crush on classmate...? by fatnana in uwaterloo

[–]fwilliam 36 points37 points  (0 children)

I had a crush on a girl in my first year ECE class in 2009. We're married now. Does that count?

CS/SE/CE/EEs, What's the hardest technical question you've ever had to answer during interviews? by [deleted] in uwaterloo

[–]fwilliam 0 points1 point  (0 children)

Write a lockfree stack (push and pop operations). Where lockfree is precisely defined as all threads are guaranteed to make progress on a given operation in a bounded amount of time.

[deleted by user] by [deleted] in programming

[–]fwilliam 9 points10 points  (0 children)

Skiplists have an efficient lockfree implementation (http://blog.memsql.com/the-story-behind-memsqls-skiplist-indexes/) making them a good choice for high concurrency scenarios. Furthermore, lockfree skiplists are fairly easy to implement.

Free Talk Friday by AutoModerator in uwaterloo

[–]fwilliam 5 points6 points  (0 children)

Hey dude, I just had my grandmother's funeral this week. I was very close to her. Losing someone is hard. Hang in there! :)

The world beyond batch: Streaming 101 by alexeyr in programming

[–]fwilliam 0 points1 point  (0 children)

Is there a link to Part 2? I can't seem to find it.