V0.1.0.0 of ghcup-gtk released

First release of ghcup-gtk, a GTK wrapper around the ghcup toolchain manager designed to appeal to newcomers to the language (and possibly newcomers to computer programming).

Packages for various operating systems are distributed on the release page, and signed with the Minisign tool.

Enjoy, and please report bugs at Issues · Kleidukos/ghcup-gtk · GitHub.

image

image


Now on more personal notes:

You might reasonably ask “But Hécate, how was your experience with programming a GTK application in Haskell?”

The answer is that it was pure shite a painful experience, mostly due to GTK, lack of resources specific to Haskell (I had to learn how to plug CSS into my application by going to the competition). This is in part why I want this codebase to reflect best practices in how a maintainable desktop application can be made, but also I’m very open to suggestions on how to improve it.

I tried to recreate an Elm-style architecture of Model & Events, because that’s mostly what I know. Happy to listen to other opinions.

Haskell made the experience much more tolerable than it would have been in any other language, however, and I’m grateful for the language and its libraries.

47 Likes

Very nice!


Sadly, it seems GTK upstream has removed the ability to easily link statically:

Apparently there is some way if you use meson directly instead of relying on the system libraries.

I’m not sure how portable such binaries would be, since they also have to link X11/wayland/etc. I guess?

On windows, we could try to get away with just bundling all libraries (dropping it next to the binary).

Very cool and thank you for going through this pain lol.

The Real World Haskell book that is currently being revived had a gtk2hs chapter that looks pretty outdated (from first glance at least, haven’t gotten to this chapter yet). Your project might be a good reference for updating it.

edit: the architecture/*.md looks super helpful!

4 Likes

Thanks a lot. Regarding the architecture document, it does look helpful but since it’s mostly a brain dump, it also has to be helpful to other people before I’d be ok with it. Please don’t hesitate to point out places where it’s vague or unclear.

1 Like

Windows is my ideal target, I need some help with producing the adequate MSI package.

2 Likes

Excellent work Hécate!

5 Likes

Btw… as someone who has done a fair bit of GTK… this project must have been far more work than GHCup’s own TUI :smile:

And all that while dealing with my obnoxious GHCup library API that has never been optimized for user-friendliness. I guess it’s time to do that.

2 Likes

Yes, I think I’m going to take a couple of weeks of rest after that, it was hard at times. xD

Edit:

this project must have been far more work than GHCup’s own TUI :smile:

This project would have been impossible without GHCup’s own TUI!

3 Likes

I’m going to check out the code when I get the chance. I have also made a GTK/Gstreamer application a while ago and I’m really interested how different people approach the architecture in Haskell. This might be the perfect opportunity for me to learn Effectful.

One thing that I noticed at first glance, your project builds the UI directly in source. Have you considered using the builder, or have you found creating UI directly in source more convenient?

I am also wondering if there is even a single person on this earth who figured out how to use Gtk ListView with gi-gtk.

1 Like

One thing that I noticed at first glance, your project builds the UI directly in source. Have you considered using the builder, or have you found creating UI directly in source more convenient?

When I found out that Glade was not compatible with GTK4, it seemed to me that those builders can be a liability, so I opted to do everything in Haskell instead of bringing a builder in the mix.

1 Like

Looks very cool, thanks - look forward to playing with it.

Any plan to publish a flatpak on FlatHub say?

Yes there are plans. I’m still figuring out things related to glibc compatibility but indeed the plan is to publish on Flathub. :slight_smile:

Feel free to try it out with the newest HLS and let me know how it goes: Haskell Language Server 2.15.0.0 is now available

Just pointing out that the HLS 2.15.0.0 release isn’t yet in ghcup proper, so you won’t see it by default.

You can access the vanilla channel from the GTK app too :wink:

2 Likes

This is amazing! Thanks!

From this SS, I knew that we can install other tools except the core 4 (GHC, stack, HLS, cabal) !

Thanks!

It will be great if this becomes a

ghcup gui just like ghcup tui :sparkles:

2 Likes