News for hackers. Stuff that matters.
Re:TinyGo: New Go Compiler Based on LLVM by 0815test on Thursday July 18, 2019 @08:56PM (#20475392)
I have some trouble seeing the point of a Go compiler/implementation without any working GC, or with the only GC being a problematic mark+sweep implementation. Is this just a proof-of-concept effort, or do they expect to add workable GC down the line?
Re:TinyGo: New Go Compiler Based on LLVM by tyingq on Thursday July 18, 2019 @09:36PM (#20475545)
Personally, I welcome all comers, regardless of intent or completeness. That they offer a minimal refcounted implementation for the platform more likely to need it sooner seems to signal good intent.

I say this watching 30+ years of alternate implementations of different languages and runtimes. Even those that failed (or maybe moreso) indirectly inspired positive changes in the survivors.

Re:TinyGo: New Go Compiler Based on LLVM by mook on Friday July 19, 2019 @12:00AM (#20476065)
While I have no insight to their plans, perhaps a non-GC toolchain could still be used for short-lived programs (such as command line tools)? Don't even need to free anything if it's short enough, the OS can deal with it when the process exits
Re:TinyGo: New Go Compiler Based on LLVM by antisemiotic on Friday July 19, 2019 @06:28AM (#20477431)
>a non-GC toolchain could still be used for short-lived programs (such as command line tools)

Or missile firmware: https://groups.google.com/forum/message/raw?msg=comp.lang.ad...

Re:TinyGo: New Go Compiler Based on LLVM by iampims on Friday July 19, 2019 @12:56AM (#20476282)
You can already do this: GOGC=off [1]

[1] https://blog.cloudflare.com/go-dont-collect-my-garbage/

Re:TinyGo: New Go Compiler Based on LLVM by aykevl on Friday July 19, 2019 @09:28AM (#20478437)
https://tinygo.org/usage/important-options/ Take a look at the `-gc` flag. The values have changed in the latest version (need to update the docs!) but it does provide an option to disable the GC entirely.
Re:TinyGo: New Go Compiler Based on LLVM by aykevl on Friday July 19, 2019 @09:44AM (#20478565)
The conservative mark-sweep implementation was the easiest to write: I don't think there is any real GC that is simpler. In the long term, the plan is to add other GCs that are precise and can be used in a real time context. However, note that such a conservative mark-sweep GC is good enough for many use cases already (look at MicroPython!) and that other GCs will likely cause additional RAM/flash bloat.
Re:TinyGo: New Go Compiler Based on LLVM by ComputerGuru on Thursday July 18, 2019 @10:54PM (#20475836)
I don’t know go, but it almost certainly lets you write non-idiomatic go code that doesn’t use GC allocated memory? Usually languages not designed for systems programming have these features for interop purposes (ffi, p/invoke, etc).

Although if that’s the case, I personally don’t get the draw. Typically these managed/higher-level/interpreted languages are harder to use than the embedded-friendly alternatives if you’re not using their automatic memory management. But a lot of times people just want to stick to (really weird and distant) versions of languages they already know/use (D is probably the only exception here for obvious reasons).