This commit is contained in:
Miloslav Ciz 2023-12-18 08:02:57 +01:00
parent 3461c669cf
commit a91dd26cb1
3 changed files with 19 additions and 12 deletions

View file

@ -7,12 +7,13 @@ Using approximations however doesn't have to imply decrease in precision of the
Examples of approximations: Examples of approximations:
- **[Distances](distance.md)**: instead of expensive **Euclidean** distance (`sqrt(dx^2 + dy^2)`) we may use **Chebyshev** distance (`dx + dy`) or **Taxicab** distance (`max(dx,dy)`). - **[Distances](distance.md)**: instead of expensive **Euclidean** distance (`sqrt(dx^2 + dy^2)`) we may use **Chebyshev** distance (`dx + dy`) or **Taxicab** distance (`max(dx,dy)`).
- **Engineering approximations** ("guesstimations"): e.g. **sin(x) = x** for "small" values of *x* or **pi = 3** (integer instead of float). - **Engineering approximations** ("guesstimations"): e.g. **sin(x) = x** for "small" values of *x* or **[pi](pi.md) = 3** (integer instead of float).
- **Physics engines**: complex triangle meshes are approximated with simple analytical shapes such as **spheres**, **cuboids** and **capsules** or at least **convex hulls** which are much easier and faster to deal with. They also approximate **relativistic** physics with **Newtonian**. - **[Physics engines](physics_engine.md)**: complex triangle meshes are approximated with simple analytical shapes such as **spheres**, **cuboids** and **capsules** or at least **convex hulls** which are much easier and faster to deal with. They also approximate **relativistic** physics with **Newtonian**.
- **Addition/subtraction** can sometimes be approximates with [OR](or.md)/[AND](and.md) operation, as they behave a bit similarly. This can be used e.g. for brightening/darkening of pixel colors in [332](rgb332.md) or [565](rgb565.md) format -- without the approximation addition of colors in these formats is very expensive (basically requires conversion to RGB, addition, clamping and a conversion back). - **Addition/subtraction** (of integers) can sometimes be approximated with logical [OR](or.md)/[AND](and.md) operations, as they behave a bit similarly. This can be used e.g. for brightening/darkening of pixel colors in [332](rgb332.md) or [565](rgb565.md) format -- without the approximation addition of colors in these formats is very expensive (basically requires conversion to RGB, addition, clamping and a conversion back).
- **Real time graphics engines**, on the other hand, normally approximate all shapes with triangle meshes. - **[Square root](sqrt.md)/square** (integer) can be roughly approximated too. E.g. to get a quick "almost square" of a number you can try something like doubling each binary digit and shifting everything right, e.g. `101` -> `11001` -- it's not very accurate but may be good enough e.g. for some graphics effects and may be especially effective as hardware implementation as it works instantly and uses literally no [logic gates](logic_gate.md) (you just reorder bits)! A bit improved version may construct a pair of digits from each digit as logical AND (upper bit) and logical OR (lower bit) of the bit with its lower neighbor (lowest bit may still just be doubled), e.g. `1101` -> `11010111`. Square root can similarly be roughly estimated by reducing each pair of bits with logical OR sown to a single bit (e.g. `101100` -> `110`). { Dunno if this is actually used anywhere, I came up with this once before I fell asleep. ~drummyfish } A famous hack in Quake, called *fast inverse square root*, uses a similar approximation in [floating point](float.md).
- **[Ray tracing](ray_tracing.md)** neglects indirect lighting. Computer graphics in general is about approximating the solution of the rendering equation. - **[3D graphics](3d_rendering.md)** is almost completely about approximations, e.g. basically all shapes are approximated with triangle meshes, [screen space](screen_space.md) effects (like [SSAO](ssao.md)) are used to approximate global illumination, reflections etc. Similarly [ray tracing](ray_tracing.md) neglects indirect lighting etcetc.
- **Real numbers** are practically always approximated with [floating point](floating_point.md) or [fixed point](fixed_point.md) (rational numbers). - **[Real numbers](real_number.md)** are practically always approximated with [floating point](floating_point.md) or [fixed point](fixed_point.md) (rational numbers).
- **[Numerical methods](numerical.md)** offer generality and typically yield approximate solutions while their precision vs speed can be adjusted via parameters such as number of iterations. - **[Numerical methods](numerical.md)** offer generality and typically yield approximate solutions while their precision vs speed can be adjusted via parameters such as number of iterations.
- **[Taylor series](taylor_series.md)** approximates given mathematical function and can be used to e.g. estimate solutions of [differential equations](differential_equation.md). - **[Taylor series](taylor_series.md)** approximates given mathematical function and can be used to e.g. estimate solutions of [differential equations](differential_equation.md).
- Primitive [music](music.md) synthesis often uses simple functions like triangle/saw/square wave to approximate [sin](sin.md) waves (though many times it's done for the actual sound of these waves, sometimes it may be simply to save on resources).
- ... - ...

View file

@ -59,9 +59,12 @@ The following is a list of software usually considered a good, typical example o
- [IDEs](ide.md) such as [VSCode](vscode.md) or [NetBeans](netbeans.md). - [IDEs](ide.md) such as [VSCode](vscode.md) or [NetBeans](netbeans.md).
- Big [game engines](game_engine.md) such as [Unreal](unreal_engine.md), [Unity](unity.md) or [Godot](godot.md). - Big [game engines](game_engine.md) such as [Unreal](unreal_engine.md), [Unity](unity.md) or [Godot](godot.md).
- Practically all commercial [games](games.md) made in the [21st century](21st_century.md) such as [World of Warcraft](wow.md), Call of Duty etc. - Practically all commercial [games](games.md) made in the [21st century](21st_century.md) such as [World of Warcraft](wow.md), Call of Duty etc.
- office programs (e.g. M$ Office and [LibreOffice](libreoffice.md))
- [Neural networks](neural_network.md) aka "AI" that is forced into everything nowadays. - [Neural networks](neural_network.md) aka "AI" that is forced into everything nowadays.
- ... - ...
Some of these programs may be replaced with smaller bloat that basically does the same thing (e.g. produces the same output) just with less bullshit around, for example Libreoffice with [Ted](ted.md), [Godot](godot.md) with [Irrlicht](irrlicht.md), Firefox with [badwolf](badwolf.md) etc., however many times the spectacular pompous results these programs produce just cannot essentially be reproduced by anything minimal, wanting to achieve this is really a beginner mistake, the same as wanting to achieve the "Windows experience" on a GNU system. You will never be able to make an Unreal Engine style graphics with a minimalist game engine, just like you won't be able to shoot up your school with well written poetry (in both cases the former is something bad that however most Americans want to do, the latter is something truly good they should want instead). To truly get rid of bloat one has to become able to use truly minimal programs; this means unlearning the indoctrination that "bigger results are better", one has to understand that minimal results themselves are superior AND in addition allow using superior programs (i.e. minimal ones).
## Medium And Small Bloat ## Medium And Small Bloat
Besides the typical big programs that even normies admit are bloated there exists also a smaller bloat which many people don't see as such but which is nevertheless considered unnecessarily complex by some experts and/or idealists and/or hardcore minimalists, including [us](lrs.md). Besides the typical big programs that even normies admit are bloated there exists also a smaller bloat which many people don't see as such but which is nevertheless considered unnecessarily complex by some experts and/or idealists and/or hardcore minimalists, including [us](lrs.md).
@ -93,11 +96,11 @@ Small/medium bloat includes for example:
- [glibc](glibc.md), [gcc](gcc.md), [clang](clang.md) etc. (better alternatives are [tcc](tcc.md), [musl](musl.md), [uclibc](uclibc.md) etc.) - [glibc](glibc.md), [gcc](gcc.md), [clang](clang.md) etc. (better alternatives are [tcc](tcc.md), [musl](musl.md), [uclibc](uclibc.md) etc.)
- letter accents/diacritics (can normally be ignored in most languages that use them) - letter accents/diacritics (can normally be ignored in most languages that use them)
- [jpg](jpg.md), [png](png.md), [svg](svg.md) and similar formats (e.g. [ppm](ppm.md) or [farbfeld](farbfeld.md) is better) - [jpg](jpg.md), [png](png.md), [svg](svg.md) and similar formats (e.g. [ppm](ppm.md) or [farbfeld](farbfeld.md) is better)
- [syntax highlight](syntax_highlight.md) and just [colors](color.md) anywhere they aren't absolutely necessary - [syntax highlight](syntax_highlight.md), text formatting, [rich text](rich_text.md) and just [colors](color.md) anywhere they aren't absolutely necessary
- [html](html.md), [markdown](md.md) ([plain text](plaintext.md) is better) - [html](html.md), [markdown](md.md) ([plain text](plaintext.md) is better)
- [x86](x86.md) instruction set (TODO: what's better? probably some [RISC](risc.md)) - [x86](x86.md) instruction set (TODO: what's better? probably some [RISC](risc.md))
- any non-[public-domain](public_domain.md) license (any legal burden introduced by a license is unnecessary bloat) - any non-[public-domain](public_domain.md) license (any legal burden introduced by a license is unnecessary bloat)
- dynamic [linking](linking.md) (static linking is better) - dynamic [linking](linking.md)/libraries (static linking is better, see [Stali](stali.md))
- [web](web.md) 1.0, [gemini](gemini.md) ([gopher](gopher.md) or [FTP](ftp.md) is better) - [web](web.md) 1.0, [gemini](gemini.md) ([gopher](gopher.md) or [FTP](ftp.md) is better)
- [mouse](mouse.md) (keyboard is better) - [mouse](mouse.md) (keyboard is better)
- [TCP](tcp.md) ([UDP](udp.md) is probably better) - [TCP](tcp.md) ([UDP](udp.md) is probably better)

View file

@ -3,7 +3,7 @@
This is an auto-generated article holding stats about this wiki. This is an auto-generated article holding stats about this wiki.
- number of articles: 526 - number of articles: 526
- total size of all texts in bytes: 2606069 - total size of all texts in bytes: 2608948
longest articles: longest articles:
@ -23,6 +23,12 @@ longest articles:
latest changes: latest changes:
``` ```
Date: Sun Dec 17 18:21:35 2023 +0100
bilinear.md
creative_commons.md
interpolation.md
public_domain.md
wiki_stats.md
Date: Sat Dec 16 20:32:58 2023 +0100 Date: Sat Dec 16 20:32:58 2023 +0100
assembly.md assembly.md
censorship.md censorship.md
@ -50,8 +56,5 @@ wiki_style.md
Date: Thu Dec 14 23:38:44 2023 +0100 Date: Thu Dec 14 23:38:44 2023 +0100
lrs_wiki.md lrs_wiki.md
main.md main.md
operating_system.md
wiki_stats.md
Date: Thu Dec 14 21:08:58 2023 +0100
``` ```