view release on metacpan or search on metacpan
# $perms = $self->prompt('File Permissions for the quotes database?',
# $perms);
#}
if (!$db) {
$db =
File::Spec->catfile($ddir, 'ACME', 'QuoteDB', 'DB', 'quotedb', 'quotes.db');
}
##chown('THIS_UNIX_USER' $db);
## prompt for the chown
# XXX we need to change/fix this
# ideas, let installer/user decide
# create a new system user
# others?
## create quotes db as world writable,... yikes
chmod($d_perms, dirname($db));
chmod($perms, $db);
}
EOF
my $builder = $class->new(
lib/ACME/QuoteDB.pm view on Meta::CPAN
available keys: AttrName, Rating
my $args_ref = {
AttrName => 'chief wiggum'
Rating => 7,
};
print $sq->get_quote($args_ref);
Note: The 'Rating' option is very subjective.
It's a 0-10 scale of 'quality' (or whatever you decide it is)
To get a list of the available AttrNames use the list_attr_names method
listed below.
Any unique part of name will work
Example, for attribution 'comic book guy'
# these will all return the same results
print $sq->get_quotes({AttrName => 'comic book guy'});
lib/ACME/QuoteDB/LoadDB.pm view on Meta::CPAN
if ($self->{write_db}) {
my $qid = Quote->insert({
attr_id => $attr_id,
quote => $self->get_record('quote'),
source => $self->get_record('source'),
rating => $self->get_record('rating')
}) or croak $!;
if ($qid) {
my $id;
foreach my $cid (@{$catg_ids}){
$id = QuoteCatg->insert({
quot_id => $qid,
catg_id => $cid,
}) or croak $!;
}
}
}
# confirmation?
# TODO add a test for failure
if ($self->{write_db} and not $attr_id) {croak 'db write not successful'}
#$self->set_record(undef);
$self->{record} = {};
t/data/python_quotes.txt view on Meta::CPAN
I don't know a lot about this artificial life stuff -- but I'm suspicious
of anything Newsweek gets goofy about -- and I suspect its primary use is as
another money extraction tool to be applied by ai labs to the department of
defense (and more power to 'em).
Nevertheless in wondering why free software is so good these days it
occurred to me that the propagation of free software is one gigantic artificial
life evolution experiment, but the metaphor isn't perfect.
Programs are thrown out into the harsh environment, and the bad ones die.
The good ones adapt rapidly and become very robust in short order.
The only problem with the metaphor is that the process isn't random at all.
Python *chooses* to include Tk's genes; Linux decides to make itself more
suitable for symbiosis with X, etcetera.
Free software is artificial life, but better.
-- Aaron Watters, 29 Sep 1994
I claim complete innocence and ignorance! It must have been Tim. I wouldn't
know a Trondheim Hammer if it fell on my foot!
-- Steve Majewski, 10 Jan 1995
(Aieee! Yet another thing on my TODO pile!)
-- A.M. Kuchling, 10 Jan 1995
t/data/python_quotes.txt view on Meta::CPAN
due to being a computer! Think about it -- when's the last time you spent 20
hours straight debugging your son/wife/friend/neighbor/dog/ferret/snake? And
they *still* fell over anyway? Except in a direction you've never seen before
each time you try it? The easiest way to tell you're dealing with a computer is
when the other side keeps making the same moronic misteakes over and misteakes
over and misteakes over and misteakes over and misteakes over and misteakes
CTRL-C again.
-- Tim Peters, 30 Apr 1997
BTW, a member of the ANSI C committee once told me that the only thing rand is
used for in C code is to decide whether to pick up the axe or throw the dwarf,
and if that's true I guess "the typical libc rand" is adequate for all but the
most fanatic of gamers <wink>.
-- Tim Peters, 21 June 1997.
Things in Python are very clear, but are harder to find than the secrets of
wizards. Things in Perl are easy to find, but look like arcane spells to invoke
magic.
-- Mike Meyer, 6 Nov 1997
Indeed, as Palin has come to understand, being part of Python means never
t/data/python_quotes.txt view on Meta::CPAN
-- Tim Peters, 30 Mar 1998
Python is a little weak in forcing encapsulation. It isn't made for bondage and
domination environments.
-- Paul Prescod, 30 Mar 1998
One of my first big programming assignments as a student of computer science
was a source formatter for Pascal. The assignment was designed to show us the
real-life difficulties of group programming projects. It succeeded perhaps too
well. For a long time, I was convinced that source code formatters were a total
waste of time, and decided to write beautiful code that no automatic formatter
could improve upon. In fact, I would intentionally write code that formatters
could only make worse.
-- Guido van Rossum, 31 Mar 1998
You need to build a system that is futureproof; it's no good just making a
modular system. You need to realize that your system is just going to be a
module in some bigger system to come, and so you have to be part of something
else, and it's a bit of a way of life.
-- Tim Berners-Lee, at the WWW7 conference
t/data/python_quotes.txt view on Meta::CPAN
In other words, I'm willing to see dark corners added to the language, as long
as I don't have to go into them myself.
-- A.M. Kuchling, 29 Apr 1998
This argument is specious. What on earth would it mean to compare an object you
created with another object from someone else's code unless you knew exactly
what each object's semantics were? Do you really want to ask if my abstract
syntax tree is less then your HTTP connection object?
-- Jeremy Hylton, in a discussion of rich comparisons, 29 Apr 1998
Two things I learned for sure during a particularly intense acid trip in my own
lost youth: (1) everything is a trivial special case of something else; and,
(2) death is a bunch of blue spheres.
-- Tim Peters, 1 May 1998
Well, they will be: "<" will mean what everyone thinks it means when applied to
builtin types, and will mean whatever __lt__ makes it mean otherwise, except
when __lt__ isn't defined but __cmp__ is in which case it will mean whatever
__cmp__ makes it mean, except when neither __lt__ or __cmp__ are defined in
which case it's still unsettled. I think. Or isn't that what you meant by
"clearly defined"?
-- Tim Peters, 6 May 1998
You write a great program, regardless of language, by redoing it over & over &
over & over, until your fingers bleed and your soul is drained. But if you tell
newbies *that*, they might decide to go off and do something sensible, like
bomb defusing<wink>.
-- Tim Peters, 5 Jun 1998
OO styles help in part because they make it easier to redo large parts over,
or, when the moon is shining just right, to steal large parts from someone
else. Python helps in many additional ways regardless of style, not least of
which in that it hurts less to throw away 50 lines of code than 5,000 <0.5
wink>. The pains, and joys, of programming are *qualitatively* the same under
Python. There's less pain less often, and joy comes quicker. And that's worth a
whole lot.
t/data/python_quotes.txt view on Meta::CPAN
those very keystrokes represented a lot of heavy lifting and hauling on their
part.
-- John Holmgren, 18 Jun 1998
> In general, the situation sucks.
mind-if-i-use-that-as-my-epitaph<wink>?-ly y'rs - tim
-- Timothy J. Grant and Tim Peters, 22 Jun 1998
> Just for the record, on AIX, the following C program:
Oh no you don't! I followed AIX threads for the first year it came out, but
eventually decided there was no future in investing time in baffling
discussions that usually ended with "oh, never mind -- turns out it's a bug"
<0.9 wink>.
-- Vladimir Marangozov and Tim Peters, 23 Jun 1998
Python - why settle for snake oil when you can have the *whole* snake?
-- Mark Jackson, 26 Jun 1998
The problem I have with "SETL sets" in Python is the same I have with every
other language's "killer core" in Python: SETL is much more than just "a set
type", Eiffel is much more than just fancy pre- and post- conditions, Perl's
t/data/python_quotes.txt view on Meta::CPAN
After writing CGI scripts the traditional way for a few years, it is taking
awhile to reshape my thinking. No sledgehammer to the head yet, but lots of
small sculpting hammers...
-- John Eikenberry on the Bobo list, 27 Aug 1998
I believe sometimes numbers creep into my programs as strings, so '4'/2 needs
to also be 2. Other languages do this. Since this is due in part to user input,
I guess 'four'/2, 'quattro/2', 'iv/2' etc. need to be 2 as well; don't know any
other language that does so, but Python could take the lead here in software
reliability. Any white space should be ignored, including between my ears. I
don't have time to write any useful software, so I've decided to devote myself
to proposing various changes to the Python interpreter.
-- Donn Cave uses sarcasm with devastating effect, 28 Aug 1998
then-again-if-history-were-important-god-wouldn't-have-hid- it-in-the- past-ly
y'rs
-- Tim Peters, 28 Aug 1998
> >( float ( / 1 3 ))
> 0.33333333333333331
Now *that* one is impressive: it's the best possible 17-digit decimal
t/data/python_quotes.txt view on Meta::CPAN
... and at a higher conceptual level involving graph theoretical transforms of
automata (which I got thanks to Jean Gallier by word of mouth and effort of
chalk) ...
-- Aaron Watters, 17 Sep 1998
Every clarity vanished? :-)
-- Christian Tismer after answering a poster's question, 17 Sep 1998
Take the "public" modifier off Joseph's interface, or leave it there but
nest the interface inside class "closure", or even move the interface to its
own printer.java file, and it compiles and runs without incident. Most of the
big boys I hang with aren't paralyzed by self-explanatory compiler msgs <wink>.
not-to-mention-the-girls-ly y'rs
-- Tim Peters, 24 Sep 1998
<shakes head ruefully> You kids today, with your piercings and your big pants
and your purple-and-green hair and your X-Files and your Paula Cole and your
espresso coffee and your Seattle grunge rock and your virtual machines and your
acid-washed jeans and your Ernest Hemingway and your object-oriented languages
and your fax machines and your hula hoops and your zoot suits and your strange
slang phrases like "That's so bogus" or "What a shocking bad hat" and those
atonal composers like Arnold Schoenberg and Milton Babbit that you kids seem to
like these days and your cubist painters and your Ally McBeal and that guy in
Titanic and your TCP/IP protocol and your heads filled with all that Cartesian
dualism these days and ... well, I just don't get you kids. <shakes head
ruefully again>
-- A.M. Kuchling, 1 Oct 1998
E.g., at the REBOL prompt I typed
t/data/python_quotes.txt view on Meta::CPAN
In keeping with the religious nature of the battle-- and religion offers
precise terms for degrees of damnation! --I suggest:
struggling -- a supported feature; the initial state of all features; may
transition to Anathematized
anathematized -- this feature is now cursed, but is supported; may
transition to Condemned or Struggling; intimacy with Anathematized features is
perilous
condemned -- a feature scheduled for crucifixion; may transition to
Crucified, Anathematized (this transition is called "a pardon"), or Struggling
(this transition is called "a miracle"); intimacy with Condemned features is
suicidal
crucified -- a feature that is no longer supported; may transition to
Resurrected
resurrected -- a once-Crucified feature that is again supported; may
transition to Condemned, Anathematized or Struggling; although since
Resurrection is a state of grace, there may be no point in human time at which
a feature is identifiably Resurrected (i.e., it may *appear*, to the
unenlightened, that a feature moved directly from Crucified to Anathematized or
Struggling or Condemned -- although saying so out loud is heresy).
-- Tim Peters, 18 Dec 2000
t/data/python_quotes.txt view on Meta::CPAN
"I find it's possible to be both <wink>."
-- Alex Martelli and Tim Peters, 20 May 2001
Wow, this almost looks like a real flamefest. ("Flame" being defined as the
presence of metacomments.)
-- GvR, 13 Jun 2001
"Maybe we also have a smaller brain than the typical Lisper -- I would say,
that would make us more normal, and if Python caters to people with a
closer-to-average brain size, that would mean more people will be able to
program in Python. History will decide..."
"I thought it already has, pretty much."
-- GvR and A.M. Kuchling, 14 Jun 2001
Did Guido use the time machine to get a copy of the GoF book before he started
working on the first version of Python, or are Patterns just a transparent
attempt to cover for chronically inexpressive languages like C++ and Java which
can't generally implement these mind-numbingly simple constructs in code?
-- Glyph Lefkowitz, 7 Jun 2001
Google confuses me; if you search for "michael hudson" my page is the third hit
t/data/python_quotes.txt view on Meta::CPAN
Syntax should not look like grit on my monitor.
-- Anthony Baxter, 02 Jun 2005
Can this not be resolved by carefully adjusting the order of finalization? If
code can be bootstrapped it can be strootbapped.
-- Kristján Jónsson, 30 Jun 2006
Python resembles Lisp like an octopus eye resembles a mammalian eye: they have
lots in common because they're both pretty good solutions to similar problems.
Deciding whether it's Python or Lisp that has the retina fitted back-to-front
is left as an exercise for the reader.
-- Gareth McCaughan, 11 Jul 2006
As Neal said, we are not perfect; bugs happen. If we all gave up on a piece of
software after two bugs we would not be able to turn our computers.
-- Brett Cannon, 13 Jul 2006
... I've come to believe that some people have the personality traits that let
them tolerate redoing the same work over and over again for no reason other
than management "furniture rearranging", whereas others start to resent having
t/data/www.amk.ca/quotations/python-quotes/index.html view on Meta::CPAN
artificial life stuff -- but I'm suspicious of anything Newsweek
gets goofy about -- and I suspect its primary use is as another
money extraction tool to be applied by ai labs to the department of
defense (and more power to 'em). Nevertheless in wondering why free software is
so good these days it occurred to me that the propagation of free
software is one gigantic artificial life evolution experiment, but
the metaphor isn't perfect. Programs are thrown out into the harsh
environment, and the bad ones die. The good ones adapt rapidly and
become very robust in short order. The only problem with the metaphor is that the
process isn't random at all. Python <em>chooses</em> to include
Tk's genes; Linux decides to make itself more suitable for
symbiosis with X, etcetera. Free software is artificial life, but
better.</p>
<p class='source'>Aaron Watters, 29 Sep 1994</p>
<p class='quotation' id='q22'>I claim complete innocence and
ignorance! It must have been Tim. I wouldn't know a Trondheim
Hammer if it fell on my foot!</p>
<p class='source'>Steve Majewski, 10 Jan 1995</p>
<p class='quotation' id='q23'>(Aieee! Yet another thing on my TODO
pile!)</p>
<p class='source'>A.M. Kuchling, 10 Jan 1995</p>
t/data/www.amk.ca/quotations/python-quotes/page-10.html view on Meta::CPAN
<p class='quotation' id='q316'>Syntax should not look like grit on
my monitor.</p>
<p class='source'>Anthony Baxter, 02 Jun 2005</p>
<p class='quotation' id='q315'>Can this not be resolved by
carefully adjusting the order of finalization? If code can be
bootstrapped it can be strootbapped.</p>
<p class='source'>Kristján Jónsson, 30 Jun 2006</p>
<p class='quotation' id='q317'>Python resembles Lisp like an
octopus eye resembles a mammalian eye: they have lots in common
because they're both pretty good solutions to similar problems.
Deciding whether it's Python or Lisp that has the retina fitted
back-to-front is left as an exercise for the reader.</p>
<p class='source'>Gareth McCaughan, 11 Jul 2006</p>
<p class='quotation' id='q318'>As Neal said, we are not perfect;
bugs happen. If we all gave up on a piece of software after two
bugs we would not be able to turn our computers.</p>
<p class='source'>Brett Cannon, 13 Jul 2006</p>
<p class='quotation' id='q319'>... I've come to believe that some
people have the personality traits that let them tolerate redoing
the same work over and over again for no reason other than
management "furniture rearranging", whereas others start to resent
t/data/www.amk.ca/quotations/python-quotes/page-2.html view on Meta::CPAN
20 hours straight debugging your
son/wife/friend/neighbor/dog/ferret/snake? And they <em>still</em>
fell over anyway? Except in a direction you've never seen before
each time you try it? The easiest way to tell you're dealing with a
computer is when the other side keeps making the same moronic
misteakes over and misteakes over and misteakes over and misteakes
over and misteakes over and misteakes CTRL-C again.</p>
<p class='source'>Tim Peters, 30 Apr 1997</p>
<p class='quotation' id='q44'>BTW, a member of the ANSI C committee
once told me that the only thing rand is used for in C code is to
decide whether to pick up the axe or throw the dwarf, and if that's
true I guess "the typical libc rand" is adequate for all but the
most fanatic of gamers <wink>.</p>
<p class='source'>Tim Peters, 21 June 1997.</p>
<p class='quotation' id='q45'>Things in Python are very clear, but
are harder to find than the secrets of wizards. Things in Perl are
easy to find, but look like arcane spells to invoke magic.</p>
<p class='source'>Mike Meyer, 6 Nov 1997</p>
<p class='quotation' id='q46'>Indeed, as Palin has come to
understand, being part of Python means never really knowing what
may lurk around the corner.
t/data/www.amk.ca/quotations/python-quotes/page-2.html view on Meta::CPAN
<p class='source'>Tim Peters, 30 Mar 1998</p>
<p class='quotation' id='q54'>Python is a little weak in forcing
encapsulation. It isn't made for bondage and domination
environments.</p>
<p class='source'>Paul Prescod, 30 Mar 1998</p>
<p class='quotation' id='q55'>One of my first big programming
assignments as a student of computer science was a source formatter
for Pascal. The assignment was designed to show us the real-life
difficulties of group programming projects. It succeeded perhaps
too well. For a long time, I was convinced that source code
formatters were a total waste of time, and decided to write
beautiful code that no automatic formatter could improve upon. In
fact, I would intentionally write code that formatters could only
make worse.</p>
<p class='source'>Guido van Rossum, 31 Mar 1998</p>
<p class='quotation' id='q56'>You need to build a system that is
futureproof; it's no good just making a modular system. You need to
realize that your system is just going to be a module in some
bigger system to come, and so you have to be part of something
else, and it's a bit of a way of life.</p>
<p class='source'>Tim Berners-Lee, at the WWW7 conference</p>
t/data/www.amk.ca/quotations/python-quotes/page-3.html view on Meta::CPAN
"sidebar-link" href="../python-quotes/">Python</a> | <a class=
"sidebar-link" href=
"../robertson-davies/">Robertson Davies</a> | <a class=
"sidebar-link" href="../sherlock-holmes/">Sherlock Holmes</a>
| <a class="sidebar-link" href=
"../tom-baker/">Tom Baker</a></p>
</div>
<div class="content">
<hr />
<p class='quotation' id='q66'>Two things I learned for sure during
a particularly intense acid trip in my own lost youth: (1)
everything is a trivial special case of something else; and, (2)
death is a bunch of blue spheres.</p>
<p class='source'>Tim Peters, 1 May 1998</p>
<p class='quotation' id='q67'>Well, they will be: "<" will mean
what everyone thinks it means when applied to builtin types, and
will mean whatever __lt__ makes it mean otherwise, except when
__lt__ isn't defined but __cmp__ is in which case it will mean
whatever __cmp__ makes it mean, except when neither __lt__ or
__cmp__ are defined in which case it's still unsettled. I think. Or
isn't that what you meant by "clearly defined"?</p>
<p class='source'>Tim Peters, 6 May 1998</p>
<p class='quotation' id='q68'>You write a great program, regardless
of language, by redoing it over & over & over & over,
until your fingers bleed and your soul is drained. But if you tell
newbies <em>that</em>, they might decide to go off and do something
sensible, like bomb defusing<wink>.</p>
<p class='source'>Tim Peters, 5 Jun 1998</p>
<p class='quotation' id='q69'>OO styles help in part because they
make it easier to redo large parts over, or, when the moon is
shining just right, to steal large parts from someone else. Python
helps in many additional ways regardless of style, not least of
which in that it hurts less to throw away 50 lines of code than
5,000 <0.5 wink>. The pains, and joys, of programming are
<em>qualitatively</em> the same under Python. There's less pain
less often, and joy comes quicker. And that's worth a whole
t/data/www.amk.ca/quotations/python-quotes/page-3.html view on Meta::CPAN
many keystrokes, as if those very keystrokes represented a lot of
heavy lifting and hauling on their part.</p>
<p class='source'>John Holmgren, 18 Jun 1998</p>
<p class='quotation' id='q76'>> In general, the situation
sucks.
mind-if-i-use-that-as-my-epitaph<wink>?-ly y'rs - tim</p>
<p class='source'>Timothy J. Grant and Tim Peters, 22 Jun 1998</p>
<p class='quotation' id='q77'>> Just for the record, on AIX, the
following C program:
Oh no you don't! I followed AIX threads for
the first year it came out, but eventually decided there was no
future in investing time in baffling discussions that usually ended
with "oh, never mind -- turns out it's a bug" <0.9 wink>.</p>
<p class='source'>Vladimir Marangozov and Tim Peters, 23 Jun
1998</p>
<p class='quotation' id='q78'>Python - why settle for snake oil
when you can have the <em>whole</em> snake?</p>
<p class='source'>Mark Jackson, 26 Jun 1998</p>
<p class='quotation' id='q79'>The problem I have with "SETL sets"
in Python is the same I have with every other language's "killer
core" in Python: SETL is much more than just "a set type", Eiffel
t/data/www.amk.ca/quotations/python-quotes/page-3.html view on Meta::CPAN
thinking. No sledgehammer to the head yet, but lots of small
sculpting hammers...</p>
<p class='source'>John Eikenberry on the Bobo list, 27 Aug 1998</p>
<p class='quotation' id='q88'>I believe sometimes numbers creep
into my programs as strings, so '4'/2 needs to also be 2. Other
languages do this. Since this is due in part to user input, I guess
'four'/2, 'quattro/2', 'iv/2' etc. need to be 2 as well; don't know
any other language that does so, but Python could take the lead
here in software reliability. Any white space should be ignored,
including between my ears. I don't have time to write any useful
software, so I've decided to devote myself to proposing various
changes to the Python interpreter.</p>
<p class='source'>Donn Cave uses sarcasm with devastating effect,
28 Aug 1998</p>
<p class='quotation' id='q89'>
then-again-if-history-were-important-god-wouldn't-have-hid-
it-in-the- past-ly y'rs</p>
<p class='source'>Tim Peters, 28 Aug 1998</p>
<p class='quotation' id='q90'>
> >( float ( / 1 3 ))
> 0.33333333333333331
t/data/www.amk.ca/quotations/python-quotes/page-3.html view on Meta::CPAN
involving graph theoretical transforms of automata (which I got
thanks to Jean Gallier by word of mouth and effort of chalk)
...</p>
<p class='source'>Aaron Watters, 17 Sep 1998</p>
<p class='quotation' id='q96'>Every clarity vanished? :-)</p>
<p class='source'>Christian Tismer, after answering a poster's
question, 17 Sep 1998</p>
<p class='quotation' id='q97'>Take the "public" modifier off
Joseph's interface, or leave it there but nest the interface inside
class "closure", or even move the interface to its own printer.java
file, and it compiles and runs without incident. Most of the big
boys I hang with aren't paralyzed by self-explanatory compiler msgs
<wink>.
not-to-mention-the-girls-ly y'rs</p>
<p class='source'>Tim Peters, 24 Sep 1998</p>
<hr /></div>
<small>[<a href="mailto:comments@amk.ca">Contact me</a>]</small>
</body>
</html>