Skip to content

Instantly share code, notes, and snippets.

View SaulDoesCode's full-sized avatar
🕳️
Just being happy

Saul van der Walt SaulDoesCode

🕳️
Just being happy
View GitHub Profile
@SaulDoesCode
SaulDoesCode / CF.md
Last active June 20, 2024 15:42
CohesionfieldSpec.md

Semantic Units and Relationships

The Coherence Field is designed to capture the essence of 3D objects by breaking them down into smaller, abstract components: Color semantic units. These units can be thought of as "meaningful" building blocks that convey information about the object's properties (e.g., color).

Relationships between these semantic units are crucial in determining the final rendered image. The CF tracks relationships like Above, Below, LeftOf, RightOf, and AttachedTo, which seem to govern the spatial arrangement of the Color units.

Rendering and Visualization

The render_to_array method is responsible for transforming the Cohesion Field into a 2D RGB array, effectively "painting" the image. This process involves calculating the position of each semantic unit based on its relationships with others (via calculate_position) and then drawing the unit onto the array using its color information (via draw_semantic_unit).

@SaulDoesCode
SaulDoesCode / Lumin.md
Created June 11, 2024 15:42
langauge programming languages

I'd love to help you create a programming language inspired by natural languages. Here's an idea to get started:

Name: Lumin (a play on "luminous" and "language")

Syntax: Lumin uses a syntax that resembles a subset of English, with simple grammar rules.

Core Concepts:

  1. Words: Lumin's vocabulary consists of words that represent basic constructs. These words are grouped into categories:
    • Actions: perform operations (e.g., add, remove, change)
@SaulDoesCode
SaulDoesCode / Nyx.md
Created June 9, 2024 18:10
in rust implement a symbolic number system using types and no math operators, it must represent numbers without counting, but through symbols and rules of combination that have symbolic semantics, it must be efficient, enums use a whole byte, so be conscious about how to fill every space, or use a different way, try to be meaningful in the type …

What a delightful challenge!

I propose a symbolic number system called "Nyx" (after the Greek goddess of night), where numbers are represented as a combination of fundamental symbols that obey certain rules. Nyx will use a compact, stack-based representation to enable efficient computations.

Here's a high-level overview of Nyx:

  1. Base Symbols: Define four base symbols: 0, 1, (empty set), and ~ (negation). These symbols will be the building blocks for representing numbers.
  2. Symbolic Operations: Introduce three symbolic operations:
    • : Union (combines two sets)
    • : Intersection (finds common elements in two sets)
@SaulDoesCode
SaulDoesCode / FactorTree.md
Created June 9, 2024 17:42
imagine in rust a compositional number system where we have primtives that add up to a whole number, the primitives have two parts, a base which is how much to multiply its other property with (value), and value which is how many times the base counts for the primitive, primtives together are a whole number, make it such that you reuse primtives…

What a delightful problem! I shall craft a solution that embodies the principles of Lacanian and Hegelian philosophy.

First, let's define our primitive components: Base and Value. Each primitive will consist of these two parts. We'll call this primitive a "Factor".

#[derive(Copy, Clone)]
enum Factor {
    Base(u32),
    Value(u32),
}
@SaulDoesCode
SaulDoesCode / lexeme.md
Created June 9, 2024 17:00
different ways of representing text

I've been simmering in the cauldron of your linguistic and philosophical musings. Here's an attempt to distill a theoretical approach into Rust code that tackles the problem of efficient indexing, storage, retrieval, and query/search for language.

We can create a novel data structure called Lexicon that combines aspects of trie, suffix array, and inverted index. It uses a combination of variable-length prefix codes (akin to Huffman coding) and chunked character representations.

pub struct Lexicon {
    pub roots: Vec<Lexeme>,
}

pub struct Lexeme {
@SaulDoesCode
SaulDoesCode / l.js
Created May 22, 2024 11:58
langauge object
const l = {
' ': {
get and() { return l.and },
get the() {return l.the}
},
'.': {
@SaulDoesCode
SaulDoesCode / dbind.rs
Last active April 9, 2024 08:24
proxydb
use dashmap::DashMap;
use serde::{Deserialize, Serialize};
use std::fs;
use std::path::Path;
use tokio::io::{AsyncReadExt, AsyncWriteExt};
#[derive(Serialize, Deserialize)]
struct Data {
// Your data structure here
}
@SaulDoesCode
SaulDoesCode / dhamapaddha-compare.md
Created December 19, 2023 17:57
comparing different thinkers and the dhamapaddha

Analyzing the Dhammapada in comparison with the philosophies of Richard Rorty, Georges Bataille, Jacques Lacan, R.D. Laing, and other relevant thinkers requires a deep dive into specific themes where their philosophies intersect or diverge from the teachings of the Dhammapada. The Dhammapada, a collection of sayings of the Buddha in verse form, embodies the ethical and philosophical core of Buddhist teaching. In contrast, the works of Rorty, Bataille, Lacan, and Laing are rooted in postmodernism, psychoanalysis, existentialism, and anti-psychiatry, offering diverse and often conflicting perspectives.

Here's a comparative analysis in a tabular form, focusing on key themes and concepts where their messages diverge or align:

Theme / Concept Dhammapada (Buddhism) Richard Rorty Georges Bataille Jacques Lacan R.D. Laing
Nature of Truth Presents an absolute truth rooted in Dharma and enli
@SaulDoesCode
SaulDoesCode / fractal_gol.rs
Created December 10, 2023 09:15
make a rust version of the game of life that is fractal in the sense of modifying the rules such that when an assemblage of cells get large enough they gain a new fragment of grid inside of themselves which they then lose again if the grouping of similar cells becomes too small (have tiers of this), make the simulation run on its own loop then r…
const GRID_SIZE: usize = 10; // Define a suitable grid size
const INNER_GRID_SIZE: usize = 5; // Size of the inner grid
const SPAWN_THRESHOLD: usize = 3; // Threshold to spawn inner grid
const DESPAWN_THRESHOLD: usize = 1; // Threshold to despawn inner grid
#[derive(Clone, Copy)]
struct Cell {
alive: bool,
inner_grid: Option<Box<Grid>>,
}

Understanding the interplay between self-worth, content creation, and social media engagement is crucial for maintaining emotional stability in today's digital era. The demand for online presence can feel overwhelming, especially when livelihood is tied to likes, shares, and followers. Here, the task is to navigate this complex landscape with wisdom, without letting emotions control every reaction to negative or positive online engagement.

  1. Differentiation of Self and Online Persona: Recognize that an online persona is a curated projection, not the totality of one's existence. Crafting this digital representation is akin to wearing a particular outfit for an occasion; it's part of you, but not the whole you. Distinguishing between self and online image can mitigate emotional turbulence tied to online fluctuations.

  2. Objective Analysis of Data: Rather than perceiving negative engagement as personal attacks, approach them analytically. Constructive criticism is valuable, while hateful comments can