Week 31 - 2019
The weeknote for 7/29 - 8/4. You can edit this page (on github) if you find any error.
- This week I haven't contributed code. Instead I've been writing an chapter for
a private book Denobook Volume 2, which we,
deno_ja, going to publish on 22 Sep.
- I'm going to write 2 chapters: One for beginners and one for new contributors.
📊 C3 is a chart library based on D3.
- We released v0.7.3 of c3.js. It includes many bug fixes, thanks to @panthony!
concurrent map write testing
- I wrote a test case which intentionally invokes the
concurrent map writepanic in golang. The error didn't happen such frequently, and actually I had never seen that error in actual use cases, but one of colleagues reported he had observed the error before. When I wrote a test case with very highly concurrent goroutines, it finally reproduced the error and I could fix it by adding appropriate read and write locks around that map. The reason why the error didn't happen frequently is very difficult to explain. The map write process is first serialized by a channel, and then that process invokes another goroutine and actual write happned there. So the writing to the map was "mostly" serialized, but not strictly serialized because of additional goroutine calls.
channel -> 1) some process -> another goroutine -> 2) map write (!)
If it writes to map in 1), then this panic didn't happen. However it actually invoked another goroutine, and then it breaks the serialization of the writing to the map.
- Our robot
SQ-2is now deployed in a building and working among people. It's now shared in SNS.
オフィスビルの中にRobot発見！！ 🤖 pic.twitter.com/KMmoIVqGgM— masaki.kumamoto (@MasakiKumamoto) July 26, 2019
- Went to the 3rd of ginzajs. @yamatatsu talked about covariance and
contravariance of generic types in TypeScript. @sosukesuzuki, a contributor to
prettier, talked about how prettier works. I was interested in the
Docformat which prettier uses internally to represent the texts.
See any mistakes? Please fix!