Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • 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 (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. i'm at a loss of words after reading a paper about reformatting code using an ML model that has a measured statistical quantity A_c which says how often the reformatted code behaves the same as the original

i'm at a loss of words after reading a paper about reformatting code using an ML model that has a measured statistical quantity A_c which says how often the reformatted code behaves the same as the original

Scheduled Pinned Locked Moved Uncategorized
140 Posts 61 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

    @deborahh @danlyke this is what a reasonable person would understand to be "code style", yes

    nxskok@cupoftea.socialN This user is from outside of this forum
    nxskok@cupoftea.socialN This user is from outside of this forum
    nxskok@cupoftea.social
    wrote last edited by
    #55

    @whitequark @deborahh @danlyke ie, the sort of thing a linter does?

    hennichodernich@radiosocial.deH 1 Reply Last reply
    0
    • budududuroiu@hachyderm.ioB budududuroiu@hachyderm.io

      @whitequark "92 boosts, 115 favourites" damn

      I swear to god sometimes Mastodon is just "old person yells at thing".

      Researchers spend tons of time and money trying to solve Sudoku in polynomial time not because Sudoku is such a important problem to humanity, but because it's a NP-Hard problem, and you can thus reduce all other NP-complete problems to Sudoku and solve them all in polynomial time if you can solve Sudoku in polynomial time.

      The research challenge is disentangling content from style in a learned embedding space, it's a classic representation learning problem that's genuinely hard: 1) Two functions that do the same thing should have identical content embeddings but different style embeddings, 2) Style must generalise to unseen code patterns, not just pattern-match known rules, 3) It's unsupervised, so there's no labeled (code_A, same_code_in_style_B) training pairs.

      Code formatting is actually a very good medium to test this hypothesis, because you have an infinite latent space of code that does the exact same thing but is stylistically different.

      whitequark@social.treehouse.systemsW This user is from outside of this forum
      whitequark@social.treehouse.systemsW This user is from outside of this forum
      whitequark@social.treehouse.systems
      wrote last edited by
      #56

      @budududuroiu the reason I was reading the paper is because I'm working on the same problem and I think the encoding presented in the paper makes no sense at all to use

      budududuroiu@hachyderm.ioB 1 Reply Last reply
      0
      • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

        @budududuroiu the reason I was reading the paper is because I'm working on the same problem and I think the encoding presented in the paper makes no sense at all to use

        budududuroiu@hachyderm.ioB This user is from outside of this forum
        budududuroiu@hachyderm.ioB This user is from outside of this forum
        budududuroiu@hachyderm.io
        wrote last edited by
        #57

        @whitequark to use for what? It's research, it's not meant to create something for industry use. Academia already suffers from the "File-drawer problem". I also did research on using GANs for Outlier Detection, when most of the time Outlier Detection is a classification problem, not a learned representation problem.

        whitequark@social.treehouse.systemsW 1 Reply Last reply
        0
        • budududuroiu@hachyderm.ioB budududuroiu@hachyderm.io

          @whitequark to use for what? It's research, it's not meant to create something for industry use. Academia already suffers from the "File-drawer problem". I also did research on using GANs for Outlier Detection, when most of the time Outlier Detection is a classification problem, not a learned representation problem.

          whitequark@social.treehouse.systemsW This user is from outside of this forum
          whitequark@social.treehouse.systemsW This user is from outside of this forum
          whitequark@social.treehouse.systems
          wrote last edited by
          #58

          @budududuroiu yes yes i know you're here because you look at trends and start arguments, now move on to something else and stop wasting my time

          budududuroiu@hachyderm.ioB 1 Reply Last reply
          0
          • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

            @budududuroiu yes yes i know you're here because you look at trends and start arguments, now move on to something else and stop wasting my time

            budududuroiu@hachyderm.ioB This user is from outside of this forum
            budududuroiu@hachyderm.ioB This user is from outside of this forum
            budududuroiu@hachyderm.io
            wrote last edited by
            #59

            @whitequark lmao, have fun "clowning" on stuff you don't understand

            whitequark@social.treehouse.systemsW 1 Reply Last reply
            0
            • budududuroiu@hachyderm.ioB budududuroiu@hachyderm.io

              @whitequark lmao, have fun "clowning" on stuff you don't understand

              whitequark@social.treehouse.systemsW This user is from outside of this forum
              whitequark@social.treehouse.systemsW This user is from outside of this forum
              whitequark@social.treehouse.systems
              wrote last edited by
              #60

              @budududuroiu go take a short walk off a long pier

              1 Reply Last reply
              0
              • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                @porglezomp you'll love Fig. 6

                rootkitty@yiff.lifeR This user is from outside of this forum
                rootkitty@yiff.lifeR This user is from outside of this forum
                rootkitty@yiff.life
                wrote last edited by
                #61

                @whitequark "If" right next to "if"

                1 Reply Last reply
                0
                • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                  i'm at a loss of words after reading a paper about reformatting code using an ML model that has a measured statistical quantity A_c which says how often the reformatted code behaves the same as the original

                  the "ideal" (their choice of words) case is 64.2%

                  fibrojedi@gamepad.clubF This user is from outside of this forum
                  fibrojedi@gamepad.clubF This user is from outside of this forum
                  fibrojedi@gamepad.club
                  wrote last edited by
                  #62

                  @whitequark if I have understood you correctly, they're saying 64% functional is a satisfactory result?

                  whitequark@social.treehouse.systemsW 1 Reply Last reply
                  0
                  • fibrojedi@gamepad.clubF fibrojedi@gamepad.club

                    @whitequark if I have understood you correctly, they're saying 64% functional is a satisfactory result?

                    whitequark@social.treehouse.systemsW This user is from outside of this forum
                    whitequark@social.treehouse.systemsW This user is from outside of this forum
                    whitequark@social.treehouse.systems
                    wrote last edited by
                    #63

                    @FibroJedi that's my read of it yeah

                    fibrojedi@gamepad.clubF 1 Reply Last reply
                    0
                    • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                      i'm at a loss of words after reading a paper about reformatting code using an ML model that has a measured statistical quantity A_c which says how often the reformatted code behaves the same as the original

                      the "ideal" (their choice of words) case is 64.2%

                      me@social.jlamothe.netM This user is from outside of this forum
                      me@social.jlamothe.netM This user is from outside of this forum
                      me@social.jlamothe.net
                      wrote last edited by
                      #64
                      @whitequark Whenever I hear about these benchmarks I can't help but wonder how people can say these things with a straight face.
                      1 Reply Last reply
                      0
                      • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                        @FibroJedi that's my read of it yeah

                        fibrojedi@gamepad.clubF This user is from outside of this forum
                        fibrojedi@gamepad.clubF This user is from outside of this forum
                        fibrojedi@gamepad.club
                        wrote last edited by
                        #65

                        @whitequark Maybe they'd like their phone and car 64% functional as a real world test 😏.

                        Some of those logic misses/switches are disturbing. I don't know how it's allowable.

                        If the code works 100%, and "reformatting" it reduces that % then it's wrong by definition.

                        1 Reply Last reply
                        0
                        • xgranade@wandering.shopX xgranade@wandering.shop

                          @whitequark @porglezomp I'm spitting out my drink at j++ ­→ j--. Holy shit.

                          sabik@rants.auS This user is from outside of this forum
                          sabik@rants.auS This user is from outside of this forum
                          sabik@rants.au
                          wrote last edited by
                          #66

                          @xgranade @whitequark @porglezomp
                          I think reversing the `j` for loop is actually wanted by them? It's labelled "ground truth", and it is a potential valid optimisation

                          ingalovinde@embracing.spaceI 1 Reply Last reply
                          0
                          • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                            i'm at a loss of words after reading a paper about reformatting code using an ML model that has a measured statistical quantity A_c which says how often the reformatted code behaves the same as the original

                            the "ideal" (their choice of words) case is 64.2%

                            dakangaroo@mastodon.socialD This user is from outside of this forum
                            dakangaroo@mastodon.socialD This user is from outside of this forum
                            dakangaroo@mastodon.social
                            wrote last edited by
                            #67

                            @whitequark But... why? Why not just use a linter?

                            whitequark@social.treehouse.systemsW 1 Reply Last reply
                            0
                            • ireneista@adhd.irenes.spaceI ireneista@adhd.irenes.space

                              @whitequark because "the thing we're promoting is incredibly dangerous, and not in fun ways" is not really the thing anyone wants to be cited for

                              geoffwozniak@masto.hackers.townG This user is from outside of this forum
                              geoffwozniak@masto.hackers.townG This user is from outside of this forum
                              geoffwozniak@masto.hackers.town
                              wrote last edited by
                              #68

                              @ireneista @whitequark Now, show me the numbers on the effort to make a rule-based style file compared to this. Because I'm sure that A_c is 100.0 in that case.

                              Link Preview Image
                              whitequark@social.treehouse.systemsW 1 Reply Last reply
                              0
                              • dakangaroo@mastodon.socialD dakangaroo@mastodon.social

                                @whitequark But... why? Why not just use a linter?

                                whitequark@social.treehouse.systemsW This user is from outside of this forum
                                whitequark@social.treehouse.systemsW This user is from outside of this forum
                                whitequark@social.treehouse.systems
                                wrote last edited by
                                #69

                                @DaKangaroo see edit

                                1 Reply Last reply
                                0
                                • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                                  i'm at a loss of words after reading a paper about reformatting code using an ML model that has a measured statistical quantity A_c which says how often the reformatted code behaves the same as the original

                                  the "ideal" (their choice of words) case is 64.2%

                                  mirabilos@toot.mirbsd.orgM This user is from outside of this forum
                                  mirabilos@toot.mirbsd.orgM This user is from outside of this forum
                                  mirabilos@toot.mirbsd.org
                                  wrote last edited by
                                  #70

                                  @whitequark I cannot even

                                  1 Reply Last reply
                                  0
                                  • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                                    @porglezomp you'll love Fig. 6

                                    mntmn@mastodon.socialM This user is from outside of this forum
                                    mntmn@mastodon.socialM This user is from outside of this forum
                                    mntmn@mastodon.social
                                    wrote last edited by
                                    #71

                                    @whitequark @porglezomp long live the new flesh

                                    1 Reply Last reply
                                    0
                                    • geoffwozniak@masto.hackers.townG geoffwozniak@masto.hackers.town

                                      @ireneista @whitequark Now, show me the numbers on the effort to make a rule-based style file compared to this. Because I'm sure that A_c is 100.0 in that case.

                                      Link Preview Image
                                      whitequark@social.treehouse.systemsW This user is from outside of this forum
                                      whitequark@social.treehouse.systemsW This user is from outside of this forum
                                      whitequark@social.treehouse.systems
                                      wrote last edited by
                                      #72

                                      @GeoffWozniak @ireneista so the problem i'm solving is that while for C++, you have tools like clang-format which are nice and flexible, for Rust you have rustfmt which is rigid and makes your code look like ass. I do not like my code looking like ass but I am also receptive to the idea that introducing as many knobs as clang-format has into rustfmt would make it unmaintainable

                                      geoffwozniak@masto.hackers.townG 1 Reply Last reply
                                      0
                                      • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                                        i'm at a loss of words after reading a paper about reformatting code using an ML model that has a measured statistical quantity A_c which says how often the reformatted code behaves the same as the original

                                        the "ideal" (their choice of words) case is 64.2%

                                        tunafishtiger@mastodon.onlineT This user is from outside of this forum
                                        tunafishtiger@mastodon.onlineT This user is from outside of this forum
                                        tunafishtiger@mastodon.online
                                        wrote last edited by
                                        #73

                                        @whitequark this technology is going to be amazing for the competitive advantage of the few software firms that refuse to use it

                                        1 Reply Last reply
                                        0
                                        • whitequark@social.treehouse.systemsW whitequark@social.treehouse.systems

                                          i'm at a loss of words after reading a paper about reformatting code using an ML model that has a measured statistical quantity A_c which says how often the reformatted code behaves the same as the original

                                          the "ideal" (their choice of words) case is 64.2%

                                          dalias@hachyderm.ioD This user is from outside of this forum
                                          dalias@hachyderm.ioD This user is from outside of this forum
                                          dalias@hachyderm.io
                                          wrote last edited by
                                          #74

                                          @whitequark Saw your edit with the motivation for reading research. I doubt there's anything out there doing this well, but I think the smart approach to doing it well would be to evaluate and score a bunch of candidate standard-class rules across the codebase, solve for a set that maximally approximates what's already there, then apply some sort of pattern learning for the remaining instances that "break the rules", hopefully identifying correlations between them.

                                          Basically, going as far as you can with simple comprehensible deterministic rules before you start throwing magical statistics at it.

                                          whitequark@social.treehouse.systemsW 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups