Re: [PHP] What's wrong the __autoload()?

2008-03-19 Thread Greg Donald
On 3/13/08, Andrés Robinet <[EMAIL PROTECTED]> wrote:
> Sorry dude, RoR is still an academic toy.

Wrong.

I've worked with a team of 12 or so Ruby/Rails developers rewriting a
Java/Oracle electronic medical record to use Rails/PostgreSQL instead.
 Hundreds of tables in a real-life app for real-world electronic
medical records.  I have 6 significant Rails projects of my own I
still work on and maintain.  None of those are in acedemia.

But in academia, just in the last 6 months I've rolled out a heart
drug study for young heart surgery patients.  The app services 21
university medical centers worldwide.  It uses Oracle and has around
60+ tables.  I alone coded the app in about 6 weeks.

Currently I'm working on another drug study with two other developers,
again in Rails using Oracle.

What you call a toy I call the most useful tool I've ever had the
pleasure of using.

> And not the most successful one, since
>  I've heard people talking like you back in 2005. Ruby on Rails is not new and
>  has not proved anything yet.

Obviously not everyone is smart enough to know an excellent tool when
they see one.

>  It's an arrogant language,

No, it's an OO language, and a much better OO implementation than
anything else available, except perhaps C++.

> so much arrogant that its community pretend it can
>  fix the world.

That's not _my_ claim.  But I surely wouldn't have PHP, or any of the
Rails clone frameworks written in it, appearing at the top of my
available technologies list.

> Back in 2005 I was very enthusiastic and thought it could have a
>  future, but after confirming what other poster said "the RoR community is
>  insane", I didn't give a f... anymore.

They're not insane, just excited to have better tools.

>  I believe it will become some piece of *enterprise-class* piece of dust in 
> the
>  best of scenarios.

I, of course, do not.

> In the meantime, the web moves towards PHP more and more.

Stats to back up your claim?  The last time I looked at the Apache
module stats, mod_php was on the decline.

>  Look at it this way, in 2001 M$ released the .Net Framework. It's been 7 
> YEARS
>  since PHP is STILL the leader and will be so for many more years. And .Net 
> has
>  the "glorious" Visual Studio IDE, compiled code, built-in caching, and
>  idiot-proof tools, and has the BIGGEST software company behind. Do you think
>  that the work of "a man" can do much more than that? Specially, a man that 
> has
>  the arrogance of a big Co.?

Pointing to a company and their many failures in no way makes PHP a
better tool than Ruby and Rails.

>  "In March 2007 David Heinemeier Hansson filed three Rails related trademark
>  applications to the USPTO. These applications regard the phrase "RUBY ON 
> RAILS",
>  the word "RAILS" and the official Rails logo. As a consequence, in the 
> summer of
>  2007 Hansson denied to Apress the permission to use the Rails logo on the 
> cover
>  of a new Rails book written by some authoritative community members. The 
> episode
>  gave rise to a polite protest in the Rails community. In response to this
>  criticism, Hansson made the following claims:
>  
>  I only grant promotional use [of the Rails logo] for products I'm directly
>  involved with. Such as books that I've been part of the development process 
> for
>  or conferences where I have a say in the execution. I would most definitely 
> seek
>  to enforce all the trademarks of Rails
>  

How is that any fucking different than Rasmus himself contacting me in
1999 telling me I had to rename my PHPLinks project because I wasn't
associated with the PHP project itself?  Pot-kettle-black.

>  Sorry, even if it was the ONE AND ONLY programming language... I will 
> dismiss it
>  until it becomes a "business need", as I don't even trust its creator. PHP is
>  easy to deal with, it's free... and IT GETS THE JOB DONE. You mentioned
>  something about projects done on RoR you can share... why don't you show us 
> your
>  PHP work instead?

This URL lists my many open source PHP projects:

http://destiney.com/php

Where are yours?

Here are many (PHP) sites I've worked on in the past few years:

Centerstone Behavioral Health - http://centerstone.org/
Med Center Today - http://medcentertoday.com/
Caste Contractors - http://castlecontractors.com/
Filmhouse.com - http://filmhouse.com/
EZsweeps - http://ezsweeps.com/
LuckyShop - http://ezsweeps.com/shoppingnew.php

> Maybe you like RoR more because you suck at PHP.

Maybe you're a fucking retard.


-- 
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Greg Donald
On 3/13/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> So... there we have it everyone... Greg has admitted that Ruby is as 
> smart as a cat.

Hahaha..  yeah, you really got me on that one.

/me slaps his knee.

>  I like something a little more edgy personally. Something closer to human... 
> something
> with personality, something that evolves, something not afraid to be itself. 
> PHP fits
> the bill.

PHP is anything but itself.  Before it was actually written in C it
was first written in Perl.  And although it may be written in C and
may look like C and Perl right now, it's clearly evolving into
something very similar to Java.  PHP has a long, long history with
identity crisis, ongoing even today.

Meanwhile Ruby was written as a full-on OO language from the start.
The OO layer didn't get "strapped on" at version 3 like with PHP.  OO
was the main idea from the very start with Ruby.  As a result Ruby's
OO model makes PHP's OO model look like a steaming pile of shit out in
the pasture.  Hell, Perl's OO even makes PHP's OO look bad
syntax-wise.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Greg Donald
On 3/13/08, Ray Hauge <[EMAIL PROTECTED]> wrote:
> This is my last post on this thread.

I doubt that, but feel free to prove me wrong.

>  The point of this reply is I didn't say anything about how long you've
>  been around here.  The fact is you're still here, and we're talking PHP.

You said "You come to a PHP mailing list to proclaim that RoR is
better?"  Since Ruby on Rails is younger than PHP, your statement
implies a recent arrival to the list.

>  I will give you that you weren't the first to submit an opinion of Ruby
>  being the best or the worst.  Your first reply was simply open minded,
>  but then you got your feathers all ruffled when someone said they didn't
>  like Ruby, albeit in a somewhat negative connotation.

My feathers are in no way ruffled.  You think a little arguing with
Rob or you about Rails is some big deal to me?  Clearly you are the
one who just showed up.  Heated technology discussions occur on lists
all the time, this one certainly isn't immune to that sort of
off-topic digression.

>   >> It's people like you that turn a lot of people off to Ruby.

I seriously doubt my mere words would sway anyone away from a specific
technology.  You're still using PHP, correct?  Rob?

> The reason it turns people off is you have to work with the community as

Please, enough with the turned-on, turned-off stuff, it's really not
what I had in mind at all.

>  well as the language.  If you want the project to get better, you need

The Rails project _already_ rocks, whatever do you mean?

Truth is I would actually like for core Rails development to slow down
a bit so my latest Rails book I just bought isn't out of date in 6-8
months.

>  to be able to work with the community.

So if I can't work with the community Rails effectively, Rails will
not get better?  I seriously can't follow your ramblings.

> I will admit that the PHP
>  Internals list can get pretty heated as well, but those arguments are
>  usually based on technical opinions and not religious fervor for the
>  language*.

Point?


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Greg Donald
On 3/13/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> Because PHP is the dog and Ruby is the cat?

Yeah, I guess.  I have several cats.  Indeed they are fast, sleek, and
smart just like Ruby.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Greg Donald
On 3/13/08, Eric Butera <[EMAIL PROTECTED]> wrote:
> Ruby must really increase your work performance as you seem to have so
>  much free time to troll here.  Awesome!  :)

Ruby on Rails is really amazing in how fast you can put an app
together.  There are generators for most everything so whipping up a
new model or controller is really fast.  It really is awesome.  :)


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-13 Thread Greg Donald
On 3/12/08, Ray Hauge <[EMAIL PROTECTED]> wrote:
> You
>  come to a PHP mailing list to proclaim that RoR is better?

No dumbass, I have already been here for a long time:

http://marc.info/?l=php-general&m=95331489301933&w=2

And I didn't proclaim anything, Rob did:


But then you'd end up with something like Ruby on Rails... and we all
know about Ruby on Rails *VOMIT*.


> It's people like you that turn a lot of people off to Ruby.

I choose to use a language for a while before forming an opinion.  I
certainly wouldn't let someone's opinion sway my own inquisitive
nature to have a go at it myself.

>  The community is insane!

No more insane than 10 years ago when a great many of us realized we
didn't have to use Perl any more to do web dev.  I clearly remember
hearing things said like "Now we have PHP and it's much better and
much easier than Perl".  I see similar happenings with Ruby and Rails
right now.  It's that same ease of use that now makes PHP feel like a
beast to work with.

>  This was a great read.  If nothing else he's funny.
>
>  http://terrychay.com/blog/article/php-ruby-evil-good.shtml

Looks pretty stupid to me.. what does a dog humping a cat have to do
with anything in technology?  Please keep your animal pr0n to
yourself.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Dave Goodchild <[EMAIL PROTECTED]> wrote:
> Will you two pricks cut it out. How fucking tedious.

Tedious?  Sorry.

/me passes the "buddhamagnet" a dictionary so he can keep up.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> You're new around here right?

Hehe.  For sure.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> Just because someone got a flashy new toy doesn't mean I want it. I've
>  got better things to do than play with flashy toys for the mere purpose
>  of playing with flashy toys. I like to use tools that get jobs done.

Translation: I'm too lazy to learn anything new since I already know PHP.

Languages come and go.  There's a reason why we no longer need a
cgi-bin and Perl to make an animated gif.  Going further, who the hell
even uses animated gifs any more?

> Ummm, I originally looked into Ruby and RoR because someone spouted off
>  "better" and "easier". After reviewing, looking at the language, trying
>  some code, reading other peoples blogs, magazine articles, searching the
>  web... I decided, using the brain I've been nurturing since I was a
>  fetus, that I preferred PHP.

Great, just so long as we're clear on the point that Ruby is better
than PHP, just not for you personally.  I'm totally fine with leaving
the discussion at the "differently preferred opinion" level.  Sounds
like a cop-out but I'm ok with your holding that position all the
same.

> But then who would confront your rhetoric and propaganda?

I do exhibit a bit of rhetoric at times, but in my defense it came
standard with my inquisitive mind.

Conversely I do not know what propaganda you speak of.  I've never
once made a specific claim in favor of Ruby that I couldn't back up
with example code.

> You're assuming that we choose PHP over RoR based on having seen a 5
>  minute tutorial. Wow, aren't you just full of assumptions.

Ok then, how many projects did you pursue before giving up and
concluding Rails or Ruby was too much effort to learn?  URL?

I will point out it's probably a good thing this same lack of effort
on your part did not occur when you began to learn PHP, otherwise we
wouldn't even be having this discussion.

> Interestingly, laziness is one of the biggest motivators of innovation.
>  Do more with less.

Well that sure as hell ain't PHP.  ROFL.  More with less, using PHP, hilarious.

/me points to SPL and laughs his ass off

> That SHOULD be part of any developers mandate... but
>  not blindly.

If by blindly you mean fun, fast, test-driven, productive development,
then yeah I guess so.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Aschwin Wesselius <[EMAIL PROTECTED]> wrote:
> -5 for not keeping this kind of childish behavior of the list (both of you)

Playing the game by claiming the game is wrong to play is still
playing the game.

-1 for playing the game hypocritically.

-1 for thinking -5 exists.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
>  > -1 for not recognizing a rhetorical question.
>
> +2 for setting his tongue firmly in cheek and providing you with an
>  answer to your rhetorical question.

-1 for thinking rhetorical question responses mean jack.

-1 for thinking +2 exists.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> Yes, but some of your diatribe was originally directed my way. And this
>  stuff certainly isn't new to me.

Sure it is, else you'd be using it.. like all the smart PHP
programmers I see on the Rails list looking to expand their tool set
on a daily basis.

> A. you're so considerate... but really, there's no need, I'm sure I
>  can understand things well beyond your own capabilities.

There's been no indication of that up to now.

> You're chasing your tail here. That would be true of any language. And
>  since such "meta programming capabilities" exist in other languages,
>  obviously they were thought up at some point when they didn't exist at
>  all. One need not know of something to be able to invent it... see how
>  that works. I could dumb it down for you if you want.

You're confusing language designer with language user.  A language
user can only use what features he has been provided to use.

You just keep beating that PHP rock with that PHP hammer.  Pay no
attention when someone utters the words "better" or "easier".  Why not
just go ahead and make yourself a mail filter too.. put
[EMAIL PROTECTED] right at the top.

>  of which you speak. You dismiss their experience, reasoning, and
>  preference and presume yourself superior...

What reasoning?  "I saw a 5 minute tutorial on Rails, I didn't
understand some of it, therefore Ruby sucks?"  That's not reasoning
and it certainly doesn't gain one any experience, unless laziness
recently became a virtue.

> get over yourself.

You first.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Frameworks

2008-03-12 Thread Greg Donald
On 3/12/08, Aschwin Wesselius <[EMAIL PROTECTED]> wrote:
>  What I'm after is a framework that is simple, solid, compact and
>  flexible enough to extend by myself.

http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks#Comparison_of_features


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> On Wed, Mar 12, 2008 at 3:59 PM, Greg Donald <[EMAIL PROTECTED]> wrote:
> > I'm sorry, I lost context, what missing PHP language feature are you
> > referring to as "it"?
>
> functional capabilities, in particular the ability to dynamically add a
> method to an object at runtime which you highlighted earlier.

-1 for not recognizing a rhetorical question.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> You make it sound like this stuff is new or something.

Obviously to some it is.  Just in this thread we had a person claim to
only know PHP, C, and Java, none of which have any functional language
capabilities built in.

> Lisp and other
>  functional languages have had it for decades. Even JavaScript has it.

I'm sorry, I lost context, what missing PHP language feature are you
referring to as "it"?

>  Your analogy is also way off... ask any person without legs if they
>  think about walking.

Here, let me dumb-it-down a bit:

PHP doesn't have much in the way of meta-programming capabilities.
Therefore one would not find it a natural thought to do much
meta-programming in PHP, unless one already knew of a language where
such support exists.

A different example using the same logic: My Mustang doesn't have
4-wheel drive so I don't often think much about taking it through the
creeks and woods by my house like my old man and I do in his Bronco
that does have 4-wheel drive.  A person who has never climbed a really
steep hill or ran through a waist-high creek in a 4-wheel drive auto
might think such a thing impossible if they were unaware of 4-wheel
drive.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> I can't really think of a
> case where I would want to modify the class definition of an
> instantiated object

You can't very well think to walk if you don't have legs.


-- 
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> ok, I admit I don't have experience with Ruby but I have experience with
>  php. and I don't have experience with Ruby because I read some manuals
>  and example codes and whatnot and I just could not get to like it at
>  all.

That's a lot different from your previous blanket statement of "Ruby
as a language just plain sucks".  I hate you less now that I know a
bit more about you, see how that works?

> it's just so strange and different from anything I know (php, c,
>  java) -

Ruby has a lot of functional language influence.  Once you use it you
really start to like how much shorter your iterative loops are for
example.  The first two developers I worked with using Ruby also knew
ML and Scheme.  One of them suggested I go study Scheme so I would
appreciate Ruby more.  I did so for several weeks and now I do.  Ruby
provides everything from the procedural world we're currently used to
seeing in PHP, C, and Java, but it also adds functional style that
makes for some utterly beautiful, compact code.

> and I could not find out any good reasons for most of the
>  differences...

And you won't until you use it in practice more than once.  But that's
true of most any language.  I worked in Python by day for the better
part of last year and man was it fun seeing other ideas for how to do
things.

> e.g. how come function definitions are between 'def' and
>  'end'?

def is shorter than PHP's "function" qualifier?  I give up.  'end' is
optionally replacable with '}',  as is 'do' and '{' but you probably
didn't ever get to that page in the Ruby book you read.

> I just don't like it and it's a matter of taste,

In my experience "matter of taste" usually equates to "resistance to
learning", but call it what you will.

> so there is no
>  need to argue about it more... :)

There's always reason to argue the features of a given language.  For
example you may need to try and convince me at some point that Zombie
is a great language:

http://www.dangermouse.net/esoteric/zombie.html

Or not.

>  however that's not about the framework, I admit that Rails had several
>  new and useful concepts, and I know that the framework I currently use
>  took a lot of ideas from there.

Those other frameworks can never be as powerful as Rails because they
aren't written in something as meta-capable as Ruby.  Can you do this
in PHP?

class Foo
end

f = Foo.new

class Foo
  Resource.find( :all ).each do |r|
res = r.name.downcase
define_method( "op_cost_#{ res }".to_sym ) do
  self.properties.inject( 0 ){ |c,p| c + p.send( "op_cost_#{ res }" ) }
end
  end
end

cost = f.op_cost_wheat

No you can't.  PHP doesn't support adding methods to classes at
runtime, nor does it support adding methods to instantiated objects of
those classes at runtime.  And that's just one example.  These sort of
OO advantages exist throughout Ruby.

You don't love these features because you don't know they exist.  You
don't know they exist because you haven't given the language more than
a few minutes of your time.  Running through some silly little 5
minute Rails scaffolding tutorial will in no way teach you the real
power that exists in Ruby.


-- 
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
>  > Imagine at Blizzard one morning, "Hey guys, we're not going to be able
>  > to use function pointers on the new Diablo III like we had planned to
>  > do, the new hires down the hall don't understand them very well so
>  > just don't use them, OK?"
>
> This is not a valid comparison. The above is the replacement of one
>  convention with another convention. It is not a case of circumventing a
>  convention to achieve a specific, and probably desired outcome.

It's a dead-on, same example, just with a different programming
language and a different language feature.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> No it's not. It's not like require_once() is a hassle to type/use
>  anyhow. Things like editor macros and templates help out enormously and
>  by using them over __auto load you (a business) could save yourself a
>  lot of time and hence money.

I'm not defending __autoload() specifically, I don't do much OO PHP
anyway so I couldn't possibly care less about it.  My argument is that
asking other developers to not use specific language features simply
because lesser developers may not know them very well is just plain
dumb.  I'm sorry you don't get it and I'm done trying to help you get
it.  Good luck codling your lesser developers.  May they never learn
jack on their own.

*sigh*


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> but I strongly think that Ruby as a
> language just plain sucks ;)

And exactly how many projects do you have under your belt to allow you
to develop this opinion?  What's the url to any one of them?

Unlike you I actually have thousands of lines of Ruby code under my
belt that allows me to properly develop an opinion of Ruby and Rails
and how they both compare to every other programming language and
framework I know and have developed in.  Need a URL?


-- 
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> That's not quite the situation. Finding good developers isn't easy, so
>  lots of companies will go for "acceptable" ones, who are less likely to
>  know of __autoloads existence. Hence, using __autoload is unwise.

A lesser developer should be paid less and should be expected to
produce less but he should not in any way be allowed to refrain from
learning.

How long does it take to understand __autoload() anyway?  5-10
minutes?  15 or 20 if you play with an example for a bit?  You're
gonna restrict the entire development team from using a given feature
just because you don't want to invest 20 minutes in getting your
newbie developer up to spead?  That's pure idiocy.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> It's a perfectly viable business reason.

No it's not.  I guess you need a "business" scenario to wrap your head
around the idiocy.

Here you go:

Imagine at Blizzard one morning, "Hey guys, we're not going to be able
to use function pointers on the new Diablo III like we had planned to
do, the new hires down the hall don't understand them very well so
just don't use them, OK?"


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> But then you'd end up with something like Ruby on Rails... and we all
>  know about Ruby on Rails *VOMIT*.

You clearly don't know much about it or else you wouldn't be bashing
it.  Period.  Just admit the fact that you're resistant to learn new,
better ways of doing things and move on.

On the other hand, if there's something in Rails you genuinely don't
understand, I'll be happy to assist you with that particular
understanding, off-list or wherever, free of charge.

>  Who wants to be stuck on a track when they can soar with the eagles.

I dunno, why not ask the many Rails clone authors?  I certainly don't
see any Ruby programmers trying to copy ZF or Symphony.

>  > http://en.wikipedia.org/wiki/Convention_over_Configuration
>
> Interesting how the article promotes the ideas of both convention and
>  configuration co-existing so that one doesn't lose versatility. Thus,
>  one could infer that any good framework would allow both paradigms.

Rails supports both naturally.  It has configurable environments for
development, testing, and production, all pre-configured for the most
common cases.  You can even create your own new environments if you
have something that doesn't fit into dev/test/prod very easily.
Complete versatility in every regard thanks to Ruby's meta-ness.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] strtotime( 'last Sunday' ) and republicans

2008-03-12 Thread Greg Donald
On 3/10/08, Wolf <[EMAIL PROTECTED]> wrote:
> Watch throwing that blame around there Greg, you get to thank the
>  democrats for NAFTA and the hurting the heartlands

No matter where we draw the borders or put the roads and highways,
it's still just the one planet, with the same finite resources we all
have to share.  Being mad about globalization is pointless, it's
inevitable.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's wrong the __autoload()?

2008-03-12 Thread Greg Donald
On 3/12/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> > I'm wondering what's wrong with the use of __autoload(), since I see that
>  > projects like the Zend Framework don't use it and prefer to require_once
>  > each required file.
>
> Things that happen without you explicitly causing them (ie require() et
>  al) can lead to confusion.

It's called "convention over configuration" and that's exactly where
good frameworks should be headed.

http://en.wikipedia.org/wiki/Convention_over_Configuration

>  For example a junior developer who doesn't know of its existence  and is
>  new to a job is less likely to admit ignorance and ask how a class is
>  being defined when __autoload() is being used.

That's a the dumbest reason I've ever heard to not use a given language feature.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Know a JS list serve

2008-03-11 Thread Greg Donald
On 3/11/08, Skip Evans <[EMAIL PROTECTED]> wrote:
> Hey all,
>
>  I've been Googling trying to find a JavaScript
>  list serve to post a question to, but have been,
>  embarrassingly, unable to find one.
>
>  Anyone on one they'd recommend or know of one?

Not a list, but the peeps in #javascript on irc.freenode.net have
never once failed me when I was stumped.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] save image in database vs folder

2008-03-11 Thread Greg Donald
On 3/11/08, jeffry s <[EMAIL PROTECTED]> wrote:
>  which one is better. save in database or in folder?

The file system _is_ a database.  No need to add more unnescessary layers.

Here is the defacto Zend benchmark on the topic:

http://www.zend.com/zend/trick/tricks-sept-2001.php

It doesn't work for me however, some header/include error.. maybe
there's a mirror or a cache of it some place.  Or perhaps you can
persuade Zend to fix it back to a working state.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CSV speed

2008-03-10 Thread Greg Donald
On Mon, Mar 10, 2008 at 8:09 PM, Danny Brow <[EMAIL PROTECTED]> wrote:
> I have about 10 csv files I need to open to access data. It takes a lot
>  of time to search each file for the values I need. Would it be best to
>  just dump all the cvs files to an SQL db and then just grab what I need
>  from there? I'm starting to think it would make a lot of sense. What do
>  you guys think?

grep foo whatever.csv | php ./script.php


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] strtotime( 'last Sunday' ) and republicans

2008-03-10 Thread Greg Donald
Hey Rob,

Remember on 2007-09-18 at 22:45:37 when you suggested I do this:

http://marc.info/?l=php-general&m=119015558426248&w=2

Well.. today strtotime( 'last Sunday' ) screwed me and I'm writing to
say that I nearly fell out of my chair laughing when I realized what
the problem was, who caused it, and who "helped" me code it. :)

This issue only appears on an ancient PHP4 install as far as I can tell:

echo "Current time():\n";
echo date( 'Y-m-d H:i:s', time() );
echo "\nBroken strtotime( 'last Sunday' )\n";
echo date( 'Y-m-d H:i:s', strtotime( 'last Sunday' ) );
echo "\n";

> /usr/local/php4/bin/php test.php
Current time():
2008-03-10 20:03:39
Broken strtotime( 'last Sunday' )
2008-03-08 23:00:00

23:00?  Guess what we did to out clocks this past weekend?

I blame the republicans in general, and the short one named 'W' specifically.

I won't bother mentioning the fix as I'm sure 83,293,874,713 people
will post the same correct code by the end of the day tomorrow.  No
one runs PHP4 except _my_ clients anyway.  *shrug*


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Why use session_register()?

2008-03-10 Thread Greg Donald
On 3/10/08, Lamonte H <[EMAIL PROTECTED]> wrote:
> Is it necessary to use session_register()?  What exactly was the point of
>  this function if you can set sessions using $_SESSION it self?

session_register() accepts a variable parameter list and does not
require a call to session_start() prior to it's use.

http://php.net/session_register


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] RewriteRule help

2008-03-01 Thread Greg Donald
On 3/1/08, Shelley <[EMAIL PROTECTED]> wrote:
>  Anybody knows what apache RewriteRule to use if  I want url:
>  http://www.aaa.comm/user//
>  be rewritten as:
>  http://www.aaa.comm/user/index.php//


RewriteRule  ^user/([-a-zA-Z0-9]+)$   /index.php?user=$1   [NC,L]



-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] string effect

2008-02-29 Thread Greg Donald
On 2/29/08, Alain Roger <[EMAIL PROTECTED]> wrote:
>  Text is cut off based on (numbers of words, number of characters,..) ?
>  what is the algorithm for such thing ?


Mr. Heyes more or less prompted me to go dig for my other, slightly
heavier version, that doesn't chop words up:


function breakUpLongLines( $text, $maxLength=96 )
{
  $counter = 0;
  $newText = '';
  $array = array();
  $textLength = strlen( $text );

  for( $i = 0; $i <= $textLength; $i++ )
  {
$array[] = substr( $text, $i, 1 );
  }

  $textLength = count( $array );

  for( $x = 0; $x < $textLength; $x++ )
  {
if( preg_match( "/[[:space:]]/", $array[ $x ] ) )
{
  $counter = 0;
}
else
{
  $counter++;
}

$newText .= $array[ $x ];

if( $counter >= $maxLength )
{
  $newText .= ' ';
  $counter = 0;
}
  }

  return $newText;
}


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php with modified version of sqlite

2008-02-29 Thread Greg Donald
On 2/29/08, Jean-Christophe Roux <[EMAIL PROTECTED]> wrote:
> Hello,
>
>  I am running php 5.1.6 on a Centos 5.0 box (installed with yum). My php app 
> uses pdo_sqlite. The issue is that I am going to have to use a special 
> version of sqlite with some custom functions. How do I control which version 
> of sqlite, php is calling?
>  Thanks for any advice

PHP can use whatever version of SQLite you compile it against.  I do
believe SQLite version 3 is the current popular version.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] string effect

2008-02-29 Thread Greg Donald
On 2/29/08, Alain Roger <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  since a long time now, i see that some paragraphs of text are cut off and
>  the additional text is replaced by 3 dots.
>  e.g:
>
>  "this is the original long text but without any sense and also stupid"
>
>  effect desired :
>  "this is the original long text..."
>
>  this is usually used for title articles or some long paragraphs.
>  What is the basic rule ?
>  Text is cut off based on (numbers of words, number of characters,..) ?
>  what is the algorithm for such thing ?
>
>  thanks a lot,


function truncate( $string, $length=384, $ending='...' )
{
  if( strlen( $string ) > $length )
$string = substr( $string, 0, $length ) . $ending ;

  return $string;
}



-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] output buffering in CLI script.

2008-02-29 Thread Greg Donald
On 2/28/08, Casey <[EMAIL PROTECTED]> wrote:
>  #!/usr/bin/php

Or the entirely more portable version:

#!/usr/bin/env php
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sometimes I wonder why I even started programming...

2008-02-28 Thread Greg Donald
On 2/28/08, Nathan Rixham <[EMAIL PROTECTED]> wrote:
>  what ide's editor's do you two use? zend's use of javaw is killing my
>  win2k3 dev machine anyways.

# dd if=/dev/tty of=/dev/hda1

And then sometimes I also use vim.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Are these Truthful Proof about PHP ??

2008-02-27 Thread Greg Donald
On 2/27/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
>  So is ASP really a framework?

.Net has upwards of 70K classes.  If that's not a framework then I
dunno what is.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Are these Truthful Proof about PHP ??

2008-02-27 Thread Greg Donald
On 2/27/08, Matty Sarro <[EMAIL PROTECTED]> wrote:
> Well, I was going to ignore this comment, but given the smart-alecky nature
> I have to comment that the post date is April 1st 2007. Today is February
> 27th, 2008. Not only is that not 4 years, but its less than 365 days. You
> may want to brush up on your math skills my friend. And your humor skills as
> well :)

My point is it's old news.  And it wasn't funny then either.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Are these Truthful Proof about PHP ??

2008-02-27 Thread Greg Donald
On 2/27/08, Matty Sarro <[EMAIL PROTECTED]> wrote:
> Psh, if you're going to talk about RoR, might as well talk about PoP...
> Python on Planes!
> http://developers.slashdot.org/article.pl?sid=07/04/01/176239

Yeah, I love me some good April Fool's jokes, especially the 4 year old variety.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Are these Truthful Proof about PHP ??

2008-02-27 Thread Greg Donald
On 2/27/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> ya; rob; greg is like the new dude on the witty block;
> better pack something good for a comeback :O
> my heads still smoking while i try to think up something
>  moderately so ~:(

I'm not gonna just sit here and watch someone "*lol*" comparing the
bloated nature of ASP to PHP when I can make the _exact same
comparison_ using Ruby (and/or Rails) compared to PHP.  Rob then
follows with the very predictable reply that I am somehow wrong in
comparing PHP to a "framework" rather than to a language, but then
isn't ASP, the object of Rob's "*lol*", also a framework of sorts?
Pot-kettle-black.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Are these Truthful Proof about PHP ??

2008-02-27 Thread Greg Donald
On 2/27/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> RoR is a framework, not a language.

Really?  I had not heard that previously.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Are these Truthful Proof about PHP ??

2008-02-27 Thread Greg Donald
On 2/27/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> *lol* Look at the examples on the page... aks yourself if you enjoy
>  typing 2 to 3 times as much to do the same thing.

*lol*  This is one of the same reasons why I'm using Ruby on Rails
more and PHP less, all the time.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Newbie List

2008-02-26 Thread Greg Donald
On 2/26/08, Daniel Brown <[EMAIL PROTECTED]> wrote:
> Speak for yourself.  My code is always 100% spotless, efficient,
>  and runs the first time, completely bug-free, every single time, as it
>  has for years.

Well, in Ruby on Rails, it has this..   nevermind.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Question about PHP Licence and it's future!

2008-02-26 Thread Greg Donald
On 2/26/08, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
>  They (anyone non-white) call us howlies in Hawaii I believe and it's not
>  meant as a compliment.  Regardless, most whites don't take any of these
>  that negatively because we don't view ourselves as the oppressed and
>  don't view the others as oppressors shouting offensive slang at us.

It seems to me that we have many in U.S. society who still very much
want to be thought of as being oppressed.  Take this "Black History
Month" business for example, I don't recall ever having anyone
reminding me to celebrate "American Indian Heritage Month".  Or is it
because I don't live near a casino?

Seems a bit unfair, especially since I was never personally an
oppressor of Native Americans or Blacks.  But I still have to hear
about certain celebrations, every year, for an entire month.

I say drop all the silly heritage-related theme months completely and
simply celebrate humanity not having blown itself up in the past year.
 I don't need a reason to drink but that'd be one I could use all the
same.

And for the all important "record", my Mexican friend Lalo says
"gringo" isn't nearly as potent an insult as it was back in the 70's
when he actually used it towards Texans who didn't know or care that
he was also a native Texan by birth.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Newbie List

2008-02-26 Thread Greg Donald
On 2/26/08, revDAVE <[EMAIL PROTECTED]> wrote:
> Rather than bug folks on this cool list for beginner questions - does anyone
>  know of a good PHP Newbie email List?

The newbie list idea was shot down multiple times over the years.  Ask here.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How do you send stylized email?

2008-02-26 Thread Greg Donald
On 2/26/08, Ray Hauge <[EMAIL PROTECTED]> wrote:
> I'm just glad there's a lot of sinners out there, or at least
> people who aren't that crazy :)

They're called hypocrites.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: When to use design patterns?

2008-02-25 Thread Greg Donald
On 2/25/08, Michael McGlothlin <[EMAIL PROTECTED]> wrote:
>  I've been fighting with stupid Joomla lately because it throws
>  Javascript errors making it unusable.

The un-usability began for me when I became aware of the 250+
published exploits under it's current "Joomla" name:

http://search.securityfocus.com/swsearch?query=joomla&metaname=alldoc

And the 280+ exploits when it was called "Mambo":

http://search.securityfocus.com/swsearch?query=mambo&metaname=alldoc


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: temporary error

2008-02-23 Thread Greg Donald
On 2/23/08, tedd <[EMAIL PROTECTED]> wrote:
> I love the book written by Carl Sagan the "The Dragons of Eden" -- he
>  has an interesting perspective on the God thing and it contains more
>  substance than a cute quote.

Well as long as we're quoting famous old fence-sitting agnostics, lets
not forget Sagan's best:

'If by "God" one means the set of physical laws that govern the
universe, then clearly there is such a God. This God is emotionally
unsatisfying... it does not make much sense to pray to the law of
gravity.'


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: temporary error

2008-02-23 Thread Greg Donald
On 2/23/08, tedd <[EMAIL PROTECTED]> wrote:
>  For us to criticize each other for our beliefs would serve no purpose
>  other than to exhibit intolerance. And, I think we can all agree that
>  intolerance should not be tolerated.

I believe it was Thomas Jefferson who said, "Ridicule is the only
weapon which can be used against unintelligible propositions."


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: temporary error

2008-02-23 Thread Greg Donald
On 2/23/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> That's ok, I have complete faith that many millions more people will die in 
> the
> name of religion.

In addition to that, one can't easily ignore the millions who were
killed by god himself as recorded in the bible:

http://tinyurl.com/h4u5b

I love what Steven Weinberg, the Nobel Prize-winning physicist said,
"Religion is an insult to human dignity. With or without it, you'd
have good people doing good things and evil people doing evil things.
But for good people to do evil things, that takes religion."


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: temporary error

2008-02-23 Thread Greg Donald
On 2/22/08, Nathan Rixham <[EMAIL PROTECTED]> wrote:
>  I think grass is proof, as in blades of grass - there are billions per
>  square foot, and they are all grass, not half baked weird
>  grass/*something else* mixes, but all grass - to me thats proof of
>  creation, and therefore proof of a creator, thus god.

I have a shiny new Intel processor.  It has billions of transistors on
it, billions per square inch in fact, and they're all good
transistors, not some half-baked capacitors or diodes or other ilk.
The same arguments can be made with hard drives and ram.  Having the
capacity to create a lot of something in an orderly fashion does not
prove existence.

>  god's like wind, can't see it but it still blows your bin over so you
>  know it's there.

Good, now I know who to blame when a tornado takes out a trailer park
in the southern bible belt.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: temporary error

2008-02-23 Thread Greg Donald
On 2/22/08, tedd <[EMAIL PROTECTED]> wrote:
>  Shouldn't the reason why we ask "if" be sufficient proof that "it is"?

I don't believe having an interrogative nature proves existence in God, no.

>I imagine there are a great number of things that don't exist
>  that we never mention -- so why this one?

Well because this one bilks money from people who usually can't afford
to be giving it in the first place.  It has over-reaching influence
into my government, one that's supposed to be completely separate from
it.

>  All rhetorical comments -- no need to reply. We all have different
>  beliefs -- whatever gets you through.

That's my viewpoint to some extent, as long as it's not harming me then fine.

But the truth is it is harming all of us.  Do we really want our
children taught about a magical sky-god who insists on genital
mutilation at birth?  Do we want influences into our governments that
inhibit natural advances in modern science?  Do you really believe in
virgin birth and resurrection?


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: temporary error

2008-02-23 Thread Greg Donald
On 2/22/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> That's pretty funny... but why rewrite a great fantasy?

It started as a sort of a dare from one of my "bright" friends.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: temporary error

2008-02-22 Thread Greg Donald
On 2/22/08, Daniel Brown <[EMAIL PROTECTED]> wrote:
> So help me God

Speaking of imaginary things, check out this new site I built few weeks back:

http://rewriteproject.com/

I do believe I am the first person to ever "tag cloud" a bible  :)


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] More than one values returned?

2008-02-22 Thread Greg Donald
On 2/21/08, Nick Stinemates <[EMAIL PROTECTED]> wrote:
> I'm glad you're literate enough to understand what *indication* and
>  *usually* mean.

I know perfectly well what they mean, both words in fact.

What I, and many others I can only assume, are waiting for, is one
shred of an example to back up your obviously immature and uninformed
claim.

>  Oh wait..

I am indeed waiting, where's your code?  When, and under what
circumstances exactly, is getting back an array of objects from a
function or method call "poor design" ?  Please, do tell.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] More than one values returned?

2008-02-21 Thread Greg Donald
On 2/19/08, Nick Stinemates <[EMAIL PROTECTED]> wrote:
>  I said, simply, returning an array of objects was usually an indication
>  of poor design.

No it's not.  Nearly every MVC framework in existence implements some
sort of ActiveRecord finder that does exactly that.

Rails:
@foo = Foo.find( :all )

Django:
foo = Foo.objects.all()

ZF:
$foo = new Foo();
$foo->fetchRow( $foo->select() );

All return arrays of objects.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] More than one values returned?

2008-02-19 Thread Greg Donald
On Feb 19, 2008 9:27 PM, Nick Stinemates <[EMAIL PROTECTED]> wrote:
> Support != good design habits.

So you presume to have better design habits than the many language
designers who implemented parallel assignment in their respective
language?  Right.

http://en.wikipedia.org/wiki/Assignment_%28computer_science%29#Parallel_assignment

> Please read my other post which explains
> the reasoning.

Your "reasoning" is shit.

min, max = 0, 0

is beautiful.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What community software package gets your vote? PHPfox etc...

2008-02-19 Thread Greg Donald
On Feb 19, 2008 8:41 PM, TS <[EMAIL PROTECTED]> wrote:
> Hello everyone. I'm not sure what the budget is but, obviously inexpensive
> would be nice. Someone turned me on to PHPfox. Yet I don't have any others
> to compare it to. If you all would be so kind as to put a shout out and vote
> on your favorite, I'd be very grateful.

What about security?  Do you care if it has a large number of publicly
disclosed exploits in it's past?  That'd be the first thing to come to
(my) mind if I were about to put code someone else wrote on my web
server.

For example:

http://search.securityfocus.com/swsearch?sbm=%2F&metaname=alldoc&query=phpfox&x=0&y=0

Two exploits doesn't seem bad, but in what time span were they?

Something to think about.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] More than one values returned?

2008-02-19 Thread Greg Donald
On Feb 19, 2008 5:23 PM, Steve Edberg <[EMAIL PROTECTED]> wrote:
> For completeness sake, this is pretty much the same in PHP:
>
> function test() {
>return array(1,2);
> }
>
> list($a,$b) = test();

Yup, just a few more keystrokes is all.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] More than one values returned?

2008-02-19 Thread Greg Donald
On 2/18/08, Robert Cummings <[EMAIL PROTECTED]> wrote:
> I'd just return arrays unless I had a specific need for incurring object
> overhead for such simple datatypes.

w0rd.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] More than one values returned?

2008-02-19 Thread Greg Donald
On 2/18/08, Nick Stinemates <[EMAIL PROTECTED]> wrote:
> I have found, however, that if I ever need to return /multiple/ values,
> it's usually because of bad design and/or the lack of proper encapsulation.

Yeah, that's probably why most popular scripting languages support it.

In Ruby:

def foo
  1, 2
end

a, b = foo


In Python:

def foo
  return 1, 2

a, b = foo


In Perl:

sub foo
{
  return (1, 2);
}

(my $a, my $b) = foo;



--
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Greg Donald
On 2/18/08, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
> Sure, if you want to miss all the linker and compiler goodies :-)

I'm guessing that'd be non-issue for an obviously inexperienced FreeBSD user.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Greg Donald
On 2/18/08, Petrus Bastos <[EMAIL PROTECTED]> wrote:
> Error: FTP Unable to get
> ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.1-release/Latest/zip.tbz:
> File unavailable (e.g., file not found, no access)
>  pkg_add: unable to fetch
> 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.1-release/Latest/zip.tbz'
> by URL


Works fine for me on 6.3-RELEASE.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Greg Donald
On 2/18/08, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
> cd /usr/ports/archivers/zip
> make install clean zip

pkg_add -r zip

done.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Template system in PHP

2008-02-12 Thread Greg Donald
On Feb 12, 2008 4:23 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> > > well thats what xslt is, which is pretty nice.
>
> /\ is a statement, not a question ;)

Wow dude, you're a rock.  I meant my question was rhetorical, not your
statement about my question.

> > /me point Nathan to http://en.wikipedia.org/wiki/Rhetorical_question
> >
> > XSLT sucks, complete overkill.
> >
> the best part about xslt is its a standard, not some new contrivance from

Creation does not prove usefulness.

> some other corner of the galaxy like smarty.

Well I certainly agree with that.  Smarty is like the fat cousin you
hope doesn't show up to the 4th of July cookout.  But there's always
some n00b developer who brings it up.. next thing you know the project
manager thinks it's a good idea because his "designers" will love to
use it (rofl) and then you're screwed.

>  furthermore i dont think it overkill at all.  so lets see, what are you
> rendering,
> o, a subset of xml, xhmtl.  so its actually quite concise.  beyond that its
> well
> suited to target the output from an application to other potential clients
> such
>  as programmatic ones eg. web service clients or mobile devices.

REST is the new SOAP.  Yaml is the new XML.  I'm guessing this news
just hasn't made it into any PHP frameworks yet.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Template system in PHP

2008-02-12 Thread Greg Donald
On Feb 12, 2008 3:37 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> well thats what xslt is, which is pretty nice.

/me point Nathan to http://en.wikipedia.org/wiki/Rhetorical_question

XSLT sucks, complete overkill.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Template system in PHP

2008-02-12 Thread Greg Donald
On Feb 12, 2008 3:32 PM, Christoph Boget <[EMAIL PROTECTED]> wrote:
> As an aside, you can save lines when debugging by doing:
>
> echo '' . print_r( $var, TRUE ) . '';

OMG, thanks for that.  Lines are so expensive nowadays and all.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Template system in PHP

2008-02-12 Thread Greg Donald
On Feb 12, 2008 3:15 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> Custom tags (XML style ones anyways) provide support for arbitrary
> ordering and omission of optional attributes. They nest nicer than
> function calls, and they have the same general formatting as the HTML
> with which you are working. Additionally, they provide the opportunity
> to punt anything not necessary at run-time to pre-compiled HTML.

Your solution to templating is XML?


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Template system in PHP

2008-02-12 Thread Greg Donald
On Feb 12, 2008 1:58 PM, Nathan Rixham <[EMAIL PROTECTED]> wrote:
> I still don't understand why general net users don't just like to see
> print_r output; it's got all the info they could want, ordered and
> structured *shrugs*
>
> vote: text/plain

I agree.  I usually add a little function like this to my PHP projects:

function debug( $var )
{
  echo '';
  print_r( $var );
  echo '';
}


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Template system in PHP

2008-02-12 Thread Greg Donald
On Feb 12, 2008 2:57 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> I prefer content formatting encapsulation as provided by custom tags.

Decorators?


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Template system in PHP

2008-02-12 Thread Greg Donald
On 2/12/08, Xavier de Lapeyre <[EMAIL PROTECTED]> wrote:
> Do any of you guys & gurls know of a way to implement that template
> system.

eval() is my favorite templating engine.

http://php.net/eval


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Source code protection

2008-02-11 Thread Greg Donald
On 2/7/08, Daniel Brown <[EMAIL PROTECTED]> wrote:
> Because who's to say you're selling to one client?  If it's your
> Intellectual Property, wouldn't you want to protect it, at least as
> much as possible?

No, I think protecting software in any way is a waste if resources,
especially software you plan to sell to someone.  Prohibiting the
buyer from making changes to software they purchased has zero gains
for anyone involved.

If I did want to protect some software I wrote, and I was willing to
pay money to do so, I would want to use something much more capable
than the Zend Encoder.  In principle I'd at least want something that
costs less than it's equivalent decoder.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Source code protection

2008-02-07 Thread Greg Donald
On 2/7/08, Daniel Brown <[EMAIL PROTECTED]> wrote:
> Actually, Greg, I respectfully disagree.  First, just because
> there may be ways to reverse-engineer things doesn't mean it's a bad
> idea to attempt to protect your code against such.

Why would you encode to start with?  The only reason I can think of is
because you don't trust your client.  So why are you doing business
with people you don't trust?

> I know that people
> can smash in the windows of my Durango and steal my equipment, but I
> still lock it when I park it and go into the store.  Why?  Because I
> don't want to make things easy enough for someone to be tempted to
> take something.  I know that if they want something badly enough,
> they'll take it but I'm just not going to make it that easy.

That's my whole point.  Honest people aren't gonna steal your code
anyway.  Trying to prevent them from making a simple change when
you're not around is pointless.

Would you have bought that Durango if the hood had been welded shut?
I'm guessing you're not a mechanic, so you'll _never_ need to raise
the hood, right?  What about when you come out of the grocery store
and there's a hot blonde who needs a jump because she forgot and left
her lights on before she went in?

> And if Zend considered it "pointless", they probably would no
> longer attempt to further develop - nor put their name on the line to

Oh please, Zend isn't the first company to ever create useless
software.  Creation, in no way, proves usefulness.

> sell - the product line.  By definition, pointless means

I know where dictionary.com is, thanks  :)

> It also keeps script kiddies from typing "decode php" into Google
> and being able to pull one over.

I fail to see how Zend adding "decode" into their list of Google
Adwords keeps script kiddies from doing anything.  I used the Google
Adwords example as confirmation Zend is well aware of existing
decoders.

> While industry standards may not be
> the lock that cannot be picked, proprietary obfuscation will keep
> people who don't know what they're doing out of your code --- and if

If you're paid to write code then write code, and then when you're
done give them the code and collect your money.  They paid for the
code so why do you think you still own rights to it?

> they possess the acumen and free time to be able to reverse-engineer
> the code themselves, I honestly don't know why they'd pay someone to
> develop the application in PHP for them in the first place.

I honestly don't know where you find clients so dumb that they who
would put up with not getting full source code for a paid project.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Recommended ORM for PHP

2008-02-07 Thread Greg Donald
On 2/6/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> ruby on rails as one of these obfusticators of fowlers original pattern;

I don't see how code generation could ever be worse (slower) than
runtime analysis.  Sure you have to hit the database once to know what
the fields are, but after that your overhead drops to only include
whatever generated code you made from your fields knowledge.

The Rails ActiveRecord implementation _does it all_ I can tell you.
I'm using (and reversing parts of it where required) to build out a
generic database admin tool.  Have a look:

http://railsdb.org/

At this point I've successfully hooked it up to Oracle, MySQL,
PostgreSQL, and SQLite.

> greg, thoughts ?

I like pie.

Martin Fowler +1, if you're a software developer and don't own any
books by him, you should.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP program to download sites

2008-02-07 Thread Greg Donald
On 2/6/08, Leonard Burton <[EMAIL PROTECTED]> wrote:
> Is there an OS program that will take a url and crawl/cache all the links on 
> it?

`wget -m -np http://example.com` will mirror the url and anything under it.

That's '-m' for mirror, and '-np' for no parent.. so you don't
download the whole internet.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Source code protection

2008-02-07 Thread Greg Donald
On 2/7/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> > http://www.phprecovery.com/
>
> Pointless? I think it is exactly the answer to the original persons
> question.

Yup, it's the exact correct answer, to a pointless question.

Even Zend knows it's pointless to encode PHP.  When you type "decode
php" into Google you see ads for the Zend Encoder.  Does that tell you
anything?

Encoding PHP, or licensing it, or compiling it to an extension, or any
other silly obfuscation ideas you come up with, in the end, only keeps
an honest person honest.  If someone wants to reverse code that you
have put in their possession, they will find a way.

Deductive reasoning leads to two possible options:

1) Don't give the code to anyone.
2) Give the code to the client and accept the fact that it may get pirated.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] shopping carts

2008-02-06 Thread Greg Donald
On 2/6/08, nihilism machine <[EMAIL PROTECTED]> wrote:
> that does not help, none specify whether they have a custom fields
> option or not.

"Wah..  why won't anyone do my research for me?"


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Source code protection

2008-02-06 Thread Greg Donald
On 2/6/08, Greg Donald <[EMAIL PROTECTED]> wrote:
> On 2/6/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> > There's the Zend Encoder at www.zend.com. Though it may be called
> > something else now.
>
> Pointless.
>
> http://www.phprecovery.com/

http://www.zendecode.com/

I'm sure there are others.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Source code protection

2008-02-06 Thread Greg Donald
On 2/6/08, Richard Heyes <[EMAIL PROTECTED]> wrote:
> There's the Zend Encoder at www.zend.com. Though it may be called
> something else now.

Pointless.

http://www.phprecovery.com/


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Recommended ORM for PHP

2008-02-06 Thread Greg Donald
On 2/6/08, Edward Kay <[EMAIL PROTECTED]> wrote:
> It uses code generation to create your ORM for you direct from the DB
> tables. As it's code generation as opposed to run time analysis (which is
> what ActiveRecord and the like use), there is no performance hit - it

ActiveRecord caches the fields query in production.  A one-time query
to discover the field types is not a performance hit.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: New search related question

2008-02-04 Thread Greg Donald
On 2/4/08, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
> I agree that htdig may be a better solution, however his current
> solution requires upkeep if the static HTML is changed and requires that
> the person populating the database pick all relevant words from the page
> and if new ones are added to update the db.

Oh the horror of setting up cron jobs and stopwords.

> Unless, by FULLTEXT, you're implying that the full text of each page
> should be in the db, then I would argue that there is negligible diff
> between that and the grep.

Here, let me connect the logic for you.

Q. If grep was the best search tool then why did slocate get invented?
A.  Indexes.

A MySQL index doesn't go away in between requests.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] New search related question

2008-02-04 Thread Greg Donald
On 2/4/08, Jason Pruim <[EMAIL PROTECTED]> wrote:
> Is there anything wrong with the way I'm thinking? Or is it that there
> is a better way to search through a static HTML site?

http://www.htdig.org/


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Calling All Opinionated ******** ....

2008-02-01 Thread Greg Donald
On 2/1/08, Jochem Maas <[EMAIL PROTECTED]> wrote:
> I'm in the market for a new framework/toolkit/whatever-you-want-to-call-it.
> I've been taking a good hard look at the Zend Framework - if nothing else the 
> docs
> are very impressive.
>
> I'd like to hear from people who have or are using ZF with regard to their
> experiences, dislikes, likes, problems, new found fame and fortune, etc ... 
> but
> only if it concerns ZF.
>
> I don't need to hear stuff like 'use XYZ it's great' - finding php 
> frameworks/CMS/etc
> is easy ... figuring out which are best of breed is another matter, if only 
> because
> it involves reading zillions of lines of code and documentation. besides I 
> find that
> you only ever get bitten in the ass by short-comings and bugs when your 80% 
> into the
> project that needs to be online yesterday and you knee deep in a nightmare 
> requirements
> change or tackling some PITA performance issue.
>
> so people, roll out your ZF love stories and nightmares - spare no details - 
> share the
> knowledge. or something :-)

Hilarious.  "I'm in the market for a new framework, but please only
tell me about ZF because I don't want to spend my own time researching
stuff for myself."  Since when is learning something new a crime?  Why
are you even a programmer?

ZF works fine if you don't mind all the bloated OO PHP.  Use it or don't.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PEAR website and MSIE 6

2008-02-01 Thread Greg Donald
On Jan 31, 2008 7:04 AM, Eric Butera <[EMAIL PROTECTED]> wrote:
> IE8 passes Acid2. :)

They make a salve for that I heard.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] array iteration vs. ArrayIterator

2008-02-01 Thread Greg Donald
On Jan 31, 2008 10:09 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> http://nathan.moxune.com/arrayVsArrayIteratorReport.php
>
> at this point i must retract some of the statements i made during the
> conversation about ruby yesterday.  it turns out, spl iteration is not
> twice as fast as standard array iteration, in fact it quite a bit slower!
> also, it takes up more memory, and lastly, whoever said that using the
> array-by-reference syntax saves memory is dead wrong ;)


Thanks for the benchmark.

Makes me feel better having previously dismissed SPL for "wordy,
java-like syntax" only.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pass Variable Names to a Function

2008-02-01 Thread Greg Donald
On Feb 1, 2008 10:49 AM, Bill Guion <[EMAIL PROTECTED]> wrote:
> I would like to use a function to check to see if a session variable
> is set and return the session variable if it is set, and return blank
> if not. Something like
>
> function set_var($var)
>{
>echo "var = $var \n";

echo "\$var = $var\n";  //  :)

>if (isset($_SESSION['$var']))

$_SESSION[$var]

>  {
>  return $_SESSION['$var'];

$_SESSION[$var]

>  }
>else
>  {
>  return "";

return '';

>  }
>}
>
> And I would call the function with set_var($name) or set_var($phone).
> The problem is getting the function to use $var as a variable name,
> rather than a value. What am I missing, please?

"" means interpolate the contents.

'' means use the literal content.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-31 Thread Greg Donald
On Jan 30, 2008 7:21 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> Greg's my hero of the day - even if he has been banging the Ruby drum on
> the PHP Stage half the night ;-)

PHP is a great language.  I don't plan to stop using it anytime soon.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On 1/30/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> up arrow works just fine.  history is gone if it crashes, but
>  if you exit gracefully, eg. with quit, then the history will be there.
> maybe youre using debian or some other silly os; i run gentoo

Gentoo is a damn fun distro I must admit.. but using it for anything
besides a development server seems very risky to me.  You've got the
Gentoo creat0r running off to lick salt with the M$ weiners up in WA
right when Gentoo was peaking in popularity.  In less than a year he
realizes his mistake and comes back crying wanting to control stuff
again as if he had never left.  Then just recently the Gentoo
leadership forgot to renew the non-profit tax status paperwork!?!?
With all that spare time waiting for things to compile I figured they
wouldn't have forgotten about such an important task.  Do they not
having meetings or whatever?

And where's my 2007.1 release?  At the start we were getting a new
Gentoo release four times a year.  Then it went to two, then last year
was just one.  Contrary to what you may think, `emerge -uND` is not an
upgrade path, at least not for a serious server deployment.  The
bottom line is emerge breaks things, and the older the Gentoo install,
the more likely the breakage will occur.

Why do I even have to deal with etc-update?  Who has time for all that
silliness?  Obviously you and not me, but that's life.  Sooner or
later you too will get tired of cleaning up behind emerge.  Took me
like two years I guess.  I like my Linux stable, and Gentoo is not
stable, especially not right now.

> and there is no prob w/ php -a.  although i wont lie; it seems to
> be jacked on all the debian systems ive tried :(

I compiled my PHP from source so the jacking may be of my own doing, I
don't know.  See anything in my config that might prevent it from
working?

/configure --prefix=/usr/local/php5
--with-config-file-path=/usr/local/php5/lib
--with-apxs2=/usr/local/apache2/bin/apxs --with-gettext --with-gd
--with-jpeg-dir --with-png-dir --with-freetype-dir --with-xpm-dir
--with-mcrypt --with-mhash --with-curl --enable-mbstring --with-zlib
--enable-ftp --enable-sockets --enable-bcmath --with-bz2 --enable-zip
--with-mysql --without-iconv
--with-oci8=instantclient,/opt/oracle/instantclient_10_2
--with-pdo-oci=instantclient,/opt/oracle/instantclient_10_2,10.2
--with-pdo-mysql --with-pdo-pgsql --with-pgsql --with-ldap
--with-openssl --with-ldap-sasl

> you can host the php docs on a local webserver if you like, or download
> them; there is even a chm version:
>
> http://us2.php.net/docs-echm.php

Right, but it's not integrated like gems are.  When you install a gem
the docs are created by rdoc for you on the fly using the gem's Ruby
code itself.  As a result you can't not get current api docs when you
install a gem.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On 1/30/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> what id like to know, since you seem to know so much about the ruby on
> rails framework,
> is, what sort of debugging support is there?  this is a weak spot in
> php to be sure.  ive
> tried multiple clients w/ xdebug w/ marginal success at this point.

Rails has support for ruby-debug built-in.

`gem install ruby-debug` to install it.

You would then add 'debugger' or 'breakpoint' into the code in
question.  When execution hits that point your (development) server
drops into an IRB session where you would find your entire Rails
environment at your fingertips.  You can interrogate the get/post data
or perform a database query.  Whatever you can do in code you can do
in irb in real-time, zero limitations.

Ruby's IRB itself is a lot of fun even when not debugging:

> irb
>> 'ruby' > 'php'
=> true

It's like having a shell built directly into the language.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On 1/30/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> php has an interactive shell; php -a.
> therein you have access to anything in the language your
> include path, or the local disc.

You obviously have a very different understanding of the word "interactive".

`php -a` seems pretty broken to me:

> php -a
Interactive mode enabled

sprintf( '%f^[[3~^[[3~

My backspace doesn't work.  Ctrl-C to start over.  I'm guessing I
would lose any local variables at this point?

> php -a
Interactive mode enabled

echo 'foo';

So where's the output?


> php -a
Interactive mode enabled

^[[A

Aww..  no up-arrow history either?

`php -a` doesn't work very well from where I sit.


IRB actually works:

> irb
>> [].class
=> Array
>> [].methods.sort
=> ["&", "*", "+", "-", "<<", "<=>", "==", "===", "=~", "[]", "[]=",
"__id__", "__send__", "all?", "any?", "assoc", "at", "class", "clear",
"clone", "collect", "collect!", "compact", "compact!", "concat",
"delete", "delete_at", "delete_if", "detect", "display", "dup",
"each", "each_index", "each_with_index", "empty?", "entries", "eql?",
"equal?", "extend", "fetch", "fill", "find", "find_all", "first",
"flatten", "flatten!", "freeze", "frozen?", "gem", "grep", "hash",
"id", "include?", "index", "indexes", "indices", "inject", "insert",
"inspect", "instance_eval", "instance_of?",
"instance_variable_defined?", "instance_variable_get",
"instance_variable_set", "instance_variables", "is_a?", "join",
"kind_of?", "last", "length", "map", "map!", "max", "member?",
"method", "methods", "min", "nil?", "nitems", "object_id", "pack",
"partition", "po", "poc", "pop", "pretty_inspect", "pretty_print",
"pretty_print_cycle", "pretty_print_inspect",
"pretty_print_instance_variables", "private_methods",
"protected_methods", "public_methods", "push", "rassoc", "reject",
"reject!", "replace", "require", "respond_to?", "reverse", "reverse!",
"reverse_each", "ri", "rindex", "select", "send", "shift",
"singleton_methods", "size", "slice", "slice!", "sort", "sort!",
"sort_by", "taint", "tainted?", "to_a", "to_ary", "to_s", "transpose",
"type", "uniq", "uniq!", "unshift", "untaint", "values_at", "zip",
"|"]


And since you can't see it I will also mention that IRB has beautiful
syntax highlighting.


> however, ive never heard of an extension whereby the debugger
> drops you into a 'php -a' session.
>
> and btw.  php does have pecl and pear, these are both modular

Every time I ever went to the PEAR site I played a game of 'how many
times do I have to click before I dig down deep enough to realize the
docs aren't really there'.

Meanwhile every gem you install with Ruby has an rdoc package with
complete api docs for the gem.  You just fire up your local `gem
server` and browse to http://localhost:8808/ to view complete api
docs, offline or on.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On 1/30/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> On Jan 30, 2008 2:55 PM, Greg Donald <[EMAIL PROTECTED]> wrote:
> > If you only need to test data integrity then it seems good enough.  I
> > would argue that being able to test xhr requests is a basic
> > requirement at this stage in web development.
>
> how exactly do you test an xhr request?
> my suspicion is that you would just set data in superglobal
> arrays, eg.
> $_POST['somevar'] = ' blah';
>
> i dont really see what the difference between an xhr request
> and a non-xhr request is in the context of a unit test.
> its still http..

A unit test, in it's most general sense, has nothing to do with http
specifically, it's just model/data validation for small units of code.
 It's answers the question "Does my model read and write records to
and from the database correctly?".  It won't catch integration errors,
performance problems, or other system-wide issues not local to the
unit being tested.

An xhr request needs to be tested to see if your javascript fired when
expected and equally important what was sent back, and did what was
sent back land in the DOM where you expected it to.  Rails provides
that and much more.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On 1/30/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> On Jan 30, 2008 2:38 PM, Greg Donald <[EMAIL PROTECTED]> wrote:
> > If you like Java then stick with PHP as that's where the syntax is
> > clearly headed:
> >
> > http://www.php.net/~helly/php/ext/spl/
>
> ive been studying spl a lot recently.  actually, last night
> i was benching it against foreach over standard arrays.
> the results were staggering, spl is roughly twice as fast.
> and if you iterate over the same structure more than once,
> say ArrayIterator, vs. multiple times iterating over a regular
> array w/ the foreach or while construct, the savings only
> compound!
> when you said earlier that people arent interested in learning
> php, this is something i immediately thought of.  primarily
> because spl debuted in php 5.0 and practically nobody is
> using it (which could just be my skewed perception) when it
> is extremely powerful.

I think your perception is correct.  But Perl is very powerful too,
and not so many people use it for new web development either.. with
list serve traffic being my reference.

SPL's main drawback for me personally is carpal tunnel syndrome, I
don't have it and I don't care to acquire it.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On Jan 30, 2008 1:36 PM, Eric Butera <[EMAIL PROTECTED]> wrote:
> Thanks for your post.  Competition is a good thing.

I agree.  PHP is the reason we're not all still working out of a cgi-bin.

> Have you looked at the PHPUnit code coverage reports?  Of course it
> isn't built in like you say, which sounds pretty nice.
> http://sebastian-bergmann.de/archives/578-Code-Coverage-Reports-with-PHPUnit-3.html

If you only need to test data integrity then it seems good enough.  I
would argue that being able to test xhr requests is a basic
requirement at this stage in web development.

> What is the advantage of having integrated subversion/git?  Using
> stand-alone svn I can manage any files I want within projects using an
> IDE or command line.  Sometimes I don't want to commit directories or
> new features yet and I can pick and choose my way.

One command `cap deploy` to deploy all your code to multiple load
balanced web servers, recipe style.  Supports SSH, Subversion, web
server clustering, etc.  And the best thing about Capistrano is that
it isn't Rails specific, you can use it for any sort of code rollout.
The recipes are written in Ruby not some silly contrivance like XML.


--
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On Jan 30, 2008 12:40 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> java is awesome, it just hasnt worked out for me career wise.

If you like Java then stick with PHP as that's where the syntax is
clearly headed:

http://www.php.net/~helly/php/ext/spl/


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On Jan 30, 2008 12:40 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> just pointing out that the rails guys dont have much wiggle room.
> surely, youre familiar w/ this post:
> http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html

One article from one developer means what exaclty?  Perhaps he wasn't
writing enough lines of code per day to be stay happy using Rails?

> > Propel still uses XML last I messed with it.  Yaml is a lot better for
> > similar tasks.  The syntax is a lot smaller which makes it a lot
> > faster than XML.
> well lets see, it only reads the xml when the code is generated, which is not
> that often so any slowness of xml is not valid.  and last time i generated 
> code
> in my project it took like under 5 seconds; boy that xml sure was painful =/

Well if all you do is toy projects then XML is fine.


  Bob
  Abooey
  adv
  555-1212
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]


versus the Yaml equivalent:

babooey:
  computer: cpu1
  firstname: Bob
  lastname: Abooey
  cell: 555-1212
  addresses:
- address: [EMAIL PROTECTED]
  password: 
- address: [EMAIL PROTECTED]
  password: 


> Perfect example of an advance in web technology.
> perfect example of something that doesnt make much difference.

The time saved writing Yaml instead of XML makes a huge difference to
me.  Similar savings are to be had when comparing PHP to most anything
except Java.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On Jan 30, 2008 12:15 PM, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> > It's opinionated software and is certainly not for everyone.
>
> ok it's not for everyone, certainly not for me. but what is it from your
> point of view that makes it a 'more interesting advance'?

1) Test driven development is built-in, and not just unit tests, but
functional tests and integration tests too.  In addition there's
several plugins that extend your tests into realms you may not have
thought of.  There's Rcov which will tell you what code you haven't
written test for.  I know, you don't write tests.  It's perfectly
natural to not write tests when your framework doesn't support them
out of the box.

2) Prototype and script.aculo.us are built-in.  Not just included in
the download but fully integrated into the models.

Symphony tried to pull off the same thing with it's framework but it's
fairly messy in my opinion.

update_element_function('foo', array(
  'content'  => "New HTML",
));

Compared to the Rails equivalent:

page.replace_html 'foo', :html => 'New HTML'

The other Javascript helpers like observers for example are similarly
very small.

3) Database migrations that allow for versioned SQL.  I can roll out
new sql or roll back my broken sql with a single command.

rake db:migrate VERISON=42

I can rebuild my entire database from scratch:

rake db:migrate VERISON=0; rake db:migrate

The migrations are Ruby code that are very tight in syntax:

class CreateSessions < ActiveRecord::Migration

  def self.up
create_table :sessions do |t|
  t.string :session_id, :null => false
  t.datetime :updated_at, :null => false
  t.text :data
end
add_index :sessions, :session_id
add_index :sessions, :updated_at
  end

  def self.down
drop_table :sessions
  end

end

4) Capistrano which is fully integrated with Subversion (and soon Git
I heard) allows me to roll out a versioned copy of my application with
a single command:

cap deploy

And then I can also rollback just as easily in case of an error:

cap rollback

5) Ruby on Rails has a built-in plugin architecture for adding vendor
code.  I can add new functionality to my app as easy as

gem install acts_as_taggable

or

gem install pagination

It's a bit like Perl's CPAN if you're familiar.

There are also plugins, engines, and components depending on the level
of integration you want the vendor code to have.

6) Model validations extend into the view.  No re-mapping of variables
like with Smarty or some others I've tried.

7) The REST architecture is built-in to Rails.  No more SOAP, unless
you want it of course.  No one's using it but it's there.



-- 
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On Jan 30, 2008 11:56 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> i love how the ruby crew has 1 framework, whereas php has scads.

Ruby has 7 frameworks that I know of: Nitro, IOWA, Ramaze, Cerise,
Ruby on Rails, Merb and Camping.

http://www.nitroproject.org/
http://enigo.com/projects/iowa/
http://ramaze.net/
http://cerise.rubyforge.org/
http://www.rubyonrails.org/
http://www.merbivore.com/
http://code.whytheluckystiff.net/camping

The most popular PHP frameworks are Rails clones it seems.  Zend's
best effort at a framework is an almost direct copy of the Mojavi
framework.

Further, if the number frameworks a language has is any measure of
that's language's quality or capabilities (clue: it isn't) then why
aren't you a Java guy?  It clearly has _more_ frameworks.

>  php affords the power of choice.
> and last time i checked, php was a lot faster:
>
> http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all

That benchmark doesn't include Ruby 1.9.

> also, if you want to see some code generation, php-style, check out propel

Propel still uses XML last I messed with it.  Yaml is a lot better for
similar tasks.  The syntax is a lot smaller which makes it a lot
faster than XML.  Perfect example of an advance in web technology.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On Jan 30, 2008 11:52 AM, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> oh the Ruby and Rails stuff here it comes again... I really don't see
> why is it a 'more interesting advance in web development technology'...
> and what's more important for me, I really don't like it ;)

It's opinionated software and is certainly not for everyone.


-- 
Greg Donald
http://destiney.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On Jan 30, 2008 10:43 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> > I would assume it's because there are much more interesting advances
> > in web development technology to focus on elsewhere.
>
> such as ?

Ruby 1.9, Ruby on Rails 2, Perl6/Parrot.

Parrot is particularly interesting, especially if your into
meta-languages or language creation in general.

http://destiney.com/blog/play-with-perl6-mac-os-x-leopard


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] first php 5 class

2008-01-30 Thread Greg Donald
On Jan 30, 2008 10:13 AM, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> > I love php patterns, but it seems to sort of be dead for years now.
>
> me too; ya, it is sort of dead, sad, but its still worth a look to people
> getting
> there feet wet w/ patterns, and occasionally as a point of reference for
> patterns implemented in php.

If list traffic is any sign, PHP is indeed slowing down from the "new
peeps wanting to learn it" perspective:

http://marc.info/?l=php-general&w=2

I would assume it's because there are much more interesting advances
in web development technology to focus on elsewhere.


-- 
Greg Donald
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   3   4   5   6   7   8   9   10   >