Today I've finally updated the Perlito compiler ChangeLog, this covers a little more than a year of commits.
The most significant update was the new Perlito5-to-Java backend, which is work-in-progress. It covers a lot of ground, but there is a lot more.
There were also some interesting new Perlito5-to-Javascript features, such as regex /e modifier, and file operators support in nodejs.
The Perl6 backends have not been updated, but things still work.
While reviewing the README-perlito6 file, I've found some interesting stuff that I haven't touched in a while - here is a piece of generated code that goes through 3 different languages:
Perl hackers have now, as of today the 16th August 2015,
been uploading Perl modules onto CPAN
via PAUSE
for 20 years.
Andreas König, who did that first upload, is still releasing to CPAN,
and as I write this his most recent upload
is the same module that was first released to CPAN.
Can you believe CPAN has been around for 20 years today? Two decades is a long time! Yet, I cannot imagine my workday without it.
My contributions to the CPAN Day celebration:
Helios 2.83 is a minor release of the Helios distributed job processing framework. It contains official SQLite support for the first time, better schema DDL for Oracle databases, and some cleanup of some files with mixed-format line endings.
Helios::Logger::HiRes 1.00 is the first stable release of a plugin module
providing enhanced logging features to the Helios framework, including
sub-second timestamp precision (provided by Perl's Time::HiRes) and a
command line log searching tool.
Thank you to everyone who contributes to CPAN, both package contributors and those that maintain CPAN itself. Happy CPAN Day everyone!
Let's say you have a glob pattern with shell-style wildcards from a config file or user input, where ? matches any character and * matches any string (0 or more characters). You want to convert it to a regex, maybe because you just want to match it (and Perl already supports regexes) or because you want to embed it as part of a bigger regex.
You might start with a naive replacement:
s/\?/./g; # ? -> .
s/\*/.*/g; # * -> .*
Unfortunately this is broken: It leaves all other characters untouched, including those that have a special meaning in regexes, such as (, +, |, etc.
If you've got one or more distributions on CPAN,
then on CPAN Day you could go through them and see if there are
any ideas you've had which aren't listed in the issue tracker
(typically RT or github issues).
If you don't have any distributions on CPAN,
then you could go through the modules that you regularly use
and see if there are any issues you could raise.
I'll expand a bit on what I mean, and why it might be a
good use of your time.
Are you sitting at home thinking "I've got all this free time, I really want to make use of it playing around with bitstrings using pack and unpack" ?
Your search is over! I need your help!
For some time now I have been chipping away at enhancements for Net::DHCP. Recently I have begun adding tests using packet captures from the real world. Naturally this has created a laundry list of possible enhancements including DHCP options which need special attention to make sense of.
That and the tangled web of quirky clients which require dhcp options to be in certain (non-numeric) order - for no logical reason.
Hi. I continue to share some swat news. SWAT is automation test framework written on bash/perl and providing a simple DSL to rapidly create smoke tests for web applications.
Mojolicious is a ... ok ... everybody knows it :) - well known web application framework.
Recently I found it quite interesting idea of generating swat tests for existed mojo applications using routes introspection.
So this is how I created Mojolicious::Command::swat
This post is mostly geared towards Perl 6 newbies who plan to attend the Perl 6 Hackathon at the Swiss Perl Workshop 2015 in Olten, on Thursday, 27 August 2015.
First and foremost: Don’t be shy and come even if you have never contributed to the Perl 6 ecosystem. Neither have I, and I will be there. There are always tasks that do not require insights into the Perl 6 toolchain. This hackathon is pretty much a one-time opportunity for Switzerland. There will be a dozen of Perl 6 core hackers on site, and some of them will even help you get Perl 6 up and running.
Please add yourself to the list of attendees. We will then organise a seat and food for you. On the link mentioned, you will also find extensive information and links to preparational material. (Thank you, Wendy!) Most of the text below is copied from there.
Here's something odd; not sure if it's a bug or just something I don't understand.
I have a utility on my system called k8temp which reports the temperature of the CPUs. It reports it in Celsius, so I thought I'd write a little wrapper that converts the temps to Fahrenheit. k8temp outputs one line per core, so on my dual-core system, the output looks like this:
abaugher@bannor> k8temp
CPU 0 Core 0 Sensor 0: 38c
CPU 0 Core 1 Sensor 0: 38c
abaugher@bannor>
It's hard to believe its August already! Catalyst-IT have offered to host us this month, so I went ahead and booked their board room.
What: Sydney PM
Date: Tuesday, 18th August 2015
Time: 6-9:30pm
Where: Catalyst, Suite 501-504, 89 York St Sydney NSW
The building locks it's doors at 6pm, so one of their staff will let us in. The same as Broadbean, SiteSuite and others. For stragglers, a contact mobile number will be posted on the SydneyPM email list the day before.
We've probably all got one or more modules that we're very thankful for.
Maybe you use it again and again. Maybe the fact that it exists saved
you from having to write it yourself. Maybe it's such a well-crafted module
that you don't need to think about it, but always have it on your tool belt.
Maybe for/on CPAN Day, you could do or organise something related to
that module, as a way to say thank you, perhaps to improve it for all of us?
One of the corners I often paint myself into when developing a tool is only accepting one type of input, usually STDIN, the standard input stream, like a pipeline (ex: cat fruit.txt | grep apple) or a redirect (ex: grep apple < fruit.txt)
What inevitably happens is I end up wanting the tool to work like any Unix tool and accept different kinds of input (filenames or arguments on the command line, for example.)
Finally I got fed up with it and added a function called multi_input() to my library. Here is how it works:
I noticed Perl 6 has a Benchmark module already, so I was wanting to use it, and Liz's suggestion of using index() rather than a regex in my last script gave me an excuse. The results were striking.
The script and results are below. Benchmark.pm6 doesn't have a cmpthese() routine, but timethese() does well enough. Below is the script, then the average times required for one grep through the array of about 150 lines. (I ran the script five times and averaged those times in the bottom row of the table.)
What did I learn?
Well, for starters, index() is at least 10 times faster than the best regex solution, and 100 times better than my first attempt. So that's the way to go, whenever possible.
HTTP::BrowserDetect is at least 15 years old. I've had co-maint on it for 5 years now and I've summarized its current state of affairs. The full story is available on my blog.
Earlier I wrote this blog post, which in summary says value of a Perl software project, as opposed to a Perl infrastructure project, is difficult to quantify until the software is written and used. And it often does not work nicely with our grant program where grant value has to be determined before the software exists.
For instance, if I request a $2000 grant to improve a popular Perl module's performance by 1000 times, I imagine I'll get the money provided I can demonstrate the performance improvement with some proof-of-concept code.
What if I propose to write face recognition software in Perl which finds your doppelgänger from images on the web? And if I request $5000? It's not hard to imagine your reaction will be "an interesting idea but how does it help the Perl community?"
There are already a few blog posts around (e.g. SAP Hana and r — the way of the widget), which mention that it's possible and, in fact, quite easy to connect to SAP HANA from Perl code using ODBC DBI drivers. As I'm planning to give a bit more specialized talk at this year's YAPC in Granada I thought it would be useful to describe the setup in detail and provide some references. In the follow-up posts I'll draw more on the topic of my upcoming talk: how ad-hoc OLAP DBs can be conjured with Yertl. BTW, I should probably add "yet another" to the prefix to the title of my blog post, to follow the widely accepted manner of affirming the prevalence of already existing ideas ;)