Re: Contracts for contractors

2003-06-28 Thread Philip Newton
On 28 Jun 2003 at 5:15, Paul Makepeace wrote:

 On Fri, Jun 27, 2003 at 11:53:13AM +0100, David Hodgkinson wrote:
  Bah, duodecimal is the way to go.
 
 http://base12.org/

Interesting.

Cheers,
Philip
-- 
Philip Newton [EMAIL PROTECTED]




Class::DBI

2003-06-28 Thread Alex McLintock
I'm trying to understand Class::DBI

I'm reading the perldoc and TOny Bowden's article on perl.com

The problem I have is that I can't see how to build up more complicated 
queries such as

give me the first one hundred book titles

Now I am using MySQL which I don't think can limit the number of records 
returned... but I do have a title number so I could try to do something like

give me all the book titles where the titlenumber is  400 and the 
titlenumber  500

Unfortunately I can't see any way of doing this.

Anybody know if I have missed something?

I know I can use iterators but the perldoc say that Class::DBI iterators 
still suck up all the data into memory - which isn't really much use either.

Alex Mc

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



Re: Class::DBI

2003-06-28 Thread Jason Clifford
On Sat, 28 Jun 2003, Alex McLintock wrote:

 The problem I have is that I can't see how to build up more complicated 
 queries such as
 
 give me the first one hundred book titles
 
 Now I am using MySQL which I don't think can limit the number of records 
 returned... but I do have a title number so I could try to do something like

Yes it can. From the manual:

SELECT * FROM table LIMIT 100;  # Retrieve first 100 rows

or

SELECT * FROM table LIMIT 5,10 # Rows 6-15

The syntax is LIMIT offset, max_rows_to_return

The MySQL manual is very good.

Jason Clifford
-- 
UKFSN.ORG   Finance Free Software while you surf the 'net
http://www.ukfsn.org/   Sign up now




Re: ICFP This Weekend

2003-06-28 Thread Leon Brocard
Leon Brocard sent the following bits through the ether:

 http://www.dtek.chalmers.se/groups/icfpcontest/

It's up now. It's a race-car optimisation problem. Fairly interesting,
as there is lots of research out there. But I so don't have time to
actually do it, sigh.

So, anyone else trying it out?

Leon
-- 
Leon Brocard.http://www.astray.com/
scribot.http://www.scribot.com/

... You are in a twisty little maze of Unix versions, all different



[Announce] Central London treasure hunt: Today

2003-06-28 Thread Ivor Williams
Rendezvous at: The Tattershall Castle - a boat pub on the Thames at Embankment.

Time: 4 pm onwards
Entrance: 5 / person

Please mail me off-list if interested or if you want to know more.

Ivor




Re: Class::DBI

2003-06-28 Thread Richard Clamp
On Sat, Jun 28, 2003 at 11:11:43AM +0100, Alex McLintock wrote:
 I'm trying to understand Class::DBI
 
 I'm reading the perldoc and TOny Bowden's article on perl.com
 
 The problem I have is that I can't see how to build up more complicated 
 queries such as
 
 give me the first one hundred book titles

There's the Cretrieve_from_sql method

  my @books = Book-retrieve_from_sql(id  $lastid ORDER BY id LIMIT 100);

Or, documented really nearby to that, Cadd_constructor

  __PACKAGE__-add_constructor( top100 = id  ? ORDER BY id LIMIT 100 );
  my @books = Book-top100(0);

Of course ordering by id probably isn't correct, but I'm sure you know
which column you really want to order on

-- 
Richard Clamp [EMAIL PROTECTED]



Re: ICFP This Weekend

2003-06-28 Thread Shevek
On Sat, 28 Jun 2003, Leon Brocard wrote:

 Leon Brocard sent the following bits through the ether:
 
  http://www.dtek.chalmers.se/groups/icfpcontest/
 
 It's up now. It's a race-car optimisation problem. Fairly interesting,
 as there is lots of research out there. But I so don't have time to
 actually do it, sigh.
 
 So, anyone else trying it out?

Yes. Me. I'm implementing the whole thing in XS. I've implemented the
model, and I've just woken up after sleeping on the problem. I think I
have an AI approach.

I've realised how easy XS is for little tasks, and how my first XS project
(writing a compiler) was rather jumping in at the deep end, and how
useless h2xs is.

S.

-- 
Shevekhttp://www.anarres.org/
I am the Borg. http://www.gothnicity.org/



Re: ICFP This Weekend

2003-06-28 Thread Paul Johnson
On Sat, Jun 28, 2003 at 01:34:53PM +0100, Shevek wrote:

 I've realised how easy XS is for little tasks, and how my first XS project
 (writing a compiler) was rather jumping in at the deep end, and how
 useless h2xs is.

But you have to

   Always begin with h2xs.
   Always begin with h2xs!
   ALWAYS BEGIN WITH H2XS!

And so I did.

Once.

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



Share Hotel in Paris during YAPC?

2003-06-28 Thread James E Keenan
If any London.pm-er is looking to avoid the high cost of hotel rooms in
Paris during YAPC::Europe, wishes to share and does not yet have a roommate,
please consider this, ...um, Yank.

I'll actually be in Paris from 19-26 July, but am most interested in being
in a hotel with other perlmongers Tues-Fri nights, 22-25 July.  David of the
conference organizers reported that many from London.pm will be staying at
one location.

If you are interested, please hit me back off list.

Jim Keenan
Brooklyn, NY
ny.pm  Perl Seminar NY