This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IRC client implementation for YIBot 2.0. Technically, it's main part of | |
# program, but YIBot now supports not only IRC :). | |
{Server} = require '../server' | |
# Class IRC itself | |
class exports.IRC extends Server | |
constructor: (@name, @config) -> | |
unless @config.Host? | |
throw new Error "Server #{@name} doesn't have specified server!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List of plugins | |
Plugins = [ | |
'eightball' | |
] | |
# Servers configuration | |
exports.config = | |
Freenode: | |
Type: 'IRC' | |
Host: 'irc.freenode.net' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List of plugins | |
Plugins = [ | |
'eightball' | |
] | |
# Servers configuration | |
exports.config = | |
Freenode: | |
Type: 'IRC' | |
Host: 'irc.freenode.net' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ACME::Square; | |
use strict; | |
use warnings; | |
use Carp; | |
use Exporter; | |
use base 'Exporter'; | |
our $VERSION = 20120328; | |
our @EXPORT_OK = qw( square ); | |
sub square ($) { | |
my ($a) = @_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function makePoint(x, y) { | |
"use strict"; | |
return { | |
x: x, | |
y: y, | |
distanceTo: function (point) { | |
var dx = this.x - point.x, | |
dy = this.y - point.y; | |
return Math.sqrt(dx * dx + dy * dy); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1166921663690473895545451437288890824967209763846036195355478259685499755495985891253762567430324915676001472271918271094415586466723319374588006956374292029453713316363425418160396564203771865064310879611058641475660285382224615198885061067875539388019448617819980260958631744579513784049323687410130880533711492664033421140212284951689598943248600620179682880250418664663957352432341838365673214361630485521517749075741474559956231270665467997137079902474126142762115005984897533653801051793249320473552493343779064645161318303780490402912370748852517808034139243250458164078949047886982796914199764296296807066739570791443109526447262061314030717983609197715534605687201740877720140616147527714824932408027860286615081293619395438085765485290819145397565371607252063200686551164878102219057076558307586325955564879574446512319131921062704960655793267026957167917063794380943217707027830302967462014508509209614605260634239370180237402891199427599903412117002323467259308163914101551274831667014906804464253783176889767632 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | time awk /a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ | |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | |
0.00user 0.00system 0:00.00elapsed 0%CPU (0avgtext+0avgdata 3600maxresident)k | |
0inputs+0outputs (0major+275minor)pagefaults 0swaps | |
$ echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | time perl -nE'print if /a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/' | |
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | |
65.73user 0.52system 1:06.46elapsed 99%CPU (0avgtext+0avgdata 6832maxresident)k | |
0inputs+0outputs (0major+477minor)pagefaults 0swaps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== Str.wordcase == | |
multi sub wordcase(Str:D :&filter = &lc, :%exceptions = set()) returns Str | |
multi method wordcase(Str:D: :&filter = &lc, :%exceptions = set()) returns Str | |
Performs a Unicode titlecase operation on the first character of each word of the string (as defined by a regex « boundary), and forces the rest of the letters through a filter that defaults to lc. After this operation, if any exceptions are supplied and if the word is found in the set of exceptions, the first character is also forced through the filter. Note that the exceptions must be spelled with an initial titlecase, such as "By" or "And", to produce "by" or "and". | |
== Date.day-of-year == | |
method day-of-year(Date:D:) returns Int:D | |
Returns the day of the year (1..366). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Str.wordcase (Perl 6) http://doc.perl6.org/type/Str#wordcase Performs a Unicode titlecase operation on the first character of each word of the string (as defined by a regex « boundary), and forces the rest of the letters through a filter that defaults to lc. After this operation, if any exceptions are supplied and if the word is found in the set of exceptions, the first character is also forced through the filter. Note that the exceptions must be spelled with an initial titlecase, such as "By" or "And", to produce "by" or "and". multi sub wordcase(Str:D :&filter = &lc, :%exceptions = set()) returns Str\nmulti method wordcase(Str:D: :&filter = &lc, :%exceptions = set()) returns Str | |
Date.day-of-year (Perl 6) http://doc.perl6.org/type/Date#day-of-year Returns the day of the year (1..366). method day-of-year(Date:D:) returns Int:D | |
List.shift (Perl 6) http://doc.perl6.org/type/List#shift Removes and returns the first item from the list, fails for an empty list. multi sub shift(List:D )\nmulti metho |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glitchmr@strawberry ~/g/perl> ./Configure | |
Beginning of configuration questions for perl5. | |
Checking echo to see how to suppress newlines... | |
...using \c | |
The star should be here-->* | |
First let's make sure your kit is complete. Checking... | |
Looks good... |
OlderNewer