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- 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.
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
![](creative-destruction-detail-3.jpg) ![](attachments/creative-destruction-detail-3.jpg)
![](creative-destruction-detail-3.jpg)
![](abandoned-building.jpg)
![](20241122_Towards_computation_CPU-GPU_2.svg)
![](H100-chip.jpg)
![](Matissedance.jpg)
![](attachments/creative-destruction-detail-3.jpg)
![](creative-destruction-detail-3.jpg)
- API to get raw files / folder structure 1. flatten website / vault 2. remove "smartness" 3. link database, link based filesystem api 4. history api
from memory in memory Large vocabulary is deceptive Hard is simplification
- 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.
- 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
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
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.
- 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
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
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.
In writing, graphs, images, products Components
- 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
- 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
- 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
To the unknown. Microprocessors Towards Computation
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.
[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
*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
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.
(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.
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?
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
$$ \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/)$$ \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$$ 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$- 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)
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.
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.
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
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.
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
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
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.
- 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.