27 Matching Annotations
  1. Jan 2021
    1. Buffers and TypedArrays

      Mozilla TypedArray document

      Uint8Array is a type of TypedArray

      and Buffer is an instance of Uint8Array

      Creating TypedArrays from Buffer with or without sharing same memory.

      Creating a Buffer from the TypedArrays with or without sharing the same memory

      In order to share memory we use

      1. Buffer.buffer, Buffer.byteOffset, Buffer.length / TypedArray.BYTES_PER_ELEMENT
      2. TypedArray.buffer, offset, length
  2. Apr 2020
  3. Dec 2019
    1. You have to create duplicate of the stream by piping it to two streams. You can create a simple stream with a PassThrough stream, it simply passes the input to the output.
  4. Sep 2019
  5. Jun 2019
  6. Apr 2019
  7. Nov 2018
  8. Oct 2018
  9. Sep 2018
    1. module.exports属性表示当前模块对外输出的接口,其他文件加载该模块,实际上就是读取module.exports变量。


      1. require 获得的是 module.export 对象;
      2. export === modue.export 指向同一块内存;export 是一个快捷方式,覆盖就没有意义;
      3. module.export 可以覆盖,这取决与需要暴露什么对象或方法;覆盖后 export 无效,因为 第 1 条;
  10. Jun 2018
    1. The next set of functions call app.use() to add the middleware libraries into the request handling chain

      This is how you'd add middlewares!

    2. Then we require() modules from our routes directory

      Routes are also a module. This 'module' is nothing more than a way to 'include' other file, so to speak in PHP terms. Its the ability to split code/functionality across multiple manageable files

  11. Apr 2018
  12. Nov 2017
  13. Jan 2016
  14. Jun 2015
    1. stream-adventure

      Some overlap with learnyounode and fewer instructions, I think this is one of the first ones that was created. Still nice to really dig into streams which are an important concept to understand.

    2. learnyounode

      This one's really well done, I recommend starting here if you already have some JS experience.

    3. Right now there's no good way (that I know of) to keep track of new workshoppers (the little interactive workshops that you can run on your own), so I occasionally check https://github.com/nodeschool/nodeschool.github.io (the code of the website) for commits.

  15. May 2015
  16. Jan 2014
    1. What are the some of the challenges that we are going to face in the next 5 years?

      Interesting analysis of Node.js's possible strengths.