Saturday, March 29, 2008

The Toronto Earth Hour Failure: C3P0 says "We're Doomed"


Yesterday, March 29, 2008 between 8-9PM was earth hour. It was a total failure.

To start, two of Canada's biggest hockey teams were playing at that time, I suspect many eyes were glued to un-switched-off-sets to watch the hometown Leafs defeat their arch rival Canadiens.

I turned off my lights and went grocery shopping during the hour... because I live in a basement which has absolutely no source of light other than electricity I would have been bumping into things constantly if I didn't. What I saw when I walked through my neighbourhood is about 50% houses with lights on... all the stores at Dufferin and Steeles had their lights on and all the streetlights were lit while I walked past.

While I disagreed with the stated goal of Earth Hour (raising awareness my butt), the reason I participated was because I believe that earth hour was a test to see if humanity could collectively get its ass together and switch off for just 1 hour a year. I viewed the occurance as a sort of Prisoners Dilemma where if we would all switch off together our human race would be saved, if people don't come together and switch off... well then we're doomed.

If you did switch off you are in the worst position, not only are you doomed, but you didn't get to see the majority of the Leafs vs Habs.

Friday, March 28, 2008

Mass Moment of Inertia

the mass moment of inertia -> how hard it is to change the spin of an object.

Its not the shape that matters when spinning, its the mass that matters. If the mass is closer to the center of gravity it will spin easier because the mass isn't moving very much.

mass moment of inertia is a 2nd rank tensor. vector is rank 1 and a scalar is rank 0. We express as a 3x3 matrix.

Bunch of formula for normal objects.

moment of inertia = matrix * angular access

Thursday, March 27, 2008

Safari 100% on Acid3

My latest Safari trunk is at 100 on the acid3 tests (+8)
Firefox is still at 71 (0).

Wednesday, March 26, 2008

Use the Force

Impulse Force : a non-continuous force. Happens in an instantaneous amount of time... infinitely small.
Body Force: is a force which occurs on an object over a non-instantaneous amount of time

Thursday, March 20, 2008

DPS912 Semaphores; Shared Memory: Message Ques

Semaphores

Have to do with synchronizing processes (threads have their own method of synch)
Sometimes you have to serialize the access to shared resources
Unix semaphores are known as system V Semaphores (as opposed to BSD Semaphores which are used in threads)

"protect a critical section" - any section of code which could have a race condition.

See "Critical section example from Les' notes

P - V: P = wait for resource ... V = signal when finished with resource

Shared Memory

normally different processes have completely different memory areas... but doing IPC is expensive and hard.... thus shared memory.

shared memory is much like semaphores... shared memory should use semaphores to serialize and synchronize.

Message Queues

Efficient and easy method of sending messages to unrelated processes

Message Queues, Shared Memory, and Semaphores all work similarly.

Wednesday, March 19, 2008

DPS906 Lecture March 19

displacement = velocity * time (if there is no acceleration over time)
displacement = velocity * time + 1/2accel*time*time

what we are missing is a justification for the velocity. We do not have a reason for velocity right now.

Causes of Motion
Kinetics

Mass - amount of matter OR amount of resistance to change in motion.
- stationary things are in motion, with a velocity of 0.
Mass is a scalar... no direction
Additive... if a thing is made out of different parts, you can simply add them together to get the mass of the whole thing.

Centroid is the geometric center of a 3d object. The centroid is the center of mass for objects with uniform density.

For objects that do not have uniform density the center of mass must be calculated.

To find the center of mass for a non-uniform dense object...
- pick some point as a reference (it doesn't matter where),
- From that reference point, create vectors to each of the centers of mass of the components.
- center of mass of whole = (m1*v1 + m2v2) / m1+m2

Newtons Laws
1) Every object in a state of uniform motion tends to remain in that state of motion unless an external force is applied to it.
2) The relationship between an object's mass m, its acceleration a, and the applied force F is F = ma. Acceleration and force are vectors (as indicated by their symbols being displayed in slant bold font); in this law the direction of the force vector is the same as the direction of the acceleration vector.
3) For every action there is an equal and opposite reaction.

force = mass * acceleration something

Tuesday, March 18, 2008

New Acid3 Tests


GOOD NEWS EVERYONE!


I just reran the Acid3 tests on my own personal builds of webkit and firefox. Improvements in both Webkit and Mozilla:)


Safari-Trunk: 92 (+2)
Firefox-Trunk: 71 (+2)

Keep up the good work guys:)

UPDATE: Safari has just released v3.1 which has 75 tests passed (+36 from previous version!)