Hacker News new | ask | show | jobs
by mden 1139 days ago
I mean, it's not really wrong, is it? :D Have you tried the same with gpt4?
1 comments

GPT-4 also reaches out for Mutex. Which I think is fair - it really is the easiest way to solve the literal problem presented to it, after all.

OTOH given "write a lock implementation in Rust without using existing standard library synchronization primitives", both try to implement a spinlock. But GPT-4 knows about compare_and_swap, whereas Bard appears to believe that spinning on load(SeqCst) followed by store(SeqCst) is sufficient to synchronize with other threads.

But a task like that is more likely to depend at how much Rust code each model was trained on rather than its capability to reason.