7 Matching Annotations
  1. Oct 2021
    1. I still work throughout my house on my iPad Pro and occasionally my MacBook Pro, and as the weather begins to improve in the Chicago area, I'll start writing outside again. However, having a quiet home base where I can play some music and concentrate on writing is the anchor that helps keep me focused and productive all year long.

      大力推荐 iPad Pro 的使用。

    2. When I’ve got everything organized and in its place like I do now, that makes working in my workspace comfortable and low-stress. At the same time, I also love tearing the place up because that means I’m experimenting with hardware and taking photos, which are always a fun diversion from more ordinary tasks.

      总的来说他还是一个爱折腾的人,定期折腾一波,这一点很欣赏哈哈。

    3. Laid out in detail above, it feels like there's a lot going on in my tiny workspace, but although there's a lot of equipment, the setup is designed to stay out of the way. For example, switching to the iPad with an external display and storage only requires plugging in a single cable and pressing a couple of buttons. Most of the time, everything stays out of the way but is easily accessible for whatever kind of work I’m doing.

      他认为设备有些多,后续要精简一下。特别提到了 iPad 可能会起到较大作用。

  2. Jun 2020
    1. 比如“ 8 3 2 4 - + * ”这样一个表达式,我们按照上面的语法规则来处理,取出数字“8 3”和“-”运算符,计算得到 5,于是表达式就变成了“ 5 2 4 + * ”。然后,我们再取出“ 5 2 ”和“ + ”运算符,计算得到 7,表达式就变成了“ 7 4 * ”。最后,我们取出“ 7 4”和“ * ”运算符,最终得到的结果就是 28。

      语法规则的举例说明,非常好

    2. 书写者就可以根据语法规则来书写“句子”(专业点的叫法应该是“表达式”),阅读者根据语法规则来阅读“句子”,这样才能做到信息的正确传递。而我们要讲的解释器模式,其实就是用来实现根据语法规则解读“句子”的解释器。

      语法规则的意思。

  3. May 2020
    1. Go 语言并发模型中的 M 是操作系统线程。调度器最多可以创建 10000 个线程,但是其中大多数的线程都不会执行用户代码(可能陷入系统调用),最多只会有 GOMAXPROCS 个活跃线程能够正常运行。

      在大多数情况下,我们都会使用 Go 的默认设置,也就是线程数等于 CPU 个数,在这种情况下不会触发操作系统的线程调度和上下文切换,所有的调度都会发生在用户态,由 Go 语言调度器触发,能够减少非常多的额外开销。

    2. 虽然 Goroutine 在运行时中定义的状态非常多而且复杂,但是我们可以将这些不同的状态聚合成最终的三种:等待中、可运行、运行中,在运行期间我们会在这三种不同的状态来回切换:等待中:Goroutine 正在等待某些条件满足,例如:系统调用结束等,包括 _Gwaiting、_Gsyscall 和 _Gpreempted 几个状态;可运行:Goroutine 已经准备就绪,可以在线程运行,如果当前程序中有非常多的 Goroutine,每个 Goroutine 就可能会等待更多的时间,即 _Grunnable;运行中:Goroutine 正在某个线程上运行,即 _Grunning;

      https://share.getcloudapp.com/9ZuEZdpj Goroutine 有很多状态,这里着重说一下三种状态:等待中,可运行,运行中