Posts

Generative Adversarial Network

Last edited: August 8, 2025

generative model

Last edited: August 8, 2025

Its like a transforming distributions procedure, but your \(f\) is not constrained to be differentiable. So you can still sample from it.


we perform a random sample of possible next state (weighted by the action you took, meaning an instantiation of \(s’ \sim T(\cdot | s,a)\)) and reward \(R(s,a)\) from current state

generative semantics

Last edited: August 8, 2025

a hissyfight with the transformational generative syntax.

generative semantics states that structure is in support of meaning, rather than the other way around that transformational generative syntax suggests.

This means that you need to first come up with a meaning then imbew the best structure to support the expression of that meaning.

This (along with distributed morphology) is the main opposition of the Lexicalist Hypothesis, and because proof for the existence of semantic primes, also the main opposition of the existence of semantic primes.

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 *.