[Boneh-crypto-course] Finished lecture 1!

Jim Blandy jimb at red-bean.com
Tue Mar 13 00:09:21 CDT 2012


On Mon, Mar 12, 2012 at 5:09 PM, Jason Orendorff
<jason.orendorff at gmail.com> wrote:
> In Python, you write sigma like this:
>  sum(EXPR for V in S ... if COND ...)
> and the same for all four of the others (they are called all, any,
> set, and list).

Yeah, I'm going to do the exercises in Python.

(Your comment about "a really nice list-comprehension macro" made me
think about why it's not the same (and it's not) that somebody out
there somewhere has a beautiful list-comprehension macro in Scheme. If
you have a language with extensible syntax, then all these features
start to look like something that one could have written oneself, and
thus one shouldn't criticize the language for lacking it. But of
course one should! So perhaps language design is really about offering
a palette that covers a lot of problem space and works cohesively.)

>> ;; Applying = to functions! ACL to the rescue!
>> (= ((random-variable-distribution (uniform (bitstrings n))) bitcount)
>>   (lambda (v) (/ (choose n v) (expt 2 n))))
>
> What does ACL refer to here?

Applicative Common Lisp. It's a pure, eager Lisp that includes a proof
search agent: you can ask it to prove things, and if you've given it a
"small enough" step, it will be able to prove it. So you can actually
prove (say) that two functions are equivalent, and so on.



More information about the Boneh-crypto-course mailing list