March 28, 2023

On Sunday, 26 March 2023 at 15:56:50 UTC, Ogi wrote:

>

On Saturday, 25 March 2023 at 13:11:58 UTC, Zealot wrote:

>

On Saturday, 25 March 2023 at 13:01:44 UTC, Ogi wrote:

just use webview2/CEF and Vue.js (or whatever other framework you prefer).

Everything web-based runs like garbage and uses tons of RAM.

not if you write proper code. and RAM doesn't really matter much on the desktop anyway.

March 28, 2023

On Tuesday, 28 March 2023 at 20:39:34 UTC, Zealot wrote:

>

On Sunday, 26 March 2023 at 15:56:50 UTC, Ogi wrote:

>

On Saturday, 25 March 2023 at 13:11:58 UTC, Zealot wrote:

>

On Saturday, 25 March 2023 at 13:01:44 UTC, Ogi wrote:

just use webview2/CEF and Vue.js (or whatever other framework you prefer).

Everything web-based runs like garbage and uses tons of RAM.

not if you write proper code. and RAM doesn't really matter much on the desktop anyway.

If you intend to write a big software, it matters a lot because they already require quite a lot of RAM. Look at most professional softs, they are native yet takes a big amount of RAM (Let's estimate it to 4 GB, for Visual Studio and light usage of Adobe software IIRC back when I was on Windows). Then look at Electron apps. They are taking a comparable amount of RAM (400 MB for Discord ~ 2 GB for Slack), while they offer almost nothing in comparison. If you make a web app you are already accepting to sacrifice a lot of performance while a native GUI framework would probably have allowed more flexibility (taking advantage of language features) while being way more efficient in resource.

March 29, 2023

On Tuesday, 28 March 2023 at 12:04:27 UTC, Dejan Lekic wrote:

>

On Saturday, 25 March 2023 at 10:03:29 UTC, Ikey Doherty wrote:

>

Is there general interest in UI within the D community? And is there enough to have our own toolkit, or would we be better placed to contribute to the likes of gtk-d?

I have a selfish interest in this, hence asking. While spinning a ui toolkit isn't hard, doing it properly can be (accessibility)

Absolutely!
I use GtkD in one project as it is, at the moment, the best GUI toolkit for D.
I would prefer a GUI toolkit entirely done by the D community, from scratch (maybe using Adam's simpledisplay as starting point idk) with ideas borrowed from JavaFX/Swing and similar.

DLangUI does almost all of that. But people aren't interested in commiting. They are interested in startig from scratch over and over again instead.

March 29, 2023

On Wednesday, 29 March 2023 at 09:14:55 UTC, GrimMaple wrote:

>

DLangUI does almost all of that. But people aren't interested in commiting. They are interested in startig from scratch over and over again instead.

I tried to use DlangUI to potentially contribute to it. But there are some design choices that turned me off personally.

The API is very inspired of Android UI, which makes it very verbose with explicit layouts (I have a GTK+ background, so I struggle to understand how layouts work in general).

The UI is usually built with a custom format in a string, so if it has an error you will have to wait for the code to compile and run to see it.

Backends are made of one big file, and I didn't understand how you can add one (I wanted Wayland support).

Renderers are also inside each backend, so adding support for Vulkan would probably imply adding more duplicated code in every backend or move some code in a new module.

Before last year, there was nobody to help me figure out how everything works so I gave up and started my own thing, but I would love to help and improve the project now.

March 29, 2023

On Wednesday, 29 March 2023 at 09:54:35 UTC, Dadoum wrote:

>

On Wednesday, 29 March 2023 at 09:14:55 UTC, GrimMaple wrote:

>

DLangUI does almost all of that. But people aren't interested in commiting. They are interested in startig from scratch over and over again instead.

I tried to use DlangUI to potentially contribute to it. But there are some design choices that turned me off personally.

The API is very inspired of Android UI, which makes it very verbose with explicit layouts (I have a GTK+ background, so I struggle to understand how layouts work in general).

The UI is usually built with a custom format in a string, so if it has an error you will have to wait for the code to compile and run to see it.

Backends are made of one big file, and I didn't understand how you can add one (I wanted Wayland support).

Renderers are also inside each backend, so adding support for Vulkan would probably imply adding more duplicated code in every backend or move some code in a new module.

Before last year, there was nobody to help me figure out how everything works so I gave up and started my own thing, but I would love to help and improve the project now.

There are countless issues with dlangui, but so far it was the most pleasent experience of writing real-life GUI applications in D. My nearest example is https://github.com/GrimMaple/mwverify/blob/main/source/app.d , a fully functional UI app in 65 LOC with no external dependencies (only system deps on Windows and Linux). I also think DLangUI needs a lot of refactoring to extract as much stuff into separate modules as possible. Contributions are welcome, I usually review them as soon a I have free time.

March 29, 2023

On Wednesday, 29 March 2023 at 10:48:46 UTC, GrimMaple wrote:

>

There are countless issues with dlangui, but so far it was the most pleasent experience of writing real-life GUI applications in D.

I liked dlangui too, so what kind of bugs did you run into?

SDB@79

March 29, 2023

On Tuesday, 28 March 2023 at 21:23:25 UTC, Dadoum wrote:

>

On Tuesday, 28 March 2023 at 20:39:34 UTC, Zealot wrote:

>

On Sunday, 26 March 2023 at 15:56:50 UTC, Ogi wrote:

>

On Saturday, 25 March 2023 at 13:11:58 UTC, Zealot wrote:

>

On Saturday, 25 March 2023 at 13:01:44 UTC, Ogi wrote:

just use webview2/CEF and Vue.js (or whatever other framework you prefer).

Everything web-based runs like garbage and uses tons of RAM.

not if you write proper code. and RAM doesn't really matter much on the desktop anyway.

If you intend to write a big software, it matters a lot because they already require quite a lot of RAM. Look at most professional softs, they are native yet takes a big amount of RAM (Let's estimate it to 4 GB, for Visual Studio and light usage of Adobe software IIRC back when I was on Windows). Then look at Electron apps. They are taking a comparable amount of RAM (400 MB for Discord ~ 2 GB for Slack), while they offer almost nothing in comparison. If you make a web app you are already accepting to sacrifice a lot of performance while a native GUI framework would probably have allowed more flexibility (taking advantage of language features) while being way more efficient in resource.

'a lot of RAM' for systems from 20 years ago. in todays world of desktop computers it's really nothing.
also chances are the webui2 is already loaded on a windows system, so it will not take up any additional RAM.

in contrast you can ship a webui based D app with 2mb today and it will work on windows. QT requires you to also include 100mb of dlls, which will also consume memory.

"If you make a web app you are already  accepting to sacrifice a lot of performance" is also simply not true.
a) i'm not suggesting you write your whole application in js. write it in D and only the
 UI part in the browser.
b) have you ever actually measured it, because in all the tests i did, the vue.js UI was actually faster than the native (QT and MFC) versions.

"native GUI framework would probably have allowed allowed more flexibility", really? how? the webui runs an basically any device, remotely. HTML offers a lot more flexibility than T-widgets when it comes to customization, and it's 1000times simpler. QML is basically the same thing as a webapp, just with all the downsides.

March 29, 2023
On Wednesday, 29 March 2023 at 12:25:01 UTC, Zealot wrote:
> in contrast you can ship a webui based D app with 2mb today and it will work on windows.

http://arsd-official.dpldocs.info/arsd.minigui_addons.webview.html

Though on linux it uses CEF which is like a 2 GB download...

My custom browser is made out of one of those in minigui.
March 31, 2023

I have been using DWT since last 10 years. I think it has the perfect combination of features for my needs. Its in maintenance mode now but still works.

  • no large dll dependencies, compiles to a single small exe on windows
  • default looks OK and very good customizability w/o any bugs
  • fast compilation
  • being from java background, almost no learning curve.
  • eclipse GUI builder can help to find the function calls that I need to use to make a specific ui.

I wish more people work on it and keep it up-to-date. :-)

But if something can be done in Dlang, will be lovely.
Wish DlangUi took off and become more mature.

On Saturday, 25 March 2023 at 10:03:29 UTC, Ikey Doherty wrote:

>

Most of the time I've been a backend engineer. However at times I do need to write an app, and usually I go with Gtk.

However, I'm a bit concerned that gtk-d seems .. well, catatonic. DWT also appears to be beyond life support.

We all know Rust has iced-rs, which due to the design of Rust has had to adopt the Elm paradigm.

D, with features that honestly don't need reiterating, could trivially manage OOP, ECS, mixins...

Is there general interest in UI within the D community? And is there enough to have our own toolkit, or would we be better placed to contribute to the likes of gtk-d?

I have a selfish interest in this, hence asking. While spinning a ui toolkit isn't hard, doing it properly can be (accessibility)

April 04, 2023
https://slint-ui.com/blog/announcing-slint-1.0.html

This seems to be perfect gui lib and should be possible to use it with Dlang