Re: [ANNOUNCE] Signup for Tech Meet Mon 14th April + Tonight Social

2003-04-04 Thread Robin Szemeti
On Friday 04 April 2003 11:30, Jasper McCrea wrote:
> Simon Wilcox wrote:
> > On Thu, 3 Apr 2003, Jasper McCrea wrote:
> > > Simon Wistow wrote:
> > > > It is *really* important that you sign up though. You will not "under
> > > > any circumstances" be let in if you've not signed up according to the
> > > > office manager.

I always find this sort of thing rather amusing ... 

I've worked at more than one place that has had similar policies ... none of 
them are worth the electrons they are written with.

1) someone signs up ... as A. N. Other .. there's no way of knowing if they 
really are A. N. Other or not.  Even if they are who they say they are, 
there's no way of knowing if they are going to steal all the underpants.

2) Assuming you tighten it further to checking with whoever is organising it 
that they recognise the names on the list, that fails still because for a 
meeting like this, its quite possible a newcomers name would not be 
recognised, and would be let in anyway.

3) even if you do recognise the name, how do you know its not someone with a 
longstanding grudge whose signed up just to get into the building and steal 
your underpants?

all it saves you from is random people walking in off the street, and there 
are simpler ways to do that ... still, the places I;ve seen it done before, 
it kept the office manager busy filling out little badges, and while they 
where doing that, they weren't fiddling with somehting else, so I guess some 
good came out of it.

Perhaps someone should register as A. Pants-Stealer and see if a badge is 
made up for them ;) (and no, I won't )

Still, good of Yahoo! to provide the facility, don't look a gift horse in the 
mouth I say.

-- 
Robin Szemeti



Re: RegEx for UK Postal Codes

2003-04-02 Thread Robin Szemeti
On Tuesday 01 April 2003 14:35, David M. Wilson wrote:

> The only other thing I could offer you is a recommendation to buy the
> PAF if your budget allows it.

all I can say on that point is 'streetmap' and 'LWP' are two rather fine 
words/accronyms aren't they. 

hey ho :)

-- 
Robin Szemeti

Redpoint Consulting Limited
Real Solutions For A Virtual World



Re: HTML! - JS (like BS but different)

2003-03-30 Thread Robin Szemeti
On Saturday 29 March 2003 19:23, Barbie [home] wrote:

> closer, but still not quite.
>
> Both miss one minor detail. document.forms[0].submit() is a function not a
> variable. Miss those parentheses off and you'll be going nowhere. However,
> with the  button, it will automatically submit the form
> it's associated with, in order to differentiate between different submit
> buttons, you'll need to name the buttons and check to see whether the
> button.x or button.y co-ordinates have been set. If you wanted to have an
> image as a button the following could also be done:
>
>  tags 
.. that way JS enabled browsers get the joy of changing and submitting, non 
JS enabled browsers (or ones with JS turned off) get a button to click ...

-- 
Robin Szemeti

Redpoint Consulting Limited
Real Solutions For A Virtual World



Re: rugby

2003-03-25 Thread Robin Szemeti
On Tuesday 25 March 2003 15:59, Greg McCarroll wrote:
> Ok, its been talked about in the past, but does anyone have any plans
> for a london.pm meet up to watch Ireland kick Englands arse on sunday.

not as such.

> How about somewhere nice and central as well, what about the pillars
> of hercules? or does someone have a better suggestion?

ooh, how about: 

get a big sheet of plywood and a load of chairs.  Get a gallon of green 
paint. Aply paint to wood, sit on chairs and watch it dry. The entertainment 
factor is roughly similar.

sport on TV? ... I'd rather stick noodles in my eyes. I find sports are quite 
fun to do, but tediously boring to watch.  its like ... watching somebody 
else playing on a computer game .. like .. where's the fun in that?

-- 
Robin Szemeti



Re: c email libraries

2003-03-21 Thread Robin Szemeti
On Friday 21 March 2003 17:47, Lusercop wrote:
> On Fri, Mar 21, 2003 at 03:51:16PM +, David M. Wilson wrote:

> > Please don't reply on-list either, a lot of people don't like listening
> > to you.
>
> And some do. Those who don't know how to use their killfiles. 

Since your email style is clearly intended to get at least someones back up, 
I'm not sure why you are surprised when it happens. 

A lot of what you say is of course quite correct, but I cant help thinking 
that the way you put it across is designed to get this sort of reaction. No 
doubt you have your reasons ... Surely just going down to the pub an knocking 
over peoples pints would provide a similar distraction without the need to 
think too hard?

> Lusercop.net - LARTing Lusers everywhere since 2002

2002? .. bloddy newbies ;)

-- 
Robin Szemeti



Re: Beginners Help Needed again

2003-03-21 Thread Robin Szemeti
On Friday 21 March 2003 11:13, Shevek wrote:
> Either type "perl scriptname.pl" or type "chmod a+x scriptname.pl"

to be totally nitpicky correct ... scripts on many platforms need to be chmod 
a+rx   ... binaries need execute permissions, scripts need read and execute 

chmod 755  is the much same thing.

> S.
>
> On Fri, 21 Mar 2003, Brian Smart wrote:
> > Hi All,
> > I am trying to get the following cgi script called ice_cream.cgi to work.
> > I has been copied from the 'Learning perl' book. When I call the script I
> > get an error message:
> >
> > Error Message: Permission denied
> > Error Number: 13
> >
> > Can someone explain what I might be doing wrong?
> >
> > #!/usr/bin/perl -w
> > use CGI qw(:standard);
> > my $favorite = param("flavor");
> > print header, start_html("Hello Ice Cream"), h1("Hello Ice Cream");
> >
> > if ($favorite) {
> > print p("Your favorite flavor is $favorite ");
> > } else {
> > print hr, start_form;
> > print p("Please select a flavor: ", textfield("flavor","mint"));
> > print end_form, hr;
> >}
> >
> >
> > Thanks for your help.
> >
> > Regards
> >
> > Brian Smart

-- 
Robin Szemeti



Re: Driving

2003-03-13 Thread Robin Szemeti
On Thursday 13 March 2003 13:45, Dominic Mitchell wrote:
> Aaron Trevena wrote:
> > Its like complaining that driving a nice audi is hard because
> > you've only ever driving a go-kart around a car park !!
>
> Driving an audi is hard because it's a big ugly /car/ with 4 wheels.
> Try a two wheeled device.  Much easier!

ahh 2 wheels good, 4 wheels bad. well done sir. Can I recommend you promptly 
nip over to http://www.ixion.org.uk/ and join the mailing list ... it is to 
motorcycling what london.pm is to programming .... only less on topic.

-- 
Robin Szemeti



Re: regrouping lines of STDIN

2003-03-10 Thread Robin Szemeti
On Monday 10 March 2003 13:31, Andrew Wilson wrote:

> ($foo) = 'foo boo moo' =~ /\w+/g;
> print "$foo\n";

> foo

ahh ! .. now I have to confess I didn't know that!   well well ... one lives 
and learns.

-- 
Robin Szemeti



Re: regrouping lines of STDIN

2003-03-10 Thread Robin Szemeti
On Monday 10 March 2003 12:54, Lusercop wrote:
> On Mon, Mar 10, 2003 at 11:16:18AM +0000, Robin Szemeti wrote:

> > > /g evaluated in a list context causes =~ to return a list of all
> > > bracketed submatches. That's what causes =~ to have an appropriate
> > > return value for assigning to a list lvalue. Otherwise it would return
> > > 1 or 0.

> Yes, I'm aware this is the conclusion you came to. I just can't see how
> you managed it. In every way I try to read it, I come to the conclusion
> that Shevek is talking about the return of a /g being applied in a list
> context or a scalar context, and that he's well aware of the difference
> between the two. I cannot parse the quoted text in such a way as to say
> that /g forces a list or scalar context.

oh arse ..this is turnig into pedantry half hour isn't it.

 [here we go ..]

 /g evaluated in a list context causes =~ to return a list of all
 bracketed submatches.

 [ OK ... so we are discussing /g ]

 That's what causes =~ to have an appropriate return value for assigning to a 
list lvalue.

 [ we are still talking about the action of /g  ... ]

 Otherwise it would return 1 or 0.

 [ I parse that as "otherwise if it didnt have the /g there it would return 1 
or 0" which is not true .. ]

 past caring now  

-- 
Robin Szemeti



Re: regrouping lines of STDIN

2003-03-10 Thread Robin Szemeti
On Monday 10 March 2003 10:08, Lusercop wrote:
> On Sun, Mar 09, 2003 at 07:21:19PM +0000, Robin Szemeti wrote:
> > On Sunday 09 March 2003 15:10, Shevek wrote:
> > > /g evaluated in a list context causes =~ to return a list of all
> > > bracketed
>
> ^^ note: no "is"
>
> > no no my pretty little vampire slayer ... its not the /g that determines
> > list or scalar evaluation of the regex ... its what is wanted by the
> > caller. I
>
> what on earth made you write your paragraph above. Shevek makes it quite
> clear that this is the case. 

well ... my reading of the original hang on .. quote time:

> /g evaluated in a list context causes =~ to return a list of all bracketed 
> submatches. That's what causes =~ to have an appropriate return value for 
> assigning to a list lvalue. Otherwise it would return 1 or 0.

was that Shevek thought the /g was somehow involved in the decision as to 
whether a list or scalar value was returned, and it isn't.  Its the caller 
that determines the return type, the /g just allows the list to be bigger 
than 1 item. (at least thats the way I understand it).  /g and 'otherwise it 
would return 1 or 0' are entirely unconnected.

> What kind of crack are you on?

builders crack

-- 
Robin Szemeti



Re: regrouping lines of STDIN

2003-03-09 Thread Robin Szemeti
On Sunday 09 March 2003 15:10, Shevek wrote:
> On Sun, 9 Mar 2003, Paul Makepeace wrote:



> > my ($code) = $_ =~ /a (reg) ex/;
> >
> > I'm not clear on the point of the /g though.
>
> /g evaluated in a list context causes =~ to return a list of all bracketed
> submatches. That's what causes =~ to have an appropriate return value for
> assigning to a list lvalue. Otherwise it would return 1 or 0.
 
no no my pretty little vampire slayer ... its not the /g that determines list 
or scalar evaluation of the regex ... its what is wanted by the caller. I 
suspect it is not entirely unconnected with #perldoc -f wantarray ...

my($foo) = 'blah' =~ /(\w+)/;

in this case $foo => 'blah'  .. the brackets in my($foo) cause the regex to 
be evaluated in list context ... 

my $foo= 'blah' =~ /(\w+)/;

in this case $foo => 1 .. the lack of brackets in my $foo cause the regex to 
be evaluated in scalar  context ...

what paul was pointing out was that it is pointless doing

my($foo) = 'blah blah blah' =~ /(\w+)/g;

because the subsequent matches after the first are lost ... to be of any use 
the result of the regex needs to be assigned to an array (well .. a list 
bigger than 1 anyway)

my(@foo) = 'blah blah blah' =~ /(\w+)/g;

-- 
Robin Szemeti



Re: catalogue

2003-03-03 Thread Robin Szemeti
On Monday 03 March 2003 10:01, Alex McLintock wrote:
> Is there a demonstration catalogue type site preferably with template
> toolkit, and some kind of back end for update.
>
> Presumably this is a cookie cutter project which people have done time and
> time again, and only the database and graphic design need changing...

catalogue type site? you mean a shop type thing?

I've not found a TT based one ... and ..although its PHP , im quite happy 
with oscommerce

http://www.oscommerce.org

-- 
Robin Szemeti



Re: MTA "quality" was Re: spamassassin

2003-03-02 Thread Robin Szemeti
On Sunday 02 March 2003 00:08, Dirk Koopman wrote:

> Personally I wouldn't give it house room, particularly if you have
> anything like a decent sized mailing list (eg the original MS Exchange
> mailing list [when DJB was first trialing qmail in production
> environments] 400+ message/day to > 5000 users). Exim won hands down

I'm running about 2.5m messages a month out of qmail and it seems OK .. save 
from a few 'locked' processes occasionally 

my BIG beef with qmail, and probably the one which causes more grief than 
anything is its handling of 550 - nu such luser responses ...

half sane mailer:

>> RCPT [EMAIL PROTECTED]
<< 550 No such user 

the mail body is never transferred and the spam never delivered to my box.

qmail:

>> RCPT [EMAIL PROTECTED]
>> 250 go ahead

later on, having accepted the mail Qmail finds it cant deliver it after all, 
and attempts to return it to sender .. of course the sender address is 
frequently forged and much bouncing then occurs .. and all because qmail lied 
to the RCPT request 


this one feature if nothing else will be what finally nails qmail for me and 
I'll switch to soemthing else .. but so far the presence of vpopmail is just 
too useful to me, and Ive not made anything else work with it .. yet.
-- 
Robin Szemeti



Re: spamassassin

2003-02-28 Thread Robin Szemeti
On Saturday 01 March 2003 00:16, Bob Walker wrote:
> On Fri, 28 Feb 2003, Robin Szemeti wrote:
> > am I close?
>
> yep. som eo fhis tuff is quite nice though. and yes he does have slight
> quirks. Im led to belive he doesnt comment his code either.

oh for sure .. qmail works well etc etc ... the only things I find odd are 
his layout .. new dirs in / whenever he feels like it ... binaries in /var 
etc .. weirdass stuff .. but yes .. it *does* work well

-- 
Robin Szemeti



Re: spamassassin

2003-02-28 Thread Robin Szemeti
On Friday 28 February 2003 22:34, Bob Walker wrote:
> On Fri, 28 Feb 2003, David Cantrell wrote:
> > I'd forgotten about running stuff out of inittab though - I don't often
> > go delving in there.  It's a bit of a nasty hack though.

I saved forgetting abut innittab by not knowing about it in the first place :)

> you could always do it with DJB's deamontools. which checks to make sure
> things are runnign and if not starts them.

ooh .. wild guess .. (ive not seen that particular peice of DJB crackware) .. 
mmm it will need a /daemontools directory (as in a new directory in / ) the 
config files are in /var, the binaries too. the there will be some lock 
files, they could be anywhere .. there will be no man pages (except on the 
net, that way they are never out of date, but may not match your software) ...

am I close?

-- 
Robin Szemeti



Re: spamassassin

2003-02-28 Thread Robin Szemeti
On Friday 28 February 2003 18:01, Steve Keay wrote:
> On Fri, Feb 28, 2003 at 05:41:43PM +, David Cantrell wrote:
> > Hooray, spamc/spamd compiled successfully this time - in previous
> > releases they wouldn't compile on this machine and I couldn't be arsed to
> > work out why.  So I'm gonna use 'em.  Is it as simple a matter as running
> > spamd in the background, and s/spamassassin/spamc/ in my .procmailrc?
>
> Yup, although you probably want to find a way to start spamd after a
> reboot.

it comes with the usual array of scripts in /spamd/ for startign stopping and 
checking the status of the spamd daemmons .. mine (redhat) worked a treat .. 
there are others.

-- 
Robin Szemeti



Re: Microptomisation games

2003-02-28 Thread Robin Szemeti
On Friday 28 February 2003 13:39, Toby|Wintrmute wrote:

> Is it time to consider re-writing in a compiled language at this point?
>
> You can optimise a nice Perl daemon until its very fast.. but then I can
> come along and write a fully-optimised C version, and probably reach
> another order of magnitude in speed.

maybe ... but not certainly .. it depends. much of perls internals is written 
in very tightly coded, highly efficient C that will most likely beat your 
'fully optimised' C because Larry Walls brain is bigger than yours :) ... 

it depends on where the load is really, if its already spending most of its 
time in a higly tuned bit of the perl core, porting to C or C++ might not be 
such a gain after all 

-- 
Robin Szemeti



Re: alternative work

2003-02-28 Thread Robin Szemeti
On Friday 28 February 2003 00:56, Bob Walker wrote:
> On Thu, 27 Feb 2003, Toby|Wintrmute wrote:
> > He is now working as a carpenter, and she is a property manager.

> there is in fact a shortage of skilled people in the building industry.

the union agreed rate for builders on the new Terminal 5 at Heathrow is 50K 
basic.  That agreement doesnt cover sparkies and plumbers .. they are 
negotiating a seperate rate in excess of that.

So ... the red wire goes to what again?

-- 
Robin Szemeti



Re: Recruitment Consultant Database (was: Re: Perl jobs in London?)

2003-02-28 Thread Robin Szemeti
On Friday 28 February 2003 09:27, Ian Brayshaw wrote:
> On Fri, 2003-02-28 at 09:03, Peter Sergeant wrote:
> > Would we run foul of the data-protection act or some-such if we were to
> > create a database of recruitment consultants, along with thoughts and
> > experiences of them by people who've used them?
>
> It has been attempted before (davorg, were you apart of this?):
>
>   www.ars.org.uk

I think that back in the days when there were more jobs than programmers, 
such a thing had a chance of working. These days when there are no jobs, its 
a rather moot point.

-- 
Robin Szemeti



Re: London.pm Aptitude Test

2003-02-27 Thread Robin Szemeti
On Thursday 27 February 2003 15:58, David Cantrell wrote:
> On Thu, Feb 27, 2003 at 04:27:59PM +0100, Philip Newton wrote:
> > On 27 Feb 2003 at 14:25, CyberTiger wrote:
> > > Do you like pie ?
> > > Do you like kittens ?
> > > Do you like Buffy ?
> > > Do you like beer ?
> > > I'm sure I missed a few things, feel free to add some more :)
> >
> > Do you like ponys?
>
> Do you prefer Willow?

ah yes .. the classic English summer ...

Skylarks calling their mates with a song .. in the distance a village clock 
strikes three. Barely a breeze moves amongst the leaves, insects humming in 
the warm air. From the village green comes the sound of leather on Willow 

-- 
Robin Szemeti



Re: Perl jobs in London?

2003-02-27 Thread Robin Szemeti
On Wednesday 26 February 2003 22:08, Dave Hodgkinson wrote:

> > Contrary to other answers I'd actually say it's not as bad as it has
> > been.
>
> Not according to www.jobstats.co.uk
>
> Bottomed? Maybe.

given that the stats are just the use of the word 'Perl' in any job add, I'd 
say the figures are now so low that what you are seeing is statistical noise. 
They'll be the ones that say 'programmer wanted to port site from Perl to 
.asp" or "NT systems administrator, also useful would be  unix csh and Perl"

and even where there is a real job, its difficult to make decent money in a 
market where people are prepared to undercut each other just to eat.

it's dead, it has ceased to be, it has gone orf to meet its maker ... it is a 
dead parrot.

-- 
Robin Szemeti



Re: Perl jobs in London?

2003-02-24 Thread Robin Szemeti
On Monday 24 February 2003 22:18, Bill Corr wrote:
> No, I'm not looking for a job, although I might be forced to in a few
> weeks time. What I'd like to know is what the job market is like for
> Perl programmers in the London area.
>
> Is working as a contractor a viable proposition, or am I deluding
> myself? What sort of level of experience is generally the minimum level
> required (contract or full time)?

umm 

http://www.jobstats.co.uk

see that ... ? thats a graph that is.

The concensus seems to be that the graph gives the impression that there 
might still be the odd one or two jobs, but this is most likely a statistical 
error.

I think I know more unemployed programmers than employed ones .. even if you 
include the ones that have changed 'careers' to other such things as lorry 
driving, and stacking shelves in supermarkets 

-- 
Robin Szemeti



Re: Stokers Required

2003-02-24 Thread Robin Szemeti
On Monday 24 February 2003 13:39, David Cantrell wrote:
> On Mon, Feb 24, 2003 at 09:19:56AM +, Mark Fowler wrote:
> > On Mon, 24 Feb 2003, Leon Brocard wrote:
> > > I wonder if more people are interested in this kind of thing. Is
> > > anyone interested in a weekly learning Perl evening? Perhaps something
> > > like reading through Learning Perl a chapter a week with assignments,
> > > a mailing list, and a real life meet every week.
> >
> > The problem I foresee with this is picking a night of the week that is
> > the impracticality of the cat herding.  Simply picking a night of the
> > week where everyone who wants to be involved is free and doesn't have
> > faimly/work/social commitments is always a problem.
>
> Then do what I do with sinema trips - pick a date and if a few people can't
> make it, tough.

I think the technical term for this is "JFDI" ... :) ... anyway .. I say do 
it.  Its something we've talked about a lot in the past both on here and in 
'another place' .. there is mileage in it ... let the party commence.

-- 
Robin Szemeti



Re: London List Weekly Summary 2003-02-17

2003-02-23 Thread Robin Szemeti
On Monday 24 February 2003 00:23, Paul Makepeace wrote:


> So: recommendation, given what a *total* pain in the arse it's been
> getting it deleted and changed, is not to register an SLD as a
> nameserver. It's actually still there, so web & mail have been disrupted
> for two weeks now.

well you should be able to get the mail sorted immediately by simply changing 
your MX record from srl.org to mail.srl.org and making an A record for 
mail.srl.org pointing to where you want it.  ... MX records are not cached 
(ie have no TTL) so that should work almost instantly
-- 
Robin Szemeti



Re: Frontier::RPC2 and german!

2003-02-20 Thread Robin Szemeti
On Thursday 20 February 2003 13:41, Luis Campos de Carvalho wrote:
>   Hello Andy.
>   I think that there is more list members having the same question: what is
> an... an... 'umlaut'?
>   It's a food or something you rub on your hair? =-]

no, its something you stick up your camel :)

an umlaut is the two dots over an 'o' or and 'e' that lengthen the vowel. 
used in german quite a bit.


and on a minor point I enjoy bringing repeatedly ;) ...

a similar mark is used in English over the 'i' in words such as naive, this 
is not an umlaut but a diaresis .. it signifies the presence of a double i 
rather than extending the sound of a single vowel ... it's used in French a 
bit too.

>
>   Just curious...
>   Thank you!
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>   Luis Campos de Carvalho
>   Computer Science Student
>   OCP DBA Oracle & Unix Sys Admin
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> - Original Message -
> From: "Andy Williams" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 20, 2003 10:35 AM
> Subject: Frontier::RPC2 and german!
>
> > Hi,
> >
> > I need to be able to pass some german text to my Frontier::RPC2 server,
>
> but
>
> > the server returns an error - 'Error decoding RPC' - whenever the german
> > text has an umlaut.
> > I've tried changing the encoding of the the server:
> >
> > my $coder = Frontier::RPC2->new( 'encoding' => 'ISO-8859-1' );
> > my $coder = Frontier::RPC2->new( 'encoding' => 'UTF-8');
> >
> > but nothing seems to work.
> >
> >
> > Anyone had this problem and fixed it or is this just me !!!
> >
> > TIA
> >
> > Andy

-- 
Robin Szemeti




Re: Changing namserver whois record

2003-02-17 Thread Robin Szemeti
On Monday 17 February 2003 18:11, Paul Makepeace wrote:

> It seems that looking up the address (`host srl.org`) returns the A
> record without consulting the nameservers, presumably since it's
> registered with an A record by dint of being a whois-known nameserver. I
> didn't realise the gTLD servers did that. What a pain in the arse.
>
> penderel:~$ ns srl.org | perl -ne '/\S+$/ && print `host srl.org $&`'
> srl.org A   208.44.199.253
> srl.org A   208.44.199.253
> srl.org A   208.44.199.253
> penderel:~$ host srl.org
> srl.org A   64.81.251.171
> penderel:~$

right ... what you have here is an unwanted glue record:

in the dig stuff below you will see the line:

srl.org.172800  IN  A   64.81.251.171

that is coming directly from the .org root server.  the query is never 
referred to your nameservers as the .org root server is able to give an 
authoratative answer ...  and  helpfully it is 4 days TTL .. so at best it 
will be friday before it gets sorted :)

AFAIK the only way to get rid of these is to make a request to the registrar 
to do it manually, as it is rarely possible using the sh1tty web forms.

(ask a certain dave hodg about the fun we had with a glue record for www.blah)



##

[robin@workstation robin]$ dig @E5.NSTLD.COM srl.org a +norecurse

; <<>> DiG 9.1.3 <<>> @E5.NSTLD.COM srl.org a
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39381
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 0

;; QUESTION SECTION:
;srl.org.   IN  A

;; ANSWER SECTION:
srl.org.172800  IN  A   64.81.251.171

;; AUTHORITY SECTION:
srl.org.86400   IN  NS  ns3.realprogrammers.com.
srl.org.86400   IN  NS  ns2.realprogrammers.com.
srl.org.86400   IN      NS  ns1.realprogrammers.com.

#

-- 
Robin Szemeti




Re: Changing namserver whois record

2003-02-17 Thread Robin Szemeti
On Monday 17 February 2003 18:11, Paul Makepeace wrote:
> A friend of mine has srl.org which is listed in whois as a nameserver

and to correct a common misconception .. the nameservers are not listed in 
the whois record .. well  .. they are listed in whois record, but thats a 
human readable thing not really involved in DNS per-se ... its the host 
record / zone file of the .org root servers that does the business .. they 
are derived from the whois record .. BUT ( and I believe this is vaguely 
important) the contents of the whois record are not used by the DNS system in 
anyway .. its the host record/zonefile that counts.

for instance .. if you upload changes to the .uk root servers, you will 
notice the whois record on whois.nic.uk chnages immediately ... however the 
host records are only updated at ~4am, until that point the two records are 
differetn ... but when the root servers are updated thats when the changes 
start to occur in the DNS sytem, not before.

-- 
Robin Szemeti




Re: Changing namserver whois record

2003-02-17 Thread Robin Szemeti
On Monday 17 February 2003 18:11, Paul Makepeace wrote:

> It seems that looking up the address (`host srl.org`) returns the A
> record without consulting the nameservers, presumably since it's
> registered with an A record by dint of being a whois-known nameserver. I
> didn't realise the gTLD servers did that. What a pain in the arse.
>
> penderel:~$ ns srl.org | perl -ne '/\S+$/ && print `host srl.org $&`'
> srl.org A   208.44.199.253
> srl.org A   208.44.199.253
> srl.org A   208.44.199.253
> penderel:~$ host srl.org
> srl.org A   64.81.251.171
> penderel:~$

right ... what you have here is an unwanted glue record:

in the dig stuff below you will see the line:

srl.org.172800  IN  A   64.81.251.171

that is coming directly from the .org root server.  the query is never 
referred to your nameservers as the .org root server is able to give an 
authoratative answer ...  and  helpfully it is 4 days TTL .. so at best it 
will be friday before it gets sorted :)

AFAIK the only way to get rid of these is to make a request to the registrar 
to do it manually, as it is rarely possible using the sh1tty web forms.

(ask a certain dave hodg about the fun we had with a glue record for www.blah)



##

[robin@workstation robin]$ dig @E5.NSTLD.COM srl.org a +norecurse

; <<>> DiG 9.1.3 <<>> @E5.NSTLD.COM srl.org a
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39381
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 0

;; QUESTION SECTION:
;srl.org.   IN  A

;; ANSWER SECTION:
srl.org.172800  IN  A   64.81.251.171

;; AUTHORITY SECTION:
srl.org.86400   IN  NS  ns3.realprogrammers.com.
srl.org.86400   IN  NS  ns2.realprogrammers.com.
srl.org.86400   IN      NS  ns1.realprogrammers.com.

#

-- 
Robin Szemeti





Re: Pre-Requisites (little) hell [Was: Re: REGEXP Hell]

2003-02-14 Thread robin szemeti
On Friday 14 February 2003 10:45, Tony Bowden wrote:
> On Tue, Feb 11, 2003 at 09:54:47AM -0200, Luis Campos de Carvalho wrote:
> >   The use of a third-party module raises a new problem: there is any way
> > to automate the installation of pre-requisite libraries on a system? I
> > wanna end up with a script that the operator just runs before publishing
> > the new scripts on the production system, and that is able to install all
> > libraries. I have a connection to the internet and think on something
> > like
> >   #!/usr/bin/perl -wT
> >   use strict;
> >   use CPAN;
> >   install qw/ Some::Module And::Another::One Time::Parse DateTime
> > /; __END__
>
> You could use Abigail's The::Net module:
>http://perlmonks.thepen.com/92473.html
>
> use The::Net;
> use Some::Module;
> use And::Another::One;

ummm ... isnt this a solution to an already solved problem? surely just 
adding it to the PREREQ_PM hash in the Makefile.PL of your third party app 
will war you of the failures anyway  failing that just run a script to 
test for them and then fix them with CPAN. Have a look at how RT (request 
tracker .. umm http://www.bestpractical.com/rt/) does it if you dont want to 
do the Makefile.PL thing .. they run a ./testdeps  and a ./fixdeps scripts 
that err test and fix the dependenices ...


-- 
Robin Szemeti




Re: Simple cryto script

2003-02-14 Thread robin szemeti
On Thursday 13 February 2003 15:13, Joel Bernstein wrote:
> On Thu, Feb 13, 2003 at 03:01:35PM -, Neil Fryer wrote:
> > Hi All
> >
> > I found this script on the net, and I am still learning, Perl, but I was
> > wondering, just to play around with, if this script encrypts, how would I
> > decrypt?
>
> You wouldn't.

heh .. are you sure .. you see there's this chap davorg knows called BK

he once wrote something along the lines of " I use crypt all the time, but I 
seem to have temporarily forgotten the how to decrypt it ... could someone 
please remind me .."  .. maybe its worth getting in touch with him to see if 
he has remembered yet?  ;

-- 
Robin Szemeti




Colostomy bags for Aardvarks .. was Re: Helpful subject lines

2003-02-12 Thread robin szemeti
On Wednesday 12 February 2003 15:25, Jonathan Peterson wrote:

> In fact, I daresay clever modern software does message threading based
> on something smarter than pattern matching the subject line (oh, tell me
> that's true), so we could (steady now) change the subject every time we
> replied, subtly changing it to reflect (radical I know) the contents of
> the message:

most MUA's use the 'References:' or the 'In-reply-to:' line in the header to 
do the threading ... off hand I can't think of any that use the subject line 
... 

-- 
Robin Szemeti




Re: Bad interpreter

2003-02-12 Thread robin szemeti
On Wednesday 12 February 2003 11:37, Andy Wardley wrote:
> I'm at a loss.  This script works fine:

>   #!/usr/bin/perl
>   print "bad\n";

>   bash: ./bad.pl: bad interpreter: No such file or directory

delete and retype the first line.

I have had problems before with either weird linefeeds or other non-printing 
chars embedded in there that have caused this. retyping the line has always 
cured it.

-- 
Robin Szemeti




Re: Perl debugger

2003-02-12 Thread robin szemeti
On Wednesday 12 February 2003 10:33, Dave Cross wrote:

> > It's easy.  After starting your script with "perl -d
> > script.pl", there's only 3 commands.  One of them is "q"
> > to quit[1].  Next is "n", to go the next line of your
> > code.  Repeat until problem found.  Last comes "x" to
> > display data structures.
>
> You missed "s" to step into subroutines.

and (at risk of turnig this into a 'list all the commands in the debugger' 
thread)  .. "o" to step back out of the subroutine is handy too ...

-- 
Robin Szemeti




Re: Language Gentlemen and Ladies

2003-02-11 Thread robin szemeti
On Tuesday 11 February 2003 15:30, Lusercop wrote:
> On Tue, Feb 11, 2003 at 02:44:24PM +0000, robin szemeti wrote:
> > umm is there some particular reason that whoever is responsible for
> > adding that massage couldn't see fit to add a proper content seperator
> > (/^--\s\n/) as defined in the RFC's ??
>
> Which RFC is the "-- " (not /^--\s/) defined in?

to be precise, it is defined as "\n-- \n"

> I always thought it was a
> USEFOR thing, and therefore not on the standards track. I suppose it could
> be in the Nettiquette RFC, but I don't remember seeing it there.

ummm ... I *thought* it was actually in one ... hmm RFC2646 mentions it, so 
does RFC1036, but as you say, more in relation to a usenet posting 
convention, and  the business vCard one does as well iirc ... ho hum ...

-- 
Robin Szemeti




Re: Language Gentlemen and Ladies

2003-02-11 Thread robin szemeti
On Tuesday 11 February 2003 12:31, [EMAIL PROTECTED] wrote:

> PS sorry for the disclaimer below ( apparently we've won awards for it ).
>
> Visit our website at http://www.ubswarburg.com
>
> This message contains 

umm is there some particular reason that whoever is responsible for adding 
that massage couldn't see fit to add a proper content seperator (/^--\s\n/) 
as defined in the RFC's ??

-- 
Robin Szemeti




Re: cheap-ass SSL certs

2003-02-11 Thread robin szemeti
On Tuesday 11 February 2003 11:52, Dave Hodgkinson wrote:
> What's the cheapest way of doing a reasonably pukka SSL site cert?

we just renewed with Thawte as they seem to be not too expensive, and it 
works on almost everything.

There are much cheaper options (right down to 50 quid .. maybe less) that are 
accepted by a smaller number of browsers, sometimes, except when there is a R 
in the month.  Geotrust and FreeSSL are just a couple of the names out there.

checkout:

http://www.whichssl.com/comparisons/index.html

and check out this too, perhaps first even.

http://www.whichssl.com/faq/compatibility.html


-- 
Robin Szemeti




Re: WWW::Map::UK::Streetmap - A tale of woe

2003-02-10 Thread robin szemeti
On Monday 10 February 2003 12:36, David Cantrell wrote:

> mod_perl in general.
>
> Issues like excessive memory use, and problems with database connections
> being able to hang the whole web server.

really? ... I guess it depends on how you run your mod_perl ...  sure, 
running a mod_perl enabled server with mod_perl fully loaded with your app on 
every apache child process will increase the apapche memory footprint a great 
deal, and if each child maintains connections to the dtabase then you have 
double trouble .. but run with a reverse proxy setup (either single tiered or 
multiple tiered architecture) frees you from most of those problem .. if not 
all of them.
-- 
Robin Szemeti




Re: WWW::Map::UK::Streetmap - A tale of woe

2003-02-04 Thread robin szemeti
On Tuesday 04 February 2003 19:25, Paul Makepeace wrote:

> I must say, I have always thought Streetmap sucks. IMO: It's ugly, its
> parser is atrociously bad, and IME it often can't find addresses that
> other sites can.

also .. the others seem to be able to go to a particular zoom size 
just-like-that with a suitable clicky thing ... with StreetMap you have to 
(annoyingly) load each intermediate + or - page to get to the amount of zoom 
you require

-- 
Robin Szemeti




Re: yapi / photo organisers

2003-02-03 Thread robin szemeti
On Monday 03 February 2003 18:41, Chris Heathcote wrote:
> Hello
>
> Can anyone suggest an online web photo organiser, like yapi(2), but
> that doesn't require Template Toolkit and other shenanigans? I'm
> trying to install on my webspace at he.net, so no root stuff.

try cthumbs, run it locally, upload the resulting pages and images to your 
web space, its nice and plain, but effective.

or spidereyeballs I've heard good things about and seems to do nice job on Mr 
Clamps archive .. but no idea what is involved in .

on a side note, I've been playing with Apache::Album (which requires mod_perl 
and all that) and have subclassed it as Apache::Album::Pretty, which if the 
maintainer of Apache::Album will accept my patches, will be a sub class of 
Apache::Album, and if not I'll release it as a standalone module in its own 
right ...


-- 
Robin Szemeti




Re: validating chunks of HTML

2003-02-03 Thread robin szemeti
On Sunday 02 February 2003 23:36, Paul Makepeace wrote:

> E.g., something that could be fed a lump of text and then return an
> error with some kind of indication where the parser barfed. I'm not too
> familiar with the parsers out there to know which would do this best.
> The HTML:: don't actually seem to catch errors or match tags etc.
> XML::something?

This is a snippet that might help, using the OpenJade/OpenSP stuff that 
implements a fully validating SGML parser ... it validates against the real 
DTD's, you could always tweak a DTD to allow thngs such as missing alt="" on 
images if you werent bothered about such things

#!/usr/bin/perl

use warnings;
use strict;

my($sp)= "/usr/local/bin/onsgmls";
my($cat)= "/home/httpd/htdocs/sgml-lib/catalog";

my($msgs)= validate('/home/robin/test.html');

foreach my $msg (@$msgs){
  my($line,$posn,$type,$comment) = $msg =~ /(\d+):(\d+):([E|W]): (.*)/;
  next unless defined($type);
  # only interested in errors;
  if($type eq 'E'){
print "Error on line $line (position $posn) : $comment\n";
  }
}

exit 0;

sub validate{
  my ($file)=@_;

  my($cmd) = "$sp -E0 -wnon-sgml-char-ref -c $cat -s < \"$file\" 2>&1 |";
  open(SP,$cmd )
or die "failed to open SP ($cmd) : $!\n";

  my(@msgs)=();
  close SP;
  
  return (\@msgs)
}


-- 
Robin Szemeti




Re: validating chunks of HTML

2003-02-02 Thread robin szemeti
On Sunday 02 February 2003 23:36, Paul Makepeace wrote:
> I'm trying to decide on the best way of checking small fragments of HTML
> for well-formedness, i.e. catching overlapping tags, missing end tags,
> etc. Nothing fancy, just an aid when inputting HTML in a form.

I've been using the some code to check whole trees of html  it uses 
OpenJade[1] as its parser and has the OpenSP tools to help ... you might like 
to take a look at that.  By simply wrapping your suspect code in a suitable 
HTML doc type you can then validate it against whicever DTD in the catalogue 
you require /// 

 infact I would have thought the w3c validator[2] which also uses 
Jade/OpenJade and OpenSP ... it  does almost *exactly* what you want (it has 
a option for file upload, replace that with a textfield and and then wrap it 
in an HTML doctype)... and it produces a human readable output ... I would 
have thought minimal hacking of that would have got you exactly what you need.

[1]http://openjade.sourceforge.net
[2]http://validator.w3.org
-- 
Robin Szemeti




Re: [PUB] Spread Eagle, NW1

2003-01-28 Thread robin szemeti
On Tuesday 28 January 2003 13:49, Paul Makepeace wrote:

> > Ah, but most of us (being programmers) can do the maths and know
> > that in the long term you will always money.
>
> Money as a verb - what's the secret of your success Dave?

there was an implicit 'lose' in there. these days whenver people mention 
money it is taken as read that you will be losing it.

q.v. dotcom revolution.

-- 
Robin Szemeti




Re: My lightning talk tonight...

2003-01-23 Thread robin szemeti
On Thursday 23 January 2003 06:07, Piers Cawley wrote:
> I may be about to change my lightning talk subject to 'New techniques
> in complexity management'. Depends if I can get the material down to 5
> minutes and get it written.

theres something vaguely recursive about that.

-- 
Robin Szemeti




Re: CVS Client

2003-01-22 Thread robin szemeti
On Wednesday 22 January 2003 16:36, Roger Burton West wrote:
> I think I'll be recommending the Tortois package to my less
> CVS-aware users.


This tortois,  is it becoming inquisitve?

-- 
Robin Szemeti




Re: web app stylings

2003-01-18 Thread robin szemeti
On Saturday 18 January 2003 11:34, Alex McLintock wrote:

> So this is one primitive way of creating the "controller" object in the
> Model-View-Controller pattern for web apps.
> Are there any off the shelf MVC systems? I know of TemplateToolkit and
> other View systems, and DBI::Class and similar can be used for Model side
> of things, but the controller is always missing in perl.

Have a look at OpenFrame (CPAN)  which  is a  london.pm/fotango centric 
application framework  although you should be aware that it works best 
when the resultant html is output in Orange ;)

> For instance what if you wanted to do a role based
> authentication/authorisation system. Does everyone write if from scratch
> each time?

in theory you just pick your favoutrite Apache::Auth module. In practice 
I find myself writing it from scratch as a) none of them *quite* seem to fit 
what I'm doing right now and b) there are so many of them on CPAN I get bored 
looking through them all ;)

Im willing to be corrected on that one though

-- 
Robin Szemeti




Re: Ski Social!

2003-01-17 Thread robin szemeti
On Thursday 16 January 2003 12:08, Ben wrote:

> OK. No-one's posted about this for almost a week, so I thought I'd reopen
> the discussion.
>
> I think we need to decide: Who? Where? When? How Long?

uh huh.

> Then we can go and book it. :)
>
> I'm not electing myself cat herder or anything, I'd just like this to
> happen, so I propose that anyone who's up for it follows up to this mail,
> then we take it to private mail to avoid cluttering the main list, unless
> everyone else doesn't mind wuffle about skiing.

welcome, chief cat-herder.

> Summary of my recollections:
>
> Who:Ben, robin, Joel, ... I know there were others?
> When:   Last week in Feb? Or some other time. Trying to avoid FOSDEM and
>
> Valentines Where:  Unknown. Val d'Isere, Chamonix and Saas Fee have been
> mentioned as possible. More ideas? "Somewhere high up with mountains"?
> Time:   "A long weekend". Fly out Thursday night, take friday off, fly back
> sunday night? Other ideas?

I'm in if it can be later rather than sooner in feb. My good lady wife is due 
to become much thinner around the 14th, and I think I'd be in trouble if I 
wasnt there for the pushing and grunting bit.
-- 
Robin Szemeti




Re: rackmount question

2003-01-14 Thread robin szemeti
On Tuesday 14 January 2003 17:58, Mark Fowler wrote:
> Jody wrote:
> > So, anyone got any advice that could help me make a decision?
>
> An aside issue: Where's this being hosted?  Is it going in an Airconed
> room, and will you be able to get half a U gap between this server and the
> next one or are you likely to be sandwidtched inbetween two other
> potentially hot servers?
>
> To be honest if you don't need the CPU power (why would you?)  I'd prefer
> to get something that ran reliably.  It's a major pain in the butt going
> and sorting out misbehaving co-lo machines.

seconded. 

Unless you are putting this somewhere really expensive and well 
airconditioned (eg Telecity) then 1U boxes do not pay off in the (cost of 
box)V(cost of hosting) trade off. add in the less room for extra drives, more 
expensive PSU's,  more heat etc and its a non-starter. Of course if you *are* 
putting it in Telecity, then you've probably got enough cash to just buy a 
Intel 1U boxen and a spare anyway.

some places (eg mailbox) don't charge differently for a 1U or a 'desktop' 
sized machine anyway, so you aren't necessarily gaining anyting.

-- 
Robin Szemeti




Re: copyright and NFS

2003-01-13 Thread robin szemeti
On Saturday 11 January 2003 13:08, Nicholas Clark wrote:

> If you have a short answer to the above question, consider this analogy:
> If I have a physical book, I could unbind it, and allow different
> programmers to borrow only the pages they needed. What stops me unbinding
> my electronic file into separate pages, so that no page is being used more
> than once simultaneously?

many books contain in their licence a clause 'this book shal not be lent, 
hired or resold in anyhting other than this original binding'  intended to 
cover i suspect, exactly that situation.

IANAL, but I suspect if you look carefully the at the license that came with 
your document, that should clear up your point. I would imagine that 
distributing it via NFS (regardless of the technicalitites of how many 
'copies' exist) would class as 'publishing by electronic means' or 
'broadcasting'. 

If the book is any good, just buy more copies rather than trying to find 
'weasel-word' cluases that allow you to short change the authors. :) 
Alternatvely just use whatever GPL documentation is available.

-- 
Robin Szemeti




Re: Ski Social!

2003-01-10 Thread robin szemeti
On Friday 10 January 2003 15:40, Joel Bernstein wrote:

> > Might I tentatively suggest the last weekend in Feb?
>
> Possible...

suits me ...

> Absolutely. I'm a huge fan of Val d'Isere, where I worked for a season.
> Chamonix isn't too convenient (valley town) but has marvellous skiing
> and is an hour from Geneva.

I *love* chamonix ... so that would suit me.  5 seperate ski areas accessible 
from the village,  an hour or so from GVA on the train ...  and theres the 
'vallee blanche' 22km off piste run if anyone fancies it :)  add in decent 
night life and being a real town rather than a ski resort, we might find it 
easier to get 'long weekend' accomodation as the resorts are really just 
geared up for whole-week packages.

But, I'll ski anywhere for a long weekend, no worries.

-- 
Robin Szemeti




Re: Ski Social!

2003-01-10 Thread robin szemeti
On Friday 10 January 2003 10:07, Joel Bernstein wrote:
> When the lovely snow was coming down, Robin Szemeti and I discussed how
> we should do a London.PM-On-The-Piste social this winter. I was hoping
> to gauge opinion on this... Would anybody be interested in a weekend in
> the Alps skiing or snowboarding?

abso bloomin lootly.

a long weekend would be better as its a long way to fly just for 2 days, but 
its doable.

wahtever .. count me in. (apart from a few days around feb 14th when my 
inconsiderate wife says I cannot go because she is 'giving birth' or some 
other such nonsense :)

-- 
Robin Szemeti




Re: [OT] Playstation2 as DVD Player

2003-01-09 Thread robin szemeti
On Thursday 09 January 2003 11:18, Roger Burton West wrote:
> On Thu, Jan 09, 2003 at 10:17:56AM +0000, robin szemeti wrote:
> >( I havent looked in years, but I assume the hi-fi (HA!) mags sell such
> >nonsense still?)
>
> http://www.mapleshaderecords.com/tweaks/cablelifts.html
> http://www.mapleshaderecords.com/tweaks/powercord.html
> http://www.mapleshaderecords.com/tweaks/omegamikro.html

Truly stunning. I am always amazed at the things you can sell to morons who 
have money.

Anyway .. must go .. got to get the first batch of sound-improving coloured 
stickers sold :)

-- 
Robin Szemeti




Re: [OT] Playstation2 as DVD Player

2003-01-09 Thread robin szemeti
On Wednesday 08 January 2003 23:50, David Cantrell wrote:
> On Wed, Jan 08, 2003 at 11:00:48PM +, Natalie S. Ford wrote:
> > um, i think it is the scart cable supplied with the ps2, not the drive -
> > it is the same drive in the ps2 as is installed in many laptops.
> > i am sure that muttley can explain further, but a scart cable upgrade
> > should sort you out, dave.
>
> Nah, nothing to do with that.  All the cable does is carry the video and
> sound signal from the PS2 to the telly.  A bad cable may cause the signal
> coming out the other end to be crap quality, but it won't make the disk
> skip or fail to read.

no no .. you'll be amazed at the difference ..( and they are called 
'interconnects', not 'cable') ... here, buy this one, it has gold plated 
connectors, oxygen-free copper conductors, with mono-crystal cores, of course 
you have to connect it the right way round or it sounds *awful* ...  a snip 
at £360.

I don't suppose I can sell you a special green pen to colour the edges of 
your CD with to make them sound better while I'm at it?

( I havent looked in years, but I assume the hi-fi (HA!) mags sell such 
nonsense still?)
-- 
Robin Szemeti




Re: Estimating accuracy of IP->country lookup

2003-01-08 Thread robin szemeti
On Wednesday 08 January 2003 12:29, David Cantrell wrote:

> It's also worth considering why you are doing the lookup, and whether
> false- positives or false-negatives are preferable.  In my case, I was
> doing it with the intention of restricting access to streaming media to
> those in particular countries. 

which also brings into question the source of the data and the licence terms 
... AIUI the RIPE data specifically cannot be used to target adverts or 
restrict access to documents. so you'd have to find some other source of data 
to enable you to do this.

I could of course be wrong.

-- 
Robin Szemeti




Re: [OT] Playstation2 as DVD Player

2003-01-07 Thread robin szemeti
On Tuesday 07 January 2003 20:48, Dave Cross wrote:
> I
> tried the disc in the DVD drive in my laptop. And it worked perfectly.
> I then tried a couple of other discs that I've had trouble with and they
> worked perfectly too.

goodness ... so it looks like the DVD drive fitted to your multi-thousand 
pound laptop is of better quality than the one in the mass-market, cost cut 
to the bone, 200 quid PS2  how very odd :)

-- 
Robin Szemeti




Re: Sorry - this is just a test

2003-01-03 Thread robin szemeti
On Friday 03 January 2003 12:55, Nicholas Clark wrote:

> Do we know anything more about YAPC::EU::2003 yet, something more precise
> than
>
> Location: Paris
> Date: 2003
> Colour:   Pink

Pink? .. whatsort of a poxy colo[u]r is that?  whats wrong wiht, say, hmm I 
dunno, mmm Orange?

-- 
Robin Szemeti




Re: SQL Trick

2002-12-18 Thread robin szemeti
On Tuesday 10 December 2002 16:35, Shevek wrote:
> On Tue, 10 Dec 2002, Nigel Hamilton wrote:
> > Here is an SQL trick that solves this problem:
> >
> > select * from table
> > where   1 = 1
> > and a = 1   etc.
> >
> > It just makes things a bit easier ... any other tricks out there?
>
> This is sometimes useful but
>   push(@and, 'arse=large') if $large;
>   push(@and, 'bosom=voluptuous') if $voluptuous;
>   $sql .= " where " . join(" and ", @and) if @and;

a further and more general refinement being:

# hash out yer conditions
my($things)={ arse => 'large', legs => 'two' };

# go loopy
my(@and,@args);
foreach my $field ( keys %{$things}){
  next unless $things->{$field};
  push(@and,"$field=?");
  push(@args,$things->{$field});
}

# squeal
$sql .= " where " . join(" and ", @and) if @and;

$sth->prepare($sql);
$sth->execute(@args);

in my handy abstraction layer I have

my($answers) = hashQuery("table",[qw/id date name/],$things);

which performs that query and returns an array of hashrefs for selecting the 
fields id, date and name etc.  if the 2nd term is undef then 'select *' is 
assumed

-- 
Robin Szemeti




Re: Social photos

2002-12-17 Thread robin szemeti
On Tuesday 17 December 2002 03:32, Toby|Wintrmute wrote:

> Some will give a range of options like "Sunlight, Halogen, Flurescent,
> Incandescent", others may give you a White Balance menu instead, which
> allows you to select what temperature lighting you are using. (5300k,
> 6500k, etc) 
>
> I have never seen a camera yet with an Auto white balance that ever works
> with non-sunlight conditions, btw.

well ...  I have .. but they usually have something like 'Sony DigiBeta' 
written on the side and a 40K + price tag



The problem with non-icandescent lights is the spectral purity(or lack of) . 
An incandescent light generates a smooth curve of colours from deepest blue 
to darkest red, so there is light of every frequency emmitted, its merely a 
question of the shape of the curve. White balance is achieved by simply 
adjusting the apparent levels of RGB until it looks 'white' .. however with 
flourescent and lights such as sodium street lights there is a different 
problem. 

The light from non-incandescent sources is not emmitted at all frequencies, 
but in certain discrete frequencies. The light as it comes into the camera is 
split by a series of dichroic filters into R,G and B which are then fed to 
the CCD sensor ... Typically the filters overlap quite a bit, so whatever the 
frequency of incoming light, it gets fed to at least one of the R,G or B 
filters .. however recent years have seen a trend towards more 'colorful' 
cameras ... steeper filters with sometimes gaps between the colors. 

Occasionally this can result in odd results under flourescent lighting, to 
give an example, say a sheet of white paper is illuminated by a flourescent 
lamp that gives just 3 spectral lines roughly in the R, G and B regions, the 
light is reflected by the paper and to the human eye looks white  but by 
chance the Blue light happens to fall down the gap between the G and B 
filters in the camera ... to the camera it looks bright yellow. 

You can often see this effect very clearly with sodium street lights which 
are essientiall two discrete spectral lines ... one red and one red-green, 
where the red-green colour falls in the gap between R and G filters and fails 
to stimulate the green sensors at all, the street lights appear dark red, 
instead of orange.

Cheap cameras, with 'bright and cheery' colorful filter sets built with 
little quality control are more likely to have missing bits of the spectra 
than carefully designed, extensively tested expensive cameras, with tight 
standards. Last time I looked, a top of the range 'ice block' splitter for a 
decent camera was in the region of GBP 5k plus, so I guess at the cheaper end 
of the market you can expect some gaps in the performance.


-- 
Robin Szemeti




Re: handwavy mod_perl query

2002-12-13 Thread robin szemeti
On Friday 13 December 2002 15:58, Paul Makepeace wrote:
> Without going into lots of detail about what this is, since I'm trying
> to be generic, has anyone here been involved with mod_perl sites that
> do a substantial amount of full HTML page (i.e. non-banner-ad)
> traffic? There'll be some SQL and Template Toolkit business going on
> as well. I'm trying to nail down some capacity requirements which are
> scaring me somewhat.
>
> The draft at the moment is wanting to support 2000 simultaneous users
> with approx 1m page views/*hour* (300/s ish) i.e. each of those users
> hitting about one page every six or seven seconds (by my calculations).

running ab against my random mod_perl stuff with TT and MySQL I have seen 
anyhting from 80 to 20 pages a second ... so lets guess on 30  

> Is this totally insane? Or do-able? How much iron probably involved?

so ... you'll need 10 cpus worth of mod_perl application servers .. a 
frontline of at least that number of client facing machines running as 
reverse proxies to allow the mod_perl engines to deliver a page to the proxy 
and get on with something else whilst the proxy handles delivery to the 
client. a load balancer and probably around about the same number of 
replaicated MySQL servers handing out data to the mod_perl app servers. (or 
some big Iron for the db backend) you will probably find that half a dozen 
mysql boxen are faster and cheaper than Big Iron) 

reverse proxies is the way to go on stuff like this as it allows the mod_perl 
stuff to run at maximum thrunge, delivering completed pages to thin and light 
client facing apache processes which can take their time pumping stuff out to 
clients.

Caching may be a good plan too. Ebay do some heavy caching of snippets to cut 
out al lthe db queries when compiling lists of items for example.

so .. say you go for 3U, dual processor machines.

5 for mod perl servers,
6 for client facing
5 mysql replicated dbs
1 master db
2 spares
load balancer


so 20 machines  of 3U plus cooling space ... say 2 racks worth?

plus UPS and routing, etc .. 2 and a half racks total?

3k a machine ... 60k .. plus bits routers, UPS, racks, spares, fans, shleves, 
cabling .. 100k total on hardware?

> (Putting aside the unholy b/width requirements for now..)
>
> Just curious if anyone could handwave back...
>
> Paul

off hand I'd say its bigger than most major sites Ive heard about (3 times 
CNN?) Id have to ask if your client had correctly calcultated the '2000 
simutaeneous users' ... as thats a lot.

-- 
Robin Szemeti




Re: [OT ish] Piping to a file.

2002-12-13 Thread robin szemeti
On Friday 13 December 2002 13:53, Simon Wilcox wrote:
> I have a variable thus:
>
> $mailprog = '/some/mailprog';
>
> Later, it gets used thus:
>
> $result = open SENDMAIL, "| $command";
>
> And then stuff gets printed to it.
>
> I want to capture the stuff that's printed to it into a plain text file.

if($really_send_emails){
  open(SENDMAIL,"| /usr/lib/sendmail -t") or die "bah: $!\n";
}else{
  open(SENDMAIL,">>/my/logfile.txt") or die "humbug : $!\n";
}

then just print to SENDMAIL in the usual way ...

-- 
Robin Szemeti




[ ADVERT ] Anyone for hosting?

2002-12-06 Thread robin szemeti
As some of you may know I have a whole rack of gear at Mailbox.[1] I like 
having a whole rack, it makes me feel *god*. Anyway .. I digress. As a 
result of mmm 'changes in the client's requirements' I'll have lots of space 
after Christmas. I still have a couple of boxes I need to host there, so 
ideally I'd like to keep the rack and sell on the vacant space/bandwidth to 
fellow mongers who want a colo box. 

The basic deal is 

1) enough space for a standard minitower or desktop box. (no need to go to 
the expense of a 1U or 2U boxen)
2) 'some' bandwidth (I currently have a 1mb port I would estimate 
we can share that around 6 boxen. I comfortably move around 20gb a month down 
a 256 on another box, so it should be plenty)
3) use of the UPS (I have twin 1400va UPS)
4) use of the 192.168.1.0/24 100mbs subnet within the rack

I can buy in more bandwidth if its needed.

Depending on how many people are intrested I expect the price to be between 
40 and 70 quid per month.  I'll still have some commercial stuff going on in 
there, but I intend to do the coloboxen bit basically on a cost sharing 
basis.

mail me at robin(at)redpoint.org.uk or this address if you are vaguely 
interested and I'll get together a little list and try and firm up some 
prices.

[1] http://www.quacky.co.uk/servers.jpg
-- 
Robin Szemeti




Re: The 2002 Perl Advent Calendar

2002-12-06 Thread robin szemeti
On Monday 02 December 2002 11:20, Tim Sweetman wrote:
> > Mark Fowler wrote:
> >> Doesn't December come round quickly?
> >>
> >> http://www.perladvent.org/2002/
>
> Rght...
>
> so you use IO::AtomicFile, and ... at risk of being picky ...
> 1. Its temporary filename doesn't incorporate anything random, or the
> process ID. So should you happen to have two processes running
> simultaneously (eg. wraparound cron syndrome), you could end up end with
> interleaved interleaved content and not be very content content. Innit.
>
> 2. It's not fail-safe. If you don't explicitly do the "disaster
> recovery" bit by using an eval block and the ->delete method (and
> calling a fatal exception a disaster seems melodramatic), the default
> behaviour is for IO::AtomicFile to quietly and silently put your
> incomplete file into the place of the live one.
>
> Admittedly this makes life easier for people who want to drop
> IO::AtomicFile in in place of IO::File, or Nick Hornby fans who don't
> want to write "->commit", but that strikes me as the Wrong design decision.
>
> IMO, if you write a Perl module that does something nice and useful
> transparently, it should bloody well do it properly, ie. not with
> obscure edge cases that the user can't see and that you don't talk
> about, and encouraging the user to do the right thing. Part of the point
> of code reuse is that reused code can (and must) be built solidly.
>
> Cheers
>
> Tim

-- 
Robin Szemeti




re: Perl advocacy opportunity ...

2002-12-01 Thread robin szemeti
as a first step, getting plenty of Perl people signed up and making Perl'y 
sort of noises on their 'internet specialist group' would probably be no bad 
thing ...

http://www.isg.org.uk/member.htm

its free btw,

-- 
Robin Szemeti





Perl advocacy opportunity ...

2002-12-01 Thread robin szemeti
hmmm ...

http://www.news.jobserve.com/NewsStory.asp?SID=SID1259

Precis: the British Computer Society (http://www.bcs.org) run a programming 
competition every year (solve as many problems as possible in a given time) 
.. the languages on offer are C, C++ Java ... and new this year .. Visual 
Basic .. they hope to include C# next year :(

So ...  probably a bit of a non starter this year, how about we do the 
advocacy thing, try and first get Perl included, and then win the thing?

Getting Perl onto the list would be the first challenge, but surely not that 
hard.  Perhaps even if we could just get a place in one of the regional heats 
as a 'demonstration sport' sort of thing  whupping the competition (and 
you know we can ) would be a feather in our caps.

Sadly, their site is down right now so I can't see the precise rules ...  
AFAICT its a 'real life' thing where you actually have to turn up and do 
stuff so would involve coming into the outside world, probably whilst the 
daystar is shining brightly too ... but .. it could be worth it :) .. 
certainly raising the profile of Perl would be worthwhile, winning the 
competition wouldn't do your job prospects any harm either.

Thoughts ... ?

-- 
Robin Szemeti




Re: In Defence of Mysql was Re: Divorcing data storage from businesslogic

2001-07-06 Thread Robin Szemeti

On Friday 06 July 2001 15:41, Tony Bowden wrote:

> > On Tue, Jun 19, 2001 at 11:12:06PM +0100, Robin Szemeti wrote:
> > umm just do
> > show tables;
> > and ...
> > describe $blah;
>
> And also "show create table $tablename" to recreate the create command
> (which is much easier than trying to piece it together from 'show
> tables', which IIRC you can't reverse engineer composite keys from)

ooh .. dint know that .. 

Ive always done 
mysqldump --opt -d -u blah sourcedb tablename -p | mysql -B -u blah 
destdb -p
when recreating tables in other places

infact mysqldump --opt -d  is a pretty good way of keeping a copy of the 
schema for hacking and editing for the new one .. in general I find it 
easier just to to that and hack it with [vi|xemacs|gedit][1] than it is 
typing in all those create statments and then trying to do ALTER TABLE on 
all the bits you got wrong ;))




Re: In Defence of Mysql was Re: Divorcing data storage from businesslogic

2001-07-06 Thread Robin Szemeti

On Friday 06 July 2001 13:35, Jonathan Stowe wrote:

> Maybe I'm just blind and stupid but I cant find any description of the
> schema in the database itself - I would be delighted to find that I
> could do the equivalent of a 'select * from systables'.


umm just do 

show tables;

and ...

describe $blah; 

is that the same thing ? ...

there is a niceish GUI called kmysql that is almost OK  for browsing 
through schemas and a variety of other GUI that may be OK .. but I just 
can't be arsed to download em ;)




Re: Divorcing data storage from business logic

2001-07-06 Thread Robin Szemeti

On Friday 06 July 2001 11:09, Jonathan Stowe wrote:
> On Fri, 6 Jul 2001, Simon Wistow wrote:
> > Dave Hodgkinson wrote:
> > > Oh bollocks. It does what it does very well.
> >
> > ENoMoreFlameWars

come come .. the discussions may have been empassioned and strong 
feelings have been expressed on various points .. but it is only right 
that people who are deeply involved in something should have strong 
feelings about it .. 

I'd say the various 'hotly debated' topics have been a long way from 
being flame wars .. most postings contain reasoned argumnent one way or 
another .. thats not what I;d call a flame war ...

but you're right the list has been, at least as far as peoples web 
personae are concerned, a litle fractious .. ( seem pretty relaxed once 
they have a pint in their hands though :)  I'd rather we had the 
occasional hotly debated point than people tiptoing around incase they 
hurt anyones feelings .. in general I have oft been surprised just how 
well mannered people are on here .. a credit to the Perl community IMHO

right .. thats another mail on the long march to the top of the posting 
ladder ;)

r.




Re: Divorcing data storage from business logic

2001-07-05 Thread Robin Szemeti


On Thursday 01 January 1970 00:59,  wrote:

> I just thought I would wade in with yet another piece of anti MySQL
> propaganda at this point :)
>
> We have a 30Gb database of historical Radius log stuff at work and at
> the time the machine was built a 32Gb SCSI disk was about the only
> thing available.  People keep complaining to me about the disk being at
> 97% and so we piddle around carving a few meg off here and there but of
> course the database just keeps growing.  Now you all and I know thay
> with any half way decent database one would simple stick a new disk
> into the machine and allocate new storage for the database on that
> disk, but of course this is MySQL and all of the *files* that represent
> tables have got to be in the same directory.  Yes you say, but you
> *could* add the new disk and then create symlinks to the tables from
> wherever they get moved to the original directory.  Sure. The old files
> are going to have to be moved 30Gb oooh several hours.

uhh ..  so you wanted to run a 30gb database that could reasonably have 
been expected to expand .. and you decided to implement it on a ( 
presumably ) IDE 30gb disc .. if you wanted extensibility a RAID array 
might have been a plan ..  and a nice Mylex RAID controller .. but that 
would have been expensive .. RAID solutions have been available for 
longer than 30gb diisks so it looks like you chose a budget option and 
are now paying the price.

Or you could ahve gone down the Oracle route ..  [ cost = processor speed 
in mhz * annual profits + national debt of brazil ]

 .. which free databse does implement the 'add another disk somewhere' 
topology ?  .. seriously .. I;d be keen to hear what other free db is out 
there that will handle a 30gb db with the speed and reliablity of MySQL 
.. postgres I suppsoe .. what else?

its horses for courses and it looks like you chose the wrong nag for that 
application ... jsut the saem way as suggesting Oracle for someones toy 
website would be a bad plan too.  for quick access with 99% of it being 
reads and the occasional write ( typicalweb usage ) I still think MySQL 
is hard to beat .. postgres is good too and as soon as it gets a 
auto_increment non standard SQL addition I'll even use it ;))




Re: LinuxExpo/Social

2001-07-04 Thread Robin Szemeti

On Wed, 04 Jul 2001, Lucy McWilliam wrote:
> On 4 Jul 2001, Dave Hodgkinson wrote:
> 
> > You an Linux expo on Thursday?

I'll be there .. are we all gonna try and meet up at luncheon time for a
swift   glass of some cool refreshment?

if so .. when where ? ..

> [1] The Tomorrow's World live event was rather shiny.  Lots of toys,
> including Steve Bennett's 10 metre rocket.

its a pity that what was once a reasonably serious and informative
programme has now been dumbed down so far that there is more tech content
in The Archers.  and Mr Bennets rocket hardly qualifies as science ..
amusing publicity stunt yes .. science ? I think not.

-- 
Robin Szemeti   

Redpoint Consulting Limited
Real Solutions For A Virtual World 




Re: Website: no longer fixed width

2001-07-03 Thread Robin Szemeti

On Tue, 03 Jul 2001, Simon Wistow wrote:

> You can send both compiled and uncompiled WML and WML Script
> 
> application/vnd.wap.wmlc   wmlc
> application/vnd.wap.wmlscriptc wmlsc
> text/vnd.wap.wml   wml
> text/vnd.wap.wmlscript wmls
> 
> are the mime types in case anybody's interested. 
> 
> Having seen the way most vendors code their WAP stuff (stacks, VMs,
> browsers, gateways) I like to compile with my trusted compiler than risk
> injecting mroe errors into the flow.

 ... kewl ..i never knew that ..  yup soundslike the way to go

> > now if I actually still had a wap phone I could look at that ... :)
> 
> It's just html of the code.

oops .. i got a network error and reached the wrong conclusions ..

but yeah .. seen it .. nice.

again, its a while ago I looked at this stuff .. wasn;t there supposed to
be a ssl-a-like that was going to be a standard and in the next
generation of phone ??

-- 
Robin Szemeti   

Redpoint Consulting Limited
Real Solutions For A Virtual World 




Re: Website: no longer fixed width

2001-07-03 Thread Robin Szemeti

On Tue, 03 Jul 2001, Simon Wistow wrote:
> Robin Szemeti wrote:
>  
> > now theres an understatement! .. wap looked almost good .. unti I
> > discovered that most phones only cope with a 1300 byte packet .. about
> > enough to write your name with.
> 
> 1.5k innit? /shrug/ You're probably right actually.

depends on the phone and network.  ..  to be safe I coded for the
smallest common phone which was ISTR 1312 bytes ... ISTR the 7110 was
around 1500 though .. but you need to know what phone you are talking to
.. and that aint easy unless you have direct access to the network as far
as I know.

> 
> Amazing what you can fit into it though, especially if you write your
> own assembler and compiler and tweak the bytecode by hand :)

oh indeed :) .. of course tha tluxury isn;t available to most of us as we
don;t have access to the gateway / network interface, which AIUI means
I have to rely on their compiler .. or can you send bytcode to the
gateway? .. ??? I dunno.

> http://www.twoshortplanks.com/simon/wml/md5/md5.wmls.html 
> and 
> http://www.twoshortplanks.com/simon/wml/sha1/sha1.wmls.html
> 
> both compile down to less than the max size due to judicious of external
> libraries and rolling and unrolling of loops.
> 
> And realising that 
> 
>  var a = 1+1;
>  foo(a)
> 
> actually works out smaller than 
> 
>  foo (1+1)

now if I actually still had a wap phone I could look at that ... :)

-- 
Robin Szemeti   

Redpoint Consulting Limited
Real Solutions For A Virtual World 




Re: Website: no longer fixed width

2001-07-03 Thread Robin Szemeti

On Tue, 03 Jul 2001, Simon Wistow wrote:
> Steve Mynott wrote:
>  
> > 640x480 is more commonly used as a lowest common denominator by most
> > web design companies for the usual web market.
> 
> The ironic thing is that designers who have been triumphantly crowing
> that bandwidth is getting fatter, nobody uses everything but IE5 under
> Windows and can run at 1024x768 in 16.7 Million colours minimum now have
> to deal with WebTV, Set-top boxes, WebAppliances, Kiosks, PDAs and cHTML
> enabled browsers over very slow links. 
> 
> Laugh? I almost did.
> 
> God I don't miss web design. Course, I'm doing Wap now which is even
> worse, still ...

now theres an understatement! .. wap looked almost good .. unti I
discovered that most phones only cope with a 1300 byte packet .. about
enough to write your name with.

i wrote a really neat little search engine that delivered the results
(and some grpahics too) to a deck of cards .. looked ace. then discovered
on a real phone most I could get was two cards, not 10 .. hmmm became
disilusuioned, kicked it. jumped on it .. holowed the inside out and put
it in the garden as a bird feeder.

-- 
Robin Szemeti   

Redpoint Consulting Limited
Real Solutions For A Virtual World 




Re: Web client application survey

2001-07-02 Thread Robin Szemeti

On Mon, 02 Jul 2001, Paul Makepeace wrote:
> On Mon, Jul 02, 2001 at 08:50:53PM +0100, Jonathan Stowe wrote:
> > It didnae seem enough so I posted the url to http://use.perl.org :)
> 
> ASP 8.1%  
> C, C++ 12.8%  
> JSP18.4%  
> PHP11.0%  
> Perl   44.5%  
> other   4.8%  
> 
> Yeah baby yeah!

alright .. so whose got lwp-request running in a while(1){ } loop then ?

-- 
Robin Szemeti   

Redpoint Consulting Limited
Real Solutions For A Virtual World 




Re: TT & new website

2001-07-02 Thread Robin Szemeti

On Mon, 02 Jul 2001, Niklas Nordebo wrote:
> On Mon, Jul 02, 2001 at 10:58:07AM +0100, Peter Haworth wrote:
> > What, you mean you don't pronounce XML as "ximmle"? :-) A la tickle, piddle,
> > vermul, sequel (blech, surely this should be more like "sickle" to be
> > consistent).
> 
> I pronounce SQL as "squirrel". But I am a very sick man.
> 
> It makes it debug stuff like 'die $sql;' a lot more fun.

hah .. like you've got problems .. a while back I started naming
temporary tables and columns after body parts ... elbow, navel etc as it
made the SQL kinda fun ...

then one day I typed: INSERT INTO arse WHERE finger= ...

I no longer use that convention as it put me off my lunch.

-- 
Robin Szemeti   

Redpoint Consulting Limited
Real Solutions For A Virtual World 




Re: quick query about TT

2001-07-02 Thread Robin Szemeti

On Mon, 02 Jul 2001, Mark Fowler wrote:

> As I said on channel (answer repeated here for posterity.)  You use a
> VIEW.  VIEWs are collections of templates that can be referred to as a
> whole.  Thus I can switch my whole look by using the template stored in
> $a rather than the one stored in $b [1].

ooh .. more stuff with VIEWS ..

ok . .ignore that crap i wrote about INCLUDES etc .. it was a way to do
it .. but VIEWS sound betterer ;)

-- 
Robin Szemeti   

Redpoint Consulting Limited
Real Solutions For A Virtual World 




Re: quick query about TT

2001-07-02 Thread Robin Szemeti

On Mon, 02 Jul 2001, Greg McCarroll wrote:
> Ok, this is a quick plea about how experienced TT users would
> tackle the following problem ...
> 
>   You have your perl code, you are outputting to more than
>   one medium - hence you have more than one template. You
>   also have a big chunk of presentation logic that is applicable
>   to all presentation mediums (i.e. all templates)- where do
>   you stick this presentation logic? 

two parts to that answer ...

if the presentation logic is simple enough to be expressed in simple IF
ELSIF and FOREACH type things it goes in a template .. if it needs a
handful of regexes, and lots and && and || etc . it goes in another .pm

then ... I try and write my templates as a logic section and which is
mainly [% IF blah PROCESS blah %]  and then a series of BLOCK sections
that contain the formatting code .. if the BLOCK section look like they
will be reused I add them to a common_formats.tt2 and include that were
it might be needed. that way the logic can remain unchanged as i fiddle
with the foramtting templates so I can rest easy about not screwing up
how it works whilst jsut trying to make it look nicer.

 I guess you just need to put the presentaton logic in a bunch of
templates .. put your medium specific formatting in identically named
templates in two directories and then INCLUDE it at the beginning of each
template. By changing the INCLUDE_PATH you can control which set of
formatting stuff gets picked up for the appropriate medium. 



-- 
Robin Szemeti   

Redpoint Consulting Limited
Real Solutions For A Virtual World 




Re: London.pm firing on more cylinders

2001-06-28 Thread Robin Szemeti

Matthew Byng-Maddick wrote:

> On Thu, Jun 28, 2001 at 12:06:35PM +0200, Robin Szemeti wrote:
> [please fix your line length...]
> > I know nuffing about exim .. but if I change from sendmail it will be to
> > qmail as we run qmail on our various servers because of its  interaction
> > with Vpopmail for oodles of virtual accounts .. and Sqwebmail, the webmail
> > interface that only works with Maildir type mailboxes ..
>
> Fair point. :-) I was slightly trolling. :-)
>
> > Im not sure I see why embedding perl in a MTA would be any great advantage
>
> It's not necessarily the embedding of Perl in particular, although, obviously
> here, that's a good thing, but the embedding of a turing complete language,
> so that you have the power to adjust what actually happens without having
> to make your changes as patches to the source, and in C. In exim, the way
> in which the error responses can be customised could potentially allow you
> randomness in which response, but only if you used Perl to do it, as the
> inbuilt expansion stuff doesn't have the capability to do rand(). OK. So
> this is a bad example, but potentially applying filters on the message as
> they're being read at SMTP is good...
>
> > .. but hey .. I'm also the one who thought that the fact that mod_perl
> > allows you to write your entire Apache configuration file in Perl was one
>
> that's not the major reason why mod_perl is goo^Hd...
>
> > of the dumbest thing I'd heard in a long time. Sure .. you _could_ .. but
> > why on earth would you want to?
>
> Often when you have complex setups which apply to many virtualhosts.
>
> suppose I have a dir structure which is (like CPAN):
>
> /d/da/davecross
> /d/dc/dconway
> /l/lb/lbrocard
> /m/ma/mattbm
> (to pick a few :-)
>
> ok. so now I have a vhost that I know maps to mattbm. with perl:
> substr($h,0,1)."/".substr($h,0,2)."/".$h
>
> this can be useful.
>
> The real power of mod_perl, though, comes from being able to hook into
> the various handler stages of the Apache request object, something which
> has a really powerful API in C, but where you want to just link in code
> to the webserver (eg, take off a SessionID string from the beginning of a
> URL, so that all relative urls just work). That's where the power comes
> from.

indeedly doodly .. and mod perl os awesomely kewl for that sort of thing .. it
wsa jsut the 'write your httpd.conf in operl' bit I thought was err .. strange :)




>
>
> The reason that you link in code into your exim is to prevent the fork()ing
> and exec()ing of perl or procmail or whatever, you have the loaded
> interpreter already.

fair point .. I do like rejecting stuff right at the SMTP  connect stage though
... saves plenty of (my) bandwidth anyway ...OK .. maybe exim is kewl for that
too .. but I'll still be doing the qmail thing if I do change .. ;)






Re: TT & new website

2001-06-28 Thread Robin Szemeti

Greg McCarroll wrote:

> * Lucy McWilliam ([EMAIL PROTECTED]) wrote:
> >
> > On Thu, 28 Jun 2001, Alex Page wrote:
> >
> > > On Wed, Jun 27, 2001 at 10:59:54PM +0100, Chris Benson wrote:
> > >
> > > > Do you mean the UKUUG's Linux Developer's Conference 2001 at UMIST
> > > > from midday Friday 28th to ~midday Sunday 1st, with a grand meal on
> > > > the Friday night?
>

no .. I meant the Linux expo thing thats going on at Olympia ...


>
> > > Gah. Tempted, but I'd rather spend my birthday doing something slightly
> > > more entertaining...
> >
> > In the spirit of fluffy london.pm:
> > Happy birthday ;-)
> >
>
> what a nice thought!
>
> Greg (Age 26.95)

pah .. yougnsters!

 older and closer to burfday than that:)

robin aged 37.99178

>
>
> --
> Greg McCarrollhttp://217.34.97.146/~gem/





Re: London.pm firing on more cylinders

2001-06-28 Thread Robin Szemeti

Matthew Byng-Maddick wrote:

> On Thu, Jun 28, 2001 at 11:53:48AM +0200, Robin Szemeti wrote:
> [MTA wars]
>
> Use exim, you can have embedded perl, which means you can customise the
> 550 sod off spammer
> reply :-)
>
> (and also the various "relay denied" type of replies too. :-)
>
> MBM
>
> --
> Matthew Byng-Maddick <[EMAIL PROTECTED]>   http://colondot.net/

I know nuffing about exim .. but if I change from sendmail it will be to qmail as
we run qmail on our various servers because of its  interaction with Vpopmail
for oodles of virtual accounts .. and Sqwebmail, the webmail interface that only
works with Maildir type mailboxes ..

Im not sure I see why embedding perl in a MTA would be any great advantage .. but
hey .. I'm also the one who thought that the fact that mod_perl allows you to
write your entire Apache configuration file in Perl was one of the dumbest thing
I'd heard in a long time. Sure .. you _could_ .. but why on earth would you want
to?





Re: London.pm firing on more cylinders

2001-06-28 Thread Robin Szemeti

Paul Makepeace wrote:

> [2] And yeah, I *did* try ETRN'ing it myself with telnet and it didn't
> pay any attention despite furnishing me with a shiny 250. Ghod I
> hate sendmail.

:o) ... ahh   MTA wars ...

sendmail ... somedays I hate it .. some days I like it.

we run qmail on our servers and I like the easy 'bung a config file here
put a filename/ mail address/ pipe ' in it  style configuration of what
you want it to do with your mail .. and sendmail caught me out the other
day .. again with its poxy m4 configuration syntax :
Blah(`buffy',something) ... and the 'buffy' has to be in bactick,quote ..
not quote,quote  or it ignores it .. doesnt complain .. just ignores it
..
but OTOH .. I run sendmail on my border router at home as my mail gateway
and its fine .. I like the blacklisting and smarthost stuff.  It just
works ... If I could figure out how to set up the '550  sod off spammer'
message handling that I do with sendmail in qmail then I'd swap .. but I
never seem to get around to it.





Re: TT & new website

2001-06-27 Thread Robin Szemeti

David Cantrell wrote:

>
> >   o it is not Perl (yes, we can argue on this point, but let's not)
>
> No, lets.  You don't win arguments by defining certain contentious issues
> as being out-of-bounds.
>
> I remain open to persuasion, but haven't yet been convinced that I should
> spend any time with it, let alone that it is a better solution for anything
> I want to do than the competition.
>

AFAICT .. TT end Embperl approach the subject from totally diffrent
perspectives .. TT allows you to call up hash values or object methods as you
need em and generally encourages you to keep your code in your .pm's and your
HTML in your templates ...Embperl is more pointed at getting little chunks of
Perl that produce HTML slopped all around your templates ...

TT is safer to let designers loose on as they need know nothing about the
underlying implementation they just know they do
[% FOREACH user=myorg.getusers %] and lo it works ..  Empperl is more like
PHP in thta respect .. it attempts to get as much code into the 'templates' as
it can TT ttries to seperate it ,,

well .. thats how I see it anyway .. of course .. as usua, in probably worng
again.

anyone going to the linux thing next thursday? .. he asked .. in a thread
dispersal moment?






Re: Templating Solutions

2001-06-27 Thread Robin Szemeti

Mark Fowler wrote:

> On Mon, 25 Jun 2001, Robin Szemeti wrote:
>
> > for instance [% CALL useroption( cgi.param('option') ) %] is a
> > function that does something and accepts a list of options .. but TT
> > automatically folds the list of option returned by the cgi.param
> > method into a array ref .. unless it is a list of one .. in which case
> > it doesnt .. that neatly buggers up your foreach( @{$options} ){ ...}
> > method in the underlying perl ... involves some if ref($options) eq
> > 'ARRAY' stuff .. unless you can point me at a better way?
>
> You could make use of the funky new .array / .hash / .item virtual
> methods introduced in Template Toolkit 2.03. (see changelog
> http://www.template-toolkit.org/pipermail/templates/2001-June/001097.html)

OK .. I'll grab the latest ver as soon as I get back near a real connection
instead of laptop and mobile phone.


> > is there an easy way to determine what class something is .. eg a
> > search method that returns a list of object of different classes that
> > needs different template to present them .. at the moment I set the
> > name of the class in a method and do a [% IF obj.class == 'News' %] ..
> > but that must be bad I think .. is there a way of determining what
> > class something is like the ref() perl function ??
>
> See the section on VIEWs.  These can do pretty much what you want (e.g.
> call different BLOCKs/template files for presentation based on what an
> object's class is)
> http://www.template-toolkit.org/docs/default/Manual/Views.html

Perfect .. why didnt I see that before doh! .. thanks ... I guess its RTFM
then ... :))

>
>
> > I have a bit of leak when running it under mod_perl ..
> > but thats me I think not TT ...and once I get that sorted it will
> > be ready to go up ..
>
> Remember to reuse the same Template object each time rather than
> recreating it each time.

really? .. the documentation  ( Template::Tutorial page 10 ) says to create a
new one each time your handler{} method is called ?  ... but thanks for that
..  I did that and its better  .. (no longer grows by lots each time .. now
it jsust *occasionally* grows by 4k :) (about 1 hit in every ten on the same
page ...)

> (who's glad to have fast internet back again)
I'm missing my ISDN :( .. but the weather is great  :) .. spent most of today
floating about in a river to keep cool.

As for fast .. my last $orkplace  had a pair of Nortel STM16 fibre points ..
a pathetic 2.56gb/s each .. or 32 * ATM1 if you prefer ..  OK so it wasnt all
inter/intranet but it was still serious bandwidth ...:)






Re: Templating Solutions

2001-06-25 Thread Robin Szemeti

Andy Wardley wrote:

> For example: I start off having a hash array 'myorg' defining useful
> things so that I can do things like this:
>
>   [% INCLUDE userinfo FOREACH user = myorg.users %]
>
> and then later I change it to:
>
>   [% INCLUDE userinfo FOREACH user = myorg.users %]
>
> (the difference being that 'myorg' is now an object which implements
> the 'users' method to return an iterator to fetch a list of users from
> a database in a lazy manner)

indeed .. and its sooper .. I love it how it manages to work out how to do the
right thing just like that.

however :) .. it does sometime work against you ...

for instance [% CALL useroption( cgi.param('option') ) %] is a function that does
something and accepts a list of options .. but TT automatically folds the list of
option returned by the cgi.param method into a array ref .. unless it is a list
of one .. in which case it doesnt ..  that neatly buggers up your foreach(
@{$options} ){ ...} method in the underlying perl ... involves some if
ref($options) eq 'ARRAY' stuff .. unless you can point me at a better way?

also .. while I have your ear :)  ... is there an easy way to determine what
class something is  .. eg a search method that returns a list of object of
diffrent classes that needs s diffrent template to present them .. at the moment
I set the name of the class in a method  and do a [% IF obj.class == 'News' %] ..
but that must be bad I think .. is there a way of determining what class
soemthing is like the ref() perl function ??

whatever TT rocks ...I just wrote a website for some mates in a week that is
better than some paying stuff I worte in a several months :)  I have a bit of
leak when running it under mod_perl .. but thats me I think not TT ...and once I
get that sorted it will be ready to go up ..





Re: Where?

2001-06-24 Thread Robin Szemeti

Stray Toaster wrote:

> Robin Szemeti wrote:
>
> > Home: DY12 1RB
> > Work: DY12 1RB
> >
> > :)
>
> I am feeling left out now, and not only as my postcode is way out in
> the country...

yeah .. mine too :)






Re: Where?

2001-06-24 Thread Robin Szemeti

Home: DY12 1RB
Work: DY12 1RB

:)

Leon Brocard wrote:

> Lee Goddard sent the following bits through the ether:
>
> > I'm so bored I'm doing the world map of where you London.pm people
> > are. So anyone who's not spoken up, please do do.
>
> Wow, you must be bored. If you work out the longitude and latitude (in
> decimal please) I can throw it throw my world map generator wotsit
> (a la http://astray.com/Bath.pm/)
>

I did  a simple script that used lwp-request, a regex and the
streetmap.co.uk 'convert[oe]r' page to do postcode->lat/long on the fly
for something once ... (which was slighlty problematic in that the poxy
DLL they use to convert stuff from one to the other is, it turns out,
sensitive to the order in which the cgi params are submitted in the form
.. you have to copy the form exactly into your request-object or it barfs
;)

I'd post it .. but its at home and I'm in France


> To get coordinates, I use mapblast.com for world cities and
> streetmap.co.uk for UK postcodes...
>
> And yes, I should release the code, good point Elaine ;-)

yes very good point :)

yes please .. seeing as I was just this very day about to attempt the
exact same thing  for a club webiste  .. or if someone could point me at
a PNG or GIF of the UK that was lat/long  in a linear sort of way along
the axes that would be a bonus .. what do you call that? mercator
projection ?

this message is brought to you with:
A baguette, some brie, a crate of Kronenberg, warm weather and a great
view.