Week 31 - 2019
The weeknote for 7/29 - 8/4.
OSS
denoland/deno
🦕 Deno is a new JavaScript and TypeScript runtime.
- 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.
c3js/c3
📊 C3 is a chart library based on D3.
- https://github.com/c3js/c3/releases/tag/v0.7.3
- We released v0.7.3 of c3.js. It includes many bug fixes, thanks to @panthony!
Job
concurrent map write
testing
- I wrote a test case which intentionally invokes the
concurrent map write
panic 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.
Deploy
- Our robot
SQ-2
is 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
Event
ginzajs
https://ginzajs.connpass.com/event/136794/
- 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
Doc
format which prettier uses internally to represent the texts.