From chris at orchidsoft.com Tue Jun 5 03:27:01 2001 From: chris at orchidsoft.com (Chris Neale) Date: Wed Aug 4 00:10:54 2004 Subject: 'ello Message-ID: <005701c0ed99$4b754650$4600a8c0@orchid> Morning, Quick intro type email thing. My names Chris, I've been doing Perl for a while, and I live in Sunderland. (Sounds like an AA meeting..). I work in Newcastle doing all things Microsoft, but please, don't hold that against me. Chris PS Quick techie question (its obligatory on these sorts of lists).. Is there *any* way to get a non-blocking socket using Win32/ActiveState Perl? fnctl()'s O_NONBLOCK, and F_NDELAY things haven't been implemented, I'm at a loss with ioctl() and I can't find a jot of documentation about setsocketopt() (or whatever its called..). Help? (The obvious answer of 'Don't use Win32' would be good, but I want cross platform. Don't mind having two versions, but it needs to work.) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/archives/tyneside-pm/attachments/20010605/77fde198/attachment.htm From chrisb at jesmond.demon.co.uk Wed Jun 6 13:55:05 2001 From: chrisb at jesmond.demon.co.uk (Chris Benson) Date: Wed Aug 4 00:10:54 2004 Subject: [greg@mccarroll.demon.co.uk: Re: Tie::Hash::Cannabinol] Message-ID: <20010606195505.B2267@beta.home> And ... what jolly fun! It rains and London.pm stay in and write strange code. ----- Forwarded message from Greg McCarroll ----- Date: Wed, 6 Jun 2001 11:46:51 +0100 From: Greg McCarroll To: london-pm@lists.dircon.co.uk Subject: Re: Tie::Hash::Cannabinol X-Operating-System: Linux scully.mccarroll.demon.co.uk 2.2.13-7mdk Reply-To: london-pm@lists.dircon.co.uk * Richard Clyne (richard_clyne@anadarko.COM) wrote: > I always thought that a data structure that mimicked a bus queue would > be useful. > > If you request more items than are in the queue (e.g. lots of empty > seats) the queue returns the items in order. If you request less items > than are in the queue (Bus almost full) the largest items push through > and are selected. Fun! the following should do what you want, although i'm not sure if freezing non-references is fair on them and i'm sure the sort condition syntax can be shortened by the perl golfers on the list ... package BusQueue; use strict; use Storable qw(freeze); sub new { my $class = shift; my $self = []; return bless $self, $class; } sub insert { my $self = shift; push(@$self, @_); } sub remove { my $self = shift; my ($num) = @_; @$self = sort { my $sa; my $sb; if (ref($a)) { $sa = length(freeze($a)); } else { $sa = length(freeze(\$a)); } if (ref($b)) { $sb = length(freeze($b)); } else { $sb = length(freeze(\$b)); } $sb <=> $sa; } @$self; return splice @$self, 0, $num; } 1; -- Greg McCarroll http://217.34.97.146/~gem/ ----- End forwarded message ----- -- Chris Benson From chrisb at jesmond.demon.co.uk Wed Jun 6 13:53:25 2001 From: chrisb at jesmond.demon.co.uk (Chris Benson) Date: Wed Aug 4 00:10:54 2004 Subject: [dcross@acxiom.co.uk: Tie::Hash::Cannabinol] Message-ID: <20010606195325.A2267@beta.home> >From the London.pm list! ----- Forwarded message from Cross David - dcross ----- From: Cross David - dcross To: "'london-pm@lists.dircon.co.uk'" Subject: Tie::Hash::Cannabinol Date: Wed, 6 Jun 2001 10:54:52 +0100 Reply-To: london-pm@lists.dircon.co.uk Once an idea gets into my head, the only way to shake it off is to go away and write it :) Dave... package Tie::Hash::Cannabinol; use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); require Exporter; require Tie::Hash; @ISA = qw(Exporter Tie::StdHash); @EXPORT = qw(); @EXPORT_OK =(); $VERSION = '0.01'; sub FETCH { my $self = shift; my @keys = keys %$self; return $self->{$keys[rand $#keys]}; } sub EXISTS { return rand > 0.5; } 1; __END__ =head1 NAME Tie::Hash::Cannabinol - A hash on hash! =head1 SYNOPSIS use Tie::Hash::Cannabinol; my %h; tie %h, 'Tie::Hash::Cannabinol'; =head1 DESCRIPTION The idea of writing a tied hash called T::H::C was just too good to ignore. You can store values in this hash just as you would a normal hash, but when you ask for a value back, you get any random value from the hash. The C function isn't really to be trusted either :) =head1 AUTHOR Dave Cross =head1 SEE ALSO perl(1). perltie(1). =cut The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please re-send this communication to the sender and delete the original message or any copy of it from your computer system. ----- End forwarded message ----- -- Chris Benson From nick at ccl4.org Wed Jun 20 17:07:43 2001 From: nick at ccl4.org (Nicholas Clark) Date: Wed Aug 4 00:10:54 2004 Subject: 'ello In-Reply-To: <005701c0ed99$4b754650$4600a8c0@orchid>; from chris@orchidsoft.com on Tue, Jun 05, 2001 at 09:27:01AM +0100 References: <005701c0ed99$4b754650$4600a8c0@orchid> Message-ID: <20010620230742.C98663@plum.flirble.org> On Tue, Jun 05, 2001 at 09:27:01AM +0100, Chris Neale wrote: > Morning, > > Quick intro type email thing. My names Chris, I've been doing Perl for a while, and I live in Sunderland. (Sounds like an AA meeting..). I work in Newcastle doing all things Microsoft, but please, don't hold that against me. No, this list isn't dead, but it seems to be rather dormant. [and as I'm no longer in Newcastle I don't check it that often] I'm Nick, I live in London (again) now, which is very inconvenient for Tyneside. > PS Quick techie question (its obligatory on these sorts of lists).. Is there *any* way to get a non-blocking socket using Win32/ActiveState Perl? fnctl()'s O_NONBLOCK, and F_NDELAY things haven't been implemented, I'm at a loss with ioctl() and I can't find a jot of documentation about setsocketopt() (or whatever its called..). Help? (The obvious answer of 'Don't use Win32' would be good, but I want cross platform. Don't mind having two versions, but it needs to work.) I'm sorry - I really don't know, as I don't use Win32. Nick From chrisb at jesmond.demon.co.uk Wed Jun 20 17:24:50 2001 From: chrisb at jesmond.demon.co.uk (Chris Benson) Date: Wed Aug 4 00:10:54 2004 Subject: July meet? Message-ID: <20010620232450.A8775@beta.home> I was wondering, since there's another Chris around, whether we should have a July meeting? Does anyone have any thoughts or feelings (about this!), one way or the other? -- Chris Benson From chris at orchidsoft.com Thu Jun 21 03:11:58 2001 From: chris at orchidsoft.com (Chris Neale) Date: Wed Aug 4 00:10:54 2004 Subject: July meet? In-Reply-To: <20010620232450.A8775@beta.home> Message-ID: >I was wondering, since there's another Chris around, whether we should >have a July meeting? >Does anyone have any thoughts or feelings (about this!), one way or the >other? Not sure how many people on this list already know about this, but Tyneside Linux User Group meet on the first Sunday on each month in Coffee Republic (Grainger Street, next to the big 'man on a stick' monument) at 12:00. General Linuxy banter most of the time. Would it make sense for the two groups to meet at the same time? Us Linux lot are more than willing to chat to other people, contrary to stereotype, and its more the merrier for all. There is a considerable Linux/Perl crossover, and it would mean that the meeting would certainly involve more people. The Linux one currently gets about 10 members turning up. Chris (N) PS. http://www.tyneside.lug.org.uk From David.Larkin at djl.co.uk Thu Jun 21 08:19:57 2001 From: David.Larkin at djl.co.uk (David Larkin) Date: Wed Aug 4 00:10:54 2004 Subject: Tyneside Perl Moungers? References: <20010216153617.A2967@skuld.office> <3AA35D93.C393163C@DJL.co.uk> <20010621085032.A1050@skuld.office> Message-ID: <3B31F47C.A0784F9F@DJL.co.uk> chris@treepax.co.uk wrote: > Dave, > > Someone else has shown an interest in Tyneside.pm, which brings > local-people-with-an-interest back to 4. > > I was wondering if we should schedule a meeting in July. > > I've used my listowner priviledges to add you to the Tyneside.pm list, > a confirmation request should be winging its way to you now. > > So, any thoughts? Please respond to the tyneside-pm@pm.org list. > > Best wishes > -- > Chris Benson > Tel. +44 191 516 6355; Fax. +44 191 516 6354; Hi Chris, Yes, I'd be interested in a July meeting. Let me know proposed date/venue when available. Cheers Dave From chrisb at jesmond.demon.co.uk Thu Jun 21 13:21:31 2001 From: chrisb at jesmond.demon.co.uk (Chris Benson) Date: Wed Aug 4 00:10:54 2004 Subject: July meet? In-Reply-To: ; from Chris Neale on Thu, Jun 21, 2001 at 09:11:58AM +0100 References: <20010620232450.A8775@beta.home> Message-ID: <20010621192131.A7360@beta.home> On Thu, Jun 21, 2001 at 09:11:58AM +0100, Chris Neale wrote: > > Not sure how many people on this list already know about this, but Tyneside > Linux User Group meet on the first Sunday on each month in Coffee Republic > (Grainger Street, next to the big 'man on a stick' monument) at 12:00. > General Linuxy banter most of the time. Ah, I didn't know that. Thank you. I have two questions though: a. Is the July meeting therefore Sunday 1st July? (London.pm have a heretic 'thursday after the first wednesday' faction to avoid meeting on the 1st). b. 12 midday as opposed to 12 midnight? ;-) > Would it make sense for the two groups to meet at the same time? Us Linux > lot are more than willing to chat to other people, contrary to stereotype, > and its more the merrier for all. There is a considerable Linux/Perl > crossover, and it would mean that the meeting would certainly involve more > people. The Linux one currently gets about 10 members turning up. I'm game, what about the rest of you-s? -- Chris Benson From chris at orchidsoft.com Fri Jun 22 03:20:15 2001 From: chris at orchidsoft.com (Chris Neale) Date: Wed Aug 4 00:10:54 2004 Subject: July meet? In-Reply-To: <20010621192131.A7360@beta.home> Message-ID: a. Is the July meeting therefore Sunday 1st July? (London.pm have a heretic 'thursday after the first wednesday' faction to avoid meeting on the 1st). It is indeed on the first. (What is actually wrong with meetings on the first? Are people worried about 'pinch and a punch' antics?) b. 12 midday as opposed to 12 midnight? ;-) Midnight. Its for Linux people, they don't come out with the big bright yellow shiny thing is up. 8) Chris (The other one)