Update shit

This commit is contained in:
Miloslav Ciz 2022-01-15 22:29:07 -06:00
parent d44e31ae88
commit 29840b371b
5 changed files with 38 additions and 4 deletions

2
c.md
View file

@ -120,7 +120,7 @@ do
**function definition**: **function definition**:
``` ```
RETURN_TYPE myFunction (TYPE1 param1, TYPE2, param2, ...) RETURN_TYPE myFunction (TYPE1 param1, TYPE2 param2, ...)
{ // return type can be void { // return type can be void
// do something here // do something here
} }

View file

@ -2,6 +2,8 @@
Collapse of our civilization is something that's very likely coming very soon: we are especially focusing on a very probable **technological collapse** (caused by badly designed technology as well as its wrong application and extreme overuse causing a dangerous dependence) but of course clues point to it coming from many directions (ecological, economical, political, natural disasters such as a coronal mass ejection etc.). Collapse of our civilization is something that's very likely coming very soon: we are especially focusing on a very probable **technological collapse** (caused by badly designed technology as well as its wrong application and extreme overuse causing a dangerous dependence) but of course clues point to it coming from many directions (ecological, economical, political, natural disasters such as a coronal mass ejection etc.).
There is a [reddit](reddit.md) community for discussing the collapse at https://reddit.net/r/collapse.
In technological world a lot of people are concerned with the collapse, notable the [collapse OS](collapse_os.md), an operating system meant to run on simple [hardware](hw.md) after the technological supply chain collapses and renders development of modern computers impossible. They believe the collapse will happen before 2030. The chip shortage and energy crisis of 2020s are one of the first warnings and shows how fragile the systems really is. People like [Luke Smith](luke_smith.md) advocate (and practice) simple, independent off-grid living to be ready for a life after the collapse. Even [proprietary](proprietary.md) normies such as [Jonathan Blow](jonathan_blow.md) warn of a coming disaster (in his talk *Preventing the Collapse of Civilization*). In technological world a lot of people are concerned with the collapse, notable the [collapse OS](collapse_os.md), an operating system meant to run on simple [hardware](hw.md) after the technological supply chain collapses and renders development of modern computers impossible. They believe the collapse will happen before 2030. The chip shortage and energy crisis of 2020s are one of the first warnings and shows how fragile the systems really is. People like [Luke Smith](luke_smith.md) advocate (and practice) simple, independent off-grid living to be ready for a life after the collapse. Even [proprietary](proprietary.md) normies such as [Jonathan Blow](jonathan_blow.md) warn of a coming disaster (in his talk *Preventing the Collapse of Civilization*).
The details of the collapse cannot of course be predicted exactly -- it may come is an quick, violent form (e.g. in case of a disaster causing a blackout) or as a more agonizing slow death. CollapseOS site talks about two stages of the slow collapse: the first one after the collapse of the supply chain. i.e. when the production of modern computers halts, and the second (decades after) when the last modern computer stops working. The details of the collapse cannot of course be predicted exactly -- it may come is an quick, violent form (e.g. in case of a disaster causing a blackout) or as a more agonizing slow death. CollapseOS site talks about two stages of the slow collapse: the first one after the collapse of the supply chain. i.e. when the production of modern computers halts, and the second (decades after) when the last modern computer stops working.

3
cpp.md Normal file
View file

@ -0,0 +1,3 @@
# C++
C++ is an [object-obsessed](oop.md) [joke](jokes.md) language based on [C](c.md) to which it adds only [capitalist](capitalist_software.md) features and [bloat](bloat.md). Most good programmers agree that C++ is hilariously messy and also tragic in that it actually succeeded to become mainstream.

31
quaternion.md Normal file
View file

@ -0,0 +1,31 @@
# Quaternion
Quaternion is a type of number, just like there are integer numbers, real numbers or [imaginary numbers](complex_number.md). They are very useful for certain things such as 3D rotations (they have some advantages over using e.g. Euler angles, for example they avoid Gimbal lock, they are also faster than transform matrices etc.). Quaternions are not so easy to understand but you don't actually need to fully grasp and visualize how they work in order to use them if that's not your thing, there are simple formulas you can copy-paste to your code and it will "just work".
Quaternions are an extension of [complex numbers](complex_number.md) (you should first check out complex numbers before tackling quaternions); while complex numbers can be seen as two dimensional -- having the real and imaginary part -- quaternions would be seen as four dimensional. A quaternion can be written as:
*a + bi + cj + dk*
where *a*, *b*, *c* and *d* are real numbers and *i*, *j* and *k* are the basic quaternion units. For the basic units it holds that
*i^2 = j^2 = k^2 = ijk = -1*
**Why four components and not three?** Simply put, numbers with three components don't have such nice properties, it just so happens that with four dimensions we get this nice system that's useful.
Operations with quaternions such as their multiplication can simply be derived using basic algebra and the above given axioms. Note that **quaternion multiplication is non-commutative** (*q1 * q2 != +2 * q1*), but it is still associative (*q1 * (q2 * q3) = (q1 * q2) * q3*).
A **unit quaternion** is a quaternion in which *a^2 + b^2 + c^2 + d^2 = 1*.
A **quaternion negation** (*q^-1*) is obtained by multiplying *b*, *c* and *d* by -1.
## Rotations
Only unit quaternions represent rotations.
Rotating point *p* by quaternion *q* is done as
*q^-1 * (0 + p.x i + p.y j + p.z k) * q*
Rotation quaternion can be obtained from axis (*v*) and angle (*a*) as
*q = cos(a/2) + sin(a/2) * (v.x i + v.y j + v.z k)*

View file

@ -1,5 +1,3 @@
# Software # Software
TODO The article you're looking for is [here](sw.md).
## List of Good Software