From c25381cf0e9a841eab8926cf304e65699bfbb6fa Mon Sep 17 00:00:00 2001 From: Miloslav Ciz Date: Mon, 30 Oct 2023 21:42:20 +0100 Subject: [PATCH] Update --- ascii_art.md | 20 ++++++++++---------- bullshit.md | 2 +- chess.md | 3 ++- disease.md | 1 + fixed_point.md | 3 ++- float.md | 2 +- line.md | 10 +++++----- rock.md | 16 +++++++++++++++- shader.md | 2 +- 9 files changed, 38 insertions(+), 21 deletions(-) diff --git a/ascii_art.md b/ascii_art.md index 676d437..e081253 100644 --- a/ascii_art.md +++ b/ascii_art.md @@ -10,22 +10,22 @@ Here is a simple 16-shade ASCII [palette](palette.md) (but watch out, whether it _,,_ / ';_ . ( 0 _/ "-._ - |\ \_ /_==-"""' - | |:---' ( - \ \__." ) Steamer - '--_ __--' Duck! - |L_ - - - [] [][][][][] - [][][] [][] + |\ \_ /_==-"""' .~~~~~~~~;~~~~~~~~. + | |:---' ( | ASCII | tables | + \ \__." ) Steamer |========I========| + '--_ __--' Duck! | are | | + |L_ |--------{ =) | + | the | | + |--------+--------| + [] [][][][][] | best | tables | + [][][] [][] |________|________| [][] [] [] XX XX[] [] XXXX [] [][] [] [][][] [][] [] [][][][][] - + SAF FTW ^ diff --git a/bullshit.md b/bullshit.md index 71a604f..fbad9a4 100644 --- a/bullshit.md +++ b/bullshit.md @@ -2,7 +2,7 @@ TODO -**Simplified example of capitalist bullshit**: under [capitalism](capitalism.md) basically the whole society is based on bullshit of many kinds, small and big, creating many bullshit clusters that are all intertwined and interact in complex ways, creating one huge bullshit. For simplicity let's consider an educated isolated bullshit cluster (that we won't see that often in reality), a hypothetical [car](car.md) factory. No matter how the factory came to be, it now ended up making cars for people so that these people can drive to work at the car factory to make more cars for other people who will work to the car factory to make cars etc. -- a bullshit cycle that exists just for its own sake, just wastes natural resources and lives of people. Of course at one point all the factory employees will own a car and the factory will have no more demand for the cars, which threatens its existence. Here capitalism employs adding more bullshit: let's say they create new bullshit jobs they call something like "[smart](smart.md) car research center" -- this will create new work position, i.e. more people who will need cars to drive to work, but MAILY the job of these people will be adding [artificial obsolescence](artificial_obsolescence.md) to the cars, which will make them last much shorter time and regularly break so that they will need repairs using parts manufactured at the factory, creating more work that will need to be done and more bullshit jobs in the car repair department. Furthermore the team will make the cars completely dependent on [subscription](subscription.md) software, employing [consumerism](consumerism.md), i.e. the car will no longer be a "buy once" thing but rather something one has to keep feeding constantly (fuel, software subscription, insurance, repairs, cleaning, tire changes, and of course once in a few years just buying a new non-obsolete model), so that workers will still need to drive to work every day, perpetuating their need for being preoccupied with owning and [maintaining](maintenance.md) a car. This is a bullshit cluster society could just get rid of without any cost, on the contrary it would gain many free people who could do actually useful things like curing diseases, eliminating world hunger, creating art for others to enjoy. However if you tell a capitalist any part of this system is bullshit, he will defend it by its necessity in the system as a whole ("How will people get to work without cars?!", "Factories are needed for the economy!", "Economy is needed to drive manufacturing of cars!") -- in reality the bullshit clusterfuck spans the whole world to incredibly deep levels so you just can't make many people see it, especially when they're preoccupied with maintaining their own existence and just get by within it. +**Simplified example of capitalist bullshit**: under [capitalism](capitalism.md) basically the whole society is based on bullshit of many kinds, small and big, creating many bullshit clusters that are all intertwined and interact in complex ways, creating one huge bullshit. For simplicity let's consider an educational isolated bullshit cluster (that we won't see that often in reality), a hypothetical [car](car.md) factory. No matter how the factory came to be, it now ended up making cars for people so that these people can drive to work at the car factory to make more cars for other people who will work to the car factory to make cars etc. -- a bullshit cycle that exists just for its own sake, just wastes natural resources and lives of people. Of course at one point all the factory employees will own a car and the factory will have no more demand for the cars, which threatens its existence. Here capitalism employs adding more bullshit: let's say they create new bullshit jobs they call something like "[smart](smart.md) car research center" -- this will create new work position, i.e. more people who will need cars to drive to work, but MAILY the job of these people will be adding [artificial obsolescence](artificial_obsolescence.md) to the cars, which will make them last much shorter time and regularly break so that they will need repairs using parts manufactured at the factory, creating more work that will need to be done and more bullshit jobs in the car repair department. Furthermore the team will make the cars completely dependent on [subscription](subscription.md) software, employing [consumerism](consumerism.md), i.e. the car will no longer be a "buy once" thing but rather something one has to keep feeding constantly (fuel, software subscription, insurance, repairs, cleaning, tire changes, and of course once in a few years just buying a new non-obsolete model), so that workers will still need to drive to work every day, perpetuating their need for being preoccupied with owning and [maintaining](maintenance.md) a car. This is a bullshit cluster society could just get rid of without any cost, on the contrary it would gain many free people who could do actually useful things like curing diseases, eliminating world hunger, creating art for others to enjoy. However if you tell a capitalist any part of this system is bullshit, he will defend it by its necessity in the system as a whole ("How will people get to work without cars?!", "Factories are needed for the economy!", "Economy is needed to drive manufacturing of cars!") -- in reality the bullshit clusterfuck spans the whole world to incredibly deep levels so you just can't make many people see it, especially when they're preoccupied with maintaining their own existence and just get by within it. \ No newline at end of file diff --git a/chess.md b/chess.md index da37ab5..afd8616 100644 --- a/chess.md +++ b/chess.md @@ -269,4 +269,5 @@ Chess is only mildly [bloated](bloat.md) but what if we try to unbloat it comple - [hexapawn](hexapawn.md) - [checkers](checkers.md) - [backgammon](backgammon.md) -- [Deep Blue](deep_blue.md) \ No newline at end of file +- [Deep Blue](deep_blue.md) +- [anal bead](anal_bead.md) \ No newline at end of file diff --git a/disease.md b/disease.md index 9f823d6..c1baa26 100644 --- a/disease.md +++ b/disease.md @@ -10,6 +10,7 @@ The following is a list of common diseases. - [data hoarding](data_hoarding.md) - [depression](depression.md) - [egoism](egoism.md) +- [furry](furry.md) disorder - [homosexuality](gay.md) - hopping: - [browser hopping](browser_hopping.md) diff --git a/fixed_point.md b/fixed_point.md index 24102d0..60aa62a 100644 --- a/fixed_point.md +++ b/fixed_point.md @@ -7,7 +7,8 @@ Fixed point has at least these advantages over floating point: - **It doesn't require a special hardware coprocessor** for efficient execution and so doesn't introduce a [dependency](dependency.md). Programs using floating point will run extremely slowly on systems without float hardware support as they have to emulate the complex hardware in software, while fixed point will run just as fast as integer arithmetic. For this reason fixed point is very often used in [embedded](embedded.md) computers. - It is **natural, easier to understand and therefore better predictable**, less tricky, [KISS](kiss.md), [suckless](sukless.md). (Float's IEEE 754 standard is 58 pages long, the paper *What Every Computer Scientist Should Know About Floating-Point Arithmetic* has 48 pages.) - Is easier to implement and so **supported in many more systems**. Any language or format supporting integers also supports fixed point. -- Isn't ugly and in [two's complement](twos_complement.md) **doesn't waste values** (unlike IEEE 754 with positive and negative zero, denormalized numbers, many [NaNs](nan.md) etc.). +- It isn't ugly and in [two's complement](twos_complement.md) **doesn't waste values** (unlike IEEE 754 with positive and negative zero, denormalized numbers, many [NaNs](nan.md) etc.). +- Some simpler (i.e. better) programming languages such as [comun](comun.md) don't support float at all, while fixed point can be used in any language that supports integers. ## How It Works diff --git a/float.md b/float.md index aeface0..e4acc16 100644 --- a/float.md +++ b/float.md @@ -35,7 +35,7 @@ Note a few things: firstly our format is [shit](shit.md) because some numbers ha Secondly notice the non-uniform distribution of our numbers: while we have a nice resolution close to 0 (we can represent 1/16, 2/16, 3/16, ...), our resolution in high numbers is low (the highest number we can represent is 56 but the second highest is 48, we can NOT represent e.g. 50 exactly). Realize that obviously with 6 bits we can still represent only 64 numbers at most! So float is NOT a magical way to get more numbers, with integers on 6 bits we can represent numbers from 0 to 63 spaced exactly by 1 and with our floating point we can represent numbers spaced as close as 1/16th but only in the region near 0, we pay the price of having big gaps in higher numbers. -Also notice that thing like simple addition of numbers become more difficult and time consuming, you have to include conversions and [rounding](rounding.md) -- while with fixed point addition is a single machine instruction, same as integer addition, here with software implementation we might end up with dozens of instructions (specialized hardware can perform addition fast but still, not all computer have that hardware). +Also notice that things like simple addition of numbers become more difficult and time consuming, you have to include conversions and [rounding](rounding.md) -- while with fixed point addition is a single machine instruction, same as integer addition, here with software implementation we might end up with dozens of instructions (specialized hardware can perform addition fast but still, not all computer have that hardware). Rounding errors will appear and accumulate during computations: imagine the operation 48 + 1/8. Both numbers can be represented in our system but not the result (48.125). We have to round the result and end up with 48 again. Imagine you perform 64 such additions in succession (e.g. in a loop): mathematically the result should be 48 + 64 * 1/8 = 56, which is a result we can represent in our system, but we will nevertheless get the wrong result (48) due to rounding errors in each addition. So the behavior of float can be **non intuitive** and dangerous, at least for those who don't know how it works. diff --git a/line.md b/line.md index 40f3a8f..66d8e6a 100644 --- a/line.md +++ b/line.md @@ -85,7 +85,7 @@ There are many [algorithms](algorithm.md) for line [rasterization](rasterization XX XX a. pixel subpixel subpixel accuracy - accuracy accuracy + anti-aliasing + accuracy accuracy + antialiasing ``` One of the most basic line rasterization algorithms is the [DDA](dda.md) (Digital differential analyzer), however it is usually better to use at least the [Bresenham's line algorithm](bresenham.md) which is still simple and considerably improves on DDA by not requiring multiplication or division (slow operations) and by only using integers (no [floating point](float.md)). @@ -128,8 +128,8 @@ void drawLine(int ax, int ay, int bx, int by) { drawPixel(ax,ay); + steps--; *x += stepX; - bx += dy; if (bx >= dx) @@ -137,8 +137,8 @@ void drawLine(int ax, int ay, int bx, int by) bx -= dx; *y += stepY; } - - steps--; } } -``` \ No newline at end of file +``` + +To add [antialiasing](antialiasing.md) here you wouldn't just draw one pixel at each step but two, right next to each other, between which you'd distribute the intensity in the ratio given by current error. \ No newline at end of file diff --git a/rock.md b/rock.md index 2c962f2..dd57953 100644 --- a/rock.md +++ b/rock.md @@ -2,6 +2,19 @@ Rocks and stones are natural formations of minerals that can be used to create the most primitive [technology](technology.md). Stone age was the first stage of our civilization; it was characterized by use of stone tools. Rock [nerds](nerd.md) are called geologists. +``` + ____ + __..--' ''-. + / ' .-'"\ + { . \_. ; \ + ) / , ':. | + ( : . '"} + \_ ( : __/ + ''.__---''' +``` + +*rock* + Rocks are pretty [suckless](suckless.md) and [LRS](lrs.md) because they are simple, they are everywhere, free and can be used in a number of ways such as: - As a building material. @@ -25,4 +38,5 @@ Rocks are pretty [suckless](suckless.md) and [LRS](lrs.md) because they are simp - [sand](sand.md) - [wood](wood.md) -- [metal](metal.md) \ No newline at end of file +- [metal](metal.md) +- [potato](potato.md) \ No newline at end of file diff --git a/shader.md b/shader.md index c9421fb..41ffa49 100644 --- a/shader.md +++ b/shader.md @@ -6,7 +6,7 @@ The word *shader* is also used more loosely to stand for any specific effect, ma Shaders are normally written in a special **shading language** such as [GLSL](glsl.md) in the [OpenGL](opengl.md) [API](api.md), [HLSL](hlsl.md) ([proprietary](proprietary.md)) in [Direct3D](d3d.md) API or the Metal shading language ([proprietary](proprietary.md)) in [Metal](metal.md) API. These languages are often similar to [C](c.md) with some additions (e.g. vector and matrix data types) and simplifications (e.g. no function [recursion](resursion.md)). High level [frameworks](framework.md) like [Blender](blender.md) many times offer [visual programming](visual_programming.md) (point-n-click) of shaders with graph/node editors. -Initially (back in the 90s and early 2000s) shaders were used only for graphics, i.e. to transform 3D vertices, draw triangles and compute pixel colors. Later on as GPUs became more [general purpose](gpgpu.md), flexibility was added to shaders that allowed to solve more problems with the GPU and eventually general *compute* shaders appeared (OpenGL added them in version 3.3 in 2010). +Initially (basically early 2000s) shaders were used only for graphics, i.e. to transform 3D vertices, draw triangles and compute pixel colors. Later on as GPUs became more [general purpose](gpgpu.md), flexibility was added to shaders that allowed to solve more problems with the GPU and eventually general *compute* shaders appeared (OpenGL added them in version 3.3 in 2010). To put shaders in the context, the flow of data is this: a [CPU](cpu.md) uploads some data (3D models, textures, ...) to the GPU and then issues a draw command -- this makes the GPU start its **pipeline** consisting of different **stages**, e.g. the vertices of 3D models are transformed to screens space (the vertex stage), then triangles are generated and rasterized (the shading stage) and the data is output (on screen, to a buffer etc.). Some of these stages are programmable and so they have their own type of a shader. The details of the pipeline differ from API to API, but in general, depending on the type of data the shader processes (the stage), we talk about: