Hacker News new | ask | show | jobs
by FireInsight 1022 days ago
Cool idea, but first I got a file which immediately read "This source file is part of the Swift codebase" or smth, and them I got one which is just the characters "})", so pretty inbalanced. Took me a while to figure out that the arrows change between files.
3 comments

I had the inverse: literally only a return statement impossible to guess:

            return output
          }
        }
      }
    }
  }
I guess this is one of the cases where an app should pretend to choose a "random" snippet, but actually the user doesn't want real randomness.
Seems like something that could be solved using tree-sitter[1], though it would probably be pretty involved.

1. https://tree-sitter.github.io/tree-sitter/

Well if you play geoguessr, you often just see the name of the city.
Yeah, my first one had an import for k8s.io or something so I could easily guess Kubernetes but the second one was just 3 lines of some generic import