ChaiScript 6 Years Later

It’s been a little more than a year since our last update.



Template Code Bloat Revisited: A Smaller make_shared

Back in 2008 I wrote an article on template code bloat. In that article I concluded that the use of templates does not necessarily cause your binary code to bloat and may actually result in smaller code! This ended up becoming one of my more significant articles and has been referenced on wikipedia.



FizzBuzz in ChaiScript with Function Guards

I was recently reminded of the old FizzBuzz programming test and thought I would share a version of it for ChaiScript. ChaiScript has a possibly little used feature that allows you to execute a ‘guard’ or test before the function is executed, to see if it matches certain criteria. We can take advantage of this to generate rather readable version of FizzBuzz.



Adding std::future support to ChaiScript

Yesterday I decided to look into adding std::future support to ChaiScript. To be fair future is the return value of several other higher level threading constructs, so we don’t want just “std::future,” we want enough support to make it usable.



Complex Object Initialization Optimization with IIFE in C++11

IIFE (Immediately-Invoked Function Expression) is a common tool used in JavaScript. The idea is to both define an anonymous function and call it in the same expression. The point is to produce a local scope for variables so they do not pollute the global scope.



Make Sure You Provide Virtual Destructors

If you make use of inheritance, it’s likely that you need to provide a virtual destructor for your classes. Modern compilers will warn if you do not, but this is a pretty recent development.



ChaiScript (almost) 5 Years Later

July 13, 2009 Reddit covered Release 1.0 of ChaiScript. Many things changed in the last 5 years. Features added, dependencies removed, and performance increased. With all of the changes, we decided it was time to provide a 5 year retrospective and give the world a second first-look at ChaiScript.



Tech Roundup

I’ve been following a few different news sources lately and have found a few good articles and projects I thought I would share.



New ChaiScript Releases

We are proud to announce two new ChaiScript releases: ChaiScript 4.0.0



C++11: Auto

We’ve already covered C++11 decltype and why you should start using C++11 features today. Now we will move on to one of the most widely supported C++11 features: the new auto keyword.; auto is supported currently by g++ as of 4.4, clang and msvc since 10. So you are safe using it today if you don’t need to support any older compilers. The auto keyword is used to let the compiler determine the type of a variable. This seemingly simple concept can really help clean up your code in some situations. For example: