Re: [OT] SQL woes

2003-08-24 Thread richardjolly
Dominic Mitchell <[EMAIL PROTECTED]> wrote:

[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
What about Firebird?

http://firebird.sourceforge.net/

does anyone here have personal experience? On paper (well, online) it
compares favorably to PostgreSQL, and it can be easily embedded.
It's an excellent browser, much quicker than mozilla on it's own.

Oh.  Databases.  Bother.
Thats my problem - I'm supposed to be researching 'preferred' databases 
for my job, and while Firebird looks good no one got any experience 
with it.

Currently I'm recommending SQLite for small, embedded work (single user 
CD-ROMs with a lot of data in very simple databases) and PostgreSQL for 
the big stuff.

Any real life experience with Firebird (the database) I'd love to hear 
about.

Richard

-Dom




Re: golf and reversed emails

2003-08-24 Thread Shevek
On Sun, 24 Aug 2003, Phil Lanch wrote:

> BTW, Simon's code included this pattern:
> 
>map { code_which_reads_$max } map { code_which_modifies_$max } ...
> 
> where the result is only correct if $max has reached its final value
> before the code_which_reads_$max is ever run.  is it guaranteed that the
> right-hand map is completed before the left-hand map is started?  and
> _should_ it be guaranteed?  i'm guessing that it is guaranteed in

I had a vague memory that Perl does use some iterators internally, which 
mean this isn't guaranteed at the moment?

S.

> current perl, but thinking that a fancy multi-threaded implementation
> might not guarantee it (so that very long lists could be mapped without
> using too much memory).
> 
> 

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



Re: golf and reversed emails

2003-08-24 Thread Phil Lanch
On Sun, Aug 24, 2003 at 10:36:35AM -0400, Chris Devers wrote:
> Does this count?
> 
>   % echo "hello there" | \
>   > perl -e 'print `rev`'
>   ereht olleh
> 
> Can anyone beat 11 characters?

sure, i can do it in 10 ;) ...

   perl -lpe '$_=reverse'

BTW, Simon's code included this pattern:

   map { code_which_reads_$max } map { code_which_modifies_$max } ...

where the result is only correct if $max has reached its final value
before the code_which_reads_$max is ever run.  is it guaranteed that the
right-hand map is completed before the left-hand map is started?  and
_should_ it be guaranteed?  i'm guessing that it is guaranteed in
current perl, but thinking that a fancy multi-threaded implementation
might not guarantee it (so that very long lists could be mapped without
using too much memory).

-- 
Phil Lanch0xD78D598DA6635CF32AB24593C98994B7D95B33E3
  (though i can't remember the passphrase right now)

"I have an answer.  It's not the right
answer, but it makes me feel good."



Re: golf and reversed emails

2003-08-24 Thread Chris Devers
On Sun, 24 Aug 2003, Simon Wistow wrote:

> I was mucking round with some stuff this morning and, as a slight
> side diversion, wrote something that took this message of MBM's
>
> http://london.pm.org/pipermail/london.pm/Week-of-Mon-20030811/020742.html
>
> and 'fixed' it.
>
> It's mildly golfish so I thought I'd post it and see if people
> would come up with something better (ignoring the easy wins like
> shorter variable names).

Does this count?

  % echo "hello there" | \
  > perl -e 'print `rev`'
  ereht olleh

Can anyone beat 11 characters?


:)


-- 
Chris Devers [EMAIL PROTECTED]
http://devers.homeip.net:8080/

dragging, n.
The canonical GUI method of moving a WIDGET to a point on the screen
determined by the unencumbered areas of your MOUSE PAD. See also CLICK;
MOUSE; DRAG'N'DROP.

-- from _The Computer Contradictionary_, Stan Kelly-Bootle, 1995



golf and reversed emails

2003-08-24 Thread Simon Wistow
I was mucking round with some stuff this morning and, as a slight side 
diversion, wrote something that took this message of MBM's

http://london.pm.org/pipermail/london.pm/Week-of-Mon-20030811/020742.html

and 'fixed' it.

It's mildly golfish so I thought I'd post it and see if people would 
come up with something better (ignoring the easy wins like shoter 
variable names).

  use strict;
  my $max = 0;

  print join "\n", reverse
map {tr/\<\>\/\\\[\]\{\}\(\)\`\'/\>\<\\\/\]\[\}\{\)\(\'\`/;$_}
map {(" " x ($max - length)).reverse}
map {s/\s*$//g; $max = length if length>$max; $_} <>;
  print "\n";




-- 
the illusion of knowledge without any of the difficult bits  



Re: [OT] SQL woes

2003-08-24 Thread Tim Sweetman
Toby Corkindale wrote about SQLite:

Transactions, sort-of, in that you get them within a single query; but there's
poor support for simultaneous-request stuff.
Hmm. To my mind that's more like "not" than "sort-of". It's confusing 
enough evaluating packages, without people making stuff up, or being 
diabolically optimistic ("yes, the parasol will also keep rain off - as 
long as it doesn't rain heavily").

A transaction on a single statement will protect you from certain rogue 
statements that try and delete lots, or some uniqueness constraints. It 
will also protect you from sudden power failure or OS crash at that 
point (uh, maybe). Transactions on multiple statements are MUCH more 
useful, because a group of multiple statements is far more likely to 
screw up somewhere - and transactions are largely for catching stuff 
that screws up before it screws up your database, IME. I'm sure they're 
much easier for the DB designer to implement, but that's not the point. (:

IMHO the really useful thing about SQLLite is that it'll go straight 
away, without any admin, because it's not using a client/server model 
and there's no server to set up. That way you can build some package 
that uses SQLite initially, and if/when/as it scales up, someone can 
plug in Orabble/SomeonesSQL/PostGrumble/whatever.

Maybe.

Cheers
ti




Re: Perl on end-of-lifed Irix 5.3

2003-08-24 Thread Greg McCarroll
* Elaine -HFB- Ashton ([EMAIL PROTECTED]) wrote:
> 
> You can try option A, just be prepared for much pain. :) Scott Henry
> <[EMAIL PROTECTED]> is a guy inside SGI who, if he still works there, should
> be knowledgeable and Jarkko said he'd be willing to help if you hit a
> snag.
> 
> There is always the option, if you aren't in love with IRIX, to install
> NetBSD on it :) http://www.netbsd.org/Ports/sgimips/
> 

or debian, although it should be noted that support varies from system to
system, and X is limited to IIRC the 8-bit ``newport'' (this is the
bit i'm not sure of) graphics cards in the indy

http://staf.patat.org/indy/

i also heard some mutterings about gentoo for MIPS, although i guess most
people installing it on indy's are in a race against  the heat
death of the universe to see if they'll ever actually get to use it[1].

Greg

[1] To get an idea of compile speed, 
http://www.mccarroll.org.uk/~gem/computing/performance.html


-- 
Greg McCarroll http://www.mccarroll.org.uk/~gem/
   jabber://[EMAIL PROTECTED]
msn://[EMAIL PROTECTED]



Re: Installing Perl on End of Lifed Irix 5.3

2003-08-24 Thread Chris Young
> Try DBI 1.14 or a near later version.  That was the earliest known stable
version AFAIK.
Builds fine and passes its tests, many thanks for that Sam.

Cheers

Chris




Re: Perl on end-of-lifed Irix 5.3

2003-08-24 Thread Elaine -HFB- Ashton
chris [EMAIL PROTECTED] quoth:
*>Hi,
*>
*>Anyone have experience of installing Perl on Irix 5.3?  I'm sure there are
*>lots of good reasons for not even beginning to attempt this but putting that
*>to one side...

I have, but I spent the past 6 years blotting the experience from my
memory :)

*>A. Do I take a later version of Perl and build that?  If so, which one and
*>what issues am I going to hit on the way?
*>B. Do I take older versions of the packages I need to go with my old
*>hardware, old OS and old database?
*>C. None of the above.

You can try option A, just be prepared for much pain. :) Scott Henry
<[EMAIL PROTECTED]> is a guy inside SGI who, if he still works there, should
be knowledgeable and Jarkko said he'd be willing to help if you hit a
snag.

There is always the option, if you aren't in love with IRIX, to install
NetBSD on it :) http://www.netbsd.org/Ports/sgimips/

e.



Perl on end-of-lifed Irix 5.3

2003-08-24 Thread chris
Hi,

Anyone have experience of installing Perl on Irix 5.3?  I'm sure there are
lots of good reasons for not even beginning to attempt this but putting that
to one side...

The latest I have on the machine, an Indigo, is 5.004 from
http://reality.sgiweb.org/scotth/info/perl5.html

I have MySQL 3.20.32a running happily enough on the machine and just want to
do some simple DBI stuff with it.  Latest DBI needs a later version of Perl,
quite understandably so my question is:

A. Do I take a later version of Perl and build that?  If so, which one and
what issues am I going to hit on the way?
B. Do I take older versions of the packages I need to go with my old
hardware, old OS and old database?
C. None of the above.

Any thoughts or ideas on this would be great.

Many Thanks

Chris