These are chat archives for ChaiScript/ChaiScript

24th
Oct 2016
Jason Turner
@lefticus
Oct 24 2016 04:37
@roig You are right - I'm not properly applying the conversions when processing boolean conditions internally. There should probably be an issue opened on github for this. Would you mind opening one up?
In the meantime you should be able to do something like: if ( bool(this.e) ) { }
Daniel Guzman
@roig
Oct 24 2016 08:57
@lefticus done!
lucas-sarie
@lucas-sarie
Oct 24 2016 13:16

Hi, a little question : is there a quick(optimal) mean to create a vector with a X data of Y value, for the moment I have to do like this:

var pixelBuffer = VectorChar()
for(var i = 0; i < width * height * 3; ++i)
{
  pixelBuffer.push_back(char(0))
}

? It is a very slow solution... (VectorChar is m->add(chaiscript::bootstrap::standard_library::vector_type<std::vector<char>>("VectorChar"));)

Jason Turner
@lefticus
Oct 24 2016 21:43
@lucas-sarie I think, Ideally, we would add the (count, value) constructors (described here: http://en.cppreference.com/w/cpp/container/vector/vector) To the container_type function here: https://github.com/ChaiScript/ChaiScript/blob/develop/include/chaiscript/dispatchkit/bootstrap_stl.hpp#L331 You can do that and submit a pull request if you'd like, or you can submit a feature request on github. But I totally agree we should add them