view release on metacpan or search on metacpan
lib/ACME/QuoteDB.pm view on Meta::CPAN
}
push @{ $arr_ref }, $f_obj->$field;
}
return join "\n", sort @{$arr_ref};
}
sub _get_attribution_ids_from_name {
my ($attr_name) = @_;
my $c_ids = [];
# a bug: what if string starts with what we specify
#i.e. => %Griffin% doesn' match 'Griffin' (no quotes)
RESULTS:
foreach my $c_obj (Attr->search_like(name => "%$attr_name%")){
next RESULTS unless $c_obj->attr_id;
push @{ $c_ids }, $c_obj->attr_id;
}
if (not scalar @{$c_ids}) {
croak 'attribution not found';
}
return $c_ids;
}
sub _get_quote_id_from_quote {
my ($quote) = @_;
my $q_ids = [];
# a bug: what if string starts with what we specify
#i.e. => %Griffin% doesn' match 'Griffin' (no quotes)
RESULTS:
foreach my $c_obj (Quote->search(quote => $quote)){
next RESULTS unless $c_obj->quot_id;
push @{ $q_ids }, $c_obj->quot_id;
}
if (not scalar @{$q_ids}) {
croak 'quote not found';
}
lib/ACME/QuoteDB.pm view on Meta::CPAN
Gnu
vim
Debian Linux
Mac OSX
The collective wisdom and code of The CPAN
this module was created with module-starter
module-starter --module=ACME::QuoteDB \
--author="David Wright" --mb --email=david_v_wright@yahoo.com
=head1 ERRATA
Q: Why did you put it in the ACME namespace?
A: Seemed appropriate. I emailed modules@cpan.org and didn't get a
different reaction.
Q: Why did you write this?
A: At a past company, a team I worked on a project with had a test suite,
lib/ACME/QuoteDB/LoadDB.pm view on Meta::CPAN
$self->{file_format} = $args->{file_format};
$FILE_ENCODING = $args->{file_encoding} || $FILE_ENCODING;
$self->{delim} = $args->{delimiter};
$self->{verbose} = $args->{verbose};
$self->{category} = $args->{category};
$self->{rating} = $args->{rating};
$self->{attr_source} = $args->{attr_source};
$self->{orig_args} = $args;
$self->{success} = undef;
# start with if set
$self->{record}->{rating} = $self->{rating};
$self->{record}->{name} = $self->{attr_source};
$self->{record}->{source} = $self->{attr_source};
if (ref $self->{category} eq 'ARRAY') {
$self->{record}->{catg} = ();
foreach my $c (@{$self->{category}}){
push @{$self->{record}->{catg}}, $c;
}
}
else {
t/data/python_quotes.txt view on Meta::CPAN
"What's Python?"
"It's a computer programming language."
"You mean, like DOS?"
-- Some guy in a bar and Eric S. Raymond (who was wearing a
conference T-shirt) at IPC7
Excellent plan! Devious minds are attracted to Python, like mimes to
unappreciative crowds.
-- Tim Peters, 13 Nov 1998
Ha! If we had only started numbering dimensions with one, we'd already be
living in a 4-D world, and Mental Organons would be *all over the place*!
-- Tim Peters, 13 Nov 1998
Well, during those periods when I was me, there was most assuredly only one of
me. But during some of the more intense discussions, I was not me, and while
all the rest of the attendees were also not me, it is difficult to say whether
they were the same not me that I was or wasn't at the time.
-- Gordon McMillan, 18 Nov 1998
If Python strays into trying to be something completely new it will fail,
t/data/python_quotes.txt view on Meta::CPAN
12. In the face of ambiguity, refuse the temptation to guess.
13. There should be one -- and preferably only one -- obvious way to do it.
14. Although that way may not be obvious at first unless you're Dutch.
15. Now is better than never.
16. Although never is often better than *right* now.
17. If the implementation is hard to explain, it's a bad idea.
18. If the implementation is easy to explain, it may be a good idea.
19. Namespaces are one honking great idea -- let's do more of those!
-- Tim Peters' 19 Pythonic Theses, 4 Jun 1999
"However, I've heard that after about 10K items in a dict, it starts having
problems."
"11,523 to be exact. After that, dicts drink to excess and show up for work
late the morning after. We don't like to talk about it, though."
-- Aahz Maruch and Tim Peters, 8 Jun 1999
Stackless Python 0.2, a plug-in replacement for the Python core that does not
use the C stack, has been announced by Christian Tismer as the best way to
prove that it was possible without a major rewrite to the core. Neel
Krishnaswami commented to Christian, "This is very neat, and you are completely
deranged".
t/data/python_quotes.txt view on Meta::CPAN
The secret to good performance is to prototype and prototype, then code the
bottlenecks in a faster language. The secret to large systems is to prototype
and prototype, until you've got clean separation of the system into managable
pieces, then code in whatever language most suits the need of each piece.
-- Gordon McMillan, 15 Dec 1999
When Jim [Fulton] says "tricky" it means your brain could explode.
-- Michel Pelletier, 15 Dec 1999
You have start-tags, attributes, end-tags and character data. We have all seen
"XML applications" and "XML parsers" which handle this gang- of-four concepts.
... Now we can peer over the parapet and shout "your parser smells of
elderberries" or "I wave my mixed content at your ankles", as long as we like
but the simple gang-of-four base apps will not go away.
-- Sean McGrath, 19 Dec 1999
Abstraction is one of those notions that Python tosses out the window, yet
expresses very well.
-- Gordon McMillan, 6 Jan 2000
t/data/python_quotes.txt view on Meta::CPAN
wink> at the new guy. Handshake. But before it can sniff, the first one has
moved up for his handshake. Ay yi yi. Your bot crashes and is exposed.
So now you rewrite your bot to use a finite state machine so it can handle
multiple sessions. That means throwing out all the code that worked on the
street. But if you'd used continuations, it would be a relatively minor
adjustment of that code. 'Course you wouldn't have had to write the bot to
begin with.
-- Gordon McMillan, 18 Feb 2000
IIRC, Guido went to CNRI to work on bots and agents or something similar. Could
the timbot and the effbot be an offshoot of that? Next, he's going to start a
company with timbot and effbot as the main products. Van Rossum's Universal
Robots?
-- Bernhard Herzog, 21 Feb 2000
So those are the extremes: Boehm-Demers-Weiser avoids blame by refusing to do
anything. Java avoids blame by exposing an impossibly baroque
implementation-driven finalization model. Scheme avoids blame by refusing to do
anything "by magic", but helps you to shoot yourself with the weapon of your
choice. The bad news is that I don't know of a scheme *not* at an extreme!
-- Tim Peters on the knotty problem of finalizers and cycles, 3 Mar
t/data/python_quotes.txt view on Meta::CPAN
Me? I hate the whole lambda calculus, not because of what it is, but
because of what many people think it is. They think that it's the whole of
computer science, the ultimate way to express and reason about programs, when
in reality it's merely a shabby and incomplete model of how Fortran fails to
work. The first thing SICP has to do is teach everyone how bad the lambda
calculus model is -- as part of teaching them about a language allegedly based
on lambda calculus.
I'm sorry, was my bias showing again? :-)
-- William Tanksley, 13 May 2000
I never got beyond starting the data-structures in C++, I never got beyond
seeing how it would work in Scheme. I finished it in one Python -filled
afternoon, and discovered the idea sucked big time. I was glad I did it in
Python, because it only cost me one afternoon to discover the idea sucks.
-- Moshe Zadka, 13 May 2000
In truth, we use 'j' to represent sqrt(-1) for exactly the same reason we use a
convention for the direction of current which is exactly the opposite of the
direction the electrons actually travel: because it drives physicists crazy.
(And if we pick up a few mathematicians or whatever along the way, well, that's
just gravy. ;-)
t/data/python_quotes.txt view on Meta::CPAN
-- Will Ware, 28 Aug 2000
The comp.lang.python newsgroup erupted last week with a flurry of posts that
accused the Python development team of creeping featurism, selling out the
language to corporate interests, moving too fast, and turning a deaf ear to the
Python community. What triggered this lava flow of accusations? The development
team accepted a proposal to change the syntax of the print statement.
-- Stephen Figgins, 30 Aug 2000
INTERVIEWER: Tell us how you came to be drawn into the world of pragmas.
COMPILER WRITER: Well, it started off with little things. Just a few
boolean flags, a way to turn asserts on and off, debug output, that sort of
thing. I thought, what harm can it do? It's not like I'm doing anything you
couldn't do with command line switches, right? Then it got a little bit
heavier, integer values for optimisation levels, even the odd string or two.
Before I knew it I was doing the real hard stuff, constant expressions,
conditionals, the whole shooting box. Then one day when I put in a hook for
making arbitrary calls into the interpreter, that was when I finally realised I
had a problem...
-- Greg Ewing, 31 Aug 2000
t/data/python_quotes.txt view on Meta::CPAN
-- GvR, discussing a patch from Neil Schemenauer, 13 Dec 2000
Maybe they took solidity *for granted*, because, in their (Renaissance)
times and in their (Architecture) calling, compromises regarding solidity were
simply unthinkable. Well, we're not so lucky, in the software field, today; the
Firmitas of *by far* most software around is imperfect.
We *must* live by "do the simplest thing that can possibly work" -- give
solidity its proper, foremost place. One of the debilitating factors for much
current software is a misplaced emphasis on assumed 'convenience' (funky GUIs,
quirky shortcuts, special cases aplenty) to the detriment of solidity. A small
but crucial step to reverse this trend, is to start by putting the order right
once more... the way Vitruvius had it!
-- Alex Martelli, 13 Dec 2000
The Martellibot Mark 1 has a completely European flavour to it, and adds a
cosmopolitan touch of linguistics to its output, sprinkling foreign language
references in. It is similar to the timbot in its overall erudition, but can be
distinguished from it by its tendency to indulge in flamewars (which, I
believe, it does mostly to convince us it is human).
-- Steve Holden, 13 Dec 2000
t/data/python_quotes.txt view on Meta::CPAN
3) study the comment for a while, and think of a name that captures
the essence of the comment
4) convert the lambda to a def statement, using that name
5) remove the comment
-- Fredrik Lundh, 01 Apr 2001
The GPL tried to protect the freedom of end-users to modify and redistribute
their code. Most people do not believe that this is a legitimate freedom like
freedom of speech or assembly but Richard Stallman does. I don't think that
there is an argument that that will persuade a person one way or another. If
freedoms could be proven, that famous document would probably start: "Not
everyone holds these truths to be self-evident, so we've worked up a proof of
them as Appendix A."
-- Paul Prescod, 11 Apr 2001
That is one of the first goals. Also, we want to handle a C++ SAX stream with
Python, and vice versa (feed a Python SAX stream into Xalan). Bi-SAXuality, in
a sense. :)
-- Jürgen Hermann, 11 Apr 2001
As you seem totally unwilling or unable to understand that _Weltanschauung_ to
t/data/python_quotes.txt view on Meta::CPAN
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
-- but my name doesn't actually appear anywhere on the linked page! The "did
you mean to search for..." feature is also downright uncanny. They've clearly
sold their souls to the devil -- there's no other explanation.
-- Michael Hudson, 28 Jun 2001
t/data/python_quotes.txt view on Meta::CPAN
or test is perfect and static typing is not worth the cost in language
complexity and design difficulty for the gain in eliminating a few tests that
would have been easy to write anyway, since static types catch a small portion
of errors, not a large portion. The static people say static types don't add
that much language complexity, and it's not design "difficulty" but an
essential part of the process, and they catch a large portion, not a small
portion. The dynamic people say they add enormous complexity, and they catch a
small portion, and point out that the static people have bad breath. The static
people assert that the dynamic people must be too stupid to cope with a real
language and rigorous requirements, and are ugly besides.
This is when both sides start throwing rocks.
-- Quinn Dunkan, 13 Jul 2001
I am becoming convinced that Unicode is a multi-national plot to take over the
minds of our most gifted (and/or most obsessive) programmers, in pursuit of an
elusive, unresolvable, and ultimately, undefinable goal.
-- Ken Manheimer, 19 Jul 2001
Unicode is the first technology I have to deal with which makes me hope I die
before I really really *really* need to understand it fully.
-- David Ascher, 19 Jul 2001
t/data/python_quotes.txt view on Meta::CPAN
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
their (working) life repeatedly flashed before their eyes, but in slightly
different colours, over a longer period of time.
-- Paul Boddie, 29 Aug 2006
I am the very model of a modern major database,
For gigabytes of information gathered out in userspace.
For banking applications to a website crackers will deface,
You access me from console or spiffy user interface.
My multi-threaded architecture offers you concurrency,
And loads of RAM for caching things reduces query latency.
t/data/www.amk.ca/quotations/python-quotes/page-10.html view on Meta::CPAN
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
having their (working) life repeatedly flashed before their eyes,
but in slightly different colours, over a longer period of
time.</p>
<p class='source'>Paul Boddie, 29 Aug 2006</p>
<p class='quotation' id='q320'>I am the very model of a modern
major database,
For gigabytes of information gathered out in userspace.
For banking applications to a website crackers will deface,
You access me from console or spiffy user interface.
My multi-threaded architecture offers you