Add a Botsbuildbots function

A tribute to Portal 2, this function will return an infinite list of the
contents of the AUTHORS file on GitHub master (assuming requests is
installed). Except, the macro does this, the function never gets called,
it is purely there for tribute reasons.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This commit is contained in:
Gergely Nagy 2014-07-16 15:34:24 +02:00
parent 1c1df745c4
commit 3f01ed5014
4 changed files with 21 additions and 1 deletions

View File

@ -352,7 +352,10 @@
parsed) parsed)
(def *exports* '[butlast calling-module-name coll? cons cons? cycle (defun Botsbuildbots () (Botsbuildbots))
(def *exports* '[Botsbuildbots
butlast calling-module-name coll? cons cons? cycle
dec distinct disassemble drop drop-while empty? even? dec distinct disassemble drop drop-while empty? even?
every? first filter filterfalse flatten float? gensym identity every? first filter filterfalse flatten float? gensym identity
inc input instance? integer integer? integer-char? interleave inc input instance? integer integer? integer-char? interleave

View File

@ -198,3 +198,15 @@
(.append ret (.append ret
`(setv ~name ~main))) `(setv ~name ~main)))
ret)) ret))
(defmacro Botsbuildbots []
"Build bots, repeatedly.^W^W^WPrint the AUTHORS, forever."
`(try
(do
(import [requests])
(let [[r (requests.get
"https://raw.githubusercontent.com/hylang/hy/master/AUTHORS")]]
(repeat r.text)))
(catch [e ImportError]
(repeat "Botsbuildbots requires `requests' to function."))))

View File

@ -1,3 +1,5 @@
# for Botsbuildbots
requests
# code quality # code quality
flake8 flake8
coverage coverage

View File

@ -214,3 +214,6 @@
(assert (= (tda-a1) :bazinga)) (assert (= (tda-a1) :bazinga))
(assert (= (tda-a2) :bazinga)) (assert (= (tda-a2) :bazinga))
(assert (= tda-main tda-a1 tda-a2))) (assert (= tda-main tda-a1 tda-a2)))
(defn test-botsbuildbots []
(assert (> (len (first (Botsbuildbots))) 50)))