Skip to content

Instantly share code, notes, and snippets.

View Benabik's full-sized avatar

Brian Gernhardt Benabik

View GitHub Profile
@Benabik
Benabik / gist:2599989
Created May 5, 2012 05:18
PACT assembly musings
# line comments
# must start with a pact directive giving type and version
.pact pbc 0
# enable compiler options
# 2 reasons:
# 1) to allow an extremely basic version to be turned into a C implementation
# 2) to allow experimentation. Most common options probably on by default in
# higher versions
@Benabik
Benabik / gist:2500370
Created April 26, 2012 15:28
GSoC Proposal: 6model Integration

6model Integration

Short Description

6model is the object model created for Rakudo Perl 6 and the newest iteration of the NQP lanugage. It appears to be more flexible than the PMC object model. This project is an attempt to integrate 6model into the core of Parrot.

Project Description

@Benabik
Benabik / dyn_lex.pir
Created April 25, 2012 15:38
Dynamic Lexicals in PIR
.sub 'main' :main
.local pmc lex
.lex 'dynlex', lex
lex = new 'FixedStringArray', 2
lex[0] = 'main'
'test'()
say lex
'test2'()
say lex
@Benabik
Benabik / Dumper.pir
Created April 22, 2012 18:13
PCT.Dumper in Winxed
.sub 'padre_item' :multi(['PGE';'Match'])
.param pmc obj
.param pmc name
.local string str
str = obj.'Str'()
$I0 = length str
if $I0 < 48 goto have_str
str = substr str, 0, 48
str = concat str, '...'
@Benabik
Benabik / System Information
Created February 29, 2012 15:26
Pugs spectest run
OS X 10.7.3
GHC 7.0.4
Pugs 485869db82b218c198d5259b91247fea35c18b08
Roast a553a91e2dd4897a4ad1acff98b07cd79fdab0ba
@Benabik
Benabik / fastcgi_params
Created February 2, 2012 19:54
PHP try_files problem
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
@Benabik
Benabik / .ackrc
Created January 23, 2012 20:21
My .ackrc
--pager=less
--type-set=perl6=.pl6,.pm6,.p6
--type-set=nqp=.nqp
--type-set=winxed=.winxed
--type-set=parrot=.ops,.pir,.pasm
--type-set=lex=.l
--type-set=yacc=.y
--type-set=json=.json
--type-set=sml=.sml
@Benabik
Benabik / gist:1524863
Created December 27, 2011 19:23
Comb proxy attempt
my @a;
my $a := {
my $temp;
Proxy.new(
FETCH => method { return $temp; },
STORE => method ($val) { $temp = $val; @a = $val.comb }
);
}();
$a = 'test';
say $a;
@Benabik
Benabik / imcc.xml
Created December 4, 2011 21:11
output of `make imc.kate` in parrot.git
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!-- Created automatically by kate_syntax.pl Sun Dec 4 16:10:26 2011 -->
<language name="IMCC" version="0.2" kateversion="2.0"
section="Sources" extensions="*.pasm;*.pir" mimetype="">
<highlighting>
<list name="special_directives">
@Benabik
Benabik / perl6.txt
Created November 17, 2011 21:23
podtest failures
$ perl6 t/pod/why.t
src/gc/gc_gms.c:2223: failed assertion 'Dead object found!'
Backtrace - Obtained 32 stack frames (max trace depth is 32).
0 libparrot.dylib 0x0000000101fe754e Parrot_print_backtrace + 52
1 libparrot.dylib 0x0000000101fe7643 Parrot_confess + 41
2 libparrot.dylib 0x0000000101fee78e gc_gms_validate_pmc + 67
3 nqp_ops.bundle 0x0000000103605e97 gc_mark + 183
4 nqp_group.bundle 0x0000000103597956 Parrot_SixModelObject_mark + 294
5 libparrot.dylib 0x0000000102061d25 Parrot_CallContext_mark + 1559
6 libparrot.dylib 0x0000000102061a4b Parrot_CallContext_mark + 829