Re: Perl commandments
Greg McCarroll [EMAIL PROTECTED] writes: * Piers Cawley ([EMAIL PROTECTED]) wrote: David Cantrell [EMAIL PROTECTED] writes: On Tue, Jan 09, 2001 at 11:25:18AM +, Greg McCarroll wrote: 6.) regular expressions are not the only way to code, length and substr are in the language for a reason Also index. These two snippets are equivalent: if($foo=~/foo/) { ... } if(index($foo, 'foo')!=-1) { ... } I always want to do just plain if(index(...)) though. ISTR that (for weird reasons), the regex version of that is faster. but of course we don't (shouldn't) program perl for program time optimization but for programmer time optimization ;-) So the regex wins on all counts then. Faster, clearer, shorter, easier to maintain. The list goes on. -- Piers
Re: Perl commandments
* Piers Cawley ([EMAIL PROTECTED]) wrote: Greg McCarroll [EMAIL PROTECTED] writes: * Piers Cawley ([EMAIL PROTECTED]) wrote: David Cantrell [EMAIL PROTECTED] writes: On Tue, Jan 09, 2001 at 11:25:18AM +, Greg McCarroll wrote: 6.) regular expressions are not the only way to code, length and substr are in the language for a reason Also index. These two snippets are equivalent: if($foo=~/foo/) { ... } if(index($foo, 'foo')!=-1) { ... } I always want to do just plain if(index(...)) though. ISTR that (for weird reasons), the regex version of that is faster. but of course we don't (shouldn't) program perl for program time optimization but for programmer time optimization ;-) So the regex wins on all counts then. Faster, clearer, shorter, easier to maintain. The list goes on. nope daves was a bad example -- Greg McCarroll http://www.mccarroll.uklinux.net
Re: Perl commandments
Greg McCarroll sent the following bits through the ether: in my original rule it was all to do with good programming style, not eeking out every bit of performance, my reply was actually that i thought dave choose a very grey area in terms of programming style Indeed. And someone mentioned another bit of code being faster, *without benchmarking it*. Leon -- Leon Brocard.http://www.astray.com/ yapc::Europehttp://yapc.org/Europe/ ... All new improved Brocard, now with Template Toolkit!
RE: Much Coolness XML Wise.
How does the output compare to XML::Simple::XMLout() ? I found XML::Simple::XMLout() to be deeply yucky, as it kind of randomly chooses to go for sub elements or attributes based on phases of the moon*. Also, it will happily output invalid XML if you have invalid data in your datastructure. Also it dies if given recursive structures. And it doesn't do binary data. I've found XML::Writer to be OK, although it doesn't do an 'export this data structure as XML' thing. You could use it write your own though. Or use XML::Dumper, I guess. *Something like all single nested items are made into attributes, or, if you prefer, nothing is made into attributes. Ick.
Re: Perl commandments
Leon Brocard [EMAIL PROTECTED] writes: Greg McCarroll sent the following bits through the ether: in my original rule it was all to do with good programming style, not eeking out every bit of performance, my reply was actually that i thought dave choose a very grey area in terms of programming style Indeed. And someone mentioned another bit of code being faster, *without benchmarking it*. This time. The discussion has been back and forth on various lists, usually with benchmarks. -- Piers
Re: Perl 6
Nathan Torkington [EMAIL PROTECTED] writes: David Cantrell writes: From what I can tell, there ain't a lot happening. As Piers said, we are blocked on Larry. We're working on some interpreter design now, but some language issues really need to be nailed down before we know what we're going to be writing. Any idea how long we're going to stay blocked? -- Piers
Re: Perl commandments
Piers Cawley sent the following bits through the ether: This time. The discussion has been back and forth on various lists, usually with benchmarks. Thou shalt optimise for programmer time unless absolutely necessary, when thou shalt Benchmark and quoth both the benchmark and the results. Leon -- Leon Brocard.http://www.astray.com/ yapc::Europehttp://yapc.org/Europe/ ... All new improved Brocard, now with Template Toolkit!
Re: Perl 6
On Jan 9, 8:24am, Nathan Torkington wrote: As Piers said, we are blocked on Larry. We're working on some interpreter design now, but some language issues really need to be nailed down before we know what we're going to be writing. Are there any plans to keep the RFC process going in the future? It occurs to me that people are always coming up with half-assed ideas about the next greatest thing that should go in Perl and an RFC process would allow them to air them for peer review. It might also draw the all-talk-and-no-trousers crowd away from the serious perl6 development process. It would give us, er, I mean *them* somewhere to rant without bothering too many people doing the real work on crafting Perl 6. A -- Andy Wardley [EMAIL PROTECTED] Signature regenerating. Please remain seated. [EMAIL PROTECTED] For a good time: http://www.kfs.org/~abw/
Re: Hiring
Anyone got Richard Clamp's mobile no? He's due here now... -- Dave Hodgkinson, http://www.hodgkinson.org Editor-in-chief, The Highway Star http://www.deep-purple.com Apache, mod_perl, MySQL, Sybase hired gun for, well, hire -
Re: Perl 6
Piers Cawley writes: As Piers said, we are blocked on Larry. We're working on some interpreter design now, but some language issues really need to be nailed down before we know what we're going to be writing. Any idea how long we're going to stay blocked? None whatsoever. Many phone conversations with Larry have lead me to conclude that he'll complete it in his own time or not at all. The trick is deciding which it is :-) Nat
Re: Hiring
David Hodgkinson wrote: Anyone got Richard Clamp's mobile no? He's due here now... 07720 298487 I think
Re: Hiring
David Hodgkinson [EMAIL PROTECTED] writes: Simon Wistow [EMAIL PROTECTED] writes: I think Ta, How did he do then? :- -- 1024/D9C69DF9 steve mynott [EMAIL PROTECTED] microsoft: where do you want to go today? linux: where do you want to go tomorrow? bsd: are you guys coming or what?
Re: Perl 6
* Nathan Torkington ([EMAIL PROTECTED]) wrote: We're going to use RFCs for future additions to Perl, we just need to find some good filters that will prevent them from consuming everyone's time. how about adding a field on the RFC template such as, ``forum initially discussed in'' - then encourage people that before they submit an RFC they should of had it discussed in an open forum such as P5P, #perl or even their local (or favourite) Perl monger list. this has the ( devious ) side effect of gently spamming some people about issues for Perl 6 hence getting more pairs of eyeballs on the development and design of the beastie Greg -- Greg McCarroll http://www.mccarroll.uklinux.net