Settings

Theme

I'm Archiving the GTK Bindings

forum.crystal-lang.org

61 points by ht_th · 40 comments

Reader

7 threads
skeledrew

I had a similar revelation a couple days ago. I created this disk space management CLI app over a few months that I've just started to really trust with my files, and I found that I kept reaching for Claude to update the config, handle the mounting, etc. It's a pain to use myself and I can never remember the commands and generally I'm preferring to spend less time in terminals.

So I got the idea to have Claude make a dedicated submenu in the Dolphin file manager (I use Kubuntu), and I was not a fan of the results (KDialog is not very pretty, and the full submenu was showing everywhere) nor the idea that I needed a plugin to get things how I wanted it and that plugin would crash the file manager if anything went wrong.

Then it occurred to me that instead of a context submenu, I could just have it make a GUI window, launched by a single menu option, but that had contextualized content based on what was selected. So I asked for that instead, and few minutes later I had a very nice GUI created with Flet⁰, and then also a system tray menu (because why not?). Even though I've been using agents for almost a year now, I still have the revelation now and again that I'm no longer restricted by the "blessed" path; I can blaze a new one at any point to fit my exact preferences.

⁰ https://flet.dev/

  • F3nd0

    Am I missing something, or could you have done the exact same thing without agents? (I get that agents make the task far easier, but I don’t see how you were ‘restricted by the “blessed” path’ before. Launching contextualised GUI must have been possible even without LLM’s, right?)

  • corndoge

    Lost me at Python, unfortunately. Can't remember the last time pip install just worked.

    • skeledrew

      Can't tell the last time I did a `pip install`. I and many others use `uv add` nowadays, which just works.

pcwalton

To me the takeaway is that LLMs are having the unintended effect of keeping C alive by reducing the relative productivity gains of using other languages.

Fortunately, the impact for C in particular on front-end UI apps is going to be limited because GTK+ is maybe the only popular UI app framework where people regularly write C outside of non-legacy scenarios. Petzold-style Win32 went out of favor decades ago, Qt was never C to begin with, Carbon has been dropped in favor of Cocoa and had been moribund for years before that, Android has always been Java, and so on.

  • arghwhat

    It happens to be a massive driver of ports to modern languages (e.g., zig, rust) that would otherwise not be considered for cost or complexity reasons.

    Writing a Gtk app in C doesn't keep C any more alive than if it was written in another language through bindings, as most of the app (measured in lines of code and development churn) was always C (Gtk itself), and using bindings is always a bit of a "worst of all worlds" scenario.

  • xyzsparetimexyz

    It's driving adoption of compiled languages in general. The main issue with them in the past is that they were hard, but everything is about the same level of difficult with LLMs.

  • klodolph

    I am a little skeptical about this. I think in broad strokes, the things that make it good for humans to program are also the things that make it good for LLMs to program.

    Language familiarity is a big exception.

    So I’d say that Crystal’s advantage, that it’s familiar to Ruby users, is less useful when you write with LLMs. Writing with LLMs in C, you will still run into many of the problems C programmers run into.

superkuh

I think the take-away here isn't oss devs dropping bindings or even options going away (because LLMs enable individual humans to keep orphaned bindings working for themselves now) but instead everyone switching to their own custom stack instead of using the same code libraries/versions. It's getting pretty fragmented out there.

  • dimes

    The main benefit of libraries and frameworks is that they saved you time by giving you something to use instead of needing to write it yourself. With the cost of writing going to 0, there’s really no need for the vast majority of shared libraries anymore.

    • bovermyer

      I like using shared libraries because they give me a tool that has solved problems in a way I like and already understand, so that I don't have to solve every problem every time.

      • kloop

        Sure, but a lot of people want one tailored to them. Maybe shared in all their projects.

        Honestly, every language just got hit with the lisp curse

        • gmueckl

          It's kind of funny because I am actively working on a slimmer, more focused replacement for an extremely heavy dependency that has mode features that I need and it also saves me a lot of working ckearing the licensing of numerous transitive dependencies.

          Developing my own custom replacement is exactly the case you describe. I don't think I would have done it without LLM help.

    • zdragnar

      The cost is cheaper, but not zero. With a library the LLM knows how to use means it doesn't need to write a bajillion tests and tokens for all of the wheels it reinvented. The same reasoning applies to the standard library that comes with the programming language it uses, as well as the programming language itself.

      • superkuh

        Yeah. Debian dropped libperl-gtk2 bindings in version 12/13 and I have to build and package it myself now. LLM helped a lot but it's still work and will continue to be work. I just have so much written in Perl Gtk2 it's worth it for me.

    • ManuelKiessling

      Thought about this lately. I don’t see how the cost of writing is going to zero; of course it’s much easier and faster now, and I love that, but even just thinking about asking an agent to build, say, a web application from scratch without a framework, having to guide it through all the complexity of getting the foundation right before we can finally work on the features I actually need — versus asking it to please just bootstrap Rails or Spring or Symfony and then build features on top of that — stresses me out.

      It’s still a useful shortcut and still allows the party that has to implement stuff to not deal with a lot of complexity, and I think that still accelerates the process of building and maintaining things tremendously, even if the party that does the building now is an agent.

    • pcthrowaway

      I agree that this is the way things are going now, but I think shared libraries provided foundations to build on that enabled higher-quality software over time.

      One bug getting patched in an abi might then require one patch in a shared library that exposes it without anyone having to change the code relying on the shared library, versus 1000 people maintining their own vibe coded projects now needing to update their own siloed end-to-end solutions

    • AlienRobot

      I don't want to keep begging an LLM to fix obscure UI compatibility issues that I have no idea where to even begin to fix because I vibe-coded an entire toolkit.

    • bigstrat2003

      > With the cost of writing going to 0

      That is not happening, unless you are ok with slop that may or may not work. It takes about the same amount of effort as it ever did to produce actual quality software.

      • ifdefdebug

        Your eval of coding agent output seems to be several month behind. It's not slop any more. In my projects it is able to pick up my style and all explicit and implicit coding conventions and produce quality code on its own.

      • bitwize

        The slop era is over. Coding agents are now superhuman. Cope harder, kid.

  • xyzsparetimexyz

    Yeah unfortunately llms haven't made upstreaming changes any easier really. Or at least, you can tell a llm to create and manage a pull request and follow feedback but it feels incredibly irresponsible.

  • kragen

    Yeah, this week I've been working on my own font rasterizing engine, my own snapshotting log-structured filesystem, and my own plain-text terminal protocol. I'm having so much fun.

  • b3dD33f

    Good.

    The only normalized software we need is the network protocol and encryption for sharing, kernel that has broad hardware support already...maaaybe Wayland-type stuff

    No one needs a JS designer telling them what their UX framework and design thesis they must abide.

    Desktop metaphor stuck around too long

    Am recording my entire Linux system use into a model as kernel compute schedules and trying to recreate the schedule data with bpf + sched_ext ...with a vague goal of mount the model in place of /home and preserve context like filenames and "vacation - kauai - 2024" in the model.

    • xyzsparetimexyz

      Absurd take. Software like Photoshop should still be standardized otherwise how is anyone going to learn it.

  • jimbobimbo

    I'm working on an app where I need to display different kinds of graphs. My original plan was to use some library for that - and I had a shortlist to look at - but now I have a ton of custom graph rendering code, which is fully tailored for my app and does exactly what I need it to.

mberning

This is just sad for the culture and art of programming. They might as well give up on crystal too. And every other upstart and “long tail” language and framework out there. Truly an extinction level event.

  • dudul

    This is the next step. One of the main drivers of creating new programming languages is to make tools that are easier to use for programmers. Now they are mostly pointless.

    And yes, it is very sad.

    • behringer

      It's not sad, it's the beginning of an era. We're getting rid of our paper tape readers and bringing on new, better tools and methods.

mitxela

The open source world could use something like COM Type Libraries that could be imported into many different languages.

4/5

  • pcwalton

    GTK+ has GObject Introspection already, which is exactly what you describe here. Of course, it's specific to GTK+.

bitwize

It's the LLM era, and the only programming languages worth considering (as long as we have those) are TypeScript for browser stuff, and Rust for everything else.

  • pton_xd

    If LLMs have superhuman ability at finding and fixing bugs, what's the value proposition of Rust? Or TypeScript?

    It seems like you'd either want to maximize runtime performance or devtime iteration speed.

    • skybrian

      Type errors help maintain consistency when the LLM doesn't look at all the files. They're useful input for LLMs.

      Declared input and output types also make code easier to read when you do look at code yourself.

    • soulofmischief

      I disagree with OP overall but they are highlighting these two languages because they partially verify the correctness of a program statically. They don't catch every issue, but they prevent many issues and their structure guides the programmer's thinking.

  • ChocolateGod

    Go for network services, container sidecars etc still makes a lot of sense.

    • unsloppable

      Go is much better than rust for heaps of applications, it compiles faster, standard lib is better, channels simplify logic for AI, and testing, fuzzing, benchmarking is all first class.

  • yulaow

    If we really want to go full llm mania, Rust has too long compilation times in big projects, it basically slows down the llm dramatically giving extremely little advantage compared to using C#/Golang with which the llm are equally good at producing perfectly safe code

IshKebab

The next question he's going to ask is "why even use Gtk?".

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection