The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
«While I complain of being able to see only a shadow of the past, I may be insensitive to reality as it is now, since I'm not at a stage of development where I'm capable of seeing it. A few hundred years later another traveler despairing as myself, may mourn the disappearance of what I may have seen, but failed to see.» Claude Levi-Strauss (Tristes Tropiques, 1955)</
I was just talking to a customer about a problem they were having with some of their other systems stemming from the fact that a chr(34) was entered by mistake as part of someone's middle name. The big problems came later that night when the batch processes that feed other systems puked on it! Two days later and they are still not recovered!...but don't quote me on that!
Maybe, but a doublequote character will happily insert/update in a correctly parameterized query. It' more a problem with how it's handled as an output field value. Personally, I've never thought about the consequences of having a doublequote character in a name field. Obviously it would have to be escaped, but then someone would have had to have anticipated it, which they obviously didn't. btw, Happy Birthday again!
Seriously though, the thousands of kids and parents who couldn't get access to their accounts and the cafeteria workers who had to get out the paper and pads were not happy. Now the central office is manually processing thousands of handwritten pages of deposits and transactions in order to get the account balances fixed. She mentioned they would be working today and tomorrow to get it all resolved. Not so funny for them...
After trying to use it for a while, I have found that I don't like it. A month ago or so already, it was at a "usable" point. Meaning that I had written some 7k lines of code that enable the use of SSE and AVX intrinsics from C#, sort of (and only in 64bit mode on an AVX-capable CPU but that would have been fixable).
The problem is, it's just too annoying to use. That whole "your code is executed, which build up some intermediate representation which is then compiled" idea does work, but it's really confusing, mainly because assignment at the C# level translates to .. well, nothing. It changes some C#-level variable, which is useful, but corresponds to re-using a name for a new variable, not assigning to the variable with that name. So there is hack to do actual assignment, but it's far too easy to forget to use it (with, at best, a confusing error message if you forget - usually it's a silent bug), and it has confusing semantics anyway. Additionally, passing data in and out is more annoying than it should be.
I thought it might be possible to improve it all with some small changes, but I've given up.
To be honest I haven't had much opportunity to use SIMD in my general C# use. I've done a few tests for fun and at 200,000,000 integer additions the difference was only 344ms for an array and 302ms for an array of Vector<T> (System.Numerics.Vectors). I imagine it adds up doing continuous processing but I never saw much value for me personally. Of course I'm no expert in this area so I may have missed something.
It works better when you have a higher arithmetic intensity, if you're only going to add them it really quickly becomes a bandwidth problem instead of a compute problem. It also works much better for smaller elements, and when you can use fancy built-ins that have no trivial equivalent in scalar code, such as saturating arithmetic, sum-of-absolute-differences, pshufb both straight and as parallel table lookup, multiply-high, that sort of thing.
On the other hand, most of that is impossible with System.Numerics.Vectors (it sucks), which is why I tried to do this in the first place.
I'm working on my next article which will release all the code associated with my app to Open Source (via code project and github). I was going over my site and remembered this nugget where this stand-up comedian explains what it's like to be a _normal_ user and forget your password.
It is hilarious and may remind people inside IT what it's really like to use a computer as a tool instead of treating it like it's your baby.