www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Chatgpt and bus error

reply Walter Bright <newshound2 digitalmars.com> writes:
I am not very familiar with the Mac, and waste a lot of time trying to figure 
out the Mac way of doing things.

I was getting a bus error from a hello world program in Arm64, from somewhere
in 
druntime. I tried my usual methods at tracking the problem, to no avail. So I 
thought what the heck, and uploaded the executable to chatgpt. It responded
with 
a list of lldb commands, which I executed and transmitted the results back to 
chatgpt.

It found the bug!

Well, that was a big time saver. Tomorrow I'll see about fixing it.
Oct 10
next sibling parent reply "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 11/10/2026 7:56 PM, Walter Bright wrote:
 I am not very familiar with the Mac, and waste a lot of time trying to 
 figure out the Mac way of doing things.
 
 I was getting a bus error from a hello world program in Arm64, from 
 somewhere in druntime. I tried my usual methods at tracking the problem, 
 to no avail. So I thought what the heck, and uploaded the executable to 
 chatgpt. It responded with a list of lldb commands, which I executed and 
 transmitted the results back to chatgpt.
 
 It found the bug!
 
 Well, that was a big time saver. Tomorrow I'll see about fixing it.
If you used a client, it would have been able to run it for you and then fixed it. - Someone who already has aarch64 backend that is optimizing
Oct 11
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 10/11/2026 12:01 AM, Richard (Rikki) Andrew Cattermole wrote:
 - Someone who already has aarch64 backend that is optimizing
??
Oct 11
parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 12/10/2026 11:37 AM, Walter Bright wrote:
 On 10/11/2026 12:01 AM, Richard (Rikki) Andrew Cattermole wrote:
 - Someone who already has aarch64 backend that is optimizing
??
I've been keeping it pretty quiet and nobody really caught it when I mentioned it in a monthly meeting recently. I have my own language now :) With optimizing backend, including aarch64 support. Fully LLM written.
Oct 11
prev sibling next sibling parent jmh530 <john.michael.hall gmail.com> writes:
On Sunday, 11 October 2026 at 06:56:45 UTC, Walter Bright wrote:
 I am not very familiar with the Mac, and waste a lot of time 
 trying to figure out the Mac way of doing things.

 I was getting a bus error from a hello world program in Arm64, 
 from somewhere in druntime. I tried my usual methods at 
 tracking the problem, to no avail. So I thought what the heck, 
 and uploaded the executable to chatgpt. It responded with a 
 list of lldb commands, which I executed and transmitted the 
 results back to chatgpt.

 It found the bug!

 Well, that was a big time saver. Tomorrow I'll see about fixing 
 it.
Try using Codex. Might need Plus/Pro subscription to get some good use out of it.
Oct 11
prev sibling next sibling parent reply libxmoc <libxmoc gmail.com> writes:
On Sunday, 11 October 2026 at 06:56:45 UTC, Walter Bright wrote:
 I am not very familiar with the Mac, and waste a lot of time 
 trying to figure out the Mac way of doing things.

 I was getting a bus error from a hello world program in Arm64, 
 from somewhere in druntime. I tried my usual methods at 
 tracking the problem, to no avail. So I thought what the heck, 
 and uploaded the executable to chatgpt. It responded with a 
 list of lldb commands, which I executed and transmitted the 
 results back to chatgpt.

 It found the bug!

 Well, that was a big time saver. Tomorrow I'll see about fixing 
 it.
The machine is getting better. One note tho. the model available on the website is optimized to serve the general public, it is not that good, you should definitely look into using their codex or better, go with claude, you'll get a much better UX, it'll be able to inspect binaries directly for you using objdump and the likes, ut can disassemble, read assembly and a whole bunch of stuff. AI in the hands of people like you is a deadly combo.
Oct 11
parent libxmoc <libxmoc gmail.com> writes:
On that note, I recommend that the D Foundation look into 
https://claude.com/contact-sales/claude-for-oss to gain free 
access to Claude.
Oct 11
prev sibling next sibling parent reply strawberry9 <strawberry9 gmail.com> writes:
On Sunday, 11 October 2026 at 06:56:45 UTC, Walter Bright wrote:
 I am not very familiar with the Mac, and waste a lot of time 
 trying to figure out the Mac way of doing things.

 I was getting a bus error from a hello world program in Arm64, 
 from somewhere in druntime. I tried my usual methods at 
 tracking the problem, to no avail. So I thought what the heck, 
 and uploaded the executable to chatgpt. It responded with a 
 list of lldb commands, which I executed and transmitted the 
 results back to chatgpt.

 It found the bug!

 Well, that was a big time saver. Tomorrow I'll see about fixing 
 it.
Your a bit behind the times Walter;-) I got AI to write a how language specification and compiler .etc... etc.. in less that a week ( https://github.com/strawberry9/CobaltC ) Can you imagine how long that would have taken a human (or more correctly, a 'team' of humans, to complete).It's only cost me 1 months subscription so far. Embrace the AI age right now - that is my recommendation. Not only will it save you lots of time, it may even put you out of your job ;-)
Oct 11
next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 10/11/2026 4:16 PM, strawberry9 wrote:
 I got AI to write a how language specification and compiler .etc... etc.. in 
 less that a week ( https://github.com/strawberry9/CobaltC )
You and Rikki! I expect there will be many more.
Oct 11
next sibling parent reply "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
On 12/10/2026 7:32 PM, Walter Bright wrote:
 On 10/11/2026 4:16 PM, strawberry9 wrote:
 I got AI to write a how language specification and compiler .etc... 
 etc.. in less that a week ( https://github.com/strawberry9/CobaltC )
You and Rikki! I expect there will be many more.
There are many more than just us. But I suspect around D I may be the only actual language designer/compiler developer to do it. I have lots of opinions about compiler architecture :)
Oct 12
parent Walter Bright <newshound2 digitalmars.com> writes:
On 10/12/2026 12:01 AM, Richard (Rikki) Andrew Cattermole wrote:
 I have lots of opinions about compiler architecture :)
So does everyone else!
Oct 12
prev sibling parent reply Lance Bachmeier <no spam.net> writes:
On Monday, 12 October 2026 at 06:32:37 UTC, Walter Bright wrote:
 On 10/11/2026 4:16 PM, strawberry9 wrote:
 I got AI to write a how language specification and compiler 
 .etc... etc.. in less that a week ( 
 https://github.com/strawberry9/CobaltC )
You and Rikki! I expect there will be many more.
I think you're out of luck with respect to preventing people from inventing their own syntax for D. It's such a trivial programming problem to transform custom syntax into valid D that you can vibe code a preprocessor with a local LLM running on a CPU (I've done it). At some point I will stop writing pure D syntax, even if I share the pure D code with others. I find D to be a compelling target language because it's fast, it has a GC, it can go low-level, it's supported on many platforms, it has good language interoperability, etc. But I don't have a reason to stick with the out-of-the-box syntax any longer.
Oct 12
next sibling parent reply monkyyy <crazymonkyyy gmail.com> writes:
On Monday, 12 October 2026 at 17:08:52 UTC, Lance Bachmeier wrote:
 On Monday, 12 October 2026 at 06:32:37 UTC, Walter Bright wrote:

 platforms, it has good language interoperability, etc. But I 
 don't have a reason to stick with the out-of-the-box syntax any 
 longer.
why preprocessors over byte code or intruptitors? all 3 should be ancient cs, verifiable etc.
Oct 12
parent reply Lance Bachmeier <no spam.net> writes:
On Monday, 12 October 2026 at 19:17:48 UTC, monkyyy wrote:
 On Monday, 12 October 2026 at 17:08:52 UTC, Lance Bachmeier 
 wrote:
 On Monday, 12 October 2026 at 06:32:37 UTC, Walter Bright 
 wrote:

 platforms, it has good language interoperability, etc. But I 
 don't have a reason to stick with the out-of-the-box syntax 
 any longer.
why preprocessors over byte code or intruptitors? all 3 should be ancient cs, verifiable etc.
They'll all be straightforward using a frontier model. I singled out the preprocessor because it's fast and easy even using a local model.
Oct 12
parent reply jmh530 <john.michael.hall gmail.com> writes:
On Monday, 12 October 2026 at 21:59:54 UTC, Lance Bachmeier wrote:
 On Monday, 12 October 2026 at 19:17:48 UTC, monkyyy wrote:
 On Monday, 12 October 2026 at 17:08:52 UTC, Lance Bachmeier 
 wrote:
 On Monday, 12 October 2026 at 06:32:37 UTC, Walter Bright 
 wrote:

 platforms, it has good language interoperability, etc. But I 
 don't have a reason to stick with the out-of-the-box syntax 
 any longer.
why preprocessors over byte code or intruptitors? all 3 should be ancient cs, verifiable etc.
They'll all be straightforward using a frontier model. I singled out the preprocessor because it's fast and easy even using a local model.
Why not just tell the LLM what to do?
Oct 12
parent Lance Bachmeier <no spam.net> writes:
On Monday, 12 October 2026 at 23:51:54 UTC, jmh530 wrote:
 On Monday, 12 October 2026 at 21:59:54 UTC, Lance Bachmeier 
 wrote:
 On Monday, 12 October 2026 at 19:17:48 UTC, monkyyy wrote:
 On Monday, 12 October 2026 at 17:08:52 UTC, Lance Bachmeier 
 wrote:
 On Monday, 12 October 2026 at 06:32:37 UTC, Walter Bright 
 wrote:

 platforms, it has good language interoperability, etc. But I 
 don't have a reason to stick with the out-of-the-box syntax 
 any longer.
why preprocessors over byte code or intruptitors? all 3 should be ancient cs, verifiable etc.
They'll all be straightforward using a frontier model. I singled out the preprocessor because it's fast and easy even using a local model.
Why not just tell the LLM what to do?
Sometimes that's reasonable. It's more efficient and less error-prone if I have an easy way to express my intentions precisely and let the language turn it into calls to libraries. For example, if I want to estimate a particular model, a syntax that lets me express the model concisely and unambiguously is easier than prompting an LLM.
Oct 12
prev sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 10/12/2026 10:08 AM, Lance Bachmeier wrote:
 I think you're out of luck with respect to preventing people from inventing 
 their own syntax for D.
People write their own custom languages all the time that transform into a base language. I've done it multiple times, too. It's usually done with macros.
Oct 12
next sibling parent reply Lance Bachmeier <no spam.net> writes:
On Tuesday, 13 October 2026 at 01:29:37 UTC, Walter Bright wrote:
 On 10/12/2026 10:08 AM, Lance Bachmeier wrote:
 I think you're out of luck with respect to preventing people 
 from inventing their own syntax for D.
People write their own custom languages all the time that transform into a base language. I've done it multiple times, too. It's usually done with macros.
But you've been opposed to AST macros for as long as I've been using the language, and I'm sure even before that, because you don't want folks writing D with their own syntax. Now we don't need AST macros.
Oct 12
parent Walter Bright <newshound2 digitalmars.com> writes:
On 10/12/2026 8:39 PM, Lance Bachmeier wrote:
 But you've been opposed to AST macros for as long as I've been using the 
 language, and I'm sure even before that, because you don't want folks writing
D 
 with their own syntax. Now we don't need AST macros.
Yes, I remain opposed to them as part of the language. But if you want to generate D code from your language, feel free!
Oct 13
prev sibling parent reply Guillaume Piolat <first.last gmail.com> writes:
On Tuesday, 13 October 2026 at 01:29:37 UTC, Walter Bright wrote:
 On 10/12/2026 10:08 AM, Lance Bachmeier wrote:
 I think you're out of luck with respect to preventing people 
 from inventing their own syntax for D.
People write their own custom languages all the time that transform into a base language. I've done it multiple times, too. It's usually done with macros.
Honestly since everything seems possible now (your dream language!), I think there is a lot of value in exercising restraint and keep talking the same language, collaborating on the same libraries and sticking to our guns. AI lowers the need for each other in way obviously harmful to communities such as this one, at least that's the immediate impression.
Oct 13
parent Paolo Invernizzi <paolo.invernizzi gmail.com> writes:
On Tuesday, 13 October 2026 at 11:36:53 UTC, Guillaume Piolat 
wrote:
 On Tuesday, 13 October 2026 at 01:29:37 UTC, Walter Bright 
 wrote:
 On 10/12/2026 10:08 AM, Lance Bachmeier wrote:
 I think you're out of luck with respect to preventing people 
 from inventing their own syntax for D.
People write their own custom languages all the time that transform into a base language. I've done it multiple times, too. It's usually done with macros.
Honestly since everything seems possible now (your dream language!), I think there is a lot of value in exercising restraint and keep talking the same language, collaborating on the same libraries and sticking to our guns. AI lowers the need for each other in way obviously harmful to communities such as this one, at least that's the immediate impression.
Well, AI can also aids a lot in tooling and libraries for D, making happy also not AI lovers
Oct 13
prev sibling parent Meta <jared771 gmail.com> writes:
On Sunday, 11 October 2026 at 23:16:07 UTC, strawberry9 wrote:
 Your a bit behind the times Walter;-)

 I got AI to write a how language specification and compiler 
 .etc... etc.. in less that a week ( 
 https://github.com/strawberry9/CobaltC )

 Can you imagine how long that would have taken a human (or more 
 correctly, a 'team' of humans, to complete).It's only cost me 1 
 months subscription so far.
I'll add that I "wrote" a major language addition in a couple weeks with AI, whereas it would've taken me months otherwise. https://github.com/dlang/dmd/pull/23744 We're only at the beginning of a massive explosion in the speed at which languages and features can be iterated on. In 5-10 years I think the programming language landscape will look completely unrecognizable.
Oct 12
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
Fixed it! Now hello.d compiles and runs successfully. It's a big step forward.
Oct 11