This commit is contained in:
Miloslav Ciz 2023-03-30 21:47:53 +02:00
parent cc46586935
commit 0707639560
7 changed files with 94 additions and 8 deletions

2
42.md
View file

@ -1,6 +1,6 @@
# 42
*HAHAHAHAHAHAHAHAHAHHHHAAA BAZINGA* --Sheldon fan
*"HAHAHAHAHAHAHAHAHAHHHHAAA BAZINGA"* --Sheldon fan
42 is an even integer with prime factorization of 2 * 3 * 7. This number was made kind of famous (and later overused in pop culture to the point of completely destroying the [joke](jokes.md)) by Douglas Adams' book The Hitchhiker's Guide to the Galaxy in which it appears as the answer to the ultimate question of life, the Universe and everything (the point of the joke was that this number was the ultimate answer computed by a giant supercomputer over millions of years, but it was ultimately useless as no one knew the question to which this number was the answer).

4
c.md
View file

@ -58,12 +58,12 @@ The standard library (libc) is a subject of live debate because while its interf
Nothing is [perfect](perfect.md), not even C; it was one of the first relatively higher level languages and even though it has showed to have been designed extremely well, some things didn't age great, or were simply bad from the start. We still prefer this language as usually the best choice, but it's good to be aware of its downsides or smaller issues, if only for the sake of one day designing a better language. Keep in mind all here are just suggestions, they made of course be a subject to counter arguments and further discussion. So, let's go:
- **C specification (the ISO standard) is [proprietary](proprietary.md)** :( The language itself probably can't be copyrighted, nevertheless this may change in the future, and a proprietary specs lowers C's accessibility and moddability (you can't make derivative versions of the spec).
- **The specification is also long as fuck**. A good, free language should have a simple definition. It could be simplified a lot by simplifying the language itself as well as dropping some truly legacy considerations (like [BCD](bcd.md) systems?) and removing a lot of undefined behavior.
- **The specification is also long as fuck**, indicating some kind of [bloat](bloat.md). A good, free language should have a simple definition. It could be simplified a lot by simplifying the language itself as well as dropping some truly legacy considerations (like [BCD](bcd.md) systems?) and removing a lot of undefined behavior.
- **Some behavior is weird and has exceptions**, for example a function can return anything, including a `struct`, except for an array. This makes it awkward to e.g. implement vectors which would best be made as arrays but you want functions to return them, so you may do hacks like wrapping them instide a struct just for this.
- **Some things could be made simpler**, e.g. using [reverse polish](reverse_polish.md) notation for expressions, rather than expressions with brackets and operator precedence, would make implementations much simpler, increasing sucklessness (of course readability is an argument).
- **Some things could be dropped entirely** ([enums](enum.md), [bitfields](bitfield.md), possibly also unions etc.), they can be done and imitated in other ways without much hassle.
- **The preprocessor isn't exactly elegant**, it has completely different syntax and rules from the main language, not very suckless -- ideally preprocessor uses the same language as the base language.
- **The syntax isn't perfect**, e.g. it's pretty weird that the condition after `if` has to be in brackets, it could be designed better. Keywords also might be better being single chars, like `?` instead of `if` or the weird long ass names with spaces like `unsigned long long` could be made nicer. A shorter, natural-language-neutral source code would be probably better. Both line and block comments could be implemented with a single character (e.g. `#` for line comment, ending with a newline or another `#`, `##` for block comment ending with another `##`?).
- **The syntax is sucky**, e.g. data type names may consist of multiple tokens (`long long int` etc.), also it's pretty weird that the condition after `if` has to be in brackets, it could be designed better. Keywords also might be better being single chars, like `?` instead of `if` etc. A shorter, natural-language-neutral source code would be probably better. Both line and block comments could be implemented with a single character (e.g. `#` for line comment, ending with a newline or another `#`, `##` for block comment ending with another `##`?).
- **Some basic things that are part of libraries or extensions**, like fixed with types and binary literals and possibly very basic I/O (putchar/readchar) could be part of the language itself.
- **Some undefined behavior might be better defined** -- undefined behavior isn't bad in general, it is what allows C to be so fast and efficient in the first place, but some of it has shown to be rather cumbersome; for example the unspecified representation of integers, their binary size and behavior of floats leads to a lot of trouble (unknown upper bounds, sizes, undefined behavior of many operators etc.) while practically all computers have settled on using 8 bit bytes and [two's complement](twos_complement.md) -- this could easily be made a mandatory assumption which would simplify great many things without doing basically any harm. New versions of C actually already settle on two's complement. This doesn't mean C should be shaped to reflect the degenerate "[modern](modern.md)" trends in programming though!
- All that stuff with *.c* and *.h* files is unnecessary, there should just be one file type -- this isn't part of the language per se, but it's part of its culture.

View file

@ -32,7 +32,7 @@ The following is a list of just SOME attributes of capitalism -- note that not a
- **artificial crippling of technology**: It is nowadays the norm to create a high tier product, such as a CPU or a car, and then artificially cripple some of the manufactured units (limit car engine power by software, burn parts of the CPU, ...) so as to sell them as a lower tier of that product. It is cheaper than to separately invent several tiers of the product. So it costs the same (actually less) to create a high end CPU as the low end one -- we could all be using high end CPUs, but the poorer of us are forced to use the forcefully crippled versions, because "capitalism".
- **purposeful incompatibility in technology**: In market competition products of one company will often be incompatible with products of the competition on purpose, so as to discourage consumers from buying it. Technology corporations create their own "ecosystems" for consumers into which they are trying to lock them.
- **[bullshit jobs](bullshit_job.md), invention of bullshit products/needs**: As automatization takes people's jobs, people try to keep jobs by creating artificial bullshit, e.g. "lack of women in tech" leads to creation of "diversity departments", politicians try to *create more jobs* by increasing bureaucracy etc. This is of course in direct conflict with the base goal of civilization itself of eliminating the need for human work. One online company even successfully sold literal excrement (which had no actual use, it was just marketed as "funny and cool").
- **preventing progress, sustaining status quo**: Capitalism is extremely hostile towards social progress (more leisure time, more social security, ...), i.e. the main kind of progress. It is also, contrary to popular belief, against technological progress -- the established corporations want to perpetuate their established businesses and will attack and destroy new ideas that endanger it (i.e. electric cars vs fuel powered cars, ...).
- **preventing progress, sustaining status quo**: Capitalism is extremely hostile towards social progress (more leisure time, more social security, ...), i.e. the main kind of progress (all progress should eventually serve well being of people, otherwise it's just artificial self-serving burden). It is also, contrary to popular belief, against technological progress -- the established corporations want to perpetuate their established businesses and will attack and destroy new ideas that endanger it (i.e. electric cars vs fuel powered cars, food corporations vs the solution of world hunger etc.). Capitalism prevents realization of any idea that's physically possible but which is **economically impossible**, ruling out e.g. many solutions to global heating etc.
- **[fascism](fascism.md)**: Capitalism is based on fascism, i.e. extreme hierarchy and "tribes" of which each fights to death for its own self interest. This fight happens between companies themselves, between state and companies, different departments inside companies, between workers and employers, between brands on the market etc.
- **no long term planning, irresponsibility**: Companies need to make immediate profit, it's extremely rare to plan longer than 5 years ahead. Managers hired to new positions are expected to immediately increase profits and they won't stay for long, so they simply do whatever it takes to create immediate profit without considering any long term consequence such as pollution etc.
- **extreme lowering of quality of products, deterioration of [art](art.md)**: Despite capitalist propaganda, capitalism doesn't lead to increased quality of products -- on the contrary it seeks to find the MINIMUM quality that will be accepted by the consumer. In seeking to minimize manufacturing cost of a single unit, companies save money wherever they can and rather invest in marketing etc. -- for example instead of paying several experts to produce a good, well fact-checked documentary, only one man will be paid to create the documentary with the focus on it being "fun and engaging" rather than factually correct. Art is hasted, scheduled, produced on short deadlines, littered with product placement etc.

2
coc.md
View file

@ -1,6 +1,6 @@
# Code of Conduct
Code of conduct (COC), also Code of coercion, is a shitty invention of [SJW](sjw.md) fascists that dictates how development of specific software should be conducted, generally pushing toxic woke concepts such as forced inclusivity or use of politically correct language. COC is typically placed in the software repository as a `CODE_OF_CONDUCT` file. In practice COCs are used to kick people out of development because of their political opinions expressed anywhere, inside or outside the project, and to push political opinions through software projects.
Code of conduct (COC), also code of coercion, is a shitty invention of [SJW](sjw.md) fascists that dictates how development of specific software should be conducted, generally pushing toxic woke concepts such as forced inclusivity or use of politically correct language. COC is typically placed in the software repository as a `CODE_OF_CONDUCT` file. In practice COCs are used to kick people out of development because of their political opinions expressed anywhere, inside or outside the project, and to push political opinions through software projects.
**[LRS](lrs.md) must never include any COC**, with possible exceptions of anti-COC (such as NO COC) or parody style COCs, not because we dislike genuine inclusivity, but because we believe COCs are bullshit and mostly harmful as they support bullying, censorship and exclusion of people.

View file

@ -8,6 +8,6 @@ Information is knowledge that can be used for making decisions. Information is i
In [computer science](compsci.md) the basic unit of information amount is 1 **[bit](bit.md)** (for *binary digit*), also known as [shannon](shannon.md). It represents a choice of two possible options, for example an answer to a *yes/no* question, or one of two [binary](binary.md) digits: 0 or 1. From this we derive higher units such as [bytes](byte.md) (8 bits), [kilobytes](memory_units.md) (1000 bytes) etc. Other units of information include [nat](nat.md) or [hart](hart.md). With enough bits we can encode any information including text, sounds and images. For this we invent various [formats](file_format.md) and encodings with different properties: some encodings may for example contain [redundant](redundancy.md) data to ensure the encoded information is preserved even if the data is partially lost. Some encodings may try to hide the contained information (see [encryption](encryption.md), [obfuscation](obfuscation.md), [steganography](steganography.md)). For processing information we create [algorithms](algorithm.md). We store information in computer [memory](memory.md) or on storage media such as [CDs](cd.md), or with traditional potentially [analog](analog.md) media such as photographs or books.
The opposite measure of information is **[entropy](entropy.md)**; it is measured in same units but says how much information is missing rather than what is present.
The opposite measure of information is **[entropy](entropy.md)** (called information or Shannon entropy, similar but distinct from the concept of thermodynamic entropy in physics); it is measured in same units but says how much information is missing rather than what is present (i.e. it measures uncertainty).
According to the [theory of relativity](relativity.md) **information can never travel [faster than light](speed_of_light.md)** -- even if some things may move faster than light, such as a shadow, so called "spooky action at a distance" (usually associated with quantum [entanglement](entanglement.md)) or even matter due to the expansion of space, by our best knowledge we can never use this to transfer information faster than light. For this it seems our communication technology will always be burdened by [lag](lag.md), no matter how sophisticated.

86
speech_synthesis.md Normal file
View file

@ -0,0 +1,86 @@
# Speech Synthesis
TODO
## Example
This is a simple [C](c.md) program (using [float](float.md) for simplicity of demonstration) that creates basic vowel sounds using formant synthesis (run e.g. as `gcc -lm program.c && ./a.out | aplay`, 8000 Hz 8 bit audio is supposed):
```
#include <stdio.h>
#include <math.h>
double vowelParams[] = { // vocal tract shapes, can be found in literature
// formant1 formant2 width1 width2 amplitude1 amplitude2
850, 1650, 500, 500, 1, 0.2, // a
390, 2300, 500, 450, 1, 0.9, // e
240, 2500, 300, 500, 1, 0.5, // i
250, 600, 500, 400, 1, 0.9, // o
300, 400, 400, 400, 1, 1.0 // u
};
double tone(double t, double f) // tone of given frequency
{
return sin(f * t * 2 * M_PI);
}
/* simple linear ("triangle") function for modelling spectral shape
of one formant with given frequency location, width and amplitude */
double formant(double freq, double f, double w, double a)
{
double r = ((freq - f + w / 2) * 2 * a) / w;
if (freq > f)
r = -1 * (r - a) + a;
return r > 1 ? 1 : (r < 0 ? 0 : r);
}
/* gives one sample of speech, takes two formants as input, fundamental
frequency and possible offset of both formants (can model "bigger/smaller
head") */
double speech(double t, double fundamental, double offset,
double f1, double f2,
double w1, double w2,
double a1, double a2)
{
int harmonic = 1; // number of harmonic frequency
double r = 0;
/* now generate harmonics (multiples of fundamental frequency) as the source,
and multiply them by the envelope given by formants (no need to deal with
multiplication of spectra; as we're constructing the result from basic
frequencies, we can simply multiply each by one directly): */
while (1)
{
double f = harmonic * fundamental;
double formant1 = formant(f,f1 + offset,w1,a1);
double formant2 = formant(f,f2 + offset,w2,a2);
// envelope = max(formant1,formant2)
r += (formant1 > formant2 ? formant1 : formant2) * 0.1 * tone(t,f);
if (f > 10000) // stop generating harmonics above 10000 Hz
break;
harmonic++;
}
return r > 1.0 ? 1.0 : (r < 0 ? 0 : r); // clamp between 0 and 1
}
int main(void)
{
for (int i = 0; i < 50000; ++i)
{
double t = ((double) i) / 8000.0;
double *vowel = vowelParams + ((i / 4000) % 5) * 6; // change vowels
putchar(128 + 127 *
speech(t,150,-100,vowel[0],vowel[1],vowel[2],vowel[3],vowel[4],vowel[5]));
}
return 0;
}
```

4
usa.md
View file

@ -1,9 +1,9 @@
# USA
United States of America (USA, US or just "murika") is a [dystopian](dystopia.md) country of fat, stupid fascist people enslaved by [capitalism](capitalism.md), people endlessly obsessed with money and wars. USA consists of 50 states located in North America, a continent that ancestors of Americans invaded and have stolen from Indians, the natives whom Americans mass murdered.
United States of America (USA, US or just "murika") is a [dystopian](dystopia.md) country of fat, stupid fascist people enslaved by [capitalism](capitalism.md), people endlessly obsessed with things such as money, wars, shooting their presidents and shooting up their schools. USA consists of 50 states located in North America, a continent that ancestors of Americans invaded and have stolen from Indians, the natives whom Americans mass murdered.
USA is very similar to [North Korea](north_korea.md): in both countries the people are successfully led to believe their country is the best. North Korea is ruled by a single political party, US is ruled by two practically same militant capitalist imperialist parties (democrats and republicans), i.e. de-facto one party as well. Both countries are obsessed with weapons and their military, both are highly and openly [fascist](fascism.md) (nationalist). Both countries are full of extreme [propaganda](propaganda.md), [censorship](censorship.md) and greatly support cult of personality, people worship dictators such as Kim Jong-un or [Steve Jobs](steve_jobs.md). US is even worse than North Korea because it exports its toxic culture over the whole world and constantly invades other countries, it is destroying all other cultures and leads the whole world to doom and destruction of all life.
In US mainstream [politics](politics.md) there exists no true left, only [right](left_right.md) and [pseudoleft](pseudoleft.md). It is only in extreme underground, out of the sight of most people, where occasionally something good comes into existence as an exception to a general rule that nothing good comes from the US. One of these exceptions is [free software](free_software.md) (established by [Richard Stallman](rms.md)) which was however quickly smothered by the capitalist [open source](open_source.md) counter movement.
On 6th and 9th August 1945 USA casually killed about 200000 civilians, most of whom were innocent men, women and children, by throwing atomic bombs on Japanese cities Hiroshima and Nagasaki. The men who threw the bombs and ordered the bombing were never put on trial, actually most Americans accepted it as a good thing to do lol.
On 6th and 9th August 1945 **USA casually killed about 200000 civilians**, most of whom were innocent men, women and children, by throwing atomic bombs on Japanese cities Hiroshima and Nagasaki. The men who threw the bombs and ordered the bombing were never put on trial, actually most Americans praise them as [heroes](hero_culture.md) and think it was a good thing to do.