Ad

The watcher part isn't needed. All you have to do is write the tests themeselves.

int main()
{
  printf("%d\n", test());
}

int test()
{
  __asm__("movl $1337, %eax");
}
Code
Diff
  • #!/bin/bash       
    
    foo="Hello World!"
    for (( i=0; i<${#foo}; i++ ))
    do
      echo -n "$(tput setaf $i)${foo:$i:1}$(tput sgr0)"
    done
    • #!/bin/bash
    • cat <<< "Hello Bash!"
    • #!/bin/bash
    • foo="Hello World!"
    • for (( i=0; i<${#foo}; i++ ))
    • do
    • echo -n "$(tput setaf $i)${foo:$i:1}$(tput sgr0)"
    • done

I wonder what this does?

(defn goes-before? [val1 val2] (<= val1 val2))

;; bubble: list of number -> list of number
;; This was originally racket code, 
;; so it used 'car' and 'cdr' instead of 'first' and 'next'
;; Why can't clojure keep my theming?
(defn bubble [tanks]
  ;; I'm using nested if statements here because I want to use let
  (if (or (nil? tanks) (nil? (next tanks)))
      (cons tanks '(false))
      (let* [truck (first tanks) convoy (next tanks) jeep (first convoy)]
         (if (goes-before? truck jeep)
           (let [debrief (bubble convoy)] (cons (cons truck (first debrief)) (next debrief)))
           (cons (cons jeep (first (bubble (cons truck (next convoy))))) '(true))
           )
        )
      )
  )
  
  ;; bubble-sort: list of number -> list of number
(defn bubble-sort [l]
  (let [bubbly (bubble l)]
    (if (first (next bubbly))
        (bubble-sort (first bubbly))
        (first bubbly)
        )))
        
  (prn (bubble-sort (list 5 4 3 2 1)))