Re:On Stack Overflow's recent battles with the .NET Garbage ...
by cookiecaper on Friday October 28, 2011 @03:52AM
(#3167416)
I wonder whether all those gymnastics were more prudent than simply writing a C module to filter questions and feeding the results back to the C# web app. Opinions?
[ Parent
| on HN ]
Re:On Stack Overflow's recent battles with the .NET Garbage ...
by melling on Friday October 28, 2011 @07:50AM
(#3167883)
Jeff doesn't know C. Should he learn C was an ongoing topic in Jeff and Joel's StackExchange podcast, which was actually somewhat entertaining. Time for another episode.
Re:On Stack Overflow's recent battles with the .NET Garbage ...
by rbanffy on Friday October 28, 2011 @08:46AM
(#3168018)
Which episode was that?
Re:On Stack Overflow's recent battles with the .NET Garbage ...
by melling on Friday October 28, 2011 @09:36AM
(#3168160)
It has been a while so I can't remember. They were getting people to do the transcripts for their shows.
http://meta.stackoverflow.com/questions/19244/community-podc...
If your Google-Fu is good.
Re:On Stack Overflow's recent battles with the .NET Garbage ...
by jcheng on Friday October 28, 2011 @04:08AM
(#3167448)
I was thinking the same thing. This problem seems extremely well suited for C/C++, and C#/.NET makes it very easy to call directly into native libraries.
Re:On Stack Overflow's recent battles with the .NET Garbage ...
by sams99 on Friday October 28, 2011 @04:46AM
(#3167508)
I agree this is a totally valid option, trouble is we have no c experts on core team so it would raise the cost of maintaining. Also the code is fairly complex, moving to structs was fairly simple compared to a c port.
Re:On Stack Overflow's recent battles with the .NET Garbage ...
by cookiecaper on Friday October 28, 2011 @02:40PM
(#3169508)
Sounds like the perfect opportunity for someone to become a C expert. Something like this just throws up a lot of red flags. If Microsoft changes some of the methodology in its GC or further demotes structs, your solution may fall apart. It just sounds like something that requires tight manual memory management to get right and remain stable.
Re:On Stack Overflow's recent battles with the .NET Garbage ...
by dbattaglia on Saturday October 29, 2011 @08:19AM
(#3171718)
Well, in essence what they did is just store their tag data right on the stack, using CLR structs (which are pretty similar to a C struct or c++ struct/class - allocated on the stack by default). I guess they could have also wrote their own memory allocator, but I'm not so sure it would have been any simpler than the custom allocator they would have implemented in C#, had they went with the AllocHGlobal route. And then they would still have to deal with data marshaling between their native and managed code. Not saying that is necessarily a problem, but it's not always trivial either (especially marshalling custom struct types without causing boxing).
Re:On Stack Overflow's recent battles with the .NET Garbage ...
by chadgeidel on Friday October 28, 2011 @11:12AM
(#3168576)
Or, at the very least perhaps drop to unmanaged code?