Skip to content

Instantly share code, notes, and snippets.

View adamnemecek's full-sized avatar

adamnemecek

View GitHub Profile
@adamnemecek
adamnemecek / definition_of_truth.md
Created August 23, 2022 18:58 — forked from Mec-iS/definition_of_truth.md
Truth as Eigenform

Definition of Truth

Jason the Goodman <jasonthegoodman@....com>:

How about defining "truth" with "stability" of the coupling loop between "the object" and the cognitive system coupling with the "object"? If the process stabilizes and an eigenvalue of the loop emerges, we say "a truth" is found. This would refocus our attention from the "object" itself to the nature of the cognitive system, which may include animals and robots in addition to humans. My tentative way to upgrade from first-order thinking to the second-order thinking. Then, instead of searching for "truth", we search for the "Lyapunov potential function" for the situation if we could find one...

Louis H Kauffman <kauffman@....edu>

Eigenform is important way to formalize a kind of stability. Truth is a special kind of eigenform, not just any eigenform. Truth means the truth of a PROPOSITION about something. So we need to have a language involved and the notion that the propositions are talking about some domain where it is possible to c

@adamnemecek
adamnemecek / dsp.jl
Created September 30, 2023 20:42
DSP in 20 loc
using LinearAlgebra: diag
# returns a `LinRange` representing `k`s which can
# be passed into `diag`, starting from top right
function diags(m::AbstractMatrix)
(nr, nc) = size(m) .- 1
return reverse(-nr:nc)
end
# sum of values along diagonal, `diagsum(m, 0) == tr(m)`
@adamnemecek
adamnemecek / conv.jl
Created January 9, 2024 16:40
convolution == superposition
using DSP: conv
@assert conv([1, 0, 0], 1:4) .+ # [1, 2, 3, 4, 0, 0]
conv([0, 2, 0], 1:4) .+ # [0, 2, 4, 6, 8, 0]
conv([0, 0, 3], 1:4) == # [0, 0, 3, 6, 9, 12]
conv([1, 2, 3], 1:4) # [1, 4, 10, 16, 17, 12]
@adamnemecek
adamnemecek / OpenStarSemiring.lhs
Created March 2, 2024 04:37 — forked from sjoerdvisscher/OpenStarSemiring.lhs
Playing with 'A Very General Method of Computing Shortest Paths'
This is an extension of "A Very General Method of Computing Shortest Paths" to use "open matrices".
This is from a paper "The Open Algebraic Path Problem" by Jade Master https://arxiv.org/abs/2005.06682
> {-# LANGUAGE TypeFamilies #-}
> {-# LANGUAGE TypeApplications #-}
> {-# LANGUAGE FlexibleContexts #-}
> {-# LANGUAGE StandaloneDeriving #-}
> {-# LANGUAGE AllowAmbiguousTypes #-}
> {-# LANGUAGE ScopedTypeVariables #-}
> module OpenStarSemiring where
abstract class Dual(val rank: Int) {
self =>
// Cell value accessor
protected def get(r: Int, c: Int): Double
// Memoizing cell value accessor
def apply(r: Int, c: Int): Double = memo.getOrElseUpdate(r - c, self.get(r, c))
// The memo table
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@adamnemecek
adamnemecek / bash_strict_mode.md
Created July 27, 2025 02:46 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation