Skip to content

Instantly share code, notes, and snippets.

View LunaBorowska's full-sized avatar

Luna Borowska LunaBorowska

View GitHub Profile
glitchmr@strawberry ~/g/SixtySixBot> perl6 sixtysix.p6
Connecting to irc.freenode.net on port 6667
Could not parse the following IRC event: :lindbohm.freenode.net 004 SixtySixBot lindbohm.freenode.net ircd-seven-1.1.3 DOQRSZaghilopswz CFILMPQbcefgijklmnopqrstvz bkloveqjfI
Malformed UTF-8 string
in method get at src/gen/CORE.setting:7832
in method run at lib/Net/IRC/Bot.pm:80
in block at sixtysix.p6:6
glitchmr@strawberry ~/g/SixtySixBot> perl6 sixtysix.p6
use Net::IRC::Bot;
Net::IRC::Bot.new(
nick => 'SixtySixBot',
server => 'irc.freenode.net',
channels => <#perl66>,
modules => (
),
).run;
glitchmr@strawberry ~/g/SixtySixBot> perl6 sixtysix.p6
Connecting to irc.freenode.net on port 6667
:zelazny.freenode.net NOTICE * :*** Looking up your hostname...
:zelazny.freenode.net NOTICE * :*** Checking Ident
:zelazny.freenode.net NOTICE * :*** No Ident response
:zelazny.freenode.net NOTICE * :*** Found your hostname
:zelazny.freenode.net 001 SixtySixBot :Welcome to the freenode Internet Relay Chat Network SixtySixBot
:zelazny.freenode.net 002 SixtySixBot :Your host is zelazny.freenode.net[140.211.167.99/6667], running version ircd-seven-1.1.3
:zelazny.freenode.net 003 SixtySixBot :This server was created Sun Nov 13 2011 at 13:42:34 UTC
Could not parse the following IRC event: :zelazny.freenode.net 004 SixtySixBot zelazny.freenode.net ircd-seven-1.1.3 DOQRSZaghilopswz CFILMPQbcefgijklmnopqrstvz bkloveqjfI
glitchmr@feather ~/panda> ./bootstrap.pl
==> Bootstrapping Panda
Cannot modify readonly value
in '&infix:<=>' at line 1
in main program body at line 26:./bootstrap.pl
glitchmr@feather ~/panda>
class Net::IRC::Modules::FromThisPointPrefixIsRequired {
has $.prefix = die "You need to specify prefix!";
multi method said ( $ev ) {
if $ev.what .= subst: $.prefix, "" {
$ev.what = "";
}
}
}
function range(start, end, step) {
function range(start, end, step, results) {
if (step > 0 && start > end || step < 0 && start < end)
return results
results.push(start)
return range(start += step, end, step, results)
}
return range(start, end, step || 1, [])
}
Contributors »ö«
----------------
This site owes its existence to
* Larry Wall (Perl, Perl 6, Camelia, helpful feedback, content)
* Susanne Schmidt (design)
* Moritz Lenz (initiative, content, design, server administration)
* Carl Mäsak (Design, content, constructive bikeshedding)
* Daniel Ruoso (content, design fixes)
* Daniel Wright (perl6.org domain)
@LunaBorowska
LunaBorowska / humans.pl
Created September 3, 2012 10:33
humans.txt
# Acknowledgments »ö«
use v6;
my %contributions =
'Larry Wall' => (
'Perl', 'Perl 6', 'Camelia', 'helpful feedback', 'content'
),
'Moritz Lenz' => (
'initiative', 'content', 'design', 'server administration'
),
'Carl Mäsak' => (
use JSON::Tiny;
class Net::IRC::Modules::Factoids {
has $.file;
has %!content = try { from-json slurp $.file } // {};
multi method said ( $ev where {.what ~~ / ^ \! add \s+ (\w+) \s* (.+) $ /} ) {
%!content{$0} = ~$1;
self!save;
}
multi method said ( $ev where {.what ~~ / ^ \! (\w+) /}) {
if %!content{$0} {
glitchmr@feather ~/SixtySixBot> cat lib/Net/IRC/Modules/Factoids.pm
use JSON::Tiny;
class Net::IRC::Modules::Factoids {
has $.file = 'factoids';
has %!content;
submethod BUILD {
$.file.perl.say;
%!content = try { from-json slurp $.file };
}
multi method said ( $ev where {.what ~~ / ^ \! add \s+ (\w+) \s* (.+) $ /} ) {