Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created November 17, 2012 19:45
Show Gist options
  • Select an option

  • Save ELLIOTTCABLE/4099325 to your computer and use it in GitHub Desktop.

Select an option

Save ELLIOTTCABLE/4099325 to your computer and use it in GitHub Desktop.
> ./npaws.js 'infrastructure set() (locals) 2 foo bar; infrastructure inspect() ( infrastructure get() (locals) 2 )'
❲50❳root
❲50❳[]
|I I:'infrastructure' × I:'set' × I:() × I I:'locals' × × I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲50❳root × null
× exe: ❲50❳root, null, null
>> I, ❲50❳root
❲50❳[]
|I:'infrastructure' × I:'set' × I:() × I I:'locals' × × I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> I:'infrastructure', ❲50❳root
❲50❳[❲51❳locals]
|× I:'set' × I:() × I I:'locals' × × I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲38❳'infrastructure', ❲51❳locals]
|I:'set' × I:() × I I:'locals' × × I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲51❳locals × ❲38❳'infrastructure'
× thing: ❲51❳locals, ❲38❳'infrastructure', ❲50❳root
next(#167): ❲50❳root × ❲53❳infrastructure
× exe: ❲50❳root, ❲53❳infrastructure, null
>> I:'set', ❲50❳root
❲50❳[❲53❳infrastructure]
|× I:() × I I:'locals' × × I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲39❳'set', ❲53❳infrastructure]
|I:() × I I:'locals' × × I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲53❳infrastructure × ❲39❳'set'
× thing: ❲53❳infrastructure, ❲39❳'set', ❲50❳root
next(#167): ❲50❳root × ❲35❳´set´
× exe: ❲50❳root, ❲35❳´set´, null
>> I:(), ❲50❳root
❲50❳[❲35❳´set´]
|× I I:'locals' × × I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲50❳root, ❲35❳´set´]
|I I:'locals' × × I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲35❳´set´ × ❲50❳root
× exe: ❲35❳´set´, ❲50❳root, ❲50❳root
next(#167): ❲50❳root × ❲62❳´set.´
× exe: ❲50❳root, ❲62❳´set.´, null
>> I, ❲50❳root
❲50❳[❲62❳´set.´]
|I:'locals' × × I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> I:'locals', ❲50❳root
❲50❳[❲51❳locals, ❲62❳´set.´]
|× × I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲40❳'locals', ❲51❳locals, ❲62❳´set.´]
|× I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲51❳locals × ❲40❳'locals'
× thing: ❲51❳locals, ❲40❳'locals', ❲50❳root
next(#167): ❲50❳root × ❲51❳locals
× exe: ❲50❳root, ❲51❳locals, null
>> ×, ❲50❳root
❲50❳[❲51❳locals, ❲62❳´set.´]
|I:'2' × I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲62❳´set.´ × ❲51❳locals
× exe: ❲62❳´set.´, ❲51❳locals, ❲50❳root
next(#167): ❲50❳root × ❲66❳´set..´
× exe: ❲50❳root, ❲66❳´set..´, null
>> I:'2', ❲50❳root
❲50❳[❲66❳´set..´]
|× I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲41❳'2', ❲66❳´set..´]
|I:'foo' × I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲66❳´set..´ × ❲41❳'2'
× exe: ❲66❳´set..´, ❲41❳'2', ❲50❳root
next(#167): ❲50❳root × ❲70❳´set...´
× exe: ❲50❳root, ❲70❳´set...´, null
>> I:'foo', ❲50❳root
❲50❳[❲70❳´set...´]
|× I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲42❳'foo', ❲70❳´set...´]
|I:'bar' × I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲70❳´set...´ × ❲42❳'foo'
× exe: ❲70❳´set...´, ❲42❳'foo', ❲50❳root
next(#167): ❲50❳root × ❲74❳´set....´
× exe: ❲50❳root, ❲74❳´set....´, null
>> I:'bar', ❲50❳root
❲50❳[❲74❳´set....´]
|× I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲43❳'bar', ❲74❳´set....´]
|I I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲74❳´set....´ × ❲43❳'bar'
× exe: ❲74❳´set....´, ❲43❳'bar', ❲50❳root
next(#167): ❲50❳root × null
× exe: ❲50❳root, null, null
>> I, ❲50❳root
❲50❳[❲undefined❳[object global]]
|I:'infrastructure' × I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> I:'infrastructure', ❲50❳root
❲50❳[❲51❳locals, ❲undefined❳[object global]]
|× I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲44❳'infrastructure', ❲51❳locals, ❲undefined❳[object global]]
|I:'inspect' × I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲51❳locals × ❲44❳'infrastructure'
× thing: ❲51❳locals, ❲44❳'infrastructure', ❲50❳root
next(#167): ❲50❳root × ❲53❳infrastructure
× exe: ❲50❳root, ❲53❳infrastructure, null
>> I:'inspect', ❲50❳root
❲50❳[❲53❳infrastructure, ❲undefined❳[object global]]
|× I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲45❳'inspect', ❲53❳infrastructure, ❲undefined❳[object global]]
|I:() × I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲53❳infrastructure × ❲45❳'inspect'
× thing: ❲53❳infrastructure, ❲45❳'inspect', ❲50❳root
next(#167): ❲50❳root × ❲23❳´inspect´
× exe: ❲50❳root, ❲23❳´inspect´, null
>> I:(), ❲50❳root
❲50❳[❲23❳´inspect´, ❲undefined❳[object global]]
|× I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲50❳root, ❲23❳´inspect´, ❲undefined❳[object global]]
|I I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲23❳´inspect´ × ❲50❳root
× exe: ❲23❳´inspect´, ❲50❳root, ❲50❳root
next(#167): ❲50❳root × ❲78❳´inspect.´
× exe: ❲50❳root, ❲78❳´inspect.´, null
>> I, ❲50❳root
❲50❳[❲78❳´inspect.´, ❲undefined❳[object global]]
|I:'infrastructure' × I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> I:'infrastructure', ❲50❳root
❲50❳[❲51❳locals, ❲78❳´inspect.´, ❲undefined❳[object global]]
|× I:'get' × I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲46❳'infrastructure', ❲51❳locals, ❲78❳´inspect.´, ❲undefined❳[object global]]
|I:'get' × I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲51❳locals × ❲46❳'infrastructure'
× thing: ❲51❳locals, ❲46❳'infrastructure', ❲50❳root
next(#167): ❲50❳root × ❲53❳infrastructure
× exe: ❲50❳root, ❲53❳infrastructure, null
>> I:'get', ❲50❳root
❲50❳[❲53❳infrastructure, ❲78❳´inspect.´, ❲undefined❳[object global]]
|× I:() × I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲47❳'get', ❲53❳infrastructure, ❲78❳´inspect.´, ❲undefined❳[object global]]
|I:() × I I:'locals' × × I:'2' × ×|
next(#167): ❲53❳infrastructure × ❲47❳'get'
× thing: ❲53❳infrastructure, ❲47❳'get', ❲50❳root
next(#167): ❲50❳root × ❲31❳´get´
× exe: ❲50❳root, ❲31❳´get´, null
>> I:(), ❲50❳root
❲50❳[❲31❳´get´, ❲78❳´inspect.´, ❲undefined❳[object global]]
|× I I:'locals' × × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲50❳root, ❲31❳´get´, ❲78❳´inspect.´, ❲undefined❳[object global]]
|I I:'locals' × × I:'2' × ×|
next(#167): ❲31❳´get´ × ❲50❳root
× exe: ❲31❳´get´, ❲50❳root, ❲50❳root
next(#167): ❲50❳root × ❲82❳´get.´
× exe: ❲50❳root, ❲82❳´get.´, null
>> I, ❲50❳root
❲50❳[❲82❳´get.´, ❲78❳´inspect.´, ❲undefined❳[object global]]
|I:'locals' × × I:'2' × ×|
>> I:'locals', ❲50❳root
❲50❳[❲51❳locals, ❲82❳´get.´, ❲78❳´inspect.´, ❲undefined❳[object global]]
|× × I:'2' × ×|
>> ×, ❲50❳root
❲50❳[❲48❳'locals', ❲51❳locals, ❲82❳´get.´, ❲78❳´inspect.´, ❲undefined❳[object global]]
|× I:'2' × ×|
next(#167): ❲51❳locals × ❲48❳'locals'
× thing: ❲51❳locals, ❲48❳'locals', ❲50❳root
next(#167): ❲50❳root × ❲51❳locals
× exe: ❲50❳root, ❲51❳locals, null
>> ×, ❲50❳root
❲50❳[❲51❳locals, ❲82❳´get.´, ❲78❳´inspect.´, ❲undefined❳[object global]]
|I:'2' × ×|
next(#167): ❲82❳´get.´ × ❲51❳locals
× exe: ❲82❳´get.´, ❲51❳locals, ❲50❳root
next(#167): ❲50❳root × ❲86❳´get..´
× exe: ❲50❳root, ❲86❳´get..´, null
>> I:'2', ❲50❳root
❲50❳[❲86❳´get..´, ❲78❳´inspect.´, ❲undefined❳[object global]]
|× ×|
>> ×, ❲50❳root
❲50❳[❲49❳'2', ❲86❳´get..´, ❲78❳´inspect.´, ❲undefined❳[object global]]
|×|
next(#167): ❲86❳´get..´ × ❲49❳'2'
× exe: ❲86❳´get..´, ❲49❳'2', ❲50❳root
next(#167): ❲50❳root × ❲43❳'bar'
× exe: ❲50❳root, ❲43❳'bar', null
>> ×, ❲50❳root
❲50❳[❲43❳'bar', ❲78❳´inspect.´, ❲undefined❳[object global]]
||
next(#167): ❲78❳´inspect.´ × ❲43❳'bar'
× exe: ❲78❳´inspect.´, ❲43❳'bar', ❲50❳root
'bar'
❲43❳'bar'
next(#167): ❲50❳root × null
× exe: ❲50❳root, null, null
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment