moonfltk icon indicating copy to clipboard operation
moonfltk copied to clipboard

RFC: Fluid exporter for Lua

Open MatthiasWM opened this issue 2 years ago • 3 comments

Hi devs.

I really like the project that you have created here. I am a big fan of Lua, but keep falling back into C++ development for all the wrong reasons.

My name is Matthias, and I am one of the original developers of FLTK together with Bill Spitzak. We are currently preparing to release version 1.4 which is a huge improvement on all platform. My job - besides bug fixes - is maintaining Fluid, our visual user interface design tool.

My question (and offer) is: would it make sense to write an exporter that creates moofltk Lua source code out of Fluid designs? If you think that this is a useful feature for your user base, I would be willing to implement that, but I have to rely on your input of implementations specifics because I am not yet good enough at Lua.

To me, this would also be a great starting point to implement more languages like Rust. FLTK seems to become the goto GUI for non-mainstream lunges, which I find really great!

Cheers,

  • Matthias

MatthiasWM avatar Feb 15 '22 09:02 MatthiasWM

Hi Matthias.

First of all, thanks to you, to Bill, and to the other FLTK developers and maintainers for FLTK itself.

I'd be glad to give you input, but there are a few things you may want to consider before going ahead:

  • MoonFLTK is not backed by a community. It's a project developed and maintained by an individual (myself) who doesn't even use it that much (more or less the same holds for all the libraries of this collection, for that matter).

  • I don't even know if it has a real user base, beside the occasional user. My contacts with the users of MoonFLTK are limited to this issues section, from which you can easily guess its popularity (33 stars and 27 issues as of today), as well as how much it is 'battle tested'.

  • There are a few limitations, which are listed in the Implementation notes section of the manual.

That said, I'm not familiar with Fluid but if I recall correctly many of the examples that come with FLTK were designed using it. I ported to Lua/MoonFLTK most of those examples, which should constitute both a proof of feasibility and a starting point if you decide to go ahead despite the above remarks. In that case, feel free to leave this issue open for any input request.

Ciao Stefano

stetre avatar Feb 15 '22 11:02 stetre

Hi Stefano,

thanks for the warnings, except maybe for the user base, nothing scares me away. There is Lua FLTK and two more approaches, but neither has been touched for 4 or 10 or more years, and neither seems very clean. MoonFLTK seems the best candidate. If we release 1.4 and explicitly mention MoonFLTK, it might bring you a tiny bit of additional traffic. Please let me know if that's not wanted.

Generally, I have to admit that we are pretty clueless in regards to the number of users and projects around FLTK. There seems to be a good number of internal and "secret" projects, but the time where we would get 10 or twenty messages a day on our mailing list are definitely over.

I will be busy with other bugs for the remainder of the week, but If you don't mind, I will do a limited test implementation in a branch and send you the link before I publish anything official. If you don't like it, or the exposure, I'll stop at that point. Otherwise, I'd like to implement the full thing and make that public.

Thanks for the super fast reply,

  • Matthias

MatthiasWM avatar Feb 15 '22 11:02 MatthiasWM

It's ok for me.

I'll take a look at the new release and try to align MoonFLTK with it as best as possible in the near future.

Stefano

stetre avatar Feb 15 '22 12:02 stetre