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 ;)
Back when I was first learning Perl, I'd been doing Unix system administration for a couple years, and one command I ran a lot was this one:
ps auxww | grep something
(On some systems it was 'ps -ef'.) That would get a full listing of all running processes and grep them for "something." I soon got tired of typing all that, so I made a shell alias:
Let’s say you work on a team that runs a web content management system for various different customers. It is hosted at ourcms.com, but each customer’s public content is published on a different domain, which is determined by a setting in the interface, which they can change at will. When a customer is logged into ourcms.com they see links to their public content in various places, and some of the public content has “edit this”-type links back into ourcms.com. All of this runs as a single PSGI application. A not unfamiliar scenario, presumably.
How do you spin up a development server where you can test this?
I had a little hiccup while installing Perl 6 on a CentOS system, and thought I'd leave the details here in case it happens to anyone else.
[Update: This has already been fixed by one of the Perl 6 devs, who isn't able to login here to comment. Panda installs without needing lsb_release. So my kludge is no longer needed.]
I used rakudobrew, and installed rakudo with moar just fine. But "rakudobrew build-panda" failed with "Unable to execute 'lsb_release -a 2> /dev/null'". That lsb_release program wasn't installed on this system, but yum said I could get it from the package redhat-lsb-core. Unfortunately, when I tried to install that, it came up with a list of dozens of dependencies to go with it, including a lot of X stuff like ghostscript and libGL, even some sound packages.
Stuart Cooper gave a talk at this last month's Sydney PM meeting. His talk was "analog" in that he gave it without slides from hand written notes with the purpose of provoking a guided discussion. The outcome was rather successful with people offering thoughts and experiences, along with references to websites and books. It was very productive and enjoyable.
He typed up and published his notes on the Sydney.PM emai llist, which are posted below with hyperlinks added for reference.
EVANGELIZING PERL Talk by Stuart Cooper for Sydney.pm meeting, July 2015
1) Perl advocacy?
Not advocacy - evangelism - spread the word.
In the early 1990s Linux had some powerful Evangelists;
Linus himself, Jon 'Maddog' Hall etc and even one of the
world's top supermodels - Linux Evangelista.
Your target audience for your evangelism is your Linux-using co-workers.
They might be Ruby guys, DevOps guys, sysadmins, Java programmers,
any group of intelligent Linux users.
So, I have been meaning to start a Perl 6 blog for a couple of months. At that point, though, this site was having issues and I have this perverse desire to write blog software every time I think about blogging and so things got put off for a bit. I am now starting this here and I want to get write off and start with what I think is my most important Perl 6 contribution thus far and one I want to get your feedback on: P6SGI!
For those that need instant gratification, here is a P6SGI application: