# primer

Published articles for primer.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## MLIR -- Defining Patterns with PDLL

DevFeed: [MLIR -- Defining Patterns with PDLL](<https://devfeed.tech/articles/mlir-defining-patterns-with-pdll-40485.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2024/08/04/mlir-pdll/>)

Published: 2024-08-04T14:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [LLVM](<https://devfeed.tech/topics/llvm.md>), [Tooling](<https://devfeed.tech/topics/tooling.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [heir](<https://devfeed.tech/tags/heir.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [patterns](<https://devfeed.tech/tags/patterns.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [tablegen](<https://devfeed.tech/tags/tablegen.md>)

### AI overview

A tutorial on using PDLL to define MLIR patterns. It explains PDLL's relationship to PDL, its intended role as an alternative to TableGen pattern definitions, and how PDLL files are transformed into IR and then C++ code for compilation into a pass.

### Source excerpt

Table of Contents In this article I'll show how to use PDLL, a tool for defining MLIR patterns, which itself is built with MLIR. PDLL is intended to be a replacement for defining patterns in tablegen, though there are few public examples of its use. In fact, the main impetus for PDLL is that tablegen makes it difficult to express things like: Operations that return multiple results Operations with regions Operations with variadic operands Arithmetic on static values While not all these features are fully supported in PDLL yet, they are within scope of the language and tooling.

## MLIR -- A Global Optimization and Dataflow Analysis

DevFeed: [MLIR -- A Global Optimization and Dataflow Analysis](<https://devfeed.tech/articles/mlir-a-global-optimization-and-dataflow-analysis-40481.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/11/15/mlir-a-global-optimization-and-dataflow-analysis/>)

Published: 2023-11-15T11:20:52Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Optimization](<https://devfeed.tech/topics/optimization.md>), [Code](<https://devfeed.tech/topics/code.md>), [Framework](<https://devfeed.tech/topics/framework.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [code](<https://devfeed.tech/tags/code.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [framework](<https://devfeed.tech/tags/framework.md>), [heir](<https://devfeed.tech/tags/heir.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [pull-request](<https://devfeed.tech/tags/pull-request.md>)

### AI overview

This article explains how to implement a global optimization pass in MLIR for noisy integer arithmetic. It uses a dataflow analysis framework to verify the optimization and aims to keep noise within legal limits while minimizing program cost.

### Source excerpt

Table of Contents In this article we'll implement a global optimization pass, and show how to use the dataflow analysis framework to verify the results of our optimization. The code for this article is in this pull request, and as usual the commits are organized to be read in order. The noisy arithmetic problem This demonstration is based on a simplified model of computation relevant to the HEIR project. You don't need to be familiar with that project to follow this article, but if you're wondering why someone would ever want the kind of optimization I'm going to write, that project is why.

## MLIR -- Lowering through LLVM

DevFeed: [MLIR -- Lowering through LLVM](<https://devfeed.tech/articles/mlir-lowering-through-llvm-40480.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/11/01/mlir-lowering-through-llvm/>)

Published: 2023-11-01T07:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [mlir](<https://devfeed.tech/topics/mlir.md>), [LLVM](<https://devfeed.tech/topics/llvm.md>), [x86](<https://devfeed.tech/topics/x86.md>)

Tags: [compilers](<https://devfeed.tech/tags/compilers.md>), [heir](<https://devfeed.tech/tags/heir.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [x86](<https://devfeed.tech/tags/x86.md>)

### AI overview

A tutorial on lowering a custom MLIR poly dialect through the LLVM dialect, exporting LLVM IR, and compiling it to x86 machine code. It explains how to construct and incrementally develop MLIR lowering pipelines.

### Source excerpt

Table of Contents In the last article we lowered our custom poly dialect to standard MLIR dialects. In this article we'll continue lowering it to LLVM IR, exporting it out of MLIR to LLVM, and then compiling to x86 machine code. The code for this article is in this pull request, and as usual the commits are organized to be read in order. Defining a Pipeline The first step in lowering to machine code is to lower to an "exit dialect.

## MLIR -- Dialect Conversion

DevFeed: [MLIR -- Dialect Conversion](<https://devfeed.tech/articles/mlir-dialect-conversion-40479.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/10/23/mlir-dialect-conversion/>)

Published: 2023-10-23T06:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Tutorial](<https://devfeed.tech/topics/tutorial.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [heir](<https://devfeed.tech/tags/heir.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [polynomial-ring](<https://devfeed.tech/tags/polynomial-ring.md>), [polynomials](<https://devfeed.tech/tags/polynomials.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

This tutorial introduces MLIR dialect conversion and incremental lowering, explaining how a custom dialect can be lowered to standard MLIR dialects. It focuses on the type obstacle: changing value types can temporarily invalidate downstream users, requiring special handling during conversion.

### Source excerpt

Table of Contents In previous articles we defined a dialect, and wrote various passes to optimize and canonicalize a program using that dialect. However, one of the main tenets of MLIR is "incremental lowering," the idea that there are lots of levels of IR granularity, and you incrementally lower different parts of the IR, only discarding information when it's no longer useful for optimizations. In this article we'll see the first step of that: lowering the poly dialect to a combination of standard MLIR dialects, using the so-called dialect conversion infrastructure to accomplish it.

## MLIR -- Canonicalizers and Declarative Rewrite Patterns

DevFeed: [MLIR -- Canonicalizers and Declarative Rewrite Patterns](<https://devfeed.tech/articles/mlir-canonicalizers-and-declarative-rewrite-patterns-40477.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/09/20/mlir-canonicalizers-and-declarative-rewrite-patterns/>)

Published: 2023-09-20T08:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [canonicalization](<https://devfeed.tech/tags/canonicalization.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [complex-numbers](<https://devfeed.tech/tags/complex-numbers.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [maintenance](<https://devfeed.tech/tags/maintenance.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [polynomials](<https://devfeed.tech/tags/polynomials.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rewrite](<https://devfeed.tech/tags/rewrite.md>), [tablegen](<https://devfeed.tech/tags/tablegen.md>), [test](<https://devfeed.tech/tags/test.md>)

### AI overview

This tutorial explains how to implement general canonicalization patterns in MLIR. It covers both C++ canonicalizers and declarative rewrite rules in TableGen, including an identity-based polynomial rewrite and its testing considerations.

### Source excerpt

Table of Contents In a previous article we defined folding functions, and used them to enable some canonicalization and the sccp constant propagation pass for the poly dialect. This time we'll see how to add more general canonicalization patterns. The code for this article is in this pull request, and as usual the commits are organized to be read in order. Why is Canonicalization Needed? MLIR provides folding as a mechanism to simplify an IR, which can result in simpler, more efficient ops (e.

## MLIR -- Verifiers

DevFeed: [MLIR -- Verifiers](<https://devfeed.tech/articles/mlir-verifiers-40475.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/09/13/mlir-verifiers/>)

Published: 2023-09-13T09:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [mlir](<https://devfeed.tech/topics/mlir.md>), [Code](<https://devfeed.tech/topics/code.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [canonicalization](<https://devfeed.tech/tags/canonicalization.md>), [code](<https://devfeed.tech/tags/code.md>), [compilers](<https://devfeed.tech/tags/compilers.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [mlir](<https://devfeed.tech/tags/mlir.md>), [operations](<https://devfeed.tech/tags/operations.md>), [pass](<https://devfeed.tech/tags/pass.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [pull-request](<https://devfeed.tech/tags/pull-request.md>), [safety](<https://devfeed.tech/tags/safety.md>), [types](<https://devfeed.tech/tags/types.md>)

### AI overview

This tutorial explains how to add verifiers to an MLIR dialect. Verifiers check that types and operations are well-formed before and after passes, enforcing operation invariants and allowing passes to avoid repeated edge-case checks. It also describes trait-based verification, generated type-checking and inference support, assembly-format simplification, builders, and related test updates.

### Source excerpt

Table of Contents Last time we defined folders and used them to enable some canonicalization and the sccp constant propagation pass for the poly dialect. This time we'll add some additional safety checks to the dialect in the form of verifiers. The code for this article is in this pull request, and as usual the commits are organized to be read in order. Purpose of a verifier Verifiers ensure the types and operations in a concrete MLIR program are well-formed.

## Google AMP: Should You Care?

DevFeed: [Google AMP: Should You Care?](<https://devfeed.tech/articles/google-amp-should-you-care-31266.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/google-amp-should-you-care>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2016-12-02T09:16:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Google](<https://devfeed.tech/topics/google.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Content Management System](<https://devfeed.tech/topics/cms.md>), [Latency](<https://devfeed.tech/topics/latency.md>), [Web Components](<https://devfeed.tech/topics/web-components.md>), [Web](<https://devfeed.tech/topics/web.md>)

Tags: [accelerated](<https://devfeed.tech/tags/accelerated.md>), [cms](<https://devfeed.tech/tags/cms.md>), [craft](<https://devfeed.tech/tags/craft.md>), [css](<https://devfeed.tech/tags/css.md>), [google](<https://devfeed.tech/tags/google.md>), [google-s](<https://devfeed.tech/tags/google-s.md>), [here-s](<https://devfeed.tech/tags/here-s.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [html](<https://devfeed.tech/tags/html.md>), [implement](<https://devfeed.tech/tags/implement.md>), [initiative](<https://devfeed.tech/tags/initiative.md>), [insights](<https://devfeed.tech/tags/insights.md>), [internet](<https://devfeed.tech/tags/internet.md>), [latency](<https://devfeed.tech/tags/latency.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [pages](<https://devfeed.tech/tags/pages.md>), [performance](<https://devfeed.tech/tags/performance.md>), [primer](<https://devfeed.tech/tags/primer.md>), [project](<https://devfeed.tech/tags/project.md>)

### AI overview

This primer explains Google AMP, its focus on improving mobile web performance, and its restrictions on external CSS, JavaScript, and certain HTML. It also describes how AMP uses web components and relates to Google PageSpeed Insights recommendations.

### Source excerpt

AMP is Google's Accelerated Mobile Pages initiative. Here's a primer, and how to implement AMP with Craft CMS

## Tensorphobia and the Outer Product

DevFeed: [Tensorphobia and the Outer Product](<https://devfeed.tech/articles/tensorphobia-and-the-outer-product-40397.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2016/03/28/tensorphobia-outer-product/>)

Published: 2016-03-28T09:00:46Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [math](<https://devfeed.tech/topics/math.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [linear-algebra](<https://devfeed.tech/tags/linear-algebra.md>), [math](<https://devfeed.tech/tags/math.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [matrices](<https://devfeed.tech/tags/matrices.md>), [matrix](<https://devfeed.tech/tags/matrix.md>), [primer](<https://devfeed.tech/tags/primer.md>), [tensors](<https://devfeed.tech/tags/tensors.md>)

### AI overview

An explanation of the outer product of vectors, connecting modern tensor concepts with practical linear algebra. The article develops why the construction of two vectors as a linear map should be understood as natural or canonical.

### Source excerpt

Variations on a theme Back in 2014 I wrote a post called How to Conquer Tensorphobia that should end up on Math $ \cap$ Programming's "greatest hits" album. One aspect of tensors I neglected to discuss was the connection between the modern views of tensors and the practical views of linear algebra. I feel I need to write this because every year or two I forget why it makes sense.

## Martingales and the Optional Stopping Theorem

DevFeed: [Martingales and the Optional Stopping Theorem](<https://devfeed.tech/articles/martingales-and-the-optional-stopping-theorem-40349.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/03/03/martingales-and-the-optional-stopping-theorem/>)

Published: 2014-03-03T10:00:38Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [math](<https://devfeed.tech/topics/math.md>)

Tags: [2-sat](<https://devfeed.tech/tags/2-sat.md>), [conditional-probability](<https://devfeed.tech/tags/conditional-probability.md>), [expectation](<https://devfeed.tech/tags/expectation.md>), [gambling](<https://devfeed.tech/tags/gambling.md>), [martingales](<https://devfeed.tech/tags/martingales.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [optional-stopping-theorem](<https://devfeed.tech/tags/optional-stopping-theorem.md>), [primer](<https://devfeed.tech/tags/primer.md>), [probability-theory](<https://devfeed.tech/tags/probability-theory.md>), [random](<https://devfeed.tech/tags/random.md>), [random-variables](<https://devfeed.tech/tags/random-variables.md>), [randomized-algorithm](<https://devfeed.tech/tags/randomized-algorithm.md>), [stochastic-processes](<https://devfeed.tech/tags/stochastic-processes.md>), [theory](<https://devfeed.tech/tags/theory.md>)

### AI overview

This primer introduces martingales as models of fair betting games and explains their connection to probability theory. It begins with a geometric-distribution exercise involving repeated die throws, then introduces the ABRACADABRA problem using a monkey typing random letters.

### Source excerpt

This is a guest post by my colleague Adam Lelkes. The goal of this primer is to introduce an important and beautiful tool from probability theory, a model of fair betting games called martingales. In this post I will assume that the reader is familiar with the basics of probability theory. For those that need to refresh their knowledge, Jeremy's excellent primers (1, 2) are a good place to start.

## Conditional (Partitioned) Probability -- A Primer

DevFeed: [Conditional (Partitioned) Probability -- A Primer](<https://devfeed.tech/articles/conditional-partitioned-probability-a-primer-40308.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/03/28/conditional-partitioned-probability-a-primer/>)

Published: 2013-03-28T13:36:09Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [math](<https://devfeed.tech/topics/math.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [bayes-theorem](<https://devfeed.tech/tags/bayes-theorem.md>), [conditional-probability](<https://devfeed.tech/tags/conditional-probability.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [partitions](<https://devfeed.tech/tags/partitions.md>), [primer](<https://devfeed.tech/tags/primer.md>), [probability-theory](<https://devfeed.tech/tags/probability-theory.md>), [random-variables](<https://devfeed.tech/tags/random-variables.md>), [set](<https://devfeed.tech/tags/set.md>), [theory](<https://devfeed.tech/tags/theory.md>)

### AI overview

A mathematically rigorous primer on conditional probability. It reviews finite probability spaces, probability mass functions, events, random variables, and partitions as tools for decomposing events and variables and reasoning about total probability.

### Source excerpt

One of the main areas of difficulty in elementary probability, and one that requires the highest levels of scrutiny and rigor, is conditional probability. The ideas are simple enough: that we assign probabilities relative to the occurrence of some event. But shrewd applications of conditional probability (and in particular, efficient ways to compute conditional probability) are key to successful applications of this subject. This is the basis for Nate Silver's success, the logical flaws of many a political pundit, and the ability for a robot to tell where it is in an environment.

## Probability Theory -- A Primer

DevFeed: [Probability Theory -- A Primer](<https://devfeed.tech/articles/probability-theory-a-primer-40298.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/01/04/probability-theory-a-primer/>)

Published: 2013-01-04T13:45:54Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [math](<https://devfeed.tech/topics/math.md>), [Statistics](<https://devfeed.tech/topics/statistics.md>), [Machine Learning & Artificial Intelligence](<https://devfeed.tech/topics/machine-learning-artificial-intelligence.md>)

Tags: [expectation](<https://devfeed.tech/tags/expectation.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [primer](<https://devfeed.tech/tags/primer.md>), [probabilistic](<https://devfeed.tech/tags/probabilistic.md>), [probability-theory](<https://devfeed.tech/tags/probability-theory.md>), [random-variables](<https://devfeed.tech/tags/random-variables.md>), [set-theory](<https://devfeed.tech/tags/set-theory.md>), [statistics](<https://devfeed.tech/tags/statistics.md>), [theory](<https://devfeed.tech/tags/theory.md>), [variables](<https://devfeed.tech/tags/variables.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

A primer on finite probability theory that introduces probability spaces, random variables, terminology, and basic results using naive set theory. It emphasizes mathematical formalism rather than real-world applications.

### Source excerpt

It is a wonder that we have yet to officially write about probability theory on this blog. Probability theory underlies a huge portion of artificial intelligence, machine learning, and statistics, and a number of our future posts will rely on the ideas and terminology we lay out in this post. Our first formal theory of machine learning will be deeply ingrained in probability theory, we will derive and analyze probabilistic learning algorithms, and our entire treatment of mathematical finance will be framed in terms of random variables.

## Trees--A Primer

DevFeed: [Trees--A Primer](<https://devfeed.tech/articles/trees-a-primer-40286.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/09/16/trees-a-primer/>)

Published: 2012-09-16T22:40:47Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [graph theory](<https://devfeed.tech/topics/graph-theory.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Learning](<https://devfeed.tech/topics/learning.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [graph](<https://devfeed.tech/tags/graph.md>), [graph-theory](<https://devfeed.tech/tags/graph-theory.md>), [learning](<https://devfeed.tech/tags/learning.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [trees](<https://devfeed.tech/tags/trees.md>)

### AI overview

A primer on trees in graph theory. It defines trees as connected graphs without cycles, explains rooted-tree hierarchy, depth, leaves, and internal nodes, and introduces common algorithms on trees.

### Source excerpt

This post comes in preparation for a post on decision trees (a specific type of tree used for classification in machine learning). While most mathematicians and programmers are familiar with trees, we have yet to discuss them on this blog. For completeness, we'll give a brief overview of the terminology and constructions associated with trees, and describe a few common algorithms on trees. We will assume the reader has read our first primer on graph theory, which is a light assumption.

## The Discrete Fourier Transform -- A Primer

DevFeed: [The Discrete Fourier Transform -- A Primer](<https://devfeed.tech/articles/the-discrete-fourier-transform-a-primer-40278.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/06/23/the-discrete-fourier-transform/>)

Published: 2012-06-23T14:13:53Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [course](<https://devfeed.tech/tags/course.md>), [fourier-analysis](<https://devfeed.tech/tags/fourier-analysis.md>), [fourier-transform](<https://devfeed.tech/tags/fourier-transform.md>), [function](<https://devfeed.tech/tags/function.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [primer](<https://devfeed.tech/tags/primer.md>), [vector-spaces](<https://devfeed.tech/tags/vector-spaces.md>)

### AI overview

This primer explains the intuitive connections between continuous and discrete Fourier transforms. It covers discrete approximations of functions and transforms, the transition between discrete representations, and the role of sampling as motivation.

### Source excerpt

So here we are. We have finally made it to a place where we can transition with confidence from the classical continuous Fourier transform to the discrete version, which is the foundation for applications of Fourier analysis to programming. Indeed, we are quite close to unfurling the might of the Fast Fourier Transform algorithm, which efficiently computes the discrete Fourier transform. But because of its focus on algorithmic techniques, we will save it for a main content post and instead focus here on the intuitive connections between the discrete and continuous realms.

## Generalized Functions -- A Primer

DevFeed: [Generalized Functions -- A Primer](<https://devfeed.tech/articles/generalized-functions-a-primer-40275.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/06/06/generalized-functions/>)

Published: 2012-06-06T20:57:05Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [abstraction](<https://devfeed.tech/topics/abstraction.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [fourier-analysis](<https://devfeed.tech/tags/fourier-analysis.md>), [fourier-transform](<https://devfeed.tech/tags/fourier-transform.md>), [functional-analysis](<https://devfeed.tech/tags/functional-analysis.md>), [generalized-functions](<https://devfeed.tech/tags/generalized-functions.md>), [linear-algebra](<https://devfeed.tech/tags/linear-algebra.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [theory](<https://devfeed.tech/tags/theory.md>)

### AI overview

This primer develops a more rigorous mathematical framework for Fourier transforms. It motivates the search for a class of functions that remains well behaved under the Fourier transform and its inverse, while avoiding divergent integrals.

### Source excerpt

Last time we investigated the naive (which I'll henceforth call "classical") notion of the Fourier transform and its inverse. While the development wasn't quite rigorous, we nevertheless discovered elegant formulas and interesting properties that proved useful in at least solving differential equations. Of course, we wouldn't be following this trail of mathematics if it didn't result in some worthwhile applications to programming. While we'll get there eventually, this primer will take us deeper down the rabbit hole of abstraction.

## The Fourier Transform -- A Primer

DevFeed: [The Fourier Transform -- A Primer](<https://devfeed.tech/articles/the-fourier-transform-a-primer-40274.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/05/27/the-fourier-transform-a-primer/>)

Published: 2012-05-27T19:00:15Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [fourier transform](<https://devfeed.tech/topics/fourier-transform.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [convergence](<https://devfeed.tech/tags/convergence.md>), [convolution](<https://devfeed.tech/tags/convolution.md>), [duality](<https://devfeed.tech/tags/duality.md>), [fourier-analysis](<https://devfeed.tech/tags/fourier-analysis.md>), [fourier-transform](<https://devfeed.tech/tags/fourier-transform.md>), [function](<https://devfeed.tech/tags/function.md>), [limit](<https://devfeed.tech/tags/limit.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [primer](<https://devfeed.tech/tags/primer.md>)

### AI overview

This primer introduces the Fourier transform as a limiting case of the Fourier series for functions without periodic behavior. It develops the transform from intuitive definitions and then addresses convergence more rigorously using distributions.

### Source excerpt

In our last primer we saw the Fourier series, which flushed out the notion that a periodic function can be represented as an infinite series of sines and cosines. While this is fine and dandy, and quite a powerful tool, it does not suffice for the real world. In the real world, very little is truly periodic, especially since human measurements can only record a finite period of time. Even things we wish to explore on this blog are hardly periodic (for instance, image analysis).

## The Fourier Series--A Primer

DevFeed: [The Fourier Series--A Primer](<https://devfeed.tech/articles/the-fourier-series-a-primer-40271.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/04/25/the-fourier-series/>)

Published: 2012-04-25T21:43:06Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [classification](<https://devfeed.tech/tags/classification.md>), [complex-analysis](<https://devfeed.tech/tags/complex-analysis.md>), [foundation](<https://devfeed.tech/tags/foundation.md>), [fourier-analysis](<https://devfeed.tech/tags/fourier-analysis.md>), [heat-equation](<https://devfeed.tech/tags/heat-equation.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [orthogonality](<https://devfeed.tech/tags/orthogonality.md>), [primer](<https://devfeed.tech/tags/primer.md>)

### AI overview

This primer introduces the mathematics of Fourier series, beginning with periodic functions and explaining how sine and cosine functions serve as building blocks for representing functions. It establishes foundational concepts for later work involving Fourier transforms, sound and image analysis, classification, and machine vision.

### Source excerpt

Overview In this primer we'll get a first taste of the mathematics that goes into the analysis of sound and images. In the next few primers, we'll be building the foundation for a number of projects in this domain: extracting features of music for classification, constructing so-called hybrid images, and other image manipulations for machine vision problems (for instance, for use in neural networks or support vector machines; we're planning on covering these topics in due time as well).

## Kolmogorov Complexity--A Primer

DevFeed: [Kolmogorov Complexity--A Primer](<https://devfeed.tech/articles/kolmogorov-complexity-a-primer-40270.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/04/21/kolmogorov-complexity-a-primer/>)

Published: 2012-04-21T18:23:41Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>)

Tags: [complexity-theory](<https://devfeed.tech/tags/complexity-theory.md>), [computability-theory](<https://devfeed.tech/tags/computability-theory.md>), [computational-complexity](<https://devfeed.tech/tags/computational-complexity.md>), [kolmogorov-complexity](<https://devfeed.tech/tags/kolmogorov-complexity.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [primer](<https://devfeed.tech/tags/primer.md>)

### AI overview

This primer introduces Kolmogorov complexity as a way to formalize how random or complex a string is. It defines the concept using the length of the shortest program that outputs a string, then begins developing a more rigorous formulation using binary programs and Turing-machine concepts.

### Source excerpt

The Complexity of Things Previously on this blog (quite a while ago), we've investigated some simple ideas of using randomness in artistic design (psychedelic art, and earlier randomized css designs). Here we intend to give a more thorough and rigorous introduction to the study of the complexity of strings. This naturally falls into the realm of computability theory and complexity theory, and so we refer the novice reader to our other primers on the subject (Determinism and Finite Automata, Turing Machines, and Complexity Classes; but Turing machines will be the most critical to this discussion).

## Other Complexity Classes

DevFeed: [Other Complexity Classes](<https://devfeed.tech/articles/other-complexity-classes-40264.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/02/29/other-complexity-classes/>)

Published: 2012-02-29T17:12:35Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Computing](<https://devfeed.tech/topics/computing.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>)

Tags: [complexity](<https://devfeed.tech/tags/complexity.md>), [computational-complexity](<https://devfeed.tech/tags/computational-complexity.md>), [halting-problem](<https://devfeed.tech/tags/halting-problem.md>), [kolmogorov-complexity](<https://devfeed.tech/tags/kolmogorov-complexity.md>), [nondeterminism](<https://devfeed.tech/tags/nondeterminism.md>), [open-questions](<https://devfeed.tech/tags/open-questions.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [primer](<https://devfeed.tech/tags/primer.md>), [pspace](<https://devfeed.tech/tags/pspace.md>), [turing-machine](<https://devfeed.tech/tags/turing-machine.md>), [turing-machines](<https://devfeed.tech/tags/turing-machines.md>)

### AI overview

This article introduces complexity classes beyond P and NP, including PSPACE and NPSPACE, and discusses oracle-based classes. It explains that PSPACE equals NPSPACE while many relationships among complexity classes remain open.

### Source excerpt

Not Just Time, But Space Too! So far on this blog we've introduced models for computation, focused on Turing machines and given a short overview of the two most fundamental classes of problems: P and NP. While the most significant open question in the theory of computation is still whether P = NP, it turns out that there are hundreds (almost 500, in fact!) other "classes" of problems whose relationships are more or less unknown.

## P vs. NP, A Primer (And a Proof Written in Racket)

DevFeed: [P vs. NP, A Primer (And a Proof Written in Racket)](<https://devfeed.tech/articles/p-vs-np-a-primer-and-a-proof-written-in-racket-40263.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/02/23/p-vs-np-a-primer-and-a-proof-written-in-racket/>)

Published: 2012-02-23T19:57:35Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Computing](<https://devfeed.tech/topics/computing.md>), [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Racket](<https://devfeed.tech/topics/racket.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [analysis](<https://devfeed.tech/tags/analysis.md>), [big-o-notation](<https://devfeed.tech/tags/big-o-notation.md>), [class](<https://devfeed.tech/tags/class.md>), [computational-complexity](<https://devfeed.tech/tags/computational-complexity.md>), [computing](<https://devfeed.tech/tags/computing.md>), [decidability](<https://devfeed.tech/tags/decidability.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [fast](<https://devfeed.tech/tags/fast.md>), [halting-problem](<https://devfeed.tech/tags/halting-problem.md>), [input](<https://devfeed.tech/tags/input.md>), [language](<https://devfeed.tech/tags/language.md>), [machine](<https://devfeed.tech/tags/machine.md>), [np-completeness](<https://devfeed.tech/tags/np-completeness.md>), [p-versus-np](<https://devfeed.tech/tags/p-versus-np.md>), [primer](<https://devfeed.tech/tags/primer.md>), [racket](<https://devfeed.tech/tags/racket.md>), [solve](<https://devfeed.tech/tags/solve.md>), [theory](<https://devfeed.tech/tags/theory.md>), [turing-machine](<https://devfeed.tech/tags/turing-machine.md>), [turing-machines](<https://devfeed.tech/tags/turing-machines.md>)

### AI overview

A primer on the distinction between decidability and computational efficiency, introducing the complexity class P and its definition in terms of polynomial-time decision by a Turing machine. It also discusses efficient algorithms and gives a card-sorting example.

### Source excerpt

Decidability Versus Efficiency In the early days of computing theory, the important questions were primarily about decidability. What sorts of problems are beyond the power of a Turing machine to solve? As we saw in our last primer on Turing machines, the halting problem is such an example: it can never be solved a finite amount of time by a Turing machine. However, more recently (in the past half-century) the focus of computing theory has shifted away from possibility in favor of determining feasibility.

## Busy Beavers, and the Quest for Big Numbers

DevFeed: [Busy Beavers, and the Quest for Big Numbers](<https://devfeed.tech/articles/busy-beavers-and-the-quest-for-big-numbers-40262.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/02/08/busy-beavers-and-the-quest-for-big-numbers/>)

Published: 2012-02-08T19:42:22Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [Computing](<https://devfeed.tech/topics/computing.md>)

Tags: [ackermann-function](<https://devfeed.tech/tags/ackermann-function.md>), [busy-beaver](<https://devfeed.tech/tags/busy-beaver.md>), [chessboard](<https://devfeed.tech/tags/chessboard.md>), [computing](<https://devfeed.tech/tags/computing.md>), [infinite](<https://devfeed.tech/tags/infinite.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [numbers](<https://devfeed.tech/tags/numbers.md>), [primer](<https://devfeed.tech/tags/primer.md>), [theory](<https://devfeed.tech/tags/theory.md>), [turing-machine](<https://devfeed.tech/tags/turing-machine.md>)

### AI overview

This article examines how the ability to describe very large numbers reflects progress in mathematical and scientific thought. It introduces historical examples, including Archimedes' estimate for the number of grains of sand in the universe, and connects them to computational topics such as Busy Beavers.

### Source excerpt

Finding Bigger Numbers, a Measure of Human Intellectual Progress Before we get into the nitty gritty mathematics, I'd like to mirror the philosophical and historical insights that one can draw from the study of large numbers. That may seem odd at first. What does one even mean by "studying" a large number? Of course, I don't mean we stare at the number 1,000,000,000,000, which is quite large, and wonder how mankind can benefit from its elusive properties.

## A Spoonful of Python (and Dynamic Programming)

DevFeed: [A Spoonful of Python (and Dynamic Programming)](<https://devfeed.tech/articles/a-spoonful-of-python-and-dynamic-programming-40254.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/01/12/a-spoonful-of-python/>)

Published: 2012-01-12T23:11:26Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>)

Tags: [dynamic-programming](<https://devfeed.tech/tags/dynamic-programming.md>), [fibonacci](<https://devfeed.tech/tags/fibonacci.md>), [memoized-recursion](<https://devfeed.tech/tags/memoized-recursion.md>), [primer](<https://devfeed.tech/tags/primer.md>), [python](<https://devfeed.tech/tags/python.md>), [recursion](<https://devfeed.tech/tags/recursion.md>)

### AI overview

A Python primer covering built-in types such as lists, tuples, and dictionaries, with examples involving Fibonacci numbers and optimal coin change. It introduces dynamic programming and compares inefficient recursive and recursionless approaches.

### Source excerpt

This primer is a third look at Python, and is admittedly selective in which features we investigate (for instance, we don't use classes, as in our second primer on random psychedelic images). We do assume some familiarity with the syntax and basic concepts of the language. For a first primer on Python, see A Dash of Python. We'll investigate some of Python's useful built-in types, including lists, tuples, and dictionaries, and we use them to computing Fibonacci numbers and "optimal" coin change.

## Random (Psychedelic) Art

DevFeed: [Random (Psychedelic) Art](<https://devfeed.tech/articles/random-psychedelic-art-40252.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/01/01/random-psychedelic-art/>)

Published: 2012-01-01T19:11:28Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [classes](<https://devfeed.tech/topics/classes.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [art](<https://devfeed.tech/tags/art.md>), [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [color](<https://devfeed.tech/tags/color.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kolmogorov-complexity](<https://devfeed.tech/tags/kolmogorov-complexity.md>), [pixel](<https://devfeed.tech/tags/pixel.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [random-number-generators](<https://devfeed.tech/tags/random-number-generators.md>)

### AI overview

A Python tutorial that introduces objects and classes while constructing randomized psychedelic art. It explains how images are represented as pixel grids with RGB color values and uses mathematical functions to generate colors.

### Source excerpt

And a Pinch of Python Next semester I am a lab TA for an introductory programming course, and it's taught in Python. My Python experience has a number of gaps in it, so we'll have the opportunity for a few more Python primers, and small exercises to go along with it. This time, we'll be investigating the basics of objects and classes, and have some fun with image construction using the Python Imaging Library.

## Learning Python with a Project Euler Problem

DevFeed: [Learning Python with a Project Euler Problem](<https://devfeed.tech/articles/a-dash-of-python-40237.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2011/08/10/a-dash-of-python/>)

Published: 2011-08-10T19:26:55Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Learning](<https://devfeed.tech/topics/learning.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [primer](<https://devfeed.tech/tags/primer.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

A beginner-oriented Python tutorial that introduces installation, the IDLE editor and terminal-based editors, then uses a Project Euler problem about summing multiples of 3 or 5 below 1000 to explain integer data, arithmetic, divisibility tests and the remainder operator.

### Source excerpt

We will orient our dash of Python around the first and simplest problem from ProjectEuler.net. Installing Python To get Python on your computer, go to python's website and follow the instructions for downloading and installing the interpreter. Most Window's users can simply click here to download an installer, Mac OS 10.6 - 10.7 users can click here to get their installer, and linux users can (and should) fend for themselves.

## Number Theory--A Primer

DevFeed: [Number Theory--A Primer](<https://devfeed.tech/articles/number-theory-a-primer-40235.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2011/07/30/number-theory-a-primer/>)

Published: 2011-07-30T15:03:38Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [primes](<https://devfeed.tech/topics/primes.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>)

Tags: [arithmetic](<https://devfeed.tech/tags/arithmetic.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [factoring](<https://devfeed.tech/tags/factoring.md>), [gcd](<https://devfeed.tech/tags/gcd.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [number](<https://devfeed.tech/tags/number.md>), [number-theory](<https://devfeed.tech/tags/number-theory.md>), [primer](<https://devfeed.tech/tags/primer.md>), [primes](<https://devfeed.tech/tags/primes.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rsa](<https://devfeed.tech/tags/rsa.md>)

### AI overview

A primer on elementary number theory covering integers, divisibility, composite and prime numbers, prime factorization, and the greatest common divisor. It provides background for a separate post on RSA encryption.

### Source excerpt

This primer exists for the background necessary to read our post on RSA encryption, but it also serves as a general primer to number theory. Oh, Numbers, Numbers, Numbers We start with some easy definitions. Definition: The set of integers, denoted $ \mathbb{Z}$, is the set $ \left \{ \dots -2, -1, 0, 1, 2, \dots \right \}$. Definition: Let $ a,b$ be integers, then $ a$ divides $ b$, denoted $ a \mid b$, if there exists an integer $ n$ such that $ na = b$.

[Next page](<https://devfeed.tech/tags/primer.md?cursor=WyIyMDExLTA3LTMwVDE1OjAzOjM4KzAwOjAwIiwgIjlkMTEwNmE3LWY5OTktNDhjOS05YzA3LTI3ZTZhNTRjZGMzYSJd>)