Skip to content

Instantly share code, notes, and snippets.

@ijp
Created September 11, 2013 13:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ijp/6523456 to your computer and use it in GitHub Desktop.
Save ijp/6523456 to your computer and use it in GitHub Desktop.
#!/usr/bin/env guile
!#
((lambda (count self)
(format #t "virus version ~a~%" count)
(when (> count 10)
(format #t "10 times is quite enough silliness, thank you\n")
(quit 0))
(call-with-output-file (string-append "/tmp/foo" (number->string count))
(lambda (out)
(format out "#!/usr/bin/env guile\n!#\n")
(write (list self (+ 1 count) (list (quote quote) self)) out)
(chmod out #o755)))
(quit 0))
0
'(lambda (count self)
(format #t "virus version ~a~%" count)
(when (> count 10)
(format #t "10 times is quite enough silliness, thank you\n")
(quit 0))
(call-with-output-file (string-append "/tmp/foo" (number->string count))
(lambda (out)
(format out "#!/usr/bin/env guile\n!#\n")
(write (list self (+ 1 count) (list (quote quote) self)) out)
(chmod out #o755)))
(quit 0)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment