links@random Few months back I noticed that some of my peers randomly post a link to an amazing writeup or an interesting news, and my question after reading that content would be “How did they even come across this?”. This is not only just now, back in college as well, a friend would often send me links to amazing writeups by amazing people. Now, this can be link to something cool a…
Info This post is about self reflection, and methods I think (will/are) work(ing) for me. Mental health is a serious thing, which you should not try addressing on your own. If you or someone you love is struggling with some issues, consider contacting a therapist. Please don’t consider anything in here as mental health advice! I study computer science, not medical science! Health is wealth…
Introduction I’m in a paper reading group for class. We present in small teams, and each round focuses on a different security domain with an older paper paired to a newer one that builds on it. This was our second presentation. This time, we picked browser extensions. We were supposed to find a neat seminal-to-follow-on pairing, but we went with these two because extension security keeps…
Introduction Polymorphism sounds like a C++ word. In C, it still exists, just without the sugar. You create a base type, keep a table of function pointers, and pass that base pointer around. A Small Example Here’s an example. This is the base class. typedef struct Animal Animal; struct Animal { char * name; void ( * speak)(Animal * self); }; Now the child types. typedef struct { Animal base; }…
Introduction C doesn’t have templates, but it does have the preprocessor. If you’re careful, you can get something that feels like std::vector<T> without switching languages. It’s not perfect and it’s not type theory, but it is surprisingly usable. This post is about that: cheap macro tricks that give you “templated” types in plain C. The Core Trick You first define a generic backing struct. Then…
Introduction I’ve been developing and maintaining a Rizin plugin for past ten months for a startup, RevEngAI . The plugin is used to communicate with RevEngAI servers to upload binaries you’re analyzing in Rizin/Cutter and then perform an AI based analysis in the background, and then retrieve the analysis results back from the servers and apply the results to Rizin’s own…
This section is important, because we’ll learn how are applications performed on given lambda expressions. Info TL;DR, to apply a lambda term in a lambda expression, we use a series of reductions. These reductions come from corresponding equivalence relations. A reduction is just another way of replacing the lambda expression with a corresponding equivalent expression. Equivalence When…
Fixed Point Theorem $ \forall F \quad \exists X \mid FX = X $ For all lambda expression $F$, there exists another lambda expression $X$, such that $FX = X$, meaning when $F$ is applied over $X$ we get $X$ (itself). Let’s take $F = \lambda x . x$ (the identity abstraction), Then any lambda expression can take place of $X$. Now consider $F = \lambda x . y$, then we have $X \equiv y$, because…
Free & Bound Variables A variable occurrence is bound if it lies inside the scope of some $\lambda$ that binds it. Otherwise it’s free . Free variables are just the “inputs” a term still depends on. Info When I say a variable is free/bound, I mean the occurrence . The same symbol can be both free and bound inside the same expression. Definitions We can define the set of free…
Logic If, Else Let’s build some boolean login out of power of pure combinations. Unlike usual logic, we won’t get true / false as values. Here true and false are lambda abstractions itself. $\text{True} \stackrel{\beta}{=} \lambda xy.x$ - Meaning, take two values, and evaluate to only the first one. $\text{False}\stackrel{\beta}{=} \lambda xy.y$ - Take two, and evaluate to only the…