Prev: Reading /proc/<pid>/maps
Next: Code and Creation 73169
From: Phred Phungus on 8 Feb 2010 20:07 Pascal J. Bourguignon wrote: > Here is the copy-and-paste of a real interaction with the Common Lisp > environment: > > > C/USER[1]> (expt 2 100) > 1267650600228229401496703205376 > C/USER[2]> (defun factorial (x) (if (< x 1) 1 (* x (factorial (- x 1))))) > FACTORIAL > C/USER[3]> (factorial 40) > 815915283247897734345611269596115894272000000000 > C/USER[4]> (/ 2 3) > 2/3 > > > Notice also that 2/3 is not 0, but 2/3. > > Also, notice that lisp is technology FIFTY years old, nothing from the > other world. Where have you been in the last 50 years? I had my first real interaction with lisp but with less-pretty results: [1]> (expt 2 100) 1267650600228229401496703205376 [2]> (defun factorial (x) (if (< x 1) 1 (* x (factorial (- x 1))))) FACTORIAL [3]> (factorial 40) 815915283247897734345611269596115894272000000000 [4]> (/ 2 3) 2/3 [5]> (* 1 3) 3 [6]> 1267650600228229401496703205376 *815915283247897734345611269596115894272000000000 1267650600228229401496703205376 [7]> *** - EVAL: variable *815915283247897734345611269596115894272000000000 has no value The following restarts are available: USE-VALUE :R1 You may input a value to be used instead of *815915283247897734345611269596115894272000000000. STORE-VALUE :R2 You may input a new value for *815915283247897734345611269596115894272000000000. ABORT :R3 Abort main loop Break 1 [8]> ( 1267650600228229401496703205376 * 815915283247897734345611269596115894272000000000) *** - EVAL: 1267650600228229401496703205376 is not a function name; try using a symbol instead The following restarts are available: USE-VALUE :R1 You may input a value to be used instead. ABORT :R2 Abort debug loop ABORT :R3 Abort main loop Break 2 [9]> h *** - EVAL: variable H has no value The following restarts are available: USE-VALUE :R1 You may input a value to be used instead of H. STORE-VALUE :R2 You may input a new value for H. ABORT :R3 Abort debug loop ABORT :R4 Abort debug loop ABORT :R5 Abort main loop Break 3 [10]> Am I correct to think that this example had nothing to do with your upthread calculation? -- fred |