5 ms·
Visualizing Concurrency in Go
- cschep 11y agoThis is really, really cool! Where did you get the idea? Would you see similar results if you visualized other concurrency systems? I suppose if they were also based on the ideas of CSP? Hmm. I'd love to see visualizations like this for GCD on iOS.
- divan 11y agoThank you. I was thinking about topic for my talk on Lviv Golang Meetup, and idea just popped in my head. But initially I thought there is an easy way to draw traces exists. Unfortunately, sharing visualizations is still a complex process, and in this particular case Go's grammar simplicity played a key role.
- shurcooL 11y agoThis is an incredible visualization and article.
- jonesb6 11y agoAnyone feel like these type of visualizations will be much more common in the future as we try to better understand software processes? It's really such a great way to demystify or reveal certain patterns in various algorithms.. Great work OP.
- cjhveal 11y agoI do think there's lots of room for growth in this space. Spatial/visual intuition is highly underused relative to linguistic intuition in software development. In visualization we often are limited by our own design to encoding information along three spatial dimensions, but we've got some incredible machinery in our brains for dealing with color, texture, shape, size, relative location. For instance, take the remarkable effectiveness of "memory palaces"[0], or savant Daniel Tammet's description of his synesthetic experience of numbers and arithmetic as operations on shapes and colors[1]. Some applied examples in software might be fsn[2] of "Jurassic Park" fame or the dockercraft[3] minecraft mod. Not trying to claim that visualization would improve our understanding of every system, but I would love to see more work done in this direction. [0]: https://en.wikipedia.org/wiki/Method_of_loci https://en.wikipedia.org/wiki/Method_of_loci [1]: https://en.wikipedia.org/wiki/Daniel_Tammet#Savantism https://en.wikipedia.org/wiki/Daniel_Tammet#Savantism [2]: https://en.wikipedia.org/wiki/Fsn https://en.wikipedia.org/wiki/Fsn [3]: https://github.com/docker/dockercraft https://github.com/docker/dockercraft
- divan 11y agoThanks. Totally agree. Look how quickly people switch to whiteboard when failed to explain some software design linguistically. We lack an easy tool for sharing our internal spatial representations with other people, and there is a lot of space to improve.
- mrcwinn 11y agoReally fantastic post and work. Love it.
- autoreleasepool 11y agoBookmarked. Thank you for creating this awesome resource.
- jerf 11y agoI just have to compliment the author on this, even this makes for sort of a vacuous HN comment, because it is that cool. I clicked through half-expecting "just another Go goroutine/channel tutorial", but this really is something very nice and unique, with a lot of effort put in.
- bogomipz 11y agoI was also anticipating "just another Go goroutine/channel tutorial" but this was special. Really nice. Kudos to person who did this! The visual reinforcements of software concepts is fantastic for learning or comparison aid whether it be algorithmic analysis, concurrency primitives etc. I would love to see more of this.
- divan 11y agoThank you.
- divan 11y agoOP here. Thanks jerf. I wish we had tools for sharing visualizations from our heads as easy as posting to facebook. :)
- beefsack 11y agoAnyone who came to the comments without RTFA, I urge you to go have a look. The visualisations are brilliant.
- cyphar 11y agoWhy not release the code, so the community can take a look and help you improve it?
- bumbledraven 11y agoAuthor explains why on the page. Search for "Basically, that is a reason why I’m not open-sourcing the code yet."
- cyphar 11y agoI read that. My point stands. "It uses horrible hacks" isn't a valid reason. Actually, I don't think there is a valid reason why not to release code that does something interesting and you want to show people.
- JohnDoe365 11y agoTake that: https://github.com/divan/blog/tree/master/static/talks/2016/lviv/vis_concurrency/js https://github.com/divan/blog/tree/master/static/talks/2016/...
- divan 11y agoAs it said, it works now only with simple code. Even for primesieve example I had to modify code, unroll loop and so on. The approach itself is limited, though it was enough for my task. I'll try another option (with Vyukov's tracer), which will be, hopefully, the right way to go. Will see.