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.
Feed aggregator
http://www.chaiscript.com/ ChaiScript, an ECMAScript-inspried scripting language for C++. I like the name. It sounds so Thai ahahahaha.
http://www.chaiscript.com/ ChaiScript, an ECMAScript-inspried scripting language for C++. I like the name. It sounds so Thai ahahahaha.
Categories: ChaiScript Updates
Revision 484: Add sync_cache to set_state code to fix logic flaw in resetting of state and mem
Changed Paths:
Modify /trunk/include/chaiscript/dispatchkit/dispatchkit.hpp
Add /trunk/src/memory_leak_test.cpp
Add sync_cache to set_state code to fix logic flaw in resetting of state and memory leak. #92
Modify /trunk/include/chaiscript/dispatchkit/dispatchkit.hpp
Add /trunk/src/memory_leak_test.cpp
Add sync_cache to set_state code to fix logic flaw in resetting of state and memory leak. #92
Categories: ChaiScript Updates
Update 4 to issue 91 ("Dot scope is shadowed by local variables")
tests added in r483, closing
Status: Fixed
Status: Fixed
Categories: ChaiScript Updates
Revision 483: Testing of memberscope so we can close #91
Changed Paths:
Add /trunk/unittests/memberscope.chai
Add /trunk/unittests/memberscope.txt
Testing of memberscope so we can close #91
Add /trunk/unittests/memberscope.chai
Add /trunk/unittests/memberscope.txt
Testing of memberscope so we can close #91
Categories: ChaiScript Updates
Update 1 to issue 93 ("Use cmake/cpack/ctest across all platforms")
Labels: -Priority-Medium Priority-High
Categories: ChaiScript Updates
Update 1 to issue 92 ("memory leak")
Labels: -Priority-Medium Priority-High
Categories: ChaiScript Updates
Issue 93 created: "Use cmake/cpack/ctest across all platforms"
See summary
Categories: ChaiScript Updates
Ok, tried chaiscript, however it takes too long to build in my opinion. I guess I will try python and see if that meets my standard
Ok, tried bchaiscript/b, however it takes too long to build in my opinion. I guess I will try python and see if that meets my standard
Categories: ChaiScript Updates
Corrected a bug last night in ChaiScript regarding and const return values from C registered functions !
Corrected a bug last night in ChaiScript regarding and const return values from C registered functions !
Categories: ChaiScript Updates
Corrected a bug last night in ChaiScript regarding and const return values from C registered functions !
Corrected a bug last night in ChaiScript regarding and const return values from C registered functions !
Categories: ChaiScript Updates
minnowcoder quick question: Would you ever allow vectors in chaiscript to hold functions? http://ur.ly/4117
minnowcoder quick question: Would you ever allow vectors in chaiscript to hold functions? http://ur.ly/4117
Categories: ChaiScript Updates
Issue 92 created: "memory leak"
What steps will reproduce the problem?
1. descritption in comments just above the main fuction of attached source
2.
3.
What is the expected output? What do you see instead?
memory usage raises to much under certain conditions. see description in
comments
What version of the product are you using? On what operating system?
ChaiScript: 2.3.2
on Windows7
Please provide any additional information below.
Source:
#include <iostream>
#include "ChaiScript/ChaiScript.hpp"
using namespace chaiscript;
std::string get_next_command() {
#ifdef READLINE_AVAILABLE
char *input_raw;
input_raw = readline("eval> ");
add_history(input_raw);
return std::string(input_raw);
#else
std::string retval;
std::cout << "eval> ";
std::getline(std::cin, retval);
return retval;
#endif
}
void fuction(void)
{
// do nothing
}
class test
{
ChaiScript chai;
ChaiScript::State backupState;
public:
test()
{
backupState = chai.get_state();
}
~test(){}
void ResetState()
{
chai.set_state(backupState);
chai.add(fun(&fuction),"Whatever()");
}
void RunFile(std::string sFile)
{
chaiscript::Boxed_Value val;
try {
chaiscript::Boxed_Value val = chai.eval_file(sFile);
}
catch (std::exception &e) {
std::cout << e.what() << std::endl;
}
}
};
int main(int argc, char *argv[]) {
test myChai;
std::string command = "";
//
// this loop increases memoryusage, if RunFile is not called (just hittin
enter)
// as soon RunFile gets called, memory will be freed.
//
// scenario1 - RunFile gets called every Loop: memoryusage does not change
// scenario2 - RunFile gets never called (just hitting enter): memoryusage
increases every loop
// scemarop3 - RunFile gets in changing intervals: memoryusage goes up and
down, but never as low as in case 1
scenario3 :
while(command != "quit")
{
for(int i = 1; i < 200; i++)
myChai.ResetState();
if(command == "runfile")
myChai.RunFile("Test.chai");
command = get_next_command();
}
}
Categories: ChaiScript Updates
Update 3 to issue 48 ("Automatic type conversion and second stage dispatch")
User request for this concept now... to be able to automatically up cast derived types
to their parents during dispatch.
Categories: ChaiScript Updates
Update 3 to issue 91 ("Dot scope is shadowed by local variables")
Still needs unit tests added before closing.
Categories: ChaiScript Updates
Update 2 to issue 91 ("Dot scope is shadowed by local variables")
Fixed in r482
Categories: ChaiScript Updates
Revision 482: No longer allow a local variable to be used as a function during dot notation su
Changed Paths:
Modify /trunk/include/chaiscript/language/chaiscript_eval.hpp
Delete /trunk/unittests/method_lambda.chai
Delete /trunk/unittests/method_lambda.txt
No longer allow a local variable to be used as a function during dot notation sugar lookup. It's far less confusing this way
Modify /trunk/include/chaiscript/language/chaiscript_eval.hpp
Delete /trunk/unittests/method_lambda.chai
Delete /trunk/unittests/method_lambda.txt
No longer allow a local variable to be used as a function during dot notation sugar lookup. It's far less confusing this way
Categories: ChaiScript Updates
Update 1 to issue 91 ("Dot scope is shadowed by local variables")
The problem is more fundamental than dot scope and has to do with the fact that there
is very little distinction between variables and functions in ChaiScript, since
this.x represents that there is a function calls 'x' that takes 1 parameter, and the
call this.x is translated into x(this), the system "get_object" call looks up "x" and
finds the highest scope, ie, the variable.
The most simple code that illustrates the problem is:
def x(i) { i + 4 }
var x
x = x(4)
The example is a bit contrived, but if it were to be fixed, then the this() problem
would be fixed as well. I'm not sure what the possible solution is yet.
Categories: ChaiScript Updates
Issue 91 created: "Dot scope is shadowed by local variables"
attr Vec::x
def Vec::Vec(x)
{
this.x = x; /// fail
}
attr Vec::x
def Vec::Vec(m_x)
{
this.x = m_x; /// succeed.
}
Categories: ChaiScript Updates
ChaiScript 2.3.2: Easy to use scripting for C++ http://twurl.nl/zoa180
ChaiScript 2.3.2: Easy to use scripting for C++ http://twurl.nl/zoa180
Categories: ChaiScript Updates
