2024-08-14
2024 August 14 (Wednesday)
-
Arose at 05:20 for morning prayer.
-
Patrick joined me.
-
Drove to LCC and walked into the building, but then realized that I did not have my gear for climing.
-
It was not in the Subaru, which I had driven to LCC.
- So I drove back home and gave up on climbing today.
- At least I had remembered to take my gear out of the Camry.
-
Finding my shoes and chalk-bag in my bedroom, I moved the into the Subaru so that I'll have them when I drive to LCC on Friday morning.
-
When taking out the garbage at Picket, I put all of the broken-down cardboard boxes into one or the other of the bins.
-
Getting close to finishing Isaacson's biography of Einsten.
-
About an hour left after the trip home from LCC.
-
Last night, I read a bit again from the beginning of Hazony.
-
I reviewed the passage in which he indicates that he will not in Conservatism: A Rediscovery indicate why he objects to the Catholic view of conservatism as respect for the natural law as put forth by Aquinas.
- I looked for and did not find Hazony's summary of his position, the detail of which I have forgotten.
-
What I seem to remember is only that Hazony shuns every prescriptive or ideological view in a certain broad category, but I don't remember anything more precise than that.
-
Worked on guessing game for rust.
-
It is neat, that
"will build documentation provided by all your dependencies locally and open it in your browser."cargo doc --open - Looking at the documentation for rand
(0.8.5), I see that the
near the top of
use rand::Rng;main.rsuses a "trait" defined inrand. - A trait seems to be a collection of methods.
- I found that I could instead do
rust use rand::{thread_rng, Rng};to use both the top-level methodthread_rngand the traitRng, which provides thegen_rangemethod as a member of the thing returned bythread_rng()- After finishing the guessing game, the
appearance of
numin the match-construct seems mysterious to me.let guess: u32 = match guess.trim().parse() { OK(num) => num, Err(_) => continue, };numis nowhere defined. -
I verified that one can type any identifier rather than
num. -
Started reading Chapter 3 of the rust-book.
- In Appendix A, there is the neat idea of
a raw identifier.
- The raw identifier is a keyword that
is used nevertheless as an identifier,
by way of the
r#prefix. - This allows the symbol in the binary to have the same name as a keyword.
- For example one can call a function in a library compiled in a different language, when an external function-name of the library has the same identifier as a keyword in rust.
- The raw identifier is a keyword that
is used nevertheless as an identifier,
by way of the
- Started 3.1.
- A
constvalue is a constant expression and can be declared even in the global scope.- The type must be annotated for a
constvalue.
- The type must be annotated for a
- Read 3.2.