This file contains hidden or 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
use os; | |
task_b some_func { | |
os.sleep(5); # give task_a time to die. | |
some_func(); | |
} | |
task_a { | |
# | |
# Compile some_module.chimp, return a module object. |
This file contains hidden or 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 <vector> | |
#include <map> | |
#include <functional> | |
class some_arg_t { | |
public: | |
some_arg_t(const char *name) : name_(name) {}; | |
const char *name() const { return name_.c_str(); } |
This file contains hidden or 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
tom@laptop:~/Source/chimp$ g++ -o foo foo.cc | |
foo.cc: In function ‘int main(int, char**)’: | |
foo.cc:36:32: error: no match for ‘operator=’ in ‘f.std::map<_Key, _Tp, _Compare, _Alloc>::operator[]<std::basic_string<char>, std::unary_function<const some_arg_t&, int>, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, std::unary_function<const some_arg_t&, int> > > >((* & std::basic_string<char>(((const char*)"a"), (*(const std::allocator<char>*)(& std::allocator<char>()))))) = std::ptr_fun<some_arg_t, int>(do_a)’ | |
foo.cc:36:32: note: candidate is: | |
In file included from /usr/include/c++/4.7/string:50:0, | |
from /usr/include/c++/4.7/bits/locale_classes.h:42, | |
from /usr/include/c++/4.7/bits/ios_base.h:43, | |
from /usr/include/c++/4.7/ios:43, | |
from /usr/include/c++/4.7/ostream:40, | |
from /usr/include/c++/4.7/iostream:40, |
This file contains hidden or 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 <map> | |
#include <functional> | |
class some_arg_t { | |
public: | |
some_arg_t(const char *name) : name_(name) {}; | |
const char *name() const { return name_.c_str(); } |
This file contains hidden or 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
#define CHIMP_GC_MAKE_STACK_ROOT(p) \ | |
(*((ChimpRef **)alloca(sizeof(ChimpRef *)))) = (p) | |
/* http://github.com/thomaslee/chimp */ |
This file contains hidden or 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
#!/bin/bash | |
set -ex | |
git stash | |
trap "git stash pop" EXIT TERM | |
git rebase "$@" |
This file contains hidden or 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
1. Generate key pair and revocation certificate. | |
$ gpg --gen-key | |
$ gpg --output revoke.asc --gen-revoke <key-id> | |
2. Export ASCII copy of the key (often useful!) | |
$ gpg --export --armor <key-id> >pubkey.asc | |
3. Set new keyserver (default is busted on Linux Mint 12 -- others too?): e.g. hkp://stinkfoot.org |
This file contains hidden or 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
Notes from here: http://www.webupd8.org/2010/01/how-to-create-deb-package-ubuntu-debian.html | |
This assumes you're using autotools to build your project. | |
1. sudo apt-get install build-essential autoconf automake autotools-dev dh-make debhelper devscripts fakeroot xutils lintian pbuilder | |
2. We want a source folder with the pattern: <package>-<version> | |
$ cd ginvoke | |
$ git archive --format=tar --prefix=ginvoke-$(date +'%Y%m%d')/ master | tar xvf - -C .. |
This file contains hidden or 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 <stdarg.h> | |
#include <string.h> | |
#include <memory.h> | |
typedef struct _Module { | |
const char *name; | |
} Module; |
NewerOlder