Mike Delmonaco's Blog: Posts tagged 'tutorials'Mike Delmonaco's Blog: Posts tagged 'tutorials'
https://quasarbright.github.io/blog/tags/tutorials.html
Sun, 24 Sep 2023 12:37:35 UTSun, 24 Sep 2023 12:37:35 UT1800Continuations
https://quasarbright.github.io/blog/2023/09/continuations.html?utm_source=tutorials&utm_medium=RSS
urn:https-quasarbright-github-io:-blog-2023-09-continuations-htmlSun, 24 Sep 2023 12:37:35 UTMike Delmonaco
<p>Continuations are a powerful tool that allow you to implement control flow constructs like exceptions, generators, and multi-threading, and back tracking as libraries. That’s right, libraries! In a programming language that gives access to continuations, these features don’t have to be baked into the implementation of the language. In this post, we will explore what continuations are, how to use them, and how to implement them in a programming language as a pre-processing step.</p><a href="https://quasarbright.github.io/blog/2023/09/continuations.html?utm_source=tutorials&utm_medium=RSS"><em>More…</em></a>Extending Automatic Differentiation to Higher Order Derivatives
https://quasarbright.github.io/blog/2023/07/extending-automatic-differentiation-to-higher-order-derivatives.html?utm_source=tutorials&utm_medium=RSS
urn:https-quasarbright-github-io:-blog-2023-07-extending-automatic-differentiation-to-higher-order-derivatives-htmlFri, 07 Jul 2023 23:15:39 UTMike Delmonaco
<p>This is part 2 of a series of blog posts about implementing automatic differentiation. You can read part 1 <a href="/blog/2022/12/understanding-and-implementing-automatic-differentiation.html">here</a>. In this post, we extend our automatic differentiation system to support higher order derivatives.</p>
<p>Like the previous post, some knowledge of calculus is required and Racket-y stuff will be explained as we go.</p><a href="https://quasarbright.github.io/blog/2023/07/extending-automatic-differentiation-to-higher-order-derivatives.html?utm_source=tutorials&utm_medium=RSS"><em>More…</em></a>Understanding and Implementing Automatic Differentiation
https://quasarbright.github.io/blog/2022/12/understanding-and-implementing-automatic-differentiation.html?utm_source=tutorials&utm_medium=RSS
urn:https-quasarbright-github-io:-blog-2022-12-understanding-and-implementing-automatic-differentiation-htmlSun, 04 Dec 2022 16:17:10 UTMike Delmonaco
<p>\[
\DeclareMathOperator{\expt}{expt}
\DeclareMathOperator{\mul}{mul}
\DeclareMathOperator{\add}{add}
\DeclareMathOperator{\derivative}{derivative}
\]</p>
<p>Automatic differentiation is a technique that allows programs to compute the derivatives of functions. It is vital
for deep learning and useful for optimization in general.
For me, it’s always been dark magic, but I recently thought of a nice way to implement it and made a little library. This
blog post takes you along the journey of discovering that implementation. Specifically, we will be implementing forward mode
automatic differentiation for scalar numbers.</p>
<p>This post requires some knowledge of differential calculus. You’ll need to know basic derivative rules, the chain rule,
and it’d help to know partial derivatives. If you’ve taken an introductory calculus course, you should be fine.</p>
<p>The code is in Racket. If you don’t know Racket, you should still be able to follow along. I’ll explain the Racket-y stuff.
Don’t let the parentheses scare you away!</p><a href="https://quasarbright.github.io/blog/2022/12/understanding-and-implementing-automatic-differentiation.html?utm_source=tutorials&utm_medium=RSS"><em>More…</em></a>Matching Regular Expressions by Computing Their Derivatives
https://quasarbright.github.io/blog/2022/11/matching-regular-expressions-by-computing-their-derivatives.html?utm_source=tutorials&utm_medium=RSS
urn:https-quasarbright-github-io:-blog-2022-11-matching-regular-expressions-by-computing-their-derivatives-htmlSat, 05 Nov 2022 16:01:01 UTMike Delmonaco
<p>Regular expressions allow us to describe patterns in text. They are very useful and show up all over the place in programming,
but matching regular expressions can be difficult. One well-known technique for matching regular expressions is converting the regular
expression to a finite state machine. This is pretty elegant, but can get complicated and messy.</p>
<p>An alternative technique, which is the subject of this blog post, involves something called a Brzozowski derivative. This technique can be
used to compute the derivative of a generalized regular expression.</p><a href="https://quasarbright.github.io/blog/2022/11/matching-regular-expressions-by-computing-their-derivatives.html?utm_source=tutorials&utm_medium=RSS"><em>More…</em></a>Composable Promises: Adding Laziness to a Strict Language and Collapsing Indirection
https://quasarbright.github.io/blog/2022/10/composable-promises-adding-laziness-to-a-strict-language-and-collapsing-indirection.html?utm_source=tutorials&utm_medium=RSS
urn:https-quasarbright-github-io:-blog-2022-10-composable-promises-adding-laziness-to-a-strict-language-and-collapsing-indirection-htmlSun, 02 Oct 2022 21:20:34 UTMike Delmonaco
<p>Before there is any confusion, I’m not talking about JavaScript promises that are used for asynchronous computations.
In this case, a promise is just a delayed computation. For example, a simple form of a promise is a function that
takes in no arguments and returns a result. In this blog post, we will be focusing on promises that remember their
results and promises that may evaluate to other promises. Promises are useful for control flow and implementing
lazy semantics in a strict language.</p>
<p>In this blog post, we will learn what promises are and how to implement them efficiently. Promises are useful and
interesting, but honestly, I mainly wrote this just to talk about the algorithm for forcing composable promises because I
think it’s very cool!</p><a href="https://quasarbright.github.io/blog/2022/10/composable-promises-adding-laziness-to-a-strict-language-and-collapsing-indirection.html?utm_source=tutorials&utm_medium=RSS"><em>More…</em></a>