Stanisław Barzowski
Stanisław Barzowski
Probably it's `-stdlib=libc++` that made the difference. We already have `-std=c++11` in our build files. And the `-I` stuff seems completely irrelevant and shouldn't change anything.
> Since std.extVar returns a string it's impossible to use float numbers as external variables. Not necessarily. You can do something like: 21x.jsonnet: ``` std.extVar('foo') * 21 ``` Command to...
That said, parseFloat would be a useful addition to stdlib.
Workaround: use `std.parseJson`, which can also parse a float as a special case: ``` $ ./jsonnet -e 'std.parseJson("3.14")' 3.1400000000000001 ```
The error is not ideal and should be fixed (it shouldn't just crash) and it should be fixed. That said, "x3.1" is not a valid float, so I don't see...
@eladsegal > std.parseJson("1.0") is parsed as 1 (int) instead of 1.0 (float). There's no separate int type in Jsonnet. A floating point number `1.0` is printed out as `1`. (That's...
@glenntrewitt Weel parseFloat wouldn't help you. It would still error out. Regexp support may come in the future. In the meantime you can validate "manually" which shouldn't be too hard...
That's great. Could you point me to where exactly? I wonder how difficult it would be to reproduce this behavior exactly in Go (and ideally specify it precisely enough to...
At this point, no. I think the blocker here is to specify when to use exponential (scientific notation). If should depend only on the number (in particular we don't want...
I agree that it looks weird. I'm not sure why it's like this. I checked that the go implementaion does the same thing.