11,763 reputation
34163
bio website
location
age
visits member for 3 years, 8 months
seen 8 hours ago

C# developer, pretty standard stuff. SOLID and other such principles drive everything I do for the most part. Other than that, polyglot lover of functional programming in Haskell, F#, Erlang, and javascript. Player of each, master of none.

  • Monads are like buckets, that's what they say anyway.
  • Monoids are easy! I guess?
  • Comonads are just objects... however that works O_o
  • Cartography has nothing to do with these things.

Cheers.


Apr
14
comment Is Red Star OS released under the GPL?
I'm voting to close this question as off-topic because it has nothing to do with programming.
Apr
10
comment Advantages of the imperative style over the functional style
Truth be told, you're bumping into the same thing everyone I've seen learn FP has bumped into: There seems to be no reason not to use it, other than people don't know it; and all the negatives people tend to throw around are generally thrown around by folks who haven't taken the time to actually learn FP first. I've yet to find someone who actually knows FP who doesn't prefer it over imperative.
Apr
6
awarded  Great Answer
Mar
25
awarded  Enlightened
Mar
20
comment Is CORBA outdated?
they're called cobras...
Mar
20
comment What principle is violated by having a button do two radically different things or screens act radically different depending on the situation
this is like the cannonical case for POLA
Mar
19
comment When is it a good idea to force garbage collection?
Also your second suggestion is talking about compacting a bunch of large objects, but by default in .NET the LOH doesn't have compaction on. You can manually turn it on and try to compact the LOH if you really want I guess, but you should add that detail if you're suggesting people compact their LOH. Alternatively it would make more sense if you're talking about a lot of small objects rather than large objects, because the SOH does do compaction. Though if those objects were only going to be short lived, you really don't want to bloat your Gen1/2 heap with all of them with a collection.
Mar
18
comment When is it a good idea to force garbage collection?
@DanielPryden good point; when I said references I meant meaningfully holds onto, but there are surely optimizations that allow objects to become unrooted mid method when they're no longer relevant. I'll tweak my language there to be a little clearer, good catch.
Mar
18
awarded  Guru
Mar
18
comment When is it a good idea to force garbage collection?
@Den after reading my description above of the mechanics (as I understand them), what would be the benefit as you see it? You clean out a large number of objects - in the SOH (or LOH?)? Did you just cause other threads to pause for this collection? Did that collection just promote twice as many objects to Gen 2 as it cleared out? Did the collection cause compaction on LOH (do you have it turned on?)? How many GC heaps do you have and is your GC in server or desktop mode? GC is a feckin' ice berg, the treachery is below the waters. Just steer clear. I'm not smart enough to comfortably collect.
Mar
18
comment When is it a good idea to force garbage collection?
Your first idea of an ok time is just bad advice in my opinion. Chances are high that there has been a collection recently so your attempt at collecting again is simply going to arbitrarily promote objects to later generations, which is almost always bad. Later generations have collections that take longer to begin with, increasing their heap sizes "to clear out as much space as possible" just causes this to be more problematic. Plus if you're about to increase memory pressure with a load, you're likely to begin inducing collections anyway, which will run more slowly because increased Gen1/2
Mar
18
awarded  Good Answer
Mar
18
awarded  Nice Answer
Mar
18
comment When is it a good idea to force garbage collection?
I'm going to win simply by having pushed you so far below the fold :D neener neener!
Mar
18
revised When is it a good idea to force garbage collection?
added 180 characters in body
Mar
18
revised When is it a good idea to force garbage collection?
added 181 characters in body
Mar
18
revised When is it a good idea to force garbage collection?
added 181 characters in body
Mar
18
revised When is it a good idea to force garbage collection?
added 181 characters in body
Mar
18
revised When is it a good idea to force garbage collection?
added 181 characters in body
Mar
18
comment When is it a good idea to force garbage collection?
@FlorianMargaine yeah... saying anything about "GC" across all implementations really doesn't make sense..