NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception
# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
// A very simple example about how to use concurrent-safe SETs (using string as keys) in GO | |
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type Set struct { | |
m map[string]bool |
{ | |
"libs": [ | |
"browser", | |
"underscore", | |
"jquery" | |
], | |
"plugins": { | |
"node": {} | |
} | |
} |
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
const LIM = 41 | |
var facts [LIM]uint64 |
NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception
# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
std::vector<std::string> split(std::string text,std::string delim ) | |
{ | |
int index = 0, current = 0; | |
std::vector<std::string> strs; | |
while ((index = text.find_first_of(delim, current)) != std::string::npos) | |
{ | |
strs.push_back(text.substr(current, index - current)); | |
current = index + 1; | |
} |