Permalink
Browse files

:%s/sys.puts/console.log/g

and there was much rejoicing
  • Loading branch information...
1 parent 4c21aa7 commit ba792ea2020f38ebf84925e740b42823b739d0d3 @ry ry committed Jun 24, 2010
Showing with 352 additions and 396 deletions.
  1. +6 −6 benchmark/http_simple.js
  2. +2 −2 benchmark/run.js
  3. +2 −4 bin/node-repl
  4. +101 −149 doc/api.markdown
  5. +2 −3 doc/index.html
  6. +8 −1 src/node.js
  7. +2 −2 test/disabled/test-cat.js
  8. +2 −2 test/disabled/test-dns.js
  9. +3 −3 test/disabled/test-eio-race3.js
  10. +2 −2 test/disabled/test-http-big-proxy-responses.js
  11. +2 −2 test/disabled/test-http-head-request.js
  12. +1 −1 test/disabled/test-http-stress.js
  13. +1 −1 test/disabled/test-remote-module-loading.js
  14. +5 −5 test/disabled/tls_client.js
  15. +2 −2 test/disabled/tls_server.js
  16. +1 −1 test/fixtures/b/c.js
  17. +1 −1 test/fixtures/child_process_should_emit_error.js
  18. +1 −1 test/fixtures/cycles/folder/foo.js
  19. +1 −1 test/fixtures/cycles/root.js
  20. +1 −1 test/fixtures/exit.js
  21. +1 −1 test/fixtures/print-10-lines.js
  22. +1 −1 test/message/2100bytes.js
  23. +1 −1 test/message/hello_world.js
  24. +5 −5 test/message/undefined_reference_in_new_context.out
  25. +1 −1 test/pummel/test-child-process-spawn-loop.js
  26. +3 −3 test/pummel/test-http-client-reconnect-bug.js
  27. +3 −3 test/pummel/test-keep-alive.js
  28. +3 −3 test/pummel/test-net-many-clients.js
  29. +4 −4 test/pummel/test-net-pause.js
  30. +6 −6 test/pummel/test-net-pingpong-delay.js
  31. +3 −3 test/pummel/test-net-pingpong.js
  32. +5 −5 test/pummel/test-net-throttle.js
  33. +9 −9 test/pummel/test-net-timeout.js
  34. +3 −3 test/pummel/test-net-tls.js
  35. +2 −2 test/pummel/test-timers.js
  36. +2 −2 test/pummel/test-watch-file.js
  37. +3 −3 test/simple/test-buffer.js
  38. +2 −2 test/simple/test-child-process-buffering.js
  39. +8 −8 test/simple/test-child-process-custom-fds.js
  40. +1 −1 test/simple/test-child-process-env.js
  41. +3 −3 test/simple/test-child-process-ipc.js
  42. +2 −2 test/simple/test-child-process-stdin.js
  43. +3 −3 test/simple/test-child-process-stdout-flush.js
  44. +1 −1 test/simple/test-crypto.js
  45. +6 −6 test/simple/test-dgram-pingpong.js
  46. +5 −5 test/simple/test-eio-race.js
  47. +3 −3 test/simple/test-eio-race2.js
  48. +1 −1 test/simple/test-eio-race4.js
  49. +1 −1 test/simple/test-error-reporting.js
  50. +3 −3 test/simple/test-event-emitter-add-listeners.js
  51. +3 −3 test/simple/test-event-emitter-remove-listeners.js
  52. +3 −3 test/simple/test-exception-handler.js
  53. +6 −6 test/simple/test-exec.js
  54. +2 −2 test/simple/test-executable-path.js
  55. +1 −1 test/simple/test-file-read-noexist.js
  56. +1 −1 test/simple/test-fs-chmod.js
  57. +1 −1 test/simple/test-fs-read-buffer.js
  58. +1 −1 test/simple/test-fs-read.js
  59. +1 −1 test/simple/test-fs-readfile-empty.js
  60. +1 −1 test/simple/test-fs-realpath.js
  61. +8 −8 test/simple/test-fs-stat.js
  62. +2 −2 test/simple/test-fs-symlink.js
  63. +4 −4 test/simple/test-fs-write.js
  64. +1 −1 test/simple/test-http-1.0.js
  65. +1 −1 test/simple/test-http-304.js
  66. +4 −4 test/simple/test-http-cat.js
  67. +2 −2 test/simple/test-http-chunked.js
  68. +3 −3 test/simple/test-http-client-upload.js
  69. +2 −2 test/simple/test-http-exceptions.js
  70. +4 −4 test/simple/test-http-full-response.js
  71. +1 −1 test/simple/test-http-malformed-request.js
  72. +4 −4 test/simple/test-http-parser.js
  73. +3 −3 test/simple/test-http-set-timeout.js
  74. +2 −2 test/simple/test-http-tls.js
  75. +3 −3 test/simple/test-http-wget.js
  76. +1 −1 test/simple/test-http-write-empty-string.js
  77. +1 −1 test/simple/test-memory-usage.js
  78. +5 −5 test/simple/test-mkdir-rmdir.js
  79. +1 −1 test/simple/test-module-loading.js
  80. +3 −3 test/simple/test-net-binary.js
  81. +7 −7 test/simple/test-net-pingpong.js
  82. +5 −5 test/simple/test-net-reconnect.js
  83. +1 −1 test/simple/test-net-tls.js
  84. +3 −3 test/simple/test-next-tick-ordering.js
  85. +4 −4 test/simple/test-readdir.js
  86. +2 −2 test/simple/test-regression-object-prototype.js
  87. +4 −4 test/simple/test-signal-handler.js
  88. +3 −3 test/simple/test-signal-unregister.js
  89. +2 −2 test/simple/test-stdin-from-file.js
  90. +4 −4 test/simple/test-stdout-to-file.js
  91. +1 −1 test/simple/test-string-decoder.js
  92. +1 −1 test/simple/test-utf8-scripts.js
@@ -3,14 +3,14 @@ Buffer = require("buffer").Buffer;
port = parseInt(process.env.PORT || 8000);
-var puts = require("sys").puts;
+var console.log = require("sys").console.log;
var old = (process.argv[2] == 'old');
-puts('pid ' + process.pid);
+console.log('pid ' + process.pid);
http = require(old ? "http_old" : 'http');
-if (old) puts('old version');
+if (old) console.log('old version');
fixed = ""
for (var i = 0; i < 20*1024; i++) {
@@ -32,7 +32,7 @@ http.createServer(function (req, res) {
if (n <= 0)
throw "bytes called with n <= 0"
if (stored[n] === undefined) {
- puts("create stored[n]");
+ console.log("create stored[n]");
stored[n] = "";
for (var i = 0; i < n; i++) {
stored[n] += "C"
@@ -44,7 +44,7 @@ http.createServer(function (req, res) {
var n = parseInt(arg, 10)
if (n <= 0) throw new Error("bytes called with n <= 0");
if (storedBuffer[n] === undefined) {
- puts("create storedBuffer[n]");
+ console.log("create storedBuffer[n]");
storedBuffer[n] = new Buffer(n);
for (var i = 0; i < n; i++) {
storedBuffer[n][i] = "C".charCodeAt(0);
@@ -79,4 +79,4 @@ http.createServer(function (req, res) {
}
}).listen(port);
-puts('Listening at http://127.0.0.1:'+port+'/');
+console.log('Listening at http://127.0.0.1:'+port+'/');
View
@@ -22,9 +22,9 @@ function runNext (i) {
sys.print(benchmarks[i] + ": ");
exec(benchmarks[i], function (elapsed, code) {
if (code != 0) {
- sys.puts("ERROR ");
+ console.log("ERROR ");
}
- sys.puts(elapsed);
+ console.log(elapsed);
runNext(i+1);
});
};
View
@@ -1,9 +1,7 @@
#!/usr/bin/env node
-var puts = require("sys").puts;
-
-puts("Type '.help' for options.");
-puts("(The REPL can also be started by typing 'node' without arguments)");
+console.log("Type '.help' for options.");
+console.log("(The REPL can also be started by typing 'node' without arguments)");
require('repl').start();
Oops, something went wrong.

0 comments on commit ba792ea

Please sign in to comment.