Curious why you're using pipes to communicate when you can use CGO to make the go stuff it's own static C library and communicate bidirectionally that way? Granted it's a bit more complex than that sounds (I've did this to bring v.io to iOS), but I'd figure that'd still be easier than the alternative?
I don't know what the Go library looks like in terms of an API, but the pipes are already requiring serialization. This at least makes that hookup slightly easier, although CGO bridge has some overhead to it, so it wouldn't completely surprise me if a FIFO unix buffer was in fact faster especially if there's serialization in both situations.
https://theblackbox.ca/blog/primitive-triangles/
Awesome, I see you've added new features too. There goes my evening. A suggestion for video, allow loading the shape data for the previous frame and use that as a starting point. Could bring you closer to real time processing :)
Need to use it in some paintings though
Just tried it out, and it is probably the coolest 'Show HN' I've ever seen. Spent the last 2 hours playing around with some pictures and different configs, and I absolutely love what this is doing.
Also, really appreciate that you provided a value add to the product sold, without compromising the open source core. Thank you for that.
Anyways, good job, and good luck. Hope this sells tons, cause it truly is amazing.
I have previously implemented a "compressed sensing" image system in Processing, this produces very similar results.
I was wondering whether you will be adding support for exporting animations, both of the image being built up and (as you mention) of many images matching criteria formed from different seeds.
Do you mean you just ship a compiled Go binary as part of your app and interact with that? If yes, did apple not say anything about it during review?
I saw that you can call Go in mobile apps [0]. I'm wondering if that's also applicable for desktop apps
You need a constraint that guarantees for example that without any changes in the video, you won't see any changing primitives.
The site shows an example of what a still image looks like if rendered with the same parameters several times; it provides an interesting animated effect. I think that might produce an interesting animation style.
But for a more consistent style between frames, it'd help to have a way to seed the RNG consistently.
For example: what if you have a minor change in the area of the screen that got the first primitive (and hence used the first few RNG numbers)? Then all the remaining primitives will use different RNG numbers.
I think the problem becomes more difficult: you want to find the primitives that result in the minimal change wrt the previous frame.
(I will note that the website horizontally scrolls at 1024x768. A lot of sites do, though.)
https://github.com/dontpanic92/wxGo/issues/8 needs work though fyi
As a result, I decided to follow through and make more of it. So today I am announcing Primitive for macOS, now available on the Mac App Store.
The core is still implemented in Go. The GUI is written in Objective-C (haven't bothered to learn Swift yet!) and communicates with the Go process over stdin/stdout via NSTask and NSPipe. The rendering is done on the front-end; the backend just sends shape coordinates and such.
I spent a lot of time fleshing out the GUI layout to make it as simple yet powerful as possible. I hope you find it to be intuitive and I hope that you are pleased with the resulting images. I look forward to seeing what people do with the app. :)
Let me know if you have any questions!