Clojure

Guowei

2 minute read

Let’s take another look at the assembly line diagram now. If you pay close attention at each of the workers and observe how they work, you will probably find the 3 workers at the beginning of the assembly line to be a bit … not that smart. All of them only one type of part, either wheels or bodies. If the body worker takes a wheel, he will just abandon it and keep taking new parts until he gets a body.

Toy Factory Simulation Using core.async (5)

Closing Shop (Stopping Processes)

Guowei

3 minute read

We need a way to stop the whole assembly line after 10 toy cars have been put in the truck. But before that, we need to understand more about chan. Channels are created open Close a channel with close! You can call close! to close a channel. Once a channel is closed, it can never be reopened. Put (>!) on a closed channel returns false. Get (<!) from a closed channel returns nil.

Guowei Lv

2 minute read

One way to boost productivity in traditional factories is to use assembly line. From Wikipedia: An assembly line is a manufacturing process (often called a progressive assembly) in which parts (usually interchangeable parts) are added as the semi-finished assembly moves from workstation to workstation where the parts are added in sequence until the final assembly is produced. By mechanically moving the parts to the assembly work and moving the semi-finished assembly from work station to work station, a finished product can be assembled faster and with less labor than by having workers carry parts to a stationary piece for assembly.