Skip to content

Instantly share code, notes, and snippets.

View sirrobert's full-sized avatar

Sir Robert Burbridge sirrobert

  • North Carolina, USA
View GitHub Profile
@sirrobert
sirrobert / fallback-issue.p6
Created July 13, 2012 15:21
perl6: .can does not recognize fallback code
# Apparently the .can method doesn't recognize what's done with
# fallback code. Is that intended?
use v6;
class A {
INIT {
$?PACKAGE.^add_fallback(
# Only provide a fallback function for "foo"
@sirrobert
sirrobert / Example.pm6
Created June 28, 2012 20:25
enum conflicts with sub
module Example;
our $VERSION = '0.1';
enum Something <SOME THING>;
our sub SOME (Str $str) {
return "str: $str";
}
@sirrobert
sirrobert / stack
Created June 28, 2012 14:37
Driver.version: unknown
Jun 28, 2012 10:36:37 AM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
10:36:37.588 INFO - Java: Sun Microsystems Inc. 20.0-b12
10:36:37.589 INFO - OS: Linux 3.2.0-25-generic i386
10:36:37.595 INFO - v2.23.1, with Core v2.23.1. Built from revision 17143
10:36:37.696 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
10:36:37.697 INFO - Version Jetty/5.1.x
10:36:37.698 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
10:36:37.699 INFO - Started HttpContext[/selenium-server,/selenium-server]
10:36:37.699 INFO - Started HttpContext[/,/]
@sirrobert
sirrobert / grammar-test.p6
Created June 24, 2012 00:07
Grammar parsing problem
#!/home/user/.perl6/bin/perl6
use v6;
grammar TEST {
rule TOP { ^ <sentence> $ }
rule sentence { <subject> <verb> <object> \. }
token subject { 'pigs' }
token verb { 'eat' }
token object { 'pods' }
@sirrobert
sirrobert / index.html
Created September 8, 2011 13:49
Smoothly streaming line graph
<!DOCTYPE html>
<html>
<head>
<title>Line Chart</title>
<link type="text/css" rel="stylesheet" href="line.css"/>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
</head>
<body>
<script type="text/javascript" src="line.js"></script>
</body>