Config::Tiny V 2.15 supports utf8

Hi All

I made myself co-maint of Config::Tiny, and, after not hearing back from Adam for over 2 weeks after I sent him the following outline (from the Changes file) of my proposed patches, I've released V 2.15:

2.15 Sun Aug 4 14:59:00 2013
- Clean up the shambolic dates in this file.
- Add a note under Caveats about setting options more that once. Only the first case is respected.
Thanx to Kimmel K. See RT#69795.
- Add a $encoding parameter to read_file() and write_file(). See docs for details.
Add t/04.utf8.t and t/04.utf8.txt.
Thanx to Mark Lawrence and Wolfgang Husmann. See RT#71029 and RT#85571.
- For BSD-based systems, when writing a file during tests, use:
my($temp_dir) = File::Temp -> newdir('temp.XXXX', CLEANUP => 1, EXLOCK => 0, TMPDIR => 1);
- Rename t/*.t files. I use '.' rather than '_' in file names because the latter is a shift char (and I'm lazy).
- Add MANIFEST.SKIP, Changelog.ini, Build.PL, META.json.
- Add an FAQ to the docs.
- Clean up the docs.

Report bugs via RT, as usual (for me).

Let the bugfest begin!

Wx::Perl::Smart::* (technical advantages of GCL)

As en extention of my last post, where I introduced the first rough ideas of the still changing GCL syntax, I want to write now about further advantages of the DSL I created this new namespace for. Yes it reminds a bit on smartmatch, but that's wanted, because these modules that implement the functionalities of GCL in the Wx realm (second planned target is Prima because I cant install Gtk2 here) and there is a lot things going on depending on the type of the value, exactly like in smartmatch. Plus the Wx::Perl::* namespace will be more free for other normal modules that do far less magic.

Planet Moose - August 2013

Welcome to the first edition of Planet Moose, a brief write up on what's been happening in the world of Moose this month, for the benefit of those of you who don't have their eyes permanently glued to the #moose IRC channel, or the MetaCPAN recent uploads page. The intention is to cover Moose and similar OO frameworks (Mouse, Moo, p5-mop), along with interesting developments to their dependencies and dependent projects.

This edition is a little sparse because it just contains the news that I happen to have noticed. If you have any items you'd like to be included in the September issue, add them to the wiki! That way it might not be so tobyink-focussed next month.

Progress::Any update (2)

This is the second API revision for Progress::Any (0.10). There are a couple of minor incompatibilities introduced, but I think not major like in the first revision a few months ago.

The cause of this second revision is that I want to be able to specify an estimated remaining time even though I haven't given target (or even when target is undefined), or done any update()'s. Plus, I want to do some refactoring to eliminate duplicated code.

Estimating remaining time of tasks

For example, suppose you are writing an installer. You have 3 subtasks: download packages, install the packages, and setup them. After you have done testing on several development machines, you know that the typical average duration for each subtask is respectively, 5, 15, and 10 minutes. You can now say:

Strawberry Perl uninstall / Active Perl install Issues on Windows

I have had a little problem getting a working Perl on Windows over the past few days. I was having a lot of trouble somehow getting a working dmake and mingw to compile code, among other things.

Here's what happened in my latest attempt, for your benefit:

  1. Created a clean Amazon EC2 Windows 2008 server.
  2. Installed Strawberry Perl 5.12. Had issues compiling modules with cpan. Uninstalled Strawberry Perl.
  3. Installed ActivePerl 5.16.3. Ran cpan, dmake and mingw downloaded and installed properly. Rebooted so %PATH% would be updated.
  4. Tried installing any module, immediately failed.

This is the important part: Strawberry Perl sets ENV variables in an incompatible way to what ActivePerl wants.

11:26 <@BinGOs> they mess with how the META parsers work.

So I ran this at the command prompt:

set PERL_JSON_BACKEND=
set PERL_YAML_BACKEND=

Everything started installing after clearing these variables.

Write GUI faster -> GCL

A goal that set my juices to flow is to make Perl a first class GUI language. Like back in the days even hardcore Java people took TCL to whip up a small graphical frontend app. This should now be done in Perl, because Perl can be simple but powerful when you need it. It just lacks some nice sugar to get a Gui fast. And GCL is my attempt to achieve that.

Underappreciated Perl Modules, UAVs, and Musings on Programming

In an effort to follow JT's advice about writing something new every day, I've queued up some articles over on my blog. Most of them will be about Perl programming, but also some UAV and Arduino stuff.

The first one today is about File::ShareDir, which I think is an underappreciated module that solves a problem we'll all probably hit sooner or later.

Proposal: elseif be an alias for elsif (as in foreach and for)

Perl 5 Internals - Part One

This is a cross post from my blog.

Last week I completed a two-part training at work on perl's internals, led by Yves Orton and Steffen Mueller. We covered some of data structures used by the interpreter, as well as some of the optimizations it uses and the consequences of how those optimizations are implemented. Someone on Twitter asked me if there were any slides available, and unfortunately, the talk was conducted in a very ad-hoc fashion (which actually probably contributed to its success, as the audience was able to propose new areas to cover). However, I did end up taking some notes, so I'm going to summarize those here along with what I remember. A lot was covered in the two sessions, so in the interest of actually getting this information out (I tend not to publish things that I can't write in one sitting), as well as keeping your attention, I'll be publishing them in a series of posts.

Required Background

p5-MOP speedups, new traits and more ports

I recently took a vacation with my family and actually didn't spend any time working on p5-mop-redux (or any code for that matter) which was actually kind of nice (odd but nice). But thankfully Jesse Luehrs, my co-conspirator on the previous p5-mop attempt, found himself with some free time and so was hacking away. He ported one of his newest modules, Reply (which is a really nice REPL for Perl, you should try it) and noticed that the startup time was pretty slow (something important for a REPL). Of course this is to be expected in a prototype, but still, Jesse went and added this simple method cache which resulted in an almost 3x speedup for startup time.

Jesse also added two new class traits both of which are important for enabling users to subclass MOP based classes using non-MOP based classes.

Tomato Plant vs. Nuclear Plant

With great interest I read When "unsafety" is a Good Thing and brood over Gabor's comment regarding "inconvenience vs. danger".

In my job, I have done a fair amount of coding these days. Mostly smaller tasks, you know, the sort of problem you just not so easily solve with Excel. I did some gardening, so to speak..

GraphViz2, MarpaX::Grammar::Parser and MarpaX::Grammar::GraphViz2

OK. I've expanded MarpaX::Grammar::Parser V 1.01 so it now has a cooked_tree() method.

All trees discussed here use Tree::DAG_Node.

The code now takes the output of Marpa processing your grammar (still available via the raw_tree() method), and post-processes it to provide just the user's grammar. That is, it is shorn of all the Marpa-specific details.

The main purpose of cooked_tree() is as input into MarpaX::Grammar::GraphViz2 V 1.00, which converts your SLIF-DSL (a type of BNF) into a visual representation.

During this, I found a bug in GraphViz2, so it's now at V 2.20.

Lastly, the demo page for MarpaX::Grammar::GraphViz2 is here.

Perl multithreaded Amazon Glacier client

After one year of development mt-aws-glacier vsespb/mt-aws-glacier, mt-aws.com App::MtAws moved from beta status to stable.

It's written in Perl for POSIX systems (there are reports of successful use under Linux, BSD, MacOSX, Solaris).

It does have extensive testsuite, minimum dependencies, "full" unicode support (well, of course it's not full. there is probably no single application with full support),
multithreading implemented using fork(). HTTP(S) using LWP::UserAgent with workarounds for existing issues. Total SLOC is over 20k, more than 1000 commits.

Full list of features: here

Anyone miss Mojolicious' memorize helper?

Mojolicious’s 4.0 release came with lots of shiny features but it also came with a lot of housecleaning. One of the old things swept away was the memorize helper, which would cache a part of a template and prevent its repeated evaluation. Do you miss it, as some users undoubtedly do, or else does this helper sound useful to you? Then read on, because its back and better than ever!

Am I pandering to the smoke testers?

I have a quick sanity check I'd like to throw out there.

I've been working all week on Alien::TinyCC, and I made some great progress. My initial distribution wasn't properly checking that the build steps completed successfully, so I wasn't getting any useful information back from the smoke testers. Once I fixed that, I started to get some useful feedback. Mostly.

How to get more/better Perl articles & docs

Disclaimer: the docs things starts at paragraph 3.

Within 2 Weeks I was in Kiev and St. Augustin, giving 6 instances of 3 talks. My minireport on Kiev got published (in German) but there is a lot more to say of course. In Kiev Wendy talked me into the frogcon (the frog is the official logo because if you add an H ...) thing. And it was the best Perl booth/dev room we had ever there and i had a nice kinda YAPC after party, which sparked some thought what could be improved for the Perl world.

Cooperative module maintenance?

The other day I wanted to send a patch to WWW::Mechanize and it turns out it is now hosted within a Github organization called libwww-perl.

Then I read a comment by Ether, about the Perl-Toolchain-Gang, another Github organization with several members that maintain a bunch of modules.

The perl6 organization on Github includes many Perl 6 related projects.

Then there is the perlorg organization that holds the source code of the Perl.org, CPAN.org and PM.org.

I am really glad to see such cooperation is on the rise among Perl developers. This might also lead to more people contributing to these modules.

Maybe other CPAN developers would also want to move their projects under such umbrellas. Are there other such "github organizations" for Perl projects?

When "unsafety" is a Good Thing

Some months ago, I read an article by someone who teaches Perl to Java programmers.  In it, the author wonders a bit about some of Perl’s features which seem counterintuitive to those coming from a Java background.  As you might expect, one of those features is its typing.  He says:

For example: stern, protective type safety is not only missing from Perl but actually not even considered particularly desirable.  Perl is relaxed.  The reaction from students is, naturally: “Isn’t this a huge obstacle to getting anything done?” Obviously the answer is “No”, but even after all the Perl I’ve written I sometimes wonder why not.  Is it really just the fact that it takes less time to type method signatures and variable declarations?


At the time I read this, I thought to myself, “Hey, I know the answer to that!” But I just jotted it down as a potential blog topic and let it percolate for a bit.  Many folks reading this will also know the answer, but it’s an interesting topic, and I’m sure someone will get something out of it.

A Catalyst Service Bus (from scratch)

In the following I describe how to build (from scratch) a simple Catalyst application that acts as a service bus for a collection of other Catalyst applications.

Here I'm using the term service bus to describe an application that provides web services to other applications (rather than, say, a JavaScript enabled web browser). This service bus acts as a central hub, taking requests form applications for tasks that sit outside their scope and either executing those tasks or passing them on to other applications.

service-bus.png

The following assumes you have a working Catalyst development environment (see www.catalystframework.org for instructions).

A Service Application

Our service bus will communicate with the other applications using simple HTTP requests and will pass data using JSON strings. Let's start by using the Catalyst helper script to make a Service application:

> catalyst.pl Service
...
> cd Service

Released GitPrep 1.2 - add import repositories feature, blame feature

I released GitPrep 1.2. You can install portable GitHub system into Unix / Linux easily. It is second major release.

Because you can install GitPrep into your own server, you can create users and repositories without limit. You can use GitPrep freely because GitPrep is free software. You can also install GitPrep into shared rental server.

GitPrep (Document and Repository)

Features added in 1.2 are:

- Added import_rep script to import repositories. If you have many repositories, you can move these easily.
- Add blame page. you can know who change source code.
- Add the feature to import branch from other user.

Repositories Importing script is good feature because moving repositories become easy.

Example

You can try GitPrep example.

GitPrep Example

Download

Download

Document

GitPrep Document and Repositry

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.