|
Good grief.
I worked in Byfleet for most of the 90's and some the 00's ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I've lived in the area (Molesey, Walton, West Byfleet and now Woking) since 1995. Strange how we never met.
|
|
|
|
|
Condolences. Once the alcohol ban was lifted in South Africa there was a marked increase in traffic incidents, etc.
|
|
|
|
|
I'm curious. Was there a lot of organized crime involving alcohol before the ban was lifted?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I'm not sure. What I was referring to is more drinking and driving, causing accidents, getting drunk and then being involved in fights, etc.
|
|
|
|
|
OriginalGriff wrote: blow stuff up
you mean fireworks. I never saw anything actually get blown up on 4th of July. Interesting.
|
|
|
|
|
Drunk Americans (heck, drunk anyone) plus a huge amount of fireworks means anything can happen ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Slacker007 wrote: I never saw anything actually get blown up on 4th of July.
*grabs 3 boxes of sparklers and some duct tape*
hold my beer
Real programmers use butterflies
|
|
|
|
|
that won't blow up, even if you grab 300 boxes. won't blow up. no explosion. just a big fire.
here's your beer back.
|
|
|
|
|
Any high accelerant will explode if encased tightly enough. Considering I used to build sparkler bombs I can tell you you're wrong here. Sorry.
Sparkler bomb exploding - youtube[^]
Real programmers use butterflies
|
|
|
|
|
He who has a fifth on the fourth won't venture forth on the fifth.
|
|
|
|
|
Talk to me | CommitStrip[^]
I hate it when that happens!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
That's the Schroedinger error.
|
|
|
|
|
Or a log flood that consumes all available resources.
|
|
|
|
|
The dread heisenbug strikes again!
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Daniel Pfeffer wrote: The dread heisenbug strikes again!
are you sure? I have some uncertainty (in principle)
|
|
|
|
|
This is like problems that only happens in release mode - but work perfectly fine in debug mode.
But then, there's entire articles dedicated to this topic...
|
|
|
|
|
dandy72 wrote: But then, there's entire articles dedicated to this topic...
Which can be boiled down to "your 'uninitialized' variables are getting initialized to different values in debug than release"
Real programmers use butterflies
|
|
|
|
|
Nowadays, sure.
I wasn't clear with my intent, but I meant there's numerous articles discussing how to debug release-mode apps, not why apps might behave differently.
|
|
|
|
|
I have the basis for what might be an interesting article in and of itself within my MIDI library.
There's a very tricky call i have to make that relies on passing essentially variable length structs, and consequently, the .NET marshaller cannot handle it out of the box. Instead of using StructLayoutAttribute and MarshalAsAttribute to mark up your structure and p/invoke function calls, you basically need to use StructLayoutAttribute and then use the Marshal class methods to copy the variable length portion in manually.
I don't know how many people have run into P/Invoking into C style libraries that take variable length structs, so is anyone interested in this?
I'd rather put this out there up front before I spend time and effort on an article that nobody cares about, and this is kind of arcana.
Edit: Big thanks folks. Your responses let me know there was some interest and I'm in the process of writing it.
Real programmers use butterflies
modified 4-Jul-20 7:37am.
|
|
|
|
|
As you and I have discussed, I think it would be worthwhile .. sure, I can pull apart your code and but that won't necessarily make it obvious
This will become another resource, along with Luc Pattyn's Article: P/Invoke, part 1 and to a much lesser extent pinvoke.net: the interop wiki!
My biggest achievement along the same lines I can't show in code, a) because it was commercial - wrapping a c++ PGP library and creating a C# layer for it, b) iirc it was relatively 'simple' structs etc
|
|
|
|
|
|
|
I'd read it
|
|
|
|
|
I posted it here: P/Invoke Jujitsu: Passing Variable Length Structs[^]
I hope you enjoy it.
I've been doing p/invoke so long and C coding before that that I kind of forget what people don't know when it comes to it. I didn't want to recover beginner P/Invoke stuff but let me know if I didn't explain something very well, when you get a chance to look at it.
Real programmers use butterflies
|
|
|
|