3 ms·
Those have suboptimal GC implementations because of the lack of primitives to do better. Some just straight up use reference counting and leak anything with ci
by monocasa 7y ago
Those have suboptimal GC implementations because of the lack of primitives to do better. Some just straight up use reference counting and leak anything with circular references.
- pjmlp 7y agoSo what? Yes some have buggy implementations, others could do better, yet they exist. I rather have a half working bicycle that takes me to town than none at all.
- monocasa 7y agoWhat is a "half working bicycle that takes me to town". Like by definition it fulfills it purpose. A garbage collector that breaks down on circular references is crazy town for real work. Like there's even AI Lab Koan about that specifically. http://catb.org/jargon/html/koans.html http://catb.org/jargon/html/koans.html A better example would be a bicycle without the front wheel. Yeah, if you're real good and real careful you can probably treat it as a unicycle and get to where you're going, but you'd be real pissed if someone sold it to you as a working bicycle, no?
- pjmlp 7y agoNot all GC enabled languages that currently target WebAssembly are buggy as you make it to be. PNaCL also did not have direct GC support, yet it got released with working OCaml support.
- monocasa 7y agoDid anyone actually use that OCaml support? Like a single production application?
- pjmlp 7y agoMaybe yes, maybe no. Enjoying moving goalposts?
- monocasa 7y agoIt's not moving goalposts. If nobody is using it, not even the developers who put in the effort to make it work, it's a pretty good sign it's not a production ready solution. Like "technically works enough for a demo" isn't what I'd call full support.
- pjmlp 7y agoThe whole point of this thread was that implementing a GC is possible with what WebAssembly provides today, no need to wait for an API that might never come. Yes there are bugs in some implementations and others could have been better done, it happens. Discussing technicalities of who is using what in production is moving goalposts. Not a big fan of having lost PNaCL in favour of WebAssembly craziness, but that is what we have to work with, GC might come in 5 years time or even never, who knows. What I know is that despite the flaws, many developers are eager to implement something with what we have now and kudos to them for trying it out. “They did not know it was impossible so they did it” ― Mark Twain
- monocasa 7y agoLike, a no-op GC is a valid implementation as long as your code doesn't allocate too much in the first place. If you ran into that would you consider their implementation buggy and just give them time? Similarly reference counting based GCs _can't_ do anything other than leaking object graphs with circular references, fundamentally. It's not a buggy implementation, it's a fundamental limitation of the technique. Also, I looked into it. PNaCl couldn't run OCaml, only NaCl. PNaCl (and wasm) doesn't really let you scan stacks, but NaCl does, so they had to drop a real GC with the semantics you'd expect on the transition to PNaCl. "They did know it was impossible, so they didn't bother" ~ monocasa And once again, explaining why your examples aren't valid and refuting them isn't "moving goalposts".