News for hackers. Stuff that matters.
Re:Long live the callbacks by nonchalance on Thursday August 22, 2013 @11:14AM (#6257621)
The last example doesn't seem to work on node 0.10.17:

      if (sieve[(x / 8) >>> 0] & (1 << (x % 8))) {
               ^
    TypeError: Cannot read property '0' of undefined
Re:Long live the callbacks by thedufer on Thursday August 22, 2013 @12:00PM (#6257951)
Nor in 0.8.23. I think the chaining of the constructor to .fill in `var sieve = new SB(len).fill(0xff, 0, len);` is the issue, because SlowBuffer::fill isn't supposed to have a return value.
Re:Long live the callbacks by trevnorris on Thursday August 22, 2013 @01:55PM (#6258753)
Ah yeah. I forgot that Buffer#fill() only returns "this" in master. I updated the example to fix this.
Re:Long live the callbacks by tonetheman on Thursday August 22, 2013 @11:52AM (#6257893)
think it might be because fill may not return a value, prob just need to call sieve.fill on a separate line after you declare it.