Hacker News new | past | comments | ask | show | jobs | submit login
Visualizing Concurrency in Go (divan.github.io)
258 points by pella on Jan 27, 2016 | hide | past | web | favorite | 18 comments



I 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.


I 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.


Thank you.


OP here. Thanks jerf. I wish we had tools for sharing visualizations from our heads as easy as posting to facebook. :)


Anyone 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.


I 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

[1]: https://en.wikipedia.org/wiki/Daniel_Tammet#Savantism

[2]: https://en.wikipedia.org/wiki/Fsn

[3]: https://github.com/docker/dockercraft


Thanks. 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.


This 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.


Thank 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.


Anyone who came to the comments without RTFA, I urge you to go have a look. The visualisations are brilliant.


Why not release the code, so the community can take a look and help you improve it?



Author explains why on the page. Search for "Basically, that is a reason why I’m not open-sourcing the code yet."


I 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.


As 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.


This is an incredible visualization and article.


Bookmarked. Thank you for creating this awesome resource.


Really fantastic post and work. Love it.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: