When objects implement inspect
method but its not meant for inspection then problems might occur.
For example with rxjs
package:
> Rx = require("rxjs/Rx")
{ Subject: { [Function: Subject] create: [Function] },
Observable:
…
global | |
daemon | |
maxconn 256 | |
defaults | |
log global | |
maxconn 256 | |
mode http | |
option forwardfor | |
option http-server-close |
In Clojure (from Clojur Programming book, p94): | |
(defn random-ints | |
"Returns a lazy seq of random integers in the range [0,limit)." | |
[limit] | |
(lazy-seq | |
(cons (rand-int limit) | |
(random-ints limit)))) | |
(take 10 (random-ints 50)) |
var cluster = require("cluster"); | |
var blocked = require("blocked"); | |
var debug = require("debug"); | |
var workers; | |
if (cluster.isMaster) { | |
debug = debug("master-"+process.pid); | |
workers = {}; |
brew install zeromq | |
npm install debug blocked zmq | |
DEBUG=* node zmq-test.js |
$ node --expose-gc node_string_primitive_test.js | |
before var a mem_rss=11.9MB mem_heap_total=3.9MB mem_heap_used=2.1MB | |
typeof a string | |
before making array mem_rss=12.5MB mem_heap_total=5.9MB mem_heap_used=1.8MB | |
after making array mem_rss=12.6MB mem_heap_total=5.9MB mem_heap_used=1.9MB | |
after gc mem_rss=12.6MB mem_heap_total=5.9MB mem_heap_used=1.9MB |
function secure_rand(min, max) { | |
var rval = 0; | |
var range = max - min; | |
if (range < 2) { | |
return min; | |
} | |
var bits_needed = Math.ceil(Math.log2(range)); | |
if (bits_needed > 53) { | |
throw new Exception("We cannot generate numbers larger than 53 bits."); |
GET /live/smil:etv.smil/playlist.m3u8 HTTP/1.1 | |
Host: wowza4.err.ee | |
Accept-Encoding: gzip, deflate | |
Accept: */* | |
Accept-Language: en-us | |
Connection: keep-alive | |
User-Agent: ERR/1.3 CFNetwork/711.3.18 Darwin/14.0.0 | |
HTTP/1.1 200 OK |
2015/05/08 19:01:30 Input 'http-input': Listening on 127.0.0.1:1234 | |
2015/05/08 19:01:36 | |
:Timestamp: 2015-05-08 16:01:36.03994348 +0000 UTC | |
:Type: heka.httpdata.request | |
:Hostname: Erki-Mac.lan | |
:Pid: 83675 | |
:Uuid: 0ad67214-8f54-4793-8e33-ba1563071db7 | |
:Logger: http-input | |
:Payload: {"foo": "bar"} | |
:EnvVersion: 1 |
From article: | |
https://blog.brixit.nl/automating-letsencrypt-and-haproxy |
When objects implement inspect
method but its not meant for inspection then problems might occur.
For example with rxjs
package:
> Rx = require("rxjs/Rx")
{ Subject: { [Function: Subject] create: [Function] },
Observable:
…