Found 10 entries.
I last posted here on 13th February which is altogether too long.
Anyway, just to let you know of a couple of things I've been up to recently. Of course, there are plenty of other things too but they'll have to wait for another time.
Firstly, I've been hacking on a small script which helps me generate static websites. Honestly, it is very small and it really does work. It's fast too, though I've only tried it with two fairly small sites so far.
The good thing is, it's data driven and uses templates to put everything together. It's called Blat and I'll probably put it on GitHub fairly soon (though I should try and put it on CPAN).
The first example site I can show you is my new personal site called chilts.org. It's not going to take over as my blog but it is going to start as both a first contact point for me personally and to also point to other places on the web that define me and who I am.
For example, I found out recently about the new .tel tld and once I figured out it was boring and of course chilton.tel was already gone, I decided to do my own site with more, better and nicely presented information.
Also, I thought it would be a good idea to have a place where I can link to everything else from. This also means that kapiti.geek.nz may get a future simplification.
Finally, some of you may have noticed that I haven't posted this entry to Planet Catalyst. The main reason is that it used to be a good place to put up some technical/geek articles and to get a somewhat larger audience. I'm sure the latter is true but I don't think the former is anymore. I fear the more technical articles are getting lost in amongst the non-technical ones (indeed, some articles are by people not even employed by Catalyst) which I don't really think was the original idea for the planet.
Don't get me wrong, I'm not against what the planet is now it just doesn't excite me as much as it used to and therefore I won't be posting to it. Maybe if it changes in the future but we'll see.
Until next time :)
Labels: perl, cpan, github, blat, chilts-org
Inserted: 2009-04-22 23:08 (2 years, 10 months ago)
This week something magical happened and therefore there is someone we owe a great deal of thanks to. As is usual with open source it took one person a huge amount of effort to step up and complete something that needed to be done.
Two days ago, it was announced that the Perl 5 repository was being shifted to Git. After many hours, days and months wrangling with all of the numerous repositories that Perl 5 has used in the past, Sam Vilain managed to somehow mung it all into one coherent Git repo!
Earlier this year, I remember when he would speak to us in work when he was probably right in the middle of doing his various custom conversion tools. He'd be telling us about Git and how other version control systems were lacking in comparison. There was definitely a point whereby everyone would take the piss and note "Hey Sam, you talking about version control systems again?" It is obviously a subject near and dear to his heart.
I'm lucky though since I get to work with such clever and interesting people. Usually those who I consider a bit of a hero due to all of the work they have done, either in groups or individually and for such a good cause (in my opinion) too.
I get to speak to Sam quite regularly, sometimes Perl and sometimes whatever other random subject he's been looking into recently. He's even contributed to a a project of mine (cil) though wish I could say the help was reciprocal. Admittedly, I don't always understand what he's saying - not the words mind, just the sentences(!) - but that's okay, it's good to listen to someone who is a naturally free thinker.
I also found another link from the GitHub guys who also obviously took a liking to our Sam (describing his effort as a heroic one): A Perl Clone Appearing on GitHub.
Just as an interesting note, if I were to describe Sam and his Perl exploits in terms of the TV show Red Dwarf, he'd be a bit like the 'Ace' version of Arnold Rimmer from a parrallel universe. You know, the one where 'Ace' always says:
Smoke me a kipper, I'll be back for breakfast!
to which the rest of the crew just mutter:
What a guy!
Sam, you're a good guy, well done and thanks for all your effort in porting the Perl 5 repo over to Git. Sometimes I feel both Perl and Git go hand in hand since they both have that powerful yet non-restrictive way about them.
And finally, to sign off ... if I were one of the Arnold Rimmers from a parallel universe, I'd be the classic Rimmer we all know and love. And his phrase would be quite apt at this very moment in time:
Stoke me a clipper, I'll be back for Christmas.
Signing off for this year, Merry Christmas and Happy New Year everyone!
Labels: perl, git, planet-catalyst
Inserted: 2008-12-24 20:36 (3 years, 1 month ago)
I saw this meme on Grant's journal (huh, who keeps a journal these days, I knew he was old fashioned). Not sure where he got it from but I thought I'd do it anyway.
\b{The person who introduced me to Perl showed me that...}
Erm, nothing. I was the same as Grant. I introduced myself to Perl and I'm glad I did. At the time, I was living in Germany, had a crappy old laptop, no webbernets and lots of time. I had to do something and somehow, Perl won.
I first starting using Perl to...
...do my own photo gallery website. And yes, I wrote my own templating language. I love the fact that I did it and I think by doing so, my passage towards being a true Perl programmer was complete. TMTOWTDI! It's my party and I'll cry if I want to.
I kept using Perl because...
...after only a few days, I was connecting to The Gimp and writing Perl-Fu modules to generate the graphics, the thumbnails and all the buttons on the site (duly swapped with onMouseOver and onMouseOut). The fact that this language was reading in XML, writing out HTML, reading in jpgs, writing out lots of other images and all these other things made me think that this language was special. At the time, I just didn't know that it wasn't a language at all, and instead was an addictive kind of glue, dressed up and disguised as a language.
I can't stop thinking about Perl...
...because it just encompasses everything I believe in. It has power, expressiveness, individuality, schizophrenia and duct tape (lots of it). It's also free and it has a great community, which are both hugely important factors.
I'm still using Perl because...
...I haven't yet found anything better than it. I'm afraid it's that simple. Other scripting languages don't seem worthwhile enough (or different enough) to spend time on and it's only completely new paradigms like Erlang, which I would consider learning. Whilst a lot of Perl people are saying "Ruby until Perl 6", I'm saying "Perl until Perl 6".
I get other people to use Perl by...
N/A. I don't say to other people that they should do anything. Then again, there's no harm trying to convince someone to use something by showing them it's better. I mean, show them a thousand line Java file or a 10 line Perl program. Also show them ACME::EyeDrops and say "There, you do that". If they reply with "Why would I want to?", you've just won the "Which is more fun?" argument.
I also program in ... and ..., but I like Perl better since...
...as stated before, I've not found a better language, though in the past I have written stuff in C, C++, Ruby, Java, Ada 83 (Ravenscar Profile) and a few other bits and pieces. To be honest, waiting for stuff to compile just bores me to tears. It used to take me a thousand hours to get an Ada program to compile and once it compiled, there was no point running it since I knew it would work! Perl is a refreshing change :-)
Labels: perl, planet-geek, planet-catalyst
Inserted: 2008-07-02 21:33 (3 years, 7 months ago)
For years, it has been said that Free and Open Source Software is created when someone has an itch. That may be true, but I'd like to present a view after that initial itch has been scratched.
I'll start this entry as a question and answer session.
Question: How many times have you created a piece of software - one which scratched that initial itch - but once the initial problem had been solved you stopped working on it?
Answer: Loads. Not one or two, or even five or six. I'd say upwards of 10, maybe even 15 or 20. I even have old repositories to prove it.
Question: Why is it that once the problem is solved, work is almost immediately dropped?
Answer: Mainly it's because the challenge of fixing whatever the itch was then goes away and the itch dies down. Also because the interesting thing you wanted to solve is no longer interesting. It's sad to say that because of this no-one ever sees the beautiful code you stayed up for three or four nights crafting.
Question: So how does a project move from the initial itch stage into being a full blown development project.
Answer: Imagination.
And there you have it, it's that simple. Imagination is the driving force behind any large project. Without it, the project stalls and nothing else gets done. As proof, let me give you a few examples:
Hence, from the above musings, the internet, the World Wide Web, Wikipedia, Linux and ODF all came into being. Though they might have had different thinking at the time, I suspect each of these projects stemmed from someone's first itch but only carried on because of their imagination.
Imagination is important because otherwise projects would just stop. If the itch has been scratched, even if the software is also released as Open Source, no new development will happen since there is nothing taking it anywhere. There is nowhere left to take it - it has fulfilled its destiny (think grep).
The only thing that can take that project forward is imagination. You need to be able to figure out what the next step is, where you want to go and where you want to be. Even if the original need has been fulfilled, imagination means there is always something to do next.
I was thinking about all of this on the bus on the way home from work. I'd just had a conversation in which the other person stated that various government organisations had listed Drupal and Plone as their preferred CMSs. I had been pimping Zaapt as something that is ready to be used in a production site. Granted, those other CMSs have a few more features than Zaapt - and I can point to a few reasons why - but it just seemed that because these other two were the preferred CMSs that Zaapt wouldn't get a look-in. Or indeed any other CMS for that matter.
So that's why I'm glad that I have imagination. There have been many times recently that I have imagined when Zaapt will be used on big projects, hell even government ones. And the reason is because I always wonder what I can implement on Zaapt next (e.g. the list of features needed for v0.2 even though v0.1 is only just feature complete).
At first, you'd wonder if that closed thinking would put me off. Certainly, I'm disappointed but it doesn't worry me, besides, I like a challenge. Zaapt has already scratched my initial itch and fulfils all of the initial problems I set out to solve - in fact, the itch disappeared a long time ago.
But yet somehow Zaapt is now one of only a handful of projects that I have kept developing consistently over the years. The main reason for this is because I have an imagination. There are so many places to go with it, things to do, places to see, all fulfilled by the usual constraints - time and resources - but gladly not constrained by imagination.
And I imagine that Zaapt will eventually be the biggest CMS built with Perl[1], which was always one of my original intentions :-)
[1] Yes, I know that is a tall order and maybe that's not just imagination but a dream - still, we need that too.
Labels: perl, zaapt, drupal, cms, planet-geek, planet-catalyst, plone
Inserted: 2008-01-11 20:25 (4 years, 1 month ago)
A few days ago, Zaapt became one year old. But the best is yet to come.
It's been a great week for Zaapt this week. Not only has it passed it's first birthday (born on first check-in) it's also had a lot of development done on it. The models were improved in Sep/Oct and this month it's been the controller side of things. The views didn't need much change but maybe a minor tweak here or there.
I mentioned the other week that I am now using the issue list on my Google Code Project Homepage. At this very moment I can tell you that there are six issues I have to do before I release v0.1 - which will be an amazing achievement. It will also signify the first release which I will be happy for other people to start using - before now it was still in a little flux.
As 2007 finishes up, I look back on the number of hours I've put into Zaapt and see that it's all been worthwhile. I have spent a hell of a lot of hours on it but to now have a CMS written in Perl and using PostgeSQL as it's main store is just great. It was always an ambition of mine to have that combination and Release v0.1 will realise that (note if you Google for cms, perl and postgres, Zaapt is in the top 10 hits and has been since March).
As Nigel a friend of mine said to me recently, "We just shake you and a site falls out" - which just proves how easy it is to create a Zaapt site.
So 2008 will be a belter of a year for Zaapt. I'm aiming to get it into Debian with the help of Francois Marier so after the v0.1 release, I'll sit down with him and figure out what I should do before we put it in - he doesn't know this yet :-)
Finally, just to give you a glimpse of how interesting Zaapt will be next year, here's a quote from one of my current open issues:
This issue also implements an idea I've had for a while in which models can also be mash-ups of other models. In this case, one model is referencing another. In another case, who's to say that a model might not just link together a blog.entry, a gallery.picture and a map.location.
Wouldn't that be oarsum - "CMS mash-ups".
Labels: perl, zaapt, cms, planet-geek, planet-catalyst, postgres
Inserted: 2007-12-24 17:32 (4 years, 1 month ago)
Warning: advert for geeks to unite.
As has been always this year, I'm going to the Wellington PerlMongers meeting tomorrow night, so if anyone is interested, please come along. There are four speakers lined up so it's going to be a busy one.
Also, there is a new User Group starting next month. A few others in Catalyst (I think Finlay, Brenda and Penny) have been organising getting the New Zaland PostgreSQL Users Group up and going so put the first Tuesday of each month in your calendar for that one.
Labels: perl, planet-geek, postgres
Inserted: 2007-10-08 23:39 (4 years, 4 months ago)
After my article last week regarding Dynamic Method Generation in Perl, here's the conclusion.
See Fun Hacking Perl first unless you've already seen it. It took me a week instead of a day to post this follow up... :-)
Overall, dynamically creating methods can seem like a bit of black magic, some hand waving, smoke and mirrors or all three. But in reality it's fairly straight-forward.
Go take a look at the Class::Accessor module (source) and search for ::$accessor_name (there are 4 instances). It's fairly straight forward and really there are only two steps you have to do:
sub$class} namespaceOf course, there is a few more things you have to be weary of and a few more details to look out for but essentially, that's it.
So far, I now have 5 ways of generating 5 different types of methods. It's kinda cool and means I can remove a lot of template code from Zaapt.
Labels: perl, nz-tech, planet-geek
Inserted: 2007-03-28 22:35 (4 years, 10 months ago)
I've known Perl a while - a long while. But still, there is more to learn!
Tonight I have been hacking at dynamic method generation. I've never done it before so it has been like a voyage of discovery for me. Of course, I've used many modules which dynamically generate methods but I've never tried doing it myself.
More times than I can count, I've used modules like Class::Accessor and various others. While I know I've browsed over them in Emacs every now and then, I have usually skimmed over the dynamic parts of it.
So learning about it comes down to scratching an itch.
With Zaapt I've been scratching a rather large itch recently so I thought why not go a bit further. Up until now, many of the methods in my database classes have done much the same things - the insert methods look similar, as do the update and delete methods. Mainly the select methods look dissimilar but sometimes they look the same.
Tonight, I started hacking a rather large custom content type for KiwiWriters. I can't giveaway the details at the moment, but suffice to say I was getting bored writing all those methods all the time.
So I searched and stumbled upon this article, Why I Am Not A Java Programmer. As well as being an interesting read, it also has a small section on Dynamic Method Generation. It mentioned Class::Accessor so I took a look at it...
...and It's not quite as scary as I thought it might be.
After reading around and learning a bit more, I'm up to the stage in my own module whereby I've got my initial code for inserts written and ready to test. It doesn't complain with perl -c and I guess it should be okay.
Unfortunately though, I feel fairly unwell at the moment and really will have to go to bed :-(
Overall, it has been a very intriguing evening. I haven't written much of my content model, but I have been learning something new about Perl. That's the first time in a while I have taken that big a jump but damn-it, I have tired and need sleep.
Part Two of this story will be posted tomorrow, when I find out if my code works the way I want it. I'll also post some examples too.
Labels: perl, hacking, dynamic-method
Inserted: 2007-03-21 23:32 (4 years, 11 months ago)
After a fair bit of work over the past month or so (since when kapiti.geek.nz started), my new CMS is starting to take shape.
Today, I finished off adding the content managed pages as seen in the (sparsely populated) Software section.
The best thing about the new Content type though, is that it fulfilled all of the criteria I want for all the new content types which I will be adding to it. So far, the Blog type (which is used for /random) is mostly there but doesn't quite fit the abstraction I want it to. The DB class is fine, but the display pages are lacking since I'd written them for this site before I wrote them for the CMS.
On the other hand, I wrote all of the display code for the Content type before I wrote anything for this site and it turned out well. Out of the box, the CMS will support 'text', 'code' and 'html' types - weird I know but it proves the concept. Despite this, I assign my pages a content type of Phliky then, in kapiti.geek.nz, I override the display of that particular type and don't have another jot of work to do :-)
Inadvertently, though I guess I am inclined that way, this new CMS pretty much follows the MVC pattern. I'm not always sure that this is necessary but once a project starts getting big, then it's the best way to go and hopefully this one will get bigger.
As an example, the database interface code is written in Perl modules. The admin interface (which could be termed the controller) is written in Perl/Mason and is a part of the CMS code. The View pages have default versions in the CMS code, but can be overridden with the website pages, which is the technique I used to display a phliky type in the content pages. This approach seems to be the way it turned out and the way it will continue to move forward.
Oh and by the way, I haven't yet worked out a name for it. At the moment, the working title is Fli since it is a play on Fly and hopefully should be really fast. If anyone has any suggestions, let me know.
Labels: perl, mason, cms, mvc, kapiti-geek-nz
Inserted: 2006-08-13 01:20 (5 years, 6 months ago)
I submitted a sitemap to Google Sitemaps and confirmed that I owned the site. But wait, what's this obscure request...
To try out \[p]{Google Sitemaps|https://www.google.com/webmasters/sitemaps/login}, I firstly had to prove that I was the owner of this site. They gave me a URL of the form http://kapiti.geek.nz/google################.html where each # was a number or letter.
A while after I put the page on the site and Google had verified it, I looked in the server logs to see at what time it had been requested. Immediately after the page was requested, another request for the page http://kapiti.geek.nz/noexist_################.html was also there, which obviously gave a 404.
I think they are being slightly suspicious of servers which return a page for any URL requested which I guess is what the noexist request is to stop. Anyway, that kinda made me smile thinking that my server was doing the right thing.
As for the Sitemap itself, well I used the Perl Module \[p]{XML::Mini|http://minixml.psychogenic.com/} which is quite nice in a funny way. I thought that this Google Sitemap Generator would be good for a module, so I looked on \[p]{CPAN|http://www.cpan.org} - lo and behold, there already is one by \[p]{Jason Kohles|http://search.cpan.org/search?query=Google%3A%3ASiteMap&mode=module}.
Ah well (but that's a good thing).
Labels: perl, google, xml, kapiti-geek-nz
Inserted: 2006-08-12 15:58 (5 years, 6 months ago)