Slashdot Mirror


User: imroy

imroy's activity in the archive.

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

Comments · 972

  1. Re:PHP on Searching for the Best Scripting Language · · Score: 2, Insightful
    PHP: Free Software's answer to Visual Basic.

    I think you've got a point there. Both PHP and VB are both languages that us elitists can frown upon and opine things like why do people use such garbage when there are better alternatives? Yes, I'll admit I'm an elitist. But I try not to stray into zealot territory. Zealotry is about emotion and irrational cheerleading. I have (what I consider to be) good reasons for my opinions. And I'm trying to express them here in this thread.

    Perhaps the common thread to a lot of these sub-par pieces of software (VB, PHP, MySQL, Windows, etc) is this: Most people appear to be tolerant of software problems if they understand the software (or think they do). Thus the dominance of simple but horid software for the masses. While I'm fiddling about with infrastructure and obsessing over making the perfect framework, some kid is banging out Yet Another PHP/MySQL web site. *sigh*....

  2. Re:PHP on Searching for the Best Scripting Language · · Score: 1

    You obviously didn't read the web page I pointed to.

    PHP 4 has a === operator. It works the same way as ==, except that it additionally requires both sides to have the same type. This sounds initially like the perfect solution -- just use === wherever you would otherwise have used ==. Unfortunately, you lose the convenience of being able to treat numbers and strings interchangeably: it is no longer the case that 3 === "3".

    About modules. So paying more is a solution? Meanwhile in Perl I just use the use statement to pull in any module I want. Even compiled modules (check out PDL, a whole bunch of matrix code written in FORTRAN). And I don't have to be administrator. I can install modules in my home directory, and/or make my own:

    use lib "$ENV{'HOME'}/Perl";
    use MyModule;

    I can't see why you think PHP's all-associative arrays are so great. To me it sounds like another attempt to simplify without thinking of the consequences and instead making the result complex and ambiguous. What happens when you mix up normal indexed array operations (e.g $a[1] = 20) with associative operations (e.g $a['george'] = 5) ? I thought PHP was meant to be a simple language that everyone can dive into and start using. But things like this are not obvious, even to a seasoned (although now unemployed) Perl professional such as myself. Perl seperates lists from hashes. I see no reason why PHP should combine them. All I can imagine is some half-wit thinking Hey! What if all arrays are associative? That'd make everything so much simpler! Um, no mate. It doesn't.

  3. Re:PHP on Searching for the Best Scripting Language · · Score: 2, Interesting

    It's been a number of years since I've programmed heavily in PHP. I had learned Perl first, and it eventually took over. If you do learn Perl I think you'll discover the language that PHP is trying to be. Which isn't surprising, considering that PHP originally started off as a perl CGI script. The problem with PHP is that there doesn't seem to have been a lot of thought put into the design of the language. A prime example is the way that Perl has seperate numrical and string comparitors (==/!= and eq/ne) whereas PHP has only the one (==). This recently came up in the story about the Perl periodic table of elements and I even gave my own answer on this problem. Just to rehash: Perl and PHP are loosely-typed languages so the programmer really needs to tell the interpreter how to compare the mixed numerical/string "scalar" type that both Perl and PHP use. But PHP tries to simplify at the expense of introducing ambiguity.

    There are lots of other problems with PHP as well. Not to dwell on them too much, but this includes things like no namespaces (all variables are global? WTF?), modules have to be compiled into the interpreter (is this right? not even dlls/shared libs?), and using associative arrays all the time (leading to more ambiguity). The thing with compiled-in extensions is a big problem since PHP is so popular on cheap hosted web servers. You're entirely at the mercy of the host admin. I mentioned it in my previous post, and this is a very good web page about PHP's problems. PHP is a mess of a language. It really is.

  4. Re:The neatest thing about this, IMHO... on Atlantis: Discovered at Last? · · Score: 2, Informative


    Ah, yet another person who misunderstands evolution. Evolution says no such thing about "evolving forward into higher life forms", that's just an asumption that a lof of people make.



    Evolution is simply a method to optimize and organism for its environment. For example: down here in Australia we have these little creatures called Koalas. You may have seem photos of them. They eat eucalyptus (sp?) leaves, and nothing else. It happens that these leaves aren't very nutritious and have a lot of toxins that take a long time to break down. Because of this, koalas conserve their energy by spending most of their time sleeping. And their brains are quite tiny.



    Now, are koalas a higher life form? No. But its ancestors did find a plentiful food source that was being eaten by little else. They adapted to eat the leaves and became the animal we have today.

  5. Re:Blame On-Line Storage on You've Got Mail -- Tons Of It · · Score: 2, Informative

    Check out project Cyrus. I haven't used it for large projects, but I notice it does support distributing mailboxes across multiple backend servers (The Murder stuff).

  6. Re:Oh my sweet Jesus... on Periodic Table of the Operators · · Score: 4, Informative

    You're thinking about strongly typed languages e.g C, C++, Java, C#. In those language variables are only ever of one type. When copying from one type to another, or comparing different types, there are strict rules of "promotion" (i.e we always promote to higher-precision types).

    Perl is a weakly typed language. There's three main variable types: scalar, list (array), and hash (associative array). Scalars can be both numerical and text strings at the same time. This is the reason that Perl has different equality tests for numbers and strings. The run-time has to to be explicitly told which comparison to use. For an example of how not to handle this situation, just look at the way PHP does it. When a language is weakly typed, the interpreter/run-time loses information about how certain things are to be done with variables. That information loss must be made up somwhere. In this case, it's the operators.

  7. Re:ESR contradicts himself on More Responses to de Tocqueville Hatchet Job · · Score: 1

    He also says:

    ...unless it has been packaged into a library specifically intended to move,...

    The BSD IP stack was always meant to be a reference implementation, thus the license. So anyone, including MS, can use it with no legal problems. As to the difficulty of misappropriating GPL/BSD/MIT/whatever source code into commercial software, I don't know. Maybe it is a bit of a contradiction. But MS did not actually steal the BSD IP stack.

  8. Re:More about design problems than system ones on Review of the Roku HD1000 Media Player · · Score: 1
    ...he mentions how the thing froze and locked up...if that isn't OS related, what is?

    Lock-ups aren't necessarily OS/kernel related. I know I've had lots of times when the X server has locked up playing around with new hardware. I can still go to another machine, SSH in, and do a proper shutdown+reboot. In this case, maybe it's the X server (unless they use SVGAlib or DirectFB) or the interface software that's crashing or hanging. I know it makes no difference from a user perspective, but it's still unfair to blame the problem on Linux. Perhaps Roku just has a multithreaded interface app with some deadlock issues. Who knows.

  9. Re:MS is ahead of Open Source on encryption on MS SQL Server 2005 Adds Security Features · · Score: 4, Informative
    • Loop-back encryption is kinda clunky. dm-crypt looks to be a cleaner way to do encrypted devices. And pam_mount can mount encrypted home directories on login.
    • As for doing encryption in the filsystem, several people are at working at it.
    • Your notion that OpenSSH only creates a tunnel while the "console" is open, is little more than FUD. Oh no! The console!. That's the whole point. SSH is largely interactive by its very nature.
    • It's quite easy to setup OpenSSL in inetd mode for SSL'd services.
    • Encrypted executables? Are you joking? WTF would that achieve? If someone has physical access to your machine, you're screwed anyway. And if someone has broken into your machine remotely then your executables are probably the last thing to worry about. On Unix/Linux systems you need root access to write to system executables. If an intruder has root access, they can do anything and don't need to modify your executable to screw around. This is a straw-man argument.
    • Linux is very good as a VPN router. Not only do we have IPsec/IPV6 from the KAME project, there's also the (abandoned) FreeS/WAN project and the spin-off Openswan. But don't forget OpenVPN (available for quite a few platforms, not just Unix/Linux). If you're really desperate, you can always combine SSH and PPP to make a VPN.
    • Tokens? You have heard of Kerberos haven't you?
      BTW, here's a good LDAPv3+SASL+KerberosV HowTo

    My god you are a troll. Oh, and as others have pointed out, encryption does not instantly make something secure.

  10. Re:must be for a user, not a provider on 4km WiFi Range w/ $5 DIY Antenna · · Score: 1
    Internet connectivity was very expensive down there, and metered (we had dsl through Telstra).

    What! You mean it's not just us Aussies that have to deal with those bastards? Will the madness never end...

  11. Re:Please dont feed the troll that is Forbes/Lyons on Kill Bill, IBM vs Microsoft · · Score: 1

    He also tried to disclose Pamela Jones' home address, according to this article of hers over at Groklaw (complete with lyons' name highlighted!). Now why would a reporter do that? The only explaination I can come up with is to scare PJ and make her feel uncomfortable. And why would a simple journalist want to do that? Clearly he and/or his masters had a bone to pick.

  12. Re:How it 'works' on Testing didtheyreadit.com's Mail-Tracking Claims · · Score: 1
    Not for linux users: Microsoft Windows firewalls typically allow setting rules separately for separate applications, by associating a process name (and in serious firewalls, the executable's MD5 sum) with the process requesting the connection.

    You almost had me there. How can a firewall know which program is sending the packets?. Of course, you're talking about a software firewall, running on the same machine. Ho hum, us little Linux hippies have something similar ;)

    From the iptables(8) man page:

    owner
    This module attempts to match various characteristics of the packet creator, for locally-generated packets. It is only valid in the OUTPUT chain, and even this some packets (such as ICMP ping responses) may have no owner, and hence never match.

    --uid-owner userid
    Matches if the packet was created by a process with the given effective user id.

    --gid-owner groupid
    Matches if the packet was created by a process with the given effective group id.

    --pid-owner processid
    Matches if the packet was created by a process with the given process id.

    --sid-owner sessionid
    Matches if the packet was created by a process in the given session group.

    Ok, so it doesn't match the process name or md5sum. Still usefull though. I use this module to match packets coming from the Freenet daemon (running as a 'freenet' user) on my server and throttle the up-stream bandwidth with the HTB queue discipline. Very important since recent Freenet builds added bidirectional links (and other things?) which means that now even transient nodes service requests.

  13. Re:How it 'works' on Testing didtheyreadit.com's Mail-Tracking Claims · · Score: 1

    Or you could just arrange to send a Cache-Control: no-cache header. Seriously dude, just read RFC 2616 (HTTP/1.1) and do a search for "no-cache". No need to redirect and waste an HTTP request. And if you don't want the overhead of CGI, just use mod_asis on Apache to send precisely the headers you want.

  14. Re:Gateway Sucks on Worst Explanation From Tech Support? · · Score: 1

    Pay no attention to the trolls. While I do *technically* blame you for what happened (you were the one to actually do it) I don't think you did anything stupid or wrong. I've flashed my BIOS's several times over the years. You have an expectation that the thing will work, right? It's just stupid that Gateway offered BIOS upgrades but then wouldn't support you when you actually used it.

  15. Re:Widescreen idiocy on Worst Explanation From Tech Support? · · Score: 1

    I think you've almost got it there. DVD's though are always 720x576 (PAL) or 720x480 (NTSC), even in widescreen mode (amorphic projection). So it might have been scaling the image to 1440x810 i.e double the original width, and height adjusted to the correct aspect ratio. With a 1600x1024 display that would have given him a border of 80 pixels on each side and 107 on the top and bottom.

  16. Re:File types and fragnentation on Measuring Fragmentation in HFS+ · · Score: 1

    I've also wondered about the NT/2K/XP installer. It appears to be DOS, but I may be wrong. Does anyone know if the installer is DOS or some super-stripped down text-mode NT-based OS? It is suspicious that it first copys files from the CD into a FAT filesystem on the disk. It then reboots and seems to do the actual extraction and installation then. At some stage it has to run a FAT-to-NTFS converter. My father and I can't believe that MS is still using ancient DOS and such a convoluted installation procedure. Linux, and presumebly the BSD's, just have a boot floppy or CD with a stripped-down version of the OS. It simplifies everything because the installation procedure has (well, almost) axactly the same capabilities as the final OS. Which allows it to make use of all manner of CD's, DVD's, the network or even the internet for installation media. Of course it helps that they're also Open Source(tm) and don't have to be paranoid about piracy.

  17. Re:Nothing wrong running everything through index. on Hardened PHP · · Score: 3, Interesting

    To state the obvious, no shit. Of course you're going to have problems with the ficticious URL and system you presented. Somewhat of a straw-man argument there.

    Now here's what I suggest: Don't combine "content" pages/scripts with "action" pages/scripts. What I mean is, have a script that does the adding/deleting/renaming/whatever and then does a 302 Temporary redirect (back) to the page/script that actually displays the data.

    This has the following advantages:

    • The "action" URL doesn't show up in the browser URL bar.
    • It can't be bookmarked by accident.
    • It won't even show up in the browse history and can't be accessed by hitting the "back" button (at least it doesn't on Mozilla, haven't checked other browsers).
    • It makes your URLs and code clearer (code seperation and all).

    As for authentication and protection, well that's a different matter. It doesn't really have much to do with URL's. Use cookies and even SSL to nail things down.

  18. Re:Nothing wrong running everything through index. on Hardened PHP · · Score: 2, Interesting

    Ugh. God I hate seeing sites handled almost entirely out of index.php. Like an iceburg it's the publicly visible part of a very troubled language.

    Try this for an ugly URL:

    http://www.ogre3d.org/modules.php?op=modload&name= Sections&file=index&req=viewarticle&page=1&arttitl e=Features

    Sorry to pick on the Ogre3D project. I've seen similar URL's around (in particlar on sourceforge projects) so it appears to be using one of the popular PHP theming packages. What an ugly abomination. I'm of the (strong) opinion that URLs should make sense and if possible, be memorable. It's a geek thing. I sometimes forget to bookmark pages or for whatever reason can't get an electronic version (email, text file, etc) to myself. I don't know how much URL's matter to non-geek users, but making things clearer would probably help everyone.

    PHP seems to have no mechanism to handle "virtual" URLS (i.e not pointing directly to files), instead relying on the admin to use Apache's mod_rewrite module. Could some PHP coder enlighten me, is this really true? It seems very odd that a language (and runtime) supposedly designed specifically for web pages does not support this important feature.

  19. Re:Hate breaking it to you... on Life-Ruining Browser Hijackers · · Score: 1

    Perhaps you didn't follow this thread. We're talking about this sort of malware now being available as Mozilla XPI's and how they could be whitelisted/blacklisted. I pointed to a web page with a big screen-capture showing the click-n-drool morons to hit the "open" button. My point was that a user-contolled whitelist would be ineffective when the user doesn't understand what they're doing, and are even instructed to do the "wrong" thing by a malicious web page graphic. Quite a few recent email worms haven't had to do anything really clever except ask the recipient to click on an executable attachment or even open a zip file and "open" a file (named "document.txt<lots of spaces>.exe"). So it seems that most people are really quite "stupid" and still don't understand what is wrong with their actions.

  20. Re:Hate breaking it to you... on Life-Ruining Browser Hijackers · · Score: 2, Insightful

    Ok, a whitelist sounds like a good idea. But check this shit out. It's from a recent spam I recieved. Just download this EXE file to stop SPAM and pop-ups! It even has a shot of the IE download dialog box with the "OPEN" button circled, showing morons exactly what to do. How long until we have something similar for Mozilla, with the "Whitelist this site" button circled.

    We either have to kill all stupid people (oh I wish...) or come up with a perfect (or nearly perfect) method to "protect" people stupid enough to run executables from unknown sources. Perhaps one solution is to have realtime blacklists like is used to block SPAM. Implement it in DNS like most of the RBL's so that the information is distributed and cached well. How does that sound?

  21. Re:Are you talking about a different MS? on Microsoft Backs Out Of Wi-Fi Equipment Market · · Score: 1
    The ones who wrote Internet Explorer when Netscape was already on it's third release?

    MS bought Mosaic from Spyglass. Admittedly they've done a fair bit since then, but the early versions of IE were very much Mosaic with a slightly different interface and a few extra features.

  22. Re:Mebibytes (MiB) ? on Linux Kernel 2.6.6 Released · · Score: 1

    Ok, RAM chips are probably a bit of a special case. Since manufacturers want to group them into bytes it makes sense to use the same units. And it's not usually something that the general public come across, so I guess it's ok.

    The "1.44MB" (and the rare "2.88MB") floppies are a real doozy. They were twice the size of 720KB floppies, but "1440KB" was too much of a mouthfull. The result, as you note, is a mixture of the base-2 and base-10 units.

  23. Re:Mebibytes (MiB) ? on Linux Kernel 2.6.6 Released · · Score: 1
    Then they upgraded to digital V.90 boxes and the quality went to hell. Would typically connect at 45333 but the actual downloads were slower then downloads (compressed or not) on the V.34+ modems. The connections themselves seemed to slow down over time...

    Here's a suggestion: perhaps your ISP was simply overloaded. Having all those people downloading web pages and software is a fair bit of bandwidth. Perhaps your ISP (or the people they're connected to) didn't have the bandwidth required. Also, maybe your ISP was "shaping" the connection. This would certainly apply to long downloads like your Slackware ISO download. It started off fast but over time the ISP router(s) gave you lower and lower priority to your connection. ISP's rarely have enough bandwidth to accomodate all their customers downloading at the same time. They have to balance things carefully or people get upset at slow web pages and move to another ISP. So they give higher priority to short fast connections like those required to download web pages and all the little images on them. Long-standing connections are given a lower priority in the packet queue, and maybe even throttled over time.

  24. Re:Mebibytes (MiB) ? on Linux Kernel 2.6.6 Released · · Score: 2, Informative

    Look it's very simple. Bytes are measured in base-2 units, everything else is base-10.

    • network bandwidth at the raw hardware level (i.e., 100 Mbps Ethernet)
      It's bits (small 'b'), so it's 100 x 10^6 bits per second. Which is also 12.5 Million bytes per second, or roughly 11.9MBps.
    • network bandwidth at higher levels (Mozilla reporting 100 KBps)
      It's bytes (capital 'B'), so that's 100 x 2^10 bytes per second.
    • CPU speed (i.e., a 1 GHz Athlon)
      Getting a little silly now. That's 1 x 10^9 Hz (cycles per second).
    • Disk usage, in the modern file browser of your choice (they differ)
      Ah, this is where all the supposed controversy comes from. The hard drive manufacturers want to use base-10 units so that their drives sound larger than they really are. Everywhere else, base-2 units are used for measurements of bytes (including your file browser).

    The only two problems I can see is hard disk manufacturers wanting their drives to sound larger, and marketroids getting the capitalization wrong (bits/Bytes, milli/Mega, ...). None of that is the fault of the units/suffixes, the people who made them, or the people using them. Get over it.

  25. Re:Not just graphics on Third Largest Supercomputer... at Weta Digital · · Score: 1

    That looks like a nifty little gadget. From the photo, it appears to be a laser source in the middle with two cameras above and below to view the "slice" generated by the laser.

    Interesting to see on their products page:

    Distributed by Polhemus as the Polhemus FastSCAN.

    So it looks like perhaps the kiwis are having similar problems with inventions going overseas as we do here in Australia. We have lots of inventors making nifty inventions. But when it comes to making them into products and turning a profit, local companies turn a blind eye and then act surprised when a US/Asian/European company turns it into a product that sells.