After reading about chromatic's Mojolicious::Plugin::UnicodeNormalize I thought "I could have a crack at that" and created a similar thing for my own framework of choice, Dancer2. Having never written any code that might possibly be of any utility to another human being, I have never uploaded anything to CPAN. Anyway, now there's Dancer2::Plugin::UnicodeNormalize.
Though that's not as interesting as the cool things about uploading to CPAN. The first cool thing is how simple it is with Dist::Zilla which pretty much takes care of a whole load of stuff you used to have to do by hand. It has a plugin system to do neat things like Git integration (version tagging, changelog generation and such). I wish a similar thing existed for autotools (maybe it does) but the last thing that project needs is more scripts.
The second cool thing is CPAN Testers. Anyone familiar with Perl will probably know about this already, but I think it warrants mentioning at every possible opportunity... the family finds it a drag at Christmas dinner, but I will not stop. CPAN Testers is an integration framework in which a team of excellent volunteers will build and test your code on a dizzying variety of platforms. I don't have any MacOS or Windows installs here, but I know my code builds, runs and passes all tests on these platforms.
If only you could find this out before releasing the distribution... Oh, you can. -TRIAL releases are not
indexed for general release on CPAN (they show up as developer releases), though they are tested by the CPAN Testers.
Releasing a trial with Dist::Zilla is as simple as
dzil release --trial. Give it a couple of days
and you'll have access to dozens (or even hundreds) of verbose test logs. Failing test results are mailed to you.
It's a bit like Travis CI and the like, but for releases. And it requires no action
on your part, you just get it for free, whether you like it or not. But you'll like it.
Criticise or contribute to Dancer2::Plugin::UnicodeNormalize on Github. This post is longer than the code.
Just a quick note to by-far my largest readership, the spambot community.
It seems that some (~1%) of you have been identifying yourselves as human in the comment form, which is not really convenient for me. I have no problem with you reading, but I don't believe providing links to counterfeit handbags and pills is in the best interests of my few human readers (who, for reasons I will not go into here, get priority).
In an effort to serve everybody fairly, I have added an element to the comment form, the Mystery Box! Under normal circumstances, this should be hidden to human readers (though there are warnings to those who dare to peer beyond the silken css veil (I'm talking to you, lynx users)). Spambots are free to roam and play in the Mystery Box, POSTing URLs or encouraging comment on "this issue", while humans should have the sense to leave well enough alone. Some mysteries are best left unsolved, as Nigel Tufnel says.
If any spambots have trouble grasping this (I know bots probably prefer to consume code), here is a diff:
A couple of posts ago I mentioned A Megadrive Gamepad Repair I did.
While it's a great pad for use on classic computers and consoles, it's not so usable on a PC without dedicated hardware... which we can build quite easily with an arduino and an old serial socket.
There are projects to have the arduino act as a standard USB HID device, but after much trial and more error I could not get it working reliably. The alternative I chose was to send the joypad status over plain serial (the Arduino's FTDI serial device, the serial socket mentioned elsewhere is to plug the gamepad into) and issue Xlib key down/up events based on this to the currently focused window. Simply plug the arduino in, run 'sendkeys' and away you go. Arduino and C++ code is linked at the bottom of the post.
I connected the lines of the (9 pin D-Sub) serial socket to the Arduino (Nano 3.0) like so:
+-------------+-------------+ | Serial | Arduino | +-------------+-------------+ | 1 | D13 | | 2 | A0 | | 3 | A1 | | 4 | A2 | | 5 | +5V | | 6 | A3 | | 7 | A4 | | 8 | GND | | 9 | A5 | +-------------+-------------+
The Gamepad can now plug straight in. I used the analogue pins just to keep them out of the way while experimenting with USB.
Video of the Gamepad in action using the Gens/GS Megadrive Emulator. Yes, I know the gameplay is poor, but it wasn't the most comfortable playing angle :) :
Gist for the (single pass) code - comments and contributions welcome.
What the fucking shitballs, more youtube? No! It's vimeo!
This has been knocking around a while, a film by Ignacio Uriarte (I could be a wanker, look up a bunch of shit on the internets and pretend I know who he is but I really have no idea) which appears to be Winslow listening to a recording of a typewriter in his headphones and immediately reproducing it with his vocal talent and a range of mics and geegaws.
Michael strains, chokes, winces, stares and pops a few veins (and just the occasional eyeball) for the benefit of this film. As entertaining as this is, I can't help but wonder what he's hearing. Would including the other part of the audio give it too much of a You Bet! vibe?
Just remember to change your ircname in irssi to prevent you getting kicked from less enlightened freenode channels.
Which console gamepad is best, the PS3, Wii or XBox 360? Well, none of the above. While it's not my absolute favourite, the Sega Megadrive's original 3 button pad is great. Solid D-pad, great buttons - just the right amount of touch needed to engage the controls, comfortable fit in the hands. One of the best things about it is its "Atari" joystick compatibility, meaning it can be used on the Atari 2600, ZX Spectrum, Commodore 64 & Amiga, the Vectrex and countless others.
Amongst the towering piles of crap I own which will one day collapse and bury me or land me on one of those TV shows about tragic hoarders who need regular visits from social services, is a pair of original Megadrive controllers. These have been through a few hands at this stage and aren't in the greatest nick - for example, they have teeth marks on them. They are literally chewed up. I know the games were frustrating back then, but that's a bit much. The bad and sad part is, if we put Columbo on the case, he'd probably find they were my teeth marks.
Anyhoo, the last time I tried them, I brought them to a friend's house for use on his C64 (which is now mine... what was that about towering piles of crap?) I noticed the D-pads were unresponsive and inclined to get stuck, so made a note to open them up and see what the problem is.
It turns out the D-pad is guided in travel by some tabs which are housed in slots inside the controller - without these, the thing has a tendency to turn / get stuck. It turns out, in each of my controllers one or more of these had broken off and gone missing. I had to fashion new ones (from bits snipped from a spare CD case - perfect width). They couldn't be glued straight onto the pad as the available surface would be too thin to support them. I had to make a fixture to glue the tab onto. Since the fixture itself would impede travel of the D-pad in the opposite direction, it had to be sanded down as much as possible without breaking.
Anyway, I was surprised by how well this worked and the fix seems pretty robust - I gave it about as much force as I would estimate it would take to break or bend one of the original tabs and it stayed in place. I tried out a few games and noticed nothing that dampened responsiveness of the control (that said, I am fairly shite at games... youtube channel of me being shite at games coming soon!)
Tune in next time when I will walk you through my 6-hour repair job of a PS3 controller I got in Argos for a fiver.
Dark patterns are user interface elements designed to trick people into performing some action they may not have intended.
Google+ offers a single sign-in feature for stuff like blog comments - an example of this can be seen on this blogger post. This is how the comment box is presented to me if I am signed into my Google account:
Now, if you're not paying close attention, you may miss the G+ logo or the 'circles' - it appears to me that this is a text box inviting me to add a comment under the name on my Google account. In actuality, the entire area is a "button" which takes me to a Google+ sign up page. Tricked!
Oh god, not more youtube! YES! More youtube.
One of the defining features of the C64 (other than its ability to run decent games on a sub 1MHz (in PAL regions) processor) is the SID sound chip. Channels this, waveforms that, filters the other, the specs don't matter here. What matters is that the tunes and effects blew us away and ZX Spectrum owners like myself found it hard not to admit to no small amount of envy. We managed anyway.
Later models of the ZX Spectrum had the (barely) comparable AY-3-8912, but it just didn't have the same range...
...Or perhaps it did, here's a demo of a "SID player" running on stock Spectrum hardware from 2003:
OK, so this is actually some crazy hackery to get a broader range of SID-style crunchiness from the AY rather than an actual SID player - still sounds cool.
Ghosts 'n Goblins was a pretty popular platformer back in them 80s we used to live in. I was a huge fan of this game back then (and later Ghouls 'n Ghosts) and came so close to the final level many, many times. This is what kept me playing, the precious ending was just in arm's reach!
...or was it? In keeping with this site's pattern of posting youtube links in lieu of actual original stuff, here is Angry Video Game Nerd completing Ghosts 'n Goblins. If I had known of this back then, the game wouldn't have gotten nearly as much time. I'm almost bitter.