10
kmila
5y

I'm looking for a kind of "lorem ipsum" but not for text, for code. Some kind of random code generator with configurable language to test code rendering, compare programming fonts, etc. Any suggestions?

Comments
  • 5
    just copy something from github trending repos or stackoverflow.
  • 1
    lisp
    or you’re looking for a fuzzer ?
  • 4
    @vane sounds like they’re comparing syntax aesthetics. I just generate the blurbs and change the font manually.
  • 1
    @toriyuno so it’s a question about syntax highlighting library then ?
  • 5
    Generate random bytes. Treat as assembly. Disassemble. Transpile to language of your choice.

    It'll be absolute garbage, and will fail quite often, but will be random code.
  • 1
    @vane here's a quick example I wrote up to explain.

    Python vs Javascript for "hello world".
  • 2
    @toriyuno hmm the python version is a bit complex, could you add some comments to explain it a bit better?
  • 2
    @Codex404 I admit it's more complicated than necessary. I miss the days of bracketless print statements :(
Add Comment