Lurker News
Instead of talking jobs, what is everyone up to otherwise? Any interesting going on in life or with your hobby project?

Unfinished and novel ideas are of course most interesting, so feel free to share anything you're thinking about!

Comments (841) 296 threads

Show all comments

Showing thread 105 of 296

lukem5672 replies#
Working on a way to write Oculus Quest apps in Golang. The entire thing is a tower of yak shaving. Current adventure: attempting to write a reactive UI system that doesn't need to dynamically allocate memory.
messe2 replies#
> Current adventure: attempting to write a reactive UI system that doesn't need to dynamically allocate memory.

Avoiding dynamic memory allocation... in Go?

lukem5671 reply#
One of the many yaks! In this case taking memory mapped Vulkan buffers and unsafeing them to various Go arrays and whatnot. I have a gapbuffer implementation on top of this, and then a truly evil "gaptree" implementation that uses gapbuffers to represent a tree data structure.
messe1 reply#
Do you need to work around Go's escape analysis much? I was under the impression that it's good but not perfect, leading to some heap allocation of variables that wouldn't necessarily need it if they were on C/C++.

Continue this thread — 1 reply

throwaway342411 reply#
It's actually easier than you might think: Go has most of the capabilities of C, including calling C APIs like malloc/free etc and casting them to Go data types. Of course (like C) writing code in that way won't be particularly convenient or memory safe.
messe#
Well, yes and no. My concern was the fact that Go's escape analysis isn't always correct (although it's quite good), leading to variables that would be stack allocated in C/C++, being heap allocated in Go.
throwaway34241#
I'm also writing a Quest app in Go, maybe we should chat sometime! I added my email to my profile.