News for hackers. Stuff that matters.
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go by cedws on Thursday November 28, 2024 @05:55PM (#42269175)
FFI is an additional headache. Instead of having a single hermetic build process that just works, with FFI you now have to deal with shared libraries which may or may not be present, and may or may not support all the architectures or operating systems you want to target. FFI is why so many Python projects blow up when you run pip install. Then it takes sometimes hours to untangle that horror show.
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go by cle on Thursday November 28, 2024 @06:28PM (#42269383)
This is using purego which is still using FFI, it is dynamically linking the C libs so you still have the same shared library issues. You don’t have to setup a C compiler toolchain though which is nice.
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go by Onavo on Friday November 29, 2024 @12:18AM (#42271048)
Why don't they just compile to C to Go like modern c does for SQLite?
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go by masklinn on Friday November 29, 2024 @01:09AM (#42271294)
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go by Onavo on Friday November 29, 2024 @12:34PM (#42275445)
I mean why don't they do it for the source library too? There are very few operations in C that can't be done in Go (mostly inline assembly and some pointer manipulation) under a standard userland assumption.