News for hackers. Stuff that matters.
Re:Beating C with 70 lines of Go by __d on Wednesday November 20, 2019 @05:11PM (#21589142)
Right, so when I’m trying to process a network packet in about a microsecond (a reasonable target for financial trading software), Go’s GC rules it out. Many low-level, high-performance systems language tasks aren’t feasible in Go for similar reasons.

That doesn’t make it a bad language, but it’s not universally applicable either.

Re:Beating C with 70 lines of Go by zenhack on Thursday November 21, 2019 @01:21AM (#21591866)
> but it’s not universally applicable either.

Nothing is universally applicable.

But yeah, I certainly wouldn't use it for hard real-time tasks. If you can't tolerate missing deadlines ever, there is a very short list of acceptable tools.

But (and correct me if I'm wrong; it's not my area) HFT doesn't strike me as hard real-time? See also a sibling comment that asks about Jane Street's OCaml use.

It's not like GC pauses are happening constantly; Go programs don't allocate that much, and a well tuned program can go a long time between collections. It likely is appropriate for many soft or firm real time systems. And you can shut the GC off if there are sections where GC really must not happen:

https://golang.org/pkg/runtime/debug/#SetGCPercent

Re:Beating C with 70 lines of Go by __d on Thursday November 28, 2019 @12:16AM (#21654766)
That's how those who use Java do it: write their code to minimize allocations, and then configure the JVM with a GC threshold that's bigger than their whole day's allocations, and manually GC at a suitable time.

Last I looked (a while ago) it seemed like there wasn't quite enough control on the Go GC to do this effectively. It's very likely that's been fixed by now.

Re:Beating C with 70 lines of Go by crematoria on Wednesday November 20, 2019 @11:23PM (#21591445)
Strange. I know OCaml is used in HFT (thanks to all those Jane Street ads) and OCaml is also GC'd. What does OCaml have here that Go doesn't?
Re:Beating C with 70 lines of Go by pjmlp on Thursday November 21, 2019 @02:35AM (#21592126)
Just like in hard real time systems using malloc() rules C out, and its use is explicitly forbidden in certification processes.

I guess C isn't universally applicable either.

Re:Beating C with 70 lines of Go by Gibbon1 on Thursday November 21, 2019 @03:52AM (#21592436)
The difference is, you can write perfectly usable programs in C without littering the codebase with malloc() and free().
Re:Beating C with 70 lines of Go by pjmlp on Thursday November 21, 2019 @03:58AM (#21592457)
Just like you can in Go, as proven by TinyGo.

Or in dozen of other GC enabled systems programming languages for that matter.

Re:Beating C with 70 lines of Go by Gibbon1 on Thursday November 21, 2019 @04:26AM (#21592565)
Tip: Give up dude.
Re:Beating C with 70 lines of Go by pjmlp on Thursday November 21, 2019 @06:05AM (#21593021)
Exactly my tip to the anti-GC luddites.

The difference being evolution, takes care of sorting that out, like in all anti-technology groups throughout mankind history.

[dead]
Re:Beating C with 70 lines of Go by pjmlp on Friday November 22, 2019 @11:34AM (#21607133)
To the extent that my work is open to memory corruption security exploits, with possible high monetary costs, caused by anti-GC luddites.

https://googleprojectzero.blogspot.com/2019/11/bad-binder-an...

Re:Beating C with 70 lines of Go by Gibbon1 on Friday November 22, 2019 @02:36PM (#21609198)
Great we can have system software that's as shitty as user facing now.
Re:Beating C with 70 lines of Go by pjmlp on Saturday November 23, 2019 @02:17AM (#21612895)
"The Singularity research codebase and design evolved to become the Midori advanced-development OS project. While never reaching commercial release, at one time Midori powered all of Microsoft’s natural language search service for the West Coast and Asia."

https://www.microsoft.com/en-us/research/project/singularity...