Skip to content

Instantly share code, notes, and snippets.

@de-odex

de-odex/gen.nim Secret

Created January 21, 2020 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save de-odex/cfa9a06964ac0a3550c0ea78f0ac7b0a to your computer and use it in GitHub Desktop.
Save de-odex/cfa9a06964ac0a3550c0ea78f0ac7b0a to your computer and use it in GitHub Desktop.
1.2mil memes
import os
import strformat
createDir("hellomodule")
var
base = open("." / "use.nim", fmWrite)
for i in 1..1000:
let importStr = &"import hellomodule/file_{i}\n"
base.write(importStr)
for i in 1..1000:
var file = open("." / "hellomodule" / &"file_{i}.nim", fmWrite)
for j in 1..1200:
file.write(&"proc print_{i}x{j}* = echo \"hello, {i} {j}!\"\n")
base.write(&"print_{i}x{j}()\n")
file.close()
base.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment