This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ChaiScript has its own simple object model and works well with object | |
// oriented C++ | |
// There is no difference between a function and a method, it's just syntactic sugar | |
var s = "mystring".size() // returns 8 | |
var s2 = size("mystring") // returns 8 | |
// class syntax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <memory> | |
#include <vector> | |
#include <algorithm> | |
#include <type_traits> | |
template< class ... > using void_t = void; | |
template< class T , class = void > | |
struct is_dereferenceable : std::false_type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chaiscript/chaiscript.hpp> | |
#include <chaiscript/chaiscript_stdlib.hpp> | |
std::string helloWorld(const std::string &t_name) | |
{ | |
return "Hello " + t_name + "!"; | |
} | |
int main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ChaiScript's primary error handling is exceptions, just like C++, and uses C++ | |
// exceptions internally. This means that exceptions can be shared / passed / handled | |
// between ChaiScript and C++ | |
// catching chaiscript errors inside of chaiscript | |
try { | |
eval("BLARG") | |
} catch (e) { | |
print("Error while processing eval statement")) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone git://gcc.gnu.org/git/gcc.git | |
mkdir gcc_build | |
cd gcc_build | |
../gcc/configure --disable-bootstrap --disable-werror --disable-multilib --enable-languages=c,c++ --prefix=/usr/local | |
make -j3 | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'fileutils' | |
if ARGV.length < 4 | |
puts "Usage: #{__FILE__} <buildfolder> [options] <testruntrueorfalse> <githubtoken> <repositoryname> (<repositoryname> ...)" | |
abort("Not enough arguments") | |
end | |
puts "starting CI system" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chaiscript/chaiscript.hpp> | |
std::string helloWorld(const std::string &t_name) { | |
return "Hello " + t_name + "!"; | |
} | |
int main() { | |
chaiscript::ChaiScript chai; | |
chai.add(chaiscript::fun(&helloWorld), "helloWorld"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" An example for a vimrc file. | |
" | |
" Maintainer: Bram Moolenaar <Bram@vim.org> | |
" Last change: 2008 Jul 02 | |
" | |
" To use it, copy it to | |
" for Unix and OS/2: ~/.vimrc | |
" for Amiga: s:.vimrc | |
" for MS-DOS and Win32: $VIM\_vimrc | |
" for OpenVMS: sys$login:.vimrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <iostream> | |
std::string to_string(const int i) | |
{ | |
std::stringstream ss; | |
ss << i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chaiscript/chaiscript.hpp> | |
#include <chaiscript/chaiscript_stdlib.hpp> | |
class BaseClass | |
{ | |
public: | |
BaseClass() | |
{ | |
} |