Slashdot Mirror


User: raymorris

raymorris's activity in the archive.

Stories
0
Comments
10,114
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 10,114

  1. Took me a day to get it right. stat() and getxattr on What Dropbox Dropping Linux Support Says (techrepublic.com) · · Score: 5, Informative

    l wrote software that creates and syncs and *bootable* copy of a Linux machine. To have the clone boot and run right, everything needed to be copied over exactly - extended attributes included.

    It CAN be hard if you try to do it using the approach you are thinking of, but there is a much easier way. JavaScript programmers will recognize these two different approaches.

    > does the file system support symlinks, does it support locking? Can we reliably see if the file changed while we tried to sync it?

    stat() will tell you if the file is a symlink and when it last changed. If this file is a symlink, then it supports symlinks. You don't need to ask "does this filesystem support symlinks?", you just use stat() to find out what kind of file this is.

    > How about basic or extended attributes?

    Same thing. getxattr() will give you the extended attributes, if there are any. You don't need to start with detecting the filesystem and try to figure out if xattrs are possible, just use the getxattr() system call to read the extended attributes. You'll either get some or not.

    > Try that with /dev/zero and wait for your server space to fill up. Then download the already uploaded contents of /dev/sdb onto the current system.

    Remember when you called stat() earlier to get the file type and see if it's a symlink? That also tells you if it's a device file. So already done.

    Let's say you have really dumb programmers who don't know, and can't learn, that you get file information with stat(). Devices are in /dev. Don't copy the contents of files in /dev. You don't have to think about /dev/zero, /dev/random, etc - just know /dev is device files. Our system skipped /dev and /proc. Or just use rsync - it does the right thing by default. If you don't want to USE rsync, spend 30 minutes reading the rsync man page and do what rsync does. Those are options if you're too dumb to use stat().

    None of this depends on which filesystem, init system, or kernel is in use - you won't find a bunch if "if filesystem is reiserfs" in rsync.

    Back in the day you used to see two types of JavaScript. Dumb JavaScript looked like this:

    if(navigator.userAgent.indexOf('MSIE 5') != -1)
    { //we think this browser is IE5 // Can't use document.documentElement.getBoundingClientRect, give up
    } elsif (navigator.userAgent.indexOf('Safari') != -1) { // Code for Safari
          rect = document.documentElement.getBoundingClientRect() ...

    Smart JavaScript does this instead:

    if(typeof document.documentElement.getBoundingClientRect != "undefined");
    {
          rect = document.documentElement.getBoundingClientRect();
    }

    Just see if the feature is available, don't try to guess which browser it is and then try to figure out which features it has bases on the useragent.

    Linux is even easier. getxattr() is always there, it always works. If there aren't any extended attributes, it'll return none.

  2. Follow up field research on Air Pollution Causes 'Huge' Reduction in Intelligence, Study Reveals (theguardian.com) · · Score: 5, Funny

    The article doesn't mention the follow-up research. After doing the calculations from government data in their office (the study in tfa), researchers spent 6 months in several of the stupidest cities. They studied conditions on the ground in those cities.

    After 24 months in four the lowest-IQ cities, they discovered some things. As the lead researcher said at the conclusion of his time in the stupid cities:
    Mmm donuts.
    A co-author explained:
    Weed isn't even a drug, man. It's like natural, dude.

  3. Crappy cities are crappy on Air Pollution Causes 'Huge' Reduction in Intelligence, Study Reveals (theguardian.com) · · Score: 4, Insightful

    Leaving the Hillary jokes aside, yeah crappy cities are crappy. There are lot of crappy things about the biggest industrial cities in China. It seems to me you'd have to adjust for so many variables that in the end one couldn't be sure if the correlation was real in just an effect of all the corrections. Especially so if the people running the study wanted to find a particular conclusion.

    Circling back around to politics without just making a joke, it does make sense that people who think their life is crappy, perhaps because they live in Detroit, would want "hope and change" without any idea what kind of "change" is being proposed. "Door number two" sounds good compared to Chicago or Detroit. Similarly, with jobs and the economy going so well in Dallas, it makes sense that people would want the government to let us alone and let us enjoy it. No thanks, keep the change. You would expect misery to correlate with progressivist policies, whether socialist democrats cause misery or the other way around.

  4. I wonder if you bought my house. 3,500 SQ feet now on Y Combinator Plans To Start Doling Out $60 Million Next Year to Study Universal Basic Income (gizmodo.com) · · Score: 1

    You bought an inexpensive house in BCS in 2013 - you might have bought mine. My income wasn't much higher than $1,500 / month when I bought it. Congrats on getting out of the rent trap.

    I sold my BCS house and used the money for a down payment in Dallas, where was recruited for a higher-paying job. I found that In Dallas I could afford either A 2,000 sq foot house, or this 3,500 sq foot one that someone had skipped about 20 Saturdays of upkeep and repairs.

    Things like a faucet dripping (20 minute fix, $4) and they didn't finish painting one end of the house (3 hours, $60), and the bushes hadn't been trimmed in years (3 hours, $0). I expect that after spending 100 hours and $4,000 I should be able to sell it for $50-70,000 more than I paid for it.

    That cheap little house in Bryan started something pretty good.

  5. It's crap. Re-invented object oriented programming on Smart Tags Add Touch Controls To Ordinary Objects (ieee.org) · · Score: 1

    It's darn confusing code. It has a ton of indirection - indirection piled on top of indirection calling more indirection. Arguably that much indirection makes sense for this code, which is basically a compiler, but here's the thing:

    The author re-invented and reimplemented, ad-hoc, all the capabilities of object oriented programming. Function tables pointing to functions that take callbacks as arguments, to make a very powerful system in which one function can be a subtype of another function. The language already has that, though - it's called "inheritance". Homeboy literally wrote code for everything C++ can do, without ever declaring a friggin object.

  6. Much dumber than LAN. A colored sticker on Smart Tags Add Touch Controls To Ordinary Objects (ieee.org) · · Score: 3, Interesting

    This isn't nearly sophisticated enough to connect to a LAN. It's just a colored sticker, which might change color wheel it gets wet, or when it gets hot, or whatever.

    The only thing "new" about this idea is the colors of the stickers would be far outside the range of wavelengths human eyee can see. Way down into the wavelengths a WiFi radio can see. It's still just reflecting a color, though, the sticker doesn't DO anything or connect to anything.

  7. Funny you should say that on Smart Tags Add Touch Controls To Ordinary Objects (ieee.org) · · Score: 2

    I'm reading your post in the bathroom after holding it too long because I was was very focused on some code I working on.

  8. Gp stated correctly that this serious vulnerability would not have existed had Epic not insisted that users disable security protections. That's a fact. Not a wish, not a "best possible future", but a simple fact.

    Kinda like the fact that all your money you've been paying into Social Security is gone. It's been spent. It's not sitting there waiting for you to get it when you're older. Wishing things were different doesn't change the facts.

  9. It's easy to find on their web site on EFF Defends Bruce Perens In Appeal of Open Source Security/Spengler Ruling (perens.com) · · Score: 1

    > How do you know what license they distribute their kernel patches under to paying customers?

    It's stated quite plainly on their web site. It'll be the top result if you Google "grsecurity license". (Kinda sad you didn't bother to Google it before arguing about it.)

    > They are neither selling kernel sources nor are they distributing kernel sources. All they are distributing is their own patches. A patch IS modified kernel sources. Here's a trivial kernel patch so you can see what they look like:

            printk("comedi%d: ni_labpc: %s, io 0x%lx", dev->minor, thisboard->name,
                                  iobase);
            - if (irq) {
            + if (irq)
                            printk(", irq %u", irq);
            - }
            - if (dma_chan) {
            + if (dma_chan)
                            printk(", dma %u", dma_chan);
            - }
                    printk("\n");

                    if (iobase == 0) {

    It starts with a couple lines exactly as in the original, unchanged. Then where a line is changed, it has the original line, with a "-" mark added, then the transformed version, marked with a "+".

    It's not only the new lines derived from the original (a derivative work), but also which lines to remove, copy-pasted exactly from the original GPL kernel. You can't copy-paste from the original kernel OR distribute your modified version of those source lines without complying with the GPL. A kernel patch generally does both.

  10. PS could be similar to GPL license and not use GPL on EFF Defends Bruce Perens In Appeal of Open Source Security/Spengler Ruling (perens.com) · · Score: 1

    PS I forgot to say they COULD legally use a license that is similar to thr GPL, but different, and call it by a different name. They haven't chosen to do that. At least, under trademark they could.

    If they chose to do that, they wouldn't be violating trademark, but since they are distributing things copy-pasted from the GPL kernel, it's a derivative work and would violate the license.

    Bottom line:
    If you sell a modified version of GPL software, it as to be GPL licensed, and you can't change the GPL to whatever you want it to be. Playing games doesn't work, you just end up falling into a different kind of violation.

  11. Actually they can't due to GPL trademark on EFF Defends Bruce Perens In Appeal of Open Source Security/Spengler Ruling (perens.com) · · Score: 1

    You're not allowed to call just any license "GPL". Only the GPL license can be called by that trademark name. The GPL does not allow adding clauses. Therefore it cannot be licensed "GPL with additional clauses".

    They have said their software is GPL licensed. Therefore if they try to say "no, we mean our own special 'GPL', with extra terms added", that would violate the GPL trademark.

  12. Easier than a wall on Mass Shooting Reported at Madden Video Game Tournament in Florida (polygon.com) · · Score: 1, Offtopic

    > Also, there seems to be a problem with Florida. Maybe we should build a wall around there?

    Agreed there seems to be a problem with Florida.
    Florida MIGHT be second place to California for being weird and fucked up in all sorts of ways.

    I have to disagree on the wall, thing though, only because there is a more effective and less-costly option. I have it on good authority that California and Florida will be underwater by 2020 if we do nothing at all. The way that statement was phrased, I think it was supposed to be scary, but it seems alright to me.

  13. How much vs how often on Sportsbooks Start Refusing More Bets From 'Wise Guys' Trying To Win (espn.com) · · Score: 1

    The most carefully inspected and regulated part of the machine is the PRNG, the randomizer. It randomly determines whether it's a jackpot, a second-place prize, etc.

    This should not be confused with the dollar amount associated with each prize, which is posted on the machine and not random at all. A big sign on the machine will say "jackpot $5,000â or "jackpot $20,000â. That is of course not random at all.

    The other part of the machine, which isn't inspected and regulated as carefully as the PRNG and game logic, is the user interface. Disputes occur when the user interface doesn't make clear what the game logic came up with based on the random numbers from the PRNG.

  14. Normally 2^32 (42.9 million) on $5,000 machine on Sportsbooks Start Refusing More Bets From 'Wise Guys' Trying To Win (espn.com) · · Score: 2

    Here's an interesting thing about the slot machine errors you hear about. Most of the time, though the sign on the machine says "$5,000 jackpot", the display shows the "current balance" as 42949672.95. Most programmers and many IT people will recognize that number. It's the largest number that can be represented on a 32-bit machine. It's also one penny less than zero, on a 32 bit machine (numbers wrap around) The machine was supposed to show zero, but somehow got off by a cent, what programmers call an "off by one error".

      The symbols don't display a winning combination, there is no "You've won the jackpot!!!" screen. The current balance just displays an impossibly large number, not only much larger than the jackpot on that machine, but larger than any jackpot on any slot machine ever.

    So it's not a matter of "the casino claims there was a malfunction"; as soon as they see the number that was displayed most programmers will know what the error was - without even seeing the code for the machine.

    In law, there is principle that if you made a typo in your Craigslist ad offering to sell your 2016 model car for $.8000 you wouldn't be obligated to sell it for 80 cents. That would be entirely unreasonable; it's clearly a mistake. You aren't required to do something totally unreasonable due to a clear error.

    If a slot that prominently displays a $5,000 maximum jackpot incorrectly adds $500 on a non-winning combination, $500 is a reasonable win for that machine and the casino will probably have to pay it. On a nickel slot with a $5,000 jackpot, a current balance of $42.9 million is unreasonable, obviously wrong. People skilled in programming would know 2^32 indicates an error of the balance being one penny less than zero, so we know what type of bug it is, it's not just that the casino "claimed". In these cases the courts have normally ruled for the casino.

    In one instance, the casino screwed up the PR on it pretty badly. These errors are rare enough that the casino could have explained the situation and paid her the jackpot for the machine - $5,000. The player would have been disappointed about the error, but happy to have $5,000 in her pocket. Instead the casino comped her a steak dinner. That's insulting and the casino rightly got a lot of bad press for it.

  15. Offer doesn't mean force. Democrat? on Half of Audited JavaScript Projects Contained a Vulnerability (theregister.co.uk) · · Score: -1

    You don't know the difference between offering people something useful they'll likely want (npm) vs forcing upon people what the company wants (Windows)?

    If you can't distinguish between offering something the person wants vs forcing them to take what someone else decides to make them do, I'm going to guess you're a Democrat?

  16. Have you never seen kernel patch? Or any patch for any project?  If not, it made be good to stop making assertions about things you've never even seen in your life.

    > A kernel patch is not a transformed version of the original

    Actually that's EXACTLY what a patch is - the relevant section of code, with some lines marked out and the new version of those lines added. Here's a trivial patch as an example:

        printk("comedi%d: ni_labpc: %s, io 0x%lx", dev->minor, thisboard->name,
                   iobase);
        -       if (irq) {
        +       if (irq)
                printk(", irq %u", irq);
        -       }
        -       if (dma_chan) {
        +       if (dma_chan)
                printk(", dma %u", dma_chan);
        -       }
            printk("\n");

            if (iobase == 0) {

    It starts with a couple lines exactly as in the original, unchanged. Then where a like is changed, it has the original line, with a "-" mark added, then the transformed version, marked with a "+".

  17. That's precisely what derived means on EFF Defends Bruce Perens In Appeal of Open Source Security/Spengler Ruling (perens.com) · · Score: 2

    Suppose you write a novel. Perhaps, like Stephen King, you're living in a broken down trailer with no telephone when you're book sells 13,000 copies, netting you $2,500. Then someone turns your book into a movie. The movie doesn't have any pages of the book read aloud in the movie. It doesn't "contain" the book per session, it's a transformation, an adaptation, of the book. The author is entitled to a share of the movie revenue because it's his novel, adapted to the screen. That's a derivative work. "Derived from" doesn't mean "contains".

  18. Sounds like you have whitel and blacklist backward on Bitdefender Disables Anti-Exploit Monitoring in Chrome After Google Policy Change (bleepingcomputer.com) · · Score: 1

    Sounds like you're confusing whitelisting with it's opposite, blacklisting.

    Blacklisting says "this person isn't allowed to do this to that". Anyone can do anything, except for the listed blocks. Blacklisting has been outdated for 20 years.

    Whitelisting says "only this person can do this thing to that". Nobody can do anything unless they have been explicitly approved. Whitelisting is fundamentally the most secure approach you can ever have.

    For public resources, including accessing the public internet, the right approach is generally much more complex, a matrix of different parameters.

  19. Not secured. Your pencil, socks are not secured on Bitdefender Disables Anti-Exploit Monitoring in Chrome After Google Policy Change (bleepingcomputer.com) · · Score: 1

    Your pencil and your socks are not secured. You don't have any locks in your socks to keep other feet out. Anyone can use your pencil.

    The reason they aren't secured is because there is no significant strong reason to do so. They aren't security sensitive. It's not that your pencil or your socks are INSECURE, they just are not secured because there is no reason to.

    Similarly, a cat video isn't security sensitive. It's neither secure nor insecure.

    This matters because if you get confused and start trying to secure your socks, pencils, and flower bushes, you won't have time and energy left to secure your security-sensitive items properly.

    In my line of work, I see outdated TLS (SSL) configurations daily and have to tell the customer to update it. 80% of them are pointless - there is no reason for it to be TLS in the first place. If the admins weren't busy upgrading public marketing videos to eleptic curve cryptography, they might have time to update the security of the payment portal.

  20. South Africa govt says it's true, also ABC News on Google Removes Accounts Tied To Iran-Led Misinformation Campaign (engadget.com) · · Score: 2, Informative

    "South Africa President Cyril Ramaphosa announced earlier that the ruling political party, the African National Congress, had agreed to a proposal to alter the country's constitution and allow for land expropriation, or seizure by the government, without compensation", reports ABC News.

    The official South Africa government Twitter account added:
    "South Africa will speed up the pace of land reform"

    It seems someone told you some fake news.

  21. Sorry that happened. Working at 6PM is still worki on Intel Publishes Microcode Security Patches With No Benchmarks Or Profiling Allowed (theregister.co.uk) · · Score: 1

    I'm sorry that happened to you.

    You mentioned "after hours" twice. Your story might be a reminder that if you're at a work conference with the team from work, don't do or say things that are Not Safe for Work. I have other friends, not co-workers, for NSFW discussions. If you're with co-workers, follow the guidelines you'd use for conversations with co-workers - no matter what time it is.

  22. Washington DC isn't actually a person.
    The 23rd amendment says

    --
    The District constituting the seat of Government of the United States shall appoint ... A number of electors (3)
    --

    The three people appointed vote. Those three voters could be appointed by the DC mayor, or by lottery, or any other method. The 23rd doesn't require that DC hold a popular election.

    The other amendments you mentioned say that IF a state chooses to have an election, they can't select voters on the basis of:
    Race
    Unpaid taxes
    Age (over 18)

    They can have the state legistlature or governor choose the electoral college electors, without ever having an election, and they are fine by all of those amendments. In fact states DO have laws saying the legistlature will appoint electors in certain situations.

    The exception is the US Senate. Originally, the Constitution said senators were appointed by state legistlatures. A later amendment made senators elected by the people.

    Also note in the most recent presidential election, even though Trump wonthe popular vote in Texas, multiple electoral college electors from Texas chose not to vote for Trump. Even though there was a popular election, it was merely advisory and the 38 electors from Texas could vote for whichever candidate they chose.

  23. Clothes vs a giraffe costume on Steam Gets Built-in Tools To Let You Run Windows Games on Linux -- Now Available in Beta (pcgamesn.com) · · Score: 4, Insightful

    Your clothes are a layer between your skin and people observing you.
    A giraffe costume is a layer between your skin and people observing you.

    Your clothes are made to fit you. They don't hide your shape or size, or make you look like something other than what you are. They are a natural fit to a human of your size and shape. They don't get in the way of using your hands and mouth, the interfaces you are designed to work with.

    An giraffe costume isn't a natural fit for you, and it hides your actual size and shape. it gets in the way of using your hands and mouth naturally. It's awkward, and definitely not what you want to wear while running a race, because it slows you down.

    Wine is a Windows costume for Linux, to make Linux look kinda like Windows. Rather than exposing the Linux interfaces in an organized, easy to use way as GTK does, it hides the Linux interfaces the same way a giraffe costume hides your mouth, and the result is muffled communication. GTK is designed for Linux, to fit properly on Linux, the same way your clothes are designed to fit properly on your body.

  24. Echo chambers are bad, m'kay on Evidence is Piling Up That Facebook Can Incite Racial Violence (technologyreview.com) · · Score: 5, Insightful

    Facebook feeds people stuff similar to what they have "liked" before, setting up another echo chamber.

    Earlier today I was noticing that if CNN were my primary source of news, I'd really dislike conservatives and Republicans; if Fox were my primary source, I'd have a disdain for liberals and Democrats. It's my understanding that Facebook is even worse, and it is the number one most popular source of "news", as I recall. Certain comedians are also among the top sources people cite as where they get their "news" (apparently confusing jokes mixed with propaganda for news).

    On Slashdot, at least I talk to people who have a point of view different from my own. Occasionally they are calm and rational, presenting a cogent argument. What's really great is when they also are adult enough to listen to my opposing viewpoint and discuss where we each may have a good point, and can each learn something from the other point of view. It's great when that happens.

  25. PS - if you do decide to refresh your memory by reading the Constitution, it may help to make things clear if you remember it's the Constitution of the United States, not the United People. It's a document describimg how the states can work together, uniting for such things as military defense. That's why the STATES get a vote on who the president is.

    Individuals are mentioned mostly in the context of what the federal government isn't allowed to do. The federal government can't make any laws choosing a particular religion, the federal government can't make any laws disarming citizens, the federal government may not prosecute someone without a fair trial, etc. It's phrased as "Congress shall make no law ..."