About ChaiScript

ChaiScript is the first and only scripting language designed from the ground up with C++ compatibility in mind. It is an ECMAScript-inspired, embedded functional-like language.

ChaiScript is licensed under the BSD license.

Download

Version: 2.3.3 Released: 5/15/2010

Source
Windows
Linux

Issues Updates

Syndicate content
Updated: 24 min 32 sec ago

Update 3 to issue 96 ("Exception on the end of functor call")

Fri, 07/23/2010 - 16:22
Fixed by #96
Status: Fixed
Categories: ChaiScript Updates

Update 3 to issue 95 ("Crash in chaiscript when adding a shared_ptr<> var")

Fri, 07/23/2010 - 14:03
The issue had nothing to do with shared_ptr and everything to do with adding objects to the runtime from threads.
Status: Fixed
Categories: ChaiScript Updates

Update 2 to issue 95 ("Crash in chaiscript when adding a shared_ptr<> var")

Fri, 07/23/2010 - 14:02
Fixed in r509. Note that you have a typo in your chaiscript: you are attempting to access the member variable srcAeTitle which is not exposed to the chaiscript engine. You will see the exception for that problem after trying latest svn.
Categories: ChaiScript Updates

Update 1 to issue 95 ("Crash in chaiscript when adding a shared_ptr<> var")

Thu, 07/22/2010 - 20:12
similar to issue 96, here is the sample app that shows crash (again originally noticed on windows VS2008 but app recreated and tested on linux)
Categories: ChaiScript Updates

Update 2 to issue 96 ("Exception on the end of functor call")

Thu, 07/22/2010 - 20:00
ok i'm attaching sample app that shows same exception this time i tested it on linux with same version of chaiscript (2.3.3) different version of boost (1.42) [originally problem appeared on windows Visual Studio 2008 with boost 1.43 i tried to simulate original flow as much as i could.
Categories: ChaiScript Updates

Update 1 to issue 96 ("Exception on the end of functor call")

Thu, 07/22/2010 - 19:43
im trying to prepare example app that will show this issue hopefully. in meantime info that this is with VisualStudio 2008
Categories: ChaiScript Updates

Issue 96 created: "Exception on the end of functor call"

Thu, 07/22/2010 - 12:50
OK having that previous problem with variables I tryed to implement my function via functor call. (so whole script is 1 function) fun(meta,dicom) { print(meta.srcAeTitle); } ProcessDES now looks like this boost::call_once(&g_chaiInit,g_chaiInitOnce); g_chai.functor<void(DcDirMetaInfo_ptr,DcElemList_ptr)>(des)(pMetaInfo,pElemList); however I'm getting an exception/error when running this (at least its not a crash) Unable to pop global stack any idea why ?? functor gets executed correctly, it happens somewhere on cleanup.
Categories: ChaiScript Updates

Issue 95 created: "Crash in chaiscript when adding a shared_ptr<> var"

Thu, 07/22/2010 - 12:49
I'm getting crash when trying to add a shared_ptr<> variable (first variable) to the chaiscript. it seems like its accessing non exisiting index or element. void add_object(const std::string &name, const Boxed_Value &obj) { StackData &stack = get_stack_data(); validate_object_name(name); stack.get<0>().erase(name); stack.get<1>().back()[name] = obj; } it happens on last line of this method. this is the setup (processDES can be called from multiple threads ) static chaiscript::ChaiScript g_chai; static boost::once_flag g_chaiInitOnce = BOOST_ONCE_INIT; void g_chaiInit() { g_chai.add(chaiscript::fun(&parseHex),"hex"); g_chai.add(chaiscript::fun(&getTagValue),"getTag"); g_chai.add(chaiscript::fun(&setTagValue),"setTag"); } void processDES(DcDirMetaInfo_ptr pMetaInfo,DcElemList_ptr pElemList,const string& des) { boost::call_once(&g_chaiInit,g_chaiInitOnce); g_chai.add(chaiscript::var(pElemList),"dicom"); // This is the call that crashes in add_object g_chai.add(chaiscript::var(pMetaInfo),"meta"); g_chai.eval(des); } any ideas ?
Categories: ChaiScript Updates