_index.org

generativity

Last edited: August 8, 2025

big red Chomskian structuralist warning

The principle of generativity states that the goal of a grammar should be to enumerate the span of the structural descriptions of the expressions of a language.

generics

Last edited: August 8, 2025

We don’t want to write the same thing many times; generics minimizes code duplication. Therefore, generics!

Let’s implement a simple swap function:

void swap_ptr_values(void *data1ptr, void *data2ptr, size_t datasize) {
}

helper functions

memcpy

Copy datasize bytes worth of memory in the second argument into the first argument. The two arguments CANNOT OVERLAP otherwise, you risk UB.

void *memcpy(void *dest, void *src, size_t nbytes)

memmove

Its memcpy, but it works with overlapping data, and is slower.

void *memove(void *dest, void *src, size_t nbytes)

pointer arithmetic with generics

Unfortunately, given that we don’t know how big a void * pointer is, we can’t do pointer arithmetic against it because it still doesn’t know how big the pointer is. You can’t just add/subtract numbers to char *.

genetic algorithm

Last edited: August 8, 2025

A genetic algorithm is a search heuristic that is inspired by Charles Darwin’s theory of natural evolution.

Its what Grey’s video says. The picking and chucking iterative thing.

Genetic Policy Search

Last edited: August 8, 2025

Genetic Policy Search involves performing Local Policy Search, but starting from a plurality of initial policies and perturbing the top-k most successful ones (called the “elite samples” \(m_{elite}\)) to generate the next set of starting points.

GenSLMs

Last edited: August 8, 2025

GenSLMs are a LLM, but genome sequence

  1. Take genome sequence
  2. Throw transformers at it
  3. create “semantic embedding”
  4. autoregression happens

This is trained as a foundational model to organize the genomic sequence

Turns out, the embedding space above can be used to discover relations. See proteins can be encoded as hierarchies