Skip to content

Instantly share code, notes, and snippets.

View Benabik's full-sized avatar

Brian Gernhardt Benabik

View GitHub Profile
@Benabik
Benabik / README
Created October 14, 2010 19:52
OS X ramdisk script
This file creates and mounts a ramdisk on OS X (10.5+, I believe)
Handy for setting up test environments. I use it for git like so:
device=`ramdisk 250 Git_Test`
export GIT_TEST_OPTS='--root=/Volumes/Git_Test'
make test
hdiutil detach $device
@Benabik
Benabik / gist:899867
Created April 2, 2011 20:43
Parrot GSoC 2011 Proposal: Migrating PAST to NQP and newPOST

Name: Brian Gernhardt

E-Mail: brian.gernhardt@mail.rit.edu
AIM: Benabik
IRC: benabik on irc.perl.org, irc.freenode.net

Migrating PAST to NQP and newPOST

Abstract

@Benabik
Benabik / gist:1013096
Created June 7, 2011 20:36
nqp-rx fix for contextuals

In NQP, all variables get declared at the beginning of the block. This makes the following code fail:

my $old  := $*VAR;
my $*VAR := $new;

Instead of the old (outer) value of the contextual $*VAR, $old contains Undef. The following one line fix to nqp-rx seems to solve this problem by making NQP declare variables at the same point in the generated PIR as they are in the NQP code.

@Benabik
Benabik / gist:1078850
Created July 12, 2011 20:06
My spectest failures
perl t/harness --fudge --keep-exit-code --icu=1 --tests-from-file=t/spectest.data
t/spec/S02-builtin_data_types/anon_block.rakudo ................ ok
t/spec/S02-builtin_data_types/array.rakudo ..................... ok
t/spec/S02-builtin_data_types/array_extending.t ................ ok
t/spec/S02-builtin_data_types/array_ref.rakudo ................. ok
t/spec/S02-builtin_data_types/assigning-refs.rakudo ............ ok
t/spec/S02-builtin_data_types/bool.rakudo ...................... ok
t/spec/S02-builtin_data_types/catch_type_cast_mismatch.rakudo .. ok
t/spec/S02-builtin_data_types/declare.rakudo ................... ok
t/spec/S02-builtin_data_types/flattening.rakudo ................ ok
@Benabik
Benabik / gist:1123441
Created August 3, 2011 18:38
Output of newpost.t
brian@hermes parrot$ ./parrot t/compilers/pct/newpost.t
n_regs_used 0-0-0-0
"sub" => PMC 'POST;Sub' {
<main> => 1
<name> => "main"
}
Emitting main
From 0
Middle 0
Emitting default return
@Benabik
Benabik / gist:1159684
Created August 20, 2011 21:24
Error building nom
rakudo$ ./Make
========== CONFIGURE ==========
Verifying installation ...
Using /usr/local/bin/nqp (version 2011.06-164-gbabcf34).
Creating Makefile ...
Cleaning up ...
You can now use 'make' to build Rakudo.
After that, 'make test' will run some tests and
@Benabik
Benabik / darwin.txt
Created August 25, 2011 18:12
Testing select on various platforms...
Output on OS X:
ret = 6
fh1 read
fh2 read
fh1 write
fh2 write
fh1 error
fh2 error
@Benabik
Benabik / output.txt
Created August 25, 2011 19:06
die_i_i resumable
test
resumed 1
(no message)
resumed 2
@Benabik
Benabik / winxed.vim
Created October 16, 2011 19:54
Winxed Syntax Highlighting
" Vim syntax file
" Language : Winxed (http://winxed.org/)
" Maintainer: Brian Gernhardt
" Based on the javascript syntax file
" TODO:
" * heredocs
" * PIR
" * builtins
@Benabik
Benabik / comments.txt
Created October 16, 2011 21:06
Disassembler-in-progress output. See https://github.com/parrot/PACT for source
Start/end sub markers in disassembly
Figure out what the debug segment actually means...
references:
src/debug.c:PBC_disassemble
frontend/pbc_dump.c:disas_dump
OpInfo PMC
OpLib PMC