Slashdot Mirror


User: dgatwood

dgatwood's activity in the archive.

Stories
0
Comments
14,277
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 14,277

  1. Re:PHP? on Best Introduction To Programming For Bright 11-14-Year-Olds? · · Score: 3, Interesting

    PHP and C are an awful lot alike, minus the notion of strict data types and the clumsy string handling. PHP is pretty darn close to C with dollar signs if you just start the file with <?php and end it with ?> and don't mix it with HTML.... So I would agree that either would be acceptable.

    The way I started learning C was to start with a large code base and tweak it. I studied a piece of code, figured out how it worked, and then started making changes. I started with NUTS 2.3.0, an Internet talker, and used it for chatting with friends while I hacked on the code. By the time college was over, I had reverse-engineered the NUTS 3 NetLink protocol and expanded it, added email capabilities, added games, etc. It was a fun little project, and I'd definitely recommend doing something like that as a way to get young people interested in coding. The best thing about the NUTS 2.3.0 code base is that it is straight C---no OO to make things complicated. By the time you have worked with it for a while, though, you start to see places where data structures are essentially only used with certain functions and vice-versa. Once you reach that point in your understanding, the concept of OO basically sells itself fairly readily. :-)

  2. Re:China on Obama Wants Broadband, Computers Part of Stimulus · · Score: 1

    That depends on whether you are asking a Chinese or a Taiwanese.

    There's a fine line between believing that it is technically part of China and believing that the people there accept that it is part of China and follow China's laws. :-)

  3. Re:Why not start with assembly language? on What Programming Language For Linux Development? · · Score: 1

    Nah. You should start by learning shell scripting. If you can figure out how to write a complex app in a Bourne shell script, you can figure out how to write it in any language.... :-D

  4. Re:Polarization on NFL's First Broadcast In 3-D, Still Has Work To Do · · Score: 1

    Given that the entire remainder of my post after that aside was explaining that you could have a horizontal and vertical component of a single rope, I'm baffled. :-)

  5. Re:Polarization on NFL's First Broadcast In 3-D, Still Has Work To Do · · Score: 1

    *scratches head* I think you must have misunderstood what I said unless the laws of physics changed so that two ropes can exist in the same place at the same time.... My aside was to point out that you have to think of it as a single rope moving in two directions because waves behave decidedly different than two separate ropes in roughly the same physical space would. Unless you could synchronize the timing of the waves in such a way that neither rope would ever have to move past the other rope, they'll hit each other, and you will end up with ropes wrapped around each other....

  6. Re:Polarization on NFL's First Broadcast In 3-D, Still Has Work To Do · · Score: 1

    And the key to fully understanding this is to understand that two of these waves at right angles to each other don't interfere with each other in any significant way (unlike two ropes would).

    To understand this concept, place a red ball in the center of the rope and fasten it in place. View the rope from the end. You can watch the ball move up and down. This shows how the wave as perceived from a single point in space can be seen as effectively a change in position vertically rather than as something moving horizontally. Now view that wave through a vertical slit. You will notice that you still see the red ball moving up and down. Now view it through a horizontal slit. Move the slit rapidly up and down so that the ball remains visible through the slit. Notice that you always see the ball in a single position horizontally. Putt simply, moving the ball vertically does not change its position horizontally, and vice-versa. This demonstrates that motion in one direction does not cause interference when viewed 90 degrees out of phase relative to that motion. As a result, no matter how you shake the rope, at any given moment, the ball's two-dimensional position can be interpreted separately as two separate positions, one in the horizontal direction and one in the vertical direction.

    Because of this, these projection systems project the superimposition of two waves, one horizontal, one vertical. (I assume this is probably done with two projectors.) You then wear glasses with a series of horizontal slits for one eye and vertical slits for the other eye. The waves moving horizontally are perceived as light by one eye, the vertical waves by the other, and you see two distinct pictures that do not interfere with each other. The first time I saw this demonstrated was the Captain Eo movie at Disney World back in the 80s. It is very effective, with the caveat that your eyes are focusing on a flat plane while converging on objects that are outside this plane, so watching it for a long period of time can cause significant physical discomfort, particularly when viewing objects that appear to be significantly closer to you than the physical location of the screen.

  7. Re:Memory exists to be used on Why Use Virtual Memory In Modern Systems? · · Score: 1

    Closing your laptop is an immediate action, so there is no "idle time" for the system to decide to swap out everything. If you leave your laptop sitting for an hour and then close the lid, it will do the exact same thing as clicking "hibernate". To click "hibernate" manually requires a great deal of swaped-out-because-it-was-idle crap to be swapped back in.

    That's really beside the point.

    Even pressing the power button to effect hibernation (by default or by the popup) requires de-swapping. And hibernation copies out the entire contents of ram -- all of it, not just the "dirty pages".

    If hibernation copies out all of the contents of RAM, then the hibernation code is fundamentally broken. No VM system in the world pages out dirty pages to disk, so there's no good reason for the hibernation code to do so, either.

    The windows crash backtrace information is not created until the system crashes. At that point, protected code fills the pagefile with the contents of ram (or the info for the minidump.) On the next startup, the system sees the pagefile contains crash info and copies it. (I know the process far, FAR too well from debugging screwed up windows drivers.) This has nothing to do with what the poster was saying... paging ram to disk does f*** all to protect anything. A crash -- power failure, whatever -- is a crash; your unsaved work is gone. period.

    That's true, but if you don't have a paging file at all, that crash dump info is lost entirely, which was my point. I'm giving the O.P. the benefit of the doubt.

    For that matter, there's no reason an OS couldn't checkpoint/freeze-dry application state in such a way that you could do crash recovery using the previous paging file; they just don't do so currently. I considered writing such code a few years ago. You'd lose networking state, so all your kernel sockets would have to be closed, but it is at least possible. That said, I was contemplating it more from the angle of writing rollback points every few minutes so that if an application crashed, you wouldn't lose data. Still, it is the same idea, faces the same problems, and would use the same basic design. (The biggest problem would be the need to simultaneously checkpoint any apps that share data pages with each other.)

  8. Re:Best use of the Kindle on An Ethical Question Regarding Ebooks · · Score: 1

    This assumes that you as the user know that you are making the content available. This also assumes that the user consciously made a choice to go ahead and seed parts of a particular file while downloading it. Because that decision is made as a general preference and not on a per-file basis, one could argue that if you have a legal right to download the file, you can't reasonably be expected to go in and change this preference (and get near-unusable download performance) merely on the assumption that perhaps some of the other people who might get the file proxied through you do not have the legal right to download the file.

    Further, there's the question of quantity. Fair use generally allows excerpts of copyrighted works to be used for various purposes without the copyright holder's permission. This exception may well apply here.

    Finally, there's the question of usability. If the individual packets you send are not really usable without receiving the whole file (and I think that this is pretty much the case), one could argue that creating a partial copy is not actually making a copy in much the same way that sending out an encrypted copy of a movie to a thousand people but providing the key to only one person is effectively only making a single copy of the movie. Therefore, the person responsible for all of the copies is the person who originally provided it, and nobody else should reasonably be held liable for redistribution unless he/she is the sole person who provides an entire copy to another person (which could be trivially disallowed by the protocol).

    Ultimately, the original person who produced the torrent is responsible for the copies, not the downloaders. To claim otherwise really seems like a stretch to me (at least in a court of reason, if not a court of law). If that's not the way a court decides, it is our responsibility as citizens to push for laws that fix this flaw in the legal system....

  9. Re:Memory exists to be used on Why Use Virtual Memory In Modern Systems? · · Score: 1

    And I beg to differ. It DOES take time to empty out RAM. I have to sit there and wait for it to swap things out to the hard drive. If I already have available RAM, then I know exactly how much and how much I'll need.

    Reread the GP. The post said that it doesn't take time to empty out "clean" RAM pages (e.g. disk cache pages). That is effectively a correct statement, discounting the time needed to zero-fill the page. Disk cache pages are never paged out to disk in a proper OS; their contents are already on disk. Pages that have to be pushed out to disk are a different matter entirely.

  10. Re:Memory exists to be used on Why Use Virtual Memory In Modern Systems? · · Score: 1

    If I decide anything, it will have to wake up, pull everything back off disk, to do anything. If your power settings lead to hibernation after some (long) idle time, then it doesn't f'ing matter if it's already pushed everything to disk hours previous.

    I think you misunderstood. If you close your laptop or select "Hibernate" from the appropriate menu, the amount of time you have to wait before the hard drive spins down and it is safe to move your machine is directly proportional to the number of dirty pages in RAM that must be written out to a hibernation file. Paging mostly-idle pages out to disk can significantly reduce that delay. The GP was very much correct in that statement.

    BULL! When the system restarts, it does not care one bit what's in the pagefile. All the work you had open and unsaved is still gone. All of the filesystem delayed writes will be completed after just a few minutes of idle time, so pushing everything to the pagefile is nothing but a waste of time. And if you're on a laptop, your system very likely had to spin the drive back up to write all that crap.

    Some OSes write panic backtrace information into the swap file, which is then retrieved and copied to a file on disk after a reboot. It doesn't aid in recovering data (unless you are a l33t haxxor), but it does help developers diagnose what happened in the event of a crash and prevent it from happening in the future. I assume that's what was meant. Also, if your power runs low enough, cutting the seconds-to-hibernate time by even a couple of seconds can mean the difference between getting your RAM paged to disk successfully and losing everything.

  11. Re:Memory exists to be used on Why Use Virtual Memory In Modern Systems? · · Score: 1

    You don't really want data in two places (one in physical memory and one copy on the disk VM), since by definition, one copy is "dirty".

    I agreed with you up until that point. There's nothing wrong with having copies in two places at once. Applications and memory-mapped file data are in two places pretty much all the time. A page doesn't become dirty until an application writes to it, and as long as the kernel knows that the page has been written to disk and flags that page as read-only (so that a write to the page traps into the kernel), the kernel could invalidate the on-disk copy if it ever changed. This is essentially the same basic technique that OSes use for copy-on-write page sharing, just reapplied to sharing between the swap file and RAM.

  12. Re:Agreed on Why Use Virtual Memory In Modern Systems? · · Score: 1

    Actually, no, it isn't necessarily making that assumption. If your VM system uses a reasonable architecture that allows you to easily associate a physical memory page with every process that is sharing it (without the need to laboriously walk through thousands of page tables), you should be able to provisionally page it out to disk without inducing a substantial performance hit.

    What you do is mark the page as "clean" and "read-only" in the process's page table. If that application reads from the page after this happens, no problem. It is reading from RAM, so it is instantly available. If it tries to write, the write instruction traps into the kernel, which marks the page as "dirty", backs up the process's program counter by one instruction (if needed, depending on the architecture), and lets the process execute that instruction again, so the application takes a very small performance hit (a trap penalty), but otherwise is unaffected.

    If, by contrast, another application needs a page and the owning application has not written to that page recently, because the page is marked as "clean" and purgeable, the scheduler must ensure that the victim process is not running, but beyond that limitation, the victim page can be unceremoniously yanked from the victim process's address space and given to the other process without having to write its contents out to disk (because it is already there). Essentially, this means treating data more like most OSes treat application code or memory-mapped file data (both of which can be safely discarded without paging it out to disk because the data can be reread from disk when needed).

    By lazily paging not-recently-used pages to disk before they are actually needed, assuming that you don't do so much I/O that you slow down other necessary work, you can significantly reduce the performance hit that would otherwise be associated with paging, at least in theory. The hard part, of course, is setting appropriate limits for such behavior so that it doesn't cause significant delays in other I/O that might potentially be time-critical. It is -not- a fundamentally bad idea.

  13. Re:SF on Bush Demands Amnesty for Spying Telecoms · · Score: 4, Informative

    More than that, the 9th circuit has a tendency to take on cases that are a lot more interesting than the other courts when it comes to people's rights, etc. Challenges to civil rights violations and other constitutional challenges tend to occur in the 9th circuit because the people who are motivated to file those challenges tend to live within its jurisdiction more often than in any other circuit. Thus, because of how high-profile and constitutionally important their cases are, they tend to be heard much more often by the SCOTUS.

    When viewed as a percentage of cases heard by the SCOTUS, their overturn rate is higher than the average (about 90% compared with about 75%), but at least in 2006 nowhere near as high as some other circuits (100% for the 3rd (NJ, DE, PA) and 5th circuits (LA, MS, TX)). Source: volokh.com. The 5th, BTW, is probably the most conservative circuit court in the U.S.

    So there.

  14. Re:Obvious? on Diet of Fast Food and Candy May Cause Alzheimer's · · Score: 1

    Soda is debatable. It provides a significant amount of caffeine, so the question is which way the balance swings. That may well depend on quantity consumed and the specific soda in question.

    Candy bars? Hardly. Chocolate (and particularly dark chocolate) is rich in antioxidants. Candy bars (within reason) can actually prolong your life in spite of the sugar in them.

    Twinkies and corn syrup (with added high fructose corn syrup!?!?!), perhaps. Two pound quadruple cheeseburgers, sure. Chocolate and sodas? Not necessarily. Like I said, common sense is frequently wrong when it comes to your health....

  15. Re:Looking to test Bilski? on Apple Sued Over iPhone Browser · · Score: 1

    Actually, I'm not aware of any actual devices that do this. Indeed, it would be an idiotic design to do so. Generating a reduced page is necessarily a server-side process, or at best, a web-proxy-side process. The primary reason to create reduced sites is to conserve bandwidth over a really freaking slow connection. Doing it on the client side completely misses the whole point of content reduction---making a horribly slow connection seem not-so-horribly slow....

  16. Re:Best use of the Kindle on An Ethical Question Regarding Ebooks · · Score: 1

    You really aren't making copies of the copyrighted material. You are merely brokering copies on behalf of the original torrent creator in the same way that a web proxy cache brokers copies of web pages. Thus, you should be no more liable for copyright violation than an ISP who gets a takedown notice. One could even reasonably argue that the DMCA protects you in this case, though that's a little bit twisted. The point is that the DMCA ISP exemption was put in precisely to deal with cases like this in which the protocol makes it necessary for a third party to make copies on behalf of an infringer, and BitTorrent is, IMHO, not demonstrably different in this regard except insofar as the number of "ISPs" involved is exploded by orders of magnitude.

  17. Re:Obvious? on Diet of Fast Food and Candy May Cause Alzheimer's · · Score: 3, Informative

    It is somewhat naive to claim that those things are "really, really, really bad for you", though. While it is clear that these can have significant negative side effects on weight in some portion of the population if consumed in excess, the fact that this does not occur across the population universally, however, means that one could argue that the consumption of these foods by people who do not exhibit extreme weight gain from them might actually be helpful, and that not consuming energy-rich foods may be starving those people's cells. Everyone's body has different nutritional needs in terms of calories, etc., and painting with too broad a brush does more harm than good when it comes to understanding the issues involved.

    For example, by some people's standards, caffeine is really, really bad for you. The same goes for alcohol. However, we now know that both of these substances decrease the risk of stroke and heart disease. Caffeine even decreases the risk of Alzheimer's and other neurological disorders. Following conventional wisdom and common sense to answer nutritional or medical questions frequently results in getting entirely the wrong answer.

  18. Re:Best use of the Kindle on An Ethical Question Regarding Ebooks · · Score: 3, Interesting

    Ultimately, yes, I think that's what the courts should (and probably eventually will) end up concluding. It may take several iterations for them to see reason in this regard, but it is pretty clear, at least in my mind, that downloading content in electronic form that you legally own a copy of in another form is no different than doing the format shifting yourself, and thus is protected fair use even if downloading ends up causing you to push out copies of fragments of the content as a side effect of the protocol used (seeding). Creating the torrent, on the other hand....

  19. Re:Looking to test Bilski? on Apple Sued Over iPhone Browser · · Score: 5, Informative

    Absolutely correct. The iPhone browser is a different UI built on top of a tweaked WebKit. It does not use XML or page simplification techniques in any way. I'm pretty baffled by this suit. About all I can imagine is that some web site served a simplified site to this company's iPhone based on a browser match and these folks with their complete lack of technical knowledge assumed that the iPhone did the simplification, which couldn't be farther removed from reality without talking about Internet gnomes sending messages through a series of tubes....

  20. Re:I'd care more on US Officials Flunk Test On Civic Knowledge · · Score: 3, Informative

    Reread what I said. The word you're looking for is capita, not person. Those do NOT mean the same thing in proper English. Doing something per person means that you did something for each literal human being. Doing something per capita means that you did on average something per person.

    The term "capita" refers to an equivalence class of population units in which all people are treated as being equivalent even if the literal individuals that make up the population are not equivalent. Therefore, when you say we spend $1,000 per capita, it means you spend $1,000 on average per person.

    By contrast, the term "person" refers to a flesh and blood object. When you say we spend $1,000 per person, you might stretch that terminology to mean that you spent $1,000 per capita. However, a precise interpretation of that phrase is that you spent exactly $1,000 on each person. I'm sure you can understand that those two statements are completely different in their meaning.

    Here's an example. I encounter ten homeless people on the side of the road asking for money. If I give $1,000 to one person and nothing else to the other nine people standing there, I gave out $100 per capita within that population of ten people. I'm sure you won't argue that I gave out $100 per person, however. The people who got nothing would beg to disagree with you, as they did not get $100. Okay, after they beat up the tenth guy, they might, but....

    The problem is that using the phrase "per person" is ambiguous. It can be interpreted in two different ways---the way you interpreted that statement (as a sloppy way of saying "per capita") and the way I interpreted it (as a logical fallacy that if you spent population * k dollars on a group, this implies you spent k dollars on each member of that group).

    Saying "per capita", by contrast, is deliberately unambiguous and can only mean "per average person". There's a reason that people talking about financial matters always say "per capita" and not "per person". To people who are used to precise meanings of terminology like "person" versus "capita", the meaning of those two phrases is completely different. I'm not at all surprised that a lot of people missed that question because by a literal interpretation of the phrase "per person", the "correct" answer is incorrect.

    Worse, depending on how you interpret the question, answer A. can also be correct. The question did not specify a time period. If you define the time period of the question to be from the creation of the government up until the present, and if the amount of income equals the amount of money spent during that time period, the debt is provably zero. So by one interpretation, D. is correct, by another interpretation, A. is correct, and by a third interpretation, neither is correct....

    See why I object to this question now? Writing good, unambiguous test questions is really hard. This test was pretty well written for the most part, but that question was a real stinker. :-)

  21. Re:I'd care more on US Officials Flunk Test On Civic Knowledge · · Score: 2, Interesting

    A lot of this stuff is not really civic knowledge, though. For example, while philosophy did play a role contributing to the thought processes that led to the founding of our government, it has little bearing on understanding the way governments actually work....

    Also, #33 appears to have no correct answer. A. is wrong; the deficit is zero, but the debt may still be substantive. B. is wrong because printing money causes inflation if less money is taken out of circulation by being destroyed than is being printed, and has really nothing to do with money given to the government (which is still effectively in circulation). C. is wrong because the government may well be helping some groups while taking from others. On the average, it may be "true", but it still isn't actually true. D. is wrong for the same reasons. E. just has nothing to do with it.

    They apparently consider D. to be "correct", which is just utter nonsense. Basically, the claim is that if the aggregate of all taxes and spending are equal, then the amount collected from each individual is the same as the amount spent for each individual. Clearly, this is not the case. A person on welfare clearly gets more money spent on them than a person not on welfare, etc. Now you could argue that the -average- per-person spending is the same as the -average- per-person income, but the "correct" answer did not say that. If they had said "per capita" instead of "per person", the answer would have been correct.

    *scratches head*

    Humorously, the other four questions I missed were the same four questions that politicians answered correctly more often than normal people. Apparently, I don't think like a politician. Good to know.

  22. Re:I'm not too concerned yet on After Columbine, Eric Holder Advocated Internet "Restrictions" · · Score: 1

    Restricting free speech is very different from advocating censorship---laws that prevent publication of certain types of materials outright. Whether I agree with him or not depends on what he meant when he said restrictions. I think a lot of people would be in favor of reasonable time, place, and manner restrictions on porn. In meatspace, opening up a porn shop next to an elementary school is not something many people would defend. The same is true on the Internet. Posting truckloads of porn on a children's website is not appropriate. The problem with the Internet is that right now, the way it is organized makes reasonable self-categorization of content impossible. Indeed, that broken lack of organization is the only thing that makes reasonable Internet speech restriction impractical.

    Some reasonable ideas for Internet speech restrictions include things like creating a .xxx or .porn TLD. Don't want pornographic content? Block that TLD. Pass laws that require sites primarily engaged in the distribution of pornographic material to move at minimum their image content to that TLD. Ideally, you should do this in such a way that every .xxx/.porn domain with a corresponding .com domain can only be purchased by a representative of that .com domain for the first year. By doing so, you prevent the squatting problem that would otherwise inevitably occur from day one. Ideally, require the registrars to allow companies to shift any or all upcoming years of registration on their .com domains over to their .porn/.xxx domains. Obviously, there would have to be clear definitions on what constitutes pornography, but apart from extremist points of view, it is generally obvious to any reasonable person. For the most part, the porn industry would be likely to self-regulate in this regard to remain in compliance with the laws, while anything outside that industry would be unlikely to be affected by it unless the law were written poorly. With the exception of the requirement to move the content over, however, nearly all of this should be ICANN policies, not laws.

    You could do similar things with other content, like creating a .mature TLD for non-porn adult-oriented content such as the things he was talking about (bomb-making instructions). You might create a .teen TLD for content oriented towards teenagers but inappropriate for younger children, e.g. relationship and sex-ed forums, etc. You could also create a .kids TLD (as has often been proposed) for sites whose admins agree to voluntarily screen their content regularly and ensure that it is appropriate for children. And so on.

    Most reasonable people would consider those sorts of time, place, and manner restrictions to be a reasonable compromise between absolute freedom of speech and protecting underage people from exposure to inappropriate content. Such restrictions don't really harm anyone, don't prevent adults from accessing adult content, etc. If anything, they would make access to adult content by adults easier by concentrating it in specific TLDs by itself for ease of searching. On the whole, it's a win-win for users, parents, the industry, etc. If that's the sort of restriction he is advocating, then I'm all for it. Freedom of speech isn't absolute even on the Internet, and it makes perfect sense for there to be reasonable, well-thought-out limitations on where and how you can distribute certain types of content in cyberspace just as there are in meatspace. Of course, it will never be 100% perfect because such laws can't be 100% enforceable, but the purpose of laws like that are primarily to encourage a reasonable degree of self-regulation anyway.

    That said, if his goal is to prevent certain types of material from being available at all, then I would have to encourage Mr. Obama to choose someone else for this post.

  23. Re:But... on Unix Dict/grep Solves Left-Side-of-Keyboard Puzzle · · Score: 1

    Grin did you try that? The first link is a wikipedia entry, the second about "The Stewardesses 3-D", really not porn. Only the third link is porn ;)

    Remember that Google permutes your search results to some degree based on recent past searches. If the first search result for stewardesses is porn... well, you can probably draw your own conclusions.... :-D

  24. Re:$10,000,000, eh? on Resurrecting the Mighty Mammoth, Cheaply · · Score: 1

    "...life, uh... finds a way. " (Jurassic Park)

  25. Re:Who Cares? on McColo Takedown, Vigilantes Or Neighborhood Watch? · · Score: 0

    Your joke fails to amuse be because:

    [x] Meta-jokes are rarely funny.
    [x] Meta-jokes are never funny.
    [x] Meta-jokes are pointless.
    [x] Meta-jokes are so 1999.
    [x] The sky is blue.
    [ ] The sky is orange.
    [x] Big Sky is in Montana.