3 ms·
I suspect Go's GC would be particularly well-fit for this kind of application considering it typically runs in <1ms with no exceptionally large pauses (except p
by throwaway894345 5y ago
I suspect Go's GC would be particularly well-fit for this kind of application considering it typically runs in <1ms with no exceptionally large pauses (except perhaps in pathological cases).
Like C#, Go has value types, so controlling allocations should be pretty straightforward.
- throwaway34241 5y agoI had the same thought, it probably wouldn't even interfere with their stated goal of running at 144fps (and of course there would be more Go code analysis libraries available in the Go ecosystem). I could imagine plenty of other reasons to go with C++ though - there's still going to be a higher performance ceiling, maybe they plan to support languages other than Go, maybe they want a minimal file size compiling to WASM or to use specific C++ libraries etc. It would be interesting to see the original author's thinking behind it, on the website it's mainly comparing C++ to web technologies.
- sk0g 5y agoThe Micro [0] editor is written in Go as well, which I was surprised by. It's a tidy piece of software, usually install it to replace nano. [0] https://github.com/zyedidia/micro https://github.com/zyedidia/micro
- noch 5y ago> I suspect Go's GC would be particularly well-fit for this kind of application considering it typically runs in <1ms with no exceptionally large pauses (except perhaps in pathological cases). Lol. " 30% of CPU cycles were being spent in function calls related to GC. " https://blog.twitch.tv/en/2019/04/10/go-memory-ballast-how-i-learnt-to-stop-worrying-and-love-the-heap-26c2462549a2/ https://blog.twitch.tv/en/2019/04/10/go-memory-ballast-how-i...
- jrockway 5y agoThe raw CPU time used doesn't really matter if it doesn't cause the UI to block. It does for server applications; needing 30% more cores costs 30% more money, which you could use for something else. But for tiny programs that run on your workstation, using 1.3% CPU doesn't cost more than 1% CPU. You do have to watch out for the case where you can't use all the cores, and GC is blocking actual computation the user wants to perform. (Also, you're at about 4000 cores when saving 30% buys you another developer. So you have to think about when the right time to unlock that money is, and how much it costs to unlock.) I've been writing a game in Go. The GC doesn't prevent me from getting a smooth 360 frames per second. 1ms is a substantial pause, but isn't even a missed frame.
- throwaway894345 5y ago> But for tiny programs that run on your workstation, using 1.3% CPU doesn't cost more than 1% CPU. Especially considering that text editor state changes are dependent on user interaction—it’s not like a video games where the state changes continuously.
- mbreese 5y agoThe focus on framerates isn’t to account for changes as the user is typing, but rather scrolling. When scrolling through text, is it smooth? Does it tear? For me, that’s what I see when a text editor refers to framerates.
- throwaway894345 5y agoEven still, that constitutes a user event, and not even one that changes the model. Those events presumably come in on the order of tens of milliseconds, so I wouldn't expect this to be a garbage collection problem?
- hnlmorg 5y agoI've written a $SHELL in Go which implements a lot of the same features one requires from an IDE such as low latency keyboard input, events subsystem, syntax highlighting, syntax completion, auto-completion suggestions (popups), etc and all of which needs to be context sensitive. So it's definitely possible to write an IDE in Go. I'd wager the biggest hurdle to writing an IDE in Go isn't the language but rather the lack of mature graphics library bindings. I've seen some attempts at building GUI toolkits in Go but it's fair to say the language's strong points are still firmly in CLI and backend web development domains.
- creation 5y agoGio is a very strong contender for GUI in Go. https://gioui.org https://gioui.org