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 <stdio.h> | |
#include <stdlib.h> | |
#include "lua5.1/lua.h" | |
#include "lua5.1/lauxlib.h" | |
#include "lua5.1/lualib.h" | |
// Measuring lua vm memory usage. | |
// build: gcc main.c -llua5.1 -lm -ldl -fPIC | |
static size_t mem_used = 0; |
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
static void LearnCompoundExpression() { | |
scoped_ptr<CompoundExpression> tuple(new CompoundExpression()); | |
tuple->AddAs("from", ConstString("Supersonic: ")); | |
tuple->AddAs("say", | |
If(Less(ConstInt32(28), ConstInt32(29)), | |
ConstString("Hello"), | |
ConstString("World"))); | |
tuple->AddAs("comma", ConstString(",")); | |
tuple->AddAs("new", Plus(ConstInt32(2012), ConstInt32(1))); | |
scoped_ptr<Operation> compute(Compute(tuple.release(), Generate(10))); |
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
all: | |
gcc -O2 -fpic -c -o symbol.o symbol.c | |
gcc -O -shared -fpic -o symbol.so symbol.o |
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
cd c:\ | |
mkdir dart_bleeding | |
svn co http://gyp.googlecode.com/svn/trunk build/gyp | |
mkdir dart-repo | |
set Path=%PATH%;c:\dart_bleeding\build\gyp\ | |
git svn clone -rHEAD "https://dart.googlecode.com/svn/branches/bleeding_edge/dart" dart | |
gclient config "https://dart.googlecode.com/svn/branches/bleeding_edge/deps/all.deps" | |
cd dart | |
gclient sync | |
gclient runhooks |
NewerOlder