<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On Oct 13, 2010, at 7:29 PM, Mathew Kurian wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p>-- Is Racket an interpreted language? If not, how does it&nbsp;convert to&nbsp;machine/binary code?</p></blockquote><div>As you know, Racket evolved from Scheme, which evolved from Lisp, which in its earliest implementations (fifty years ago) was interpreted rather than compiled. &nbsp;This has led many people to assume that ALL Lisp/Scheme/Racket implementations must be interpreted rather than compiled, even though that hasn't been true for decades.</div><blockquote type="cite"><p>-- In general computing, how does the random function work? How can computer language ever create random numbers, that&nbsp;would be&nbsp;impossiible?</p></blockquote><div>No, it's not impossible. &nbsp;If you want truly random numbers, you attach your computer to a Geiger counter, or a cosmic ray counter, or something like that. &nbsp;But that's expensive and slow. &nbsp;So most "random number generators" are actually completely deterministic. &nbsp;For example,</div><div><br></div><div>(local [(define seed 27)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(define (next-random limit)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(begin (set! seed (remainder (+ (* seed 13) 5) 473))</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (remainder seed limit)))]</div><div>&nbsp;&nbsp; next-random)</div><div><br></div><div>builds a function that "acts random": since the seed is hidden, there's no obvious way of predicting the next answer from the previous answer. &nbsp;(I just made up the numbers 27, 13, 5, and 473; in fact, there are lots of research papers on how to choose such numbers to make the results as random-looking as possible.)</div></div><br><div><br></div><br><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>Stephen Bloch</div><div><a href="mailto:sbloch@adelphi.edu">sbloch@adelphi.edu</a></div><div><br class="webkit-block-placeholder"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>