Friday, April 12th, 2024
Two of man's basic needs are to love and to share. Both of these needs are satisfied in greater or lesser degree by friendship.
— Mother Angelica
Docker Desktop rants
I hate Docker Desktop + Dev Containers on Windows. There’s always some kind of error when I start a dev container. Well, sometimes you can fix it by restarting the machine once or twice. One particularly confusing problem I encountered seemed to be an issue where Docker Desktop would sometimes turn off WSL integration (e.g., when I run
wsl --shutdown
without stopping DD first), and upon the next restart VSC would try to connect to a container or volume that doesn’t exist (because DD is no longer using the WSL Docker socket). Sometimes I would accidentally create a container in Windows and not WSL, and it means I would after to turn off WSL integration to access the container. What a cursed piece of software.
ECS154A Lecture: muxes cont’d
- n-to-1 k-bit mux: a mux that turns -bit inputs into 1 -bit output (e.g., the above is a 2-to-1 1-bit mux)
Here’s a four to one mux
How do we convert it to a boolean expression?
Match each combination of s (select) bits with
The truth table is therefore:
0 | 0 | |
0 | 1 | |
1 | 0 | |
1 | 1 | |
For a k-bit mux with , the -th bit of each input has a dedicated mux to switch the input, so there will be muxes to make up the bigger mux. |
ECS154A Discussion: decoder, clock, PC
- static discipline: all digital electronics are analog electronics that obey a static discipline—there’s an expected range (thresholds) of voltage for high and low signals, so when an valid input voltage is given, a valid output voltage will result
AND gate?
A | B | Y |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
We can turn a mux with a programmable logic gate—we can make an ALU out of this.
- A, B, … (the select bits) as inputs
- , , … are hooked up to either ground or VCC (+5V)
decoder truth table
0 | 0 | 0 | 0 | 0 | 1 |
0 | 1 | 0 | 0 | 1 | 0 |
1 | 0 | 0 | 1 | 0 | 0 |
1 | 1 | 1 | 0 | 0 | 0 |
adder with register that adds on every clock cycle → 2-bit program counter!
- clocked: when clock is high, write to register
- propagation delay: determines how fast the circuit runs (from receiving input to spitting out an output)
- frequency of computer (CPU) = 1 / propagation delay
- need to make sure that cycle time is greater than propagation delay, so that the output of a circuit has time to stabilize before they are written.
- clock lives in a separate circuit
- hook the register A’s read port to decoder, and we’ve got some rotating flashing lights (in binary)
SOC001 Discussion: sociological imagination
- levels of analysis
- macro: large-scale processes/structures
- meso: between macro & micro (e.g., organizations)
- micro: smaller-scale
- agency: (micro) capacity of individuals to act and make choices freely
- social structure: (macro) stable relationships between groups that influence actors
- sociological imagination “enables us to grasp history and biography and the relations between the two in society” – C. Wright Mills
- helps us understand how the micro and macro interconnects—understand how some troubles may extend beyond the immediate social environment
- interpret recurring personal troubles as social issues that are formed by broader social structures
- History (societal history) and biography (personal history) cannot be understood independently of each other.
- history → broader social structures → immediate social environment → person
- social fact: ways of acting/thinking/feeling, external to the individual, but can coerce and control the individual, e.g., gender roles
- Social facts are around us and within us.
- around us: norms—people have expectations for those around them
- within us: we internalize such norms to regulate ourselves even without others observing us
- Social facts are around us and within us.
- social forces: a type of social fact
- not deterministic—individuals can still deviate from how the social forces guide us to act