master
Miloslav Ciz 2 years ago
parent 2a3266e7b6
commit 69d24f55e1

@ -8,7 +8,31 @@ Anyway, **how does it work?** Typically we work in a 2D or 3D [Euclidean space](
Analytic geometry is closely related to [linear algebra](linear_algebra.md).
## Example
## Examples
**Nub example**:
Find the intersection of two lines in 2D: one is a horizontal line with *y* position 2, the other is a 45 degree line going through the [0,0] point in the positive *x* and positive *y* direction, like this:
```
y
: _/ line 2
: _/
_2:_____/_______ line 1
: _/
:_/
--:----------x
_/:
:
```
The equation of line 1 is just *y = 2* (it consists of all points *[x,2]* where for *x* we can plug in any number to get a valid point on the line).
The equation of line 2 is *x = y* (all points that have the same *x* and *y* coordinate lie on this line).
We find the intersection by finding such point *[x,y]* that satisfies both equations. We can do this by plugging the first equation, *y = 2*, to the second equation, *x = y*, to get the *x* coordinate of the intersection: *x = 2*. By plugging this *x* coordinate to any of the two line equations we also get the *y* coordinate: 2. I.e. the intersection lies at coordinates *[2,2]*.
**Advanced nub example**:
Let's say we want to find, in 2D, where a line *L* intersects a circle *C*. *L* goes through points *A = [-3,0.5]* and *B = [3,2]*. *C* has center at *[0,0]* and radius *r = 2*.

@ -32,8 +32,8 @@ These are mainly for [C](c.md), but may be usable in other languages as well.
- Search literature for **algorithms with better [complexity class](complexity_class.md)** (sorts are a nice example).
- For the sake of simple computers such as [embedded](embedded.md) platforms **avoid [floating point](floating_point.md)** as that is often painfully slowly emulated in software. Use [fixed point](fixed_point.md), or at least offer it as a [fallback](fallback.md). This also applies to other hardware requirements such as [GPU](gpu.md) or sound cards: while such hardware accelerates your program on computers that have the hardware, making use of it may lead to your program being slower on computers that lack it.
- **[Early branching](early_branching.md) can create a speed up** (instead of branching inside the loop create two versions of the loop and branch in front of them). This is a kind of space-time tradeoff.
- **Division can be replaced by multiplication by [reciprocal](reciprocal.md)**, i.e. *x / y = x * 1/y*. The point is that multiplication is usually faster than division. This trick doesn't help us when performing a single division (as we still have to divide 1 by *y*) but it does help when we need to divide many numbers by the same number; here we precompute the reciprocal value and then multiply all numbers by it. Of course this can also easily be done with [fixed point](fixed_point.md) and integers!
- **Reuse variable to save space**. A warning about this one: readability may suffer, mainstreamers will tell you you're going against "good practice", and some compilers may do this automatically anyway. Be sure to at least make this clear in your comments. Anyway, on a lower level and/or with dumber compilers you can just reuse variables that you used for something else rather than creating a new variable that takes additional RAM; the only prerequisite for "merging" variables is that the variables aren't used at the same time.
- **Division can be replaced by multiplication by [reciprocal](reciprocal.md)**, i.e. *x / y = x * 1/y*. The point is that multiplication is usually faster than division. This may not help us when performing a single division by variable value (as we still have to divide 1 by *y*) but it does help when we need to divide many numbers by the same variable number OR when we know the divisor at compile time; we save time by precomputing the reciprocal before a loop or at compile time. Of course this can also easily be done with [fixed point](fixed_point.md) and integers!
- **Reuse variables to save space**. A warning about this one: readability may suffer, mainstreamers will tell you you're going against "good practice", and some compilers may do this automatically anyway. Be sure to at least make this clear in your comments. Anyway, on a lower level and/or with dumber compilers you can just reuse variables that you used for something else rather than creating a new variable that takes additional RAM; the only prerequisite for "merging" variables is that the variables aren't used at the same time.
- **What's fast on one platform may be slow on another**. This depends on the instruction set as well as on compiler, operating system, available hardware, [driver](driver.md) implementation and other details. In the end you always need to test on the specific platform to be sure about how fast it will run.
- **Mental calculation tricks**, e.g. multiplying by one less or more than a power of two is equal to multiplying by power of two and subtracting/adding once, for example *x * 7 = x * 8 - x*; the latter may be faster as a multiplication by power of two (bit shift) and addition/subtraction may be faster than single multiplication, especially on some primitive platform without hardware multiplication. However this needs to be tested on the specific platform. Smart compilers perform these optimizations automatically, but not every compiler is high level and smart.
- **Else should be the less likely branch**, try to make if conditions so that the if branch is the one with higher probability of being executed -- this can help branch prediction.

@ -2,4 +2,10 @@
*Not to be confused with [soyence](soyence.md)*.
Science in a wide sense means systematic gathering, inference and organization of knowledge, in a more strict sense this process has to be kept rational by obeying some specific strict rules and adhering to objective principles such as the [scientific method](scientific_method.md) or mathematical [proof](proof.md). Sciences in the strict sense include [mathematics](math.md) (so called formal science), [physics](physics.md), biology, chemistry, [computer science](computer_science.md) etc. Science is not to be confused with [pseudoscience](pseudoscience.md) (such as gender studies or astrology) and [soyence](soyence.md) (political propaganda masked as "science").
Science (from Latin *scientia*, knowledge or understanding) in a wide sense means systematic gathering, inference and organization of knowledge, in a more strict sense this process has to be kept rational by obeying some specific strict rules and adhering to whatever principles of objectivity are currently accepted, nowadays for example the [scientific method](scientific_method.md) or mathematical [proof](proof.md). Sciences in the strict sense include [mathematics](math.md) (so called formal science), [physics](physics.md), biology, chemistry, [computer science](computer_science.md), as well as "soft sciences" such as [psychology](psychology.md), sociology etc. Science is not to be confused with [pseudoscience](pseudoscience.md) (such as [gender studies](gender_studies.md) or [astrology](astrology.md)) and [soyence](soyence.md) (political propaganda masked as "science").
TODO: some noice tree of sciences or smth
**There is no simple objective definition of a strict science** -- the definition of science changes with development of society, technology, culture, politics and so on. Science should basically stand for the most rational and objective knowledge we're able to practically obtain, however the specific criteria for this are unclear and have to be agreed on. The [scientific method](scientific_method.md) is evolving and there are many debates over it, with some even stating that there can be no universal method of science. The [p-value](p_value.md) used to determine whether measurements are statistically significant has basically just an arbitrarily set value for what's considered a "safe enough" result. Some say that if a research is to be trusted, it has to be [peer reviewed](peer_review.md), i.e. that what's scientific has to be approved by chosen experts -- this may be not just because people can make mistakes but also because in current highly competitive society there appears science [bloat](bloat.md), obscurity and tendencies to push fake research and purposeful deception, i.e. our politics and culture are already defining what science is. However the stricter the criteria for science, the more monopolized, centralized, controlled and censored it becomes.
**What should we then accept as legit science?** [We](lrs.md), in the context of our [ideal society](less_retarded_society.md), argue for NOT creating a strict definition of science, just as we are for example against "formalizing morality" with laws etc. What is and is not science is to be judged on a case-by-case basis, science cannot be a mass produced stream of papers that can automatically be marked as OK or NOT OK. We might define the term **[less retarded science](less_retarded_science.md)** so as to distinguish today's many times twisted and corrupted "science/[soyence](soyence.md)" from the real, good and truly useful science. Less retarded science should follow similar principles as [our technology](lrs.md), it should be completely free as in freedom, [selfless](selflessness.md), [suckless](suckless.md) as much as possible, unobscured etc.

@ -2,10 +2,10 @@
*"An idiot admires complexity, a genius admires simplicity"* --Terry Davis
Terry A. Davis, aka the *divine intellect*, born 1969, was a genius/schizophrenic [programmer](programming.md) that singlehandedly created [TempleOS](temple_os.md). For that he became a legend and a [meme](meme.md) in the tech circles, especially on [4chan](4chan.org) which additionally valued his [autistic](autism.md) and politically incorrect behavior.
Terry A. Davis, aka the *divine intellect*, born 1969 in Wisconsin, was a genius+[schizophrenic](schizo.md) [programmer](programming.md) that singlehandedly created [TempleOS](temple_os.md) in his own [programming language](programming_language.md) called [HolyC](holyc.md), and greatly entertained and enlightened an audience of followers until his tragic untimely death. For his programming skills and quality videos he became a legend and a [meme](meme.md) in the tech circles, especially on [4chan](4chan.org) which additionally valued his [autistic](autism.md) and [politically incorrect](political_correctness.md) behavior.
He was convinced he could talk to God and that God commanded him to make an operating system with certain parameters. According to himself he was gifted a *divine intellect* and was the "best programmer that ever lived". Terry was making [YouTube](youtube.md) talking/programming videos in which God was an often discussed topic. He was also convinced that the government was after him and often delved into the conspiracies against him, famously proclaiming that **"CIA [niggers](nigger.md) glow in the dark"** (the "glowing in dark" caught on as a phrase used for someone suspicious). He was in mental hospital several times and later became homeless (still posting videos from his van). An entertaining fact is also that he fell in love with a famous female physics YouTuber Dianna Cowern which he stalked online. In 2018 he was killed by a train but he left behind tons of videos full of endless entertainment, and sometimes even genuine wisdom.
He was convinced he could talk to God and that God commanded him to make an operating system with certain parameters such as 640x480 resolution, also known as the God resolution. According to himself he was gifted a *divine intellect* and was, in his own words, the "best programmer that ever lived". Terry was making [YouTube](youtube.md) talking/programming videos in which God was an often discussed topic, alongside valuable programming advice and a bit of good old [racism](racism.md). He was also convinced that the government was after him and often delved into the conspiracies against him, famously proclaiming that **"CIA [niggers](nigger.md) glow in the dark"** ("glowing in dark" subsequently caught on as a phrase used for anything [suspicious](sus.md)). He was in mental hospital several times and later became homeless, but continued to post videos from his van. An entertaining fact is also that he fell in love with a famous female physics YouTuber Dianna Cowern which he stalked online. In 2018 he was killed by a train (officially a [suicide](suicide.md) but word has it CIA was involved) but he left behind tons of videos full of endless entertainment, and sometimes even genuine [wisdom](wisdom.md).
Terry greatly valued [simplicity](minimalism.md) and [fun](fun.md) in programming, he saw that technology went to [shit](shit.md) and wanted to create something in the oldschool style, and he expressed his will to dedicate his creation to the [public domain](public_domain.md). This is of course extremely based and appreciated by [us](lrs.md).
Terry, just as [us](lrs.md), greatly valued [simplicity](minimalism.md) and [fun](fun.md) in programming, he was a low-level programmer and saw that technology went to [shit](shit.md) and wanted to create something in the oldschool style, and he expressed his will to dedicate his creation to the [public domain](public_domain.md). This is of course extremely based and appreciated by [us](lrs.md) (though the actual public domain dedication wasn't executed according to our recommendations).

@ -10,7 +10,7 @@ Information about hardware and software used by Wikimedia Foundation can be foun
Wikipedia was created by [Jimmy Wales](jimmy_wales.md) and [Larry Sanger](larry_sanger.md) and was launched on 15 January 2001. It was made as a complementary project alongside [Nupedia](nupedia.md), an earlier encyclopedia by Wales and Sanger to which only verified experts could contribute. Wikipedia of course has shown to be a much more successful project.
There exist [forks](fork.md) and alternatives to Wikipedia. Simple English Wikipedia can offer a simpler alternative to sometimes overly complicated articles on the main English Wikipedia. [Citizendium](citizendium.md) is a similar, free online encyclopedia co-founded by [Larry Sanger](larry_sanger.md), a co-founder of Wikipedia itself. Citizendium's goal is to improve on some weak point of Wikipedia such as its reliability or quality of writing. [Metapedia](metapedia.md) is a Wikipedia fork that's written from a [rightist](left_right.md) point of view. [Infogalactic](infogalactic) is also a Wikipedia fork that tries to remove the [pseudoleftist](pseudoleft.md) bullshit etc. Encyclopedia Britannica can also be used as a nice resource: its older versions are already [public domain](public_domain.md) and can be found e.g. at [Project Gutenberg](gutenberg.md), and there is also a modern online version of Britannica which is [proprietary](proprietary.md) (and littered with ads) but has pretty good articles even on modern topics (of course facts you find there are in the public domain). Practically for any specialized topic it is nowadays possible to find its own wiki on the Internet.
There exist [forks](fork.md) and alternatives to Wikipedia. Simple English Wikipedia can offer a simpler alternative to sometimes overly complicated articles on the main English Wikipedia. [Citizendium](citizendium.md) is a similar online encyclopedia co-founded by [Larry Sanger](larry_sanger.md), a co-founder of Wikipedia itself, which is however [proprietary](proprietary.md) ([NC](nc.md) license). Citizendium's goal is to improve on some weak point of Wikipedia such as its reliability or quality of writing. [Metapedia](metapedia.md) is a Wikipedia fork that's written from a [rightist](left_right.md) point of view. [Infogalactic](infogalactic) is also a Wikipedia fork that tries to remove the [pseudoleftist](pseudoleft.md) bullshit etc. Encyclopedia Britannica can also be used as a nice resource: its older versions are already [public domain](public_domain.md) and can be found e.g. at [Project Gutenberg](gutenberg.md), and there is also a modern online version of Britannica which is [proprietary](proprietary.md) (and littered with ads) but has pretty good articles even on modern topics (of course facts you find there are in the public domain). Practically for any specialized topic it is nowadays possible to find its own wiki on the Internet.
## Good And Bad Things About Wikipedia

Loading…
Cancel
Save