The result is some incredibly elegant code, especially considering what solutions might look like in languages that don't have sweet concurrency mechanisms like Go channels. Concurrent programming easy as bash pipes? BLAM!!
Fave quote:
// The implementation in four lines is a testament to the expressive// power of modeling programs as communicating sequential processes.func S36_Conway(cardfile, lineprinter chan []rune) {pipe1, pipe2 := make(chan rune), make(chan rune)go S33_DISASSEMBLE(cardfile, pipe1)go S32_SQUASH_EXT(pipe1, pipe2)S34_ASSEMBLE(pipe2, lineprinter)}
No comments:
Post a Comment