このページは大阪弁化フィルタによって翻訳生成されたんですわ。

翻訳前ページへ


blogs.perl.org ― blogging the onion
The Wayback Machine - http://web.archive.org/web/20161012044828/http://blogs.perl.org/

Perl6::Parser available for Perl 6

It's by no means complete, but it's available for trial from your friendly neighborhood Panda installer. This tool uses Perl 6's own internal parser in order to generate a parse tree for Perl 6 code, *and* has enough information to reconstruct the original Perl 6 source, complete with whitespace and comments.

perl6-Perl6-Parser is available in the ecosystem for trial. It's very much rough around the edges, and can so far handle only a relatively narrow range of Perl 6 code, but that will quickly change, I'm sure. Once it's further along you should be able to integrate this into things such as pretty-printers, editors, syntax highlighting and other tools. It takes compilable Perl 6 source and generates a tree of Perl 6 objects, which themselves have a .perl6 method to return the original Perl 6 source. Or feel free to override the .perl6 method and format your Perl 6 code how you want it.

Perl 5 Porters Mailing List Summary: September 29th - October 10th

Hey everyone,

Following is the p5p (Perl 5 Porters) mailing list summary for the past two weeks. Enjoy!

Hangman

So I'll confess that I've had a big crush on Haskell for a couple of years now. I've tried and failed many times to really get beyond trivial code, but I'm utterly fascinated by the code one can write with strong, static typing. It can feel contrived at times and very constraining, but I can definitely see the benefits, which is why I'm so excited that Perl 6 has (gradual) types!

Dancer2 0.204000 improves app config, content caching, and dependency management

Fresh off of Perl.Dance 2016 is Dancer2 0.204000. The latest version of Dancer2 is on its way to a CPAN mirror near you.

This version brings some compelling enhancements and features:

  • Improved configuration handling (Jonathan Duff):

You can now create a local version of your configuration files which you then do not need to commit to any repository. If you create a file called config_local.yml, you will have a local config.yml. You can do the same with any configuration file, just change the filename to end with _local.

You can now set the DANCER_CONFIG_EXT environment variable in order to only load configuration files of a particular type (such as JSON). For example: DANCER_CONFIG_EXT=json plackup bin/app.psgi

You can now get some diagnostics information about loaded conifguration files by setting the DANCER_CONFIG_VERBOSE environment variable to a true value.

  • Improved static content caching:

Automating deployment of my personal Perl projects with Dokku

Last weekend I completed an article about deploying my personal Perl projects using Dokku - it might be interesting if you have similar needs!

Split amino acid and nucleotide sequences

A labmate got a FASTA file of sequences that had a mix of amino acids and nucleotides that she wanted separated into separate files. Here's a little script to do that. Again, I wish there was an easier way to get the basename for a file that does not have the extension.

#!/usr/bin/env perl6

sub MAIN (Str $file) {
    my $ext   = $file.IO.extension;
    (my $base = $file.IO.basename) ~~ s/\.$ext$//;
    my $dna   = open "$base.fna", :w;
    my $aa    = open "$base.faa", :w;
    my $fh    = open $file, :r, nl-in => '>';

    for $fh.lines -> $rec {
        next unless $rec;
        my ($header, @seqs) = $rec.split(/\n/);
        my $seq = @seqs.join;
        my $out = $seq ~~ m:i/^<[actgn]>+$/ ?? $dna !! $aa;
        $out.put(join("\n", ">$header", $seq));
    }

    put "Done.";
}

Yet another FASTA something

Yes, I write a lot of scripts having to do with parsing FASTA. I want to put lots of example code out into the wild so people have things to read and copy. In this example, a student needed to take a subset of reads from a set of FASTA files as her assembly was failing due to excessive memory requirements. This script will process a list of FASTA files to take the first "n" (default 100,000) reads from each, placing the output file into "out-dir" (or the same directory as the input file). So as not to accidentally overwrite the original data, I append an integer (1, 2, ...) if the output file already exists.

A discussion of DBIx-Class governance and future development

Due to a dispute on the exact nature of the future of DBIx-Class development after Peter Rabbitson's pending departure, a conversaton has been opened on the DBIx-Class mailing list to feel out what the users of DBIx-Class think.

If you have an interest in the module and its future, please have a read of the current sitation, and maybe leave a note on your position:

http://dbix-class.35028.n2.nabble.com/IMPORTANT-A-discussion-of-DBIC-governance-and-future-development-tt7578987.html

In order to leave a comment of your own, you can subscribe to the mailing list here:

http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class

With David Golden's permission, i reproduce a copy of his email below:

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.