Live data from Hacker News

Photon Micro GUI

cycfi.com

61–70 of 127 posts

Re: Photon Micro GUI

#61

Earlier quoted context omitted.

Out of curiosity, why isn't Free Pascal high level enough? Also FWIW my LIL scripting language, is sort of Tcl-like and has a Free Pascal implementation (and also a C one) with a (optional) Lazarus drag-drop component: http://runtimeterror.com/tech/lil/ I also have a Lazarus component for FPLIL for exposing a Tk-ish (well, not exactly, but on a similar spirit) API: https://i.imgur.com/G8hto0N.gif Though that last one…

At first glance, LIL does look very similar to Tcl. Do you consider it a stripped-down Tcl or are there other language features you added?

Probably just a stripped down Tcl. Most of the code was written years ago in a week or two, i've only added minor stuff (like a few new functions), improved performance a bit and fixed bugs since then. And the Free Pascal implementation, of course, but that was also done years ago. I've used it in a bunch of my own projects and i've heard a couple of others using it too.

TBH i do not have much experience with Tcl itself outside of writing a few Tk utilities to automate a few bits on my job some years ago. I followed its approach mainly because it sounded like a good combination for being very simple to implement and very flexible to work with, making it ideal for a hosted scripting language (though it doesn't fit all tasks - far from it, especially in places you want even a hint of performance).

So i can't really judge how exactly it differs from Tcl language-wise. It is not compatible as it provides much fewer functions and those work in a different manner. For example there isn't uplevel, but there is upeval which works in a similar manner (though the depth is always one but they can be nested) and there is also downeval (used through upeval to evaluate code back at the environment from where upeval was called), topeval (like upeval but at the toplevel environment), enveval (eval in a function-like environment with optional variable passing in and out) and jaileval (eval in a new, optionally clean, LIL context). Also there isn't much in terms of state notification outside of watch (which i think it works like Tcl's trace but only for variable writes).

I think the syntax is compatible with Tcl (i haven't done any excessive testing to be sure though, LIL was done mainly by "eyeballing" Tcl) so it could be possible to write shims in LIL to be able to write code that works in both, but TBH i wouldn't rely on that.

So i call it just "Tcl-like" in the same sense that JavaScript is a C-like language.

Re: Photon Micro GUI

#62
post #18
post #8

From the author "Photon has its own HTML5 inspired canvas drawing engine using Cairo underneath". That means it should render nicely at any resolution, the author says, "resolution independent and allows for HDPI displays". But using Cairo means it should not have a good performance at high resolutions. I have yet to find a fork of Cairo GPU accelerated that supports all the API. So it may fit the bill if you are cod…

I'm curious if you have come across (and recommend) any framework which lie in between Photon (Cairo) and Dear ImGui. I'm trying to follow all thr efforts in native desktop GUI tools and am currently using Dear ImGui for something which will only be used internally.

You might try Scenic. It’s more embedded oriented but does run on desktops using OpenGL. Also it’s new so the component library is pretty small still.

Re: Photon Micro GUI

#63
post #59

Earlier quoted context omitted.

That's why you don't use circular dragging for a knob, you use vertical/horizontal drags (or a combination of both, JUCE supports those for reference, I forget what it defaults to). I've only seen rotary dragging in a handful of products and it always sucks. Arrow buttons are pointless when you're trying to dial in a value - which is the whole point of using knobs in audio software. They don't give you adjustable gra…

Yes, if you have to click up, then down, then up again, and down to nail down a "just right" value, those buttons would be more difficult but their operation would be apparent. You might be able to get to a "just right" value if mousedown can be held while the cursor is moved between the buttons but a slider is probably better. The knob behavior you're describing is essentially an invisible slider. An invisible line…

It's not non-intuitive. The most acclaimed UIs for audio software are littered with knobs, and they have to be. You're talking about dozens to hundreds of continuous parameters that need to be dialed in by hand in conjunction with the user's ears. It's also common practice to have a hotkey like ctrl to swap between coarse/fine tuning of the parameters, so you can dial it in without changing controls or letting go of the mouse - which is often done in real time during playback.

In your first example, you've just made a knob that doesn't look like a knob.

In your second example, you're confusing mouse position and gesture. Linear sliders map mouse position to state changes, rotaries map gesture. Another way of looking at it is that a rotary slider's state is decoupled from the input, and in doing so, is a much more responsive control. Not to mention, you have an infinite 2D area to traverse to change the knob value with respect to the widget itself, not a finite, defined path.

And the huge reason that linear sliders (at least off the shelf ones) are impossible to use for audio UIs is that 99% of your user's time is spent adjusting from the previous position, not resetting it to a new one. That means any behavior where a click resets the position (like clicking just past the current position) is broken. Not just because it's trash UX for the application, but because in audio systems jumping parameter values can cause artifacts, and mitigating them is not without cost in performance and fidelity.

Re: Photon Micro GUI

#64
Photon was the best I've ever seen. Not the most brilliant desktop environment UI (clearly modern Win7/Unity/Mac-like panels + Mac/Ubuntu-like keyboard features are better, let alone tiling WMs but these are only good with big displays) but the most cozy controls look&feel styling and a great C++Builder-like visual RAD IDE.

Re: Photon Micro GUI

#65
My current fantasy is that Apple would open-source SwiftUI and the industry converges around that for native UIs, adding support for custom third-party skins/themes later.

If they can already do it for such distinct devices as Mac, iPhone, iPad, TV and Watch, there's no reason it can' be adapted for Windows, Linux and Android as well.

This is something that should have happened 5 years ago, before Electron etc. had a chance to fill in a obviously much-needed need.

Really, why do we need anything more than "Button" to describe a button, or "List" to describe a list, on any GUI? HTML solved this a trillion years ago, it's a wonder it took so long to be wholeheartedly adopted for native UIs. I know Microsoft tried with WPF/XAML but it didn't seem to catch on.

Re: Photon Micro GUI

#66

Name collision--QNX's gui was/is also named "Photon MicroGUI" and that is what I thought this post was going to be about: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2F...

Same. I don't understand why the authors of the linked project couldn't have done five minutes of research for the name. Or perhaps they did, and figured since QNX has moved on it would somehow make sense to take over the name? As shown here, that only leads to confusion.

Re: Photon Micro GUI

#67

Earlier quoted context omitted.

The mobile and web people are probably triggered at this ui lol

To be fair, knobs as shown in the screenshot are afwul in an usability’s point of view (how do i rotate this, how to fine tune the value), but they convey the information in the context of music plugins really well for the person most likely to use them.

Yes, how does one adjust the setting of a knob?

Gestures?

Re: Photon Micro GUI

#68

Earlier quoted context omitted.

Looks more like Windows 9x than Motif to me.

1. Motif came first. Among people who knew what Motif is, the look of Windows 95 was widely recognized as being very similar to Motif to the point of being a knock-off. 2. See the diamond-shaped radio buttons in the second example. :) 3. 3D embossed arrows on scroll bars.

Oh, I didn't see the second screenshot. Yeah that one is more like what I remember Motif looking like. The first one though is definitely going for the Windows 95 look.

Re: Photon Micro GUI

#69

Name collision--QNX's gui was/is also named "Photon MicroGUI" and that is what I thought this post was going to be about: http://www.qnx.com/developers/docs/6.5.0/index.jsp?topic=%2F...

Same. I don't understand why the authors of the linked project couldn't have done five minutes of research for the name. Or perhaps they did, and figured since QNX has moved on it would somehow make sense to take over the name? As shown here, that only leads to confusion.

I’ve never seen the phrase “microgui” used besides with QNX and this. With “photon” it’s so unique that there’s a 0% chance they hadn’t heard the name before. I’d like to know their reasoning.

Re: Photon Micro GUI

#70
Please, please, please don’t use a GUI toolkit like this, that draws its own widgets rather than using platform standard ones, when developing a plugin for a digital audio workstation (e.g. VST or Audio Unit), as this author is apparently doing. Unless someone puts in all the extra effort to implement platform-specific accessibility APIs for said toolkit. Inaccessible DAW plugins are a problem for blind musicians and audio engineers because of GUI toolkits like this one. Maybe screen readers will eventually use some kind of machine learning to provide access to otherwise inaccessible GUIs, but that’s probably still a long way off. So for now, we need application developers to do their part.

I don’t actually know what the best cross-platform solution is. Is wxWidgets fully functional in a context where it doesn’t own the event loop? I suspect not on Windows in particular. Yes, yes, I know it’s ugly 90s C++, but really, what’s more important, code aesthetics or usability?

Post reply on HN