<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Siddharth Mishra</title><link>http://brightprogrammer.in/</link><description>Recent content on Siddharth Mishra</description><generator>Hugo</generator><language>en</language><atom:link href="http://brightprogrammer.in/index.xml" rel="self" type="application/rss+xml"/><item><title>Use RSS Feeds</title><link>http://brightprogrammer.in/posts/use-rss-feeds/</link><pubDate>Fri, 01 May 2026 00:00:00 +0000</pubDate><guid>http://brightprogrammer.in/posts/use-rss-feeds/</guid><description>&lt;h1 id="linksrandom">links@random&lt;/h1>
&lt;p>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 &amp;ldquo;How did they even come across this?&amp;rdquo;. This is not only just now, back in college as well, a friend would often send me links to amazing
writeups by amazing people.&lt;/p>
&lt;p>Now, this can be link to something cool a company did recently, or a new major event that happened in cybersecurity landscape. Whatever it may be, I just
wanted to have a constant stream of such content in my feed as well. No matter which field you&amp;rsquo;re working in, it never hurts to keep yourself up-to-date
with the latest news going on. There are scientific journals, newsletters, blogs, streaming/content-creation services, etc&amp;hellip; The list goes on.&lt;/p></description></item><item><title>Possible Solution For Boredom</title><link>http://brightprogrammer.in/posts/possible-solution-for-boredom/</link><pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate><guid>http://brightprogrammer.in/posts/possible-solution-for-boredom/</guid><description>&lt;div class="notice notice-info">
 &lt;p class="notice-title">Info&lt;/p>
 &lt;div class="notice-body">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&amp;rsquo;t consider anything in here as mental health advice! I study
computer science, not medical science! Health is wealth :-)&lt;/div>
&lt;/div>

&lt;h1 id="reflections">Reflections&lt;/h1>
&lt;h2 id="childhood">Childhood&lt;/h2>
&lt;p>Imagine childhood, you were new to this world with so many things to explore, and you knew nothing about anything, so you wanted to explore everything in your surrounding.
From things like breaking really costly things in the house, just to know what happens, to just wandering off to somewhere, slowly adding one to the stack of forehead wrinkles the parents
are going to have as they grow with us.&lt;/p></description></item><item><title>A Look Into Browser Extension Security</title><link>http://brightprogrammer.in/posts/browser-extension-security-landscape/</link><pubDate>Sat, 11 Apr 2026 00:00:00 +0000</pubDate><guid>http://brightprogrammer.in/posts/browser-extension-security-landscape/</guid><description>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>I&amp;rsquo;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.&lt;/p>
&lt;p>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 showing up in the news and it had never come up in our group before:&lt;/p></description></item><item><title>A C Of Polymorphism Without CPP</title><link>http://brightprogrammer.in/posts/a-c-of-polymorphism-with-cpp/</link><pubDate>Wed, 25 Mar 2026 00:00:00 +0000</pubDate><guid>http://brightprogrammer.in/posts/a-c-of-polymorphism-with-cpp/</guid><description>&lt;h1 id="introduction">Introduction&lt;/h1>
&lt;p>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.&lt;/p>
&lt;h1 id="a-small-example">A Small Example&lt;/h1>
&lt;p>Here’s an example. This is the base class.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#007020;font-weight:bold">typedef&lt;/span> &lt;span style="color:#007020;font-weight:bold">struct&lt;/span> Animal Animal;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#007020;font-weight:bold">struct&lt;/span> Animal {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#902000">char&lt;/span>&lt;span style="color:#666">*&lt;/span> name;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#902000">void&lt;/span> (&lt;span style="color:#666">*&lt;/span>speak)(Animal&lt;span style="color:#666">*&lt;/span> self);
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>};
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Now the child types.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-c" data-lang="c">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#007020;font-weight:bold">typedef&lt;/span> &lt;span style="color:#007020;font-weight:bold">struct&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Animal base;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>} Dog;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#007020;font-weight:bold">typedef&lt;/span> &lt;span style="color:#007020;font-weight:bold">struct&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Animal base;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>} Cat;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The polymorphic functions live in the child types. There is no default &lt;code>animal_speak()&lt;/code>, so this
behaves like a pure virtual method.&lt;/p></description></item><item><title>OnlyGenerics In C</title><link>http://brightprogrammer.in/posts/onlygenerics-in-c/</link><pubDate>Wed, 25 Mar 2026 00:00:00 +0000</pubDate><guid>http://brightprogrammer.in/posts/onlygenerics-in-c/</guid><description>&lt;h1 id="introduction">Introduction&lt;/h1>
&lt;p>C doesn’t have templates, but it does have the preprocessor. If you’re careful, you can get
something that feels like &lt;code>std::vector&amp;lt;T&amp;gt;&lt;/code> without switching languages. It’s not perfect and it’s
not type theory, but it is surprisingly usable.&lt;/p>
&lt;p>This post is about that: cheap macro tricks that give you “templated” types in plain C.&lt;/p>
&lt;h1 id="the-core-trick">The Core Trick&lt;/h1>
&lt;p>You first define a generic backing struct. Then you create a macro that expands to a type‑specific
struct. That macro is your “template”.&lt;/p></description></item><item><title>Creating Rizin Plugins - Lessons Learned</title><link>http://brightprogrammer.in/posts/rizin-plugins-lessons-learned/</link><pubDate>Tue, 25 Mar 2025 00:00:00 +0000</pubDate><guid>http://brightprogrammer.in/posts/rizin-plugins-lessons-learned/</guid><description>&lt;h1 id="introduction">Introduction&lt;/h1>
&lt;p>I&amp;rsquo;ve been developing and maintaining a &lt;a href="https://github.com/rizinorg/rizin">Rizin&lt;/a> plugin for past ten months for a
startup, &lt;a href="https://reveng.ai">RevEngAI&lt;/a>. The plugin is used to communicate with RevEngAI servers to upload binaries
you&amp;rsquo;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&amp;rsquo;s own analysis. The number of features keep growing day
by day as the team works on improving their product.&lt;/p></description></item><item><title>Lambda Calculus - Equivalences &amp; Reductions</title><link>http://brightprogrammer.in/posts/2-lambda-calculus-equivalences-and-reductions/</link><pubDate>Thu, 06 Feb 2025 00:00:00 +0000</pubDate><guid>http://brightprogrammer.in/posts/2-lambda-calculus-equivalences-and-reductions/</guid><description>&lt;p>This section is important, because we&amp;rsquo;ll learn how are applications performed on given
lambda expressions.&lt;/p>
&lt;div class="notice notice-info">
 &lt;p class="notice-title">Info&lt;/p>
 &lt;div class="notice-body">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.&lt;/div>
&lt;/div>

&lt;h1 id="equivalence">Equivalence&lt;/h1>
&lt;p>When considering equivalence of two expressions, they can be equivalent in four ways&lt;/p>
&lt;ul>
&lt;li>$\alpha$-equivalence - Renaming of bound variables&lt;/li>
&lt;li>$\beta$-equivalence - Function application and reduction&lt;/li>
&lt;li>$\eta$-equivalence - Function extensionality&lt;/li>
&lt;li>syntactic equivalence&lt;/li>
&lt;/ul>
&lt;p>These equivalences are basically the equivalence relations we talked about above.
Using a series of these equivalence relations between two lambda expressions, we can
apply reductions to source lambda expression, and then reach a final, target expression
from a source expression.&lt;/p></description></item><item><title>Lambda Calculus - Fixed Point Theorem</title><link>http://brightprogrammer.in/posts/5-lambda-calculus-fixed-point-theorem/</link><pubDate>Thu, 06 Feb 2025 00:00:00 +0000</pubDate><guid>http://brightprogrammer.in/posts/5-lambda-calculus-fixed-point-theorem/</guid><description>&lt;h2 id="fixed-point-theorem">Fixed Point Theorem&lt;/h2>
&lt;blockquote>
&lt;p>$ \forall F \quad \exists X \mid FX = X $&lt;/p>
&lt;p>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).&lt;/p>&lt;/blockquote>
&lt;ul>
&lt;li>Let&amp;rsquo;s take $F = \lambda x . x$ (the identity abstraction), Then any lambda expression can take place of $X$.&lt;/li>
&lt;li>Now consider $F = \lambda x . y$, then we have $X \equiv y$, because $(\lambda x . y)y = y$.&lt;/li>
&lt;li>If $F = \lambda x . xy$, then? Then can use $X \stackrel{\beta}{=} \lambda y . X$, because $FX \equiv (\lambda x . xy)(\lambda y . X) \stackrel{\beta}{\rightarrow} (\lambda y . X) y \stackrel{\beta}{\rightarrow} X$.&lt;/li>
&lt;li>What if $F = \lambda x . xx$ then? We have $X \stackrel{\beta}{=} \lambda x . x$ or $X \stackrel{\eta}{=} I$ (the identity abstraction). Then $FX = FI = II = I$.&lt;/li>
&lt;/ul>
&lt;div class="notice notice-info">
 &lt;p class="notice-title">Info&lt;/p></description></item><item><title>Lambda Calculus - Free &amp; Bound Variables</title><link>http://brightprogrammer.in/posts/3-lambda-calculus-free-and-bound-variables/</link><pubDate>Thu, 06 Feb 2025 00:00:00 +0000</pubDate><guid>http://brightprogrammer.in/posts/3-lambda-calculus-free-and-bound-variables/</guid><description>&lt;h1 id="free--bound-variables">Free &amp;amp; Bound Variables&lt;/h1>
&lt;p>A variable occurrence is &lt;strong>bound&lt;/strong> if it lies inside the scope of some $\lambda$ that binds it.
Otherwise it&amp;rsquo;s &lt;strong>free&lt;/strong>. Free variables are just the &amp;ldquo;inputs&amp;rdquo; a term still depends on.&lt;/p>
&lt;div class="notice notice-info">
 &lt;p class="notice-title">Info&lt;/p>
 &lt;div class="notice-body">When I say a variable is free/bound, I mean the &lt;strong>occurrence&lt;/strong>. The same symbol can be both free
and bound inside the same expression.&lt;/div>
&lt;/div>

&lt;h2 id="definitions">Definitions&lt;/h2>
&lt;p>We can define the set of free variables $\text{FV}(M)$ and bound variables $\text{BV}(M)$ inductively:&lt;/p></description></item><item><title>Lambda Calculus - Logic</title><link>http://brightprogrammer.in/posts/4-lambda-calculus-logic/</link><pubDate>Thu, 06 Feb 2025 00:00:00 +0000</pubDate><guid>http://brightprogrammer.in/posts/4-lambda-calculus-logic/</guid><description>&lt;h2 id="logic">Logic&lt;/h2>
&lt;h3 id="if-else">If, Else&lt;/h3>
&lt;p>Let&amp;rsquo;s build some boolean login out of power of pure combinations. Unlike usual logic, we won&amp;rsquo;t get
&lt;code>true&lt;/code>/&lt;code>false&lt;/code> as values. Here &lt;code>true&lt;/code> and &lt;code>false&lt;/code> are lambda abstractions itself.&lt;/p>
&lt;ul>
&lt;li>$\text{True} \stackrel{\beta}{=} \lambda xy.x$ - Meaning, take two values, and evaluate to only the first one.&lt;/li>
&lt;li>$\text{False}\stackrel{\beta}{=} \lambda xy.y$ - Take two, and evaluate to only the second one, discarding the first.&lt;/li>
&lt;/ul>
&lt;p>These are often called $\text{First}$ and $\text{Second}$ correspondingly for these reasons. So we can write
$\text{First} \equiv \text{True}$ and $\text{Second} \equiv \text{False}$.&lt;/p></description></item></channel></rss>