Update
This commit is contained in:
parent
275c83d379
commit
793eff5870
19 changed files with 2117 additions and 1835 deletions
2
ascii.md
2
ascii.md
|
@ -2,7 +2,7 @@
|
|||
|
||||
ASCII ([American](usa.md) standard code for information interchange) is a relatively simple standard for digital encoding of [text](text.md) that's one of the most basic and probably the most common format used for this purpose. For its simplicity and inability to represent characters of less common alphabets it is nowadays quite often replaced with more complex encodings such as [UTF-8](utf8.md) who are however almost always backwards compatible with ASCII (interpreting UTF-8 as ASCII will give somewhat workable results), and ASCII itself is also normally supported everywhere. ASCII is the [suckless](suckless.md)/[LRS](lrs.md)/[KISS](kiss.md) character encoding, recommended and [good enough](good_enough.md) for most programs.
|
||||
|
||||
The ASCII standard assigns a 7 [bit](bit.md) code to each basic text character which gives it a room for 128 characters -- these include lowercase and uppercase [English](english.md) alphabet, decimal digits, other symbols such as a question mark, comma or brackets, plus a few special control characters that represent instructions such as carriage return which are however often obsolete nowadays. Due to most computers working with 8 bit bytes, most platforms store ASCII text with 1 byte per character; the extra bit creates a room for **extending** ASCII by another 128 characters (or creating a variable width encoding such as [UTF-8](utf8.md)). These extensions include unofficial ones such as VISCII (ASCII with additional Vietnamese characters) and more official ones, most notably [ISO 8859](iso_8859.md): a group of standards by [ISO](iso.md) for various languages, e.g. ISO 88592-1 for western European languages, ISO 8859-5 for Cyrillic languages etc.
|
||||
The ASCII standard assigns a 7 [bit](bit.md) code to each basic text character which gives it a room for 128 characters -- these include lowercase and uppercase [English](english.md) alphabet, decimal digits, other symbols such as a question mark, comma or brackets, plus a few special control characters that represent instructions such as carriage return which are however often obsolete nowadays. Due to most computers working with 8 bit bytes, most platforms store ASCII text with 1 byte per character; the extra bit creates a room for **extending** ASCII by another 128 characters (or creating a variable width encoding such as [UTF-8](utf8.md)). These extensions include unofficial ones such as VISCII (ASCII with additional Vietnamese characters) and more official ones, most notably [ISO 8859](iso_8859.md): a group of standards by [ISO](iso.md) for various languages, e.g. ISO 88592-1 for western European languages, ISO 8859-5 for Cyrillic languages etc. Also [IBM Code Page 437](cp437.md) is a famous unofficial extension of ASCII.
|
||||
|
||||
The ordering of characters has been kind of cleverly designed to make working with the encoding easier, for example digits start with 011 and the rest of the bits correspond to the digit itself (0000 is 0, 0001 is 1 etc.). Corresponding upper and lower case letters only differ in the 6th bit, so you can easily convert between upper and lower case by negating it as `letter ^ 0x20`. { I think there is a few missed opportunities though, e.g. in not putting digits right before letters. That way it would be very easy to print hexadecimal (and all bases up to a lot) simply as `putchar('0' + x)`. UPDATE: seen someone ask this on some stack exchange, the answer said ASCII preferred easy masking or something, seems like there was some reason. ~drummyfish }
|
||||
|
||||
|
|
78
c.md
78
c.md
|
@ -20,6 +20,80 @@ Mainstream consensus acknowledges that C is among the best languages for writing
|
|||
|
||||
**[Fun](fun.md)**: `main[-1u]={1};` is a C [compiler bomb](compiler_bomb.md) :) it's a short program that usually makes the compiler produce a huge binary.
|
||||
|
||||
## Examples
|
||||
|
||||
Let's write a simple program called **[divisor tree](divisor_tree.md)** -- this program will be interactively reading positive numbers (smaller than 1000) from the user and for each one it will print the [binary tree](binary_tree.md) of the numbers divisors so that if a number has divisors, the ones that are closest to each other will be its children. If invalid input is given, the program ends. The tree will be written in format `(L N R)` where *N* is the number of the tree node, *L* is its the node's left subtree and *R* is the right subtree. This problem is made so that it will showcase most of the basic features of a programming language (like control structures, function definition, [recursion](recursion.md), [input/output](io.md) etc.). Let's from now on consider this our standardized program for showcasing programming languages.
|
||||
|
||||
Here is the program written in C99 (let this also serve as a reference implementation of the program):
|
||||
|
||||
```
|
||||
#include <stdio.h> // include standard I/O library
|
||||
|
||||
// recursive function, prints divisor tree of x
|
||||
void printDivisorTree(unsigned int x)
|
||||
{
|
||||
int a = -1, b = -1;
|
||||
|
||||
for (int i = 2; i <= x / 2; ++i) // find two closest divisors
|
||||
if (x % i == 0)
|
||||
{
|
||||
a = i;
|
||||
b = x / i;
|
||||
|
||||
if (b <= a)
|
||||
break;
|
||||
}
|
||||
|
||||
putchar('(');
|
||||
|
||||
if (a > 1)
|
||||
{
|
||||
printDivisorTree(a);
|
||||
printf(" %d ",x);
|
||||
printDivisorTree(b);
|
||||
}
|
||||
else
|
||||
printf("%d",x);
|
||||
|
||||
putchar(')');
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
while (1) // main loop, read numbers from the user
|
||||
{
|
||||
unsigned int number;
|
||||
printf("enter a number: ");
|
||||
|
||||
if (scanf("%u",&number) == 1 && number < 1000)
|
||||
{
|
||||
printDivisorTree(number);
|
||||
putchar('\n');
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
Run of this program may look for example like this:
|
||||
|
||||
```
|
||||
enter a number: 32
|
||||
((((2) 4 (2)) 8 (2)) 32 ((2) 4 (2)))
|
||||
enter a number: 256
|
||||
((((2) 4 (2)) 16 ((2) 4 (2))) 256 (((2) 4 (2)) 16 ((2) 4 (2))))
|
||||
enter a number: 7
|
||||
(7)
|
||||
enter a number: 0
|
||||
(0)
|
||||
enter a number: 4
|
||||
((5) 15 (3))
|
||||
enter a number: quit
|
||||
```
|
||||
|
||||
## History and Context
|
||||
|
||||
C was developed in 1972 at [Bell Labs](bell_labs.md) alongside the [Unix](unix.md) operating system by [Dennis Ritchie](dennis_ritchie.md) and [Brian Kerninghan](brian_kerninghan.md), as a successor to the [B](b.md) language ([portable](portability.md) language with [recursion](recursion.md)) written by Denis Ritchie and [Ken Thompson](ken_thompson.md), which was in turn inspired by the the [ALGOL](algol.md) language (code blocks, lexical [scope](scope.md), ...). C was for a while called NB for "new B". C was intimately interconnected with Unix and its [hacker culture](hacking.md), both projects would continue to be developed together, influencing each other. In 1973 Unix was rewritten in C. In 1978 Keninghan and Ritchie published a book called *The C Programming Language*, known as *K&R*, which became something akin the C specification. In March 1987 [Richard Stallman](rms.md) along with others released the first version of [GNU C compiler](gcc.md) -- the official compiler of the [GNU](gnu.md) project and the compiler that would go on to become one of the most widely used. In 1989, the [ANSI C](ansi_c.md) standard, also known as C89, was released by the American ANSI -- this is a very well supported and overall good standard. The same standard was also adopted a year later by the international ISO, so C90 refers to the same language. In 1999 ISO issues a new standard that's known as C99, still a very good standard embraced by [LRS](lrs.md). Later in 2011 and 2017 the standard was revised again to C11 and C17, which are however no longer considered good.
|
||||
|
@ -288,10 +362,6 @@ The following are some symbols ([functions](function.md), [macros](macro.md), ..
|
|||
| *clock()* | *time.h* | Returns approx. CPU cycle count since program start. |`printf("CPU ticks: %d\n",(int) clock());`|
|
||||
| *CLOCKS_PER_SEC* | *time.h* | Number of CPU ticks per second. |`int sElapsed = clock() / CLOCKS_PER_SEC;`|
|
||||
|
||||
## Some Programs In C
|
||||
|
||||
TODO
|
||||
|
||||
## See Also
|
||||
|
||||
- [B](b.md)
|
||||
|
|
|
@ -40,6 +40,7 @@ Censorship is so frequent that it's hard to give just a short list of examples,
|
|||
- Broadcasts of [football](football.md) matches on TV usually censor crazy fans that run on the pitch and cause [lulz](lulz.md), the camera just pans on something uninteresting until the security catches the guy, denying probably the most [funny](fun.md) and interesting moments of the match to thousands, maybe even millions of viewers. This is done because the broadcasters are [faggots](gay.md) who dislike fun.
|
||||
- So called "right to be forgotten" is a part of [privacy](privacy.md) hysteria and a form of extreme censorship that demands you shall for example smash your head with a hammer until you forget something that someone else feels uncomfortable about. No, this is not a [joke](jokes.md), some people in [21st century](21st_century.md) seriously demand this.
|
||||
- [Cloudflare](cloudflare.md), the company that's starting to control the whole [web](www.md), is abusing its power to censor sites it just doesn't like, for example [Kiwifarms](kiwifarms.md) (you can view these sites using e.g. internet archive).
|
||||
- State secrets are censored, usually even by murdering people who just know the secrets.
|
||||
- ...
|
||||
|
||||
## See Also
|
||||
|
|
81
comun.md
81
comun.md
|
@ -88,7 +88,86 @@ The following code translates [brainfuck](brainfuck.md) to comun (proving comun
|
|||
.
|
||||
```
|
||||
|
||||
TODO: more, code examples, compare the above with C, ...
|
||||
The following is our standardized **[divisor tree](divisor_tree.md)** program written in comun:
|
||||
|
||||
```
|
||||
# pops a number (< 1000) and prints it
|
||||
numPrint999:
|
||||
$0 99 > ? $0 100 / "0" + -> .
|
||||
$0 9 > ? $0 10 / 10 % "0" + -> .
|
||||
10 % "0" + ->
|
||||
.
|
||||
|
||||
# converts single digit to number (or -1 if invalid)
|
||||
digitToNum:
|
||||
$0
|
||||
|
||||
$0 "0" >= >< "9" <= & ?
|
||||
"0" -
|
||||
;
|
||||
^ -1
|
||||
.
|
||||
.
|
||||
|
||||
# takes x, pops it and recursively prints its divisor tree
|
||||
printDivisorTree:
|
||||
-1 -1 # divisors: a, b
|
||||
|
||||
$2 2 / @@ # for i = x / 2
|
||||
# stack now: x a b i
|
||||
$0 1 <= ?
|
||||
!@
|
||||
.
|
||||
|
||||
$3 $1 % 0 = ? # i divides x?
|
||||
$0 $:3 # a = i
|
||||
$3 $1 / $:2 # b = x / i
|
||||
|
||||
$2 $2 <= ? # a <= b?
|
||||
!@
|
||||
.
|
||||
.
|
||||
|
||||
-- # decrement i
|
||||
.
|
||||
^ # pop i
|
||||
|
||||
"(" ->
|
||||
|
||||
$0 -1 != ?
|
||||
printDivisorTree
|
||||
" " ->
|
||||
>< numPrint999 # print x
|
||||
" " ->
|
||||
printDivisorTree
|
||||
;
|
||||
^ ^ # pop a, b
|
||||
numPrint999
|
||||
.
|
||||
|
||||
")" ->
|
||||
.
|
||||
|
||||
@@ # read numbers from the user
|
||||
0 10 "enter a number:" -->
|
||||
|
||||
0 # x
|
||||
@@ # read x
|
||||
<-
|
||||
$0 10 = ? ^ !@ . # newline?
|
||||
digitToNum
|
||||
$0 -1 = ? !. . # wrong digit? then end
|
||||
>< 10 * +
|
||||
.
|
||||
|
||||
$0 1000 < ? # x < 1000?
|
||||
printDivisorTree
|
||||
10 -> # newline
|
||||
;
|
||||
!@
|
||||
.
|
||||
.
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ In 2019 drummyfish has written a "manifesto" of his ideas called **Non-Competiti
|
|||
|
||||
**Does drummyfish have [divine intellect](terry_davis.md)?** Hell no, he's pretty retarded at most things, but thanks to his extreme tendency for isolation, great curiosity and obsession with [truth](truth.md) he is possibly the only man on Earth completely immune to propaganda, he can see the world as it is, not as it is presented, so he feels it is his moral duty to share what he is seeing. He is able to overcome his natural dumbness by tryharding and sacrificing his social and sexual life so that he can program more. If drummyfish can learn to program [LRS](lrs.md), so can you.
|
||||
|
||||
Drummyfish will [kill himself](suicidie.md) one day -- probably not that soon, but it's planned, there is nothing worse than living under [capitalism](capitalism.md), death sounds like such a relief. There are still some [projects](needed.md) he wants to finish first; unless something triggers him and he just randomly jumps under a train one day or gets nuked by Putin, he is planning to finish some of the projects to leave something behind. The current plan is to try to live somehow, outside or on the edge of society, minimize contact with people, do good and avoid evil as much as possible. Once closest relatives are gone, then with no more ties to the current [shitty place](czechia.md), he will walk on foot towards the Mediterranean sea, a place that has always attracted him more than anywhere else, and there he will simply die either of illness, injury or hunger, or he will simply swim for the sunset and never return. That's a death one can even look forward to. There, at his beloved sea, drummyfish will meet his fate and find his final resting place and the peace he so much desired and struggled for through his whole life. Hopefully his body will feed a few hungry fish.
|
||||
Drummyfish will [kill himself](suicide.md) one day -- probably not that soon, but it's planned, there is nothing worse than living under [capitalism](capitalism.md), death sounds like such a relief. There are still some [projects](needed.md) he wants to finish first; unless something triggers him and he just randomly jumps under a train one day or gets nuked by Putin, he is planning to finish some of the projects to leave something behind. The current plan is to try to live somehow, outside or on the edge of society, minimize contact with people, do good and avoid evil as much as possible. Once closest relatives are gone, then with no more ties to the current [shitty place](czechia.md), he will walk on foot towards the Mediterranean sea, a place that has always attracted him more than anywhere else, and there he will simply die either of illness, injury or hunger, or he will simply swim for the sunset and never return. That's a death one can even look forward to. There, at his beloved sea, drummyfish will meet his fate and find his final resting place and the peace he so much desired and struggled for through his whole life. Hopefully his body will feed a few hungry fish.
|
||||
|
||||
## See Also
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ If anything's clear, then that feminism is not at all about gender equality but
|
|||
|
||||
Closing gaps is not how you achieve equality -- on the contrary it's only how you stir up hostility and physically reshape women into men (by closing the height gap, boob size gap, penis length gap, brain size gap and any kind of gap that may potentially have any significance in sports, art or culture at all). [Making gaps not matter](less_retarded_society.md) is how you truly achieve equality. but Feminists won't go that way exactly because they are against equality.
|
||||
|
||||
Since feminism became [mainstream](mainstream.md) in about 2010s, it also became the main ideology of populists and opportunists, i.e. all politicians and [corporations](corporation.md), it is now a milking cow movement and a vehicle for pushing all kinds of evil such as censorship laws, creation of bullshit jobs, discrediting opposition and so on.
|
||||
|
||||
{ I really have no issues with women, I truly love everyone, but I do pay attention to statistics. One of the biggest things feminism achieved for me in this regard is that now it's simply not enough for me to see a woman achieve success in society to be convinced she is skilled or capable, a woman getting PhD to me nowadays automatically just means she got it because she's a woman and we need more quotas of "strong women in SCIENCE". In the past I didn't see it this way, a woman that did something notable back then was mostly convincing to me. Nowadays I just require much better evidence to believe she is good at something, e.g. seeing something truly good she created -- to be honest, I now don't recall any woman in "modern times" to have convinced me, but I am really open to it and just waiting to be proven wrong. ~drummyfish }
|
||||
|
||||
Some notable things feminists managed to achieve are:
|
||||
|
|
29
forth.md
29
forth.md
|
@ -41,25 +41,26 @@ Built-in words include:
|
|||
```
|
||||
GENERAL:
|
||||
|
||||
+ add a b -> (a + b)
|
||||
- subtract a b -> (b - a)
|
||||
* multiply a b -> (a * b)
|
||||
/ divide a b -> (b / a)
|
||||
= equals a b -> (-1 if a = b else 0)
|
||||
< less than a b -> (-1 if a < b else 0)
|
||||
> greater than a b -> (-1 if a > b else 0)
|
||||
mod modulo a b -> (b % a)
|
||||
dup duplicate a -> a a
|
||||
drop pop stack top a ->
|
||||
swap swap items a b -> b a
|
||||
rot rotate 3 a b c -> b c a
|
||||
+ add a b -> (a + b)
|
||||
- subtract a b -> (a . b)
|
||||
* multiply a b -> (a * b)
|
||||
/ divide a b -> (a / b)
|
||||
= equals a b -> (-1 if a = b else 0)
|
||||
< less than a b -> (-1 if a < b else 0)
|
||||
> greater than a b -> (-1 if a > b else 0)
|
||||
mod modulo a b -> (a % b)
|
||||
dup duplicate a -> a a
|
||||
drop pop stack top a ->
|
||||
swap swap items a b -> b a
|
||||
rot rotate 3 a b c -> b c a
|
||||
pick push Nth item xN ... x0 N -> ... x0 xN
|
||||
. print top & pop
|
||||
key read char on top
|
||||
.s print stack
|
||||
emit print char & pop
|
||||
cr print newline
|
||||
cells times cell width a -> (a * cell width in bytes)
|
||||
depth pop all & get d. a ... -> (previous stack size)
|
||||
cells times cell width a -> (a * cell width in bytes)
|
||||
depth pop all & get d. a ... -> (previous stack size)
|
||||
bye quit
|
||||
|
||||
VARIABLES/CONSTS:
|
||||
|
|
|
@ -40,7 +40,7 @@ This is the freedom island where [we](less_retarded_society.md) live. Many would
|
|||
- **`I`: small island**: A small island on the coast, for those who want to be extra alone.
|
||||
- **`T`: a modest [zen](zen.md) [temple](temple.md)**: It has nice view of the sea and we go meditate here.
|
||||
|
||||
TODO: food sources: fields and sea farms (only vegetarian), food can also be retrieved from normieland (stolen or bought for money we somehow make, maybe by selling some kinda shit we create on the island), anything that died by natural causes can also be eaten probably, food naturally found in nature like coconuts or something
|
||||
TODO: food sources: fields and sea farms (only vegetarian), chickens for eggs, food can also be retrieved from normieland (stolen or bought for money we somehow make, maybe by selling some kinda shit we create on the island), anything that died by natural causes can also be eaten probably, food naturally found in nature like coconuts or something
|
||||
|
||||
## See Also
|
||||
|
||||
|
|
|
@ -16,6 +16,53 @@ In the past JavaScript was only a **[client](client.md) side** scripting languag
|
|||
|
||||
TODO: some more shit
|
||||
|
||||
## Examples
|
||||
|
||||
Below is our standardized [divisor tree](divisor_tree.md) program written in browser JavaScript:
|
||||
|
||||
```
|
||||
<html> <head> <script>
|
||||
|
||||
// recursive function, returns divisor tree of x as a string
|
||||
function divisorTreeStr(x)
|
||||
{
|
||||
let a = -1, b = -1;
|
||||
let s = "";
|
||||
|
||||
for (let i = 2; i <= x / 2; i++) // find closest divisors
|
||||
if (x % i == 0)
|
||||
{
|
||||
a = i;
|
||||
b = x / i;
|
||||
|
||||
if (b <= a)
|
||||
break;
|
||||
}
|
||||
|
||||
s += "("
|
||||
|
||||
s += a > 1 ?
|
||||
divisorTreeStr(a) + " " + x + " " + divisorTreeStr(b) : x;
|
||||
|
||||
return s + ")";
|
||||
}
|
||||
|
||||
function main()
|
||||
{
|
||||
while (true) // main loop, read numbers from the user
|
||||
{
|
||||
let x = parseInt(prompt("enter a number:"));
|
||||
|
||||
if (isNaN(x) || x < 0 || x >= 1000)
|
||||
break;
|
||||
|
||||
console.log(divisorTreeStr(x));
|
||||
}
|
||||
}
|
||||
|
||||
</script> </head> <body onload="main()"> </body> </html>
|
||||
```
|
||||
|
||||
## JavaScript Fun
|
||||
|
||||
Here let be recorded funny code in this glorious language.
|
||||
|
|
2
kiss.md
2
kiss.md
|
@ -16,7 +16,7 @@ Apparently the term *KISS* originated in the US Army plane engineering: the plan
|
|||
- Creating website in plain [HTML](html.md) instead of using some complex web framework such as [Wordpress](wordpress.md).
|
||||
- Using solar panels directly, without a battery, if it's [good enough](good_enough.md).
|
||||
- Implementing a web left-right sweeping image gallery with HTML [iframe](iframe.md) instead of some overcomplicated [JavaScript](js.md) library. { Example stolen from [reactionary software](reactionary_software.md) website. ~drummyfish }
|
||||
- Supporting only [ASCII](ascii.md) instead of [Unicode](unicode.md), it is [good enough](good_enough.md).
|
||||
- Supporting only [ASCII](ascii.md) (or something like [ISO 8859-1](iso88591.md)) instead of [Unicode](unicode.md), it is [good enough](good_enough.md).
|
||||
- Using a plain text flat file instead of a [database](database.md) system.
|
||||
- Using [markdown](markdown.md) for creating documents, as opposed to using office programs such as [Libreoffice](libreoffice.md).
|
||||
- Using a trivial [shell](shell.md) script for compiling your programs rather than a complex build system such as [CMake](cmake.md).
|
||||
|
|
2
main.md
2
main.md
|
@ -12,6 +12,8 @@ DISCLAIMER: All opinions expressed here are facts. I agree with myself 100% (wel
|
|||
|
||||
WARNING: If you are easily [offended](offended_culture.md), then fuck you, you must [fix it](unretard.md).
|
||||
|
||||
We shit on your [privacy](privacy.md).
|
||||
|
||||
```
|
||||
.:FFFFF:. .:FFFFF:. .:FFFFFFFFFFF:. .:FFFFFFFFFFF:.
|
||||
:FFFF'''FFFF. .FFFF'''FFFF: .:FFFF:'''FFF''':FFFF:. .:FFFF:'':FFF:'':FFFF:.
|
||||
|
|
4
pride.md
4
pride.md
|
@ -1,3 +1,5 @@
|
|||
# Pride
|
||||
|
||||
Pride is an incredibly [harmful](harmful.md) emotion defined as a feeling of superiority, greatly connected to [fascism](fascism.md) (e.g. [nationalism](nationalism.md), [gay fascism](lgbt.md), [woman fascism](feminism.md) etc.), it is the opposite of [humility](humility.md). Pride is always bad, even small amounts do excessive amount of [evil](evil.md). Flags, statues, [sense of identity](identity_politics.md), [egoism](egoism.md), narcissism, [hero worship](hero_culture.md) and [self praise](marketing.md) are all connected to pride.
|
||||
Pride is an incredibly [harmful](harmful.md) emotion defined as a feeling of superiority, greatly connected to [fascism](fascism.md) (e.g. [nationalism](nationalism.md), [gay fascism](lgbt.md), [woman fascism](feminism.md) etc.), it is the opposite of [humility](humility.md). Pride is always bad, even small amounts do excessive amount of [evil](evil.md). Flags, statues, [sense of identity](identity_politics.md), [egoism](egoism.md), narcissism, [hero worship](hero_culture.md) and [self praise](marketing.md) are all connected to pride.
|
||||
|
||||
The word *pride* has aggressivity and [fascism](fascism.md) in it, that's why it's so popular [nowadays](21st_century.md), just the sound of it establishes a mood of conflict -- in a [peaceful society](less_retarded_society.md) we would probably rather (naturally) use words such as *gratitude* or *thankfulness* (i.e. "I am not proud of being a man, but I am grateful for it.").
|
|
@ -1,6 +1,6 @@
|
|||
# Privacy
|
||||
|
||||
*We highly shit on your privacy <3*
|
||||
*Privacy is just a nicer word for [censorship](censorship.md).*
|
||||
|
||||
Digital privacy is the ability of someone to hide "sensitive" [information](information.md) about himself; nowadays "privacy concerns" are a big part of [capitalist](capitalism.md) [bullshit](bullshit.md), [fear culture](fear_culture.md) and [fight culture](fight_culture.md), and fall under so called [computer security](security.md), yet greater area of bullshit business. Of course, there are other forms of privacy than digital, for example the physical privacy [in real life](irl.md), however in this article we'll be implicitly dealing with digital privacy unless mentioned otherwise, i.e. privacy with respect to computers, e.g. on the [Internet](internet.md). For starters let's stress the whole business around privacy is [bullshit](bullshit.md) that's wasting energy which could better be spent on actually useful things such as feeding the hungry or curing the ill. Do not engage in privacy hysteria.
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ Also let it be said that everyone has to find his own way of doing projects, it'
|
|||
- **"It would be cool" is not a good enough motivation for a bigger project.** You can't start a big thing just out of boredom. Finishing a greater thing will be painful, you'll be through sleepless nights, periods of desperation, headaches and burn outs, you'll sacrifice social life to hunting down bugs and rewriting shitty code. To keep yourself going through this it's not enough to know that "the result will be nice I guess". It needs more -- you must absolutely feel it is necessary to make the thing, you have to think the world NEEDs you to make it, only then you will keep torturing yourself to make it to the finish. So choose very wisely.
|
||||
- **Before making a big thing of type X make a small thing of type X** or as it's been said "plan to throw one away". This is to say that you can't make a good game if it's the first game you're making, so you better make your first game small knowing that it ill suck rather than making a big game that would suck. The first thing is just for the experience. You can't prepare yourself for making an operating system just by reading a book, you have to make one to REALLY comprehend what it will be about, to see the whole picture and to properly plan it.
|
||||
- **Don't spontaneously start projects, don't rush, only start well thought through things.** As a creative being you'll be getting hundreds and hundreds of amazing ideas -- don't think you're a genius, this is common for many people, even normies get many ideas for great games and "apps" and whatever, so don't get too excited, it is important you judge carefully what to do and what to leave for later: planning and actually MAKING the thing is the actual part that will distinguish you from the normie. Write your amazing ideas down if you need, but don't jump in on any new great idea that appears, always let any idea sit for at least half a year, maybe even several years. It is very tempting to start new things but you must have self control, or else you'll end up like the [dog](dog.md) that starts chasing any new smell it catches and will be just chaotically running around without any goal, making unplanned projects that will fail every time. If an idea should deserve your valuable time, it has to pass the great filter of time -- if it survives in your head after a few months, in all the avalanche of new and new ideas, you know it may truly be worth trying. Furthermore you also have to have a good plan for any project you start and this planning requires a lot of thinking ahead -- you should only start writing code once you have the whole project in your head. This planning CANNOT be rushed, you can't plan it over a weekend, this is not [capitalism](capitalism.md) where things are made on schedule, this is [art](art.md) that needs its time, it must wait for inspiration, small improvements and rethinks over the time that it's sitting in your head. In this meantime stay with your already work in progress projects.
|
||||
- **Leave your session with something pleasant to be done next**: this will make you look forwards to come back to "work" on the project next time. If you're doing something painful, like being in a middle of [debugging](debugging.md) horror, try to finish it, and once there is something enjoyable next on the TODO, such as making game levels or playtesting, leave it for next time.
|
||||
- **Start small and humble (if it's meant to be big, it will become big naturally), focus on the thing you're making (not its promotion or "management").** Some nubs just see [Steve Jewbs](steve_jobs.md) or [Che Guevara](che_guevara.md) and think "I'LL BE A BIG PROJECT LEADER", they pick some shitty idea they don't even care too much about and then just start capitalisting, they buy a suit, coffee machine, web domains, set up a kickstarter, make a Jewtube video, Twitter account, logos, set up [promotional](marketing.md) websites, write manifestos and other shite. Yes, manifestos are cool, but only promise yourself to write it once the project is fucking done and worth something ;) Sometimes they hype a million people to jump on board, promising to make a HUGE, gigantically successful and revolutionary thing, while having 3 lines of code written so far. Congratulations, you now have nothing and the pressure of the whole world to make something big. This is the best way to hell. At BEST you will become a slave to the project, will hate it and somehow manage to make an ugly, rushed version of it because you didn't foresee what obstacles there would appear but which you would still have to solve fucking quickly because everything is falling on your head and people are shitting on you, angry that you're already two years late and you're already burned out and depressed and out of budget. Just don't be such a capitalist pussy, make a nice small thing in your basement and let its value show itself.
|
||||
- **Make it a habit/routine to do your project**. As with everything requiring a lot of time investment and dedication (exercise, language learning, ...), it's important to make it a routine (unless of course you're taking a break) to really do something significant. A small, spontaneous, irregular polish of your project is great too, but to really do the biggest part you just need a habit. People often say they're lazy and can't get into it -- everyone is lazy and everyone can get into it. Here is the trick: start with trivial things, just to get into the habit, i.e. at first it's literally enough to write 1 line of code every day. At the beginning you're not really doing much of any significant "work", you are just setting up your habit. Anyone can write 1 line of code per day: just tell yourself to do this -- write 1 line and then, if you want, you're done. You will find that second or third day you'll be writing 10 lines and in a week you will quite likely be looking forward to it, soon you'll have the other problem -- getting yourself to stop.
|
||||
- **Milestones and psychological mini rewards are nice to keep you going**. It's nice to split the project into some milestones so that you see your "progress", it's very good if each milestone adds something visible, something you can "touch" -- for example with a game just the moment when you become able to physically move through the level always feels very rewarding, even if you've done it many times before, it's always a bit surprising what joy a simple feature can bring. Exploit this to increase joy of making your art.
|
||||
|
|
39
python.md
39
python.md
|
@ -26,4 +26,41 @@ What follows is a summary of the python language:
|
|||
- It has a **gigantic standard library** which handles things such as [Unicode](unicode.md), [GUI](gui.md), [databases](database.md), [regular expressions](regex.md), [email](email.md), [html](html.md), [compression](compression.md), communication with operating system, [networking](network.md), [multithreading](multithreading.md) and much, much more. This means it's almost impossible to implement Python in all its entirety without 100 programmers working full time for at least 10 years.
|
||||
- There are numerous other **smaller fails**, e.g. inconsistent/weird naming of built-in commands, absence of switch statement (well, in new versions there is one already, but only added later and looks kinda shitty) etc.
|
||||
|
||||
TODO: code, compare to C
|
||||
## Example
|
||||
|
||||
Here is the **[divisor tree](divisor_tree.md)** program implemented in Python3, it showcases most of the basic language features:
|
||||
|
||||
```
|
||||
# recursive function, prints the divisor tree of a number
|
||||
def printDivisorTree(x):
|
||||
a = -1
|
||||
b = -1
|
||||
|
||||
for i in range(2,int(x / 2) + 1): # find closest divisors
|
||||
if x % i == 0:
|
||||
a = i
|
||||
b = int(x / i)
|
||||
|
||||
if a >= b:
|
||||
break
|
||||
|
||||
print("(",end="")
|
||||
|
||||
if a > 1:
|
||||
printDivisorTree(a)
|
||||
print(" " + str(x) + " ",end="")
|
||||
printDivisorTree(b)
|
||||
else:
|
||||
print(x,end="")
|
||||
|
||||
print(")",end="")
|
||||
|
||||
while True: # main loop, read numbers
|
||||
try:
|
||||
x = int(input("enter a number: "))
|
||||
except ValueError:
|
||||
break
|
||||
|
||||
printDivisorTree(x)
|
||||
print("")
|
||||
```
|
3480
random_page.md
3480
random_page.md
File diff suppressed because it is too large
Load diff
40
recursion.md
40
recursion.md
|
@ -60,6 +60,46 @@ unsigned int factorial(unsigned int x)
|
|||
}
|
||||
```
|
||||
|
||||
Here is another example of elegant recursion: printing string backwards:
|
||||
|
||||
```
|
||||
#include <stdio.h>
|
||||
|
||||
void readAndPrintBackwards(void)
|
||||
{
|
||||
int c = getchar();
|
||||
|
||||
if (c != EOF)
|
||||
{
|
||||
readAndPrintBackwards();
|
||||
putchar(c);
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
readAndPrintBackwards();
|
||||
putchar('\n');
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
The program reads one character in each call of the function and holds its printing for when we're emerging back from the recursion dive. The terminating condition here the check for end of the string (`EOF`). You can test this for program by compiling it and passing it a string, e.g. `echo "catdog" | ./program` which should result in printing `godtac`. In [comun](comun.md) the same program would be written as:
|
||||
|
||||
```
|
||||
readAndPrintBackwards:
|
||||
<-
|
||||
|
||||
<? ?
|
||||
readAndPrintBackwards
|
||||
.
|
||||
|
||||
->
|
||||
.
|
||||
|
||||
readAndPrintBackwards
|
||||
```
|
||||
|
||||
Some problems, for example [Ackermann function](ackermann_function.md), [quick sort](quick_sort.md), [tree](tree.md) traversals or the mentioned factorial are said to be "recursive" because they are just most elegantly defined and/or solved with recursion, but as we've seen, there is no problem that would inherently require recursive function calls. There may exist Turing complete languages without recursion that can still solve all problems that any other language can.
|
||||
|
||||
How do the computers practically make recursion happen? Basically they use a [stack](stack.md) to remember states (such as values of local variables and return addresses) on each level of the recursive dive -- each such state is captured by so called **stack frame**. In programming languages that support recursive function calls this is hidden behind the scenes in the form of so called **[call stack](call_stack.md)**. This is why an infinite recursion causes stack overflow.
|
||||
|
|
File diff suppressed because one or more lines are too long
136
wiki_stats.md
136
wiki_stats.md
|
@ -3,12 +3,12 @@
|
|||
This is an autogenerated article holding stats about this wiki.
|
||||
|
||||
- number of articles: 588
|
||||
- number of commits: 856
|
||||
- total size of all texts in bytes: 4167481
|
||||
- total number of lines of article texts: 31364
|
||||
- number of commits: 857
|
||||
- total size of all texts in bytes: 4173470
|
||||
- total number of lines of article texts: 31398
|
||||
- number of script lines: 262
|
||||
- occurences of the word "person": 7
|
||||
- occurences of the word "nigger": 90
|
||||
- occurences of the word "nigger": 91
|
||||
|
||||
longest articles:
|
||||
|
||||
|
@ -25,8 +25,8 @@ longest articles:
|
|||
- [c](c.md): 44K
|
||||
- [3d_model](3d_model.md): 40K
|
||||
- [bloat](bloat.md): 36K
|
||||
- [internet](internet.md): 36K
|
||||
- [woman](woman.md): 36K
|
||||
- [internet](internet.md): 36K
|
||||
- [history](history.md): 32K
|
||||
- [game](game.md): 32K
|
||||
- [random_page](random_page.md): 32K
|
||||
|
@ -35,22 +35,22 @@ longest articles:
|
|||
|
||||
top 50 5+ letter words:
|
||||
|
||||
- which (2361)
|
||||
- there (1812)
|
||||
- people (1616)
|
||||
- example (1385)
|
||||
- other (1294)
|
||||
- number (1145)
|
||||
- which (2362)
|
||||
- there (1819)
|
||||
- people (1618)
|
||||
- example (1384)
|
||||
- other (1293)
|
||||
- number (1146)
|
||||
- software (1142)
|
||||
- about (1119)
|
||||
- about (1120)
|
||||
- program (929)
|
||||
- because (880)
|
||||
- their (876)
|
||||
- because (876)
|
||||
- would (869)
|
||||
- called (810)
|
||||
- being (799)
|
||||
- things (793)
|
||||
- something (783)
|
||||
- would (871)
|
||||
- called (812)
|
||||
- being (800)
|
||||
- things (794)
|
||||
- something (787)
|
||||
- language (770)
|
||||
- numbers (751)
|
||||
- computer (750)
|
||||
|
@ -58,37 +58,65 @@ top 50 5+ letter words:
|
|||
- without (704)
|
||||
- programming (684)
|
||||
- function (676)
|
||||
- these (674)
|
||||
- these (675)
|
||||
- different (656)
|
||||
- however (648)
|
||||
- system (616)
|
||||
- world (612)
|
||||
- should (600)
|
||||
- doesn (593)
|
||||
- world (613)
|
||||
- should (601)
|
||||
- doesn (594)
|
||||
- point (584)
|
||||
- games (578)
|
||||
- society (572)
|
||||
- while (559)
|
||||
- drummyfish (546)
|
||||
- society (573)
|
||||
- while (560)
|
||||
- drummyfish (548)
|
||||
- though (543)
|
||||
- simply (535)
|
||||
- using (534)
|
||||
- still (533)
|
||||
- possible (524)
|
||||
- similar (509)
|
||||
- simply (540)
|
||||
- using (535)
|
||||
- still (534)
|
||||
- possible (525)
|
||||
- similar (511)
|
||||
- memory (509)
|
||||
- https (503)
|
||||
- https (505)
|
||||
- course (501)
|
||||
- technology (497)
|
||||
- always (479)
|
||||
- always (480)
|
||||
- basically (477)
|
||||
- really (468)
|
||||
- really (469)
|
||||
- value (467)
|
||||
- first (455)
|
||||
- first (457)
|
||||
|
||||
latest changes:
|
||||
|
||||
```
|
||||
Date: Sun Aug 4 16:49:53 2024 +0200
|
||||
3d_rendering.md
|
||||
aliasing.md
|
||||
anarch.md
|
||||
c.md
|
||||
cc0.md
|
||||
censorship.md
|
||||
disease.md
|
||||
drummyfish.md
|
||||
duskos.md
|
||||
feminism.md
|
||||
forth.md
|
||||
io.md
|
||||
jokes.md
|
||||
license.md
|
||||
lrs_dictionary.md
|
||||
newspeak.md
|
||||
number.md
|
||||
political_correctness.md
|
||||
public_domain.md
|
||||
random_page.md
|
||||
stereotype.md
|
||||
trolling.md
|
||||
wiki_pages.md
|
||||
wiki_stats.md
|
||||
wiki_style.md
|
||||
woman.md
|
||||
work.md
|
||||
Date: Thu Aug 1 02:31:53 2024 +0200
|
||||
21st_century.md
|
||||
3d_rendering.md
|
||||
|
@ -100,34 +128,6 @@ Date: Thu Aug 1 02:31:53 2024 +0200
|
|||
interpolation.md
|
||||
jokes.md
|
||||
main.md
|
||||
often_confused.md
|
||||
pedophilia.md
|
||||
random_page.md
|
||||
wiki_pages.md
|
||||
wiki_stats.md
|
||||
woman.md
|
||||
Date: Tue Jul 30 22:52:22 2024 +0200
|
||||
21st_century.md
|
||||
c_tutorial.md
|
||||
capitalist_software.md
|
||||
censorship.md
|
||||
collision_detection.md
|
||||
dramatica.md
|
||||
everyone_does_it.md
|
||||
exercises.md
|
||||
gay.md
|
||||
githopping.md
|
||||
how_to.md
|
||||
human_language.md
|
||||
island.md
|
||||
kek.md
|
||||
lrs_dictionary.md
|
||||
luke_smith.md
|
||||
number.md
|
||||
pedophilia.md
|
||||
people.md
|
||||
privacy.md
|
||||
random_page.md
|
||||
```
|
||||
|
||||
most wanted pages:
|
||||
|
@ -156,12 +156,12 @@ most wanted pages:
|
|||
most popular and lonely pages:
|
||||
|
||||
- [lrs](lrs.md) (293)
|
||||
- [capitalism](capitalism.md) (236)
|
||||
- [capitalism](capitalism.md) (237)
|
||||
- [c](c.md) (217)
|
||||
- [bloat](bloat.md) (210)
|
||||
- [free_software](free_software.md) (176)
|
||||
- [game](game.md) (141)
|
||||
- [suckless](suckless.md) (138)
|
||||
- [suckless](suckless.md) (139)
|
||||
- [proprietary](proprietary.md) (121)
|
||||
- [computer](computer.md) (98)
|
||||
- [kiss](kiss.md) (97)
|
||||
|
@ -171,7 +171,7 @@ most popular and lonely pages:
|
|||
- [linux](linux.md) (90)
|
||||
- [programming](programming.md) (84)
|
||||
- [fun](fun.md) (84)
|
||||
- [censorship](censorship.md) (83)
|
||||
- [censorship](censorship.md) (84)
|
||||
- [free_culture](free_culture.md) (81)
|
||||
- [fight_culture](fight_culture.md) (80)
|
||||
- [less_retarded_society](less_retarded_society.md) (79)
|
||||
|
@ -180,12 +180,13 @@ most popular and lonely pages:
|
|||
- [bullshit](bullshit.md) (77)
|
||||
- [shit](shit.md) (76)
|
||||
- [public_domain](public_domain.md) (76)
|
||||
- [art](art.md) (76)
|
||||
- [foss](foss.md) (75)
|
||||
- [art](art.md) (74)
|
||||
- [programming_language](programming_language.md) (72)
|
||||
- [corporation](corporation.md) (70)
|
||||
- [woman](woman.md) (69)
|
||||
- [chess](chess.md) (70)
|
||||
- ...
|
||||
- [anal_bead](anal_bead.md) (5)
|
||||
- [adam_smith](adam_smith.md) (5)
|
||||
- [aaron_swartz](aaron_swartz.md) (5)
|
||||
- [zuckerberg](zuckerberg.md) (4)
|
||||
|
@ -214,6 +215,5 @@ most popular and lonely pages:
|
|||
- [deferred_shading](deferred_shading.md) (4)
|
||||
- [cyber](cyber.md) (4)
|
||||
- [crow_funding](crow_funding.md) (4)
|
||||
- [body_shaming](body_shaming.md) (4)
|
||||
- [random_page](random_page.md) (2)
|
||||
|
||||
|
|
Loading…
Reference in a new issue