Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Interoperating with invalid data (Score 1) 196

The program should produce an error AT THE MOMENT IT TRIES TO EXTRACT A Unicode CODE POINT. Not before, and not after.

If the program reds the invalid string from one file and does not check it and writes it to another file, I expect, and REQUIRE, that the invalid byte sequence be written to the new file. It should not be considered any more of a problem than the fact that programs don't fix spelling mistakes when copying strings from one place to another.

Comment Re: and... (Score 1) 196

The text is 99.9999999% UTF-8.

What I want to do is gracefully handle tiny mistakes in the UTF-8 without having to rewrite every function and every library function it calls to take a "bytes" instead of a "string", and thus completely abandon useful Unicode handling!

Come on, it is blindingly obvious why this is needed, and I cannot figure out why people like you seem to think that physically possible arrangements of bytes will not appear in files. The fact that all serious software cannot use Unicode and has to resort to byte twiddling should be a clue, you know.

Comment Re: and... (Score 2) 196

No, all that means is that EVERYTHING has to be changed to use the bytes type.

I mean every single library function that takes a unicode string, every use of ParseTuple that translates to a string, etc. Pretty much the entire Python library must be rewritten, or a wrapper added around every function that takes a string argument.

Everybody saying that "it's good to catch the error earlier" obviously has ZERO experience programming. Let's see, would it be a good idea if attempting to read a text file failed if there was a spelling error? Or perhaps it might be a good idea to defer this problem until it actually makes a difference?

This crazy belief that somehow some physically possible patterns of bytes will just magically not happen because you said they are "invalid" is inexplictable. No other system than UTF-8 seems to cause this weird brain damage, no other system is so totally unprepared for invalid storage and pretends that all storage will be valid. I cannot explain it except that it seems like exposure to ASCII where all bytes sequences are always valid has rotted people's minds so that they dismiss the problem.
 

Comment Re: and... (Score 3, Informative) 196

This exactly.

If your UTF-8 string is not completely valid, Python 3 barfs in useless and unpredictable ways. This is not a problem with Python 2.x.

Until they fix the string so that an arbitrary sequence of bytes can be put into it and pulled out *UNCHANGED* without it throwing an exception then it cannot be used for any serious work. Bonus points if this is actually efficient (ie it is done by storing the bytes with a block copy).

Furthermore it would help if "\xNN" produced raw byte values rather than the UTF-8 encoding of "\u00NN" which I can get by typing (gasp!) "\u00NN".

Comment Re:Been terrific for me and my employees (Score 1) 578

Yea I would agree that it seems more fair if the company instead made a 50/50 split, so the employee is now paying $100 and the company another $100. The main reason this seems fair is that I'll be that if the cost went *up* they would not eat all the extra but would have split the higher cost so the employee paid more.

Comment Re:Or Preexisting conditions. (Score 1) 578

Real answer: I have had or experienced medical care in England, Spain, and the US. Despite horror stories I saw no difference and the English medical care at an Emergency room was far faster and got directly to the solution rather than using referrals. They tried to get me to stay overnight and I kind of got out of that but I now feel (having later had to spend a significant stay in a very new American hospital and realizing the English one was just as clean and new-looking) that perhaps I had been scared by propaganda. Spain was completely free clinic even though the patient (not me) was a visiting tourist and was also really fast and friendly. But that was not a major medical emergency.

In England there certainly are complaints about the Dental system. The NHS is not paying enough and dentists can get out of serving NHS patients so there is either huge lines or you pay a lot. I did not experience it so I can't say first-hand, but this is the one area where I believe the US system is superior. There was some other posts here pointing out that how Dental works here with users actually able to and having a motive to do price comparisons may be an explanation. I also know first-hand (being across from the USC Dental School) that poor are served by these for free, though I am unsure if this is enough to make up for the lack of an NHS-style government program to serve them.

I am unsure how that could be applied to major medical however: if your deduction is $3000 then you don't care if the hospital is going to charge $10000 or $50000, that's a good deal different from comparing a $50 or $100 cleaning. Maybe it could apply to doctor's visits but then people just don't go at all if it is not free, while they will get their teeth cleaned because it is an obvious service, not just somebody looking at you.

By far the worst place I ever saw was when I was a kid and went with my father to an emergency room in Vegas. We went to the public hospital and it was a kafka scene, pretty horrible. After hours we finally saw somebody, who realized my father had insurance and said we were at the wrong hospital, and sent us to the really nice and clean and completely empty private one where he was treated within 30 minutes of arrival (it was a fractured ankle). This is before Reagan signed the law that said all emergency rooms must treat all incoming patients. I think it is interesting that this has not turned all emergency rooms into this scene, instead the ones I have been to since seem to be as nice as that empty private one was.

Comment Re:I went back to corporate America because Obamac (Score 1) 578

The problem is that people who don't pay for routine medical care don't die. Instead they get *major* medical care and thus cost the system a lot more. You car example would match more if what happened if a person refused to go to work because the transportation cost too much then the work would be forced to charter a helicopter for them.

Slashdot Top Deals

Eureka! -- Archimedes

Working...