Skip to content

Instantly share code, notes, and snippets.

View Util's full-sized avatar

Bruce Gray Util

View GitHub Profile
@Util
Util / CoolMod.pm
Created October 1, 2009 04:01
Util's own stripped-down and modernized example of how to make a module.
package CoolMod;
# Util's own stripped-down and modernized example of how to make a module.
# File must be named CoolMod.pm
# Usage: `use CoolMod qw( foo bar );`
use strict;
use warnings;
use base qw(Exporter);
our $VERSION = 1.00;
our @EXPORT_OK = qw( &foo &bar );
From: barbie@birmingham.pm.org
Subject: YAPC::NA 2009 - Talk & Tutorial Evaluations
Date: September 14, 2009 7:46:33 AM CDT
To: bruce.gray@acm.org
Hi,
In this email, please find the feedback received from the surveys available for YAPC::NA 2009. Ratings were from 1 to 10, where 1 is a low rating and 10 is high.
@Util
Util / Y.pm
Created October 2, 2009 19:54
package main; # Evil!
# Two notes:
# 1) The whole point of Y.pm is that you put your own bag-of-tricks into it.
# I have just supplied a starter kit here.
# 2) Never use this import technique for anything else; it is *deeply* evil.
# Assumes a global hash %h;
our %h;
# dha - Dump Hash in Alpha order
Index: std_hilite/STD_syntax_highlight
===================================================================
--- std_hilite/STD_syntax_highlight (revision 28640)
+++ std_hilite/STD_syntax_highlight (working copy)
@@ -447,6 +447,14 @@
my ($last_tree,$buffer, $last_type) = ("","","");
for my $i (0 .. @loc-1) {
next unless defined $loc[$i];
+
+ # XXX Bug? @loc is too long for $src_text.
package DateRange;
# Usage: `use DateRange qw( getDateArray );`
use strict;
use warnings;
use base qw(Exporter);
our $VERSION = 1.00;
our @EXPORT_OK = qw( &getDateArray );
sub getDateArray {
package Year::2010::AD;
# Save as path: Year/2010/AD.pm
use strict;
use warnings;
use base qw(Exporter);
our @EXPORT_OK = qw( &Happy *ALL );
our %EXPORT_TAGS = ( all => \@EXPORT_OK );
sub Happy {
# in http://irclog.perlgeek.de/parrot/2010-04-27#i_2270887 , NotFound said:
# How can I look for a method given a class object? inspec_str('methods')['methodname'] ?
.sub 'main'
.local int ii
.local pmc class, obj
newclass class, 'Foo'
# If all you have is a class, you can use "inspect".
# I think that "inspect_str" has been removed as an op.
diff --git a/CREDITS b/CREDITS
index 40b1b22..af4c551 100644
--- a/CREDITS
+++ b/CREDITS
@@ -168,6 +168,13 @@ N: Gregor N. Purdy
E: gregor@focusresearch.com
S: Sunnyvale, CA
+U: ingy
+N: Ingy döt Net
@Util
Util / screen_cap.txt
Created July 12, 2011 19:56
Niecza: Error when re-compilng Niecza a "Ubuntu Natty" Linux box
Niecza: Error when re-compilng Niecza a "Ubuntu Natty" Linux box
bruce@farmer:~/Git/Niecza/niecza$ uname -a
Linux farmer 2.6.38-8-generic-pae #42-Ubuntu SMP Mon Apr 11 05:17:09 UTC 2011 i686 i686 i386 GNU/Linux
bruce@farmer:~/Git/Niecza/niecza$ make clean
bruce@farmer:~/Git/Niecza/niecza$ git clean -dfx
@Util
Util / screencap2.txt
Created July 12, 2011 20:31
Niecza part2
Output of two runs:
run/Niecza.exe -C CORE
run/Niecza.exe
bruce@farmer:~/Git/Niecza/niecza$ MONO_LOG_LEVEL=debug MONO_LOG_MASK=asm mono --trace=none run/Niecza.exe -C CORE
Mono-INFO: Assembly Loader probing location: '/usr/lib/mono/2.0/mscorlib.dll'.
Mono-INFO: Image addref mscorlib 0x8b4b408 -> /usr/lib/mono/2.0/mscorlib.dll 0x8b4aa60: 2