HackerTrans
TopNewTrendsCommentsPastAskShowJobs

lomnakkus

no profile record

comments

lomnakkus
·8 yıl önce·discuss
RAID1/10 doesn't really help with data integrity (at least if it's just basic "standard" RAID). It helps against catastrophic media failure and not much else.
lomnakkus
·10 yıl önce·discuss
> well, my point was, in garbage-collected languages you don't have the option to never even engage the garbage collector by creating variables on the stack, while in languages like C++ you can avoid the overhead of malloc/free by using stack variables.

Oh, I see. I can see what you mean, but there are solid techniques for avoiding GC in e.g. JVM-based langauges -- for an example see e.g. Disruptor/Aeron.

I'll happily grant that it's a problem that it can be quite hard to see if you're actually avoiding GC when using these patterns. It'd be interesting if there were a "@no-gc" annotation which could enforce such patterns on the source code. (So, essentially you'd have a compile-time "GC by default, but you can opt-out and the compiler will tell you when you violate that". One can dream.)
lomnakkus
·10 yıl önce·discuss
> that's true, but it's also a moot point because std::shared_ptr is almost never the semantics you want. You want std::unique_ptr.

unique_ptr still has the malloc()/free()[1] overhead, I'm assuming the parent poster just misspoke. One major issue with shared_ptr (which unique_ptr doesn't have) is that it must work properly when different threads have different shared_ptr's (copies of each other) pointing to the same object. This adds overhead.

> Also, you can get away without allocating memory dynamically in a lot of cases (thus not incurring overhead of malloc).

Ok, but we're specifically talking about GC and RC here, so I don't see why you'd bring that up.

> After C++11 and Rust I'm starting to think garbage collection is holding us back from doing research into better approaches to automatic memory management.

GC literally is automatic memory management. (And as others have pointed out, so RC is a form of GC.)

Also, there's lots and lots of research into various different ways of doing automatic memory management.

[1] Alright, they don't literally use malloc/free, but you know what I mean.
lomnakkus
·10 yıl önce·discuss
Are you joking? What's the most obvious explanation here?
lomnakkus
·10 yıl önce·discuss
Yet more evidence (as if we needed any) that racism is alive and well. I was going to try to be all superior by saying "in the US", but it's not really confined to the US[1]. It happens everywhere where there's any obvious way to do the whole "us" and "them" thing, whether that's skin color, gender, etc.

We humans can be terrible :(.

[1] Plus, I caught myself doing the exact thing I was lamenting. (Not "racism" per se, but still "us-vs-them".)