|
W∴ Balboos wrote:
In these parts, the term is Surfing - but that's out, too. |
Ah, I see you have the machine that goes ping. This is my favorite. You see we lease it back from the company we sold it to and that way it comes under the monthly current budget and not the capital account.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
So they've been promising 30-45 cm snow for today
We're expecting 6-12 inches but ..., Since yesterday, I've been jokingly telling my friend that a fake news.
Bryian Tan
|
|
|
|
|
Meanwhile, in Arizona...
(PIEBALD exits, whistling innocently.)
|
|
|
|
|
I just heard our local weatherman claim this deserved to be called the snowstorm of the century.
Just like the 3 other ones he described in the same way last winter.
|
|
|
|
|
That's why I've taken to checking out the NWS for my weather. Particularly for extreme weather.
No emotion. No need for ratings. No opinions - just probabilities.*
Then, too - why not hype it? Everyone seems to go and buy out the supermarkets whenever the sky determines it's time to phart. There has never been a food shortage that I can remember - except for Sandy - and that wasn't a real shortage since you couldn't stay in your home, anyway (and the food they bought was ruined).
Must be a need for millennials: they don't have good movies, music, or, with their face glued to their phone, a life. I guess they need something to be proud of.
* For hurricane season.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
xkcd: Chat Systems[^]
Munro is so on the money with that one. When are people gonna stop trying to reinvent the wheel with all these "productive" communication apps?
One morning I shot an elephant in my pajamas. How he got in my pajamas, I don't know.
|
|
|
|
|
Absolutely spot on! I wasted 10 minutes of my life yesterday trying to work out which one of the social face-ache / messaging systems had sent me a notification that I actually (for once) needed to read
|
|
|
|
|
Where is ICQ?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Top left, just below Skype
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Wall (bathroom) should be much more prominent, as should Apache Request log.
Not because they're more used, but because they're better used.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
The answer to that also comes from XKCD
|
|
|
|
|
Instead of just complaining about it, I set out to fix it. Although maybe "fix" is a big word for what I'm doing since I'm not building it into the language, just adding it on as a class library. As a result it does not mix with normal code well.
Here is an example of what it would look like:
SIMDcode s = new SIMDcode(_ =>
{
var ptr = _.arg(0);
var size = _.arg(1);
var constants = _.arg(2);
var w = _._mm_loadu_si128(constants, 0);
var shufmask = _._mm_loadu_si128(constants, 16);
var alpha = _._mm_loadu_si128(constants, 32);
_.repeat(size, 4);
{
var p = _._mm_load_si128(ptr, 0);
p = _._mm_maddubs_epi16(p, w);
p = _._mm_add_epi32(p, _._mm_srli_si128(p, 2));
p = _._mm_srli_epi32(p, 6);
p = _._mm_shuffle_epi8(p, shufmask);
p = _._mm_or_si128(p, alpha);
_._mm_store_si128(ptr, 0, p);
_.add_r_i(ptr, 16);
}
_.endrepeat();
});
The "meat" looks just like "intrinsics" like you're used to (or not, if you've never worked with them), but in this case they're not proper intrinsic functions. When executed they build up some internal representation of the code, which is then compiled and written to unmanaged memory. That is also why it needs the "weird stuff" such as `arg` and `repeat` and `add_r_i` - normally normal code fills those rolls but here normal C# code will just execute once, it does not itself end up in the native code.
The native code generated by the example above is
push rbp
mov rbp,rsp
vmovdqu xmm0,XMMWORD PTR [r8]
vmovdqu xmm1,XMMWORD PTR [r8+0x10]
vmovdqu xmm2,XMMWORD PTR [r8+0x20]
15: vmovdqa xmm3,XMMWORD PTR [rcx]
vpmaddubsw xmm3,xmm3,xmm0
vpsrldq xmm4,xmm3,0x2
vpaddd xmm3,xmm3,xmm4
vpsrld xmm3,xmm3,0x6
vpshufb xmm3,xmm3,xmm1
vpor xmm3,xmm3,xmm2
vmovdqa XMMWORD PTR [rcx],xmm3
add rcx,0x10
sub rdx,0x4
jnz 0x15
leave
ret
To actually invoke the code you define a delegate and ask for a function pointer of that type:
delegate void ToGrayDelegate(IntPtr pixels, int length, byte[] constants);
...
var f = s.GetDelegate<ToGrayDelegate>(0);
Just invoke that as normal. (this runs in 1 cycle per pixel on Haswell, the best I could do in pure C# was 6 cycles per pixel)
This is just a preview, and maybe that's all it will ever be. A bunch of things work, a lot of things do not work yet, because I just threw this whole together in a day.
Anyway I'm not sure how useful this actually is. On the one hand, you wouldn't need a separate C++ project that has to be kept in sync with the main project (but that's not even a real problem). On the other hand, it's more annoying to write code like in the example than to just write C++ with intrinsics. But this way the code can be tuned with run-time parameters (but is that even useful? and you can't do it too often since compiling more code obviously costs time). Theoretically this can easily support x86 and x64 simultaneously (that's a bit of a hassle with native dlls), but choosing one of them at compile time isn't really a problem anyway.
Compared to System.Numerics.Vectors I'd say this is a lot better - it actually allows you to get stuff done, there are all the usual things that you need such as shuffles and shifts and oddball instructions like vpmaddubsw. But compared to a C++ dll it doesn't seem all that useful.
So what do you think. Useful? Interesting? Total waste of time?
modified 14-Mar-17 8:17am.
|
|
|
|
|
Nevermind what anyone else says, this looks fascinating. I would love to see an article or three about this.
This space for rent
|
|
|
|
|
|
Pete O'Hanlon wrote: Nevermind what anyone else says
Damn, now I am not going to be able to say anything.
|
|
|
|
|
An interesting idea. As Pete says, I'd like to see a proper article written about this.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
I second the opinion that an article on this would definetely be interesting, I am a user of SIMD and intrinsics and while I plan to use C# (if and when we will be able to spend the due time necessary to rewrite 60kloc in VB6 unto muche less C#) only for the GUI and leave the meat of elaborations and hardware and I/O processing in C++ I would definetely bookmark such a technique as it could prove useful in a number of situations.
* CALL APOGEE, SAY AARDWOLF
* GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
* Never pay more than 20 bucks for a computer game.
* I'm a puny punmaker.
|
|
|
|
|
If you are not already doing so.
Thought I would share this real world experience with some of the newer developers here.
Do you think you deserve a promotion or a raise in pay? Ask for it.
You can't expect anyone to advocate for you other than...you. I try to take care of my team, and reward those who are on the radar, but sometimes that falls through the cracks and I miss things.
I recently had a team member who felt they were being overlooked on promo/raise. That team member advocated for himself. They brought their concerns to me, we discussed, and now they are scheduled for promo and raise.
It doesn't hurt to ask. If you work at a company where asking can have negative consequences, then you are working at the wrong company and you need to move on.
modified 14-Mar-17 6:46am.
|
|
|
|
|
As my Grannie used to say: "They can only say no".
I'd love to know where the biscuit factory is.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Mark_Wallace wrote: "They can only say no".
Exactly.
However, even if I say no, or upper management says no, that person is now on our radar, and the next time could be yes.
|
|
|
|
|
Slacker007 wrote: However, even if I say no,
I didn't realise you was in management.
Slacker007 wrote: now on our radar
Oh yes, I see you are now.
|
|
|
|
|
|
BURN THE WITCH!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Slacker007 wrote: that person is now on our radar
[Devil's advocate mode] Being on management's radar as someone who is not happy with their salary may not always be a good thing. [/Devil's advocate mode]
|
|
|
|
|
It can be a good thing if you are a valued employee.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|