www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Install DMD on ChatGPT

reply jmh530 <john.michael.hall gmail.com> writes:
A recent thread on hacker news [1] indicated that it is possible 
to call a C compiler on ChatGPT. It looks like it is also 
possible to install DMD on ChatGPT [2]. Might make it give you 
better answers if you tell it to check any code by running it on 
DMD before showing you.

[1] https://news.ycombinator.com/item?id=46770221
[2] https://news.ycombinator.com/item?id=46774541
Jan 26
next sibling parent reply monkyyy <crazymonkyyy gmail.com> writes:
On Tuesday, 27 January 2026 at 02:03:40 UTC, jmh530 wrote:
 A recent thread on hacker news [1] indicated that it is 
 possible to call a C compiler on ChatGPT. It looks like it is 
 also possible to install DMD on ChatGPT [2]. Might make it give 
 you better answers if you tell it to check any code by running 
 it on DMD before showing you.

 [1] https://news.ycombinator.com/item?id=46770221
 [2] https://news.ycombinator.com/item?id=46774541
I strongly suggest just running qwen locally, it does radically improve preformence for normal errors(the compiler says "did you mean to import std.string?" chat bots can go "why use I did, let me import that") its worthless at templates but thats to be expected. Getting it into the online chatbots means a) convincing them d is important b) shipping an offical docker c) bugging them to keep them up to date. I doubt its worth the fight. Its just going to be agent ai on your machine, with all your files and tools you wish; convincing google or mircosoft to run your code on tier cloud is just more work then my own 100 line cli tool. The chat bots do annoying things of limiting what file types you can upload or making it a 1 at a time interface or making more then 3 files paid; just no, unnecessary complexity.
Jan 26
parent jmh530 <john.michael.hall gmail.com> writes:
On Tuesday, 27 January 2026 at 02:19:29 UTC, monkyyy wrote:
 On Tuesday, 27 January 2026 at 02:03:40 UTC, jmh530 wrote:
 A recent thread on hacker news [1] indicated that it is 
 possible to call a C compiler on ChatGPT. It looks like it is 
 also possible to install DMD on ChatGPT [2]. Might make it 
 give you better answers if you tell it to check any code by 
 running it on DMD before showing you.

 [1] https://news.ycombinator.com/item?id=46770221
 [2] https://news.ycombinator.com/item?id=46774541
I strongly suggest just running qwen locally, it does radically improve preformence for normal errors(the compiler says "did you mean to import std.string?" chat bots can go "why use I did, let me import that") its worthless at templates but thats to be expected.
I'm honestly not familiar with qwen.
 Getting it into the online chatbots means a) convincing them d 
 is important b) shipping an offical docker c) bugging them to 
 keep them up to date. I doubt its worth the fight. Its just 
 going to be agent ai on your machine, with all your files and 
 tools you wish; convincing google or mircosoft to run your code 
 on tier cloud is just more work then my own 100 line cli tool. 
 The chat bots do annoying things of limiting what file types 
 you can upload or making it a 1 at a time interface or making 
 more then 3 files paid; just no, unnecessary complexity.
From the second link, all you have to do is put the DMD .deb file in the ChatGPT chatbox and tell it to install it. Maybe they will restrict it in the future, but it works for now. That being said, I'm sympathetic to your general point about running it locally. And I'll reiterate what I've said previously that I'm under no delusion about the capabilities of these chatbots. They've gotten better over the past year, but I still get bad answers for difficult questions.
Jan 27
prev sibling parent reply Lance Bachmeier <no spam.net> writes:
On Tuesday, 27 January 2026 at 02:03:40 UTC, jmh530 wrote:
 A recent thread on hacker news [1] indicated that it is 
 possible to call a C compiler on ChatGPT. It looks like it is 
 also possible to install DMD on ChatGPT [2]. Might make it give 
 you better answers if you tell it to check any code by running 
 it on DMD before showing you.

 [1] https://news.ycombinator.com/item?id=46770221
 [2] https://news.ycombinator.com/item?id=46774541
I've used Gemini CLI because I have paid API access. That will run the code, check for errors, and retry. That's better than having to test it yourself, but all you have when you're done is a program that compiles and runs.
Jan 27
parent jmh530 <john.michael.hall gmail.com> writes:
On Tuesday, 27 January 2026 at 17:00:08 UTC, Lance Bachmeier 
wrote:
 On Tuesday, 27 January 2026 at 02:03:40 UTC, jmh530 wrote:
 A recent thread on hacker news [1] indicated that it is 
 possible to call a C compiler on ChatGPT. It looks like it is 
 also possible to install DMD on ChatGPT [2]. Might make it 
 give you better answers if you tell it to check any code by 
 running it on DMD before showing you.

 [1] https://news.ycombinator.com/item?id=46770221
 [2] https://news.ycombinator.com/item?id=46774541
I've used Gemini CLI because I have paid API access. That will run the code, check for errors, and retry. That's better than having to test it yourself, but all you have when you're done is a program that compiles and runs.
I think I have access to the ChatGPT CLI, but I haven't tried it yet. Probably should give it a go. The nice thing about the chat bot is that I don't have to be near the computer to ask it a question.
Jan 27