From: Brendan Hansen Date: Thu, 23 Mar 2023 02:51:02 +0000 (-0500) Subject: changed: added new logo; added: proposal for multi-pointers X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=17ce594bb1ffe6b5a94e147a86cc06cc81b815e5;p=onyx.git changed: added new logo; added: proposal for multi-pointers --- diff --git a/docs/ideas/multi-pointers.md b/docs/ideas/multi-pointers.md new file mode 100644 index 00000000..cffbb955 --- /dev/null +++ b/docs/ideas/multi-pointers.md @@ -0,0 +1,26 @@ +Multi-Pointers +============== + +&T - Pointer to a single T +[5] T - Array of 5 T's +[] T - Slice of T (pointer to initial element, and a count) +[..] T - Dynamic array of T (pointer to initial element, count, capacity and allocator) +[&] T - Pointer to many T's + +This proposal would eliminate the usage of `t[x]` and `t + i` for a `t` of type `&T`. Instead, +`t` would have to be of type `[&] T` to do this. Multi-pointers would affectively +be exactly like normal pointers, but would have this ability. + +I think the easiest way to implement them is by having a flag on TypePointer. +Then modify the checker to allow for the `t[x]` and `t + i` syntax. + +Also, slices and dynamic arrays would have to have their internal data pointer types +become `[&] T`, so the can actually be used like arrays. + +As for updating existing code, I don't think there would be too much to update. The +largest hurdle will be the code that works with `any` types, as it is common there to +cast to a `&u8` and use pointer addition. There should be/already is a better substitute +for this, but making this change would break all of that code. By my estimate, I think +that would comprise: +- `core.misc`'s any library +- `json` library diff --git a/docs/logos/logo-new-256.png b/docs/logos/logo-new-256.png new file mode 100644 index 00000000..4c8c3b43 Binary files /dev/null and b/docs/logos/logo-new-256.png differ diff --git a/docs/logos/logo-new-32.png b/docs/logos/logo-new-32.png new file mode 100644 index 00000000..f847f119 Binary files /dev/null and b/docs/logos/logo-new-32.png differ diff --git a/docs/logos/logo-new-512.png b/docs/logos/logo-new-512.png new file mode 100644 index 00000000..8da36359 Binary files /dev/null and b/docs/logos/logo-new-512.png differ diff --git a/docs/logos/logo-new.png b/docs/logos/logo-new.png new file mode 100644 index 00000000..8da36359 Binary files /dev/null and b/docs/logos/logo-new.png differ diff --git a/docs/logos/logo.svg b/docs/logos/logo.svg index 93c70a6c..e59d5b90 100644 --- a/docs/logos/logo.svg +++ b/docs/logos/logo.svg @@ -2,12 +2,12 @@ + units="px" + width="49px" /> + id="defs2"> + + + + + + + + + + style="fill:#4d4d4d;fill-rule:evenodd;stroke-width:0.0293746" + d="M 11.763289,3.914572 1.3881028,9.8522703 a 0.10746311,0.10746311 90.000426 0 0 -1.4e-6,0.1865377 l 4.9883072,2.854897 A 0.32624697,0.32624697 164.99998 0 0 6.8203814,12.774742 L 11.900221,4.0525466 A 0.10062399,0.10062399 45.217132 0 0 11.763289,3.914572 Z" + inkscape:path-effect="#path-effect1196" + inkscape:original-d="M 12.089211,3.7280473 1.2251325,9.9455378 6.6574279,13.054537 Z" /> + style="fill:#333333;fill-rule:evenodd;stroke-width:0.029419" + d="M 12.162827,4.0018649 6.9729475,12.886067 a 0.0504192,0.0504192 45.290639 0 0 0.068524,0.06922 l 5.1227994,-2.923284 a 0.32119605,0.32119605 120.14455 0 0 0.162004,-0.2789709 l 0,-5.7069276 a 0.08771164,0.08771164 15.146085 0 0 -0.163448,-0.044243 z" + inkscape:path-effect="#path-effect1236" + inkscape:original-d="M 12.326275,3.7220702 6.8780241,13.04856 12.326275,9.9395598 Z" /> + style="fill:#999999;fill-rule:evenodd;stroke-width:0.0295315" + d="m 1.0890783,3.6985577 v 5.6525366 a 0.22068576,0.22068576 30.240095 0 0 0.329423,0.1920375 L 11.783187,3.6743435 a 0.08679074,0.08679074 75.240095 0 0 -0.04276,-0.1623148 l -10.4648157,0 a 0.18652896,0.18652896 135 0 0 -0.186529,0.186529 z" + inkscape:path-effect="#path-effect1194" + inkscape:original-d="M 1.0890783,3.5120287 V 9.7296608 L 12.069846,3.5120287 Z" /> + style="fill:#4d4d4d;fill-rule:evenodd;stroke-width:0.029571" + d="M 6.4864206,0.28046515 1.4340775,3.1336232 a 0.08682156,0.08682156 75.272862 0 0 0.042693,0.1624213 H 11.967016 a 0.04985456,0.04985456 104.72714 0 0 0.02452,-0.093265 L 6.8167272,0.28046515 a 0.33586257,0.33586257 6.6844583e-7 0 0 -0.3303066,0 z" + inkscape:path-effect="#path-effect1192" + inkscape:original-d="M 6.6515739,0.18719981 1.1464635,3.2960445 H 12.156684 Z" /> +