Skip to content

Instantly share code, notes, and snippets.

function main[main]()
{
var curpf = getinterp()["packfile"];
var all_subs = curpf.all_subs();
for (var sub in all_subs)
say(sub);
all_subs[2]();
all_subs[3]();
}
@Whiteknight
Whiteknight / stdout
Created July 22, 2011 14:31
What the whiteknight/pbc_pbc branch can do
namespace Rosella {
class ObjectFactory;
class Version;
extern function alloc;
extern function build;
extern function construct;
extern function get_type_name;
extern function get_type_class;
extern function isa_type;
extern function find_named_method;
@Whiteknight
Whiteknight / console
Created July 23, 2011 16:07
Current behavior in whiteknight/imcc_tag branch
<parrot git:whiteknight/imcc_tag> ./parrot test.pir
a
Foo
Bar
b
Foo
c
Bar
@Whiteknight
Whiteknight / test.winxed
Created August 11, 2011 14:09
var(MemberExpr) Test
namespace Foo {
namespace Bar {
function baz() { say("Foo.Bar.baz!"); }
}
}
function main[main]() {
var(Foo.Bar.baz) ();
}
@Whiteknight
Whiteknight / timeline.md
Created September 6, 2011 18:25
General timeline of subsystem changes for Dukeleto

Dukeleto asked me to put together a general timeline or checklist of changes that we need to make to Parrot, organized by size and scope of the work, the effort required, and the relative ordering that (I think) is a pretty good way to go about it.

This isn't an "official" timeline or anything like that. It's just my own personal idea for what we should probably be doing, and how hard it will be to do. The items below are listed in a quasi-chronological order in the sense that, left to my own devices, I will probably approach these problems myself in this order. Other people are welcome to tackle things in any order, so

@Whiteknight
Whiteknight / test.pir
Created September 22, 2011 23:17
Winxed Error for NotFound
# THIS IS A GENERATED FILE! DO NOT EDIT!
# Begin generated code
.namespace [ ]
.sub 'main' :main
# Body
# {
.annotate 'file', 'test.winxed'
.annotate 'line', 3
@Whiteknight
Whiteknight / test.pir
Created October 27, 2011 17:46
updated code for nine
#!./parrot
.include "interpinfo.pasm"
.sub main :main
.local pmc task, sayer, name, starter, number
.local int i
sayer = get_global 'sayer'
starter = new ['Integer']
set_global 'starter', starter
N = 100000
SORT_TRANSITION = 6
FORWARD-SORTED (PRESORTED) BENCHMARKS
sort with .sort BUILTIN (reversed)
9.771104s - %100.000000
Number of items out of order: 0
sort with Rosella Query (reversed)
8.664588s - %88.675631 (-%11.324369 compared to base)
<parrot git:master> ./parrot test.pir
test_call_sig: 3.87282800674438s
test_get_context: 3.55188488960266s
<parrot git:master> ./parrot test.pir
test_call_sig: 4.13274502754211s
test_get_context: 3.56804704666138s
<parrot git:master> ./parrot test.pir
test_call_sig: 3.73126316070557s
@Whiteknight
Whiteknight / gist:1741304
Created February 5, 2012 00:12
Winxed syntax ideas for NotFound
Some ideas for new winxed syntax:
anonymous function foo(...){...} instead of
function foo(var x named 'bar')
same as:
function foo(var x [named("bar")])
foo(x named 'bar')
same as: