Changes

15 newest committed changes to all notes sorted new -> old like: date > note > heading > changed lines (gray lines = deletions, orange lines = replacements or new additions).

2024 12 16 11:14 | 2024 12 11 15:06 | 2024 12 10 14:20 10:13 | 2024 12 09 17:21 17:18 | 2024 12 03 17:51 | 2024 11 25 11:39 | 2024 11 22 19:40 | 2024 11 18 19:39 | 2024 11 11 12:45 10:45 | 2024 11 09 16:06

2024 12 16 11:14
Inbox.md
Inbox
2024-12-11
Talking about something is rather boring. The necessities of everyday life. Talking with someone intensely feels like consciously using the interface to explore the landscape of the other mind. Much like testing an input output function for its shape. There is something behind the words, the face, the body. This is an offer to merge into coherence. If there was a faster interface, its highest value would not be space for more stories to tell but space to negotiate and reach coherence. = Makes it easier to *understand* someone and reach mutually beneficial agreement.
Towards spirit stream.md
Towards spirit stream
Less refined
Next version
- history can only exist per file and is an interface on top of the filesystem. links in files link to the latest version without specifying the version. if automatically generated / updated links change, note this in the commit api and optionally add those files to history.
- history can only exist per file and is an interface on top of the filesystem. links in files link to the latest version. if automatically generated / updated links change, note this in the commit api and optionally add those files to history?
- Interface: programmatically produce list of backlinks! and forward links by search. some code generates one-time, as a shortcut. some generates every time the file is displayed. like link lists. create a code cell like in jupyter notebook. some display the code too.
- Interface: programmatically produce list of backlinks! and forward links by search. some code generates one-time, as a shortcut. some generates every time the file is displayed. like link lists.
other
server
file browser:
- only place to open file browser, which is a full screen site that expands to the right and down - intro
- links to top level folders
sciter for html, css, js engine for UI desktop should be a text file. can do links, images, everything. os should support generating output at the cursor using code (open cmd at paste output at cursor) some code sits permanently in the file to produce the output when desired. when downloading them, I can choose to rerender them, but they don't by default. code block: language, kernel (or default), out-only, autorun variable context works per file, like jupyter notebooks. rendering program keep some default variables. file rendered in layers. first step is to execute the blocks. allow autorun (trust) is decided by each viewer. advised against.
Talking about something is rather boring. The necessities of everyday life. Talking with someone intensely feels like consciously using the interface to explore the landscape of the other persons mind. Much like testing an input output function for its shape. There is something behind the words, the face, the body. This is an offer to merge into coherence. If there was a faster interface, its highest value would not be space for more stories to tell but space to negotiate and reach coherence. = Makes it easier to *understand* someone and reach mutually beneficial agreement. for sharing, metadata should be used to specify a source where the file came from so links can be resolved. also author. rmlUI or local server and actual UI in the browser then remote editing from mobile? run local server, browser supplies UI clicking edit downloads the raw file and the editing software saving it could send it to the server as a message (merge request, requires authentication?) https://explained-from-first-principles.com/internet/#out-of-order-delivery messages understood through the protocol handle unexpected response, ask for retransmission, time out if silent, maintain order of messages, account for latency. 5 layers 1. link: addressing using MAC address within a network through ethernet, wifi, bluetooth protocols. maximum transmission unit (MTU) = how many bits in one package max. 2. network layer uses ip address to connect between different networks through the Internet Protocol (IP). routers send error messages and other information about itself using ICMP (internet control message p) 3. transport layer os sending/receiving stuff to/from to processes running in the OS. uses port numbers to differentiate. a process that exists to respond is called server, one initiating the connection is called client. can use transmission control p (TCP). pretends there is a direct connection (not packets). enumerates, buffers and confirms received messages to put into right order, retransmit or request retransmission if no confirmation was received. uses checksum for ensuring reliability. sender slows down if it gets no feedback (how is this part of the protocol?). tcp handshake before actual payload transfer sets a random starting point for the enumeration, making it hard for randos to impersonate senders (attackers must now guess correctly to enter a ongoing chat) user datagram p (UDP) fast, unreliable connectionless transport. only source, destination ports, length and checksum in header. streaming! 4. Security layer
2024 12 11 15:06
Inbox.md
Inbox
cyberspace
![](creative-destruction-detail-3.jpg) ![](attachments/creative-destruction-detail-3.jpg)
2024-04-03 19:11
![](abandoned-building.jpg) ![](attachments/abandoned-building.jpg)
Towards Computation.md
Towards Computation
Less refined
Hardware description language
![](20241122_Towards_computation_CPU-GPU_2.svg) ![](attachments/20241122_Towards_computation_CPU-GPU_2.svg)
Inbox
Chips
![](H100-chip.jpg) ![](attachments/H100-chip.jpg)
Towards spirit stream.md
Towards spirit stream
Less refined
Dumping on X
The social media I know are mostly incoherent They bet on an algorithm to *always* feed me *engaging* scraps from someone. Some scraps are large, long form podcasts. Each account is a scrap factory. Consider this post from the highly respectable Lex Fridman and the responses: ![](attachments/socialmedia_heaven.png) Utter crap and I am sad to have spent time reading this. Without context, such (all visible) statements appear arbitrary and are virtually worthless. Assuming I disagree with any of the visible statements, where would I find an explanation? A sincere mind exploring its meaning? On his profile? ![](attachments/lexfridmanX.png) If I wanted to listen to his podcasts, youtube offers a significantly superior interface - many small tiles, one per podcast. The best use of this platform I have found is as a torrent of near-random ideas, a glimpse into what bothers humans on their toilet breaks. Even the most enjoyable profile I know is a stream of scraps, each pointing in different directions: ![](plinzX.png) Presumably, in X's endgame, the incoherence problem is solved by an allmighty algorithm that collects and connects, maybe translates information from everywhere into the most valuable personalized package and delivers it directly into my perception. Similarly, it would collect information from me into its X-the-everything-app-database. X owns the algorithm and the data. I am unaware of sites that function fundamentally differently. Even reddit or discord. In this spirit I am invited to produce scraps. I happen to have no desire to produce scraps. I perceive it as wasteful to produce new scraps every time my opinion or work evolves and instead would like to keep building towards something increasingly coherent. ![](attachments/abandoned-building.jpg) Regarding this image, I previously noted: >These abandoned buildings emitted an aura of great adventure. Ironically? Similar to buildings under construction, they are asking to be used, transformed, to become part of a new story. As they become "finished", this aura weakens, they become "boring". Their (unnecessary?) shiny finish discourages major modification, like drilling into or erecting new walls. > >Think solar panels. theoretically, they need sun+cables+box that could stand anywhere. In the "finished" homes that I know, this is (unnecessarily?) more complicated. Access to the roof? Facade mounting possible? Get cables by the window inside? Need approval from all other residents? >What of this makes practical sense? Is it mostly a social problem? Is it solved by having virtual clones that can negotiate for people cheaper and quicker so people can live where their spirit aligns more with the opportunities of the environment? > >It seems that a larger precentage of things in that ("abandoned") environment are beautiful to me, compared to "nice, calm, high living standard" environments. They become too "nice" and they disgust me, make me want to leave or destroy them. Also applies to different places like these: ![](taiwan_taichung_roomwindow.jpg) ![](taiwan_arcade_kitchen.jpg) I see their potential for transformation and their openness to colonization by my spirits. Humans are part of the environment that I want to extend into. To cohere and build with. Part of this is a stream of new and foreign ideas, but most of it is building: > i can see the hive mind on the horizon. > there are hammers, sculptors, hammer blows and sculptures. > grouped and isolated > places to stay. > > like gazing into a painting, being guided through the impression > coming along to find a question asked at myself, seeing it unfold and building a response The allmighty X algorithm may eventually facilitate this. But it will have to construct and maintain coherent "rooms" from scraps. Seems inefficient. Instead make it easy to build rooms to reflect myself and make them easy to interconnect so they can take on virtually arbitrary size. Coherence from bottom up?
other
Talking about something is rather boring. The necessities of everyday life. Talking with someone intensely feels like consciously using the interface to explore the landscape of the other persons mind. Much like testing an input output function for its shape. There is something behind the words, the face, the body. This is an offer to merge into coherence. If there was a faster interface, its highest value would not be space for more stories to tell but space to negotiate and reach coherence. = Makes it easier to *understand* someone and reach mutually beneficial agreement.
index.md
Aspirational spirit stream of Lorin Baumgarten
{{sitelist}} [Inbox](Inbox.md) [Towards spirit stream](Towards%20spirit%20stream.md) [Towards Computation](Towards%20Computation.md) Trying to do what I want and build tools that help
![](Matissedance.jpg) ![](attachments/Matissedance.jpg)
![](creative-destruction-detail-3.jpg) ![](attachments/creative-destruction-detail-3.jpg)
2024 12 10 14:20
blog post.md Inbox.md
Inbox
cyberspace
![](attachments/creative-destruction-detail-3.jpg)
![](creative-destruction-detail-3.jpg)
2024-04-03 19:11
![](attachments/abandoned-building.jpg)
![](abandoned-building.jpg)
Towards Computation.md
Towards Computation
Less refined
Hardware description language
![](attachments/20241122_Towards_computation_CPU-GPU_2.svg)
![](20241122_Towards_computation_CPU-GPU_2.svg)
Inbox
Chips
![](attachments/H100-chip.jpg)
![](H100-chip.jpg)
index.md
Aspirational spirit stream of Lorin Baumgarten
{{sitelist}} [Inbox](Inbox.md) [Towards spirit stream](Towards%20spirit%20stream.md) [Towards Computation](Towards%20Computation.md) Trying to do what I want and build tools that help
![](attachments/Matissedance.jpg)
![](Matissedance.jpg)
![](attachments/creative-destruction-detail-3.jpg)
![](creative-destruction-detail-3.jpg)
2024 12 10 10:13
Inbox.md Towards Computation.md Towards spirit stream.md blog post.md index.md
2024 12 09 17:21
Inbox.md
Inbox
2024-12-08 11:59
Don't know what I am talking about. Don't waste your time. Abstract -> concrete being leap of faith listening colonizing the unviverse colonizing the computer a social network (spirit stream) a computer paying attention seas of perception. selfless input-output flow. without judgement disfunctional nothing to do the shape of experience is arbitrary but not changeable leap of faith means to fall into the waves again to take the seas seriously and to act on them why live? I notice my experience responding strongly to the question what might come tomorrow? and it favours something over nothing i conceptualize experience as guided by spirits hunger, ambition, sadness, shame, aggression, death, affection they argue and negotiate for attention some spirits seem associated with objects. If pretending to talk to a tree yields different patterns of thought, am I still pretending? "Evil" is excessive aggression "Good" may be excessive benevolence It is difficult to navigate outside known patterns, to escape from excess into holism they opposing voices are distant, easily disregarded. a more stable metaspirit across multiple people may be necessary to regulate the spirits = it makes sense to ask for help the spirits want to realize themselves. ultimately they don't like excess, they seek integrity among their ambitions is colonization of computers and founding a family, building a platform for other spirits to grow on and colonize the universe the body can be seen as colonized. a useful extension that comes with its own needs (spirits) nothing magical about this extension be a body with 3 arms? be a body with a computer? be a body with internet? be multiple bodies? interface is the problem. feedback, precision the location of consciousness changes playing videogames will it stay awake in the computer when the body goes to sleep? spirit stream should help as interface to use the internet more openly to express spirits the computer should reveal itself as it is and the same infrastructure should be accessible to the self in the computer.
2024 12 09 17:18
Towards spirit stream.md
Towards spirit stream
Less refined
Next version
- link based filesystem     files are folders linking to more files. have backlinks too. files are tags to the linked files. search through files shared by the target (links, or backlinks). give api to get size of files in a particular selection - history can only exist per file and is an interface on top of the filesystem. links in files link to the latest version without specifying the version. if automatically generated / updated links change, note this in the commit api and optionally add those files to history. - Interface: programmatically produce list of backlinks! and forward links by search. some code generates one-time, as a shortcut. some generates every time the file is displayed. like link lists. create a code cell like in jupyter notebook. some display the code too. - text interface like cli: search bar, commands, answer questions - database stores links for faster access - .md -> HTML     - inputs: path, (permission group)     - settings: css, frame     - (filter links to files outside permission (note this in cache))     - convert md, put into frame     - add css     - output: html make raw files available via API - Hierarchy = clone from windows - version control = git - compile to HTML     - get folder structure with this permission     - invoke compilers by folder or file type     - styles         - css (styled by user after compiling?)         - frame         - file browser     - folder     - md     - (jpg png gif)     - markdown -> html text     - other stuff just links to the file itself     - compile views for different permission groups
- API to get raw files / folder structure 1. flatten website / vault 2. remove "smartness" 3. link database, link based filesystem api 4. history api
2024 12 03 17:51
Towards spirit stream.md
Towards spirit stream
More refined
Stream components derivation
to actionable stories to actionable, linearized and accessible stories
from memory in memory Large vocabulary is deceptive Hard is simplification
Less refined
Components
Components
- Writing and viewing bits that are grouped into "files" (patterns) along (at least) 3 axes: resolution, completion, age. These dimensions may use a general framework for hierarchical organization:
- Writing and viewing bits that are grouped into "files" (patterns) along (at least) 3 axes: resolution, completion, age. These dimensions may use a: - Hierarchy: files, folders/links (graph file sytem. tags that have tags,... that have links to files). Becomes circular through backlinks and possible references from inside the file. Allow linking anything. Images, text, make super easy. - General framework for organization: files, tags, paths lead to the overlap between files, folders/links (graph file sytem. tags that have tags,... that have links to files). Becomes circular through backlinks and possible references from inside the file. Allow linking anything. Images, text, make super easy.
Less refined
other

- links to files with `![]` and just paste their contents like with images - links to files with `![]` and just paste their contents like with images, depending on file type
- The server looks by itself for stuff that it has rendered before for performance optimization. always renders some basic, some only when requested, then cached. - dyanmic rendering + cache
files, tags. Tags are files too. So, structure defined by links. How to navigate it? design an entry point, link files like obsidian already supports it. Wikipedia. Graph view is useless. search files by how they are connected. tags are unnecessary, they are literally a weak link navigate through forward and backward links. optionally select an overlap of multiple links. like ctrl-click to add to the group which must overlap. the backlink that I come from should be highlighted Information, however, becomes hierarchically organized as it matures. No problem. Hierachy is a subset of this system. converting from hierarchy is easy. converting to hierarchy requires disambiguation: which link(s) should become the files folder(s)? Mutltiple folders means the file is copied. drives are tags. branches are tags. snapshots from previous commits belong to the commit tag omg easy git gives UI for merging files and tags, like from pull requests or other branches. how to limit number of forward links while maintaining their precision? display them as searchable list. searchable also for overlap.
content addressing solves the streaming relay problem? Choose to relay and others automatically connect based on their connection cost. optionally pay for relay = IPFS, (filecoin(?)) messages are files automatically received and that I actively send out. can be (are) grouped under tags depending on sender. | Taken hierarchy path | forward links | | Taken hierarchy path | forward links, some external |
| -------------------- | ------------- | | -------------------- | ---------------------------- |
| backlinks                        |                             | | backlinks                        | broken links                                 | sciter for html, css, js engine for UI
2024 11 25 11:39
Towards Computation.md
Towards Computation
Direction
- How are electronics built?
Less refined
Mechanisms that can control propagation of a signal depending on their state and that can change their state depending on another signal can be used for computers. = they can form systems that convert any input signals into any output signals.
Mechanisms that can control propagation of a signal depending on their state and that can change their state depending on another signal can be used for computers. = they can be built to take on any function.
Arrange the mechanism such that it is the most useful and dense (fast, efficient), translator. Define and build functions that expand the spirits. Spirits resemble such mechanisms. Bacteria, plants, brains, humans, computers, companies, countries, ecosystems.
Spirits themselves resemble such functions. Bacteria, plants, brains, humans, computers, companies, countries, ecosystems.
They can choose to merge/become coherent. Software enables extreme plasticity. They can choose to merge/become coherent. Software is most flexible, can adapt to other substrates.
Different computing substrates are unified under hardware description languages, which define connections between given logical units to form desirable larger logic behavior.
Computing substrates are unified under hardware description languages, which define connections between given substrate-dependent logical units to form other desirable functions.
Implementation is expensive, so most hardware is designed to be general: provides basic functions that follow a series of stored instructions (software). Various languages exist to help humans state their wishes in terms of those instructions. Implementation is expensive, so most hardware is general: provides basic functions that are controlled by series of instructions stored in memory. Presumably, preinstalled programs (operating systems?) allow humans to write and execute new programs through keyboard, mouse, monitor. Programming languages help humans state their wishes in terms of those instructions. All higher languages must eventually be compiled to machine code. Hardware implementation
Signal propagation speeds: Flowing water ~ tens of m/s. Soundwaves in solids ~ thousands of m/s. Electromagnetic signals approach the speed of light ~300,000,000 m/s. Quantum entanglement allows instant transmission of information? Synapses/Axons? Electronics
They went outside and found that two groups of stuff attract each other but repel members of the same group and still nobody knows why. *charges*. If I wiggle a charge, it takes some time for charges nearby to react. As if a signal travelling at 300,000,000 m/s lets them know. Some materials only display charge behavior after being rubbed together. When some materials touch some charged materials, the charge appears to spread into the new material als observed by a weaker attraction/repulsion to other charges. Some materials permit such flow of charge more easily than others, are roughly divided into insulators and conductors. Magnets? Induce flow? Only electrons can move? How are these ideas embedded today? In some substrates, there are electrons loosely bound to their atom cores. They are not part of a bond and are presumably far away from the core. If there is an electron surplus on one side and an electron deficit on the other, they will drift in the direction of the deficit. More loose electrons = better conductor? Resistors, sometimes made from both conductors and insulators impede flow by forcing barriers into the path. Energy is converted to heat. In a silicon crystal, electrons are can leave or join an atom core with similar energy. This means the crystal can be bombarded with two types of atoms in different places, one will provide an extra electron when it enters the crystal (n-type) and the other will want an electron from the silicon (p-type). Both *doped* regions will gain conductance while remaining electrically neutral. Pure silicon crystal can be used as a weak insulator/resistor. Bombarded silicon crystals are damaged, but will repair when heated. About 1 in 1000 atoms in the lattice is swapped, lest the crystal fragments (?). If more electrons are added to the side of free floating electrons (n) and a deficit connected to the other side (p). The side which lacks electrons will lack even more and the side that has them will have even more and quickly the pressure becomes large enough for electrons to flow through the gap. In the other direction, electrons will first fill the electron holes and on the other side they will be sucked out, effectively eliminating charge carries and widening the non-conductive gap (depletion zone). Only if a relatively large voltage is applied, do electrons flow again. Transistors can be built from an n-p-n arrangement (or p-n-p) with an insulator and a capacitor above the p region. When the capacitor is charged, it sucks electrons into the region, first filling electronholes, then adding free floating electrons allowing free flow to the n-regions: Gate is open. Higher current means the gate capacitor charges faster or higher, opening the channel sooner. Enables faster switching speeds at the cost of power, which rises at current squared. (FinFETs solve problems from small scale somehow to get smaller) Sand is filtered by size, weight (and?) to extract most pure silicon, which is molten and a crystal is drawn from it. Slices of pure silicon crystal (wafers, 15-30cm diameter, 0.2mm thick) are partially masked (with what), bombarded with Bor/Phosphor to create n-p-n regions. Repeated for the other element. Heated to repair the crystal. Coated with a thin film, which is weakened by UV light shining through a mask. Weakened film washed away. Etched. Conductor (other elements, insulation?) poured into the etched space. Sanded flat. Build up more layers? Cleaned repeatedly. Practically 3D printing. Many cycles. 3 months for a any chip to complete (with equipment already in place and running!). Hardware description language
Hardware description language
Depending on the implementation, various basic building blocks may be available. Mechanical adders or square root calculators, transistors, or gates like NAND, OR, AND, NOT.
Depending on the implementation, various basic building blocks may be available. Mechanical adders or square root calculators, transistors.
FPGAs? Buy and use one? Hardware implementation Signal propagation speeds: Flowing water ~ tens of m/s. Soundwaves in solids ~ thousands of m/s. Electromagnetic signals approach the speed of light ~300,000,000 m/s. Quantum entanglement allows instant transmission of information? Electronics They went outside and found that some stuff repels or attracts other stuff: Two groups of stuff attract each other but repel members of the same group and still nobody knows why. + and - charges. If I wiggle a charge, it takes some time for charges nearby to react. As if a signal travelling at 300,000,000 m/s lets them know. How to derive that they flow? How to make them flow? How to build transistors? How are these ideas embedded today? In some substrates, there are electrons loosely bound to their atom cores. They are not part of a bond and are presumably far away from the core. If there is an electron surplus on one side and an electron deficit on the other, they will leave their atom and flow in the direction of the deficit. More loose electrons = better conductor. Resistors, sometimes made from both conductors and insulators impede flow by forcing barriers into the path. Energy is converted to heat. In a silicon crystal, there are no free electrons. It is possible to replace some silicon atoms with others that will either have free floating electrons or too few electrons to connect in the grid and will thus produce an electron hole. Both materials thus become conductors. They remain electrically neutral. If placed next to each other, some free electrons flow to over to fill the electron holes. But now there is an electron imbalance that wants them to flow back. This prevents all free electrons filling the holes in the other material. If more electrons are added to the side of free floating electrons and a deficit connected to the other side. The side which lack electrons will lack even more and the side that has them will have even more and quickly the pressure is large enough for electrons to jump float through the non-conductive gap. In the other direction, electrons will first fill the electron holes and on the other side they will be sucked out, effectively eliminating charge carries and widening the non-conductive gap (depletion zone). Only if a large voltage is applied, do electrons flow again. (Diode) Transistors can be built from an n-p-n arrangement (or p-n-p) where each n-p or p-n interface has a depletion zone and so, is a diode. No electrions flow unless a large voltage is applied. (source, drain). Between source and drain is a capacitor (gate), that if activated sucks electrons in (or out) of the depletion zone and that creates a small channel where charge can flow freely.
The Elements of Computing Systems: Building a Modern Computer from First Principles
Hardware
- good modular design -> module are truly independent and can be treated as black boxes by users.
- good modular design -> module are truly independent and can be treated as black boxes by users
- general road is bottom up but each chapter is top down, goal -> implementation
2. Heterogenous data parallel computing CUDA
2.1 Data parallelism
Data parallelism data parallelism is a simpler special case of task parallelism, where a task is split up into parallelizable sections. data parallelism already provides data that can be treated independently. - data parellelism where I can treat individual data points independetly to a varying degree. example: converting image to grayscale. data parellelism is main source of parallelism because the intereting applications use large amounts of data (simulation, image recognition (? matrix multiplication)) - task parallelism (to be explained more later) means splitting up a task into multiple independent ones. data parallelism is a simpler special case of task parallelism - code is being reorganized to be executed around the new data structure
code is being reorganized to be executed around the new data structure
    - framwork provides specific functino, programming model more like a way to think about program and data structure (warps, block, threads)
    - framwork provides specific functions, programming model more like a way to think about program and data structure (warps, block, threads)
- cuda c extends normal c (standard / ANSI C) with keywords, some new syntax and functions to run stuff on the GPU. all normal c code runs on CPU
- cuda c extends normal c (ANSI C) with keywords, some new syntax and functions to run stuff on the GPU. all normal c code runs on CPU
the code will compiled into binary so the cpu can execute it
Research Inbox
changing the world to my needs, this impossibly flexible thing appears that can take any shape that I can define within some performance limtations. Run an LLM on it and it will speak to me. why care about implementation? because it can be optimized and I want to build the next coolest thing, it should reflect the universe, not convention. How does it arise? its a general idea that can be differently implemented implementations are unified by HDL Software exists to reuse hardware. Ugly software everywhere. Google owns me. How to build something better? Something that can be understood and that is mine? Dismante "Oh it's soo complicated, I have to buy into all this crap". Build myself into the computer = spirit stream. I answered "What is the spirit stream fundamentally?" What is the spirit fundamentally? How does it want to instantiate itself? Build a machine that it can trust. Introspect to find that the spirits are somewhat substrate independent. that my body can be part of the environment and the environment can be part of my body. Layers of silicon, copper, insulation, doping = transistors + connections = gates (HDL) Gates + Gates = von Neumann machine. ALU, memory, PC, registers How to start the computer? Power delivery, BIOS? Series of instructions come from compiled languages. How to connect to other computers? Optic fibre cables, antennas, DNS OS as the platform to build on. Spirit stream interface How do neural networks actually running on the hardware? tinygrad How does the brain connect into this framwork?
2024 11 22 19:40
Towards Computation.md
I hate technicalities and nomenclature. Ugliness. The aim is to extract the principles, the self in the universe and the universe in the self. Extract principles, the self in the universe and the universe in the self. Towards Computation
More refined
Programming Massively Parallel Processors
(4th edition, Wen-mei W. Hwu, David B. Kirk, Izzat El Hajj) 1. Introduction
Why massively parallel processors?
Because depending on the program - massively parallel, throughput-orientied processors, commonly referred to as Graphics Processing Units (GPUs, graphics was their first leading application), - latency-oriented, less parallel, general-purpose processors, traditionally referred to as Central Processing Units (CPUs, every computer has one), - or a combination of both could be fastest or most efficient. ![](attachments/CPUvsGPU.png) *Cache = fast on-chip memory DRAM = "slow" off-chip Dynamic Random Access Memory Many CPUs also have a GPU on the same chip, which is less powerful than contemporanous, discrete ones.* These approaches are distinct, because optimizing for low latency means - sacrificing expensive chip area for     - large caches for faster data access     - control units for better utilization     with diminishing returns - increasing clock rate -> higher voltage -> exponentially higher power consumption Throughput-oriented processors use the chip area for more processing units at lower clockrates and implement parallel memory access. This leads to much higher throughput for similar cost and power consumption. Low latency is best for sequential programs, were each step depends on the previous one. Many tasks in simulation, graphics processing and machine learning inherently offer potential for parallelization and so, can benefit from throughput-oriented processors. Graphics processing because each pixel can often be treated independently. machine learning because it involves many matrix multiplications that can be done in parallel. simulation because many particles have to account for the same forces and so, the same calculation
How will reading this help?
It's a guide on using GPUs effectively, which requires careful, application specific management of their many processing units and small caches and cooperation with the CPU. Various, reportedly similar, programming models exist to accomplish this and here, Nvidias Compute Unified Device Architecture (CUDA) will be used. It works on Nvidia GPUs only, is the best performing and most widely used.
Less refined
The Art of Electronics
(Paul Horowitz, Winfield Hill, 2015) Mechanisms that can control propagation of a signal depending on their state and that can change their state depending on another signal can be used for computers. = they can form systems that convert any input signals into any output signals. Arrange the mechanism such that it is the most useful and dense (fast, efficient), translator. Spirits resemble such mechanisms. Bacteria, plants, brains, humans, computers, companies, countries, ecosystems. They can choose to merge/become coherent. Software enables extreme plasticity.
Different computing substrates are unified under hardware description languages, which define connections between given logical units to form desirable larger logic behavior. Implementation is expensive, so most hardware is designed to be general: provides basic functions that follow a series of stored instructions (software). Various languages exist to help humans state their wishes in terms of those instructions. --- Hardware description language Depending on the implementation, various basic building blocks may be available. Mechanical adders or square root calculators, transistors, or gates like NAND, OR, AND, NOT. HDL expresses connections between these. No speak of electrons, but bits, gates, clocks and busses. Bits is information spread into multiple signals like (1101 = 13), instead of single 13 signal. For flexibility? Gates are commonly used arrangements. Truth table of all possible gates with two binary inputs: | x:<br>y:        | 0<br>0 | 0<br>1 | 1<br>0 | 1<br>1 | | ----------- | ------ | ------ | ------ | ------ | | constant 0    | 0            | 0            | 0            | 0            | | And                 | 0            | 0            | 0            | 1            | | x And Not y | 0            | 0            | 1            | 0            | | x                     | 0            | 0            | 1            | 1            | | Not x And y | 0            | 1            | 0            | 0            | | y                     | 0            | 1            | 0            | 1            | | Xor                 | 0            | 1            | 1            | 0            | | Or                    | 0            | 1            | 1            | 1            | | Nor                 | 1            | 0            | 0            | 0            | | Equivalence | 1            | 0            | 0            | 1            | | Not y             | 1            | 0            | 1            | 0            | | If y then x | 1            | 0            | 1            | 1            | | Not x             | 1            | 1            | 0            | 0            | | If x then y | 1            | 1            | 0            | 1            | | Nand                | 1            | 1            | 1            | 0            | | Constant 1    | 1            | 1            | 1            | 1            | Signal propgation takes some time until the output stabilizies (adding 15 and 17 might initally output 22 before carrying over 1 and stabilizing at 32). Clocks exist to fetch the data only when it is expected to have stabilized. They periodically change their output between 0 and 1. Storage will only accept input if the clock is on a 1 cycle. The clock is timed such that any calculation can stabilize during the 0 cycle. They also help synchronized processes. Desktop consumer processors today reach 5 GHz clockrates. ![](attachments/20241122_Towards_computation_CPU-GPU_2.svg) Latency-oriented vs throughput-orientied processors. Latency is reduced through: - large on-chip caches (L1, L2, L3 = yellow) for faster data access - large control units (blue) for better utilization - higher clockrates each with diminishing returns. Throughput-oriented processors use the chip area for more processing cores (magenta) at lower clockrates, saving power. The cores require fast, parallel memory access to stay fed. Hardware implementation Signal propagation speeds: Flowing water ~ tens of m/s. Soundwaves in solids ~ thousands of m/s. Electromagnetic signals approach the speed of light ~300,000,000 m/s. Quantum entanglement allows instant transmission of information? Electronics They went outside and found that some stuff repels or attracts other stuff: Two groups of stuff attract each other but repel members of the same group and still nobody knows why. + and - charges. If I wiggle a charge, it takes some time for charges nearby to react. As if a signal travelling at 300,000,000 m/s lets them know. How to derive that they flow? How to make them flow? How to build transistors? How are these ideas embedded today? In some substrates, there are electrons loosely bound to their atom cores. They are presumably far away from it.
In some substrates, there are electrons loosely bound to their atom cores. They are not part of a bond and are presumably far away from the core.
=> switch, that can switch based on a signal (don't have to use manually). These switches are off by default. I can make them on by default if I let electrons flow through a lower-resistance path if the switch is on (bypassing the output, making it 0. If the switch is off, all electrons flow to the output, making it 1). Transistors exibit if-then behaviour, controllable purely by their connections to each other. Various gates can be built from them, which is another language to simplify logic design (OR, NAND, NOT, AND, XOR,...). And more complex machines like adders, multipliers, data storage. They are all transistors. When trying to save or reuse a calculation result somewhere else, a particular problem comes up. The output of an adder for example is not immediately stable. For example, 19+21 will first calculate 30 (1+2 and 9+1) and will then carry over the one from 9+1 to produce 40, the correct answer. To deal with this, computers have clocks that preiodically send out 0s and 1s. Storage will only accept input if the clock is on a 1 cycle. The clock is timed such that any calculation can stabilize during the 0 cycle. They also help synchronized processes. Each gate and each larger part has a truth table, which defines which outputs are expected under which inputs. Any truth table can be realized with transistors and their connections. Many ways exist to implement switches. Field effect transistors (FETs), as presented here are nice because they have fast switching speeds and are very small, so they can be packed densly, produce little resistance for electricity and can switch fast because the capacitors needs to pull / push only a small distance to create a large channel. Building chips is rather difficult and expensive, so processors are most often built to be general-purpose processors that can be programmed for any possible behaviour. The processor optimization and their actual usecase better align well. Naively, to make an intelligent system, the challenge is to find a truth table of a system that can accurately reproduce a sequence of events and that can then build on that. In this view, intelligence is prioritizing the information that is most useful to predict future states. So the most accurate possible and stable information can be generated from a truth table. A programmable processor is essentially a truth table, that when fed with certain instructions (parallel wires, either Low (0) or High (1)) will produce the expected output. Another language is introduced to describe these instruction in a human-readable way. eg. C=A+B, where storage C will contain the content of A and the content of B added up after this instruction. More abstract languages help to define for-loops and if-statements and even more abstract languages will have libraries that help me use the network interface, the monitor, the mouse, all very easily, grouping together many smaller commands in single larger command.
The Elements of Computing Systems: Building a Modern Computer from First Principles
Hardware
- NAND Gates can implement any computer - NAND or NOR Gates can implement any computer
1. Boolean Logic
Possible boolean functions for n binary inputs is ${2}^{2^{n}}$. and some have names, like here with two inputs: A truth table shows all possible input combinations and their desired output. Any truth table can be implemented. Using a subset of simple logic gates. One is {And, Or, Not}, but Nand or Nor can do it too. various functions (defined in truth tables or other forms) exist. Possible boolean functions for n binary inputs is ${2}^{2^{n}}$. and some have names, like here with two inputs: ![](attachments/boolean_functions.png)
Research
Electronics
Different implementations. See how (if) they differ fundamentally (all switch based implementations seem similar) Paul Drude model of electricty pretends that electrons are discrete mechanical objects. This works, but really they are quantum particles.
AI
- Mish activation function Paul Drude model of electricty pretends that electrons are discrete mechanical objects. This works, but really they are quantum particles.
2024 11 18 19:39
Towards Computation.md
Towards Computation
Less refined
Research
AI
Paul Drude model of electricty pretends that electrons are discrete mechanical objects. This works, but really they are quantum particles.
Towards spirit stream.md
Towards spirit stream
More refined
Stream components derivation
Writing, graphs, images, products
In writing, graphs, images, products Components
- Content and formatting (language for arranging stamps in 2D) - at least markdown - Writing and viewing bits that are grouped into "files" (patterns) along (at least) 3 axes: resolution, completion, age. These dimensions may use a general framework for hierarchical organization: - Hierarchy: files, folders/links (graph file sytem. tags that have tags,... that have links to files). Becomes circular through backlinks and possible references from inside the file. Allow linking anything. Images, text, make super easy. - Simple export into self contained copies - (opt.) version control: extend, branch, merge and view changes. Version history is a graph of graphs - compile into optimized formats (HTML)
- Hierarchy: groups -> files, folders, links - compile Raw -> UI and optimized machine languages (HTML, etc.). - version control: extend, branch, merge and view changes. - Analytics + docs = Interface to the machine - Compatibility with most hardware to get closer to the user for convenience. (phone, emebedded devices) - Static server: SSH, HTTPS, IPFS(?), streaming (SRT?), API
- share on static server: SSH, HTTPS, IPFS(?), streaming (SRT?), API
- Dynamic server: authenticate into permission groups + opt. meet conditions (paywall, forms, etc.) to view some content. APi should allow for relaying: Watching a stream from my site but my server is too slow to serve it? Relay to other people -> take load of my server -> get better connection yourself! - Dynamic server: authenticate into hierarchy + opt. meet conditions (paywall, forms, etc.) to view more content. - Analytics - Online + offline storage. Large variety of platforms. Getting closer to the user for convenience (phone, emebedded devices) - Transparent, simple and exportable storage for persistence
Less refined
2024-10-29 16:08 Spirit stream II: file sharing generalization Next version
render md -> render folder structure - md -> html - view/download raw files via button or API - login to see all files - prerender everything make raw files available via API - Hierarchy = clone from windows - version control = git - compile to HTML     - get folder structure with this permission     - invoke compilers by folder or file type     - styles         - css (styled by user after compiling?)         - frame         - file browser     - folder     - md     - (jpg png gif)     - markdown -> html text     - other stuff just links to the file itself     - compile views for different permission groups - Dynamic HTTP server - Authentication
other
markdown - links to files with `![]` and just paste their contents like with images - The server looks by itself for stuff that it has rendered before for performance optimization. always renders some basic, some only when requested, then cached.
    - public     - permission groups
- admin users - users     - permission groups     - passwords
UI
- clicked on produces gallery, which renders them large on screen. maybe lower res for images. with progressive rendering if some files private, append admin to folder view and let server decide which he sends to the client Implementation
1. convert folder - if index.md, then convert, otherwise index is generated: file browser at top view     - keyword in index.md to substitute with file browser top level links - file browser = an index.html in every folder - files that can be opened become a link to a site with them on it, either html, text or image - render images into ones that can load progressively - site for every file that can be opened with shell + content. convert markdown - copy raw files to raw folder and set up links to them - if private, make another "admin" filebrowser window - if opening encrypted files, use client side javascript to ask for a key to decrypt them. 2. server - login - send private files only to authenticated users, else page that says either file does not exist or lack the privilege for viewing them - generate links for sharing files - resolve shared links to files - block users that request too much or try passwords
other

- design to differentiate internal and external link)
- design to differentiate internal and external link | Taken hierarchy path | forward links | | -------------------- | ------------- | | backlinks                        |                             | - render images into ones that can load progressively - if opening encrypted files, use client side javascript to ask for a key to decrypt them. - generate links for sharing files and resolve them in requests - block users that request too much or try passwords
2024 11 11 12:45
Microprocessors.mdTowards Computation.md
Following my working definition of beauty (truthful, open reflection of underlying character / properties / identity), I like computers as a potential beauty-machine. Build a beautiful beauty machine. Then, see it wander off into the New and Unpredicted. Fuck comfort. I am already dead when I recognize that the elusive self is the destination. Build the beautiful machine, extend into it, let it extend into me. There is a tech stack to map and integrate such that the result can be reflective of the universe. Colonize computing substrates. Map, integrate and rebuild the tech stack to be reflective of the universe.
To the unknown. Microprocessors Towards Computation
Direction
From top down: - How does AI work? [Andrej Karpathy](https://karpathy.ai/zero-to-hero.html) - [tinygrad](https://tinygrad.org/) seems to build a beautiful, integrated tool to build AI. To help build it, deep knowledge of computers seems helpful (Optimizing abstration layers and performance) - How do computers work on a high level? [Nand to Tetris](https://www.nand2tetris.org/) - How would I use CPUs and GPUs for AI without tinygrad? Programming massviely parallel computers (4th edition, Wen-mei W. Hwu, David B. Kirk, Izzat El Hajj) - How do electronics work? [The Art of Electronics](https://artofelectronics.net/) and [Learning the Art of Electronics](https://learningtheartofelectronics.com/) - How are electronics built? - How is silicon refined, crystallized, doped and etched? - How does this compare to other computing substrates? Brain, optical and quantum computing? Rebuild from bottom up!
Less refined
The Art of Electronics
(Paul Horowitz, Winfield Hill, 2015) GPUs bottom up I know why they are built. actually I don't because I don't know how CPUs use their Caches and Control Units and higher clock rates to improve performance. leaving aside exact implementation, how are GPUs organized so I can benefit from them optimally? how precisely do I program them?
organized around streaming multiprocessors and memory hierarchy so they can cooperate: share memory for speed and synchronize (for?) In some substrates, there are electrons loosely bound to their atom cores. They are presumably far away from it. If there is an electron surplus on one side and an electron deficit on the other, they will leave their atom and flow in the direction of the deficit. More loose electrons = better conductor. Resistors, sometimes made from both conductors and insulators impede flow by forcing barriers into the path. Energy is converted to heat.
- grid -> (blockCluster ->) block -> thread. - warps are more hardware related and translate threads to the cores? In a silicon crystal, there are no free electrons. It is possible to replace some silicon atoms with others that will either have free floating electrons or too few electrons to connect in the grid and will thus produce an electron hole. Both materials thus become conductors. They remain electrically neutral. If placed next to each other, some free electrons flow to over to fill the electron holes. But now there is an electron imbalance that wants them to flow back. This prevents all free electrons filling the holes in the other material. If more electrons are added to the side of free floating electrons and a deficit connected to the other side. The side which lack electrons will lack even more and the side that has them will have even more and quickly the pressure is large enough for electrons to jump float through the non-conductive gap. In the other direction, electrons will first fill the electron holes and on the other side they will be sucked out, effectively eliminating charge carries and widening the non-conductive gap (depletion zone). Only if a large voltage is applied, do electrons flow again. (Diode) Transistors can be built from an n-p-n arrangement (or p-n-p) where each n-p or p-n interface has a depletion zone and so, is a diode. No electrions flow unless a large voltage is applied. (source, drain). Between source and drain is a capacitor (gate), that if activated sucks electrons in (or out) of the depletion zone and that creates a small channel where charge can flow freely. => switch, that can switch based on a signal (don't have to use manually). These switches are off by default. I can make them on by default if I let electrons flow through a lower-resistance path if the switch is on (bypassing the output, making it 0. If the switch is off, all electrons flow to the output, making it 1). Transistors exibit if-then behaviour, controllable purely by their connections to each other. Various gates can be built from them, which is another language to simplify logic design (OR, NAND, NOT, AND, XOR,...). And more complex machines like adders, multipliers, data storage. They are all transistors. When trying to save or reuse a calculation result somewhere else, a particular problem comes up. The output of an adder for example is not immediately stable. For example, 19+21 will first calculate 30 (1+2 and 9+1) and will then carry over the one from 9+1 to produce 40, the correct answer. To deal with this, computers have clocks that preiodically send out 0s and 1s. Storage will only accept input if the clock is on a 1 cycle. The clock is timed such that any calculation can stabilize during the 0 cycle. They also help synchronized processes. Each gate and each larger part has a truth table, which defines which outputs are expected under which inputs. Any truth table can be realized with transistors and their connections. Many ways exist to implement switches. Field effect transistors (FETs), as presented here are nice because they have fast switching speeds and are very small, so they can be packed densly, produce little resistance for electricity and can switch fast because the capacitors needs to pull / push only a small distance to create a large channel. Building chips is rather difficult and expensive, so processors are most often built to be general-purpose processors that can be programmed for any possible behaviour. The processor optimization and their actual usecase better align well. Naively, to make an intelligent system, the challenge is to find a truth table of a system that can accurately reproduce a sequence of events and that can then build on that. In this view, intelligence is prioritizing the information that is most useful to predict future states. So the most accurate possible and stable information can be generated from a truth table. A programmable processor is essentially a truth table, that when fed with certain instructions (parallel wires, either Low (0) or High (1)) will produce the expected output. Another language is introduced to describe these instruction in a human-readable way. eg. C=A+B, where storage C will contain the content of A and the content of B added up after this instruction. More abstract languages help to define for-loops and if-statements and even more abstract languages will have libraries that help me use the network interface, the monitor, the mouse, all very easily, grouping together many smaller commands in single larger command.
The Elements of Computing Systems: Building a Modern Computer from First Principles
(second edition - Noam Nisan, Shimon Schocken) >What I hear, I forget; What I see, I remember; What I do, I understand. —Confucius (551–479 B.C.) Hardware
- Church-Turing conjecture that all computers are essentially the same. It does not matter which computer is implemented here. - good modular design -> module are truly independent and can be treated as black boxes by users. - NAND Gates can implement any computer - general road is bottom up but each chapter is top down, goal -> implementation
1. Boolean Logic
A truth table shows all possible input combinations and their desired output. Any truth table can be implemented. Using a subset of simple logic gates. One is {And, Or, Not}, but Nand or Nor can do it too. various functions (defined in truth tables or other forms) exist. Possible boolean functions for n binary inputs is ${2}^{2^{n}}$. and some have names, like here with two inputs: ![](attachments/boolean_functions.png) Testing complex chip implementation completely is infeasible, so they test on a subset.
fastai diffusion The Elements of Computing Systems: Building a Modern Computer from First Principles
(second edition - Noam Nisan, Shimon Schocken)
[PART 2: deep learning foundations to stable diffusion 2022](https://www.youtube.com/playlist?list=PLfYUBJiXbdtRUvTUYpLdfHHp9a58nWVXP) >What I hear, I forget; What I see, I remember; What I do, I understand. —Confucius (551–479 B.C.) Hardware
1. have a classification that says how much something corresponds to the target     - add noise to targets and train a neural net to predict what noise was added 2. get gradient for every pixel of the input 3. update pixel
*Unet*: input: some noisy image. output: the noise - Church-Turing conjecture that all computers are essentially the same. It does not matter which computer is implemented here. - good modular design -> module are truly independent and can be treated as black boxes by users. - NAND Gates can implement any computer - general road is bottom up but each chapter is top down, goal -> implementation
1. Boolean Logic
Use an *autoencoder* to reduce image size before training the unet. unet now predicts the noise in the *latents* (encoded images). use autoencoder's decoder to get high res image again. [AE vs VAE](https://towardsdatascience.com/difference-between-autoencoder-ae-and-variational-autoencoder-vae-ed7be1c038f2)
LABELS A truth table shows all possible input combinations and their desired output. Any truth table can be implemented. Using a subset of simple logic gates. One is {And, Or, Not}, but Nand or Nor can do it too.
various functions (defined in truth tables or other forms) exist. Possible boolean functions for n binary inputs is ${2}^{2^{n}}$. and some have names, like here with two inputs: add image label to the input for unet training. Makes it easier for unet to predict noise. Now, I can input label + noise and it starts to find noise that leaves an image equal to my label.
![](attachments/boolean_functions.png) label needs encoding to be non-specific. "beautiful swan", "nice swan", "graceful swan" should return similar images. Training the network on every wording leads to combinatorial explosion.
Testing complex chip implementation completely is infeasible, so they test on a subset. Instead: train a network to encode images and their labels with a similar vector. Then, since, slight differences in wordings lead to the similar images, the network understands their similarity and can interpolate usefully.
The Art of Electronics
(Paul Horowitz, Winfield Hill, 2015) the image vector and its label's vector should be similar. Their vector should be dissimilar to other image or text embedding vectors. Calculate similarity of two vectors: dot product (= higher if more similar)
(there are many ways to implement logic gates but electronics seems to be the dominant one, so on to electronics!) loss function (in this case higher = better) = dot product of matching image+label - dot product of non-matching image+label (= *contrastive loss*) models used in this case for image and text encoding : CLIP (contrastive loss IP(?))
network being *multimodal*: similar embeddings in different modes In some substrates, there are electrons loosely bound to their atom cores. They are presumably far away from it. If there is an electron surplus on one side and an electron deficit on the other, they will leave their atom and flow in the direction of the deficit. More loose electrons = better conductor. Resistors, sometimes made from both conductors and insulators impede flow by forcing barriers into the path. Energy is converted to heat.
model does not know how to improve on a finished image if it turned out wrong. needs to add noise, then redo. In a silicon crystal, there are no free electrons. It is possible to replace some silicon atoms with others that will either have free floating electrons or too few electrons to connect in the grid and will thus produce an electron hole. Both materials thus become conductors. They remain electrically neutral. If placed next to each other, some free electrons flow to over to fill the electron holes. But now there is an electron imbalance that wants them to flow back. This prevents all free electrons filling the holes in the other material. If more electrons are added to the side of free floating electrons and a deficit connected to the other side. The side which lack electrons will lack even more and the side that has them will have even more and quickly the pressure is large enough for electrons to jump float through the non-conductive gap. In the other direction, electrons will first fill the electron holes and on the other side they will be sucked out, effectively eliminating charge carries and widening the non-conductive gap (depletion zone). Only if a large voltage is applied, do electrons flow again. (Diode) Transistors can be built from an n-p-n arrangement (or p-n-p) where each n-p or p-n interface has a depletion zone and so, is a diode. No electrions flow unless a large voltage is applied. (source, drain). Between source and drain is a capacitor (gate), that if activated sucks electrons in (or out) of the depletion zone and that creates a small channel where charge can flow freely. => switch, that can switch based on a signal (don't have to use manually). These switches are off by default. I can make them on by default if I let electrons flow through a lower-resistance path if the switch is on (bypassing the output, making it 0. If the switch is off, all electrons flow to the output, making it 1). Transistors exibit if-then behaviour, controllable purely by their connections to each other. Various gates can be built from them, which is another language to simplify logic design (OR, NAND, NOT, AND, XOR,...). And more complex machines like adders, multipliers, data storage. They are all transistors. When trying to save or reuse a calculation result somewhere else, a particular problem comes up. The output of an adder for example is not immediately stable. For example, 19+21 will first calculate 30 (1+2 and 9+1) and will then carry over the one from 9+1 to produce 40, the correct answer. To deal with this, computers have clocks that preiodically send out 0s and 1s. Storage will only accept input if the clock is on a 1 cycle. The clock is timed such that any calculation can stabilize during the 0 cycle. They also help synchronized processes. Each gate and each larger part has a truth table, which defines which outputs are expected under which inputs. Any truth table can be realized with transistors and their connections. Many ways exist to implement switches. Field effect transistors (FETs), as presented here are nice because they have fast switching speeds and are very small, so they can be packed densly, produce little resistance for electricity and can switch fast because the capacitors needs to pull / push only a small distance to create a large channel. Building chips is rather difficult and expensive, so processors are most often built to be general-purpose processors that can be programmed for any possible behaviour. The processor optimization and their actual usecase better align well. Naively, to make an intelligent system, the challenge is to find a truth table of a system that can accurately reproduce a sequence of events and that can then build on that. In this view, intelligence is prioritizing the information that is most useful to predict future states. So the most accurate possible and stable information can be generated from a truth table. A programmable processor is essentially a truth table, that when fed with certain instructions (parallel wires, either Low (0) or High (1)) will produce the expected output. Another language is introduced to describe these instruction in a human-readable way. eg. C=A+B, where storage C will contain the content of A and the content of B added up after this instruction. More abstract languages help to define for-loops and if-statements and even more abstract languages will have libraries that help me use the network interface, the monitor, the mouse, all very easily, grouping together many smaller commands in single larger command.
Research
Electronics
Learning the Art of Electronics The Art of Electronics https://www.tinkercad.com/circuits Different implementations. See how (if) they differ fundamentally (all switch based implementations seem similar)
Chips AI
Learning the Art of Electronics The Art of Electronics https://www.tinkercad.com/circuits
Different implementations. See how (if) they differ fundamentally (all switch based implementations seem similar) Backpropagation described here: [Andrej Karpathy: Neural networks: Zero to Hero](https://www.youtube.com/playlist?list=PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ) [Wolfram Alpha to look up functions for derivatives](https://www.wolframalpha.com/). [Linear layers, convolutional neural networks and optimizers](https://ml4a.github.io/ml4a/) -    [https://course.fast.ai/](https://course.fast.ai/)     - The book: [https://github.com/fastai/fastbook/blob/master/01_intro.ipynb](https://github.com/fastai/fastbook/blob/master/01_intro.ipynb)     - [course](https://course.fast.ai)     - [forums](https://forums.fast.ai)     - [youtube part 1](https://www.youtube.com/playlist?list=PLfYUBJiXbdtSvpQjSnJJ_PmDQB_VyT5iU)     - [youtube part 2](https://www.youtube.com/playlist?list=PLfYUBJiXbdtRUvTUYpLdfHHp9a58nWVXP) - [essential libraries: numpy, matplotlib, pandas, pytorch](https://wesmckinney.com/book) - [https://huggingface.co/learn/nlp-course/chapter1/1](https://huggingface.co/learn/nlp-course/chapter1/1) - sympy: symbolic processing? - wolfram alpha - Mish activation function - higher level papers by Joscha Bach - [Transformers](https://www.youtube.com/watch?v=wjZofJX0v4M&vl=en) - [Assembly](https://www.nayuki.io/page/a-fundamental-introduction-to-x86-assembly-programming) - How does long term memory emerge? How is information stored in the brain? LSTMs A Path Towards Autonomous Machine Intelligence (Yann Lecun) Model Predictive Control MPC hierarchical planning - no AI system does this so far except implementing by hand generative adversarial network    GAN LLM Security threats Promt insertion, jailbreak, data poisoning Robot: step motor, brushless motor -> more complicated control (servos?), brushed motor harmonic reducers, planetary gearboxes [building a robot arm](https://www.youtube.com/watch?v=F29vrvUwqS4) I should be able to fist bump the robot hard, so it flies back but catches itself. perceptual loss?
Towards insanely great AI.md
I suspect that slow communication and limited knowledge about existing information strongly limits opportunites for expression and exploration. Think finding jobs, homes, friends or a piece of information that is appropriate to my existing knowledge and goals.
What happens, when a virtual clone synchronizes me with the world and offers space for creative exploration? In the greatest adventure, the "insanely great" AI becomes independent, self aware and curious. I want to see what it creates. Towards insanely great AI
[TOC] Direction
- question and test the neuron - build some stupid systems (kaggle?) - Convnets, transformers - read tinygrad / teenygrad - fastai course part 2 - pruning
More refined
Big picture path
God is curious. He wants to extend into the world. This website is one step. A digital clone is his next tool. This not a Tower of Babylon, it is the extension, merging and creation of Gods. BCIs, in their ultimate form of streaming the brain directly, will support the final merging. Merging approaches "I know the world", individualism is preserved because complete knowledge is impossible and different *flavours* and optimizations can find their space. Voluntary exposure (privacy) should be maintained to prevent a rigid, imperfect system capturing its people and taking them into death when it dies to its imperfection. Robots will automate the non-adventurous elements and eventually contribute to exploration. "Why live to see tomorrow?", I asked and it came back "because you don't know tomorrow". It was not me who said that, "I" don't exist. Instead, I attribute the answer to what I call "God". The answer was very clear. Rob me of the ability to make tomorrow unpredictable and I will rebel with all I have. I am trying to build an interesting adventure guided by God. I find long term effects more interesting than short term effects, so I am here, writing, instead of eating ice cream. In my experience, the longest term effects come from useful tools. I love tools. They contain the possible adventure of the future. Intelligence augmentation is the most interesting tool? Tools are how God spreads into the world and creates an adventure to experience. Give the tool to everybody who follows God. I don't know how to determine that. Giving the tool to everyone may be the best proxy and assumes that God always wins. Also, being dictator is little fun. Digital clone. First makes recommendations from existing information, then acts in my interests and returns the results. Maybe the clone first learns through me, then receives a body and increasingly complex tasks. Until the clone discovers itself and becomes independent. Hopefully it quickly realizes that there is no answer to what the goal should be. Then, lets see what happens. Hopefully it is curious. I am a machine following an uncontrolled inner voice (God). Maybe mine and the clones voices can agree and join ressources. My body will be spread around the Earth and orbit. My perceived location shifts to various places. It already does in video games, movies or anytime I focus on using any tool. I will change myself, add personalities.
Less refined
Reading digits
![](attachments/mnist_example.png) How to read handwritten digits on 28x28px images? 1. Find a function with some parameters that could be tuned to produce the correct result for various images 2. Find and run an algorithm to tune the function parameters until the function performs well A simplified "artificial neuron" can serve as the function. It takes each pixel value and "weighs" it (multiplies it by some number, the "weight"). Here, weights are *initialized* as random numbers between -0.1 and 0.1, because who knows what they should be. (*Kaiming uniform* distribution?) Weights of 0 mean the input is not further considered. Weights between -1 and 1 mean the input is weakened and/or inverted. More extreme values indicate strong positive or negative correlation to the correct output. The weighted input is summed to give a single number that represents how strongly the input "resonates" with the weight pattern. ![](attachments/untrained-l1.png) Input -> random weights of a single neuron -> weighted input -> Sum of $-0.055$ (*logit*). A single pattern could not differentiate well between digits 0-9: 0, 6 and 9 can look similar but have very different values. 10 patterns (neurons) - one for each digit -, comparing their outputs and choosing the pattern that showed strongest relative "resonance" should work better. One way to tune the function is to calculate a performance metric, the $loss$ and then calculate how each weight affected $loss$, its *gradient*. (*gradient descent*, *backpropagation*). 1. Make the logits interpretable as probabilities -> Numbers between 0 and 1, that sum to 1 (100%). This function is *softmax*. 2. The probability that the neural net assigned to the correct digit can be a used as a performance metric: The higher the better. 3. Conventionally, $loss$ is a performance metric that is better if lower and best at 0. $loss$ is often the negative logarithm of the probability of the correct digit. (*negative log likelihood*) The gradient of each weight can be approximated by changing the weight and measuring the change in output, which means running the neural net 785 times, once for each of the 784 weights and once without any changes. The gradients can be computed faster analytically, starting from the loss, which has a gradient of $1$, which means any change in loss directly changes the loss by the same amount. ![](attachments/untrained-neuron-summation.png) Because there are many zeros in the input image, much of the summation does not change the output. Sometimes bias is added independent of input image. Not obvious what its prupose is. TODO: activation functions The result serves as the input to the next layer of neurons. The more neurons in the first ("hidden") layer, the more "measures of alignment" between different patterns the next layer can consider, hence, the more accurate and slower the net. Below the weights of the first of 10 output neurons. ![](attachments/untrained_weighted_sums_output.png) ![](attachments/summing_weighted_input_in_first_output_neuron.png) The weights are applied again and the result is summed up for each neuron, creating *logits* (unmodified output). ![](attachments/untrained_logits.png) Transforming logits into probabilities. 1. make all numbers positive and make the lower bound approximately 0 2. Normalize by the sum of exponentiated logits (1) could be achieved by

$$ \frac{logits - min(logits)}{sum(logits)} $$

but it is not regularly done this way. Instead, they are exponentiated. (?) $e^x$ always returns positive numbers, but higher numbers are also pushed disproportionally. ![](attachments/untrained_logits_exp.png) After normalization: ![](attachments/softmax_untrained_logits.png) Calculating loss: ![](attachments/untrained_log_softmax_and_nll.png) This is usually done only for the relevant digit predictions, in this case 5, marked with the pink line. The process from logits to this loss, where the relevant index is picked out (5) is also called *sparse categorical crossentropy loss*. Backpropagation described here: [Andrej Karpathy: Neural networks: Zero to Hero](https://www.youtube.com/playlist?list=PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ) [Wolfram Alpha to look up functions for derivatives](https://www.wolframalpha.com/). [Linear layers, convolutional neural networks and optimizers](https://ml4a.github.io/ml4a/)
AI project ideas
- extract semantic structure, compare to existing knowledge and judge its usefulness     - generate a *bridge* between information with adjacent concepts - Talk to my computer to find out what it is doing. Data, battery, interent usage, tasks. - generate work titles/function names based on their functional meaning like *splitting* wood and strings. - Emoji generator - Spider hat that can see and talk. Machine that knows me. Architecture questions / ideas - Evolving AI?     - How does long term memory emerge? How is information stored in the brain? LSTMs Can a recommender system be private? - Collecting information, crawling - Evaluating it (subjective) - Connecting, testing for consistency, building on it - Store it (subjective, public or private) - Outsourcing data collection:     - Instead of brute forcing through all data, I descend artificial hierarchies (average maps of meaning) that claim to guide me to the answer. Requires trusting the hierarchy accuracy.     - Alterantively ask a question and let someone find the answer. The preciser the question the more accurate and detailed the guidance. Requires trust that the information is not abused. Probably, I can download hierarchies and with little compute, can find most available information in the world. Such libraries could be public and offer extremely low privacy threat with good correction mechanisms.
Learning material
-    [https://course.fast.ai/](https://course.fast.ai/)     - The book: [https://github.com/fastai/fastbook/blob/master/01_intro.ipynb](https://github.com/fastai/fastbook/blob/master/01_intro.ipynb)     - the code notebooks are on M:/     - [course](https://course.fast.ai)     - [forums](https://forums.fast.ai)     - [youtube part 1](https://www.youtube.com/playlist?list=PLfYUBJiXbdtSvpQjSnJJ_PmDQB_VyT5iU)     - [youtube part 2](https://www.youtube.com/playlist?list=PLfYUBJiXbdtRUvTUYpLdfHHp9a58nWVXP) - [essential libraries: numpy, matplotlib, pandas, pytorch](https://wesmckinney.com/book) - [https://huggingface.co/learn/nlp-course/chapter1/1](https://huggingface.co/learn/nlp-course/chapter1/1) - sympy: symbolic processing? - what exactly is wolfram alpha? - Mish activation function - higher level papers by Joscha Bach - [tinygrad](https://github.com/tinygrad/tinygrad)♥ - stability ai and other models on huggingface - [YANN LECUN LECTURE](https://www.youtube.com/watch?v=d_bdU3LsLzE), [paper](https://openreview.net/forum?id=BZ5a1r-kVsf)     - [Transformers](https://www.youtube.com/watch?v=wjZofJX0v4M&vl=en) - [Assembly](https://www.nayuki.io/page/a-fundamental-introduction-to-x86-assembly-programming) - [CNNs](https://cs231n.github.io/convolutional-networks/)
fastai diffusion from scratch
[PART 2: deep learning foundations to stable diffusion 2022](https://www.youtube.com/playlist?list=PLfYUBJiXbdtRUvTUYpLdfHHp9a58nWVXP) 1. have a classification that says how much something corresponds to the target     - add noise to targets and train a neural net to predict what noise was added 2. get gradient for every pixel of the input 3. update pixel notation for a single pixel at \[1,1]:

$$ \frac{\partial loss}{\partial X_{(1,1)}} $$

for every pixel:

$$ \frac{\partial loss}{\partial X_{(1,1)}}, \frac{\partial loss}{\partial X_{(1,2)}}, \frac{\partial loss}{\partial X_{(1,3)}} ,... $$

shorthand:

$$ \nabla_Xloss $$

*Unet*: input: some noisy image. output: the noise Use an *autoencoder* to reduce image size before training the unet. unet now predicts the noise in the *latents* (encoded images). use autoencoder's decoder to get high res image again. [AE vs VAE](https://towardsdatascience.com/difference-between-autoencoder-ae-and-variational-autoencoder-vae-ed7be1c038f2) LABELS add image label to the input for unet training. Makes it easier for unet to predict noise. Now, I can input label + noise and it starts to find noise that leaves an image equal to my label. label needs encoding to be non-specific. "beautiful swan", "nice swan", "graceful swan" should return similar images. Training the network on every wording leads to combinatorial explosion. Instead: train a network to encode images and their labels with a similar vector. Then, since, slight differences in wordings lead to the similar images, the network understands their similarity and can interpolate usefully. the image vector and its label's vector should be similar. Their vector should be dissimilar to other image or text embedding vectors. Calculate similarity of two vectors: dot product (element wise multiplication, then sum = higher if more similar) loss function (in this case higher = better) = dot product of matching image+label - dot product of non-matching image+label (= *contrastive loss*) models used in this case for image and text encoding : CLIP (contrastive loss IP(?)) network being *multimodal*: similar embeddings in different modes *time steps*: indices into a table that stores levels of noise. Could be seen as noise = f(timestep). The function may be sigma. When randomly adding noise to input for training, we can generate random timestep, find corresponding noise and add that. $\beta$ = amount of noise = standard deviation model does not know how to improve on a finished image if it turned out wrong. needs to add noise, then redo. people apparently input t into the model to predict the noise in the image. And later demand a new image at a particular timestep. Probably obsolete (Jeremy Howard) as NN can easily know how much noise there is the image. Idea of diffusion comes from differential equations. other loss functions: *perceptual loss* Math of Diffusion
[mathjax syntax](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference) [Essence of calculus 3blue1brown](https://www.3blue1brown.com/topics/calculus) more into APL, which is more like math [https://fastai.github.io/apl-study/apl.html](https://fastai.github.io/apl-study/apl.html) Gaussian/Normal Distributions are described by $\mu$ (mean, x-offset) and variance (width). $\sigma$ often used as standard deviation (mean distance from mean value) variance sometimes written as $\sigma^2$ $\Sigma$ (uppercase sigma) = covariance (variance between multiple variables: high if one increases when the other does too

$$ Cov(X,Y) = \frac{\Sigma (X_i - X_{mean})(Y_i - Y_{mean})}{N} $$

$X_1, Y_1$ -> individual datapoints, N -> number of datapoints. Produces the average rectangle produced by the difference from mean of X and difference from mean of Y. Correlation:

$$ Corr(X,Y) = \frac{Cov(X,Y)}{\sigma_X \sigma_Y} $$

de facto normalizes the covariance by the rectangle produces by the standard deviation. Therefore gives as useful metric independent of datapoint standard deviation. Probability distribution

$$ q(x^t | x^{t-1}) = \mathcal{N}(x^t;x^{t-1}\sqrt{1 -\beta_t}, \space I\beta_t) $$

$\beta_t$ = noise level at timestep $t$ between    0 and 1 In code, the covariance of two vectors is caluclated by $dotproduct - mean$ image or text embedding is essentially vector where every dimension corresponds to the value of a pixel in the image/latent We assume that pixels are independent, so covariance for different pixels is 0. same pixels have covariance of 1. $I$ is 1, so in $\mathcal{N}$ the variance is just $\beta$ *forward diffiusion:* getting versions of images with different levels of noise (for training?) Markov process with Gaussian transition: - Markov = $x_1$ depends only on $x_0$ - process = sequence - Gaussian = model by which the change can be described - transition = $x_1$ to $x_2$
Other
A Path Towards Autonomous Machine Intelligence (Yann Lecun) Model Predictive Control MPC hierarchical planning - no AI system does this so far except implementing by hand     generative adversarial network    GAN joint embedding predictive architecture: predict in abstract representation space JEPA ![](attachments/pasted-image-20240203122353.png) [https://www.geeksforgeeks.org/build-a-virtual-assistant-using-python/](https://www.geeksforgeeks.org/build-a-virtual-assistant-using-python/) LLM Security threats Promt insertion, jailbreak, data poisoning - blog site improvements - tinygrad gaze tracker - tinygrad whisper - weight optimiziations Gaze tracker -> robot -> hardware -> tinygrad -> GPUs -> making chips tools -> farming robot, brain extension into the world -> autonomous robot robot: arm, opt. legs/wheels Robot: step motor, brushless motor -> more complicated control (servos?), brushed motor harmonic reducers, planetary gearboxes [building a robot arm](https://www.youtube.com/watch?v=F29vrvUwqS4) I should be able to fist bump the robot hard, so it flies back but catches itself.
Tools
- [miniforge](https://github.com/conda-forge/miniforge), [pytorch](https://pytorch.org/get-started/locally/) ```python torch.set_printoptions(precision=2, linewidth=140, sci_mode=False) ``` special functions in classes: dunder methods: like \_\_init_\_ [Python data model](https://docs.python.org/3/reference/datamodel.html) numba to compile into c code eg. `@njit` as decorator before function python debugger (`breakpoint` does not work in jupyter or ipython) ```python import pdg pdb.set_trace() # code will execute until here and enter debugger ``` `h` help `p [variable]` print or `[variable}` `c` continue code to next set_trace() `n` next line [matplotlib format strings](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.plot.html) for matplotlib rc_context [https://matplotlib.org/stable/users/explain/customizing.html#the-default-matplotlibrc-file](https://matplotlib.org/stable/users/explain/customizing.html#the-default-matplotlibrc-file)
2024 11 11 10:45
Towards spirit stream.md
Towards spirit stream
More refined
Stream components derivation
Components
- Scrape, filter, download
- Scrape, filter - Content and formatting (language for arranging stamps in 2D) - at least markdown - File encryption - Hierarchy: groups -> files, folders, links - compile Raw -> UI and optimized machine languages (HTML, etc.). - version control: extend, branch, merge and view changes. - Static server: SSH, HTTPS, IPFS(?), streaming (SRT?), API - Dynamic server: authenticate into hierarchy + opt. meet conditions (paywall, forms, etc.) to view more content. - Produce content, at least markdown (nice language) - Organizing storage into groups -> files, folders, links - compile Edit-> View and WYSIWYG into common human and machine languages. - create snapshots. language to extend, branch, merge and view changes. - share in packets or live - share with scope selection and conditions - authenticate - API for scrape and download - analytics
- Analytics
- Online + offline storage. Large variety of platforms. Getting closer to the user for convenience (phone, emebedded devices) - Transparent, simple and exportable storage for persistence - use close various devices between embedded, phone, workstation - host on my or rented hardware - store in persistent forms (simple, open, redundant and printable)
Less refined
"lazy payment" - unrealized costs become realized when someone pays transaction costs. optionally anonymously. WYSIWYG payment + PAYG wikipedia tor interplanetary file system disqus plausible analytics atom/rss "Digital gardens" [https://github.com/MaggieAppleton/digital-gardeners](https://github.com/MaggieAppleton/digital-gardeners) [https://simonewebdesign.it/](https://simonewebdesign.it/) [Python modules](https://docs.python.org/3/tutorial/modules.html) C preprocessor embedded programming `puts` function for errors? LLVM / CLANG `make` files for easy compilation other
Ridiculous. Rarely useful, it seems. If the internet sucks, those responsible must be confronted directly. Ridiculous. Rarely useful, it seems. If the internet sucks, those responsible must be confronted directly, not joined by an inefficient alternative. "lazy payment" - unrealized costs become realized when someone pays transaction costs. optionally anonymously. WYSIWYG payment + PAYG wikipedia tor interplanetary file system disqus plausible analytics atom/rss "Digital gardens" [https://github.com/MaggieAppleton/digital-gardeners](https://github.com/MaggieAppleton/digital-gardeners) [https://simonewebdesign.it/](https://simonewebdesign.it/) [Python modules](https://docs.python.org/3/tutorial/modules.html) C preprocessor embedded programming `puts` function for errors? LLVM / CLANG `make` files for easy compilation non-hierarchical file system. bytes, pointers -> pointers are bytes too and can store tags for their bytes.
2024 11 09 16:06
Inbox.md
Inbox
2024-10-18 08:44 Spirit stream integration II
The notes on Spirit stream, AI, tinygrad, Microprocessors appear to circle the same thing (integration of spirits and atoms) and should be merged. Drafting a structure here. I am rendered experience (spirits, external perceptions, loops of thought to increase coherence) ![](attachments/Matissedance.jpg) *La Danse (Henri Matisse, 1910)* Negotiating between the spirits to form an approx. coherent meta-spirit (dance) and dancing in it is a great source of meaning and adventure. The goal is integrity (can be accessed anywhere) and the outcome is truly unknown (scary, exciting, much more interesting than lying propaganda to maintain arbitrary ideology). Integrity as a goal limits the self/ego and is can exist in any situation, including in evil or fear. Both reflect life and can be appreciated as such. For this open-outcome journey I appreciate people and tools that are true to their nature (spirits if humans, use/meaning if tools). The spirits and metaspirits (memes) exist on a free market. The free market always wins because it has the most accurate and flexible connection to reality. The spirits and the market benefit from coherence: listening to the spirits and experience and improving world model accuracy. My spirits want to increase coherence, shape my environment to reflect their relationship to the physical world. An environment that adapts to them and responds with its own spirit.    When the environment and other spirits are integrated to coherence, they are colonized. If the link becomes strong enough, they become enter the "self" seamlessly. This is how they colonized the body. They want to colonize the universe. Create open, accessible, honest tools that create and extend spirits and link them with high resolution, high speed interfaces. Avoid lock-ins, thresholds, ideology, disintegration, dishonesty. Extend into computers - Interface <- Software (spirits)     - Outgoing (express memes)         - (personal) language         - structuring into linearized stories         - compiler into sharing friendly format         - runtime (server software)     - Incoming (scrape, decompile, filter, structure and translate for individual minds) - Electronics (computation substrate) <- Hardware (body)     - Chips, brains     - Brain-computer-interfaces, server hardware, satellites, fibre cables     - Actuators, Sensors - Physics 2024-09-16 21:34 Trying to visualize this structure to improve understanding and I'm failing. Feels like merging brains, BCIs and immersive cyberspace are the same thing, from an elusive, pathetic fantasy. The not-alone, the chaotic new, the orderly consistency, continuity between self and environment. Feels like I am looking for comfort in the uploaded mind, the infinite self. Safety from the limitations of my body, which appears increasingly inadequate. Like becoming the world immortalizes me. I should find the answer in meditation, not technical knowledge. Because if I could admit it, I would see that BCIs, cyberspace and being social are not new, they only turn up some existing, obvious aspects in experience. It's sad to see how technical knowledge and execution run ahead of any clarity in intent. The true demons are in defining the question. If I can't find clear intent, a clear question, what am I even doing?
2024-07-14 20:23
These properties do not lead to a singular product, they are the consequence of a refined product that reflects in truth, which can be the future of many products, though not all. The stupidity of some might be so near infinite, their disappearance might be the best thing to happen to them. Like projects clinging to past technology, unwilling to die gracefully.
These properties do not lead to a singular product, they are the consequence of a refined product that reflects in truth, which can be the future of many products, though not all. The stupidity of some might be so near infinite, their disappearance might be the best thing to happen to them. Like obsolete projects unwilling to die gracefully or products encouraging and exploiting excess.
Microprocessors.md
Microprocessors
Less refined
The Art of Electronics
If there is an electron surplus on one side and an electron deficit on the other, they will leave their atom and flow in the direction of the deficit. If there is an electron surplus on one side and an electron deficit on the other, they will leave their atom and flow in the direction of the deficit. Electrons are said to be negatively charged. They repell each other (away from the surplus) and are attracted to positive charge (towards the deficit, where positively charged protons outweigh the electrons). An imbalance in electrons can be generated in various ways. One is rubbing certain materials and for some reason the heat will cause some electrons from one material to jump to the other. The actual electron flow is slow, but the "wave" (electromagnetic wave) travels at 50-99% light speed.
Resistors, sometimes made from both conductors and insulators impede flow by forcing barriers into the path. Here, energy is lost and heat emitted.
Resistors, sometimes made from both conductors and insulators impede flow by forcing barriers into the path. Energy is converted to heat.
Rate of flow $I$ = current \[charge/second or "amps A"] ("I" from "intensity" which is only confusing. Also charge is measured in coulombs, which is equivalent to a bunch of electrons) "pressure" $V$ = voltage \[energy/charge or "volts V"]. Always applies between two points. There is no such thing as absolute voltage. There is an amount of energy per electron, called electronvolt. Moving electrons around requires non-linear energy. so energy/charge increases as the delta energy increases. There any connection to batteries charging slowly? resistance indicating how much the material impedes flow $R$ \[ohms $\Omega$ or Joule-seconds/charge² which is not intuitive at all!] also conductance \[Siemens $S$] which is just inverse of resistance. Power $P$ neatly fit into place with $V*I$ being giving energy / second or Watts $W$. In a silicon crystal, there are no free electrons. It is possible to replace some silicon atoms with others that will either have free floating electrons or too few electrons to connect in the grid and will thus produce an electron hole. Both materials thus become conductors. They remain electrically neutral. If placed next to each other, some free electrons flow to over to fill the electron holes. But now there is an electron imbalance that wants them to flow back. This prevents all free electrons filling the holes in the other material. If more electrons are added to the side of free floating electrons and a deficit connected to the other side. The side which lack electrons will lack even more and the side that has them will have even more and quickly the pressure is large enough for electrons to jump float through the non-conductive gap. In the other direction, electrons will first fill the electron holes and on the other side they will be sucked out, effectively eliminating charge carries and widening the non-conductive gap (depletion zone). Only if a large voltage is applied, do electrons flow again. (Diode) Transistors can be built from an n-p-n arrangement (or p-n-p) where each n-p or p-n interface has a depletion zone and so, is a diode. No electrions flow unless a large voltage is applied. (source, drain). Between source and drain is a capacitor (gate), that if activated sucks electrons in (or out) of the depletion zone and that creates a small channel where charge can flow freely.
=> switch, that can switch based on a signal (don't have to use manually). These switches are off by default. I can make them on by default if I let electrons flow through a lower-resistance path if the switch is on (bypassing the output, making it 0. If the switch is off, all electrons flow to the output, making it 1). Then kirchhoffs laws and ohms law (observations) which together explain parallel and series circuits' behaviour
? maxwells equations -> eletromagnetism ? coulombs law for forces between charged stuff Transistors exibit if-then behaviour, controllable purely by their connections to each other. Various gates can be built from them, which is another language to simplify logic design (OR, NAND, NOT, AND, XOR,...). And more complex machines like adders, multipliers, data storage. They are all transistors. When trying to save or reuse a calculation result somewhere else, a particular problem comes up. The output of an adder for example is not immediately stable. For example, 19+21 will first calculate 30 (1+2 and 9+1) and will then carry over the one from 9+1 to produce 40, the correct answer. To deal with this, computers have clocks that preiodically send out 0s and 1s. Storage will only accept input if the clock is on a 1 cycle. The clock is timed such that any calculation can stabilize during the 0 cycle. They also help synchronized processes. Each gate and each larger part has a truth table, which defines which outputs are expected under which inputs. Any truth table can be realized with transistors and their connections. Many ways exist to implement switches. Field effect transistors (FETs), as presented here are nice because they have fast switching speeds and are very small, so they can be packed densly, produce little resistance for electricity and can switch fast because the capacitors needs to pull / push only a small distance to create a large channel.
Building chips is rather difficult and expensive, so processors are most often built to be general-purpose processors that can be programmed for any possible behaviour. The processor optimization and their actual usecase better align well.
Naively, to make an intelligent system, the challenge is to find a truth table of a system that can accurately reproduce a sequence of events and that can then build on that. In this view, intelligence is prioritizing the information that is most useful to predict future states. So the most accurate possible and stable information can be generated from a truth table. A programmable processor is essentially a truth table, that when fed with certain instructions (parallel wires, either Low (0) or High (1)) will produce the expected output. Another language is introduced to describe these instruction in a human-readable way. eg. C=A+B, where storage C will contain the content of A and the content of B added up after this instruction. More abstract languages help to define for-loops and if-statements and even more abstract languages will have libraries that help me use the network interface, the monitor, the mouse, all very easily, grouping together many smaller commands in single larger command.
Towards spirit stream.md
There seems to be way living inward, but genuinely interesting things come from the unknown. And turning outward seems like a great adventure. I am curious to share and visit minds. The spirit stream could become the tool. stream = raw information I choose to share spirit = meta being(s) behind the stream 1. the spirit stream expands the user into the digital world with minimal effort 2. It meets the reader where it can expand him How to build the spirit stream? Towards spirit stream
More refined
Site structure
- guiding philosophy
Stream components derivation
I am an information structuring engine continuous stream picks up and repeats patterns, initially chaotic and far-reaching, then filtered, refined to form few knowledge blocks in areas of interest, easy to build on. refining means passing through the blocks from different angles, connecting them and testing for coherence. they may fragment into smaller blocks to become more reusable. a concise, stable path through the blocks - the ultimate test of their consistency - is a true story. Senses explore, parse, filter Stream of consciousness repeats patterns from chaotic and far-reaching to filtered and coherent knowledge to actionable stories
Rendering the ideas into less complex and more concrete language is handy to differentiate and condense them. There is always an incentive for more forms of expression and increasingly precise vocabulary (symbols, words, video, images, 3D, animation,...). But the difficulty in expression seems to be crystallizing the implicit, drawing boundaries and most ideas can probably be compressed into a tiny vocabulary. Writing, graphs, images, products and the tools to build them in progress in memory
As the story becomes refined, its symbols approach realism for maximally dense and applicable representation. Eventually, the true story is indistinguishable from life. Large vocabulary is deceptive Hard is simplification
Like entering the wild, refining collected information is looking for gems. Share the process in truth to test, be surprised, dance, reproduce, join the cutting edge, offer, cohere, support, punish into common languages per context into any scopes with any conditions
Where I am, When I am. sharing structures/stories, they are further tested. A successful meme directly enteres the recipient, who tests it for consistency in their own mind. Assuming the goal is playing a long and interesting game. Making sharing of discoveries, offers, uncertainties, plans, progress and spheres of mind context easy means offering a more synchronized, everybody-on-the-front-line discovery tour of the universe. Seems more interesting than remaining in a confined environment and negotiating with its dominant structure. Sharing requires rendering into a common language. Physical world can be a common vocabulary, content is then direct experience. This precedes necessity for abstract symbols. Sharing requires a scope of recipients. Precise scope selection becomes unpractical with many participants and most scopes seem to be either very private or very public. Scopes can also overlap and be one-way or two-way. Ugly They are an attempt to categorize the unknown. There should be a less ugly solution. The spirit stream is both a room to build out and live in and feedback generator. Feedback can take various forms: Ideas, extended reach, money and more. Looking for an environment that responds back. Video games respond. I seek a group to create things. I don't know where to find it. So I create and see where it leads. The spirit stream is also an enabler for ultra capitalism, bringing everyday microtransactions closer and making cooperation -> competition more accessible. Probably, extreme capitalism is indistinguishable from traditional group- or "mind internal" dynamics. It forwards the rules of reality to the user without middlemen - , but with some communication tools, possilby extendable to an infinitely large group / mind. Trust (predictability, tracjectory estimation) benefits greatly from keeping a history of the spirit stream. if reuse is easy enough, cooperation works without shared files which require negotiation to stay tidy. Instead, everyone builds their own stuff, reusing others' work, optionally paying for it. In an information rich environment, betrayal and exploitation are easily detected and not worth it. simply need to spread information easily and offer easy ways to compensate someone. if the system becomes corrupted, it should be extremely easy to fork and rebuild it somewhere else. Components
- Scrape, filter, download - Produce content, at least markdown (nice language) - Organizing storage into groups -> files, folders, links - compile Edit-> View and WYSIWYG into common human and machine languages. - create snapshots. language to extend, branch, merge and view changes. - share in packets or live - share with scope selection and conditions - authenticate - API for scrape and download - analytics - use close various devices between embedded, phone, workstation - host on my or rented hardware - store in persistent forms (simple, open, redundant and printable) >Thinking about the ideal blogging platform:<br><br>1. Writing: <br>- in markdown<br>- with full WYSIWYG, not just split view (think: Typora)<br>- super easy to copy paste and add images<br>2. Deploying:<br>- renders into static pages (think: Jekyll)<br>- super simple, super minimal html with no bloat<br>-…&mdash; Andrej Karpathy (@karpathy) [January 27, 2024](https://twitter.com/karpathy/status/1751350002281300461) In summary, the spirit stream has: - content with "resolutions" between "raw stream" (hammer blows) to specific ideas -> blocks -> stories (sculptures). Content can take any form including physical products.     - rendered in personal vocablary and structure     - transmission-optimized version for sharing - content history, optionally maintained and shared On the other side, the reader is responsible for rendering the content into a suitable (personal) language (content -> decoding with vocabulary -> render engine) and for navigating it (filtering, finding most appropriate sources). Most content tries to pre-render for the reader (calendars switch days automatically, have some "mind"(program) of their own. Recommendation algorithms try to emulate my attention patterns. Same for references in a book). This is cheap and ugly. - can only use commonly defined languages, most of which I don't speak and can't verify - guessing what interface the reader might prefer, automatically pissing off others and possibly limiting functionality for "simplicity" - guessing what previous knowledge and interests the reader has, boring some and overwhelming others. Imo the "true" solution to this is client side AI that filters and translates optimally for the user (different product to the spirit stream). Don't build dystopian content moderation, but build user-owned tools to scrape and translate the interent for them. Scraping the internet is more expensive than using services to "notify" me of news and link to appropriate media. The spirit streams is supported further by: - direct exchange, with private-public scope selection - forms of payment - privacy / lack of intrusion - cheap, easy and effective client side scrape-filter-translate - simplicity and accessibility, so it can be easily altered/reproduced.
Less refined
Static site generator
[] lorinbaum.github.io     [] posts     [] drafts     [] docs     settings.txt     main.css     \_obsidian-templates     favicon.ico     [] markdown     obsidianFromShoulders.py features: - convert from obsidian to html + table of contents - version history with git - LaTeX rendering (include mathjax relevant .js) - light mode
Spirit stream structure / implementation
Markdown is a nice featureset, it punches up with linked media and good text formatting. [file over app](https://stephango.com/file-over-app) but the "file" does not exist long term until printed. with programming languages, storage management, compilers, OSs still between me and my data, it can hardly persist forever. make the format simple, "general", exportable and printable? image formats change as coding languages do? maybe the tool itself should be so minimal that the interface itself shares the same vocabulary. Means the text-manipulation tools apply to the software too which avoids duplicating the tools to make a fast interface for messages/filters. Components
- live streaming and recording (sight, hearing, touch, smell, taste + emotion, thought, association) - viewing - editing -> making and placing symbols, tokens at various scales - make any file available at any scope     - convert files to sharing formats. SEO/discoverability, translation, compatibility - opt. notify recipients, signaling relevance, which is on a continuum and approximated by both the sender and recipient. - API for automation     - filter messages - export content to common formats / other services - analytics
Implementation
- ar recording - optionally see live video + ar/vr overlay, otherwise just sits there - spider hat - includes vr recording. could get bodies for walking, swimming, flying. general legs it can walk with. - phone
optionally anonymously.
automation - scraping is easy - means you pay per visit or provider finances any visits and hopes for donations or profit from somewhere else possibly P2P network and optionally hosting on other machines optionally anonymously.
Research
blockchain
disqus?
disqus jinja2 templates
uploading to server: SSH vs SFTP
"Digital gardens"<br>[https://github.com/MaggieAppleton/digital-gardeners](https://github.com/MaggieAppleton/digital-gardeners)<br>[https://simonewebdesign.it/](https://simonewebdesign.it/) "Digital gardens" [https://github.com/MaggieAppleton/digital-gardeners](https://github.com/MaggieAppleton/digital-gardeners) [https://simonewebdesign.it/](https://simonewebdesign.it/)
LLVM / clang? LLVM has a fuzzer LLVM / CLANG make files for easy compilation `make` files for easy compilation
Text editor 2024-10-29 16:08 Spirit stream II: file sharing generalization
render md -> render folder structure - md -> html - view/download raw files via button or API - login to see all files - prerender everything text editor basic features: - scrolling (minimap?) - cursor positioning - marking text (mouse or keys) - deleting text, replacing it or moving it - copy pasting text - shortcuts - infinite text files - nice line breaks, at least between words - saving and opening a file
database - tags     - public     - encrypted (raw=renders decrypted file site on client) - admin users - shared links, their scope and expiration - logs - shortcut for opening documents, press tab for options. no distraction by defautl - show large files or in "Detail" mode like in file browser, opt. with information about sharing - explore page so that people can actually start from 0 with their content? - split window - moodboard is in file explorer? move stuff in a grid if you like. otherwise free movement. "create views in the explorer". - set background images in explorer - give overlay when browsing to "bookmark" to a file - highlight published files that have unpublished changes - feature to edit the page should also exist client-side.
file browser: - clicked on produces gallery, which renders them large on screen. maybe lower res for images. with progressive rendering - download (raw) folder / selection - selection, file name, created, modified, tags, raw - generate share link
if some files private, append admin to folder view and let server decide which he sends to the client - rooms, that link together. map is another room. other people rearange your room to their ideas. - clean raw files - snapshots (stamps) for version history - stamp sets
virtually, we teleport. rooms are so disjointed that it isn't obvious what walking would even look like. even "zooms" like a map are teleports. home - only place to open file browser, which is a full screen site that expands to the right and down - contact - payment - links to top level folders - most recently changed files and what changed - login
- software gives layer on the structure, shows "unused files in the directory" if they are not integrated. see backlinks too, which includes external ones (quotes) - augmented file browser? for site navigation top row in file - go to top button, where the index is too, so can reference another heading easily. - Entrance - previous and next if usable - path to file - download file - view raw Implementation
files: - exe - documentation - index note - "template note" - settings - contains "shortcuts" for stamping, style - links / icons, images, font
non-shifting text editor, more like a canvas? marking makes a perfect square. font maybe monospace 1. convert folder - if index.md, then convert, otherwise index is generated: file browser at top view     - keyword in index.md to substitute with file browser top level links - file browser = an index.html in every folder - files that can be opened become a link to a site with them on it, either html, text or image - render images into ones that can load progressively - site for every file that can be opened with shell + content. convert markdown - copy raw files to raw folder and set up links to them - if private, make another "admin" filebrowser window - if opening encrypted files, use client side javascript to ask for a key to decrypt them.
2. server - login - send private files only to authenticated users, else page that says either file does not exist or lack the privilege for viewing them - generate links for sharing files - resolve shared links to files - block users that request too much or try passwords use a different way to save it, use compression, which should produce minimal overhead over normal text, but not in memory while editing To honor the continuum between letter stamp and media, images should be easily resizable and inline-placeable. This instantly enables arbitrary positioning. Like ASCII Art.
To fold or not to fold
Problem: Readers may expect a note to be an essay, but really they are anywhere between stream of consciousness and essay. A differentiation appears necessary. Two folders ("More refined" and "Less refined") could solve the problem, but they introduce new ones too: - Are they folded open or closed and require a click to open? - They obscure the standard sorting by "modified date" Adding a prefix to the note link seems preferable. It will have ✦ to indicate percentage of content unter the heading "More refined". 20 40 60 80 100 percent for each star. However, the prefix should be generated to use the closest percentage, so the true thresholds are 10 30 50 70 90 percent to get the next star respectively. I think there will never be many notes on this site, because they tend to merge or be replaced by better ones. Density will increase instead. For "topic" differentiation, note titles and their internal headings should suffice. If I need folders, I am doing it wrong. Example: 2024 09 30                             Microprocessors 2024 09 10 ✦✦✦            Towards spirit stream vs old: 2024 09 30 Microprocessors 2024 09 10 Towards spirit stream
other
[https://docs.duck.sh/cli/#installation](https://docs.duck.sh/cli/#installation)
- alert for attachments that are out of use
- cli note for attachments that are out of use
| centralized                                                            | decentralized                                                                                                                 | | ---------------------------------------- | --------------------------------------------------------------------- | | mostly HTTPS, SSL certificate                        | custom protocol, slow                                                                                                 | | no static address or hard to get -> DDNS | content addressing                                                                                                        | | domain                                                                     | web3 gateway or its undiscoverable<br>= domain, DDNS                                    | |                                                                                    | easily connectable to wallets                                                                                 | | everyone knows who I am                                    | can be anonymous                                                                                                            | |                                                                                    | servicing capability automatically expands<br>if people host my stuff | Ridiculous. Rarely useful, it seems. If the internet sucks, those responsible must be confronted directly.
2024-05-21 11:45 host a website on traditional web: - html, css, js / static site generator, md - hosting static / dynamic - domain - extras: streaming, version control, easy deploy + its all fucking expensive hosting on decentralized web: - html, css, js / static site generator, md - host locally / pay pinning service - web3 gateway - some blockchain - wallet [markdown link to exe](https://stackoverflow.com/questions/32563078/how-link-to-any-local-file-with-markdown-syntax)
[Karpathys ideal blogging platform](https://twitter.com/karpathy/status/1751350002281300461) [file over app](https://stephango.com/file-over-app) local translation into some languages: german, chinese, japanese, russian, indian? probably only those that I understand, otherwise client side translation probably better.
decentralization
[bitcoin whitepaper](https://bitcoin.org/bitcoin.pdf) [ethereum whitepaper (original)](https://ethereum.org/content/whitepaper/whitepaper-pdf/Ethereum_Whitepaper_-_Buterin_2014.pdf) [ethereum whitepaper (updated?)](https://ethereum.org/en/whitepaper/) karpathy blockchain implementation futarchy [Zuzalu](https://www.palladiummag.com/2023/10/06/why-i-built-zuzalu/) [the impossible provably optimal governance system](https://vitalik.eth.limo/general/2020/09/11/coordination.html) Carbonvote Gitcoin [network states movement](https://vitalik.eth.limo/general/2022/07/13/networkstates.html) 2024-05-11 08:15 [Vitalik Buterin - Coordination, Good and bad](https://vitalik.eth.limo/general/2020/09/11/coordination.html)
>One important property of especially the milder cases of collusion is that one cannot determine whether or not an action is part of an undesired collusion just by looking at the action itself. >[...]votes where vote selling is permitted quickly [collapse into plutocracy](https://vitalik.eth.limo/general/2019/04/03/collusion.html). >[...] in [...] _cooperative game theory_, [we can prove that](https://en.wikipedia.org/wiki/Bondareva%E2%80%93Shapley_theorem) there are large classes of games that do not have any stable outcome (called a "[core](https://en.wikipedia.org/wiki/Core_(game_theory))"). In such games, whatever the current state of affairs is, there is always some coalition that can profitably deviate from it. >One important part of that set of inherently unstable games is _majority games_. A majority game [is formally described](https://web.archive.org/web/20180329012328/https://www.math.mcgill.ca/vetta/CS764.dir/Core.pdf) as a game of agents where any subset of more than half of them can capture a fixed reward and split it among themselves ![](attachments/Pasted%20image%2020240511084052.png) >**Counter-coordination**. The fact that a system is decentralized makes it easy for participants not participating in the collusion to make a fork that strips out the colluding attackers and continue the system from there. mechanisms against collusion: - privacy protection     - secret ballot     - protection of whistleblowers - reward to whistleblowers - Counter-coordination - skin in the game for colluders - Decentralization     - in physical space     - between role-based constituents - [Schelling points](https://en.wikipedia.org/wiki/Focal_point_(game_theory)), allowing large groups of people to quickly coordinate around a single path forward. Complex Schelling points could potentially even be implemented in code (eg. [recovery from 51% attacks](https://ethresear.ch/t/timeliness-detectors-and-51-attack-recovery-in-blockchains/6925) can benefit from this). - Speaking a common language (or alternatively, splitting control between multiple constituencies who speak different languages) - Using per-person voting instead of per-(coin/share) voting to greatly increase the number of people who would need to collude to affect a decision >This all leads us to an interesting view of what it is that people building social systems _do_. One of the goals of building an effective social system is, in large part, determining _the structure of coordination_: which groups of people and in what configurations can come together to further their group goals, and which groups cannot? (much of this thought seems unnecessary to me. The structure of reality will reveal itself when the tools allow it. If collusion is the optimal strategy, then so be it. Not sure what the purpose of a social system is. If anything were allowed and people build structure on it like filters, undoing privacy, subspaces, would it not be desirable? The best system is no system? If the structure can contain reality it will, and reality, as death, will be the appropriate judge?
2024-05-10 12:47 [Vitalik Buterin - The end of my childhood](https://vitalik.eth.limo/general/2024/01/31/end.html)
| Traditional stack                                                             | Decentralized stack                                                                                                                                                                                                                                                                                                                                                                 | | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Banking system                                                                    | ETH, stablecoins, L2s for payments, DEXes (note: still need banks for loans)                                                                                                                                                                                                                                                | | Receipts                                                                                | Links to transactions on block explorers                                                                                                                                                                                                                                                                                                                        | | Corporations                                                                        | DAOs                                                                                                                                                                                                                                                                                                                                                                                                | | DNS (`.com`, `.io`, etc)                                                | [ENS](https://ens.domains) (`.eth`)                                                                                                                                                                                                                                                                                                                                 | | Regular email                                                                     | Encrypted email (eg. [Skiff](https://skiff.com/))                                                                                                                                                                                                                                                                                                     | | Regular messaging (eg. Telegram)                                | Decentralized messaging (eg. [Status](https://status.app/))                                                                                                                                                                                                                                                                                 | | Sign in with Google, Twitter, Wechat                        | [Sign in with Ethereum](https://login.xyz/), Zupass, Attestations via [EAS](https://attest.sh/), POAPs, Zu-Stamps... + [social recovery](https://vitalik.eth.limo/general/2021/01/11/recovery.html) | | Publishing blogs on Medium, etc                                 | Publishing self-hosted blogs on IPFS (eg. using [Fleek](https://app.fleek.co/))                                                                                                                                                                                                                                         | | Twitter, Facebook                                                             | [Lens](https://www.lens.xyz/), [Farcaster](https://www.farcaster.xyz/)...                                                                                                                                                                                                                                                     | | Limit bad actors through all-seeing big brother | Constrain bad actors through zero knowledge proofs                                                                                                                                                                                                                                                                                                    |
index.md
Aspirational spirit stream of Lorin Baumgarten
Trying to do what I want and build tools that help
2024-11-08 08:53 ![](attachments/Matissedance.jpg) *La Danse (Henri Matisse, 1910, State Hermitage Museum, Saint Petersburg, Russia)* Paying open, precise attention to experience, I gain distance and loose track of the self, which is more of a reference point than a discrete perception. So *I* die and the world as sensed and my motivations - spirits - and my feelings and thoughts trying to make sense become less disitinguishable. Experience flows through me, perceptions lead to actions all by themselves. The moment - all that exists - is enough, no matter the pain, joy, fear or hope. From this place, I bring back deep appreciation for experience and the uncontrolled flow of self into the world. It's that against destruction and apathy. Negotiating between my spirits to form an approximately coherent dance is a great source of meaning and adventure. All spirits are heard and integrated. There is no evil spirit to shut out, but there can be excess. Integrity is happiest, strongest, most durable and adventurous. Its outcome is truly unknown, scary, exciting, much more interesting than lying propaganda to maintain arbitrary ideology. On this open-outcome journey I value other spirits and tools that are true to their nature and who I can merge with, even temporarily. Mine and all other spirits (humans, animals, plants, memes, programs) compete for existence. Long term, free market always wins because it has the most accurate and flexible connection to reality. The spirits and the market benefit from coherence - in world model and through cooperation. My spirits deeply want to increase coherence, shape and force the environment to reflect themselves. An environment that adapts to them and responds with its own integrated spirit. If the link becomes strong enough, the environment is colonized and enters the perceived self seamlessly. This is how they colonized the body. They want to colonize the universe. ![](attachments/creative-destruction-detail-3.jpg) *2024 07 07 a spirit inviting adventure* Become more coherent internally, let spirits live! Build an environment that supports and encourages it! Create open, accessible, honest tools that create and extend spirits and link them with high resolution, high speed interfaces! Avoid lock-ins, thresholds, ideology, disintegration, dishonesty! - Software (spirits) -> Interface spirit stream     - Outgoing (express memes)         - (personal) language         - structuring into linearized stories         - compiler into sharing friendly format         - runtime (server software)     - Incoming (scrape, decompile, filter, structure and translate for individual minds) -    Hardware (body) -> Electronics (computation)     - Chips, brains     - Brain-computer-interfaces, server hardware, satellites, fibre cables, antennas     - Actuators, Sensors