This commit is contained in:
Miloslav Ciz 2023-12-23 19:56:56 +01:00
parent b6b5090c4c
commit 8312cd92c6
13 changed files with 139 additions and 113 deletions

View file

@ -159,10 +159,11 @@ Algorithms are the essence of [computer science](scompsci.md), there's a lot of
## Specific Algorithms
Following are some common algorithms classified into groups.
Following are some well known algorithms.
- [graphics](graphics.md)
- [DDA](dda.md): line drawing algorithm
- [discrete Fourier transform](fourier_transform.md): extremely important algorithm expressing signals in terms of frequencies
- [Bresenham's algorithm](bresenham.md): another line drawing algorithm
- [Midpoint algorithm](midpoint_algorithm.md): circle drawing algorithm
- [flood fill](flood_fille.md): algorithm for coloring continuous areas
@ -171,12 +172,14 @@ Following are some common algorithms classified into groups.
- [painter's algorithm](painters_algorithm.md)
- [path tracing](path_tracing.md)
- [ray tracing](ray_tracing.md)
- ...
- [math](math.md)
- [Boot'h algorithm](booths_algorithm.md): algorithm for multiplication
- [Dijkstra's algorithm](dijkstras_algorithm.md)
- [Euclidean algorithm](euclidean_algorithm.md): computes greatest common divisor
- [numerical algorithms](numerical.md): approximate mathematical functions
- [sieve of Eratosthenes](sieve_of_eratosthenes.md): computes [prime numbers](prime.md)
- ...
- [sorting](sorting.md)
- [bogosort](bogosort.md) (stupid sort)
- [bubble sort](bubble_sort.md): simple, kind of slow but still usable sorting algorithm
@ -187,9 +190,11 @@ Following are some common algorithms classified into groups.
- [selection sort](selection_sort.md)
- [slow sort](slow_sort.md)
- [quick sort](quick_sort.md): one of the fastest sorting algorithms
- ...
- [searching](searching.md)
- [binary search](binary_search.md)
- [linear search](linear_search.md)
- ...
- [other](other.md)
- [A*](a_start.md): path searching algorithm, used by [AI](ai.md) in many [games](game.md)
- [backpropagation](backpropagation.md): training of [neural networks](neural_net.md)
@ -205,7 +210,7 @@ Following are some common algorithms classified into groups.
- [RSA](rsa.md)
- [Shor's algorithm](shors_algorithm.md): [quantum](quantum.md) factorization algorithm
- [YouTube](youtube.md) algorithm: secret algorithm YouTube uses to suggest videos to viewers, a lot of people hate it :)
- ...
## See Also

View file

@ -53,18 +53,18 @@ entry:
%tobool = icmp ne i32 %rem, 0
br i1 %tobool, label %cond.true, label %cond.false
cond.true: ; preds = %entry
cond.true: ; preds = %entry
%1 = load i32, i32* %n.addr, align 4
%mul = mul nsw i32 3, %1
%add = add nsw i32 %mul, 1
br label %cond.end
cond.false: ; preds = %entry
cond.false: ; preds = %entry
%2 = load i32, i32* %n.addr, align 4
%div = sdiv i32 %2, 2
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
cond.end: ; preds = %cond.false, %cond.true
%cond = phi i32 [ %add, %cond.true ], [ %div, %cond.false ]
ret i32 %cond
}
@ -80,23 +80,23 @@ entry:
store i32 %sub, i32* %n, align 4
br label %while.body
while.body: ; preds = %entry, %if.end
while.body: ; preds = %entry, %if.end
%0 = load i32, i32* %n, align 4
%call1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %0)
%call1 = call i32 (i8*, ...) @printf(i8* ... )
%1 = load i32, i32* %n, align 4
%cmp = icmp eq i32 %1, 1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %while.body
if.then: ; preds = %while.body
br label %while.end
if.end: ; preds = %while.body
if.end: ; preds = %while.body
%2 = load i32, i32* %n, align 4
%call2 = call i32 @next(i32 %2)
store i32 %call2, i32* %n, align 4
br label %while.body
while.end: ; preds = %if.then
while.end: ; preds = %if.then
ret i32 0
}
@ -104,8 +104,8 @@ declare i32 @getchar(...) #1
declare i32 @printf(i8*, ...) #1
attributes #0 = { noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-features"="+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #0 = { ... }
attributes #1 = { ... }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}

View file

@ -85,7 +85,7 @@ While the old capitalism was more of a steady slavery and the deterioration of s
Slowly "startups" evolve to medium sized businesses and a few will become the big [corporations](corporation.md). These are the first higher entities that have an intelligence of their own, they are composed of humans and technology who together work solely for the corporation's further growth and profit. A corporation has a super human intelligence (combined intelligence of its workers) but has no human emotion or conscience (which is suppressed by the corporation's structure), it is basically the rogue [AI](ai.md) we see in sci-fi horror movies. Corporation selects only the worst of humans for the management positions and has further mechanisms to eliminate any effects of human conscience and tendency for ethical behavior; for example it works on the principle of ["I'm just doing my job"](just_doing_my_job.md): everyone is just doing a small part of what the whole company is doing so that no one feels responsible for the whole or sometimes doesn't even know what he's part of. If anyone protests, he's replaced with a new hire. Of course, many know they're doing something bad but they have no choice if they want to feed their families, and [everyone is doing it](everyone_is_doing_it.md).
Deterioration of society is fast now but people are kept in a false sense of a feeling that "it's just a temporary thing", "it's this individual's fault (not the system's)" and that "it's slowly getting better", mainly with the help of 24/7 allmighty media brainwashing. Due to heavy [greenwashing](greenwashing.), [openwashing](openwashing.md) etc. most people are for example naively convinced that corporations are becoming more "environment friendly", "responsible", "open source" ("Microsoft isn't what it used to be", ...) etc., as if a corporation had something aking emotion instead of pure desire for profit which is its only goal by definition. A corporation will repeat ads telling you it is paying black handicapped gays to plant trees but internally no one gives a shit about anything but making more money, a manager's job is just to increase profit, waste is increasing and dumped to oceans when no one is looking, bullshit is being invented to kickstart more bullshit business which leads to more need for energy wasting (unnecessary transportation, upkeep of factories and workplaces, invention of bullshit technology to solve artificial problems arising from artificial bullshit). A lie repeated 1000 times a day will beat even truth that's evident to naked eye, basic logic and common sense. Even when sky is littered with ads, cities are burning and people are working 20 hours a day, a capitalist will keep saying "this is a good society", "we are just in a temporary crisis", "it is getting better" and "I care about the people", and people will take it as truth.
Deterioration of society is fast now but people are kept in a false sense of a feeling that "it's just a temporary thing", "it's this individual's fault (not the system's)" and that "it's slowly getting better", mainly with the help of 24/7 almighty media brainwashing. Due to heavy [greenwashing](greenwashing.), [openwashing](openwashing.md) etc. most people are for example naively convinced that corporations are becoming more "environment friendly", "responsible", "open source" ("Microsoft isn't what it used to be", ...) etc., as if a corporation had something akin emotion instead of pure desire for profit which is its only goal by definition. A corporation will repeat ads telling you it is paying black handicapped gays to plant trees but internally no one gives a shit about anything but making more money, a manager's job is just to increase profit, waste is increasing and dumped to oceans when no one is looking, bullshit is being invented to kickstart more bullshit business which leads to more need for energy wasting (unnecessary transportation, upkeep of factories and workplaces, invention of bullshit technology to solve artificial problems arising from artificial bullshit). A lie repeated 1000 times a day will beat even truth that's evident to naked eye, basic logic and common sense. Even when sky is littered with ads, cities are burning and people are working 20 hours a day, a capitalist will keep saying "this is a good society", "we are just in a temporary crisis", "it is getting better" and "I care about the people", and people will take it as truth.
Corporations make calculated decisions to eliminate any competition, they devour or kill smaller businesses with unfair practices (see e.g. the [Microsoft's](microsoft.md) infamous [EEE](eee.md)), more marketing and by other means, both legal and illegal. They develop advanced psychological methods and extort extreme pressure such as brainwashing by ads to the population to create an immensely powerful propaganda that bends any natural human thinking. With this corporations no longer need to satisfy the demand, they **create the demand** arbitrarily. They create artificial scarcity, manipulate the market, manipulate the people, manipulate laws (those who make laws are nowadays mostly businessmen who want to strengthen corporations whose shares they hold and if you believe voters can somehow prevent such psychopaths getting this power, just take a look literally at any parliament of any country). At this point they've broken the system, competition no longer works as idealized by theoretical capitalists, corporations can now do practically anything they want.
@ -106,7 +106,7 @@ We can only guess what will happen here, a [collapse](collapse.md) due to instab
Capitalist brainwashing is pretty sophisticated -- unlike with centralized oppressive regimes, capitalism has a decentralized way of creating and spreading propaganda, in ways similar to for example self-replicating and self-modifying malware in the world of software. Creators and promoters of capitalist propaganda are mostly people who are unaware of doing so, they have been brainwashed and programmed by the system itself to behave that way, for example just by being exposed to hearing the capitalist fairy tales since they were born. Some examples of common capitalist propaganda you will probably encounter are the following:
- *"Capitalism is freedom."* -- This is of course a complete twist of the word freedom: capitalism promotes freedom of market which goes against the freedom of people. I.e. the freedom enabled by capitalism is the freedom to abuse others; the freedom to restrict freedoms of others, which is of almost the polar opposite of genuine freedom.
- *"In capitalism everyone can make it if he only works hard."* -- This is firstly of course not even logically possible, it's just as claiming that everyone can win the Olympic games; to reach the top in an extremely competitive system not only do you have to work hard, you also have to be born with the right talent, in the right place, to the right family, and be immensely lucky to be in right places in right times and make correct guess decisions in situations in which it is impossible to know the correct decision. Even if you work 24/7 without sleep, there will be thousands of others who do the same, your success is a pure bet on lottery. **Capitalist fairy tales make heavy use of the [survivorship bias](survivorship_bias.md)** -- you will see movies only about the successful people who are asked how they achieved success and who answer along the lines "I just worked hard". Indeed they did, but this doesn't imply that anyone working hard will succeed, this is the same as taking an advice from a lottery winner; if you ask a lottery winner how he won the lottery, he will simply say "I bet all I had on a random number". Following such advice is of course just about the worse decision you can make. If everyone can make it, why doesn't everyone do it, why don't we have a wold consisting exclusively of billionaires?
- *"In capitalism everyone can make it if he only works hard."* -- This is firstly of course not even logically possible, it's just as claiming that everyone can win the Olympic games; to reach the top in an extremely competitive system not only do you have to work hard, you also have to be born with the right talent, in the right place, to the right family, and be immensely lucky to be in right places in right times and make correct guess decisions in situations in which it is impossible to know the correct decision. Even if you work 24/7 without sleep, there will be thousands of others who do the same, your success is a pure bet on lottery. **Capitalist fairy tales make heavy use of the [survivorship bias](survivorship_bias.md)** -- you will see movies only about the successful people who are asked how they achieved success and who answer along the lines "I just worked hard". Indeed they did, but this doesn't imply that anyone working hard will succeed, this is the same as taking an advice from a lottery winner; if you ask a lottery winner how he won the lottery, he will simply say "I bet all I had on a random number". Following such advice is of course just about the worse decision you can make. If everyone can make it, why doesn't everyone do it, why don't we have a world consisting exclusively of billionaires?
- *"Capitalism just works, capitalism is natural, capitalism means progress etc."* -- **Capitalism doesn't work, it's just hard to get rid of.** Progress isn't dependent on capitalism, progress can't be stopped and will be here even without capitalism. If it "works and is natural", then it works and is natural natural in the same way as for example cancer or wars. This doesn't mean we should support it or see it as something positive. Most of other similar lies are discussed in sections above.
- Fairy tales about about the rich capitalist altruist: you will hear stories about famous capitalists that paint them as nice guys who give to poor for free, who do manual work despite not having to etc. This is just part of cult of personality propaganda and applying cheap populist tricks to deceive masses. A rich guy giving $100 to a poor kid on camera is an extreme powerful marketing that costs $100, which for a billionaire is of course a laughable cost. The fact is that every billionaire is the best player of the most dirty game humanity has invented and researching any such guy reveals, basically in 100% of cases, that he was in fact the worst imaginable psychopath -- Edison killed animals with electric current as part of marketing, the owner of McDonald's stole the idea and know-how from McDonald brothers ALONG WITH their own name, similar thing happened with KFC, Steve Jobs was infamous for his psychological pressure on workers equating torture, the working condition's in Ford's factories were basically the same as those for black African slaves, etcetc. **Trying to find a rich man that's good is like trying to find a shark who's a vegetarian.**
- *"Capitalism isn't perfect but it's the best system we know."*: complete [bullshit](bullshit.md), capitalism is probably the worst system that there ever was. See this whole article.
@ -115,4 +115,4 @@ Capitalist brainwashing is pretty sophisticated -- unlike with centralized oppre
## So What To Replace Capitalism With?
At this point basically anything else is better. But we here advocate [less retarded society](less_retarded_society.md).
At this point basically anything else is better. But we here advocate [less retarded society](less_retarded_society.md).

View file

@ -1,8 +1,8 @@
# Esoteric Programming Language
So called esoteric programming languages (esolangs) are highly experimental and [fun](fun.md) [programming languages](programming_language.md) that employ bizarre ideas. Popular languages of this kind include [Brainfuck](brainfuck.md), [Chef](chef.md) or [Omgrofl](omgrofl.md).
So called esoteric programming languages (esolangs) are highly experimental and [fun](fun.md) [programming languages](programming_language.md) that employ bizarre and/or unconventional ideas. Popular languages of this kind include [Brainfuck](brainfuck.md), [Chef](chef.md) or [Omgrofl](omgrofl.md).
There is a wiki for esolangs, the [Esolang Wiki](https://esolangs.org). If you want to behold esolangs in all their beauty, see https://esolangs.org/wiki/Hello_world_program_in_esoteric_languages_(nonalphabetic_and_A-M). The Wiki is published under [CC0](cc0.md)!
There is a great [wiki](wiki.md) for esolangs, the Esolang Wiki (https://esolangs.org). If you want to behold esolangs in all their beauty, see https://esolangs.org/wiki/Hello_world_program_in_esoteric_languages_(nonalphabetic_and_A-M). The Wiki is published under [CC0](cc0.md)!
Some notable ideas employed by esolangs are:
@ -10,7 +10,7 @@ Some notable ideas employed by esolangs are:
- Doing nothing (e.g. *Nothing*).
- Being two or more dimensional (e.g. *Befunge* or *Hexagony*).
- Source code resembling cooking recipes (e.g. *Chef*).
- Trying to be as hard to use as possible (e.g. *Brainfuck*).
- Trying to be as hard to use as possible.
- Trying to be as hard to compile as possible (e.g. *Befunge*).
- Adding randomness to program execution (e.g. *Entropy*).
- Having no [input/output](io.md) (e.g. *Compute*).
@ -26,8 +26,8 @@ Some notable ideas employed by esolangs are:
Esolangs are great because:
- **They are [fun](fun.md)**.
- **They are actually useful research in language design**, even if most of the ideas aren't useful directly, esolangs really teach us about the borders and definitions of what languages are. And sometimes, by mistake, actual discoveries are made.
- **They are [fun](fun.md)** and have a cool community around them.
- **They are actually useful research in language design and food for thought**, even if most of the ideas aren't useful directly, esolangs really teach us about the borders and definitions of what languages are. And sometimes, by mistake, actual discoveries are made.
- **They are great exercise in [programming](programming.md)** and design. Simple languages that are allowed to not be useful are potentially good for education as they let the programmer fully focus on a specific idea and its implementation.
- **They blend technology with [art](art.md)**, train creativity and thinking "outside the box".
- **They are a breath of fresh air** in the sometimes too serious area of technology. Hobbyist and non-commercial programming communities are always great to have.

View file

@ -8,4 +8,8 @@ People who seriously look for attaining mental/spiritual freedom often resort to
Freedom is something promised by most (if not all) ideologies/movements/etc.; this is because without further specification the term is so wide it says very little -- the very basic thing to know is, of course, that **there is no such thing as general freedom**; one kind of freedom restricts other kinds of freedom -- for example so called freedom of market says that a rich capitalist is free to do whatever he wants, which leads to him enslaving people, killing the freedom of those people.
What kind of freedom is [LRS](lrs.md) interested in? Basically the freedom for living beings to do what makes them happy -- of course this can't be achieved 100% (if one desires to enslave others, their freedom would disappear), however we can get very close (make a [society](less_retarded_society.md) in which people don't wish to enslave others). For this goal we choose to support such freedoms as [free speech](free_speech.md), [free software](free_software.md), [free culture](free_culture.md), free love etc.
What kind of freedom is [LRS](lrs.md) interested in? Basically the freedom for living beings to do what makes them happy -- of course this can't be achieved 100% (if one desires to enslave others, their freedom would disappear), however we can get very close (make a [society](less_retarded_society.md) in which people don't wish to enslave others). For this goal we choose to support such freedoms as [free speech](free_speech.md), [free software](free_software.md), [free culture](free_culture.md), free love etc.
## See Also
- [FreeDoom](freedoom.md)

69
hash.md
View file

@ -88,7 +88,7 @@ uint16_t hash(uint16_t n)
}
```
Here is a nice string hash, works even for short strings, all bits look pretty random: { Made by me. ~drummyfish }
Here is a nice string hash, works even for short strings, all bits look pretty random: { Made by me. Tested this on my dataset of programming identifiers, on average there was one colliding pair of strings in 1000. ~drummyfish }
```
uint32_t strHash(const char *s)
@ -108,4 +108,69 @@ uint32_t strHash(const char *s)
}
```
TODO: more
TODO: more
BONUS: Here is a kind of string *pseudohash* for identifiers made only of character `a-z`, `A-Z`, `0-9` and `_`, not starting with digit -- it may be useful for symbol tables in compilers. It is parametrized by length *n*, which must be greater than 4. It takes an arbitrary length identifier in this format and outputs another string, also in this format (i.e. also being this kind of identifier), of maximum length *n - 1* (last place being reserved for terminating zero), which remains somewhat human readable (and is the same as input if under limit length), which may be good e.g. for debugging and transpiling (in transpilation you can just directly use these pseudohashes from the table as identifiers). In principle it works something like this: the input characters are cyclically written over and over to a buffer, and when the limit length is exceeded, a three character hash (made of checksum, "checkproduct" and string length) is written on positions 1, 2 and 3 (keeping the first character at position 0 the same). This means e.g. that the last characters will always be recorded, so if input identifiers differ in last characters (like `myvar1` and `myvar2`), they will always give different pseudohash. Also if they differ in first character, length (modulo something like 64), checksum or "checkproduct", their pseudohash is guaranteed to differ. Basically it should be hard to find a collision. Here is the code: { I found no collisions in my dataset of over 5000 identifiers, for *n = 16*. ~drummyfish }
```
char numPseudohash(unsigned char c)
{
c %= 64;
if (c < 26)
return 'a' + c;
else if (c < 52)
return 'A' + (c - 26);
else if (c < 62)
return '0' + (c - 52);
return '_';
}
void pseudohash(char *s, int n)
{
unsigned char
v1 = 0, // checksum
v2 = 0, // "checkproduct"
v3 = 0, // character count
pos = 0;
const char *s2 = s;
while (*s2)
{
if (pos >= n - 1)
pos = 4;
v1 += *s2;
v2 = (v2 + 1) * (*s2);
v3++;
s[pos] = *s2;
pos++;
s2++;
}
if (v3 != pos)
{
s[1] = numPseudohash(v1);
s[2] = numPseudohash(v2);
s[3] = numPseudohash(v3);
}
s[n - 1] = 0;
}
```
Here are some example inputs and output strings:
```
"CMN_DES" -> "CMN_DES"
"CMN_currentInstrTypeEnv" -> "CBcxrTypeEnvnst"
"LONG_prefix_my_variable1" -> "L4kyvariable1y_"
"TPE_DISTANCE" -> "TPE_DISTANCE"
"TPE_bodyEnvironmentResolveCollision" -> "TxMJCollisionve"
"_TPE_body2Index" -> "_TPE_body2Index"
"_SAF_preprocessPosSize" -> "_RpwPosSizecess"
```

View file

@ -12,7 +12,7 @@ Around 50 AD Heron of Alexandria, an Egyptian mathematician, created a number of
In the 3rd century Chinese mathematician Liu Hui describes operations with **negative numbers**, even though negative numbers have already appeared before. In 600s AD an Indian astronomer Brahmagupta first used the number **[zero](zero.md)** in a systematic way, even though hints on the number zero without deeper understanding of it appeared much earlier. In 9th century the Mayan empire is [collapsing](collapse.md), though it would somewhat recover and reshape.
Around the year of our Lord 1450 a major technological leap known as the **Printing Revolution** occurred. Johannes Gutenberg, a German goldsmith, perfected the process of producing books in large quantities with the movable type press. This made books cheap to publish and buy and contributed to fast spread of information and better education. Around this time the **Great Wall of China** is being built.
Around the year of [our Lord](jesus.md) 1450 a major technological leap known as the **Printing Revolution** occurred. Johannes Gutenberg, a German goldsmith, perfected the process of producing books in large quantities with the movable type press. This made books cheap to publish and buy and contributed to fast spread of information and better education. Around this time the **Great Wall of China** is being built.
They year 1492 marks the **discovery of America** by Christopher Columbus who sailed over the Atlantic Ocean, though he probably wasn't the first in history to do so, and it wasn't realized he sailed to America before his death.

View file

@ -75,7 +75,7 @@ Our society is **[anarcho pacifist](anpac.md) and [communist](communism.md)**, m
- **How will society make progress?** Just as it always had: by science, curiosity, necessity, accidental discoveries, pursuit of creating art etc. It is a mistake to think we need capitalism or anything similar in order to make progress; progress cannot be stopped no matter what, it will always be here as long as humans exist.
- **How do you prevent natural human selfish and violent behavior?** Violent and selfish behavior is natural in us just as peaceful and altruistic behavior, we have two sides and which one shows is mostly determined by the conditions in which we live, by our upbringing and people we see as role models. Nowadays we think people are extremely selfish and violent because we live in society that highly fuels the "evil" side in us, when we're forced to fight for basic living and grow up in a highly competitive environment, it's no surprise most adapt to this and grow up to be "dicks". If we're forced to fight for food and brainwashed since birth that "life is a [fight](fight_culture.md)", we will be selfish and violent, just as wild wolves are violent while pet dogs whose needs are secured and who were raised peacefully are mostly completely peaceful. If we have abundance and grow up in a society that naturally rejects any violence, we will grow up to solve conflicts peacefully and think of others, just as nowadays we e.g. naturally learn to wear clothes because simply everyone does it and there is little reason not to. If we make resources abundant, there will be no need for selfishness -- do you see anyone stealing air from others out of selfishness? No, because there is no need for it, air is abundant. By changing the environment people live and grow up in we will make 99.99% of people abandon violence and selfish interests (note the remaining natural need for selfishness and competition can be satisfied e.g. with games).
- **How will you prevent chaos without laws or rules for the people?** We don't say there should be no rules, we are just against complicated written law that no one can even comprehend (even lawyers don't know all laws nowadays) and that has so little in common with morality. Our society works on the basis of moral rules that all stem from the common goal of well being of living beings and that are derived and taught by people themselves -- for example one moral rule that all people would learn would be that money is bad for society (along with the reasons why it is so) and even though there would be no police "enforcing" this rule, the rule would be effective by the fact that absolute majority of people would simply refuse to use money -- in a society where most people know capitalism is bad for them capitalism can't work. Note the importance of the fact that people wouldn't just be taught to memorize such rules as "facts set in stone" (as is our current law), emphasis would be put on people deriving their moral code and understanding how their behavior affects others, people would learn and teach by example.
- **How will you prevent criminality such as stealing, murder and mafia organizations?** In a society with abundance for all which works for the good of all criminality simply won't make sense, i.e. we will eliminate criminality by solving the root cause of it, not by curing the symptoms (building prisons etc.). People have no reason to revolt against a system that benefits them or attack other people if there is no conflict between them. Large criminal organizations also cannot exist if most population rejects them, for example there cannot arise a capitalist corporation (or a similar mafia organization) if most population is educated and refuses to engage in capitalism. In addition to this a more mature, educated and responsible society will naturally minimize genetic predisposition to things such as aggressivity and self interest by natural selection as females will choose to rather have offspring with good people (unlike today), making genes associated with bad behavior go extinct. Of course, we probably won't eliminate criminality 100%, but that's not possible under any other system -- even in your current society with prisons and other punishments there still exist criminality. Of course in practice, until we achieve our ideal, we will likely need to keep some anti-criminality precautions as a necessary evil, but generally we will be able to greatly relax them (reduce police numbers, abandon death penalty, ...) as we move towards the ideal society. For example in an intermediate state of our society dangerous criminals won't be killed but only immobilized and they won't be put in prisons as a punishment but only sent to e.g. a remote island so as to be isolated, without punishing them by restricting their freedom within the island.
- **How will you prevent criminality such as stealing, murder and mafia organizations?** In a society with abundance for all which works for the good of all criminality simply won't make sense, i.e. we will eliminate criminality by solving the root cause of it, not by curing the symptoms (building prisons etc.). People have no reason to revolt against a system that benefits them or attack other people if there is no conflict between them. Large criminal organizations also cannot exist if most population rejects them, for example there cannot arise a capitalist corporation (or a similar mafia organization) if most population is educated and refuses to engage in capitalism. In addition to this a more mature, educated and responsible society will naturally minimize genetic predisposition to things such as agressivity and self interest by natural selection as females will choose to rather have offspring with good people (unlike today), making genes associated with bad behavior go extinct. Of course, we probably won't eliminate criminality 100%, but that's not possible under any other system -- even in your current society with prisons and other punishments there still exist criminality. Of course in practice, until we achieve our ideal, we will likely need to keep some anti-criminality precautions as a necessary evil, but generally we will be able to greatly relax them (reduce police numbers, abandon death penalty, ...) as we move towards the ideal society. For example in an intermediate state of our society dangerous criminals won't be killed but only immobilized and they won't be put in prisons as a punishment but only sent to e.g. a remote island so as to be isolated, without punishing them by restricting their freedom within the island.
- **How will the [economy](economy.md) work without money?** With abundance of resources there will be no money and no trade, resources will be available to anyone who needs them. Various [anarchist](anarchism.md) schools already have proposals for how distribution of resources could work. The [Venus Project](venus_project.md) calls this a [resource based economy](resource_based_economy.md) and proposes using computers and globally placed sensors to collect data and make decisions about where to distribute resources. Resources would be gathered and distributed more locally and cities would be more self sufficient so as to prevent waste and vulnerability of the system, we wouldn't see a huge globalization like nowadays, there is e.g. no need for transporting exotic food all over the whole world to places where there is enough local food available, however anything could be distributed to places where such resources are scarce (e.g. water to deserts). Each community could have food banks and other storage and distribution centers.
- **How will you prevent discrimination and racism?** Things such as racism appear when one group of people feels endangered by another group, in a society without social competition these issues will naturally disappear.
- **How will you fulfill the natural need of people for competition?** With sports and other games. Competition of people won't be forbidden, it just won't be mandatory and it won't be the basis of society.
@ -104,4 +104,4 @@ With this more of the common people should start to jump on the train and suppor
- [how to](how_to.md)
- [Venus Project](venus_project.md)
- [socialism](socialism.md)
- [Buddhism](buddhism.md)
- [Buddhism](buddhism.md)

View file

@ -27,8 +27,8 @@ Some alternatives to Linux (and Linux-libre) are:
- [BSD](bsd.md) operating systems such as [FreeBSD](freebsd.md), [NetBSD](netbsd.md) and [OpenBSD](openbsd.md) (probably best from the [LRS](lrs.md) point of view)
- [bare metal](bare_metal.md) UwU
- [HyperbolaBSD](hyperbolabsd.md)
- [Minix](minix.md)
- non-Unix systems like [FreeDOS](freedos.md) etc.?
- [Minix](minix.md)? Keep checking out smaller projects like [sortix](sortix.md), e.g. on osdevwiki.
- non-Unix systems like [FreeDOS](freedos.md), [Haiku](haiku.md) etc.?
- TODO: MOAR
## Switching To GNU/Linux

View file

@ -12,7 +12,7 @@ DISCLAIMER: All opinions expressed here are facts. I agree with myself 100%.
```
.:FFFFF:. .:FFFFF:. .:FFFFFFFFFFF:. .:FFFFFFFFFFF:.
:FFFF'''FFFF. .FFFF'''FFFF: .:FFFFF'''FFF'''FFFFF:. .:FFFFF'':FFF:''FFFFF:.
:FFFF'''FFFF. .FFFF'''FFFF: .:FFFF:'''FFF''':FFFF:. .:FFFF:'':FFF:'':FFFF:.
.FFF' 'FFFFFFF' 'FFF. .FFFF' FFF 'FFFF. .FFFF' .FF'FF. 'FFFF.
FFF' ''' 'FFF FFF' FFF 'FFF FFF' .FF' 'FF. 'FFF
FFF FFF FFF FFF FFF FFF .FF' 'FF. FFF
@ -24,7 +24,7 @@ DISCLAIMER: All opinions expressed here are facts. I agree with myself 100%.
'FFF FFF' FFF..FFF' FFF 'FFF..FFF FFF..FF' 'FF..FFF
FFF. .FFF FFFFF' FFF 'FFFFF FFFFF' 'FFFFF
'FFF. .FFF' 'FFFF. FFF .FFFF' 'FFFF. .FFFF'
'FFF.FFF' ':FFFFF...FFF...FFFFF:' ':FFFFF:,,,,,,,:FFFFF:'
'FFF.FFF' ':FFFF:...FFF...:FFFF:' ':FFFFF:,,,,,,,:FFFFF:'
'FFF' ':FFFFFFFFFFF:' ':FFFFFFFFFFF:'
_______ _ _______ _ _______ _ _______ _ _______ _ _______ _

View file

@ -61,93 +61,41 @@ unsigned char charFollowers[256][N];
int main(void)
{
srand(SEED);
srand(SEED);
for (int i = 0; i < 256; ++i)
for (int j = 0; j < N; ++j)
charFollowers[i][j] = ' ';
for (int i = 0; i < 256; ++i)
for (int j = 0; j < N; ++j)
charFollowers[i][j] = ' ';
unsigned char prevChar = 0;
unsigned char prevChar = 0;
while (1)
{
int c = getchar();
while (1)
{
int c = getchar();
if (c == EOF)
break;
if (c == EOF)
break;
#if IGNORE_NEWLINES
if (c == '\n')
c = ' ';
if (c == '\n')
c = ' ';
#endif
charFollowers[prevChar][rand() % N] = c; // put char at random place
prevChar = c;
}
charFollowers[prevChar][rand() % N] = c; // put char at random place
prevChar = c;
}
prevChar = ' ';
prevChar = ' ';
for (int j = 0; j < OUTPUT_LEN; ++j) // now generate the output
{
prevChar = charFollowers[prevChar][rand() % N]; // take random follower
putchar(prevChar);
}
for (int j = 0; j < OUTPUT_LEN; ++j) // now generate the output
{
prevChar = charFollowers[prevChar][rand() % N]; // take random follower
putchar(prevChar);
}
puts("\n");
return 0;
puts("\n");
return 0;
}
```
Trying it out on the text of [this wiki](LRS_wiki.md) may output something like this:
```
Ther thellialy oris threstpl/pifragmediaragmagoiby s agmexes, den
atss pititpenaraly d thiplio s ts gs, tis wily NU gmarags gos
aticel/EEECTherixed atstixedells, s s ores agolltixes tixe. TO: N
s, s, TOpedatssth NUCAPorag: puffrits, pillly ars agmen No tpix abe
aghe. aragmed ssh titixen plioix ag: Th tingoras TOD s wicipixe d
tpllifr.edarenexeramed Thecospix ts ts s osth s pes ovipingor
g: agors agass s TOnamand s aghech th wopipistalioiaris agontibuf
ally Thrixtply tiaceca th oul/EEEEEEEECPU), wicth NU athed wen
aragag athichipl Thechixthass s gmelliptilicex th ostunth gmagh
atictpixe. ar Th on wipixexepifrag gman g: sthabopl/te.
```
We see at first glance it looks a bit like English text, even with some quirks specific to this wiki, for example here and there having FULL CAPS words (due to acronyms and also rants that often appear here). It even generated the word "CPU". Notice the algorithm correctly learned punctuation, i.e. it knows that after commas and periods there is almost always space and after space there is usually not another space. For comparison here is a Spanish-like text generated from Don Quixote (with accents removed):
```
Diloma Dadro hacaci gua usta lesano strore sto do diaco; ma ro
hiciso stue ue dita. do que menotamalmeci ma quen do gue lo;
denestajo qucos rdo horor Da que qunca. quadombuce que queromiderbre
hera ha rlabue F de querdos Dio macino; dombidrompo mi ste derdiba
l, mbiolo Ferbes l ste s lolo que ha Du hano quenore Dio ueno que
hala F uano he Dorame de qus rl, ha didesa que halanora Fla quco
dil qucio ue do mestostaloste hados de gusta querana. stuce F s s
Do lo dre s hal Fro gue sa sa. la sido la dico; hado mbuno Do.
mororo; rdenaja. qunolole Diba. do. Fa gor stamestamo ha quno
unostabro quero mue s Diado Didota. quencoralor dio sotomo Fuen
que halora. gunore quabrbe rol gostuno hadolmbe Da que unendor
que le di so; qunta rajos s F de qucol
```
We see some shorter words like *lo*, *le*, *de*, *he*, *que* and *sido* are real Spanish words. Though punctuation is quite nice, the algorithm fails to learn that after period the word of the next sentence should start with a capital letter (it only does so sometimes by pure chance) -- this is due to the algorithm only seeing one character back; after a period there is also one space which already makes the algorithm forget about the period. This would be addressed by keeping longer history, as said above. Now let's try a difference kind of text altogether, let's try to feed in the source code of [Anarch](anarch.md):
```
2 camechererea = 20;
#erereppon.xereponioightFuaighe16_ARABEIUnst
chtreraySqua->rarepL_RCL_CL_PE;
caminsin.yDINeramaxer = costRCL_PERCL_ditsins->pL_ime1
= 0;
* = RCL_dime1,y 1)
0;
}
}
ck;
camererayDimameaxSqua ca = ca->ra caininin.xS_UAME;
caminstFua-> 0 0;
} ca->ponstramiomereaxSquts chts 154;
1)
```
Here it's pretty clear the code won't work but its structure really does resemble the original source: curly brackets and semicolons are correctly followed by newlines, assignments look pretty correct as well, dereference arrows (`->`) appear too -- the code even generated the `RCL_` prefix of the [raycastlib](raycastlib.md) functions that's widely seen in the original code.

View file

@ -20,4 +20,8 @@ TODO
## History
TODO
TODO
## See Also
- [boolean net](boolean_net.md)

View file

@ -3,7 +3,7 @@
This is an auto-generated article holding stats about this wiki.
- number of articles: 526
- total size of all texts in bytes: 2619403
- total size of all texts in bytes: 2627188
longest articles:
@ -23,6 +23,12 @@ longest articles:
latest changes:
```
Date: Fri Dec 22 00:43:13 2023 +0100
blender.md
bytecode.md
c.md
forth.md
wiki_stats.md
Date: Thu Dec 21 12:04:09 2023 +0100
assembly.md
blender.md
@ -47,11 +53,5 @@ wiki_stats.md
wiki_style.md
woman.md
Date: Tue Dec 19 13:00:12 2023 +0100
feminism.md
how_to.md
linux.md
public_domain.md
sin.md
wiki_stats.md
```