Re: Tech meeting note

2003-01-14 Thread David Cantrell
On Tue, Jan 14, 2003 at 12:03:20AM +, Kate L Pugh wrote:
 On Mon 13 Jan 2003, David Cantrell [EMAIL PROTECTED] wrote:
  LBW   probably last two weeks of August
 Location?

Banska Bystrica, Slovakia.

-- 
Lord Protector David Cantrell | http://www.cantrell.org.uk/david

Do not be afraid of cooking, as your ingredients will know and misbehave
   -- Fergus Henderson




Potential new module

2003-01-14 Thread Ivor Williams
I've been reviewing what I have learned from the LWP stuff I have been doing 
for Grubstreet. This involved form filling and POST method.

I was struck with the feeling that boiling down the form data is something that 
has probably been done many times over - but a search didn't find anything 
obvious.

I feel a CPAN module coming on (unless it's already been done and I've missed 
it), but I'm stuck on which namespace to use: HTML::Formdata, HTTP::Formdata, 
LWP::HTMLForm, thoughts please.

From the existing code that I have written, is a sub formdata, which takes the 
HTML page and form name as parameters. The form name is optional; if no form 
name is specified, the routine picks up the first form on the page.

sub formdata {
my ($html,$formname) = @_;

my $tp = HTML::TokeParser-new(\$html) or die Bad HTML form;
while (my $form = $tp-get_tag('form')) {
last if !$formname || ($form-[1]{name} eq $formname);
$tp-get_text('/form');
}
my @form;
while (my $field = $tp-get_tag('input','select','textarea')) {
my ($tag,$attr) = @$field;
if ($tag eq 'textarea') {
my $text = $tp-get_text('/textarea');
push @form,$attr-{name},$text;
next;
}

if ($tag eq 'select') {
my $selected;
while (my $tok = $tp-get_token) {
last if $tok-[-1] =~ m(/select)i;
my ($typ,$tag,$att) = @$tok;
next unless $typ eq 'S'  $tag eq 'option';
$selected = $att-{value} if exists $att-{selected};
}

push @form,$attr-{name},$selected if defined $selected;
next;
}

if ($attr-{type} =~ /hidden|password|text/) {
push @form,$attr-{name},$attr-{value};
}

if ($attr-{type} =~ /radio|checkbox/ 
exists $attr-{checked}) {
push @form,$attr-{name},$attr-{value};
}
}
@form;
}

The sub returns a list of key/value pairs. Thinking about it, I realised that 
if the calling code turns it into a hash, this could lose any duplicate keys.

At this point, the light of recognition came on in my mind. This was a very 
familiar concept, that of a CGI object.
I could make formdata return a CGI object or something inheriting from CGI, 
giving access to all the input fields via $form-param. Besides being capable 
of being submitted via a normal POST of encoding type 
application/x-www-form-urlencoded, I would also like the code to be able to 
handle file uploads and encoding type multipart/form-data.

Has anything like this been done before? Please let me know if I am duplicating 
effort here.

Ivor.





Re: Potential new module

2003-01-14 Thread Ben
On Tue, Jan 14, 2003 at 10:26:40AM -, Ivor Williams wrote:
 I've been reviewing what I have learned from the LWP stuff I have been doing 
 for Grubstreet. This involved form filling and POST method.
 
 I was struck with the feeling that boiling down the form data is something that 
 has probably been done many times over - but a search didn't find anything 
 obvious.

Yes, I'm sure it has been. That doesn't mean that anyone ever released it to
CPAN, though. :)

Between us, london.pm must have written $LARGE_NUMBER of templating systems,
but only a couple actually made it out. Or how many reasonably generic 
CGI-as-dispatch systems were written back in the heady days of dotComNonsense?
 
 From the existing code that I have written, is a sub formdata, which takes the 
 HTML page and form name as parameters. The form name is optional; if no form 
 name is specified, the routine picks up the first form on the page.

 The sub returns a list of key/value pairs. Thinking about it, I realised that 
 if the calling code turns it into a hash, this could lose any duplicate keys.

Except for checkboxen (and possibly even then), duplicate keys on forms are a 
very bad idea. One way I've seen them go horribly wrong is with a couple of 
URL-compression / cookie-caching proxies as used on The Portal Which Shall
Not Be Named. The idea of these doohickeys is to improve access for phones,
and other brain-dead clients, by shortening the (RFC-breaking) huge GET URLs
that portals always seem to end up with, and by keeping cookies on the server
side.   

By this stage, I'm sure people have guessed how good the hashing and storage
of these little sweethearts is. As soon as you start pointing them at forms
with duplicate keys, they start dropping data on the floor. 

The other thing I always try and keep in mind is nested forms. They are a very
good way to see how sturdy your application or web-snarfer really is. They're
invalid, nasty, rather more common than people seem to realise and have a 
horrible habit of making otherwise well-behaved web-tech spazz out.

I've even seen a (Java) example where if you parse a document containing nested
forms as XML, all appears to be well, and then if you cast it back to an HTML-type 
object, the JVM crashes. 

Luverly. 
 
 At this point, the light of recognition came on in my mind. This was a very 
 familiar concept, that of a CGI object.
 I could make formdata return a CGI object or something inheriting from CGI, 
 giving access to all the input fields via $form-param. Besides being capable 
 of being submitted via a normal POST of encoding type 
 application/x-www-form-urlencoded, I would also like the code to be able to 
 handle file uploads and encoding type multipart/form-data.

Please don't make it return a CGI object. CGI.pm is a nasty, bloated piece of
crap which should have been retired years ago. It uses what is now very
non-standard technology, it leaks memory under mod_perl and in many ways is
an example of how not to build a module.

Ben 




Re: Potential new module

2003-01-14 Thread Chris Ball
 On 14 Jan 2003 10:26:40, Ivor Williams [EMAIL PROTECTED] said:

I've been reviewing what I have learned from the LWP stuff I have
been doing for Grubstreet. This involved form filling and POST
method.

I can't work out exactly what you're trying to do (probably because I'm
all ill and feverish), but it looks like WWW::Mechanize.  An example:

my $agent = WWW::Mechanize-new();
$agent-get(https://www.ebank.hsbc.co.uk/main/loginmain.jsp;);

# Filling in the login form.
$agent-form(0);
$agent-field(internetBankingID, $opts{bankingid});
$agent-field(telephoneSecurityNumber, $opts{seccode});
$agent-click(ok);

# We're given a redirect, and then need to navigate a frameset.
$agent-follow(0);
$agent-follow(master);
$agent-follow(main);

Does that sound like what you're trying to do?  It exposes AoAs (from
HTML::Form) for each form and its elements, and lets you access them by
their name or index on the form.

- Chris.
-- 
$a=printf.net;  Chris Ball | chris@void.$a | www.$a | finger: chris@$a
| 'A good language allows people to say pshaw and ain't and Barbara
| Streisand, no matter how unpleasant the words may sound.'   -- Pudge.





Re: VERY OT: Archimedes/RISC OS 3.x file types

2003-01-14 Thread Nicholas Clark
On Tue, Jan 14, 2003 at 02:19:32PM +, Raf wrote:
 Hi.
 
 This is a tad off topic and rather than just mail Dave, I figured that I'd
 see if anyone out there can guide on what I'm doing wrong.
 
 I've got an Acorn A4 on my desk and have just copied some ArcFS .arc files
 from my box onto the A4 via a 1.44 dos floppy.

Gah. ArcFS. I do not like ArcFS. OK. Rant over.

 K?  Now, I want to unsparc these, however they aren't set to the correct
 file type.
 
 I've changed the file type to 111, however this doesn't appear to be the
 correct type and I'm not having any luck here.
 
 Does anyone know of a good way by which I can get at these files?

When you say unspark do you literally mean you have a copy of !Spark or
!Sparkplug? Or do you just me uncompress or access them?

Either way, I think the filetype shouldn't matter - run !Spark or !Sparkplug
or !SparkFS or !ArcFS (whichever you have) and drag the file to the icon
on the icon bar. I believe that all share the same behaviour - if they
recognise the file (ie is it not corrupt) they will set the type correctly
and then open it. (For the relevant definition of open)

You might want to compile nspark (google says
http://freshmeat.net/projects/nspark/?topic_id=19%2C42 which in turn links
to http://www.arcturus.demon.co.uk/ftp/developers.nspark.html )
as you can then extract them on Unix/whatever.

Nicholas Clark




Re: VERY OT: Archimedes/RISC OS 3.x file types

2003-01-14 Thread Raf
On Tue, 14 Jan 2003, Nicholas Clark wrote:
 On Tue, Jan 14, 2003 at 02:19:32PM +, Raf wrote:
 Either way, I think the filetype shouldn't matter - run !Spark or !Sparkplug
 or !SparkFS or !ArcFS (whichever you have) and drag the file to the icon
 on the icon bar. I believe that all share the same behaviour - if they
 recognise the file (ie is it not corrupt) they will set the type correctly
 and then open it. (For the relevant definition of open)
Ok, I think it's corrupted.

 You might want to compile nspark (google says
 http://freshmeat.net/projects/nspark/?topic_id=19%2C42 which in turn links
 to http://www.arcturus.demon.co.uk/ftp/developers.nspark.html )
 as you can then extract them on Unix/whatever.
Ok, this sounds like a plan.

Many Thanks.

Rafiq






Re: Potential new module

2003-01-14 Thread Paul Makepeace
On Tue, Jan 14, 2003 at 11:56:15AM +, Chris Ball wrote:
  On 14 Jan 2003 10:26:40, Ivor Williams [EMAIL PROTECTED] said:
 
 I've been reviewing what I have learned from the LWP stuff I have
 been doing for Grubstreet. This involved form filling and POST
 method.
 
 I can't work out exactly what you're trying to do (probably because I'm
 all ill and feverish), but it looks like WWW::Mechanize.  An example:
 
 my $agent = WWW::Mechanize-new();
 $agent-get(https://www.ebank.hsbc.co.uk/main/loginmain.jsp;);
 
 # Filling in the login form.
 $agent-form(0);
 $agent-field(internetBankingID, $opts{bankingid});
 $agent-field(telephoneSecurityNumber, $opts{seccode});
 $agent-click(ok);
 
 # We're given a redirect, and then need to navigate a frameset.
 $agent-follow(0);
 $agent-follow(master);
 $agent-follow(main);

Ooooh nice one - has anyone managed to get Mozilla or some other
browser to do this? I've seen some pretty hairy things with Moz so that
gives me hope.

God, HSBC's site is *pure UI design evil*. I must've logged into the
effing thing eight times yesterday and had to dance around its menus
just to get a transaction list. And why don't they allow download of
more than a month's data?

Paul (GnuCash'ed out)

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

If this was a very different situation, then cows will give up their
 milk.
   -- http://paulm.com/toys/surrealism/




Re: VERY OT: Archimedes/RISC OS 3.x file types

2003-01-14 Thread Alex McLintock
At 14:19 14/01/03, Raf wrote:

K?  Now, I want to unsparc these, however they aren't set to the correct
file type.



Sparc should be able to identify any file as a sparc archive and change the 
file-type appropriately. Just drag the file over to the running program.

Gosh that takes me back.

Failing that if you look inside the !Spark(plug) application directory you 
will find a readme which will tell you what the correct number is.


I'm posting this to the list as it is an excuse to say that I have three 
Acorn Risc computers in my cellar willing to go to a good home. Arc310, 
A3000, A5000.
I even have an Acorn monitor, scanner and other stuff too.

Alex McLintock



Available for java/perl/C++/web development in London, UK or nearby. Apache 
FOP, Cocoon,
Turbine, Struts,XSL:FO, XML, Tomcat, First meeting free.http://www.OWAL.co.uk/




RE: POD for unix

2003-01-14 Thread Peter Pimley



Sorry, I misread the question.
I believe doxygen is C++ only.



-Original Message-
From: Peter Pimley [mailto:[EMAIL PROTECTED]]
Sent: 14 January 2003 16:08
To: '[EMAIL PROTECTED]'
Subject: RE: POD for unix




doxygen.

Never used it, but there's loads of documentation made by it where I work.
I've been told it's very similar to javadoc (which itself is not completely
unlike POD)

Peter




-Original Message-
From: Jonathan Peterson [mailto:[EMAIL PROTECTED]]
Sent: 14 January 2003 15:49
To: [EMAIL PROTECTED]
Subject: POD for unix


I was just doing my New Year documentation, and wondered if there was 
something like POD for unix. In other words, something where instead of 
writing a big document explaining how a system has been configured, 
something that slurps up specially formatted comments in various files, 
together with the actual config information itself, and generates the doc?

So, instead of having to say 'the following processes are started 
automatically at boot time: blah blah blah' Something would just read 
the contents of /etc/rcx.d and auto-generate that section, using 
comments in the various startup scripts to provide more info as needed.

This would mean admins wandering around the system would be able to see 
the documentation in the comment files, and additionally it could be 
extracted out into a general system config document.

Anyone know of any such thing?

Jon



-- 
Jonathan Peterson
Technical Manager, Unified Ltd, +44 (0)20 7383 6092
[EMAIL PROTECTED]




rackmount question

2003-01-14 Thread Jody Belka
hi all,

ok, i'm trying to decide what exactly to put into my 1U rackmount case and
thought i'd ask for some advice as i just can't make a decision. firstly,
for reference purposes, this box is going to be to running several vmware
virtual machines, so whatever i end up with needs to be able to cope with
that.

my main problem is trying to decide what processor to use. of course, this
is partially down to what heatsink/fan i get. so far i've found two that
should be suitable, the AKASA AK-350 1U Copper Cooler and the ALPHA
PAL153U 1U cooler. now the Akasa apparently supports up to AthlonXP
2000+, Celeron 1.3GHz or P3 1.4GHz, but i've not been able to find any
reviews to see how good it really is. I can't find any data on the
processors supported by the Alpha, but i have found a review for it
(http://www.anandtech.com/showdoc.html?i=1571p=6). In this review,
however they tested by simulating the typical power usage of a 1GHz AMD
Athlon MP (Palomino).

since i can find AthlonXP's of 1700+ and 1800+ just either side of the
cost of a Celeron 1.3GHz, i think it comes down to one of those chips. I
imagine the AthlonXP's would be better than the Celeron, but would like
confirmation on that from someone else. And if i do go for one of the
Athlon's, is it really going to be cooled enough? I don't particularly
want to lose a chip on this.


So, anyone got any advice that could help me make a decision?

Jody






Re: rackmount question

2003-01-14 Thread Mark Fowler
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.

Mark.

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




Re: rackmount question

2003-01-14 Thread Dirk Koopman
Personally, unless you can find a really good heatsink *designed* for 1U
high operation on AMD (this may involve searching
http://www.overclockers.co.uk/ rather carefully) and a power supply
which is meaty enough - I think you are looking at Intel Hardware.

On Tue, 2003-01-14 at 17:44, Jody Belka wrote:
 hi all,
 
 ok, i'm trying to decide what exactly to put into my 1U rackmount case and
 thought i'd ask for some advice as i just can't make a decision. firstly,
 for reference purposes, this box is going to be to running several vmware
 virtual machines, so whatever i end up with needs to be able to cope with
 that.
 
 my main problem is trying to decide what processor to use. of course, this
 is partially down to what heatsink/fan i get. so far i've found two that
 should be suitable, the AKASA AK-350 1U Copper Cooler and the ALPHA
 PAL153U 1U cooler. now the Akasa apparently supports up to AthlonXP
 2000+, Celeron 1.3GHz or P3 1.4GHz, but i've not been able to find any
 reviews to see how good it really is. I can't find any data on the
 processors supported by the Alpha, but i have found a review for it
 (http://www.anandtech.com/showdoc.html?i=1571p=6). In this review,
 however they tested by simulating the typical power usage of a 1GHz AMD
 Athlon MP (Palomino).
 
 since i can find AthlonXP's of 1700+ and 1800+ just either side of the
 cost of a Celeron 1.3GHz, i think it comes down to one of those chips. I
 imagine the AthlonXP's would be better than the Celeron, but would like
 confirmation on that from someone else. And if i do go for one of the
 Athlon's, is it really going to be cooled enough? I don't particularly
 want to lose a chip on this.
 
 
 So, anyone got any advice that could help me make a decision?
 
 Jody
 
-- 
Please Note: Some Quantum Physics Theories Suggest That When the
Consumer Is Not Directly Observing This Product, It May Cease to
Exist or Will Exist Only in a Vague and Undetermined State.






Re: rackmount question

2003-01-14 Thread the hatter
On Tue, 14 Jan 2003, Jody Belka wrote:

 So, anyone got any advice that could help me make a decision?

A lot of your cooling effects will depend on what else is sitting around
your machine.  We've tried several 1U boxes tha are supposed to run
happily.  On their own, they do, but some of them obviously like to
radiate heat, as well as convect it.  Stack 10 of them together, and watch
them die within a few hours/day/weeks.

So, if this is a just a one-off, and it's sitting in the middle of someone
elses datacentre with all sorts of other kit, most hardware will be fine.
If you can afford a bit of extra room around them, either put 2 machines
in 3U for stacking, or make sure you've got a U of space sitting empty
(also handy for storing a copy of the OS installer CD or whatever)  Or
possibly just go for a 2U case, they're normally much happier when filled
with hot things, and much less fussy about that air gap.  Or if you decide
that you really could do with more disks, more PCI slots, more CPUs or
anything else, give me a shout - we recently got some 4U machines, dual
CPU, and 1.5 TB of disk (on 200GB HDs) and the case design was superb -
didn't sound like a tornado taking off, yet managed to keep all that stuff
unbelievably cool.


the hatter







Re: rackmount question

2003-01-14 Thread Jody Belka
Mark Fowler said:
 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?

it's actually just going to end up in my bedroom for the forseeable future
to be honest, as there's no way i can afford co-lo fees at the moment. the
only reason i've got the case (actually got two, but only sorting one out
for now) is because it wasn't a bad price and fancied getting one :)

Jody






Re: rackmount question

2003-01-14 Thread Jody Belka
Dirk Koopman said:
 Personally, unless you can find a really good heatsink *designed* for 1U
 high operation on AMD (this may involve searching
 http://www.overclockers.co.uk/ rather carefully) and a power supply
 which is meaty enough - I think you are looking at Intel Hardware.


well both of the heatsinks i mentioned are available from
theoverclockingstore.co.uk, and both are included in the skt370 and skt462
sections. overclockers.co.uk only has the akasa one. i'd forgotten about
the power supply actually. the one in there at the moment is only 150
watts. what do you think i'll get away with running on that?

Jody






Re: rackmount question

2003-01-14 Thread Shevek
On Tue, 14 Jan 2003, Jody Belka wrote:

 Mark Fowler said:
  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?
 
 it's actually just going to end up in my bedroom for the forseeable future
 to be honest, as there's no way i can afford co-lo fees at the moment. the
 only reason i've got the case (actually got two, but only sorting one out
 for now) is because it wasn't a bad price and fancied getting one :)

Oddly enough, that's almost exactly the reason I bought 16 of them. 
Beware the 'not bad prices'.

S.

-- 
Shevek
I am the Borg.

sub AUTOLOAD{my$i=$AUTOLOAD;my$x=shift;$i=~s/^.*://;print$x\n;eval
qq{*$AUTOLOAD=sub{my\$x=shift;return unless \$x%$i;{$x}(\$x);};};}

foreach my $i (3..65535) { {'2'}($i); }





Re: rackmount question

2003-01-14 Thread Roger Burton West
On Tue, Jan 14, 2003 at 05:44:43PM -, Jody Belka wrote:
ok, i'm trying to decide what exactly to put into my 1U rackmount case and
thought i'd ask for some advice as i just can't make a decision. firstly,
for reference purposes, this box is going to be to running several vmware
virtual machines, so whatever i end up with needs to be able to cope with
that.

As a general rule, I've found AMD chips need a great deal more cooling 
than Intel, which is why all my small-case boxes use Intel.

Give serious consideration to two lower-speed processors rather than a
single extra-grunty one. My last few colo boxes (general purpose
servers) have been SMP, and I've found it well worth it.

Roger




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: rackmount question

2003-01-14 Thread David Cantrell
On Tue, Jan 14, 2003 at 05:44:43PM -, Jody Belka wrote:

 ok, i'm trying to decide what exactly to put into my 1U rackmount case and
 thought i'd ask for some advice as i just can't make a decision.

Start with a Sparc ATX mobo, or pull a board out of an iMac.

/ob_anti-x86_ranting

  firstly,
 for reference purposes, this box is going to be to running several vmware
 virtual machines, so whatever i end up with needs to be able to cope with
 that.

Oh damn.

 my main problem is trying to decide what processor to use.

The fastest you can afford *after* putting in as much RAM as you can afford,
a decent disk controller, and decent disks.  If you have room in the case,
throw in a PC Weasel too before you consider the processor.

-- 
David Cantrell | [EMAIL PROTECTED] | http://www.cantrell.org.uk/david

There are many different types of sausages.  The best are
from the north of England.  The wurst are from Germany.
  -- seen in alt.2eggs.sausage.beans.tomatoes.2toast.largetea.cheerslove




Re: rackmount question

2003-01-14 Thread Roger Burton West
On Tue, Jan 14, 2003 at 06:54:01PM +, robin szemeti wrote:

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.

This hasn't been my experience - I paid about UKP200 more for a 1U case
than I would have for a standard desktop, and Black Cat charge
UKP15/U/month over the basic cost for anything over 1U. The air
conditioning there is good, but not great; I haven't had any heat
problems.

Roger




Re: rackmount question

2003-01-14 Thread Jody Belka
Shevek said:
 Oddly enough, that's almost exactly the reason I bought 16 of them.
 Beware the 'not bad prices'.


well, whether i put an athlonXP 1800+ or a celeron 1.3GHz into it,
together with 1gig of ram, i'm talking about £220/£230 for everything but
the hard drives, which is not bad.

Jody







Re: Potential new module

2003-01-14 Thread Simon Wistow
On Tue, Jan 14, 2003 at 11:53:07AM +, Mark Fowler said:
 On Tue, 14 Jan 2003, Ivor Williams wrote:
 
  I was struck with the feeling that boiling down the form data is something that
  has probably been done many times over - but a search didn't find anything
  obvious.
 
 Would you consider:
 
 http://search.cpan.org/author/TJMATHER/HTML-FillInForm-1.01/lib/HTML/FillInForm.pm


And webchat (WWW::Chat) and the associated Inline:Webchat do this as
well.

Simon