[ANNOUNCE] Technical Meet - 18th Sept 2003 - The Angel

2003-09-11 Thread Mark Fowler
Announcing the September London Perl Mongers Tech Meet on Thursday 18th
September 2003 at The Angel pub at Old Street, 7pm for 7.15pm start sharp:

Well, this is a little late, but I've finally got details about the
exiting tech meeting a week today.

Fotango, bless their event sponsoring souls, have again hired the upstairs
room at The Angel pub near _Old_ _Street_ (no, this isn't very near at all
to Angel station so don't go there by mistake) This is the same pub that
they hired out for the tech meet in July.

  http://www.streetmap.co.uk/streetmap.dll?G2M?X=532783&Y=182390&Z=1
  http://london.pm.org/meetings/locations/angel_pub.html

We've got a range of talks on various matters.  Currently scheduled talks
vary from discussion of the upcoming perl 5.8.1, though funny games in
Perl, round though the exciting world of Tanagram (for want of a better
description, a database/object mapper), up though writing a book on
Template Toolkit using the Template Toolkit, and completing with a range
of other lightning talks for those of us with a short attention span.

The directions are straight forward as finding the place is simplicity
itself: Get to Old Street roundabout either by taking the tube or
train to Old Street station (you'll surface on the roundabout) or via
any number of the busses.  The south exit off of this roundabout is
City Road.  Walk down the left hand side of the road towards the
centre of London. The very first road on your left is Leonard Street,
and the pub is on the corner.

The meeting as always will start at 7pm, for a 7.15pm sharp start.  We
should be done talking by nine thirty.  Normally after the meeting we
retire to a local pub to discuss the talks;  This meeting we shall
probably stay in the pub we're already in.

I hope to see you all there.  Until then.

Mark.

-- 
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, [EMAIL PROTECTED], http://twoshortplanks.com/};




Re: Partitioning?

2003-09-11 Thread Sam Vilain
On Wed, 10 Sep 2003 22:28, Paul Makepeace wrote;

  > Think about the major apps on your machine. If you're going to
  > have databases consider where you'll be keeping them. PostgreSQL
  > for example eats multiples of 16MB for its pg_xlog files. I have
  > quite a bit going on but not much really in terms of pure dump
  > volume, yet 135MB in /var/lib/postgres (Debian's default.)

Ah, but if you're using the LVM, you can create LV's for your database
to use as raw tablespace/log space - skipping the VFS layer
altogether, and not using a scrap of space on /var.  If you use
MySQL/InnoDB 4.0.14 +, you can turn on O_DIRECT, and skip the
Buffercache as well 8-).

Linux is then reduced to being a glorified SCSI driver for MySQL :-).
-- 
Sam Vilain, [EMAIL PROTECTED]

  If youve seen one redwood, youve seen them all.
RONALD REAGAN





Re: Partitioning?

2003-09-11 Thread Sam Vilain
On Wed, 10 Sep 2003 21:41, Jody Belka wrote;

  > drive1:  30meg/boot  ext3
  > 244meg/  reiserfs
  > 750megswap
  > remaining lvm physical volume
  > 
  > drive2: 1024meg   swap
  > remaining lvm physical volume

A good start.  You don't need a seperate root & boot on most modern
systems, and besides that was just a workaround for a <540MB bug that
you won't hit with a small root anyway.

Also, you may as well mirror up your disks, given that you've proposed
to allocate less than half the mirrored space from the start.
Mirroring gives you much of the speed advantages of striping (reads
can be distributed across the mirrors), but without the random access
speed penalty.  The only problem is buying the extra disks, but as
they say, "disks are cheap".

I use:

  drive1: 128meg/   ext3(/dev/md0)
 1024megswap(/dev/md1)
 remaining lvm physical volume  (/dev/md2)

  drive2: 128meg/   ext3(/dev/md0)
 1024megswap(/dev/md1)
 remaining lvm physical volume  (/dev/md2)

/tmp is tmpfs, so I don't need extra space on the root for that.

You'll need to pass something like "root=/dev/md0
md=0,1,/dev/sda1,/dev/sdc1", and compile in RAID 1 support to the
kernel to get it to boot off a mirrored root.

LILO has special support for using a mirrored root, see its man page.

GRUB you need to hack; set /boot/grub/device.map to something like:

  (hd0) /dev/sda

Then replace "/dev/md0" in /etc/mtab with "/dev/sda1", and run
`grub-install'.  Installing GRUB onto the second disk really depends
on your BIOS behaviour, ie what BIOS device numbers it assigns to
disks when one has failed.  The PC's bootstrap system really sucks.

A word of advice: if you have /usr on an LVM partition, have printouts
of the man pages for the LVM commands (vg*, lv*) on hand in case of
emergency system recovery.
-- 
Sam Vilain, [EMAIL PROTECTED]

"In every country and every age, the priest has been hostile to
 Liberty."
 - Thomas Jefferson -







Re: return gotcha

2003-09-11 Thread muppet
On Thu, 2003-09-11 at 06:02, Paul Makepeace wrote:
> Is there a standard
> efficient, clear way of saying "...or function 'return;'s."?

i believe the pod refers to that as "returns an empty list".


-- 
muppet 




Re: Exim and HELO

2003-09-11 Thread Lusercop
On Wed, Sep 10, 2003 at 07:00:49PM +0100, Nicholas Clark wrote:
> On Wed, Sep 10, 2003 at 06:44:09PM +0100, Jason Clifford wrote:
> eg 195.92.249.255 (zeniiib.linux.theplanet.co.uk)

Ok, how many people are sitting on a subnet with a /22 prefix or
shorter (the smallest that that can be in order not to be a broadcast
address by my back-of-the-envelope calculation)? I'm genuinely curious
here, because I thought it was where I work that had insanely short
prefixes for ethernets.

-- 
Lusercop.net - LARTing Lusers everywhere since 2002



Re: return gotcha

2003-09-11 Thread Jasper McCrea
Richard Clamp wrote:
> 
> On Thu, Sep 11, 2003 at 11:27:15AM +0100, Jasper McCrea wrote:
> > Richard Clamp wrote:
> > >
> > > On Thu, Sep 11, 2003 at 11:02:32AM +0100, Paul Makepeace wrote:
> > > >   Is there a standard
> > > > efficient, clear way of saying "...or function 'return;'s."?
> > >
> > > Returns false.
> >
> > return 0 / undef / '';
> >
> > all return false, and none of these have the same list behaviour as 'return;'
> 
> No, they return a false scalar.  That's not good enough when you're
> dealing with an array.

You are right, of course. Yerk. Now to go through all my old documentation.

Jasper



change of name

2003-09-11 Thread Nigel Wetters
As of today, I've changed my name by deed poll from Nigel Robert Wetters
to Nigel Wetters Gourlay. I have a baby due in a few weeks, and want the
baby to have the same surname as both his parents. Hopefully, it's not
going to cause too much confusion among friends and colleagues. I will
continue to use the same CPAN and sourceforge nick - NWETTERS.

--nigel




Re: return gotcha

2003-09-11 Thread Jasper McCrea
Richard Clamp wrote:
> 
> On Thu, Sep 11, 2003 at 11:02:32AM +0100, Paul Makepeace wrote:
> >   Is there a standard
> > efficient, clear way of saying "...or function 'return;'s."?
> 
> Returns false.

return 0 / undef / '';

all return false, and none of these have the same list behaviour as 'return;'

What's wrong with writing "...or function 'return;'s."? as you said. In order to
avoid the gotcha, you should write _why_ you are explaining that it returns in
that way, too. For the thickos among us. Liek me.

Jasper



Re: return gotcha

2003-09-11 Thread Richard Clamp
On Thu, Sep 11, 2003 at 11:27:15AM +0100, Jasper McCrea wrote:
> Richard Clamp wrote:
> > 
> > On Thu, Sep 11, 2003 at 11:02:32AM +0100, Paul Makepeace wrote:
> > >   Is there a standard
> > > efficient, clear way of saying "...or function 'return;'s."?
> > 
> > Returns false.
> 
> return 0 / undef / '';
> 
> all return false, and none of these have the same list behaviour as 'return;'

No, they return a false scalar.  That's not good enough when you're
dealing with an array.

 while (my @row = $get->some_thing) {
   ...
 }

only return (); and it's terser equivalent return; will be false
enough for the loop to exit.

-- 
Richard Clamp <[EMAIL PROTECTED]>



Re: return gotcha

2003-09-11 Thread Dave Hinton
On Thursday, September 11, 2003, at 11:02 am, Paul Makepeace wrote:

Is there a standard
efficient, clear way of saying "...or function 'return;'s."?
"...or function returns an empty list."  ?




return gotcha

2003-09-11 Thread Paul Makepeace
Funny how these things can bite,

$ perl -MData::Dumper -le 'sub und { return };   $a = { a => und, b=> und }; print 
Dumper $a'
$VAR1 = {
  'a' => 'b'
};

$ perl -MData::Dumper -le 'sub und { return undef }; $a = { a => und, b=> und }; print 
Dumper $a'
$VAR1 = {
  'a' => undef,
  'b' => undef
};
$

Real life, the imminently plausible-looking:
my $project = {
newproject => $h->extract(-as_bool => 'newproject'),
subproject => $h->extract(-as_bool => 'subproject'),
multiteam  => $h->extract(-as_bool => 'multiteam'),
};

CGI::Untaint says "we return undef" but actually it's just a "return;".

Of course it's a list context. It's easy however to get lulled into
something like this since it's hard (AFAIK) to document in prose a
function that just 'returns;'. C.f. saying "we return undef" -- which is
technically inaccurate as it could also return a (). Is there a standard
efficient, clear way of saying "...or function 'return;'s."?

Paul


-- 
Paul Makepeace ... http://paulm.com/

"What is fionn? It is nothing. Anyone who tries to convince you
 otherwise should be shot."
   -- http://paulm.com/toys/surrealism/



Re: return gotcha

2003-09-11 Thread Richard Clamp
On Thu, Sep 11, 2003 at 11:02:32AM +0100, Paul Makepeace wrote:
>   Is there a standard
> efficient, clear way of saying "...or function 'return;'s."?

Returns false.

-- 
Richard Clamp <[EMAIL PROTECTED]>