Skip to content

Instantly share code, notes, and snippets.

View KamilaBorowska's full-sized avatar

Kamila Borowska KamilaBorowska

View GitHub Profile
@KamilaBorowska
KamilaBorowska / example.cpp
Last active December 25, 2015 18:39 — forked from ridiculousfish/gist:7017899
Some fun with creduce
#include <string>
struct A {
std::string text;
int val;
};
struct B {
int val;
int padding[];
};
struct C {
@KamilaBorowska
KamilaBorowska / Prev.pm6
Created September 16, 2013 20:35 — forked from jnthn/Prev.pm6
my Mu $prev;
sub term:<prev>() is export { $prev }
my $comp := nqp::getcomp('perl6');
$comp.HOW.add_method($comp, 'autoprint', method (Mu \value) {
$prev := value;
self.interactive_result(value)
unless nqp::tellfh(nqp::getstdout()) > $*AUTOPRINTPOS;
});
$comp.HOW.compose($comp);