Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Communities - Perl edition (RioJS)

Avatar for garux garux
August 30, 2014

Communities - Perl edition (RioJS)

Slides for the talk given at the RioJS meetup on Developer Communities' Ecosystem, in 2014.

Avatar for garux

garux

August 30, 2014
Tweet

More Decks by garux

Other Decks in Programming

Transcript

  1. print''.join('%(pre)s%(num)s %(bot)s on the wall, %(nul)s %(bot)s,\n%(tak)s\n'%(lambda c,b:{'pre' :['','%s %s

    on the wall.\n\n'%(c,b)][abs(cmp(c,'Ninety-nine'))],'num':c,'nul':c. lower(),'bot':b,'tak':['Go to the store and buy some more... Ninety-nine %s.'%b,'Take one down, pass it around,'] [abs(cmp(x,0))] })((lambda x,o:[(['Twenty','Thirty','Forty','Fifty','Sixty','Seventy','Eighty','Ninety' ][x/(2*3+4)-2]+'-'+o.lower()).replace('-no more',''),o][int(x<20)])(x,['No more','One','Two','Three','Four','Five', 'Six','Seven','Eight','Nine','Ten','Eleven','Twelve','Thirteen','Fourteen',‘Fifteen','Sixteen','Seventeen','Eighteen', 'Nineteen'][[x,x%10][int(x>=20)]]),'bottle%s of beer'%['','s'][abs(cmp(x,1))]) for x in xrange(99,-1,-1))
  2. use Dancer; use DateTime; ! get '/friday13' => sub {

    is_friday_the_13th( DateTime->now ); }; ! get '/friday13/:year/:month/:day' => sub { my $date = DateTime->new( year => param('year' ), month => param('month'), day => param('day' ), ); ! is_friday_the_13th( $date ); }; ! sub is_friday_the_13th { my $date = shift; ! if ($date->day_name eq 'Friday') { return ‘YES!'; } else { return 'NO :('; } } ! start;
  3. my $eyes = "closed"; my $heart = "aching"; my $beloved

    = "gone"; ! ! no warnings; ! my $love = (); ! ! open MY,"mind"; foreach ($love) { open MY,$eyes; tell my $mind or open my $eyes; } ! do not $fear and do not die; ! $i; die "because i love you\n"; ! do { $i; sleep($_) } while ( $awake ); ! warn "$me" if ($i == $wrong); ! bind my $love, $dear and do not exit; for (my $world = "dark") {}; for (my $eyes = "blind") {};
  4. Reasonable Person Principle • Everyone will be reasonable. • Everyone

    expects everyone else to be reasonable. • No one is special. • Do not be offended if someone suggests you are not being reasonable.
  5. “Behave like you are a member of the community that

    you want to belong to." John “genehack" Anderson