Live data from Hacker News

Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

github.com

21–30 of 63 posts

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#21
post #18

Earlier quoted context omitted.

Don't leave us hanging! What did you use instead 3 weeks ago?

Wails https://wails.io >. I wanted to use Go but wasn't as familiar with native UI as with HTML/CSS/JS, I tried out most of the other popular Go UI frameworks too though they didn't feel as comfortable to use as Spot's React-like model. Wails is still pretty epic as well though.

oh this looks great

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#22

If only I had known about this (or judging by commit history, if it existed) ~3 weeks ago. I've been saying for ages that either React ported to Go or a React-like framework for Go would be an incredible development experience, so this looks perfect (I used to be a big hater of React.js until I was enlightened by React.lua).

I had the same problem - really liked the way I used to do component composition in React, it was hard to go back.

Eventually found a way to do something similar using just the standard Go html/template.

I’ve written about the implementation here:

https://www.sheshbabu.com/posts/react-like-composition-using...

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#27
post #6

Cool! What does building for cross platform look like? Would love if there was a command that produced my MacOs .app and Windows exe without me having to dive into package management/containers/signing headaches per platform.

That'd be amazing not only for go apps but for software built on other languages as well. I'd pay for a good, straightforward build packing + crash reporting + autoupdater solution for my apps.

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#29

Fltk supports windows. Will you be using another solution and that’s why u don’t support windows yet?

Given the right C compiler and everything, Spot should work without changes on Windows (and select the FLTK) backend.

My (low prio, though) goal is to implement a Win32-based backend, though, the first step is done: https://github.com/roblillack/spot/pull/4

Re: Show HN: Spot – Simple, cross-platform, reactive desktop GUI toolkit for Go

#30

I'm curious to hear your take on this: what's the advantage of following the virtual control tree approach compared to instead updating directly the controls that are displayed to the user?

For complex scenarios (i.e. the user interacting with the UI while there are some long-running processes in the backround doing this, too), managing the state quickly gets unwiedly: You need to write callback code everywhere that carefully has to inspect the current status of all other activities and might then updates 10s of widgets accordingly.

With the reactive approach you are able to write a single rendering function that describes the interface for any given state and the framework takes care of the rest (when to call that function, what "input" to give it).

It's just way easier to wrap my head around this and after working with React it is hard to go back. Hence the experiment to see if something comparable could be done in Go.

Post reply on HN