Re: Chicken GUI options survey and questions.

2021-03-05 Thread John Cowan
On Fri, Mar 5, 2021 at 10:53 AM Matt Welland  wrote:


>  * pstk (probably not really an option, ancient look/feel).
>

Don't dismiss Tk too fast.  Here are the reasons Larry McVoy of BitMover
gives for using it in the GUIs of his company's products:

This question gets raised at least once a year here: why not do native
> GUIs? It is certainly possible to do so. We have done implementations of
> several of our GUIs in other toolkits. The arguments for doing so are
> compelling: better look and feel, native behavior, etc.



> The reasons for staying with Tcl/Tk are simple:
>


> Cost. The cost of creating 2-4 different implementations of each GUI
> interface is probably 3 times what it took us to get where we are today.
> But the cost does not end there. The cost extends to testing the GUIs on
> each platform as well as putting processes in place to make sure that the
> GUIs march forward in sync, i.e., if the Java revtool gets a new feature,
> that same feature needs to be added to the Linux, Windows, and Aqua GUIs.
> When we add up all the costs, it looks more like 6 times the effort.
>


> Functionality. Every time we go look at the other toolkits we find that
> they are not as powerful as the Tk toolkit. In particular, the canvas and
> text widgets are more useful than any others we have found.


I would add that Tcl/Tk Just Works anywhere you take it with essentially
zero customizations, and that there are a lot of themes you can use:  <
https://wiki.tcl-lang.org/page/List+of+ttk+Themes>.

Pros:
>  - super easy to learn and use
>  - Good range of widgets
>  - decent performance
>
> Cons:
>
>  - native widgets can look dated across platforms
>  - you are at the whim of the platform.
>(E.g. In my case Gnome broke using bgcolor in
> buttons which I was relying on.)
>  - Very difficult to install, still no Ubuntu package.
>


Re: Chicken GUI options survey and questions.

2021-03-05 Thread felix . winkelmann
> I've spent a few months evaluating the existing options for C4 and
> making a few myself. From the existing options pstk was the only one
> worth using as it has been around the longest and solves the common GUI
> problems you'd run into. Consider whether a design like ma [1] would
> work for you (written in Tcl, interfaces with Scheme via IPC) and make
> sure to look at bintracker [2].

Small correction: ma does not talk with scheme exclusively, it actually
just communicates with shell processes, via rather crude Tcl/Tk IPC.


felix




Re: Chicken GUI options survey and questions.

2021-03-05 Thread Vasilij Schneidermann
Hello Matt,

> What is your preferred toolkit for making GUI apps with chicken? 

I've spent a few months evaluating the existing options for C4 and
making a few myself. From the existing options pstk was the only one
worth using as it has been around the longest and solves the common GUI
problems you'd run into. Consider whether a design like ma [1] would
work for you (written in Tcl, interfaces with Scheme via IPC) and make
sure to look at bintracker [2].

I contributed the kiwi, libui and nuklear eggs to the C4 coop. kiwi is a
toy (it's interesting to study though), libui is nowhere near done,
nuklear however is refreshing to use. Weren't it for the lack of
documentation I'd fully recommend it for multimedia applications (such
as inside a SDL2 game or application). There is some extra work to be
done for a C5 port, such as figuring out how to package it with regards
to backends (some backends are platform-specific and it's unclear
whether to use auto-detection, allow users to pick them at installation
time or splitting them into many eggs) and looking into changes made
since then (it seems to have gained actual documentation).

> Alternatives to consider
> 
> 
>  * webview egg
>  * qt-light 
>  * pstk (probably not really an option, ancient look/feel).
>  * kiwi (probably too limited for my needs)

I've used both the webkit (C4) and webview (C5) eggs for a simple ebook
reader application [3]. You may find its source code useful to determine
whether it will do the trick for whatever you've had in mind. They're
attractive for simple tasks, but as soon as you need access to native
resources, you'll run into security/usability issues (SOP and caching
are a deadly combination) and might have to write code you didn't plan
to, such as a web server offering ressources/RPC. qt-light covers very
little ground overall, so I'd dismiss it for the same reasons as kiwi.
See above for my thoughts on pstk, bintracker shows that the stock
appearance can be changed with some effort.

> Others
> --
> 
> nuklear http://wiki.call-cc.org/eggref/4/nuklear,
> https://github.com/Immediate-Mode-UI/Nuklear
> looks interesting, not clear if actively supported

I'll work on it some day, perhaps earlier if I find someone else to
figure out the packaging and update parts :>

> flutter - no egg yet but checks all modern gui boxes and
>   highly portable. Comments on effort required to 
>   make a binding to Chicken would be appreciated.
>   BTW: No, I'm not interested in developing in dart.
>   I'm sure it is a great language but I like Chicken.

I haven't looked much into it, but it seems to be firmly locked into the
Dart ecosystem. One way or the other, you'll end up writing Dart code to
use it. I remember someone on the #chicken channel announcing to look
into DOtherSide [4], that would give you Qt/QML at the expense of having
to write programming logic in something resembling JavaScript.

[1]: http://www.call-with-current-continuation.org/ma/ma.html
[2]: https://bintracker.org/
[3]: https://depp.brause.cc/teapub/
[4]: https://github.com/filcuc/DOtherSide


signature.asc
Description: PGP signature


Chicken GUI options survey and questions.

2021-03-05 Thread Matt Welland
I'm starting (yet another) attempt to move a big project of mine to
Chicken 5 and now is a good time to look at other options for the GUI.
Before I do some evaluations I'm interested in hearing any thoughts
from others.

What is your preferred toolkit for making GUI apps with chicken? 

I've been using IUP, which I know and like very much. I've listed the
pros and cons (from my perspective) far below.

Alternatives to consider


 * webview egg
 * qt-light 
 * pstk (probably not really an option, ancient look/feel).
 * kiwi (probably too limited for my needs)

Others
--

nuklear http://wiki.call-cc.org/eggref/4/nuklear,
https://github.com/Immediate-Mode-UI/Nuklear
looks interesting, not clear if actively supported

flutter - no egg yet but checks all modern gui boxes and
  highly portable. Comments on effort required to 
  make a binding to Chicken would be appreciated.
  BTW: No, I'm not interested in developing in dart.
  I'm sure it is a great language but I like Chicken.

My experiences with IUP
---

Pros: 
 - super easy to learn and use
 - Good range of widgets
 - decent performance

Cons:

 - native widgets can look dated across platforms
 - you are at the whim of the platform. 
   (E.g. In my case Gnome broke using bgcolor in
buttons which I was relying on.)
 - Very difficult to install, still no Ubuntu package.