Re: OT (yea right) - taking Credit card payment.

2002-05-20 Thread Leo Lapworth

Thanks for all the feedback folks.

I'm erring towards worldpay because:

1) I don't have to host the https server and worry about
   the security aspect. I can also customise the pages
   through a web interface.

and

2) I don't have to have a Merchant ID which frankly just
   seems a pain.

Datacash do look cheaper, but that doesn't include the
Bank percentage, the https server + sysadmin, or the
development (how ever easy) at my end.

I'll try worldpay and see what happens, if we get even
half what the MD thinks we will (some how I doubt it)
I'll do some more shopping around at a later stage as
the annual fee is just 150 quid (which includes
3 currencies) so we wouldn't be too tied in.

Ask me after September and I'll give you feedback
how easy / hard it was to actually impliment.

Cheers

Leo




penderel is back

2002-05-20 Thread alex


and this is a test message.

no new bits in yet, if anyone with good experience with hardware and CFT
would like to drop by and put them in, they're here and waiting... 
otherwise i'll happily do it when i get some time, but that might not be
for a day or two.

cheers people

alex







Re: penderel

2002-05-20 Thread alex

On Sun, 2002-05-19 at 11:39, Dave Hodgkinson wrote:
> alex <[EMAIL PROTECTED]> writes:
> > i have bought a mobo + cpu (athlon 1800+) + fan for 140 quid from the
> > tcr computer fair.  i have a spare psu that i'll put in too, just in
> > case penderel's psu is what's been mucking up all the hardware.
> 
> Then get a decent, new 350W mother.

if you have one to contribute i'd be more than happy to put it in for
you.

alex





Re: Glade

2002-05-20 Thread Redvers Davies

On Sat, 2002-05-18 at 08:56, Mark Fowler wrote:
> Does anyone else here actually use glade with perl?

I looked at it once and couldn't make head nor tail of the code - enough
that I could write an application that modified and re-arranged the
widgets.

It's rare for me to write a Gtk application that doesn't re-arrange
stuff.  Glade doesn't seem able to handle it without hacking that
doesn't break the model.

In the end I learned Gtk.pm and do it all the "Hard" way.  Although I
must say I find it easy ;-)

I always use Glade however to prototype complex collections of widgets.
It's nice to be able to confirm the look of a window on the screen
compared to what you have on paper before you write the code.

Red






Memory Leaks (again)

2002-05-20 Thread Mark Fowler

Well, I found the tie that was eating chunks of my memory and removed it.  
Thanks to Tony for pointing this out to me.   All this happened to get me 
thinking though...

What can I do to cause perl to leak memory (I mean, not keeping circular 
data structures lying around, but what constructs causes perl to lose 
memory itself.)

I was reading the mod_perl list and they reminded me that string eval was 
leaky, is this still the case?

Later.

Mark.

-- 
s''  Mark Fowler London.pm   Bath.pm
 http://www.twoshortplanks.com/  [EMAIL PROTECTED]
';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/  +/
){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}






Re: penderel update

2002-05-20 Thread Nicholas Clark

On Sun, May 19, 2002 at 03:50:52AM +0100, alex wrote:
> - as an experiment, perl 5.7.3 is now installed in
> /usr/local/perl/5.7.3/ 
> (you can run it via /usr/local/bin/perl5.7.3)
> is that a stupid place to put it?

No, not really. It lets you put the 5.8 release candidates as
/usr/local/bin/perl so that everyone gets to test them. :-)
Or alternatively you replace /usr/local/bin/perl with this:

#!/usr/local/bin/perl5.7.3 -w
use strict; # Dave told us to do this.
use warnings;

my $script = shift;
my $body = do {
  local (*FH, $/);
  open FH, "<", $script or die "Can't open perl script \"$script\": $!";
  ;
};

my %hack;

$SIG{__WARN__} = sub {
(my $message = $_[0]) =~ s/\(eval 1\)/$script/g;
$message =~ s!(/loader/0x[0-9a-f]+/)(\S+) line!
exists $hack{$2} ? "$hack{$2} line" : "$1$2 line"!gme;
};


unshift @INC, sub {
  my ($self, $file) = @_;
  foreach my $dir (@INC) {
next if ref $dir;
my $full = "$dir/$file";
if (open my $fh, "<", $full) {
  $hack{$file} = $full;
  # Dave made us do this too:
  my $line = "use strict; use warnings;";
  # You didn't see this:
  return $fh, sub {
# We really ought to (a) document or rescind this feature
# (b) if we document it, change the implementation to use filter simple
# (c) if so, check whether it falls foul of the subtle trap of
# caller-filter leaves some data in the buffer, and filter gets to see
# it in $_ for a second time.
if ($line) {
  $_ = "$line $_";
  undef $line;
}
  };
}
  }
  return;
};

eval "use strict; use warnings; $body";
exit unless $@;
$@ =~ s/\(eval 1\)/$script/g;
$@ =~ s!(/loader/0x[0-9a-f]+/)(\S+) line!
exists $hack{$2} ? "$hack{$2} line" : "$1$2 line"!gme;
die $@;
__END__

The above code is a gratuitous hack, and probably doesn't work in lots of
subtle cases. The code to fake the error messages back to what you'd expect
them to be will probably fail in some weird ways.

Nicholas Clark
-- 
Even better than the real thing:http://nms-cgi.sourceforge.net/




Re: [ANNOUNCE] Punting, Sunday 19 May

2002-05-20 Thread Kate L Pugh

On Mon 13 May 2002, Kate L Pugh <[EMAIL PROTECTED]> wrote:
> We have finally become organised, and booked two punts in Oxford for
> 4--6pm this Sunday, 19 May.  This gives us 12 places in total.

And we went, and it was fun!  Dom, Magnus and hatter punted us up and
down the river; we drank Pimms and lemonade, and ginger wine and
coca-cola, and pink wine; and it didn't rain, nobody fell in, and we
only dropped the pole once.  Then I gave a brief tour of a small bit
of Oxford, and then we had far too much Chinese food.

Some people were taking photos.  I expect these will be online soon.
I do think we should do this again, maybe some time next month or the
one after.  We may well be able to get the punts for free again.

Thanks to everyone who turned up, and special thanks to Dom for sorting
out the punts.

Kake




Re: penderel

2002-05-20 Thread Dave Hodgkinson

alex <[EMAIL PROTECTED]> writes:

> On Sun, 2002-05-19 at 11:39, Dave Hodgkinson wrote:
> > alex <[EMAIL PROTECTED]> writes:
> > > i have bought a mobo + cpu (athlon 1800+) + fan for 140 quid from the
> > > tcr computer fair.  i have a spare psu that i'll put in too, just in
> > > case penderel's psu is what's been mucking up all the hardware.
> > 
> > Then get a decent, new 350W mother.
> 
> if you have one to contribute i'd be more than happy to put it in for
> you.

I only have an old one which I believe might have contributed to the
demise of my old mobo :(

-- 
David Hodgkinson, Wizard for Hirehttp://www.davehodgkinson.com
Editor-in-chief, The Highway Star   http://www.deep-purple.com
All the Purple Family Tree news   http://www.slashrock.com
   Interim Technical Director, Web Architecture Consultant for hire




Re: Memory Leaks (again)

2002-05-20 Thread Paul Johnson

On Mon, May 20, 2002 at 10:07:10AM +0100, Mark Fowler wrote:

> Well, I found the tie that was eating chunks of my memory and removed it.  
> Thanks to Tony for pointing this out to me.   All this happened to get me 
> thinking though...
> 
> What can I do to cause perl to leak memory (I mean, not keeping circular 
> data structures lying around, but what constructs causes perl to lose 
> memory itself.)

In 5.8, far fewer than used to be the case.  You can look through the
p5p archives to get the details of what's been fixed if you need to
know.  I'm afraid I can't remember many of the details off the top of my
head, except that people were having fun with purify and its kind.

[ Yes, I know this doesn't answer your question. ]

> I was reading the mod_perl list and they reminded me that string eval was 
> leaky, is this still the case?

I think it's only leaky if the eval fails, that is if there is a syntax
error.  Otherwise it's only as leaky as the rest of perl :-)

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net




Re: Memory Leaks (again)

2002-05-20 Thread Mark Fowler

On Mon, 20 May 2002, Paul Johnson wrote:

> You can look through the p5p archives to get the details of what's been
> fixed if you need to know.

I don't strictly need to know I'm just curious.  Not enough to read though 
all of p5p though ;-).

I was hoping more for a pointer to "Top Ten Memory Leaks in Various perls
And What To Do About Them" page.

Ah well.

Mark.

-- 
s''  Mark Fowler London.pm   Bath.pm
 http://www.twoshortplanks.com/  [EMAIL PROTECTED]
';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/  +/
){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}





Re: Memory Leaks (again)

2002-05-20 Thread Nicholas Clark

On Mon, May 20, 2002 at 02:17:14PM +0100, Mark Fowler wrote:
> I was hoping more for a pointer to "Top Ten Memory Leaks in Various perls
> And What To Do About Them" page.

As you summarised, I think that number 1 is "failed eval".
I'm not sure what the rest are.

The solution to most of the rest is "upgrade to 5.8" because I think most
of the rest have (if not all the known ones) have been squashed.

What to do is either:

1: Buy Alan Burlison beer
   (or some other way of saying thank you for attacking perl with purify
and doing a lot of the cleanup)
   [buy beer in the hope that he carries on]
2: Play with purify, or more likely fun free tools such as valgrind:
   http://developer.kde.org/~sewardj/
   (valgrind++)
   [while on the subject of ++, ccache++ : http://ccache.samba.org/ ]
   and find the leaks.
   Doesn't matter if you can't fix them - just make short test scripts
   and bug report them.

er, not sure what else

failed eval is unlikely to go away before perl6, as (if I understand it
correctly) yacc has this fundamental assumption that if it fails your
syntax, the program is going to exit anyway, so no need to waste time
freeing up memory.

Nicholas Clark




COM -> SOAP (was Re: London.pm List Weekly Summary 2002-05-13)

2002-05-20 Thread Jonathan Stowe

On 19 May 2002, Chris Ball wrote:
>
>  Rhys Hopkins asked about COM/DCOM with Perl/Linux, and was pointed at
>  'something with a '4' in it' that can expose COM objects via SOAP.
>

I remember now it is 4s4c, which can be found at http://www.4s4c.com ...

/J\





Re: OT (yea right) - taking Credit card payment.

2002-05-20 Thread Dave Hodgkinson

Nicholas Clark <[EMAIL PROTECTED]> writes:

> We solved the problem (IIRC) by having a commit as we were about to initiate
> a chat with the Datacash server, and a second commit after we'd just
> completed the chat with Datacash, so that we would be able to spot any
> partial or late aborted financial transactions.

Bah, that's what you get for using a database with transactions.

;-)

-- 
David Hodgkinson, Wizard for Hirehttp://www.davehodgkinson.com
Editor-in-chief, The Highway Star   http://www.deep-purple.com
All the Purple Family Tree news   http://www.slashrock.com
   Interim Technical Director, Web Architecture Consultant for hire




Re: London.pm List Weekly Summary 2002-05-13

2002-05-20 Thread Simon Batistoni

On 19/05/02 13:27 +0100, Chris Ball wrote:
> 
>  How'd I do, huh?

Brilliantly. It's good to have summaries back again, especially as I
skim more than I used to.

Ta hugely, Chris, and long may your reign continue[0].


[0] - You may like to note, however, that in the event of your reign
as london.pm summariser lasting for 50 years, there are unlikely to be
inpromptu street parties, Elton John concerts, fireworks or national
holidays. Although if you're lucky, we might buy you a clock or
something.




BSD?

2002-05-20 Thread Dave Hodgkinson


Any BSD mavens on the list? I might have a couple of noddy questions
to bounce off them if I get stuck tomorrow...

TIA,

Dave




Re: London.pm List Weekly Summary 2002-05-13

2002-05-20 Thread Mark Fowler

On Mon, 20 May 2002, Simon Batistoni wrote:

> Ta hugely, Chris, and long may your reign continue[0].

Though, do shout if you get bored.  Running though the list and 
summerising can be a thankless job[1] and shout for help should you need 
it / get bored / decide to move somewhere where there's no internet 
connection / need to spend more time on world domination plans / etc

Mark.

[1] Thanks Leon.

-- 
s''  Mark Fowler London.pm   Bath.pm
 http://www.twoshortplanks.com/  [EMAIL PROTECTED]
';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/  +/
){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}





Re: OT (yea right) - taking Credit card payment.

2002-05-20 Thread Nicholas Clark

On Mon, May 20, 2002 at 12:48:43PM -0700, Paul Makepeace wrote:
> Without wishing to start an egregious flamewar, Java has done this for
> quite some time and might go some decent way to explaining why folks
> don't take perl seriously for "enterprise" type of work.

I believe our problems lay solely in not realising what we'd managed to
build. The design mistake was actually in the stored procedure (the idea
being that perl was just doing the presentation layer) so it wasn't really a
perl screwup. Also, I think that the DBI modules let you do explicit
commit/rollback if your program the thing in. But you have to know what
you're doing.

I'd suspect that a better reason for Java being favoured for enterprise work
(and I've not looked at any Java libraries, or ever had need to learn Java,
so I could be talking out of my backside here) is that perl doesn't have any
of these sort of things already as nice, well designed, well thought through
libraries with APIs that you can use.

Instead, it, or its typical users, are far keener to roll their own (as we
were doing) and get to make these sort of subtle mistakes. (I believe that
this was the only subtle mistake with serious implications we made, and we
(to be fair, not me personally) spotted it)
It's not like datacash supply you with anything more than an API at the level
of "take money" and "return money" - it's effectively an open invitation to
knock together a few CGIs and go live with great haste.

> As an aside, I'd tend to err on the side of *not* rolling back once the
> user has hit submit. The Stop button, IMO, is not a UI widget for
> cancelling e-commerce transactions. The user will get an email after the
> transaction starts saying "cheers, your stuff's in the mail" and then if
> they can call the support number and cancel the order.

I quite agree. Our problem was not that we (the firm) wanted to be able to
cancel the transaction if they hit stop, it was that we (the developers) had
accidentally made a system that would debit the customer but have no record
of doing so, for certain edge case situations.

Instead of the classic comic book lightbulb blinking on, Craig had this
steaming pile of brown stuff blink into existence over his head, as he
realised the implications of the system currently in CVS. There was a chink
in all his careful, defensive database work whereby it could not only fail
to record data in some situations, but that the first we knew about it
would we when some irate customer (or their credit card company) came
complaining that we'd stolen their money.


Mainly I wanted to get across that writing websites that take money is an
order of magnitude more scary than websites that just deal in information.

Nicholas Clark
-- 
Even better than the real thing:http://nms-cgi.sourceforge.net/




Re: OT (yea right) - taking Credit card payment.

2002-05-20 Thread Paul Makepeace

On Sun, May 19, 2002 at 11:50:48AM +0100, Nicholas Clark wrote:
> However, we also used perl talking to Oracle. And we had this nasty revelation:
> 
> BEWARE OF TRANSACTIONS
> 

This is a really good description of the perils of two-phase commits,
i.e. the situation where rollbacks must be synchronised. Thus, why you
shouldn't use languages whose database interfaces don't support
two-phase commits in code that requires two phase commits.

Without wishing to start an egregious flamewar, Java has done this for
quite some time and might go some decent way to explaining why folks
don't take perl seriously for "enterprise" type of work.

As an aside, I'd tend to err on the side of *not* rolling back once the
user has hit submit. The Stop button, IMO, is not a UI widget for
cancelling e-commerce transactions. The user will get an email after the
transaction starts saying "cheers, your stuff's in the mail" and then if
they can call the support number and cancel the order.

Paul

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

"What is parsley? Samba!"
   -- http://paulm.com/toys/surrealism/




Re: penderel is back

2002-05-20 Thread alex

On Mon, 2002-05-20 at 12:40, alex wrote:
> no new bits in yet, if anyone with good experience with hardware and CFT
> would like to drop by and put them in, they're here and waiting... 
> otherwise i'll happily do it when i get some time, but that might not be
> for a day or two.

i had a go at this tonight, but the motherboard + cpu didn't work.
dammit.

it has the hatter's network and graphics cards in, and a new psu, so
maybe it will be more stable anyway.

alex






shell accounts on london.pm.org now available

2002-05-20 Thread alex


hello,

as mentioned before, new shell accounts on penderel (aka
'london.pm.org') are now available.

it's a community owned+run machine rather than a commercial service, but
you get some good things:

- [EMAIL PROTECTED]
- http://london.pm.org/~yournamehere/
- Template::Toolkit + Apache::Template set to serve all *.tt2 files
- database (currently mysql, other daemons can be installed if there's a
fierce demand)
- local CPAN (http://cpan.org) mirror, lots of modules installed
system-wide
- cvs repository (anonymous read-only access coming soon, hopefully)
- various versions of perl, currently; the latest stable (default), the
latest development releases and version 2.001 (for some reason).  more
soon...
- on-line help via the lovely people of #london.pm
- nethack
- a shiny feeling inside.
- more 

all yours for a suggested contribution of £20 waged and £5 unwaged.

please let me know if you'd like a go, or have any questions.

cheers

alex