TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tk9.0: CGo-free, cross platform GUI toolkit for Go

228 pointsby nateb20226 months ago

19 comments

Shorel6 months ago
Back in the day, I used to really dislike anything TK related. It looked old and ugly.<p>Now it looks like a wonderful alternative to all the bloated, wasteful, Electron JS applications out there.
评论 #42271011 未加载
评论 #42269405 未加载
nateb20226 months ago
Includes beautiful modern themes, e.g. azure <a href="https:&#x2F;&#x2F;pkg.go.dev&#x2F;modernc.org&#x2F;tk9.0@v0.53.0&#x2F;themes&#x2F;azure" rel="nofollow">https:&#x2F;&#x2F;pkg.go.dev&#x2F;modernc.org&#x2F;tk9.0@v0.53.0&#x2F;themes&#x2F;azure</a>
tecleandor6 months ago
Edit: CORRECTION! This is a person that used to use the cznic nickname, maybe because they worked in CZNIC for a while, but now goes by &quot;modernc&quot;<p>Seems like they&#x27;ve been involved in transpiling C projects, like TCK, to Go.<p>Some context: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33197603">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33197603</a><p>==previous message before my edit==<p>Oh, seems like this is made by CZNIC, the org that admins .cz TLD.<p>They&#x27;ve also done the Omnia Turris routers, KNOT DNS server or BIRD routing daemon...
评论 #42268349 未加载
评论 #42271436 未加载
echoangle6 months ago
As someone who doesn’t know a lot about go: why is CGo-free a feature? In what situations is CGo (which is basically just calling C libs from go, right?) bad?
评论 #42269281 未加载
评论 #42269175 未加载
评论 #42269458 未加载
评论 #42271473 未加载
评论 #42271572 未加载
评论 #42269773 未加载
评论 #42270833 未加载
评论 #42271616 未加载
kristopolous6 months ago
That motif toolkit with the detachable pulldowns and diamond shaped radios...<p>I know tk has moved on but I have not.
评论 #42272220 未加载
评论 #42268516 未加载
cyberax6 months ago
Oh wow! This is super-cool.<p>It&#x27;s too ugly for &quot;general-purpose&quot; apps, but it looks to be perfect for internal management apps (control panels, tools). I&#x27;m definitely going to try it for my key-management server.
评论 #42269834 未加载
评论 #42270970 未加载
drbig6 months ago
Tk! Some things just work. Never underestimate proven tech.
koito176 months ago
How does this avoid Cgo? In the case of Ltk (FFI-free, Common Lisp bindings for Tcl&#x2F;Tk), I know that the library communicates strings to a Tcl interpreter. This means no FFI is involved, but it does mean the user must have Tcl -- specifically, wish -- installed. Is there a similar requirement for this library?<p>Unfortunately, GitLab is locked behind Cloudflare turnstile and I can&#x27;t access the source code.
评论 #42269418 未加载
评论 #42271226 未加载
评论 #42269344 未加载
wjholden6 months ago
I&#x27;m really impressed that it can render math from TeX input. Is this a common thing in GUI toolkits? My graphics experience is mostly limited to Java&#x27;s Swing and OpenGL from my college days.
评论 #42268498 未加载
mm_aa6 months ago
This looks perfect for my command line go app. I wanted to add config wizard all along.<p>One question though: app is primarily distributed through docker. Can docker app open a window somehow on all platforms? How?
oefrha6 months ago
How I wish andlibs&#x2F;ui (actually native widgets) wasn’t abandoned in a half-done state. Now to build any GUI in Go that doesn’t look abominable I have to use Wails, this is no exception.
rob746 months ago
Hm... the examples look nice, but there are several examples that render graphics and&#x2F;or text on a canvas. How about demonstrating more complex controls, e. g. list views?
joseph20246 months ago
It is cgo-free, but it seems to require several libraries. I am concerned that some people may misunderstand that it can be run as a single static binary.<p>$ ldd libtcl9tk9.0.so linux-vdso.so.1 libXft.so.2 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libXft.so.2 libfontconfig.so.1 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libfontconfig.so.1 libX11.so.6 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libX11.so.6 libXss.so.1 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libXss.so.1 libm.so.6 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libm.so.6 libcups.so.2 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libcups.so.2 libc.so.6 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libc.so.6 libfreetype.so.6 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libfreetype.so.6 libXrender.so.1 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libXrender.so.1 libexpat.so.1 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libexpat.so.1 libxcb.so.1 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libxcb.so.1 libXext.so.6 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libXext.so.6 &#x2F;lib64&#x2F;ld-linux-x86-64.so.2 libgssapi_krb5.so.2 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libgssapi_krb5.so.2 libavahi-common.so.3 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libavahi-common.so.3 libavahi-client.so.3 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libavahi-client.so.3 libgnutls.so.30 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libgnutls.so.30 libz.so.1 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libz.so.1 libbz2.so.1.0 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libbz2.so.1.0 libpng16.so.16 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libpng16.so.16 libbrotlidec.so.1 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libbrotlidec.so.1 libXau.so.6 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libXau.so.6 libXdmcp.so.6 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libXdmcp.so.6 libkrb5.so.3 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libkrb5.so.3 libk5crypto.so.3 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libk5crypto.so.3 libcom_err.so.2 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libcom_err.so.2 libkrb5support.so.0 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libkrb5support.so.0 libdbus-1.so.3 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libdbus-1.so.3 libp11-kit.so.0 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libp11-kit.so.0 libidn2.so.0 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libidn2.so.0 libunistring.so.5 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libunistring.so.5 libtasn1.so.6 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libtasn1.so.6 libnettle.so.8 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libnettle.so.8 libhogweed.so.6 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libhogweed.so.6 libgmp.so.10 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libgmp.so.10 libbrotlicommon.so.1 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libbrotlicommon.so.1 libbsd.so.0 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libbsd.so.0 libkeyutils.so.1 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libkeyutils.so.1 libresolv.so.2 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libresolv.so.2 libsystemd.so.0 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libsystemd.so.0 libffi.so.8 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libffi.so.8 libmd.so.0 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libmd.so.0 libcap.so.2 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libcap.so.2 libgcrypt.so.20 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libgcrypt.so.20 liblz4.so.1 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;liblz4.so.1 liblzma.so.5 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;liblzma.so.5 libzstd.so.1 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libzstd.so.1 libgpg-error.so.0 =&gt; &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;libgpg-error.so.0
karel-3d6 months ago
Oh it&#x27;s another of those modernc projects, where it&#x27;s just C, transcompiled to go?<p>Yes, it is.<p><a href="https:&#x2F;&#x2F;gitlab.com&#x2F;cznic&#x2F;libtcl9.0&#x2F;-&#x2F;blob&#x2F;master&#x2F;libtcl9_0_linux_arm.go?ref_type=heads" rel="nofollow">https:&#x2F;&#x2F;gitlab.com&#x2F;cznic&#x2F;libtcl9.0&#x2F;-&#x2F;blob&#x2F;master&#x2F;libtcl9_0_l...</a><p>So the &quot;actual source&quot; is still C, but it is CGo-less. Which is neat? But I am not sure how it performs in bigger apps, what are its limitations, etc.
tonymet6 months ago
how does this handle state management and event delegation? As in, when state is modified in one control , it instantly updates in the other controls.<p>The examples show how to draw controls, but that’s the easiest and least interesting part of GUI apps
oblio6 months ago
He he, is this based on Tcl? It for sure seems at least inspired by Tcl&#x2F;Tk.
评论 #42268142 未加载
评论 #42268150 未加载
评论 #42268137 未加载
fithisux6 months ago
Tcl&#x2F;Tk the hidden hero.
hajimuz6 months ago
CGO free. TK. I’m sold. imgui user.
baq6 months ago
Figma killed the desktop app. I yearn for the good old days of standardized UI if I actually need to get shit done efficiently. Nowadays it&#x27;s learning everything from either scratch; maybe if you&#x27;re lucky, the designer put in some &#x27;intuitive&#x27; (read &#x27;fashionable&#x27;) interactions.
评论 #42268612 未加载
评论 #42268258 未加载
评论 #42268469 未加载