Closed wileym closed 9 years ago
@substack any ideas on this? works for me and I haven't seen any similar reports.
Could it be the difference between Unix/Windows EOL characters? That's just a guess. I'm working through 'learnyounode' at the moment, but when I get to stream-adventure I have access to a Windows computer with node and can play around a bit.
I have also this error...
stream-adventure.cmd run html_stream.js
seems to be good
stream-adventure.cmd verify html_stream.js
failed
I'm running on Win7 / Node 0.10.5
My html_stream.js
is below :
(function() {
'use strict';
var trumpet = require('trumpet'),
through = require('through');
var tr = trumpet();
var stream = tr.select('.loud').createStream();
stream.pipe(through(function write(buffer) {
this.queue(buffer.toString().toUpperCase());
})).pipe(stream);
process.stdin.pipe(tr).pipe(process.stdout);
})();
@moriame @wileym please reopen if this issue persists! :+1:
I had this issue as well, running stream-adventure on Windows 7 x64, and discovered that by making the 'through' callback = function(buf, _notUsed, next) { this.push(buf.toString().toUpperCase()); next(); } the .loud text got uppercased, and the following text was also streamed. Why this is different on Windows, I have no idea, but this is exactly why I'm a believer in genetic diversity among devs :-)
Running my version seemed to be producing valid results when using 'stream-adventure run'. When switching to 'stream-adventure verify' it reports an incorrect result, but all the expected result lines are null.
To check, I copied stream-adventure/problems/html_stream/solution.js, tried verify again, and had the same result.
I'm running Win7, node 0.10.18