Update
This commit is contained in:
parent
3abdc93103
commit
ad727dcdc6
8 changed files with 141 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
|||
# Capitalist Software
|
||||
|
||||
Capitalist software is [software](software.md) that late stage [capitalism](capitalism.md) produces and is practically 100% [shitty](shit.md) [modern](modern.md) [bloat](bloat.md) and [malware](malware.md) hostile to its users, made with the sole goal of benefiting its creator (often a [corporation](corporation.md)). Capitalist software is not just [proprietary](proprietary.md) corporate software, but a lot of times "[open source](open_source.md)", [indie](indie.md) software and even [free software](free_software) that's just infected by the toxic capitalist environment -- this infection may come deep even into the basic design principles, even such things as [UI](ui.md) design, priorities and development practices and subtle software behavior which have simply all been shaped by the capitalist pressure on abusing the user.
|
||||
Capitalist software is [software](software.md) that late stage [capitalism](capitalism.md) produces and is practically 100% [shitty](shit.md) [modern](modern.md) [bloat](bloat.md) and [malware](malware.md) hostile to its users, made with the sole goal of benefiting its creator (often a [corporation](corporation.md)). Capitalist software is not just [proprietary](proprietary.md) corporate software, but a lot of times "[open source](open_source.md)", [indie](indie.md) software and even [free software](free_software.md) that's just infected by the toxic capitalist environment -- this infection may come deep even into the basic design principles, even such things as [UI](ui.md) design, priorities and development practices and subtle software behavior which have simply all been shaped by the capitalist pressure on abusing the user.
|
||||
|
||||
Basically everyone will agree that corporate software such as [Windows](windows.md) is to a high degree abusive to its users, be it by its spying, unjustified hardware demands, forced non customizability, price etc. A mistake a lot of people make is to think that sticking a free [license](license.md) to similar software will simply make it magically friendly to the user and that therefore most [FOSS](foss.md) programs are ethical and respect its users. This is sadly not the case, a license if only the first necessary step towards [freedom](freedom.md), but not a sufficient one -- other important steps have to follow.
|
||||
|
||||
|
|
38
esolang.md
38
esolang.md
|
@ -1,21 +1,22 @@
|
|||
# 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 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 [hello world in different languages](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 wiki for esolangs, the [Esolang Wiki](https://esolangs.org). If you want to behold esolangs in all their beauty, see [hello world in different languages](https://esolangs.org/wiki/Hello_world_program_in_esoteric_languages_(nonalphabetic_and_A-M%29). The Wiki is published under [CC0](cc0.md)!
|
||||
|
||||
Some notable ideas employed by esolangs are:
|
||||
|
||||
- Using images instead of text as [source code](source_code.md) (e.g. *Piet*).
|
||||
- Doing nothing (e.g. *Nothing*).
|
||||
- Being 2 or more dimensional (e.g. *Befunge* or *Hexagony*).
|
||||
- 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 compile as possible (e.g. *Befunge*).
|
||||
- Adding randomness to program execution (e.g. *Entropy*).
|
||||
- Having no [input/output](io.md) (e.g. *Compute*).
|
||||
- Obligation to beg the compiler to do its job (e.g. *INTERCAL*).
|
||||
- Using only white characters in source code (e.g. *Whitespace*).
|
||||
- Using only single letter in source code (e.g. *Unary*).
|
||||
- Using only a single letter in source code (e.g. *Unary*).
|
||||
- Using git repository structure as source code (e.g. *legit*).
|
||||
- Source code resembling dramatic plays (e.g. *Shakespeare*, actual [real-life](real_life.md) plays were performed).
|
||||
- Solely focus on [golfing](golf.md), i.e. writing the shortest possible programs (e.g. *GoldScript*)
|
||||
|
@ -24,10 +25,10 @@ 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)**.
|
||||
- **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.
|
||||
- **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.
|
||||
|
||||
## History
|
||||
|
@ -35,3 +36,28 @@ Esolangs are great because:
|
|||
INTERCAL, made in 1972 by Donald Woods and James Lyon, is considered the first esolang in history: its goal was specifically intended to be different from traditional languages and so for example a level of politeness was introduced -- if there weren't enough PLEASE labels in the source code, the compiler wouldn't compile the program.
|
||||
|
||||
In 2005 esolang wiki was started.
|
||||
|
||||
## Specific Languages
|
||||
|
||||
The following is a list of some notable esoteric languages.
|
||||
|
||||
- **`!@$%^&*()+`**: Source code looks like gibberish.
|
||||
- **[Brainfuck](brainfuck.md)**: Extremely simple but hard to program in, arguably the most famous esolang with many forks.
|
||||
- **[Brainfork](brainfork.md)**: Brainfuck with added [multithreading](multithreading.md).
|
||||
- **[Befunge](befunge.md)**: Two dimensional language that's extremely hard to compile.
|
||||
- **[Chef](chef.md)**: Source codes look like cooking recipes.
|
||||
- **Entropy**: Adds randomness to programs, data in variables decay.
|
||||
- **FALSE**: Aims for as small compiler as possible, inspired creation of Brainfuck and other esolangs.
|
||||
- **Gravity**: Executing programs involves solving [differential equations](differential_equation.md) related to gravity, which is [uncomputable](computability.md).
|
||||
- **[INTERCAL](intercal.md)**: Maybe the first esolang, includes such statements as `PLEASE DO` which have to be present in order for the compilation to be successful.
|
||||
- **Nothing**: Does nothing, guarantees zero bugs.
|
||||
- **[Compute](compute.md)**: Can compute any existing problem in arbitrarily short time, but has no output so the result cannot be printed.
|
||||
- **[Omgrofl](omgrofl.md)**: Source code is composed of internet acronyms such as *lol*, *wtf*, *lmao* etc.
|
||||
- **Pi**: Source code looks like the number [pi](pi.md), errors encode the program.
|
||||
- **[Piet](piet.md)**: Source codes are images.
|
||||
- **Text**: Language that always prints its source code (it is not Turing complete). All [ASCII](ascii.md) files are programs in Text.
|
||||
- **Polynomial**: Programs are [polynomials](polynomial.md) whose zeros determine the commands.
|
||||
- **[Unary](unary.md)**: Source code uses only 1 character: `0`. Each program is just a sequence of zeros of different length.
|
||||
- **[Velato](velato.md)**: Source codes are [MIDI](midi.md) files.
|
||||
- **[Whitespace](whitespace.md)**: Source code uses only white characters (spaces, tabs and newlines) so it looks seemingly empty.
|
||||
- **XENBLN**: [Golfing](golf.md) language, hello world is just `š`.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Open Console
|
||||
|
||||
{~drummyfish comments: Open consoles are how I got into [suckless](suckless.md) programming, they taught me about the low-level, optimizations and how to actually program efficiently on very limited hardware. I recommend you grab one of these.}
|
||||
{ Open consoles are how I got into [suckless](suckless.md) programming, they taught me about the low-level, optimizations and how to actually program efficiently on very limited hardware. I recommend you grab one of these. ~drummyfish }
|
||||
|
||||
Open consoles are tiny Gameboy-like gaming consoles powered by [free software](free_software.md) and [hardware](free_hardware.md), which have relatively recently seen a small boom. Examples include [Arduboy](arduboy.md), [Pokitto](pokitto.md) or [Gamebuino](gamebuino.md). These are **NOT** the raspberry pi handhelds that run Gameboy emulators.
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Programming Language
|
||||
|
||||
Programming language is an artificial language created for humans to communicate algorithms to computers easily. Such language often tries to mimic human language (practically always English) but is much MUCH simpler so that a computer can actually analyze it and understand it precisely so it also partially looks like [math](math.md) expressions.
|
||||
Programming language is an artificial language created so that humans can relatively easily communicate [algorithms](algorithm.md) to computers. Such language often tries to mimic human language (practically always English) but is much MUCH simpler so that a computer can actually analyze it and understand it precisely so it also partially looks like [math](math.md) expressions.
|
||||
|
||||
For noobs: a programming language is actually much easier to learn than a foreign natural foreign language, it will typically have < 100 words to learn (out of which you'll mostly use like 10) and once you know one programming language, learning another becomes a breeze because they're all pretty similar in basic concepts. The hard part may be learning some of the concepts.
|
||||
For beginners: a programming language is actually much easier to learn than a foreign language, it will typically have fewer than 100 "words" to learn (out of which you'll mostly use like 10) and once you know one programming language, learning another becomes a breeze because they're all (usually) pretty similar in basic concepts. The hard part may be learning some of the concepts.
|
||||
|
||||
A programming language is distinct from a general computer language by its purpose to express algorithms and be used for creation of [programs](program.md). There are computer languages that are NOT programming languages (at least in the narrower sense), such as [HTML](html.md), [json](json.md) and so on.
|
||||
|
||||
|
@ -11,13 +11,13 @@ We divide programming languages into different groups. Perhaps the most common d
|
|||
- **compiled** languages: Meant to be transformed by a [compiler](compiler.md) to a [native](native.md) (directly executable) binary program. These languages are more efficient but usually more difficult to program in, less flexible and the compiled programs are non-portable (can't just be copy-pasted to another computer with different [architecture](isa.md) and expected to run). These languages are usually [lower level](low-level), use static and strong [typing](typing.md) and manual [memory management](memory_management.md). Examples: [C](c.md), [C++](cpp.md), [go](go.md), [rust](rust.md), [Haskell](haskell.md) or [Pascal](pascal.md).
|
||||
- **interpreted** languages: Meant to be interpreted by an [interpreter](interpreter.md) "on-the-go". Basically to run the program you need the interpreter of the language installed on your computer and this interpreter reads the [source code](source_code.md) as it is written and performs what it dictates. These languages are generally less efficient (slower, use more RAM) but also more flexible, easier to program in and [independent of platforms](platform_independent.md). These languages usually [higher-level](high_level.md), use weak and dynamic [typing](typing.md) and automatic [memory management](memory_management.md) ([garbage collection](garbage_collection.md)). Examples: [Python](python.md), [Perl](perl.md), [JavaScript](js.md) and [BASH](bash.md).
|
||||
|
||||
Sometimes the distinction here may not be completely clear, for example Python is normally considered an interpreted language but it can also be compiled into [bytecode](bytecode.md). [Java](java.md) is considered more of a compiled language but it doesn't compile to native code (it compiles to bytecode).
|
||||
Sometimes the distinction here may not be completely clear, for example Python is normally considered an interpreted language but it can also be compiled into [bytecode](bytecode.md) and even native code. [Java](java.md) is considered more of a compiled language but it doesn't compile to native code (it compiles to bytecode).
|
||||
|
||||
We can divide language in many more ways, for example based on their paradigm ([impertaive](imperative.md), [declarative](declarative.md), [object-oriented](oop.md), [functional](functional.md), logical, ...), purpose (general purpose, special purpose), computational strength ([turing complete](turing_complete.md) or weaker), level of abstraction (high, low), typing (strong, weak, dynamic, static) or function evaluation (strict, lazy).
|
||||
We can divide language in many more ways, for example based on their paradigm ([impertaive](imperative.md), [declarative](declarative.md), [object-oriented](oop.md), [functional](functional.md), [logical](logical.md), ...), purpose (general purpose, special purpose), computational power ([turing complete](turing_complete.md) or weaker), level of abstraction (high, low), [typing](data_type.md) (strong, weak, dynamic, static) or function evaluation (strict, lazy).
|
||||
|
||||
## Nice Languages
|
||||
|
||||
*THIS IS NOT A COMPREHENSIVE LIST, I can only include languages that I am familiar with, please add more* ~drummyfish
|
||||
{ *THIS IS NOT A COMPREHENSIVE LIST, I can only include languages that I am familiar with, please add more* ~drummyfish }
|
||||
|
||||
- [C](c.md): the one and only, the go-to language of the [suckless](suckless.md) community and of compiled languages in general, greatly [future-proof](future_proof.md), uncontested in performance and with nice oldschool [meme](meme.md)-free design, our beloved C
|
||||
- [Scheme](scheme.md): the minimal/elegant member of [lisp](lisp.md) family of [functional](functional.md) languages
|
||||
|
|
64
quantum_gate.md
Normal file
64
quantum_gate.md
Normal file
|
@ -0,0 +1,64 @@
|
|||
# Quantum Gate
|
||||
|
||||
{ Currently studying this, there may be errors. ~drummyfish }
|
||||
|
||||
Quantum (logic) gate is a [quantum computing](quantum.md) equivalent of a traditional [logic gate](logic_gate.md). A quantum gate takes as an input *N* [qubits](qubit.md) and transforms their states to new states.
|
||||
|
||||
Quantum gates are represented by [complex](complex_number.md) [matrices](matrix.md) that transform the qubit states (which can be seen as points in multidimensional space, see Bloch sphere). A gate operating on *N* qubits is represented by a *2^N*x*2^N* matrix. These matrices have to be **unitary**. Operations performed by quantum gates may be reversed, unlike those of classical logic gates.
|
||||
|
||||
We normally represent a single qubit state with a **column** [vector](vector.md) *|a> = a0 * |0> + a1 * |1> = [a0, a1]* (look up bra-ket notation). Multiple qubit states are represented as a [tensor product](tensor_product.md) of the individual state, e.g. *|a,b> = [a0 * b0, a0 * b1, a1 * b0, a1 * b1]*. Applying a quantum gate *G* to such a qubit vector *q* is performed by simple matrix multiplication: *G * v*.
|
||||
|
||||
## Basic gates
|
||||
|
||||
Here are some of the most common quantum gates.
|
||||
|
||||
### Identity
|
||||
|
||||
Acts on 1 qubit, leaves the qubit state unchanged.
|
||||
|
||||
```
|
||||
1 0
|
||||
0 1
|
||||
```
|
||||
|
||||
## Pauli Gates
|
||||
|
||||
Act on 1 qubit. There are three types of Pauli gates: X, Y and Z, each one rotates the qubit about the respective axis by [pi](pi.md) radians.
|
||||
|
||||
The X gate is:
|
||||
|
||||
```
|
||||
0 1
|
||||
1 0
|
||||
```
|
||||
|
||||
The Y gate is:
|
||||
|
||||
```
|
||||
0 -i
|
||||
i 0
|
||||
```
|
||||
|
||||
The Z gate is:
|
||||
|
||||
```
|
||||
1 0
|
||||
0 -1
|
||||
```
|
||||
|
||||
## NOT
|
||||
|
||||
The not gate is identical to the Pauli X gate. It acts on 1 qubit and switches the probabilities of measuring 0 vs 1.
|
||||
|
||||
## CNOT
|
||||
|
||||
Controlled NOT, acts on 2 qubits. Performs NOT on the second qubit if the first qubit is *|1>*.
|
||||
|
||||
```
|
||||
1 0 0 0
|
||||
0 1 0 0
|
||||
0 0 0 1
|
||||
0 0 1 0
|
||||
```
|
||||
|
||||
TODO
|
21
qubit.md
Normal file
21
qubit.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Qubit
|
||||
|
||||
Qubit is a [quantum computing](quantum.md) equivalent of a [bit](bit.md). While bits in classical computers can have one of two state -- either 0 or 1 -- a qubit can additionally have infinitely many states "in between" 0 and 1 (so called [superposition](superposition.md)). Physically qubits can be realized thanks to quantum states of particles, e.g. the polarization of a photon or the spin of a photon. Qubits are processed with [quantum gates](quantum_gate.md).
|
||||
|
||||
**Whenever we measure a qubit, we get either 1 or 0**, just like with a normal bit. However during quantum computations the internal state of a qubit is more complex. This state determines the **probabilities** of measuring either 1 or 0. When the measurement is performed (which is basically any observation of its state), the qubit state collapses into one of those two states.
|
||||
|
||||
The state of a qubit can be written as
|
||||
|
||||
*A * |0> + B * |1>*
|
||||
|
||||
where *A* and *B* are [complex numbers](complex_number.md) such that *A^2 + B^2 = 1*, *|0>* is a vector [0, 1] and *|1>* is a vector [1, 0]. *A^2* gives the probability of measuring the qubit in the state 0, *B^2* gives the probability of measuring 1.
|
||||
|
||||
The vectors *|0>* and *|1>* use so called bra-ket notation and represent a vector basis of a two dimensional state. So the qubit space is a point in a space with two axes, but since *A* and *B* are complex, the whole space is four dimensional (there are 4 variables: *A* real, *A* imaginary, *B* real and *B* imaginary). However, since *A + B* must be equal to 1 ([normalized](normalization.md)), the point cannot be anywhere in this space. Using logic^TM we can figure out that the final state of a qubit really IS a point in two dimensions: a point on a sphere (Bloch sphere). A point of the sphere can be specified with two coordinates: *phase* ([yaw](yaw.md), 0 to 2 [pi](pi.md), can be computed from many repeated measurements) and *p* ([pitch](pitch.md), says he probability of measuring 1). It holds that:
|
||||
|
||||
*A = sqrt(1 - p)*
|
||||
|
||||
*B = e^(i * phase) * sqrt(p)*
|
||||
|
||||
The sphere has the state |0> at the top (north pole) and |1> at the bottom (south pole); these are the only points a normal bit can occupy. The equator is an area of states where the probability of measuring 0 and 1 are equal (above the equator gives a higher probability to 0, below the equator to 1).
|
||||
|
||||
In fact this all holds only with so called *pure* states. A quibit can sometimes also have a *mixed* state; such a state can be represented by a point inside the sphere.
|
5
tensor_product.md
Normal file
5
tensor_product.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Tensor Product
|
||||
|
||||
TODO
|
||||
|
||||
*a (x) b = [a0 * b0, a0 * b1, a0 * b2, ... a1 * b0, a1 * b1, ... an * b0, an * b1, ...]*
|
12
unix.md
Normal file
12
unix.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Unix
|
||||
|
||||
Unix is an [old](old.md) [operating system](operating_system.md) developed since 1960s as a research project of [Bell Labs](bell_labs.md), which has become one of the most influential pieces of software in history and whose principles (e.g. the [Unix philosophy](unix_philosophy.md)) live on in many so called Unix-like operating systems such as [Linux](linux.md) and [BSD](bsd.md) (at least to some degree). The original system itself is no longer in use, the name UNIX is nowadays a trademark and a certification.
|
||||
|
||||
## History
|
||||
|
||||
In the 1960s, Bell Labs along with other groups were developing [Multics](multics.md), a kind of [operating system](os.md) -- however the project failed and was abandoned for its complexity and expensiveness of development. In 1969 two Multics developers, [Ken Thompson](key_thompson.md) and [Dennis Ritchie](dennis_ritchie.md), then started to create their own system, this time with a different philosophy; that of [simplicity](minimalism.md) (see [Unix philosophy](unix_philosophy.md)). They weren't alone in developing the system, a number of other hackers helped program such things as a file system, [shell](shell.md) and simple utility programs. At VCF East 2019 Thompson said that they developed Unix as a working system in three weeks. At this point Unix was written in [assembly](assembly.md).
|
||||
|
||||
In the early 1970s the system got funding as well as its name Unix (a pun on Multix). By now Thompson and Richie were developing a new language for Unix which would eventually become the [C](c.md) language. In version 4 (1973) Unix was rewritten in C.
|
||||
|
||||
Unix then started being sold commercially. This lead to its fragmentation into different versions such as the [BSD](bsd.md) or [Solaris](solaris.md). In 1983 a version called System V was released which would become one of the most successful. The fragmentation and a lack of a unified standard led to so called [Unix Wars](unix_wars.md) in the late 1980s, which led to a few Unix standards such as [POSIX](posix.md) and Single Unix Specification.
|
||||
|
Loading…
Reference in a new issue