Various utilities

Hi Folks

Over the years I've collected various lists of utilities which, for some reason, caught my eye. And now, having plenty of time (note: jealousy is a curse) I've simplified my collection of lists and browser bookmarks...

o aescrypt:
- Encrypt
- http://www.aescrypt.com/

o atop:
- Monitor processes

o Basecamp etc:
- Collaborate remotely
- http://37signals.com/
- Basecamp, Backpack, Campfire, Highrise

o Compression comparison:
- http://www.maximumcompression.com/index.html
- Huge list of compression programs: http://www.maximumcompression.com/programs.php

o dstat:
- Monitor processes
- dstat --tcp

o Firestarter:
- Filewall
- http://www.fs-security.com/

o free:
- Monitor memory
- free -m

o GnuPG
- Encrypt
- http://gnupg.org/

o Help:
- http://www.debian-administration.org/article/How_to_find_out_which_process_is_listening_upon_a_port
- http://www.debian-administration.org/articles/178

o htop:
- Monitor processes

o ifconfig:
- Monitor network
- sudo ifconfig -a

o ifdata:
- Monitor network:
- Part of moreutils
- http://kitenet.net/~joey/code/moreutils/

o iftop:
- Monitor network

o iotop:
- Monitor I/O

o ip:
- Monitor network

o iptables:
- Filewall
- Cheat sheet: http://blog.oddeven.info/iptables-cheat-sheet/

Thank You Sponsors!

We’d like to thank our sponsors for stepping up to support us. We really couldn’t do this without their support.

You too could sponsor YAPC.

[From the YAPC::NA Blog.]

Peeking into archives

Peeking into archives

At little insight goes a long way. I often say that I get my best ideas when I'm in the shower. I relax and my sometimes my brain makes some pretty neat connections.

One example of this is CPAN::Mini::Webserver, which allows you to search and browse a MiniCPAN. One insight was that the 02packages file in CPAN mirrors was full of enough information to be useful to search. The other was that browsing through distributions didn't actually require the distributions to be unpacked - they could be unpacked on the fly. That lead to Archive::Peek.

A map of the CPAN Ecosystem

I'm making a map of the CPAN Ecosystem for Programming Perl:

cpan-map.png

It's just something I threw together so the O'Reilly people could make a nice looking diagram. I'm a bit fuzzy on some of the services pulling either from the CPAN master, a mirror, or something else.

I left a lot out; I only have a page so large and I don't cover other things in the CPAN chapter.

My Perl hero of the week: Eric Strom (ASG)

http://search.cpan.org/~asg/

Hash-Abbrev-0.01  Text::Abbrev with aliases
List-Gen-0.96         provides functions for generating lists
Lvalue-0.21            add lvalue getters and setters to existing objects
Perl6-Feeds-0.20       implements perl6 feed operators in perl5 via source filtering
Test-Magic-0.21    terse tests with useful error feedback
Whatever-0.21       a perl6ish whatever-star for perl5
XUL-Gui-0.63         render cross platform gui applications with firefox from perl

He seems to be seriously into functional programming, Haskell and perl6 alike, which seems to be totally weird.

E.g. look what he is doing with us:

YAPC::NA Planning Meeting Tonight

It’s the first Tuesday of the month, so that means it’s YAPC::NA Planning Meeting time. If you’re in the Madison area, or don’t mind a drive there is a YAPC planning meeting tonight at the Essen Haus at 7pm. As always the food and beer are sponsored by Plain Black, and the room is sponsored by Essen Haus.

We’ve got a lot to discuss so the meeting will probably last until around 9pm, but you’re free to come and go as you please.

[From the YAPC::NA Blog.]

How I learnt Perl despite the bad press

By bad press I mean, "Perl is an unreadable language ... you should not use it"

I use perl for sys admin stuff and prototyping some pretty lame ideas.

some observations
For the beginners, perl on the tubes has two presses

  1. perl is difficult to learn because of all the "rules", "different contexts", edge cases along with the above bad press
  2. perl is easy to pick up because with a minimum amount of concepts you can write successful programs

And some pretty long fucking answers

People of the perl land, when some one asks - should I learn perl ? | is perl difficult to learn?, just say

"yes and perl programmers will gladly help you learn it"

how i learnt it
perldoc, the perl test suite and the perl cookbook

The perl test suite helped me quite a bit. Any irritating syntax doubts directly got clarified. And not just the perl syntax, but each module comes with a test suite which is awesome since I can see the api in action.

That's how I got to learn baby perl.

I bought the camel book. After that I grew more confidence in my scripts and began thinking out aloud in perl.

Tools I'm using to write the book

Since I can't really share the book with you, I figured I could share some of the tools I'm using to write it. They're a pile of hacks as I tend to flounder outside of Perl, but they work and I figured geeks would get some useful stuff out of them.

The worst Perl API's

Perl usually has a pretty and wellthought API and tools to maintain it.

But of cause there is also a hall of shame in some old dirty corners, nobody ever uses.

No.1 B.xs: make_warnings_object

In order to provide Perl read-access to lexical warnings some fake SV is passed to B, created internally by make_warnings_object(). A warning is basically a short integer between 1-6, and lexical warnings are integers > 6 checked by bitmasks e.g. see warnings.pm.

The C API is SV* until 5.8.9 and since 5.10 STRLEN*, which is basically a int*.

YAPC::NA 2012 Call For Presenters Now Open!

We are now accepting talk proposals for YAPC::NA 2012

We’re of course interested in anything Perl-related you want to talk about. However, we have two areas we’re definitely interested in:

First, we’re looking for talks on Perl in the Wild. These talks are about businesses and individuals who have done great things with Perl. Perhaps you’ve automated your house with Perl, or built the latest and greatest web app. Or maybe you’re controlling Arduino boards to build robots with Perl. Maybe you’ve got amazing case studies in high-end performance with Perl. Or maybe, you’ve built a boring little app in Perl that has enabled your business to make millions of dollars. You could be building a great video game in Perl, or perhaps a social network to take down Facebook and Twitter.  Whatever it is that you’ve built or are building, we want to hear about it.

Perl and Parsing 11: Are all Perl programs parseable?

Before going further in this series, I want to touch on a question I have so far avoided: Are all Perl programs parseable?

Most languages do not pose this question. It was Adam Kennedy, in creating PPI, who first ran up against it. Adam conjectured that in fact Perl parsing may be undecidable. While in the planning stages for Marpa, I found Adam's conjecture and turned it into a formal proof.

Being the first to formalize this result, I took the initial heat over it, and now I get the credit. The dust has pretty much settled, and to my mild surprise, the result has proved of interest to the academic community. The initial revulsion at the idea of undecidable parsing has subsided, even to the extent that others now want to get into the act. I read on Wikipedia that LISP parsing is also undecidable. So all the cool kids seem to be doing it.

Data-Mining a Diagnosis in the ICU

Data-mining has found its way into hospital Intensive Care Units (ICUs):

I confess unease upon reflecting on Predictive Medical Technologies monitoring software, as the phrase "secret sauce" leads me to think of trade secrets – and trade secrets are in opposition to the tradition of open research. The only defense I can come up with is that their "secret sauce" might be in how quickly they process the information (as a process that takes 2 weeks to process 8 hours of results would be useless except as a proof-of-concept). On the other hand, it sounds like the IBM/UOIT collaboration should result in standard, open research results.

Pretty cool stuff all around, though.

Querying ElasticSearch from VIM

I'm using ElasticSearch quite a bit and finally decided to make it easy to debug. I now write JSON queries with a .es extension. And have this in my .vim/filetype.vim file:

autocmd! BufRead,BufNewFile *.es      setfiletype elasticsearch

In .vim/ftplugin/elasticsearch.vim I've just added a very minimal setup for ElasticSearch:

if exists("b:did_elastic_search_ftplugin")                                                                                                                                       
  finish                                                                                                                                                                         
endif                                                                                                                                                                            
let b:did_elastic_search_ftplugin = 1                                                                                                                                            

set syntax=json                                                                                                                                                                  
noremap ,r   :!json_check %<cr> 

Happy New Year!

Welcome to 2012. You made it! Can you believe it? I can't believe it either, the way you partied last night. Have you no shame?

Well it's time to make a New Year's resolution. You're coming to YAPC::NA 2012 in Madison, WI on June 13-15. 

While you're at it, have your spouse or significant other make the resolution with you. Bring them to the YAPC::NA 2012 Spouses Program.

Corelist and Perlbrew - 2 Perl command line tools for remote Perl work

As a Perl developer who works remotely sometimes, there are Quality Assurance measures and sanity checks I must make before releasing code to clients. The two that come up most predominantly are:
  • Will this script run under the Perl version available to the customer?
  • What Modules can I use for the work?
Will this script run under the Perl version available to the customer?
Why is this question relevant? Well, as a Perl enthusiast, I keep relatively up to date on my Perl versions.
tyler@inspiron:~$ perl -v 
This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi

I have found that Perl 5.8.x is the most common distribution available on all servers I have worked with. So, how to make sure the code I write will not break on a 5.8.x Interpreter?

after5detroit.com

A few weeks ago I was asked if I'd be interested in re-making the after5detroit.com website. The interface had already been mocked up in Adobe Illustrator and the front-end/back-end design and architecture was still available for the taking. I of course took the gig. I was looking for an excuse to work on something new anyway.

Mojolicious::Lite, DBIx::Class and the Dojo Toolkit are my tools for this endeavor. I've been working with them for the past couple of years now and enjoy every minute of it (usually).

Sadly this is a paying gig so I can't share the code with any of you. But if I can pull something reusable out of it I'll see what I can do.

More to follow, I've got 6 weeks...

Tidying up my old CPAN code

I've just decided to spend a couple of hours tidying up my CPAN projects - surprising how little you can get done in an evening if you let things slip.. on the plus side, I've made a start and cleaned things up a bit :

  • Autodia page on my personal site now updated to point to latest version on metacpan, and files to svn trunk
  • Several bugs marked resolved, and updated, spam delete in rt.cpan.org
  • Emailed Smylers about consolidating the various GraphViz::DBI forks on cpan using some shared co-maint and github (anyone else interested give me a buzz)
  • Tidied up Graphviz::SQL and Math::Curve::Hilbert a bit and put them in github.

My Plan is to mark any bugs older than 5 years or for very old version of my cpan modules as stalled or won't fix and then get on top of what's left - all my CPAN modules are being moved into github too.

No code written this evening, but definitely useful time spent.

YAPC::NA Has A Mailing List

Did you know that YAPC::NA has a mailing list? Neither did I until a couple days ago. Starting now, I'll be cross posting our news items to the mailing list, in case that is your preferred way to receive news about YAPC::NA 2012.

A module version of perlbug

I want a cpanbug that's like perlbug. I don't have time to do this myself, but I've often wanted it. A long time ago, I wrote about the module equivalent for perlbug. Essentially, you say something like this:

% cpanbug Some::Module

It collects a lot of information, just like perlbug, and then sends it to the right place, which might not be rt.cpan.org. For instance, it might be Github.

That might be easier now with the improvements to the META spec and the MetaCPAN API.

Test::DBIx::Class

Today, I tried to test a freshly created DB schema using Test::DBIx::Class. Scanning through the documentation was impossible -- it knows far too many options to get captured within a few minutes. But carefully reading the brilliant manual is worth the time spent. Test::DBIx::Class has a lot of options and test-functions tailored especially to the needs of DB-testing.

My primitive schema knows 3 tables: Sensors, Measures and AlarmConditions. Inside my t/ directory, I needed to create only one supplementary file to allow the tests to get coded: a config file t/etc/schema.pl

{
    schema_class => 'Statistics::EasySchema',
    force_drop_table => 1,
    resultsets => [ qw(AlarmCondition Measure Sensor) ],
    connect_info => ['DBI:Pg:dbname=statistics_test', 'user', 'secret'],
}

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.