Slashdot Mirror


User: Guy+Harris

Guy+Harris's activity in the archive.

Stories
0
Comments
4,578
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 4,578

  1. Re: Lol on A Text Message Can Crash An iPhone and Force It To Reboot · · Score: 1

    No, the problem is code that pretends that illegal UTF-8 sequences magically don't exist!

    Where's the illegal UTF-8 sequence in the message? Is the actual octet sequence in the message different from what's in this Slashdot posting (once converted to a sequence of octets), which contains no invalid UTF-8 sequences (yes, I went through them all by hand)?

  2. Re:What is the string? on A Text Message Can Crash An iPhone and Force It To Reboot · · Score: 1

    That's the string encoded as UTF-8, so it's more like

    50 6f 77 65 72 20 d9 84 d9 8f d9 84 d9 8f d8 b5 d9 91 d8 a8 d9 8f d9 84 d9 8f d9 84 d8 b5 d9 91 d8 a8 d9 8f d8 b1 d8 b1 d9 8b 20 e0 a5 a3 20 e0 a5 a3 68 20 e0 a5 a3 20 e0 a5 a3 20 e5 86 97

    If we turn that into a sequence of (21-bit) Unicode code points, it becomes

    000050 00006f 000077 000065 000072 000020 000644 00064f 000644 00064f 000635 000651 000628 00064f 000644 00064f 000644 000635 000651 000628 00064f 000631 000631 00064b 000020 000963 000020 000963

    ...with 000068 000020 000963 000020 000963 000020 005197 following it (I quit translating too early)

    which, encoded as UTF-16, is

    0050 006f 0077 0065 0072 0020 0644 064f 0644 064f 0635 0651 0628 064f 0644 064f 0644 0635 0651 0628 064f 0631 0631 064b 0020 0963 0020 0963

    ...with 0068 0020 0963 0020 0963 0020 5197 following it.

    As UTF-16, there are no surrogate pairs, so the bug presumably isn't a problem with handling UTF-16-encoded Unicode characters bigger than 00FFFF.

    Still true with the corrections.

  3. Re:What is the string? on A Text Message Can Crash An iPhone and Force It To Reboot · · Score: 1

    In hex, the string is:

    506f 7765 7220 d984 d98f d984 d98f d8b5 d991 d8a8 d98f d984 d98f d984 d8b5 d991 d8a8 d98f d8b1 d8b1 d98b 20e0 a5a3 20e0 a5a3 6820 e0a5 a320 e0a5 a320 e586 97

    That's the string encoded as UTF-8, so it's more like

    50 6f 77 65 72 20 d9 84 d9 8f d9 84 d9 8f d8 b5 d9 91 d8 a8 d9 8f d9 84 d9 8f d9 84 d8 b5 d9 91 d8 a8 d9 8f d8 b1 d8 b1 d9 8b 20 e0 a5 a3 20 e0 a5 a3 68 20 e0 a5 a3 20 e0 a5 a3 20 e5 86 97

    If we turn that into a sequence of (21-bit) Unicode code points, it becomes

    000050 00006f 000077 000065 000072 000020 000644 00064f 000644 00064f 000635 000651 000628 00064f 000644 00064f 000644 000635 000651 000628 00064f 000631 000631 00064b 000020 000963 000020 000963

    which, encoded as UTF-16, is

    0050 006f 0077 0065 0072 0020 0644 064f 0644 064f 0635 0651 0628 064f 0644 064f 0644 0635 0651 0628 064f 0631 0631 064b 0020 0963 0020 0963

    As UTF-16, there are no surrogate pairs, so the bug presumably isn't a problem with handling UTF-16-encoded Unicode characters bigger than 00FFFF.

    I suspect that the string is probably being processed as UTF-16, because that's how CFString/NSString are encoded internally and because code handling UTF-8 that can't handle multi-byte characters couldn't handle anything other than ASCII.

    U+0963 is DEVANAGARI VOWEL SIGN VOCALIC LL, which is a nonspacing mark; my guess is that it (or perhaps some other character in that sequence that's a combining character) is getting split, by the ellipsis, from the character with which it's supposed to combine, and that the rendering code is blowing up because of that.

    If so, this has nothing to do with UTF-16 being too hard to handle correctly, or with the code not being able to handle characters that are "too many bytes", it has to do with sequences of characters sometimes having to be handled specially, and not just blithely split between characters.

    It starts with "Power ", but I guess that's not important.

    It might make the string long enough that the code displaying it on the main screen would abbreviate it and thus insert an ellipse.

  4. Re:Lol on A Text Message Can Crash An iPhone and Force It To Reboot · · Score: 1

    Yes, it is. Any input that will crash your library needs to be sanitized. You need to truncate the message on display, at the bad character.

    Where has it ever been stated that the message, as sent to the phone, contains a bad character? Everything I've read indicates that the problem is that the code that's displaying the message is inserting an ellipsis in the middle of a perfectly valid character, making the resulting string invalid.

    That's not un-sanitized input, it's bad output, from buggy code.

  5. Re:Artefacts of the Steam Age of Computing (TM) on A Text Message Can Crash An iPhone and Force It To Reboot · · Score: 1

    I'll force one text format and one only for all glyphs in existance (UTF seems like a good candidate).

    To which UTF are you referring?

  6. Re:Genesis does what paleontologydon't on Creationists Manipulating Search Results · · Score: 1

    DuckDuckGo gave its top result to a fruitcake link saying "Genesis can explain everything...."

    Phil Collins or Sega?

    No, Peter Gabriel.

  7. Re:Is he on TARGET? on Attackers Use Email Spam To Infect Point-of-Sale Terminals · · Score: 1

    Or has he missed? If you know what I mean. Do you know mean? Know? Know what I mean?

    No, I don't.

    (And, yes, that breakin was mentioned in TFA.)

  8. Re:Is he on TARGET? on Attackers Use Email Spam To Infect Point-of-Sale Terminals · · Score: 2

    Or has he missed? If you know what I mean. Do you know mean? Know? Know what I mean?

    No, I don't.

  9. Re:Can Political Correctness please wake up? on Study: Science Still Seen As a Male Profession · · Score: 1

    In other news, crochet, knitting, child care, and midwifery are STILL seen as "Female" professions.

    Except when they aren't.

  10. Re:Machine learning? on DNA On Pizza Crust Leads To Quadruple Murder Suspect · · Score: 1

    Actually, I found it rather interesting to consider -- given that African Americans are so fond of shouting oppression. Yet they seem to have flourished here rather well, with plenty of opportunity to advance in society, have many elected officials and business leaders and finally, even a President.

    So when did we have a US President who was the descendant of slaves brought over to the US?

  11. Re:somebody is trying too hard. on On the Taxonomy of Sci-Fi Spaceships · · Score: 1

    There is no consistent approach and due to various changes, even the historical usage varies considerably

    No kidding. My Corvette is usually only manned by me, and occasionally one other person. It has no armament, and scares the hell out of me when it gets off the ground, let alone leaves the atmosphere. And it might as well be parked, even at top speed, when compared to the slowest space faring vehicles.

    James, did you take your stepfather's car again? You'll wreck that thing some day. It's over 250 years old, so it's a real classic, and he'll be pretty upset if you ruin it.

  12. Re:Uh... on Swift Vs. Objective-C: Why the Future Favors Swift · · Score: 2

    Since when is embedded programming associated with "immersive, responsive, consumer-facing applications"? I don't think Swift is going to replace C anytime soon in that department.

    It was not obvious from the summary what the heck was meant by "embedded programming". In TFA, in addition to the quoted paragraph, the word "embedded" is also used in "The ability to defer loading in a mobile app or an embedded app on Apple Watch will improve the perceived performance to the user.", "Swift provides the development community a direct way to influence a language that will be used to create apps, embedded systems (if Apple ever licenses an embedded framework and chip for third parties), and devices like the Apple Watch.", and "Ultimately, Swift is a more approachable full-featured programming language that will allow developers to not only build apps but also target embedded systems like the new lower-power Apple Watch for many years to come."

    So if he's referring to the Apple Watch, maybe. If he's not, I'm not sure what the heck he's referring to; "embedded systems (if Apple ever licenses an embedded framework and chip for third parties)" sounds like hand-waving. Is he expecting Apple to be pushing Darwin into the *ahem* Internet of Things or some such?

  13. Re:No, but your own choices are. on Is Facebook Keeping You In a Political Bubble? · · Score: 1

    Look my American friends: raising minimum wage is the opposite of liberal and also the opposite of conservative. One problem of this world is, that you cannot use the correct name for it, because that word is a criminal in USA the land of the free speak.

    OK, this presumably isn't the word you're thinking of, because 1) "the means of production, distribution, and exchange [being] owned or regulated by the community as a whole" doesn't necessarily mean that there will even be a minimum wage, or wages of any sort and 2) you don't have to have "the means of production, distribution, and exchange [being] owned or regulated by the community as a whole" in order to have a minimum wage with a given level.

    So, either 1) the word in question doesn't (solely) mean what the OED entry in question says it means or 2) that word isn't the name you had in mind. Which is it?

  14. Re:No, but your own choices are. on Is Facebook Keeping You In a Political Bubble? · · Score: 5, Interesting

    If you de-friend someone (or large groups of someones), their stories are basically not going to be on your feed in the first place, and liberals have been shown to be more likely to de-friend conservatives over political differences than conservatives de-friend liberals http://www.washingtonpost.com/blogs/the-switch/wp/2014/10/21/liberals-are-more-likely-to-unfriend-you-over-politics-online-and-off/

    Perhaps because, as the article you cite says:

    However, that doesn't mean liberals necessarily like all of the ideas they see. Consistent liberals were the most likely group to block or unfriend someone because they disagreed with their political postings, with 44 percent saying they had "hidden, blocked, defriended, or stopped following someone" on Facebook due to their political postings. Only roughly one-third (31 percent) of consistent conservatives had done the same -- although this might be attributable to lower levels of ideological diversity in their online ecosystem.

    And that conservative echochamber isn't limited to conservatives' online interactions: It's a reflection of the lack of ideological diversity in their real life relationships. Two-thirds of consistent conservatives told Pew that most of their close friends share their views on government and politics, compared to just over half, or 52 percent, of consistent liberals. For mostly conservatives, 42 percent of their close friends have the same views, while just 26 percent of mostly liberals respondents who said the same.

    so maybe liberals have more conservative "friends" to de-"friend" than conservatives have liberal "friends" to de-"friend".

  15. Re:So what? Feel free to move into a cave. on The World's Most Wasteful Megacity · · Score: 1

    As opposed to London, Paris, and Tokyo, which were designed and built during the last 50 years, and thus are more efficient.

    Tokyo is still no my to-visit list but have you ever been in London or Paris?

    I've been to all three.

    Neither London nor Paris were gutted and rebuilt to anything like the extent that Tokyo or Berlin were so I'm not exactly sure what you mean by designed and built during the last 50 years.

    I mean "the only way "ZOMG NEW YORK CITY IS 400 YEARS OLD!!!!!111ONE!!!" would be a useful response to "New York City is the world's most wasteful megacity" would be if the other cities were shinier and newer."

    I.e., I was being sarcastic.

    The best you can argue is that London and Paris incrementally improved the part of their infrastructure relevant to this discussion over the last 50 years while New Yorkers sat idle.

    Which may well be the case - but, again, that renders New York's age not a particularly relevant point, as the more efficient cities are older.

  16. Re:So what? Feel free to move into a cave. on The World's Most Wasteful Megacity · · Score: 1

    "As opposed to London, Paris, and Tokyo, which were designed and built during the last 50 years, and thus are more efficient." Paris and London are both very old and they were not "leveled" during WWII.

    Hint: it's called "sarcasm".

  17. Re:But... on The World's Most Wasteful Megacity · · Score: 1

    As a resident of Suffolk County, about half the land area is pine barrens and farms. It sounds like they're deliberately stretching the definition of "city" to include a lot of territory that most honest people would not consider metropolitan at all. Many of the other counties they're including are in a similar state of relatively sparse population.

    What the paper says is

    The megacities are essentially common commuter-sheds of more than 10 million people; most are contiguous urban regions, but a contiguous area is not a requirement; for example, the London megacity includes a ring of commuter towns outside the Greater London area. Megacities can spread across political borders. They include large tracts of suburban regions, which can have higher per capita resource flows than central areas.

  18. Re: But... on The World's Most Wasteful Megacity · · Score: 1

    It's something about Americans that make them measure their dicks from the balls up.

    Not that any of the authors of the paper are working at universities in the U.S.. The first author in the list of authors got his degrees from universities in the UK and Canada, so I'm guessing he's not a fellow Yank.

  19. Re:But... on The World's Most Wasteful Megacity · · Score: 4, Informative

    So if they're going to compare New York to Tokyo, applying the same logic, they should include the entirety of Japan as part of the "Tokyo Megacity."

    They didn't go quite that far - "Tokyo", the megacity, is

    Constituent cities: Tokyo, Kanagawa, Chiba and Saitama prefectures

    For those who are curious, "London", the megacity, is

    Constituent cities: Camden, Greenwich, Hackney, Hammersmith and Fulham Islington, Royal Borough of Kensington and Chelsea, Lambeth, Lewisham, Southwark, Tower Hamlets, Wandsworth, Westminster, Barking and Dagenham, Barnet, Bexley, Brent, Bromley, Croydon, Ealing, Enfield, Haringey, Harrow, Havering, Hillingdon, Hounslow, Kingston upon Thames, Merton, Newham, Redbridge, Richmond upon Thames, Sutton, Waltham Forest, City of London

    and "Paris", the megacity, is

    Constituent cities: Paris, Seine-et-Marne, Yvelines, Essonne, Hauts-de-Seine, Seine-Saint-Denis, Val-de-Marne, Val-d'Oise

    .

    See the paper's supplementary material for a full list.

  20. Re:So what? Feel free to move into a cave. on The World's Most Wasteful Megacity · · Score: 1

    I didn't say there weren't older cities out there. I'm simply explaining part of why NYC is the way it is.

    If you look at Paris, London and Tokyo, they're all wasteful as well.

    Maybe not AS wasteful as NYC.

    The title of the article is "The World's Most Wasteful Megacity". Saying "ZOMG NEW YORK IS FOUR HUNDRED YEARS OLD!!!!!!111ONE!!" is not an interesting response to the claim that it's the world's most wasteful megacity, given that there are several more efficient megacities older than it. It might be a useful example as a response to claims that megacities are inefficient in general, as it applies to many of the megacities in question, especially the developed-world ones.

    But that could simply be a function of something else as well.

    Well, given that they're older than New York, yeah, unless age makes cities more efficient, it's a function of something other than age.

    In any case, they're actually comparing large metropolitan areas; as I noted in another post, "New York", for the purposes of their study, actually includes a hefty chunk of suburban New Jersey, New York, and Connecticut, much of which was much more recently developed.

  21. Re:But... on The World's Most Wasteful Megacity · · Score: 3, Interesting

    I didn't think NYC had "detached" homes...

    They do, although some of those might be multi-family homes (for what it's worth, Trulia claims that this house at the intersection of 109th Avenue and 164th Place is a single-family home).

    But their definition of "New York" is the "megacity", which includes more than New York City; it includes:

    Constituent cities: New York City (Bronx, Brooklyn, Manhattan, Queens and Staten Island); West Connecticut (Fairfield, Litchfield and New Haven counties); North New Jersey (Bergen, Essex, Hudson, Hunterdon, Mercer, Middlesex, Monmouth, Morris, Ocean, Passaic, Somerset, Sussex, Union and Warren counties), Long Island (Nassau and Suffolk counties); Mid-Hudson region (Dutchess, Orange, Putnam, Rockland, Sullivan, Ulster and Westchester counties)

    which, I guess, means that, as a resident of Ocean Township, New Jersey, I grew up in "New York", and there were plenty of detached single-family homes where I grew up ("plenty" as in "all the homes in my neighborhood").

  22. Re:So what? Feel free to move into a cave. on The World's Most Wasteful Megacity · · Score: 4, Insightful

    Okay, what do you expect? NYC (in one form or another) has been there for FOUR HUNDRED YEARS (the area was first settled in 1624). It's been a massive metropolitan settlement for the better part of the last two hundred.

    It's not as if someone went back to 1700 or so and started out with a city planning commission and 2015-level civil engineering technology. So yes, the city's going to be ANYTHING but efficiently run, plumbed, or laid out.

    As opposed to London, Paris, and Tokyo, which were designed and built during the last 50 years, and thus are more efficient.

  23. Re:Los Angeles? on The World's Most Wasteful Megacity · · Score: 3, Informative

    It's hard to take seriously an article claiming New York is the most wasteful megacity when they don't even mention Los Angeles. New York metro is 20 million. Los Angeles metro is 18 million.

    The PNAS paper to which the article attempts to refer (with a file: link, so the link is completely worthless) does mention LA, and, if you see Figure 1[1], LA is behind NY for total energy use, water use including line losses, and total solid waste production. The caption says "Values shown are for the megacity populations scaled on a per capita basis from recorded data for the study area population"; I don't know whether that means "we scaled the values based on the population sizes", so that they represent per capita consumption, or whether they represent total consumption.

    [1]Yes, you did see what I did there. :-)

  24. And here's the actual PNAS article on The World's Most Wasteful Megacity · · Score: 2

    Here's the PNAS article, although it's behind a paywall.

    The question that comes to mind is "how many ergs were wasted by people clicking the link to the paper that Brian Merchant, senior editor at Motherboard, put in his article, with a file: URL so that it was COMPLETELY FUCKING USELESS unless either 1) you were logged into his machine or 2) you happened to have downloaded the article and stored it in /Users/brianmerchant/Downloads/pnas201504315_7vpr25%20embargoed.pdf on your UN*X box.

  25. Re:*rimshot on Why Scientists Love 'Lord of the Rings' · · Score: 1

    Try the veal.