Four Stouts, Two Bitters and a Lemonade and OJ

2shortplanks on 2002-04-06T16:48:24

...for the smalltalk programmer in the corner please.

Thursday saw once again another London.pm social meeting. The Cittie of Yourke is fast becoming our new regular boozer it would seem. The meeting was busy, with us streching over the edge of our half of the basement bar, forcing us to colonise the area nearer the beer supply.

dumrats talked about some crazy crazy scheme involving bidding for random items on ebay. I won't spoil with the details, but let me assue you that the concept was very crack fueled.

I spoke seperatly to Nigel and mstevens about Java and Perl. mstevens and I are still looking into Java more and more. As I said, I don't like favoring any one language - I want to use the best tool for the job. 90% of the time this tool is Perl...but I refuse to be blinkered and shut out other things. Incidentally, this is why I think that this month's The Perl Review was so good... Anyway...

james talked about the madness that is his conversion of Perl 5 code into parrot code by running Perl 5 through perl and then using the B (backend) modules to access the abstract syntax tree. To quote the man "I'll be happy if I can get 90% of the code to work...we'll see about the rest." Good Luck james.

I asked pdcawley about his opinions on the latest exegesis. He liked it. No surprise there then. james offered his doubts on the unary dot prefix being able to parsed as "this" or "self." Hmmm. I may have to agree with him.

richardc and I suprised Kake with the fact that emacs can do that MSWord/Abiword thing of highlighting words that are misspelt and allowing you to click on them to get a context menu of alternatives. (Click on the bit that says '(Fundamental)' or '(C-Perl)' in the status bar with the right mouse button and select "Fly-Spell Mode)

robin turned up and we chatted about trying to prove that his adaptations to the regular expression engine could now parse any context free grammar. This was quite hard to grasp after much beer. Interestingly we'd both thought about approaching the problem in a different manner.

blech gave away copies of DJAdams' Jabber Book and the Slash book for review (both of which I've already read,) and tried to flog a few more tshirts. Nicolas chatted a lot about the complications of utf8 and other encoding schemes in perl 5.8.0. He made my head hurt so I ran away.

veeg and I talked about stuff, and wondered a bit about wrist and arm pain caused by computer usage (what is commonly referred to as RSI.) desnarf, putting his first appearance in at meetings for many many months was convinced to try the local stout.

Grue, hugged everybody, at least three times. sphyg talked about birthdays. dumrats talked about weird cupboards in the toilets until I fed him scotch. Chris and I talked about the woes of working. Evil Dave and richardc got port. I helped consume it.

Finally, I talked to everyone about the fact that my todo list seems to get longer, as I always put more things on it than I take off.

<Trelane> my fun todo?
<dipsy> trelane, your fun todo is install slash on intranet server, gtk wrapper for sudo, Test::GD, GD::TextImage, add things to grubstreet, read the jabber book or patch T::P::XML::DOM documentation, write documentation for TT and XML, write an rsync backup scripts or makepm script or tidy up Test::Accessor and CPAN it or patch Carp's docu or merge Template::Plugin::Filter or fix tickets on RT or thunk about Test::Set


Perl6 unary .

pdcawley on 2002-04-06T18:06:28

I asked pdcawley about his opinions on the latest exegesis. He liked it. No surprise there then. james offered his doubts on the unary dot prefix being able to parsed as "this" or "self." Hmmm. I may have to agree with him.


So might I. I'm in the process of writing an initially small schemish interpreter in Perl 6 and I'm starting to confuse myself with unary dot.

Here's a relatively common idiom from some of my code:
method foo($bar) {
  given .some_attrib {
    when .baz { .do_something_with($bar) } # Oh, hang on, I wanted that to go to '$self'
    ...
  }
}
As soon you introduce a given/when block or any other topicalizer, unary dot stops refering to the current object and starts pointing at 'this'. Which is generally what you want; it's a remarkably handy idiom. Even in the cases where I could get by with if/else I've tended to use given/when/default because of the topicalization.

But this means that, if you need to refer to a method's object inside a when block, you've got to reintroduce the object as an explicit parameter
method foo($self: $bar) {
  given .some_attrib {
    when .baz { $self.do_something_with($bar) }
    ...
  }
}
Which is sort of okay. But then it's easier to always use an explicit $self in case you end up introducing a given/when later.

I confess, I can argue this both ways. When I'm doing all out OO programming I don't often resort to switches anyway so the problem sort of goes away but for casual programming (and for getting the tests to pass before I realise I should extract a class or two and recast the switches as polymorphic method calls) they are great. I want them now.

damn meeces

richardc on 2002-04-06T18:24:15

richardc and I ... (Click on the bit that says '(Fundamental)' or '(C-Perl)' in the status bar with the right mouse button and select "Fly-Spell Mode)

Of course mice being the enemy of the terminal I spell this M-x flyspell-mode

Re:damn meeces

2shortplanks on 2002-04-07T09:53:52

So, how do you get the context menu listing the spelling alternatives with just the keyboard?

Re:damn meeces

richardc on 2002-04-07T10:38:38

M-$ while your cursor is within the word.

Re:damn meeces

2shortplanks on 2002-04-07T11:13:01

Oddly, that doesn't unhighlight the word after I've corrected it.

Oh well.