The default yaml library in lua does not handle YAML booleans correctly.
/tmp ~ th
______ __ | Torch7
/_ __/__ ________/ / | Scientific computing for Lua.
/ / / _ \/ __/ __/ _ \ | Type ? for help
/_/ \___/_/ \__/_//_/ | https://github.com/torch
| http://torch.ch
th> yaml = require 'yaml'
[0.0016s]
th> a = yaml.load('foo: True')
[0.0001s]
th> b = yaml.load('foo: true')
[0.0001s]
th> type(a.foo)
string
[0.0000s]
th> type(b.foo)
boolean
[0.0000s]
th> Do you really want to exit ([y]/n)? y
By comparison, python handles this just fine:
12:29:49 | trinity
/tmp ~ ipy
WARNING: IPython History requires SQLite, your history will not be saved
Python 2.7.4 (default, Apr 19 2013, 14:18:01)
Type "copyright", "credits" or "license" for more information.
IPython 4.2.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import yaml
In [2]: a = yaml.load('foo: True')
In [3]: b = yaml.load('foo: true')
In [4]: type(a['foo'])
Out[4]: bool
In [5]: type(b['foo'])
Out[5]: bool