| I don't know if anyone will ever need this, but I was bored, so I wrote a little script to log your REPL interactions. arc> (load "transcribe/transcribe.arc")
nil
arc> (transcribe "test")
;;; Starting transcription
arc (log)> (+ 1 2)
3
arc (log)> (def fact (n)
(if (<= n 0)
1
(* n (fact (- n 1)))))
#<procedure: fact>
arc (log)> (fact 5)
120
arc (log)> (load "trace/trace.arc")
nil
arc (log)> (trace fact)
*** tracing fact
nil
arc (log)> (fact 5)
1. Trace: (fact 5)
2. Trace: (fact 4)
3. Trace: (fact 3)
4. Trace: (fact 2)
5. Trace: (fact 1)
6. Trace: (fact 0)
6. Trace: fact ==> 1
5. Trace: fact ==> 1
4. Trace: fact ==> 2
3. Trace: fact ==> 6
2. Trace: fact ==> 24
1. Trace: fact ==> 120
120
arc (log)> :a
;;; Ending transcription
done
arc> :a
$ cat test
;;; Transcript of Arc REPL session on 28 February 2010 at 12:30 am GMT
; arc> (+ 1 2)
3
; arc> (def fact (n) (if (<= n 0) 1 (* n (fact (- n 1)))))
#<procedure: fact>
; arc> (fact 5)
120
; arc> (load "trace/trace.arc")
nil
; arc> (trace fact)
*** tracing fact
nil
; arc> (fact 5)
1. Trace: (fact 5)
2. Trace: (fact 4)
3. Trace: (fact 3)
4. Trace: (fact 2)
5. Trace: (fact 1)
6. Trace: (fact 0)
6. Trace: fact ==> 1
5. Trace: fact ==> 1
4. Trace: fact ==> 2
3. Trace: fact ==> 6
2. Trace: fact ==> 24
1. Trace: fact ==> 120
120
; arc> :a
;;; Transcript stopped on 28 February 2010 at 12:31 am GMT
URL: http://bitbucket.org/fallintothis/transcribe/ |