-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from orbitmines/2024-02-ngi-to-main
2024 02 ngi to main
- Loading branch information
Showing
1,215 changed files
with
31,012 additions
and
11,902 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
- working-directory: "./orbitmines.com" | ||
run: npm install | ||
- working-directory: "./orbitmines.com" | ||
run: npm run test -- --watchAll=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Miscellaneous | ||
external | ||
|
||
# orbitmines.com | ||
orbitmines.com/node_modules | ||
|
||
# Environment | ||
**/.idea | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "external/github.com/akissinger/chyp"] | ||
path = external/github.com/akissinger/chyp | ||
url = git@github.com:akissinger/chyp.git |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Fadi Shawki | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,102 @@ | ||
![orbitmines.logo.3000x1000.png](src%2Flib%2Forganizations%2Forbitmines%2Flogo%2Forbitmines.logo.3000x1000.png) | ||
![orbitmines.logo.3000x1000.png](./orbitmines.com/src%2Flib%2Forganizations%2Forbitmines%2Flogo%2Forbitmines.logo.3000x1000.png) | ||
|
||
# orbitmines.com | ||
*A public repository for [orbitmines.com](https://orbitmines.com). The hub for OrbitMines' (research) projects.* | ||
|
||
*Once a Minecraft server, now a research project dedicated to understanding arbitrarily unknown dynamical systems.* | ||
|
||
![header](./orbitmines.com/public/papers/on-orbits-equivalence-and-inconsistencies/images/header.png) | ||
|
||
## What is this?, What is OrbitMines?, What are Rays? | ||
|
||
A simple way of phrasing this, is that the concept of a (hyper-/)'Vertex', (hyper-/)'Edge', (hyper-/)'Graph', (hyper-/)'Rule', (hyper-/)'Tactic', (hyper-/)..., (hyper-/)'Rewrite' are merged into one thing: a [Ray](./environments/javascript/@orbitmines/rays/src/Ray.ts). It handles surrounding context, ignorances, equivalences, ..., differentiation (And if it cannot, then it offers a way of implementing it for all of the above). | ||
|
||
Most importantly, it is here as infrastructure. Infrastructure for the design and implementation of a different category of (programming) interfaces. | ||
|
||
- If you prefer **text**, see [2023-12-31. On Orbits, Equivalence and Inconsistencies](https://orbitmines.com/papers/on-orbits-equivalence-and-inconsistencies), or more generally my/OrbitMines writing can be found here: [orbitmines.com/profiles/fadi-shawki](https://orbitmines.com/profiles/fadi-shawki). | ||
|
||
|
||
- If you prefer **audio-visual mumblings**, see [2024-01-04. What is OrbitMines?, Implementing Aleks Kissinger's Chyp and maybe looking at Tinygrad](https://www.youtube.com/watch?v=O6v_gzlI1kY), or more generally my streams can be found here: [youtube.com/@FadiShawki/streams](https://www.youtube.com/@FadiShawki/streams). | ||
|
||
|
||
- If you prefer **archaic symbolics: i.e. code**, see [Ray.ts](./environments/javascript/@orbitmines/rays/src/Ray.ts), or more generally my/OrbitMines code can be found here [github.com/orbitmines](https://github.com/orbitmines/). | ||
|
||
|
||
- If you prefer discussions on **Discord**: [discord.orbitmines.com](https://discord.orbitmines.com). | ||
|
||
|
||
- TODO: ~~Or if prefer smashing your keyboard till there's something interesting on the screen. See a first implementation of this *explorational interface*: [orbitmines.com/explorer/github.com/akissinger/chyp](https://orbitmines.com/explorer/github.com/akissinger/chyp).~~ | ||
|
||
--- | ||
|
||
## Where is OrbitMines going with this? - i.e. Future inquiries | ||
|
||
Check out everything I've made public regarding this here: [GitHub Issues](https://github.com/orbitmines/orbitmines.com/issues) or equivalently, check the Discord channels grouped under the name: [Fractals of the Galaxy](https://discord.com/channels/1055502602365845534/1114584997702156388). | ||
|
||
--- | ||
|
||
### Some general notes about this project | ||
|
||
> [!IMPORTANT] | ||
> Anything in this directory should be considered as deprecated. It is merely used as the initial (crude) bootstrap for OrbitMines. And will surely be replaced at some point - it is not (yet) meant as a formal spec. | ||
> [!WARNING] | ||
> No proper security audit has yet been done on its current iteration. | ||
> [!WARNING] | ||
> No proper performance optimizations have been done on its current iteration. | ||
--- | ||
|
||
### Local setup | ||
|
||
- Running `orbitmines.com` locally on `http://localhost:3000`: | ||
- ```shell | ||
git clone git@github.com:orbitmines/orbitmines.com.git | ||
``` | ||
- ```shell | ||
cd ./orbitmines.com/orbitmines.com | ||
``` | ||
- ``` | ||
npm install | ||
``` | ||
- ``` | ||
npm start | ||
``` | ||
- Running tests. | ||
- ```shell | ||
npm run test -- --watchAll | ||
``` | ||
|
||
--- | ||
|
||
## JavaScript Interface Examples | ||
|
||
**This is just preliminary, I'll change this later** | ||
> [!WARNING] | ||
> Reasoning backwards, what should the JavaScript interface look like? | ||
- [ ] Applying a function on a Ray (vertex/initial/terminal) ; then go inside, insde can again be a vertex/initial/terminal on each vertex, apply on those. | ||
--- | ||
#### Discussion | ||
Let's take logic gates as an example? - and maybe logic with different equiv func? - Like switching between true/false on each check? | ||
|
||
```ts | ||
import Ray from '@orbitmines/rays'; | ||
const initial = Ray.boolean().orbit().size(2); | ||
const terminal = Ray.boolean().orbit().size(2); | ||
// TODO: Compiles to a sequence of traversal checks?, and setting ops?, and arbitrary many of them make up a program. | ||
Feel free to discuss this project on this GitHub repository or preferably the [OrbitMines Community Discord](https://discord.orbitmines.com). | ||
``` | ||
|
||
--- | ||
|
||
#### Latest Writing - Some context on this project | ||
## License Magic | ||
|
||
[2023-12-31. On Orbits, Equivalence and Inconsistencies](http://orbitmines.com/papers/on-orbits-equivalence-and-inconsistencies/ | ||
) | ||
![on-orbits-equivalence-and-inconsistencies](public/papers/on-orbits-equivalence-and-inconsistencies/images/thumbnail/3840x2160.jpeg) | ||
I'm not convinced putting licenses on the repo's in the usual case is anything other than *Minecraft servers putting "Not affiliated with Mojang" in their stores* just because everyone else does it. But here: after doing absolutely no research into the international ramifications: [LICENSE](./LICENSE) a license for those who like to look at them. Try to reason to what that applies in this repository, obviously that doesn't cover everything not made by me or other contributions to OrbitMines or something. Just put a reference to me or this project somewhere if it's remotely interesting to you. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
// | ||
// | ||
// | ||
// /** | ||
// * Puts the Ray this is called with on a new Ray [initial = ref, ???, ???]. Then it places any structure it's applying a method to, on the terminal of this new Ray [initial = ref, ???, terminal = any] | ||
// */ | ||
// static Ref = (impl: Ray.FunctionImpl<Ray.Any>): Function => { | ||
// return new Function(impl); // TODO: THIS SHOULD CHANGE, TO ON VERTEX. | ||
// } | ||
// static Impl = <T = Ray>(impl: (initial: T, terminal: T) => T): Function<T> => { | ||
// return Function.Ref((ref: T) => impl(ref.initial, ref.terminal)); | ||
// } | ||
// // static IgnorantOfInitial = <T extends AbstractDirectionality<T> = Ray>(impl: (terminal: T) => T): Function<T> => Function.Impl((_, terminal) => impl(terminal)); | ||
// // static IgnorantOfTerminal = <T extends AbstractDirectionality<T> = Ray>(impl: (initial: T) => T): Function<T> => Function.Impl((initial, _) => impl(initial)); | ||
// // static Ignorant = <T extends AbstractDirectionality<T> = Ray>(impl: ParameterlessFunction<T>): Function<T> => Function.Impl(impl); | ||
// | ||
// /** | ||
// * TODO: Reversible through memory... | ||
// */ | ||
// static WithMemory = <T = Ray>( | ||
// apply: (previous: Ray.Any) => Ray.Any | any | ||
// ): Function<T> => { | ||
// // return Function.Ref((ref: T) => impl(ref.initial, ref.terminal)); | ||
// | ||
// return { | ||
// as_ray: (ref: Ray.Any = Ray.None()) => { | ||
// const next = (previous: Ray.Any, first: boolean = false): Ray.Any => { | ||
// const result = apply(previous); | ||
// const is_terminal = result instanceof Ray ? | ||
// result.is_none() || (result.is_terminal() && result.self.is_none()) | ||
// : false; | ||
// | ||
// // Clear the terminal function attached to the Iterator. | ||
// // TODO: In case of 'is_terminal = true': Could also leave this be, in case JavaScript allows for adding stuff to the iterator even after .done === true; | ||
// previous.self.terminal = previous.self.___empty_terminal(); | ||
// | ||
// if (is_terminal) { | ||
// // We're done, this is the end of the iterator | ||
// | ||
// return Ray.None(); | ||
// } | ||
// | ||
// const current = Ray | ||
// .vertex(() => result instanceof Ray ? result.self : JS.Any(result)) // TODO test | ||
// .o(result instanceof Ray ? {} : { js: result }) | ||
// .as_reference(); | ||
// | ||
// // Move the iterator to the terminal. | ||
// current.self.terminal = () => next(current); | ||
// | ||
// if (first) { | ||
// // Move the iterator's terminal to current. | ||
// previous.self.terminal = () => current.self; | ||
// | ||
// current.self.initial = () => previous.self; | ||
// | ||
// return current; // Answer to INITIAL.terminal is a VERTEX. | ||
// } | ||
// | ||
// // // TODO: This is just compose, but without .type checks.. ; FIX ON COMPOSE END for is_reference etc.. | ||
// // if (previous.follow().type !== RayType.TERMINAL) | ||
// // throw new PreventsImplementationBug(); | ||
// // if (current.follow(Ray.directions.previous).type !== RayType.INITIAL) | ||
// // throw new PreventsImplementationBug(); | ||
// // | ||
// // previous.follow().equivalent(current.follow(Ray.directions.previous)); | ||
// previous.compose(current); | ||
// | ||
// return current.self.initial; // Answer to VERTEX.terminal is an INITIAL. | ||
// } | ||
// | ||
// if (ref.is_none()) { | ||
// const ray: Ray.Any = new Ray({ | ||
// vertex: Ray.Any.None, | ||
// terminal: () => next(ray, true), | ||
// }).as_reference(); | ||
// | ||
// return ray; | ||
// } else { | ||
// const initial_vertex = Ray.vertex(() => ref.self).as_reference(); | ||
// | ||
// initial_vertex.self.terminal = () => next(initial_vertex); | ||
// | ||
// return initial_vertex; | ||
// } | ||
// } | ||
// } as Function<T>; | ||
// } | ||
// | ||
// /** | ||
// * @see "Reversibility after ignoring some difference": https://orbitmines.com/papers/on-orbits-equivalence-and-inconsistencies#:~:text=Another%20example%20of%20this%20is%20reversibility | ||
// * @see "More accurately phrased as the assumption of Reversibility: with the potential of being violated.": https://orbitmines.com/papers/on-orbits-equivalence-and-inconsistencies#:~:text=On%20Assumptions%20%26%20Assumption%20Violation | ||
// */ | ||
// static Reversible = <T extends AbstractDirectionality<T> = Ray>( | ||
// // @alias('backward') | ||
// initial: (ref: Ray.Any) => Ray.Any | any, | ||
// // @alias('forward') | ||
// terminal: (ref: Ray.Any) => Ray.Any | any, | ||
// ): Function<T> => { | ||
// // return Function.Ref((ref: T) => impl(ref.initial, ref.terminal)); | ||
// | ||
// return { | ||
// as_ray: (ref: Ray.Any = Ray.None()): Ray.Any => { | ||
// if (ref.is_none()) | ||
// throw new NotImplementedError(); | ||
// | ||
// const next = (previous: Ray.Any, direction: (ref: Ray.Any) => Ray.Any | any): Ray.Any => { | ||
// const result = direction(previous); | ||
// | ||
// // TODO: COuld do this in place. | ||
// const current = Ray | ||
// .vertex(() => result instanceof Ray ? result.self : JS.Any(result)) | ||
// .o(result instanceof Ray ? {} : { js: result }) | ||
// .as_reference(); | ||
// | ||
// current.self.initial.self = () => next(current, initial); | ||
// current.self.terminal.self = () => next(current, terminal); | ||
// | ||
// return current.self.initial; | ||
// } | ||
// | ||
// | ||
// const initial_vertex = Ray.vertex(() => ref.self).as_reference(); | ||
// | ||
// // const initial_vertex = Ray.vertex(() => ref.self).as_reference(); | ||
// initial_vertex.self.initial.self = () => next(initial_vertex, initial); | ||
// initial_vertex.self.terminal.self = () => next(initial_vertex, terminal); | ||
// | ||
// return initial_vertex; | ||
// } | ||
// } as Function<T>; | ||
// } | ||
// | ||
// /** | ||
// * Constructs a class method accepting arbitrary structure. | ||
// * | ||
// * a.compose(b).compose(c) = [a, b, c].compose = abc.compose = [[a1, a2], b, c].compose = [[a1, a2], b, [c1, c2]].compose = [[a1, [[[a2]]], [[[[]]], []]], b, [[[]], [], [c]]].compose = ... | ||
// */ | ||
// as_method = <TResult>(ref: Ray.Any): Method<Ray, TResult> => ((...any: Recursive<Ray.Any>): TResult => { | ||
// if (any === undefined || any.length === 0) | ||
// return this.step(ref); | ||
// | ||
// // TODO: This can be much better... | ||
// const first = (recursive?: Recursive<T>): T | undefined => { | ||
// if (recursive === undefined) return; | ||
// // if (_.isObject(recursive)) return recursive as unknown as Ray; | ||
// | ||
// for (let r of recursive) { | ||
// if (r === undefined) continue; | ||
// if (_.isObject(r)) return r as unknown as T; | ||
// | ||
// // if (r instanceof Ray) | ||
// // throw new PreventsImplementationBug(); | ||
// | ||
// // @ts-ignore | ||
// const _first = first(r); | ||
// if (_first) | ||
// return _first; | ||
// } | ||
// } | ||
// | ||
// const _first = first(any); | ||
// | ||
// if (_first === undefined) | ||
// return this.step(ref); | ||
// | ||
// const pointer = (new Ray({ | ||
// // @ts-ignore | ||
// initial: () => ref, | ||
// // @ts-ignore | ||
// terminal: () => _first | ||
// })) as unknown as T; | ||
// | ||
// return this.step(pointer); | ||
// | ||
// // TODO: ANY CASE | ||
// // if (any.length === 1) { | ||
// // } | ||
// }) | ||
// | ||
// as_ray = (initial: Ray.Any = Ray.None()): Ray.Any => { | ||
// throw new NotImplementedError(); | ||
// } | ||
// | ||
// as_generator = (): Generator<T> => { | ||
// throw new NotImplementedError(); | ||
// } | ||
// | ||
// } | ||
// | ||
// | ||
// | ||
// export const Iterator = <T = any>(iterator: Iterator<T>): Ray.Any => { | ||
// // [ |--] | ||
// | ||
// return Ray.Function.WithMemory(previous => { | ||
// const iterator_result = iterator.next(); | ||
// | ||
// return iterator_result.done !== true ? iterator_result.value : Ray.Any.None(); | ||
// }).as_ray(); | ||
// } | ||
// | ||
|
||
// | ||
// // TODO | ||
// export const Object = (object: object): Ray.Any => Ray.Any.vertex().o(object).as_reference(); | ||
// | ||
// export const Any = (any: any): Ray.Any => { | ||
// if (any === null || any === undefined) return JS.Any(any); | ||
// if (JS.is_boolean(any)) return JS.Boolean(any); | ||
// // if (JS.is_number(any)) return JS.Number(any); TODO | ||
// if (JS.is_iterable(any)) return JS.Iterable(any); // || is_array(any)) | ||
// if (JS.is_function(any)) return Ray.Function.Any(any).as_ray(); | ||
// if (JS.is_object(any)) return JS.Object(any); | ||
// | ||
// // TODO | ||
// // return JS.Any(any); | ||
// return Ray.vertex().o({js: any}).as_reference(); | ||
// } | ||
// | ||
// } |
Oops, something went wrong.