Slashdot Mirror


User: mccormick

mccormick's activity in the archive.

Stories
0
Comments
54
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 54

  1. A Criticism Of PHP5's Namespaces (plz read! :) on Professional PHP4 · · Score: 2, Interesting
    Actual, the current work to implement a cross between multiple inheirtance and Java-style interfaces is in the form of delegates, but I'm not going to talk about that here.

    I lurk on the php-dev mailing list, and one thing that I'm worried about with respect to the direction PHP5 is taking is the support for namespaces. The latest preview alphas of PHP 4.3.0 with Zend Engine 2.0 (as opposed to ZE 1.0, which powers the latest stable version, PHP 4.2.3) has demonstrated some of the above features in action (but they are, of course, still in-development.) The current 'implementation' (and I'm using that word loosely) of namespaces/packaging is something called 'nested classes', and let me assure everyone of the following: Zend Engine 2.0's "nested class" feature do nothing for implementing useful namespacing! Nothing!. They don't even work for logical things you would think they would. With nested classes, only the parent class can extend any other, and the nested ones absolutely cannot! Example:
    class Parent { /* think of this as a 'namespace' level, which you'll see is still useless */
    class Nested extends OtherClass {
    // ..
    }
    }
    Even the latest from-CVS snapshots (cvs co php4-ze2) crock with a very specific error message: "Nested classes cannot inheirit." So how exactly do these help in namespacing? They don't.

    Even the following like seem like a logical ability for nested classes, but ZE2.0 just doesn't support it:

    class SqlDatabase {
    /* consider this to be some kind of generic database access class, extended once per RDBMS; see below */

    class Connection {
    /* handles connection management; implementation omitted (it's just an demonstration of something useful for nested classes that PHP doesn't support at the moment) */
    }

    class Error {
    /* imagine the new try..catch exception capabilities throwing this kind of exception, that is, Database::Error; ideally it would contain detailed error information and easy ways to programmatically understand what it means (if it is just a warning, a fatal error, connection error, etc.) */
    }

    class ResultSet {
    /* holds the results of queries */
    }

    /* ... and et cetera.. more as applicable */
    }

    /* let's consider a hypothetical RDBMS implementation -- just names for now */
    class MySqlDatabase extends SqlDatabase
    {
    class Connection { .. }
    class Error { .. }
    class ResultSet { .. }
    }
    So, hopefully the above looks like a start, and, of course, this would provide the necessary generic interface so that other RDBMS could be implemented according to the same mechanisms. However, the above doesn't even begin to work as expected in PHP with Zend Engine 2.0.. In the MySqlDatabase class, we might see a nested class like 'Connection' and think it would relate to the parents' subclass by the same name. So, using condensed symbolisms, like this:

    * P is parent
    * P defines 'n' as a nested class (P.n)
    * C is child of P (in PHP, 'class C extends P ..')
    * C defines 'n' as nested class (C.n)

    I would propose that it would make sense that 'C.n' implicity extended 'P.n'. That could be useful, for example, in the above database example: a single root class, SqlDatabase, could provide a variety of interfaces that are grouped together and not disjoint. So not just a bunch of related classes like MySqlError and MySqlConnection but a single MySqlDatabase class (with nested classes) that implicitly in the language relate the nesteds' amongst themselves.

    But nested classes are not namespaces. PHP needs a syntax like that of Java mixed with Python, and, being a scripting language, PHP should allow namespaces to be first class language objects that can be manipulated, and they should have clearly defined scoping rules. Example:
    package php.example;
    /* semicolon could mean all the follows is in this package; scoping rules would need careful definition */

    class Test {
    /* the explicit full reference to this class would be 'php.example.Test', but any other classes within this package scope could just call it 'Test' */
    }

    package php.example2 {
    /* using the brace notation would only include what's within the braces, and if we're in a broad semicoloned one like above, this section would be treated separately, but anything afterwards, until either the end of another single-statement 'package' directive would be implicitly in 'php.Example' */

    class Test {
    /* no name collisions with the above because this is 'php.example2.Test' and it is 'php.example.Test' */
    }

    class Test2 extends php.example.Test {
    /* this stuff could be really useful to PEAR */
    }
    }

    package php.example3 {
    import Test from php.example;
    /* now class definition or code can make reference to 'Test' from the php.example namespace */

    class Test2 extends Test {
    /* no name collisions between this 'Test2' and that of 'php.example.Test2', yet 'Test' seems like its local thanks to the import above */
    }
    }
    I admit that the scoping rules could be tightened. For example, after a broad 'package x;' statement, what if you wanted to define the contents of a subpackage using the 'package y { }' syntax but wanted the 'y' namespace to be under 'x' (so that anything defined in y would be prefixed globally by 'x.y.')? Edge cases like that would need careful consideration, and the only thing I can think of at the moment is a separate 'subpackage' keyword that would work in conjunction with 'package x.y.z;' definitions to consider 'subpackage w' to be really referring to a 'package x.y.z.w' definition.

    I just want PHP to be even greater because I love it. I am working to document some of these ideas and the make the case for some more of these kinds of additions to the language, as well as coding the patches against ZE2.0. If anyone would like to share their ideas with me or help me work on this, please feel free to email me at pete (at) petrasync (dot) com (and sorry for some of the misformatted code blocks -- they are a tad difficult to get right.)
  2. Re:IDE Raid, inexpensive but major hassle on IDE RAID Examined · · Score: 1, Insightful

    Actually, the large 8MB cache, 7200rpm, 100GB+ drives from Western Digital and IBM, as well as others, are still cheaper than equivilent SCSI. Besides, while the warranties may not be as long, SCSI and IDE drives are usually just about identical with the except of the disk controller, which is where the distinction between IDE and SCSI is created. Funny, I've personally enjoyed my ATA/66 RAID-1 array for about the same amount of time. Enjoyed it most thoroughly, in fact. The price tag was really enjoyable as well.

  3. Re:IDE Raid, inexpensive but major hassle on IDE RAID Examined · · Score: 1, Interesting

    That's why it's suggested that your RAID controller has a separate UPS-like power supply so that in the event of a system failure, the controller can still make sure that the drives flush their caches to disk and shutdown properly. However, I'm not currently aware of an IDE RAID solution that does this. And I was suggesting the large cache for performance reasons, not necessarily for reliability.

  4. Re:Experience with 3ware Escalade hardware on IDE RAID Examined · · Score: 0

    I agree. The open nature of the driver is a benefit, and not even for the opensource purists, but because it means that typically, the driver won't be limited to one kernel version (as I found with the binary-old, distribution-specific drivers for the Highpoint HPT366 based chipset.)

  5. Re:IDE Raid, inexpensive but major hassle on IDE RAID Examined · · Score: 5, Informative

    For performance reasons, I haven't seen a single vendor that actually expects you to put two drives on a single interface, and infact, I've found that the 3ware Escalade controllers just won't let you. When they advertise that it can two drives, it usually means it has two dedicated interfaces, therefore have the potential for completely saturated a single port all by itself (which is hard to do with ATA/100 and ATA/133 drives that cannot even burst that high -- get good drives! big caches too!)

  6. Experience with 3ware Escalade hardware on IDE RAID Examined · · Score: 0

    I've had a 3ware Escalade 6200 (ATA/66, two IDE interfaces) running in an RAID-1 (mirroring) for about two years now, and I haven't had a single problem with it running under Debian Linux, kernel 2.4 series. It's nice to have the piece of mind RAID gives you. I also have a somewhat beefier server with a more recent 3ware Escalade 7400 (ATA/100, four interfaces) and again, no problems and great performance. I would definately recommend 3ware, but I have not tried too many others (haven't needed to.) There future offerings of their Escalade line combined with Serial ATA should be interesting to watch once SATA drives become available.

  7. Re:Non-threaded programs on Linux 2.6 Multithreading Advances · · Score: 0

    Nope, they didn't use DOS4GW, but rather the subsystem that comes with DJ Delorie's DJGPP. And IIRC, it didn't come with any kind of threading library.

  8. Link & More on Math Toolkit for Real-Time Programming · · Score: 1, Interesting

    That's it. For those who want the quick link for the Let's Write a Compiler, right here (http://compilers.iecc.com/crenshaw/.) I really hope that Crenshaw might write again about compilers. I agree with the Pascal and 68k part -- they're old, and even some of the approach taken by the tutorial is probably not up to speed with modern practices. But hey, at least it gives a good historical account.

  9. Same Crenshaw? on Math Toolkit for Real-Time Programming · · Score: 0

    Is this Crenshaw the same guy who wrote that compiler tutorial, the mini-epic that lasted a decade? His aim was to guide budding compiler writers in the direction of creating a native Pascal compiler. His style was lucid, informative yet friendly. I think timothy's words, "self-confident" aptly describes it. I'd recommend anyone to the works of Crenshaw and I agree, his knowledge of the subject areas is always superb.

  10. Popular abuse of "science" lead to misconceptions? on New Jersey Officially Limits G-Forces on Coasters · · Score: 1, Insightful

    I find it curious that chrisd is confident in stating that there no evidence linking G-force rollercosters to brain injury (appears to be accurate), but is equally confident in stating that 320 million riders have not experienced any particularly adverse effects, a fact that seems to be complete conjecture, without any of this highly regarded scientific evidence back it up. Who knows, could rollercosters be contributing to the degradation of cognitive capability in the world? Well, the only way to find out for sure would be to conduct research, I suppose.

    A ride of a rollercoster lasts a lot longer than the fraction of a second it takes to flop into a chair. Perhaps duration and variability of the G-forces exerted should be taken into account?

  11. 3ware Experience on Dependable SCSI RAID Controllers for Linux? · · Score: 0
    I've been running with a 3ware Escalade 6200 (ATA/66 -- discontinued now) for little over a year now. I haven't had a single problem. I've been running the series 2.4.x most of that time and even in the early releases it was very stable.

    I recently built a server with an Escalade 7410 (four drives, RAID 10) and I think 3ware made the right decision to go with the 64bit PCI support. It's a pretty sweet setup, and again, great support under Linux (which is what I use.) The 3ware Escalade line comes highly recommended from me, but there are a few things on my wishlist.
    • Upgradable cache memory. Not just 1 or 2MB with the $100 difference between the 7x10 and 7x50 series that is standard.
    • Different Port Configuration. I recently found that in a 4U server case (with a 7410) having 4 drives (stacked horizontally) with the vertically placed IDE connectors on the Escalade board itself a challenge to wire. Those wide parallel ATA cables just got in the way too much. I eventually choose to buy some very convienient rouded IDE cables (from Bigfoot Computing.)
    • ATA/133 Support. I imagine this will come with time, but again, I'm looking forward to improved performance (I wonder, will they be called 8xx0s?)
    I don't deny the very positive influence SCSI has had on the industry (recent experiences with 400Mbit/s IEEE 1394 based networking have been great, and 1394/Firewire/iLink is essentially a serial-based SCSI protocol and physical media) but I definately have reaped the benefeits of ATA/IDE based RAID.
  12. Opera is one alternative [karma is low; plz rate!] on Slashback: Gaping, Wristwear, Screenies · · Score: 5, Interesting

    One quality alternative to Netscape and IE is Opera . It is on the larger side, as it is trying to compete with IE, but it is fast and secure. The gestures are especially useful; they make me feel like I'm a kid again painting with my hands. Opera is also available for a number of platforms, including your favourite forms of free Unix (i.e. Linux) and Windows. Could help to make your workspaces consistent, if you work on multiple platforms.

    Apart from the well known ones, the only other types of alternatives I can think of are the stripped down Gecko systems (Gecko being the HTML renderer built out of the Mozilla project.) They repackage the core technology, without the rest of the stuff would typically gives Mozilla its reputation for being slow, bloated or inefficient. Gecko, by itself, is a very small, fast and efficient core, comparable to the IE renderer. Most of the ones I've seen are for Linux-type systems, though, like Galeon . And don't forget that Gecko, Mozilla, Netscape 4.7 and Netscape 6 are differnet beasts, but all closely related.

    Note! If a moderator would care to help me along in the karma department... I don't know what I did (I don't post often), but every time I post I get can automatic -1. Please see the value of my comments for whatever they are worth! Thank you!

  13. Re:Balderdash, Rubbish, Poppycock! on Linksys Incorporates HomePlug Networking · · Score: 0

    Oh my.. I laughed hard when I read that one. I haven't had a good laugh like that in awhile.

    MOD THE PARENT UP!!

  14. Slashdot's Own Example Of DTD/XML Use on On The CopyLeft Of DTDs · · Score: 2

    If anyone is a bit unsure of what a DTD is, you may be interested to see how Slashdot (and the Slash code in general) use XML and DTDs.

    Slashdot (again, Slash if it's setup to) produces all headlines in a convienient, machine-readable format. It can be found at www.slashdot.org/slashdot.xml .

    At the same time, the DTD for this file (called 'Backslash' and can be found at www.slashdot.org/backslash.dtd) essentially describes to an XML parser what is and what is not allowed in the file. It essential defines what constitutes a "valid" document; it is valid meaning that when compared against the DTD, it conforms to the defintion.

    "Well-formed" is another XML term which means it at least is formatted correctly accordingly to the XML definition (for example, single tag elements end in a backslash.)

    If you're interested in learning about XML and this DTD stuff, as well as all the latest proposals that are meant to replace DTDs (such as XML Schema's), check out the official W3C site at www.w3.org/XML/.

  15. Interesting Similarity on Latest Eazel Screenshots · · Score: 1

    The fact that interests me is that this looks a lot like the Windows98/Internet Explorer view. Now, I'll admit I know almost nothing about this project, but it does seem like a copy of many of the ideas.

    Is having a web browswer (or at least web-like functionality) apart of the operating system or user interface such a bad thing? Is it only bad when evil empires (i.e. Microsoft) do it? But, I'm assuming it's alright when freedom (i.e. open source) does it.

    Is this a double standard? Just wondering.

  16. Misunderstanding on Gnutella VBS Worm · · Score: 2

    I think people are misunderstanding this situation.. Some are saying that if Gnutella were opensourced, a problem like this wouldn't exist (for various reasons.)

    This is incorrect. First of all, Gnutella's network protocol (half of which is based on HTTP) is documented, and a variety of both open and closed source clients exist.

    This trojan doesn't use any kind of a backdoor in Gnutella technology. Rather, it's spread by the users themselves. They download a file (like 'collegesex' or whatever), which is actually a .vbs script, double click it, and then the trojan does it's stuff.

    So, this is no problem with Gnutella. It's just users who don't have a strong enough security background, and who can't decern scripts from other types of files.

    This can happen to anyone, on any OS. Just so happens that Microsoft's are the easiest to use, and generally have the users that would fall for it.

    Hope this clears up some misinformation. Guys/girls, please try not to jump to conclusions about everything (like how open source would have prevented this.)

  17. Don't forget about Compaq and Linux on IBM To Produce Copper Alphas For Compaq · · Score: 1

    Just a quite note.. I remember reading somewhere a quote from one of the Linux leaders (it was David Young in a magazine interview, I believe) that Compaq hardware isn't the best choice when running Linux, because they are very proprietary [sp] with their extensions (it went on to say that's why Dell has been successful; they are always ready to use open-standard hardware.)

    Or am I misinterpreting this, and all it means is that Compaq will make the CPUs and not the boxes (I can't quite tell.)

    Eitherway, Alpha's are cool, and I hope more people relize their potential.

  18. I believe Microsoft pioneered these CDs on New Business Card Rescue CDs · · Score: 1

    Yeah, another interesting note is that I believe the cut-shaped 140mb CDs were the idea of some MSN Canada employee (I met the guy once.) If someone knows otherwise, by all means please let me know.

    Has anyone seen the little IE5 discs? They're pretty cool (regardless of which evil empire company made them.)

  19. Slashdot Needs a Coordinated News Team on Textmode Quake · · Score: 1

    I almost believe that this is becoming a large problem (as not just this particular case, as some have already pointed out.)

    It seems to be happening more and more often, that the Slashdot news posters either post the same thing multiple times, or post something that is very old.

    Not to mention the horrible grammar and typos. I know that these guys are really l33t hackers, and as such, minor details like spelling and coherency really don't apply.

    But honestly. It makes Slashdot seem less professional.

    Oh well; just another day at slashdot :)

  20. Forget to Click 'Preview' :) on Cheap Gigabit Ether · · Score: 1

    hehehe.. I guess he forget to use the 'Preview' feature :)

  21. Another Thought on Cheap Gigabit Ether · · Score: 1

    Hello again,

    I really wouldn't say I have a complete understanding of network cards work, but would the fact that AGP devices can directly write to memory be of help in a network of this speed?

    I'm mainly thinking here about the potentially needed on-board buffers. Or is this not a consideration, and the data is just off loaded over the bus in time for the next packets?

    Just another thought...

  22. Using an AGP for this Network Card on Cheap Gigabit Ether · · Score: 1

    Hello,

    Here is my idea. As someone here pointed out, the PCI bus maxes out somewhere just around 100mb/second of bandwidth (I've somewhere about an extension, PCI-X or something; anyone know anything about this?)

    My idea is why not use the AGP bus for something like this? I know that AGP is a lot faster than PCI. I guess the only problem is that most PCs today with an AGP slot use it for their graphics card (prehaps this is a reason to introduce motherboards with multiple AGP slots :)

    Maybe this is totally unnessecary and the PCI bus is fast enough to provide the 128mb ('b' as in byte) a second speeds of a Gigabit Ethernet.

    Maybe no one would actually need to this one of these networks at that extreme high speed. But what if these types of speed increases continue, I believe it might be plausible.

    Could anyone hear with more knowledge in the hardware aspect of things comment?

  23. A Message to Those Who Don't Believe on GLHeretic v1.0 for Linux Released (with Source) · · Score: 1

    (this is off-topic, but if it isn't made into a new forum, I don't care.)

    When I see what some of you people have to say (again, too scared to actually post under a real name), in a way it really saddens me.

    Many of you find it humorous to question Jesus's sexual orientation and personal habits.

    You refuse to look inside yourself and actual question yourself.

    I envision some people who read this to laugh and say something "This guy is such a dork" or whatever.

    But let me ask you something.. When you die (because we all eventually do), aren't you are all curious and prehaps scared that maybe, just maybe, the God of Israel is going to pass judgement against your soul?

    Again, some may be laughing, but at least I know that my close family and myself have an internal calm surrounding such issues.

    Plus, if you've never experienced what Jesus can do in your life, I advise you not to mock it. For those that have experienced what Jesus can really do to a your life, and to a situation, it's a beautiful thing.

    I don't care what you people have to say, because it's not up to me to judge in any way.

    If at least one of you really reflect on what I've said, then I thank you.

  24. Few Seem to Understand on GLHeretic v1.0 for Linux Released (with Source) · · Score: 0

    This is absolutely disgusting.. First of all, you claim that 'It states quite clearly in the Bible' but then say you don't remember which book it came from.

    Second, you're absolutely wrong. That smut that you posted pretending to be the Word of God is not at all true.

    I don't care how this is rated, or if anyone says "It's free speech!" If someone blantantly misquotes something, and claims that it's directly from the particular source, that's not free speech, that's lying and deception (or I guess FUD as some would call it.)

    It hurts me to see all this Jesus bashing. What I find even more pathetic is that everyone who post this type of stuff posts as an Anonymous Coward. They aren't even willing to stand up for what they post.

    It seems like very few of these people actually know who Jesus of Nazareth was, and what he did.

    And if you, kind sir who posted that, were truely mistaken in your quotation, at least understand what Jesus is about, or that the Bible would never use some flithy language in such a distorted manor.

    On the other hand, what this 'quote' is a spin of when Jesus performed a miracle, and restored the sight of a blind man..

    Only if you would let him do the same for you.

    Amen.

  25. Q's Last Advice to James Bond on Good Bye Q · · Score: 1

    Isn't it a bit ironic? One of the last things that Q (in the last Bond film "The World is Not Enough") said to Bond, was "James, if there is one thing I've tried to teach you, always have a backup plan."

    Too bad he didn't have a rocket-powered ejector seat, or anything like that in his fatal crash.

    Oh well, another legend that no one really gave much thought too until dead.