CS183: Startup

Great sets of notes taken by Blake for Peter Thiel’s class.

Generally speaking, Peter Thiel provides great insights ranging from technical details of how VC works to thought processes to ideas about life. Some of his classes almost seem philosophical in nature. I though that his background (BA Philosophy) might explain that.

XD/NX/EDB

Apparently, this might be disabled by default.

Protip: paste (merge lines of files)

Demo:

$ cat file1.txt

123a
123b

$ cat file2.txt

456a
456b

$ paste file1.txt file2.txt > out.txt

$ cat out.txt

123a 456a
123b 456b

Unix Signals and Traps

Discovered the trap command while looking for a nice way to handle SIGINTs in sh. Example:

In Turing’s 1950 paper, “Computing Machinery and Intelligence,” he argued that when we build intelligent machines, we will not be creating souls but building the mansions for the souls that God creates. When I first visited Google, right about the time it went public, I walked around and saw what they were doing and realized they were building a very large distributed AI, much as Turing had predicted. And I thought, my God, this is not Turing’s mansion—this is Turing’s cathedral. Cathedrals were built over hundreds of years by thousands of nameless people, each one carving a little corner somewhere or adding one little stone. That’s how I feel about the whole computational universe. Everybody is putting these small stones in place, incrementally creating this cathedral that no one could even imagine doing on their own.
The Development of the C Language

Talks about the insights that went into the development of the C language, and its evolution.

ByteBuffer

I was looking at cowtowncoder’s low-gc-membuffers, which led me to look at an introduction to Byte Buffers and the corresponding javadoc.

In short, ByteBuffer is part of the Java NIO and basically allows you to play with memory outside the garbage-collected Java heap.

An interesting/unintended take away from the intro-to-byte-buffers article is the interlude on virtual memory. Gregory explains the concept of commit charge and resident set size (RSS). The commit charge is the amt of in-memory data that is modifiable. This is limited by RAM+swap and the amt of in-memory data used by other programs. RSS refers to the program’s memory/virtual-pages that are in the RAM. Hence, full GCs can be slow because of the need to touch every live object, and hence every page in the heap and generating page faults for pages not in the RAM.

chkconfig

sudo apt-get install chkconfig

$ sudo chkconfig —list

$ sudo chkconfig pure-ftpd off

Note: just found out that on Ubuntu 10, Upstart has replaced System V init.
Basically, old: /etc/init.d/  and  new: /etc/init/

javac

javac SomeFile.java -classpath SomePackage.jar