Skip to content

Instantly share code, notes, and snippets.

View kasei's full-sized avatar

Gregory Todd Williams kasei

View GitHub Profile
@kasei
kasei / perlrdf-traits.md
Last active August 29, 2015 14:04
Notes on PerlRDF Traits

Notes on PerlRDF Traits

Methods marked with a * are ones for which the role can provide a default implementation.

Classes

IRI class

Keybase proof

I hereby claim:

  • I am kasei on github.
  • I am kasei (https://keybase.io/kasei) on keybase.
  • I have a public key whose fingerprint is 82FB C1A1 5390 2056 60CB C40F 84F2 BA54 CAA8 C82D

To claim this, I am signing this object:

@kasei
kasei / tpf-questions.md
Last active August 29, 2015 14:13
Questions about Triple Pattern Fragments

TPF questions

Accessing Hypermedia Controls

Section 3.5 describes the expected formatting of hypermedia controls and says:

The hypermedia control fulfills the hypermedia constraint that each representation should contain the controls towards next steps. As a result,

@kasei
kasei / attean-filter-pushdown
Created February 19, 2015 22:01
Example of query algebra rewriting in Attean
use v5.14;
use autodie;
use utf8;
use RDF::Query;
use Attean;
use Attean::Algebra;
use Attean::Expression;
use Attean::TreeRewriter;
@kasei
kasei / attean-idp-planning.pl
Created May 5, 2015 09:06
Attean IDP query planning
use strict;
use warnings;
no warnings 'redefine';
use utf8;
use RDF::Query;
use Attean;
use Attean::RDF;
use AtteanX::RDFQueryTranslator;
@kasei
kasei / generic-protocol.swift
Last active August 29, 2015 14:23
Generics handling for protocol return value
// In response to: http://inessential.com/2015/06/21/swift_protocols_question
import Foundation
protocol Value: Equatable {
}
protocol Smashable {
func valueBySmashing​OtherValue​<T: Value, U: Value>(value: T) -> U
}
@kasei
kasei / rewrite-algebra-split-bgp.perl
Last active August 29, 2015 14:25
Attean tree rewriting
use v5.14;
use autodie;
use utf8;
use RDF::Query;
use Attean;
use Attean::TreeRewriter;
use AtteanX::RDFQueryTranslator;
my $sparql = <<"END";
@kasei
kasei / attean-role.pod
Last active August 29, 2015 14:27
Attean POD template for roles

NAME

Attean::API::Example - Example Role

VERSION

This document describes Attean::API::Example version 0.007

SYNOPSIS

@kasei
kasei / attean-class.pod
Created August 13, 2015 15:29
Attean POD template for classes

NAME

Attean::Example - Example Class

VERSION

This document describes Attean::Example version 0.007

SYNOPSIS

@kasei
kasei / gist:458923
Created June 30, 2010 16:47
HTML::HTML5::Writer bug
#!/usr/bin/perl
use strict;
use warnings;
use HTML::HTML5::Writer;
use HTML::HTML5::Parser;
use RDF::Trine qw(iri statement literal);
my $html = <<'END';
<?xml version="1.0" encoding="utf-8"?>