One module I discovered a few years ago, and seem to end up using for many things, is Set::Object by Sam Vilain.
Although this initially looks like a degraded hash - it holds a number of scalars and references - it comes with a whole batch of set operations (union, intersection, differences etc), and its fast.
Its also been consistently and carefully maintained, and Sam is a responsive maintainer.
Set::Object has been far more useful to me than I first expected, has preserved me from a ton of code mangling hashes to do the same operations, and is a really useful part of my toolkit.
The only downside is I mostly use it when working on billing related code at work - an occupation that does not fill me with joy :-/
Another obligatory Lacuna Expanse post. JT Smith announced the creation of Lacuna Expanse, a free online game with the backend written in Perl. Most free online games are rather dull (I've tried a few), but this one shows promise.
While on news (and starting posts with the word "while"), Perlbal has moved to Github.
I have a lot of issues revolving Perlbal. I wish there was more development on it, I wish it catered to more generic situations (I've found myself needing a few good hacks for it and abandoning ideas because of it), I wish there were more hooks, there was more DOCUMENTATION and a decent website. I wish, I wish, I wish.
I have been trying to do several of these but my tuits have run out (expect a post relating to this).
Hopefully with the move to Github, it will be able to accept changes from the community more easily and perhaps fuel more development into it.
So I heard about The Lacuna Expanse http://www.lacunaexpanse.com here on blogs.perl.org the other day when Jesse Thompson posted about it. It's a "massively multiplayer strategic empire simulator" written in Perl.
I started playing last night after work. I choose the rather unimaginative empire name of "Mr. Muskrat's Empire". I renamed my colony "Luas".
The GUI is very polished looking. The graphics are very detailed for a browser-based game. You have multiple zoom levels to choose from. I typically keep it zoomed all the way out unless I want to the see new details of buildings as they are upgraded.
They are running three contests (at last count). I entered the volcano contest and already received my volcano! I won't tell you what it does but you might want to enter fast before all ten are gone. I am entering a second one as I type this up; I want the Kalavian Ruins because they look a lot like the Colosseum (and I really want to know what they do).
I fixed some nasty bugs lately and get these days ready for the next testrelease. Im happy that this release brings also some new features. And I don't mean new for Kephra, but literally unknown to many editors. and in this episode I will highlight just 2 of them.
I already mentioned, that if you select a text by holding the left mouse button and while its still pressed you push the right too, the text gets deleted (opposite of acme). Now i just seperate the direction you selected it. If its from left to right, its cuts, meaning remember in the clipboard. if you do it backwards, its not (function called clear.). In times you still have something in the clipboard, that might come very handy. I found this kind of editing very fast and I like it the more i use that.
If you're using Dancer, there is already a small plugin someone wrote (as his first CPAN upload) called Dancer::Plugin::SiteMap which provides the same idea by adding:
use Dancer::Plugin::SiteMap;
to your code.
P.S.:
I personally love Catalyst and use it on several large-scale projects. If you don't know it, you should!
A few months ago a client asked if could help them with a "double encoded UTF-8 data problem", they had managed to store several GB of data with "corrupted" UTF-8 (technically it's not corrupt UTF-8 since its well-formed UTF-8). During the process I developed several regexs that I would like to share and may prove useful to you someday.
Due to the UTF-8 encoding usage of prefix codes it's easy to spot a double encoded UTF-8 sequence, the prefix code is within the range of U+00C2 to U+00F4, followed by one or more continuation codes within in the range U+0080 to U+00BF.
Here’s a bitter, but very accurate description of what goes for open community development in the realm of .NET (Thanks, Merlyn!). It’s a pretty sad state of affair, and I can attest for at least some of it, mainly:
”Last year Microsoft released a new web framework called MVC. It’s not new by web standards … Yet people were waiting for it. People were waiting for Microsoft to deliver it to them.”
”Microsoft themselves … are so cleverly changing just fast enough to keep developers from solving problems themselves.”
And this also goes for faulty “standards”. Some half-baked ideas (like the Microsoft .NET remoting framework) are getting implemented into core systems before someone, Microsoft or else, realises that these are the technical equivalent of horse manure that spent several days in the sun, and now, not only that they are stuck with it, but Microsoft is no longer providing support for their festering framework of scum and villainy.
While normally I never play Facebook'y web games like Farmville, clearly an exception should be made for Lacuna Expanse, especially since it's made with Perl and since it's only been running for 2 days, we can set up a nice little Perl posse in the very first week and rule the universe!
(Evil laugh follows, echoing and trailing into the distance)
(I am contactable with the rather unimaginative empire name of "Adam")
This game probably also marks the highest volume and potentially most high profile user of Email::Stuff (one of my favourite little creations) outside of myself and Ricardo who now maintains it.
It's royalty report time, so the mailbox was full of checks this week. I keep close tabs on how well my books do so I can figure out if the time to write the books would have been better spent making fancy coffees at Starbucks. I think I'm slightly ahead, but only slightly.
However, I noticed that the total revenue for Learning Perl, 4th Edition is very close to $1,000,000 for the 20 quarters it has been available. And, curiously, it's getting closer to that number even though the latest edition has been out for 9 quarters. Who's still buying the old edition?
Even better, though, the Fifth Edition is already over $500,000 in total revenue. Now, only a small slice of that gets to the authors, especially on a title with multiple authors, and that only comes four times a year over several years. My cut of Learning Perl, 4th Edition is only 1%, so I'm not buying any Bentleys.
I use the nifty Data::Rmap to "flatten" DateTime objects into strings so they can be exported to JSON and handled outside Perl. But due to circular checking in Data::Rmap, this:
If you want syntax highlighting when viewing docs and source at search.cpan.org, you don't actually need to use Greasemonkey. You can do it with Plack and be up and running in just a few minutes.
Last night I gave a lightning talk about this at Toronto.pm and I've just posted the slides
cd cpan-mangler
plackup -I../Plack-Middleware-HTMLify/lib
---
Once you've got that done, just point your browser at http://localhost:5000 and use search.cpan.org as you normally would. It's the same site, only prettier. Now, it's not perfect, but it's a fun idea. Using the proxy setup you can bend the site to your will and add or remove features as you see fit.
For my recent projects, I've been using Dist::Zilla and enjoying its very advanced features. The reason I've never used it before? I thought it had a silly name. I still do, in fact, just that I managed to ignore the silliness enough to find out it incorporates some major wins.
Another project I overlooked is KiokuDB. I was looking around for a non-relational/Object-based/Document-based Database (aka NoSQL), and kept overlooking KiokuDB for two reasons; first, KiokuDB is a front-end to several different back-ends, including RDBMS like MySQL and Postgresql, making me unsure whether it is a true object-based DB, or just a glorified ORM, and second, it has a silly name.
I knocked off another big chunks of distributions that MyCPAN didn't like. I worked on the 700 or so dists that it couldn't unpack, and that number is now down to about 30. The changes to my method weren't that dramatic, but it clears up a bunch of the problem dists.
First, I was stopping too soon. Many archives unpack just fine even if they give warnings. Now I'll just record the warnings and wait to see if I get a directory with some files in it.
Second, I was using an HFS case-insensitive file system (stupid, but it's the default). Many distributions did not like that. Moving everything to a case-sensitive file system solved many of those problems.
Once I find out why Foo-Bar-0.01.tar.gz doesn't unpack, I usually solve the problem for all Foo-Bar-* series which probably had the same problem.
JT Smith and his crew have created a massively multiplayer online game called the Lacuna Expanse. The game is great, but the coolest part is that the back-end is written entirely with Perl!
I've mentioned this elsewhere, but I thought it was worth mentioning here: my wife and I are moving to Amsterdam next month. After three lovely years with the BBC, I'm giving in to the temptations of Amsterdam and booking.com. Here comes a new adventure!