8 ms·
Here is a real coding problem that I might be willing to make a cash-prize contest for. We'd need to nail down some rules. I'd be shocked if any LLM can do this
by phkahler 2y ago
Here is a real coding problem that I might be willing to make a cash-prize contest for. We'd need to nail down some rules. I'd be shocked if any LLM can do this:
https://github.com/solvespace/solvespace/issues/1414 https://github.com/solvespace/solvespace/issues/1414
Make a GTK 4 version of Solvespace. We have a single C++ file for each platform - Windows, Mac, and Linux-GTK3. There is also a QT version on an unmerged branch for reference. The GTK3 file is under 2KLOC. You do not need to create a new version, just rewrite the GTK3 Linux version to GTK4. You may either ask it to port what's there or create the new one from scratch.
If you want to do this for free to prove how great the AI is, please document the entire session. Heck make a YouTube video of it. The final test is weather I accept the PR or not - and I WANT this ticket done.
I'm not going to hold my breath.
- refulgentis 2y ago> I'm not going to hold my breath. The snark and pessimism nerd-sniped me :) I've used AI heavily to maintain a cross-platform wrapper around llama.cpp. I figure its worth a shot. I took a look and wanted to try but hit several hard blocks right away. - There is no gtk-4 branch :o (presuming branch = git branch...Perhaps this is some project-specific terminology for a set of flags or something, and that's why I can't find it?) - There's some indicators it is blocked by wxWidgets requiring GTK-4 support, which sounds much larger scope than advertised -- am I misunderstanding?
- nonethewiser 2y agoBreak it down into smaller problems.
- bogdan 2y agoOr ask an AI to do it?
- esafak 2y agoA chance for all those coding assistant companies like Devin to show their mettle!
- Aperocky 2y agoThey'll happily demo writing hello world in 50 languages, or maybe a personal profile page with moving! icons! Fancy stuff. They won't touch this.
- gavinray 2y agoConvert the GTK 3 and GTK 4 API documentation into a single `.txt` file each. Upload one of your platform-specific C++ file's source, along with the doc `.txt` into your LLM of choice. Either ask it for a conversion function-by-function, or separate it some other way logically such that the output doesn't get truncated. Would be surprised if this didn't work, to be honest.
- pera 2y agoDo you really need to provide the docs? I would have imagined that those docs are included in their training sets. There is even a guide on how to migrate from GTK3 to GTK4, so this seems to be a low-hanging fruit job for an LLM iff they are okay for coding.
- nurettin 2y agoDocs make them hallucinate a lot less. Unfortunately, all those docs will eat up the context window. Claude has "projects" for uploading them and Gemini2.5+ just has a very large window so maybe that's ok.
- iamjackg 2y agoYou might not need to, but LLMs don't have perfect recall -- they're (variably) lossy by nature. Providing documentation is a pretty much universally accepted way to drastically improve their output.
- Workaccount2 2y agoLLMs are not data archives. They are god awful at storing data, and even calling them a lossy compression tool is a stretch because it implies they are a compression tool for data. LLM's will always benefit from in context learning because they don't have a huge archive of data to draw on (and even when they do, they are not the best at selecting data to incorporate).
- jchw 2y agoIn my experience even feeding it the docs probably won't get it there, but it usually helps. It actually seems to work better if the document you're feeding it is also in the training data, but I'm not an expert.
- ttul 2y agoSend the whole repo to AI Studio using my vibe coded tool `llm_globber` and let Gemini chew on it. You can get this done in a few hours.
- pdntspa 2y agoFamous last words!
- acedTrex 2y agoI think the "offer a PR I will accept is the kicker here, getting it 'done' is the easy part"
- sieabahlpark 2y ago[dead]
- G4E 2y agoIt's not AI, but I have good news for you though : what you seek already exists ! https://github.com/dune3d/dune3d https://github.com/dune3d/dune3d
- aleph_minus_one 2y agoThis does not look like a Gtk4 port of Solvespace, but like another independent CAD application that uses Gtk4 for its GUI on GNU/Linux.
- phkahler 2y agoYes, we are all well aware of Dune3d. I'm a big fan of Lukas K's work. In fact I wish he had done our GTK port first, and then forked Solvespace to use Open Cascade to solve the problems he needed to address. That would have given me this task for free ;-) We are not currently planning to incorporate OCCT but to simply extend and fix the small NURBS kernel that Solvespace already has.
- dughnut 2y agoCan you comment on the business case here? I think there was a Blender add on that uses Solvespace under the hood to give it CAD-like functionality. I don’t know any pros using Solvespace by itself, and my own opinion is that CAD is the wrong paradigm for most of the things it’s used for anyway (like highway design).
- deleted 2y ago[deleted]
- ramesh31 2y agoYou guys really need a Docker build. This dependency chain with submodules is a nightmare.
- phkahler 2y agoI'm a hater of complexity and build systems in general. Following the instructions for building solvespace on Linux worked for me out of the box with zero issues and is not difficult. Just copy some commands: https://github.com/solvespace/solvespace?tab=readme-ov-file#building-for-linux https://github.com/solvespace/solvespace?tab=readme-ov-file#...
- ramesh31 2y ago>I'm a hater of complexity and build systems in general. But you already have a complex cmake build system in place. Adding a standard Docker image with all the deps for devs to compile on would do nothing but make contributing easier, and would not affect your CI/CD/testing pipeline at all. I followed the readme and spent half an hour trying to get this to build for MacOS before giving up. If building your project for all supported environments requires anything more than a single one-line command, you're doing it wrong.
- jcheng 2y agoI'm sympathetic in general, but in this case: "You will need git, XCode tools, CMake and libomp. Git, CMake and libomp can be installed via Homebrew" That really doesn't seem like much. Was there more to it than this? Edit: I tried it myself and the cmake configure failed until I ran `brew link --force libomp`, after which it could start to build, but then failed again at: [ 55%] Building CXX object src/CMakeFiles/solvespace-core.dir/bsp.cpp.o c++: error: unknown argument: '-Xclang -fopenmp'
- phkahler 2y ago>> But you already have a complex cmake build system in place. I didn't build it :-( >> Adding a standard Docker image with all the deps for devs to compile on would do nothing but make contributing easier, and would not affect your CI/CD/testing pipeline at all. I understand, but to me that's just more stuff to maintain and learn. Everyone wants to push their build setup upstream - snap packages, flatpak, now we need docker... And then you and I complain that the build system is complex, partly because it supports so many options. But it looks like the person taking up the AI challenge here is using Docker, so maybe we'll get that as a side effect :-)
- snickell 2y agoThis is the smoothest tom sawyer move I've ever seen IRL, I wonder how many people are now grinding out your GTK4 port with our favorite LLM/system to see if it can. It'll be interesting to see if anyone gets something working with current-gen LLMs. UPDATE: naive (just fed it your description verbatim) cline + claude 3.7 was a total wipeout. It looked like it was making progress, then freaked out, deleted 3/4 of its port, and never recovered.
- SV_BubbleTime 2y agoSmooth? Nah. Tom Sawyer? Yes.
- phkahler 2y ago>> This is the smoothest tom sawyer move I've ever seen IRL That made me laugh. True, but not really the motivation. I honestly don't think LLMs can code significant real-world things yet and I'm not sure how else to prove that since they can code some interesting things. All the talk about putting programmers out of work has me calling BS but also thinking "show me". This task seems like a good combination of simple requirements, not much documentation, real world existing problem, non-trivial code size, limited scope.
- snickell 2y agoYes, very much agree, an interesting benchmark. Particularly because it’s in a “tier 2” framework (gtkmm) in terms of amount of code available to train an LLM on. That tests the LLMs ability to plan and problem solve compared with, say, “convert to the latest version of react” where the LLM has access to tens of thousands (more?) of similar ports in its training dataset and more has to pattern match.
- phkahler 2y ago>> Particularly because it’s in a “tier 2” framework (gtkmm) in terms of amount of code available to train an LLM on. I asked GPT4 to write an empty GTK4 app in C++. I asked for a menu bar with File, Edit, View at the top and two GL drawing areas separated by a spacer. It produced what looked like usable code with a couple lines I suspected were out of place. I did not try to compile it so don't know if it was a hallucination, but it did seem to know about gtkmm 4.
- kordlessagain 2y agoWhat’s the point of a one-to-one GTK3 → GTK4 rewrite when the user experience doesn’t improve at all? Why not modularize the backend and build a better UI with tech that’s actually relevant in 2025?
- phkahler 2y ago>> What’s the point of a one-to-one GTK3 → GTK4 rewrite when the user experience doesn’t improve at all? I'd like to use the same UI on all platforms so that we can do some things better (like localization in the text window and resizable text) and my preference for that is GTK. I tried doing it myself, got frustrated, and stopped because there are more important things to work on.
- georgemcbay 2y agoI'm not the person you are asking but the point of this whole thing seems to be as a test for how possible it is for an LLM to 'vibe code' a port of this nature and not really because they care that much about a port existing. The fact that they haven't done the port in the normal way suggests they basically agree with what you said here (not worth the ROI), but hey if you can get the latest AI code editor to spit out a perfectly working port in minutes, why not? FWIW, my assessment of LLMs is the same as theirs. The hype is far greater than the practical usefulness, and I say this as someone who is using LLMs pretty regularly now. They aren't useless, but the idea that they will be writing 90% of our code soon is just completely at odds with my day to day experience getting them to do actual specific tasks rather than telling them to "write Tetris for XYZ" and blog about how great they are because it produced something roughly what I asked for without much specificity.
- aleph_minus_one 2y ago> Why not modularize the backend and build a better UI with tech that’s actually relevant in 2025? Doing the second part is to my understanding actually the purpose of the stated task.
- pdntspa 2y agoWhy are you calling GTK4 irrelevant? Large swaths of Linux run on it and GTK3
- bix6 2y agoCurious if you’ve tried this yourself yet? I’d love to see side by side of a human solo vs a human with copilot for something like this. AI will surely make mistakes so who will be faster / have better code in the end?
- phkahler 2y ago>> Curious if you’ve tried this yourself yet? Yes. I did a lot of the 3->4 prep work. But there were so many API changes... I attempted to do it by commenting out anything that wouldn't build and then bring it back incrementally by doing it the GTK4 way. So much got commented out that it was just a big mess of stubs with dead code inside. I suspect the right way to do it is from scratch as a new platform. People have done this, but it will require more understanding of the paltform abstraction and how it's supposed to work (It's not my area of the code). I just want to "convert" what was there and failed.
- amelius 2y agoFWIW, what I want most in Solvespace is a way to do chamfers and fillets. And a way to define parameters (not sure if that's already possible).
- phkahler 2y ago>> FWIW, what I want most in Solvespace is a way to do chamfers and fillets. I've outlined a function for that and started to write the code. At a high level it's straight forward, but the details are complex. It'll probably be a year before it's done. >> And a way to define parameters (not sure if that's already possible). This is an active work in progress. A demo was made years ago, but it's buggy and incomplete. We've been working out the details on how to make it work. I hope to get the units issue dealt with this week. Then the relation constraints can be re-integrated on top - that's the feature where you can type arbitrary equations on the sketch using named parameters (variables). I'd like that to be done this year if not this summer.
- amelius 2y agoSounds great, thanks for all the good work! By the way, if this would make things simpler, perhaps you can implement chamfering as a post-processing step. This makes it maybe less general, but it would still be super useful.
- stn8188 2y agoWhile I second the same request, I'm also incredibly grateful for Solvespace as a tool. It's my favorite MCAD program, and I always reach for it before any others. Thank you for your work on it!
- jchw 2y agoI suspect it probably won't work, although it's not necessarily because an LLM architecture could never perform this type of work, but rather because it works best when the training set contains inordinate sample data. I'm actually quite shocked at what they can do in TypeScript and JavaScript, but they're definitely a bit less "sharp" when it comes to stuff outside of that zone in my experience. The ridiculous amount of data required to get here hints that there is something wrong in my opinion. I'm not sure if we're totally on the same page, but I understand where you're coming from here. Everyone keeps talking about how transformational these models are, but when push comes to shove, the cynicism isn't out of fear or panic, its disappointment over and over and over. Like, if we had an army of virtual programmers fixing serious problems for open source projects, I'd be more excited about the possibilities than worried about the fact that I just lost my job. Honest to God. But the thing is, if that really were happening, we'd see it. And it wouldn't have to be forced and exaggerated all the time, it would be plainly obvious, like the way AI art has absolutely flooded the Internet... except I don't give a damn if code is soulless as long as it's good, so it would possibly be more welcome. (The only issue is that it most likely actually suck when that happens, and rather just be functional enough to get away with, but I like to try to be optimistic once in a while.) You really make me want to try this, though. Imagine if it worked! Someone will probably beat me to it if it can be done, though.
- jay_kyburz 2y agoSo yesterday I wanted to convert a color pallet I had in Lua that was 3 rgb ints, to Javascript 0x000000 notation. I sighed, rolled my eyes, but before I started this incredibly boring mindless task, asked Gamini if it would just do it for me. It worked, and I was happy, and I moved on. Something is happening, its just not exciting as some people make it sound.
- jchw 2y agoBe a bit more careful with that particular use case. It usually works, but depending on circumstances, LLMs have a relatively high tendency to start making the wrong correlations and give you results that are not actually accurate. (Colorspace conversions make it more obvious, but I think even simpler problems can get screwed up.) Of course, for that use case, you can _probably_ do a bit of text processing in your text processing tools of choice to do it without LLMs. (Or have LLMs write the text processing pipeline to do it.)
- stickfigure 2y agoMy coding challenges are all variations on "start with this 1.5M line Spring project, full of multi-thousand-line files..."
- qwertox 2y agoBut you are aware that their limited context length just won't be able to deal with this? That's like saying that you're judging a sedan by its capability of performing the job of a truck. Wait, you were being sarcastic?
- stickfigure 2y agoI am indeed saying that a sedan is incapable of handling my gigantic open-pit superfund site. But I'll go a little farther - most meaningful, long-lived, financially lucrative software applications are metaphorically closer to the open-pit mine than the adorable backyard garden that AI tools can currently handle.
- phkahler 2y agoTo do the challenge one would just need to understand the platform abstraction layer which is pretty small, and write 1K to 2K LOC. We don't even use much of the GUI toolkit functionality. I certainly don't need to understand the majority of a codebase to make meaningful contributions in specific areas.
- iamleppert 2y agoGTK is an abomination of a UI framework. You should be looking for another way to manage your UI entirely, not trying to keep up with the joneses, who will no doubt release something new in short order and set yet another hoop to jump through, without providing any benefit to you at all. It's openly hostile to not consider the upgrade path of existing users, and make things so difficult that it requires huge lifts just to upgrade versions of something like a UI framework.
- phkahler 2y ago>> GTK is an abomination of a UI framework. I respectfully disagree with that. I think it's a solid UI framework, but... >> It's openly hostile to not consider the upgrade path of existing users, and make things so difficult that it requires huge lifts just to upgrade versions of something like a UI framework. I completely agree with you on that. We barely use any UI widgets so you'd think the port would be easy enough. I went through most of the checklist for changes you can make while still using GTK3 in prep for 4. "Don't access event structure members directly, use accessor functions." OK I made that change which made the code a little more verbose. But then they changed a lot of the accessor functions going from 3 to 4. Like WTF? I'm just trying to create a menu but menus don't exist any more - you make them out of something else. Oh and they're not windows they are surfaces. Like why? I hope with some of the big architectural changes out of the way they can stabilize and become a nice boring piece of infrastructure. The talk of regular API changes every 3-5 years has me concerned. There's no reason for that.