Skip to content
  • Hjem
  • Seneste
  • Etiketter
  • Populære
  • Verden
  • Bruger
  • Grupper
Temaer
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Kollaps
FARVEL BIG TECH
  1. Forside
  2. Ikke-kategoriseret
  3. The coreutils Rust rewrite story is pretty funny.

The coreutils Rust rewrite story is pretty funny.

Planlagt Fastgjort Låst Flyttet Ikke-kategoriseret
198 Indlæg 103 Posters 193 Visninger
  • Ældste til nyeste
  • Nyeste til ældste
  • Most Votes
Svar
  • Svar som emne
Login for at svare
Denne tråd er blevet slettet. Kun brugere med emne behandlings privilegier kan se den.
  • simonzerafa@infosec.exchangeS simonzerafa@infosec.exchange

    @lcamtuf

    Deus forbid if they create a functional specification of how the existing utilities work, before converting / rewriting them in a new language 😟🤦‍♂️

    beandev@social.tchncs.deB This user is from outside of this forum
    beandev@social.tchncs.deB This user is from outside of this forum
    beandev@social.tchncs.de
    wrote sidst redigeret af
    #160

    @simonzerafa
    But the question is also where the responsibility lies for the lack of documentation and (much more importantly) unit tests. If the learning curve was so steep when it came to eliminating all race conditions, where are the tests that verified precisely these issues? Of course, it’s clear that the bug-fixing culture at the time didn’t have a “must-have 100% test coverage” requirement. But it’s also not easy to implement these tests now through reverse engineering.

    I don't think a lack of documentation and testing is necessarily the main obstacle to a new development. In fact, they might even be a reason for it.

    However, you shouldn't put such newly developed software into production right away.
    @lcamtuf

    1 Reply Last reply
    0
    • raymaccarthy@mastodon.ieR raymaccarthy@mastodon.ie

      @lcamtuf
      I learned C++ after Modula-2 and before C.
      I learned programming earlier.

      Learning a programming language isn't learning programming (extracting requirements, specification, design, coding, test etc).
      I looked at Rust. C++ certainly has got too complicated since 1987, but I wonder does Rust *only* help with memory safety?
      Main memory safety in general relates to using pointers that are invalid, accessing arrays out of bounds and past the end of strings.
      Partly bad libraries & design.

      beandev@social.tchncs.deB This user is from outside of this forum
      beandev@social.tchncs.deB This user is from outside of this forum
      beandev@social.tchncs.de
      wrote sidst redigeret af
      #161

      @raymaccarthy
      Main memory safety in general, including threads. So, it's a "little" bit more 😉

      @lcamtuf

      1 Reply Last reply
      0
      • lispi314@udongein.xyzL lispi314@udongein.xyz

        @xerz@soc.masfloss.net @hypha@cafe.mycelium.locahlo.st @star@fed.amazonawaws.com @lcamtuf@infosec.exchange Last I had heard from gccrust is that it couldn’t even be used for bootstrap compiling yet, without enforcing any of the semantics a Rust compiler is expected to.

        It’s unclear whether it also now does that as of this progress report or not. If it does then that would be progress indeed.

        star@fed.amazonawaws.comS This user is from outside of this forum
        star@fed.amazonawaws.comS This user is from outside of this forum
        star@fed.amazonawaws.com
        wrote sidst redigeret af
        #162
        @lispi314 @xerz @hypha @lcamtuf you don't need borrow checking in well-formed programs. You need borrow checking to ensure a program is safe. the rust compiler is currently the definition of what is well-formed so you don't really have an advantage if you compile the 1.49 sources with or without borrow checking
        1 Reply Last reply
        0
        • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

          The coreutils Rust rewrite story is pretty funny.

          Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

          But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

          https://seclists.org/oss-sec/2026/q2/332

          PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

          tael@yiff.lifeT This user is from outside of this forum
          tael@yiff.lifeT This user is from outside of this forum
          tael@yiff.life
          wrote sidst redigeret af
          #163

          @lcamtuf Of course it didn't, an LLM wouldn't account for that.

          1 Reply Last reply
          0
          • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

            The coreutils Rust rewrite story is pretty funny.

            Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

            But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

            https://seclists.org/oss-sec/2026/q2/332

            PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

            varx@cybersecurity.theaterV This user is from outside of this forum
            varx@cybersecurity.theaterV This user is from outside of this forum
            varx@cybersecurity.theater
            wrote sidst redigeret af
            #164

            @lcamtuf People keep stepping on that rake.

            1 Reply Last reply
            0
            • K kynx@fosstodon.org

              @ChuckMcManis @lcamtuf now why the hell, after all these years, have I not heard of Chesterton’s Fence? Is this what I missed by not learning my trade at a uni? Kinda rhetorical, but I _still_ feel I must’ve missed something other than the debt…

              Anyway, thank you. It’s going to provide a nice two-worder when reviewing prs by newbies - and a lot of oldbies and, lest l forget, their sloppy chums.

              gumnos@mastodon.bsd.cafeG This user is from outside of this forum
              gumnos@mastodon.bsd.cafeG This user is from outside of this forum
              gumnos@mastodon.bsd.cafe
              wrote sidst redigeret af
              #165

              @Kynx

              If it's any comfort, I got my bachelor's degree in CS, yet Chesterton's Fence was never mentioned there. I only learned it later in life due to memes. So don't feel bad about the uni thing ☺

              @ChuckMcManis @lcamtuf

              S 1 Reply Last reply
              0
              • taschenorakel@mastodon.greenT taschenorakel@mastodon.green

                @BalooUriza People who hate the GPL and wanted to get rid of it, from what I heard.

                @lcamtuf

                gumnos@mastodon.bsd.cafeG This user is from outside of this forum
                gumnos@mastodon.bsd.cafeG This user is from outside of this forum
                gumnos@mastodon.bsd.cafe
                wrote sidst redigeret af
                #166

                @taschenorakel

                It also felt like a fair bit of "this is a known quantity and a fun task to undertake just because I'm learning a new language". Almost like a joke that got taken too far 😑

                @BalooUriza @lcamtuf

                1 Reply Last reply
                0
                • gumnos@mastodon.bsd.cafeG gumnos@mastodon.bsd.cafe

                  @Kynx

                  If it's any comfort, I got my bachelor's degree in CS, yet Chesterton's Fence was never mentioned there. I only learned it later in life due to memes. So don't feel bad about the uni thing ☺

                  @ChuckMcManis @lcamtuf

                  S This user is from outside of this forum
                  S This user is from outside of this forum
                  shadsterling@mastodon.social
                  wrote sidst redigeret af
                  #167

                  @gumnos @Kynx @ChuckMcManis @lcamtuf same. I still have to look it up every time I see it mentioned, and every time I think “oh, right; yeah, obviously”

                  gumnos@mastodon.bsd.cafeG 1 Reply Last reply
                  0
                  • orb2069@mastodon.onlineO orb2069@mastodon.online

                    @groxx

                    ...I like how you assume people read comments. It gives me hope.

                    @lcamtuf

                    S This user is from outside of this forum
                    S This user is from outside of this forum
                    shadsterling@mastodon.social
                    wrote sidst redigeret af
                    #168

                    @Orb2069 @groxx @lcamtuf so, there were comments explaining everything? That’s better than I would’ve guessed

                    groxx@hachyderm.ioG 1 Reply Last reply
                    0
                    • miss_rodent@girlcock.clubM miss_rodent@girlcock.club

                      @lcamtuf Yeah, but they got to license-wash the coreutils, the gnu coreutils are GPL3, the rust uutils use the much more corporate-overlord and user-abuse friendly MIT license.

                      S This user is from outside of this forum
                      S This user is from outside of this forum
                      shadsterling@mastodon.social
                      wrote sidst redigeret af
                      #169

                      @miss_rodent @lcamtuf oh, is that why canonical liked it?

                      1 Reply Last reply
                      0
                      • S shadsterling@mastodon.social

                        @gumnos @Kynx @ChuckMcManis @lcamtuf same. I still have to look it up every time I see it mentioned, and every time I think “oh, right; yeah, obviously”

                        gumnos@mastodon.bsd.cafeG This user is from outside of this forum
                        gumnos@mastodon.bsd.cafeG This user is from outside of this forum
                        gumnos@mastodon.bsd.cafe
                        wrote sidst redigeret af
                        #170

                        @ShadSterling

                        To be fair, if it had been mentioned outside the context of this thread, I too would have had to (re)look it up (for the umpteenth time…)

                        😆

                        @Kynx @ChuckMcManis @lcamtuf

                        1 Reply Last reply
                        0
                        • raven667@hachyderm.ioR raven667@hachyderm.io

                          @sten @darkuncle The old joke that _everyone_ has a testing environment, some are fortunate enough to have a separate Production environment 🙂

                          sqlallfather@techhub.socialS This user is from outside of this forum
                          sqlallfather@techhub.socialS This user is from outside of this forum
                          sqlallfather@techhub.social
                          wrote sidst redigeret af
                          #171

                          @raven667 @sten @darkuncle

                          Joke?

                          1 Reply Last reply
                          0
                          • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                            The coreutils Rust rewrite story is pretty funny.

                            Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                            But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                            https://seclists.org/oss-sec/2026/q2/332

                            PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                            mborges@mastodon.socialM This user is from outside of this forum
                            mborges@mastodon.socialM This user is from outside of this forum
                            mborges@mastodon.social
                            wrote sidst redigeret af
                            #172

                            @lcamtuf I'm the first advocating for Rust for new developments, I do think having a more modern codebase for coreutils makes sense.
                            But as much as I like seeing Rust software running on more computers, seeing Canonical push a pre-release version of a software made me even more pissed at them that I already was.
                            Why would you deploy pre-v1 critical components on millions of computers, wtf.
                            Even on my archlinux machines I wouldn't deploy that in its current form...

                            1 Reply Last reply
                            0
                            • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                              The coreutils Rust rewrite story is pretty funny.

                              Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                              But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                              https://seclists.org/oss-sec/2026/q2/332

                              PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                              godofbiscuits@sfba.socialG This user is from outside of this forum
                              godofbiscuits@sfba.socialG This user is from outside of this forum
                              godofbiscuits@sfba.social
                              wrote sidst redigeret af
                              #173

                              @lcamtuf the best code is the code that already works.

                              1 Reply Last reply
                              0
                              • ireneista@adhd.irenes.spaceI ireneista@adhd.irenes.space

                                @r @q @erincandescent @pinskia @lcamtuf ouch.... we just realized, the last time we saw people excited to be creative with a new browser feature

                                it was JPEG XL

                                doomed_daniel@mastodon.gamedev.placeD This user is from outside of this forum
                                doomed_daniel@mastodon.gamedev.placeD This user is from outside of this forum
                                doomed_daniel@mastodon.gamedev.place
                                wrote sidst redigeret af
                                #174

                                @ireneista @r @q @erincandescent @pinskia @lcamtuf
                                when it was added, when it was removed, or when it was added again?

                                ireneista@adhd.irenes.spaceI 1 Reply Last reply
                                0
                                • doomed_daniel@mastodon.gamedev.placeD doomed_daniel@mastodon.gamedev.place

                                  @ireneista @r @q @erincandescent @pinskia @lcamtuf
                                  when it was added, when it was removed, or when it was added again?

                                  ireneista@adhd.irenes.spaceI This user is from outside of this forum
                                  ireneista@adhd.irenes.spaceI This user is from outside of this forum
                                  ireneista@adhd.irenes.space
                                  wrote sidst redigeret af
                                  #175

                                  @Doomed_Daniel @r @q @erincandescent @pinskia @lcamtuf when it was removed. it came back?

                                  doomed_daniel@mastodon.gamedev.placeD 1 Reply Last reply
                                  0
                                  • cmdrmoto@hachyderm.ioC cmdrmoto@hachyderm.io

                                    @benh @lcamtuf Wow. Kudos to Joel, it’s 26 years later and I still remember reading this article when it was fresh.

                                    slash909uk@mastodon.me.ukS This user is from outside of this forum
                                    slash909uk@mastodon.me.ukS This user is from outside of this forum
                                    slash909uk@mastodon.me.uk
                                    wrote sidst redigeret af
                                    #176

                                    @cmdrmoto @benh @lcamtuf wow, I had not re-read that for years! This highlight is the killer insight for me:

                                    'It’s harder to read code than to write it.'

                                    So much lost and relearned (or not☹️) for this simple reason!

                                    dolanor@hachyderm.ioD 1 Reply Last reply
                                    0
                                    • slash909uk@mastodon.me.ukS slash909uk@mastodon.me.uk

                                      @cmdrmoto @benh @lcamtuf wow, I had not re-read that for years! This highlight is the killer insight for me:

                                      'It’s harder to read code than to write it.'

                                      So much lost and relearned (or not☹️) for this simple reason!

                                      dolanor@hachyderm.ioD This user is from outside of this forum
                                      dolanor@hachyderm.ioD This user is from outside of this forum
                                      dolanor@hachyderm.io
                                      wrote sidst redigeret af
                                      #177

                                      @Slash909uk @cmdrmoto @benh @lcamtuf especially in the age of AI

                                      1 Reply Last reply
                                      0
                                      • lcamtuf@infosec.exchangeL lcamtuf@infosec.exchange

                                        The coreutils Rust rewrite story is pretty funny.

                                        Coreutils are tools like rm, mv, mkdir, etc. Unlike binutils, this isn't a fertile ground for memory safety bugs. But, the rewrite was completed, and in the spirit of progress, Canonical decided to switch.

                                        But do you know what coreutils are a fertile ground for? Race conditions around file creation, deletion, permission setting, and so on. The original code accounted for decades of hard-learned lessons in that space. The Rust rewrite did not:

                                        https://seclists.org/oss-sec/2026/q2/332

                                        PS. I'm not dunking on Rust. It's just that... starting over from scratch has its hidden costs.

                                        slash909uk@mastodon.me.ukS This user is from outside of this forum
                                        slash909uk@mastodon.me.ukS This user is from outside of this forum
                                        slash909uk@mastodon.me.uk
                                        wrote sidst redigeret af
                                        #178

                                        @lcamtuf yeah. currently running Ubuntu 24.04 LTS. My next upgrade will be a different distribution I think😥

                                        BSD maybe?

                                        jerrej@mastodon.socialJ 1 Reply Last reply
                                        0
                                        • P pinskia@hachyderm.io

                                          @ireneista @lcamtuf

                                          "Netscape went bankrupt trying to re-write their software from scratch"

                                          It is also why Microsoft Edge went from something written from scratch to be a fork of chromium. The story is the same and even more it is about the similar product. Plus it is a recent example of the whole starting from scratch issues.

                                          ingalovinde@embracing.spaceI This user is from outside of this forum
                                          ingalovinde@embracing.spaceI This user is from outside of this forum
                                          ingalovinde@embracing.space
                                          wrote sidst redigeret af
                                          #179

                                          @pinskia @ireneista @lcamtuf
                                          > It is also why Microsoft Edge went from something written from scratch to be a fork of chromium

                                          Wasn't that because most of Edge audience heavily used Google products (including Google maps and YouTube and Google meet), and Google actively sabotaged the performance of these products in Edge specifically, in order to push users away from it and towards Chrome?

                                          1 Reply Last reply
                                          0
                                          Svar
                                          • Svar som emne
                                          Login for at svare
                                          • Ældste til nyeste
                                          • Nyeste til ældste
                                          • Most Votes


                                          • Log ind

                                          • Har du ikke en konto? Tilmeld

                                          • Login or register to search.
                                          Powered by NodeBB Contributors
                                          Graciously hosted by data.coop
                                          • First post
                                            Last post
                                          0
                                          • Hjem
                                          • Seneste
                                          • Etiketter
                                          • Populære
                                          • Verden
                                          • Bruger
                                          • Grupper