Links for Devel::SizeMe
0 has a length of 0 because it's interpreted in perl as a string, instead of as a number.
Reporting back as a function when you overide the function... don't try to examine it... when dealing with perl.
$a = "A"
++$a; # $a = "B"
perl6 has a more defined behaviour, and supports --$a, unlike perl 5.
perldoc Scala::Util does a looks_like_number EXPR to see if it looks like a number...
use Devel:Peek
Dump $z;
A simple mojolicious based command line chat client + server. ===
birdhouse ; https://github.com/bduggan/birdhouse/
README
bird
house
pm/birdhouse/
./house daeomn --http://localhost:3001
--websocket 3600
Using just mojo
make a websocket to /door ; on messages, send $tx $hello
on somebody get hash of birds
web socket transaction
on finish when they delete.
wall sends to everyone...
Mojolicious::Lite
very straight forward , neat...
all comunication happening over http... (wbesocket).
(evil)
javascript client... tcp client...
on finish, try to recorrect every two seconds...
on message recieved
http is stateless - websockets is a persistant http connection. (Tcp over http.)
TIMOW to build a websocket server in perl / pentadactyl
PDL - http://search.cpan.org/~chm/PDL-2.4.9/Basic/PDL.pm
Perl Data Language used mostly for matrix calculations of large data sets, manipulating images, and graphing data.
Links:
with vim, type v for visual block editing mode.
To clone a git repository:
git clone
https://github.com/bduggan/piccup
where piccup is the project name.
Mojo ( http://cpanratings.perl.org/dist/Mojolicious ).
Brock's coro code was used in a game (rip off of a popular robot game on the android).
Brock created a new freeshell.org account...
Here's the Moose presentation URL: http://rjbs.manxome.org/talks/moose/
#!/usr/bin/perl
use strict;
use Data::Dumper;
use DBI;
my $db = DBI->connect('dbi:SQLite:dbname=hi.db');
my $people = $db->selectall_arrayref(
"SELECT * FROM foo order by id",
# "SELECT * FROM foo order by id limit 2 offset 2",
{ Slice => {} }
);
# print "People: " . Dumper($people);
# exit;
print "First person name: $people->[0]->{name}\n";
my $total_people = scalar @{ $people };
my $current_page = 3;
my $page_size = 2;
my $start_person = $current_page * $page_size;
foreach my $n ($start_person..($start_person + $page_size - 1)) {
print "$n: $people->[$n]->{id} \t $people->[$n]->{name}\n";
}
12 people were here tonight.
yapc full length videos should be available "soon". Maybee july time frame.
http://github.com/genehack/emacs-and-perl-talk
http://github.com/genehack/emacs
<-- emacs config file example.
Template::Semantic (and other modules discussed).
subset of the css be the template...
aka Dom::Template "done right" ~ brock
<div id=><style=><content>
####
Template::Mustache (vs ::Gotae ) # check ruby
mustache.githhub.com
#############################
sdlperl.org
simple direct media layer
c,cpp, & other apps.
2 dimenstional games, cross platforms.
Will use open gl as a backend.
games seem to be #1. Drawing, video, audio.
vlc - one of the back ends is SDL. (Because it works everywhere...)
SDL bindings have snagated. However, they stagnated, and didn't follow the upstream sdl directly. ...
Recently, a new small push for sdl bindings.
makes the documentation easier ot use /
SDLX for perlish apis on top of SDL.
Trick - download codmpletely off of githb.
Then Alien SDL.
(Go out and fetch underlying for building external library and build it so it works.)
Build it from scratch from source. :-/
Then, seperately SDL_perl
then switch branches to redesign branch (OR JUST WAIT A FEW MONTHS)...
shooter.pl - frozen bubble to work. minor glitches.
Integrate Coro.
sdl_coro_repl
make_box(rand int rand 604 int rand 400) for 1..100
very cool demo, all in perl, in urser space.
Coro - copperative threads for perl, not pre-emptive...
AnyEvent
ev vs event - ev is much faster for Coro::EV backend.
EV/Any
Coro
ev
anyevent
EV
Can't locate SDL::Coro::Repl...
use lib "some/blah/path/lib/lib";
use lib 'lib'; # current directory reference.
Vimerator - front end to Java....
www.tux.org/~gkwms/ # Jerry's web page.
Collison::2d
Public service announcement...
Scala::Util , weaken
perl uses reference counting, because it works.
until you have
my $a;
$a = ['x',x1024 * 160, \$a];
weaken $a ->[1];
#!/usr/bin/perl -w
use strict;
use WWW::Mechanize;
use DateTime;
my $agent = WWW::Mechanize->new( autocheck => 1,);
$agent->get('http://dc.pm.org/Status');
$agent->follow_link( text => 'Edit this page' );
my $text = $agent->field('text');
my $now = DateTime->now->ymd;
my $status = "$ENV{USER} ($now) @ARGV";
$text = $status . "\n\n" . $text;
$agent->field('text', $text);
$agent->click('Save');
print "Content:\n" . $agent->content;
Notes from zaz:
1. Determine what you want to do
2. Use WWW::Mechanize::Shell
as a command line tool for doing what you need.
3. Eg. Shell> get
http://cpan.org
4. script out.pl
If you type "script out.pl" on the command shell, it will generate a script based upon what you did in WWW::Mechanize::Shell.
Then, edit that script as necessary.
Firebug (firefox plugin) ++ for examining html on web pages.
See also WWW::HtmlUnit, which is Brock's www library that supports javascript (which www-mechanize does not.)
Another alternative is lwp-simple, but that doesn't have form parsing / other features.
| > Paul Graham
| >
| > so the stuff was probably in here somewhere
| > http://paulgraham.com/antispam.html
#!/usr/bin/perl6 my @a = <a b c d e>; for @a Z 0 .. Inf -> $elem, $index { say "at index $index, I saw $elem"; }
We discussed diagnostics via a web browser with the following modules (presented by Brock):
When set up, you can modify variables along the way.
Carp::REPL can catch dies
Brief impromptu discussion about how to use HTML::Template for dynamic pull-down menus with saved state. (presented by Gary)
Here is a list of some of the topics we touched upon, and some promised links.
Here is a list of some of the topics we touched upon, and some promised links.