AI and Rust triggers - all in one commit (of 10^6 lines of code)

cracauer@

Developer

This looks like the right trigger for most people here :)


For many here Bun itself is also a trigger.

"Anthropic’s Bun Rust rewrite merged at speed of AI​

Version 1.3.14 of JavaScript toolkit released as last Zig version; a million lines of Rust code merged in gargantuan commit"


"Bun's migration from Zig to Rust will be watched with interest by AI advocates and sceptics alike."

No kidding :)
 
It is interesting to me because I often come across stuff written in stupid languages I am keen to translate :)

I am assuming that Zig (and Rust) are easier to translate from because they are static typed languages? Even though AI tends to have more training data for Python, its dynamic nature may end up making it more difficult to translate *away* from.

My main concern with Rust is the culture of incorrect dependency misuse. Weirdly, it seems AI does a vastly better job of writing Rust without copious technical debt. So I am hoping that if AI does take more of a hold, Rust projects will become less fragile.

Edit: The lock file shows considerably less cruft from crates.io. ~300 micro-deps (ignoring entire C compilers) compared to 1000+ typically seen in other (often vastly simpler) Rust projects.
 
FYI, no idea what it means in practice,
Code:
gm678 14 hours ago | prev | next [–]
$ rg 'unsafe [{]' src/ | wc -l
    10428
    $ rg 'unsafe [{]' src/ -l | wc -l
    736
 
    Language        Files     Lines      Code  Comments    Blanks
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    Rust             1443    929213    732281    116293     80639
    Zig              1298    711112    574563     59118     77431
    TypeScript       2604    654684    510464     82254     61966
    JavaScript       4370    364928    293211     36108     35609
    C                 111    305123    205875     79077     20171
    C++               586    262475    217111     19004     26360
    C Header          779    100979     57715     29459     13805
 

"Anthropic’s Bun Rust rewrite merged at speed of AI​

Version 1.3.14 of JavaScript toolkit released as last Zig version; a million lines of Rust code merged in gargantuan commit"
Now that's what I call 'Slop'... 😁
Question: who's going to fix the bugs?

Later that day, a phone call is overheard...
"What do you mean, BUGS? You guys told me Rust guarantees there will be no bugs, and it's going to be totally 100% secure, we're never going to get hacked by 'Double Dragon', 'Wicked Panda' or 'APT41' ever again. Right? RIGHT??!"
 
😄 , that is it folks... We are cooked! Might as well give in and buy the rustlang bible: In Rust We Trust
I'm wondering, Is there some kind of parallel here?

1778847650870.png
1778847683857.png
1778850107825.png


"Keep calm, and carry on...".
 
😄 , that is it folks... We are cooked! Might as well give in and buy the rustlang bible: In Rust We Trust
Actually your link points to a rather good book, that is not actually about Rust! The original 'In Rust we trust' paper is here https://research.cs.queensu.ca/home/cordy/Papers/ICSE22-InRustWeTrust.pdf
... and Tess Marshall's book about corrosion protection is here https://www.amazon.co.uk/Rust-we-Trust-Tess-Marshall/dp/1914195205
This is the stuff you need... https://www.dinitroldirect.com/ unless you have a zinc plating bath handy.
 
FYI, no idea what it means in practice,
Code:
gm678 14 hours ago | prev | next [–]
$ rg 'unsafe [{]' src/ | wc -l
    10428
    $ rg 'unsafe [{]' src/ -l | wc -l
    736
 
    Language        Files     Lines      Code  Comments    Blanks
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    Rust             1443    929213    732281    116293     80639
    Zig              1298    711112    574563     59118     77431
    TypeScript       2604    654684    510464     82254     61966
    JavaScript       4370    364928    293211     36108     35609
    C                 111    305123    205875     79077     20171
    C++               586    262475    217111     19004     26360
    C Header          779    100979     57715     29459     13805
Well... that seems to indicate that the Rust code has more unsafe code than that written in the other languages. In the spirit of George Orwell, it seems that "some are more unsafe than others"...
 
Back
Top