Skip to content

Instantly share code, notes, and snippets.

View labster's full-sized avatar

Brent Laabs labster

View GitHub Profile
proto infix:<=>($, $) is rw { * }
multi infix:<=>(Mu \a, Mu \b) is rw {
nqp::p6store(a, b)
}
multi infix:<=>(Mu \a, Nil \b) is rw {
if nqp::iscont(a) {
nqp::p6store(a, a.VAR.of);
}
else { X::Assignment::RO.new.throw; }
}
@labster
labster / bare-scalar.t
Created May 20, 2013 04:34
test file for "my $"
use v6;
use Test;
plan 10;
#bare sigils
lives_ok { my $ }, 'basic bare sigil $';
lives_ok { my @ }, 'basic bare sigil @';
lives_ok { my % }, 'basic bare sigil %';
@labster
labster / PROMISE.pl
Last active December 18, 2015 17:19
use strict;
use warnings;
use feature 'say';
package Promise {
my $STATE; # = 'PENDING';
my $fulfillvalue;
my $rejectreason;
@labster
labster / 4common.js
Created November 21, 2013 21:38
Needed for my SectionHide hack.
function toggleSection(toggleObj, id, showtext, hidetext) {
var e = document.getElementById('sectionblock'+id);
if(toggleObj.innerHTML == showtext) {
toggleObj.innerHTML = hidetext;
e.style.display = 'block';
}
else {
toggleObj.innerHTML = showtext;
e.style.display = 'none';
}
20150802 6
20150803 1
20150804 1
20150806 1
20150807 1
20150809 1
20150812 3
20150813 1
20150815 1
20150816 2