parent
51c4db334f
commit
11591efdcd
331 changed files with 10296 additions and 0 deletions
3
21st_century.md
Normal file
3
21st_century.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# 21st Century
|
||||||
|
|
||||||
|
21st century, known as the Age Of [Shit](shit.md), is already one of the worst centuries in history despite only being around shortly.
|
85
3d_rendering.md
Normal file
85
3d_rendering.md
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
# 3D Rendering
|
||||||
|
|
||||||
|
In [computer graphics](graphics.md) 3D rendering is concerned with computing images that represent a projected view of 3D objects through a virtual camera.
|
||||||
|
|
||||||
|
There are many methods and [algorithms](algorithm.md) for doing so differing in many aspects such as computation complexity, implementation complexity, realism of the result, representation of the 3D data, limitations of viewing and so on. If you are just interested in the [realtime](realtime.md) 3D rendering used in [gaymes](game.md) nowadays, you are probably interested in [GPU](gpu.md)-accelerated 3D [rasterization](rasterization.md) with [APIs](api.md) such as [OpenGL](opengl.md) and [Vulkan](vulkan.md).
|
||||||
|
|
||||||
|
[LRS](lrs.md) has a 3D rendering library called [small3dlib](small3dlib.md).
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
A table of some common 3D rendering methods follows, including the most simple, most advanced and some unconventional ones. Note that here we talk about methods and techniques rather than algorithms, i.e. general approaches that are often modified and combined into a specific rendering algorithm. For example the traditional triangle rasterization is sometimes combined with raytracing to add e.g. realistic reflections. The methods may also be further enriched with features such as [texturing](texture.md), [antialiasing](antialiasing.md) and so on. The table below should help you choose the base 3D rendering method for your specific program.
|
||||||
|
|
||||||
|
The methods may be tagged with the following:
|
||||||
|
|
||||||
|
- *2.5D*: primitive 3D, often called [pseudo 3D](pseudo_3d.md) or fake 3D, having significant limitations e.g. in degrees of freedom of the camera
|
||||||
|
- *off*: slow method usually used for offline (non-realtime) rendering (even though they indeed may run in real time e.g. with the help of powerful GPUs)
|
||||||
|
- *IO* vs *OO*: [image order](image_order.md) (rendering by pixels) vs [object order](object_order.md) (rendering by objects)
|
||||||
|
|
||||||
|
| method | notes |
|
||||||
|
|------------------------------------------|------------------------------------|
|
||||||
|
|[3D raycasting](raycasting.md) |*IO off*, shoots rays from camera |
|
||||||
|
|[2D raycasting](raycasting.md) |*IO 2.5D*, e.g. [Wolf3D](wolf3D.md) |
|
||||||
|
|[beamtracing](beamtracing.md) |*IO off* |
|
||||||
|
|[billboarding](billboard.md) |*OO* |
|
||||||
|
|[BSP rendering](bsp.md) |*2.5D*, e.g. [Doom](doom.md) |
|
||||||
|
|[conetracing](conetracing.md) |*IO off* |
|
||||||
|
|"[dungeon crawler](dungeon_crawler.md)" |*OO 2.5D*, e.g. Eye of the Beholder |
|
||||||
|
|ellipsoid rasterization |*OO*, e.g. Ecstatica |
|
||||||
|
|flat-shaded 1 point perspective |*OO 2.5D*, e.g. Skyroads |
|
||||||
|
|reverse raytracing (photon tracing) |*OO off*, inefficient |
|
||||||
|
|[image based rendering](ibr.md) |generating inbetween views |
|
||||||
|
|[mode 7](mode7.md) |*IO 2.5D*, e.g. F-Zero |
|
||||||
|
|[parallax scrolling](parallax.md) |*2.5D*, very primitive |
|
||||||
|
|[pathtracing](pathtracing.md) |*IO off*, Monte Carlo, high realism |
|
||||||
|
|[portal rendering](portal_rendering.md) |*2.5D*, e.g. [Duke3D](duke3d.md) |
|
||||||
|
|prerendered view angles |*2.5D*, e.g. Iridion II (GBA) |
|
||||||
|
|[raymarching](raymaching.md) |*IO off*, e.g. with [SDFs](sdf.md) |
|
||||||
|
|[raytracing](raytracing.md) |*IO off*, recursive 3D raycasting |
|
||||||
|
|segmented road |*OO 2.5D*, e.g. Outrun |
|
||||||
|
|[shear warp rednering](shear_warp.md) |*IO*, volumetric |
|
||||||
|
|[splatting](splatting.md) |*OO*, rendering with 2D blobs |
|
||||||
|
|[triangle rasterization](rasterization.md)|*OO*, traditional in GPUs |
|
||||||
|
|[voxel space rendering](voxel_space.md) |*OO 2.5D*, e.g. Comanche |
|
||||||
|
|[wireframe rendering](wireframe.md) |*OO*, just lines |
|
||||||
|
|
||||||
|
TODO: Rescue On Fractalus!
|
||||||
|
|
||||||
|
TODO: find out how build engine/slab6 voxel rendering worked and possibly add it here (from http://advsys.net/ken/voxlap.htm seems to be based on raycasting)
|
||||||
|
|
||||||
|
TODO: VoxelQuest has some innovative voxel rendering, check it out (https://www.voxelquest.com/news/how-does-voxel-quest-work-now-august-2015-update)
|
||||||
|
|
||||||
|
## Mainstream Realtime 3D
|
||||||
|
|
||||||
|
You may have come here just to learn about the typical realtime 3D rendering used in today's [games](game.md) because aside from research and niche areas this kind of 3D is what we normally deal with in practice. This is what this section is about.
|
||||||
|
|
||||||
|
Nowadays this kind of 3D stands for a [GPU](gpu.md) accelerated 3D [rasterization](rasterization.md) done with rendering [APIs](api.md) such as [OpenGL](opengl.md), [Vulkan](vulkan.md), [Direct3D](d3d.md) or [Metal](metal.md) (the last two being [proprietary](proprietary.md) and therefore [shit](shit.md)) and higher level engines above them, e.g. [Godot](godot.md), [OpenSceneGraph](osg.md) etc. The methods seem to be evolving to some kind of rasterization/[pathtracing](pathtracing.md) hybrid, but rasterization is still the basis.
|
||||||
|
|
||||||
|
This mainstream rendering uses an [object order](object_order.md) approach (it blits 3D objects onto the screen rather than determining each pixel's color separately) and works on the principle of **triangle rasterization**, i.e. 3D models are composed of triangles (or higher polygons which are however eventually broken down into triangles) and these triangles are projected onto the screen according to the position of the virtual camera and laws of [perspective](perspective.md). Projecting the triangles means finding the 2D screen coordinates of each of the triangle's three vertices -- once we have thee coordinates, we draw (rasterize) the triangle to the screen just as a "normal" 2D triangle (well, with some asterisks).
|
||||||
|
|
||||||
|
Furthermore things such as [z-buffering](z_buffer.md) (for determining correct overlap of triangles) and [double buffering](double_buffering.md) are used, which makes this approach very memory ([RAM](ram.md)/[VRAM](vram.md)) expensive -- of course mainstream computers have more than enough memory but smaller computers (e.g. [embedded](embedded.md)) may suffer and be unable to handle this kind of rendering. Thankfully it is possible to adapt and imitate this kind of rendering even on "small" computers -- even those that don't have a GPU, i.e. with pure [software rendering](sw_rendering.md). For this we e.g. replace z-buffering with [painter's algorithm](painters_algorithm.md) (triangle sorting), drop features like [perspective correction](perspective_correction.md), [MIP mapping](mip_mapping.md) etc. (of course quality of the output will go down).
|
||||||
|
|
||||||
|
Also additionally there's a lot of [bloat](bloat.md) added in such as complex [screen space](screen_space.md) shaders, [pathtracing](pathtracing.md) (popularly known as *raytracing*), [megatexturing](megatexturing.md), [shadow rendering](shadow.md), [postprocessing](postprocessing.md), [compute shaders](compute_shader.md) etc. This may make it difficult to get into "modern" 3D rendering. Remember to [keep it simple](kiss.md).
|
||||||
|
|
||||||
|
On PCs the whole rendering process is hardware-accelerated with a [GPU](gpu.md) (graphics card). GPU is a special hardware capable of performing many operations in [parallel](parallelism.md) (as opposed to a [CPU](cpu.md) which mostly computes sequentially with low level of parallelism) -- this is great for graphics because we can for example perform mapping and drawing of many triangles at once, greatly increasing the speed of rendering ([FPS](fps.md)). However this hugely increases the [complexity](complexity.md) of the whole rendering system, we have to have a special [API](api.md) and [drivers](driver.md) for communication with the GPU and we have to upload data (3D models, textures, ...) to the GPU before we want to render them. [Debugging](debugging.md) gets a lot more difficult.
|
||||||
|
|
||||||
|
GPU nowadays are kind of general devices that can be used for more than just 3D rendering (e.g. [crypto](crypto.md) mining) and can no longer perform 3D rendering by themselves -- for this they have to be programmed. I.e. if we want to use a GPU for rendering, not only do we need a GPU but also some extra code. This code is provided by "systems" such as [OpenGL](opengl.md) or [Vulkan](vulkan.md) which consist of an [API](api.md) (an [interface](interface.md) we use from a [programming language](programming_language.md)) and the underlying implementation in a form of a [driver](driver.md) (e.g. [Mesa3D](mesa3d.md)). Any such rendering system has its own architecture and details of how it works, so we have to study it a bit if we want to use it.
|
||||||
|
|
||||||
|
The important part of a system such as OpenGL is its **rendering [pipeline](pipeline.md)**. Pipeline is the "path" through which data go through the rendering process. Each rendering system and even potentially each of its version may have a slightly different pipeline (but generally all mainstream pipelines somehow achieve rasterizing triangles, the difference is in details of how they achieve it). The pipeline consists of **stages** that follow one after another (e.g. the mentioned mapping of vertices and drawing of triangles constitute separate stages). A very important fact is that some (not all) of these stages are programmable with so called **[shaders](shader.md)**. A shader is a program written in a special language (e.g. [GLSL](glsl.md) for OpenGL) running on the GPU that processes the data in some stage of the pipeline (therefore we distinguish different types of shaders based on at which part of the pipeline they reside). In early GPUs stages were not programmable but they became so as to give a greater flexibility -- shaders allow us to implement all kinds of effects that would otherwise be impossible.
|
||||||
|
|
||||||
|
Let's see what a typical pipeline might look like, similarly to something we might see e.g. in OpenGL. We normally simulate such a pipeline also in [software renderers](sw_rendering.md). Note that the details such as the coordinate system [handedness](handedness.md) and presence, order, naming or programmability of different stages will differ in any particular pipeline, this is just one possible scenario:
|
||||||
|
|
||||||
|
1. Vertex data (e.g. 3D [model space](model_space.md) coordinates of triangle vertices of a 3D model) are taken from a vertex buffer (a GPU memory to which the data have been uploaded).
|
||||||
|
2. **Stage: [vertex shader](vertex_shader.md)**: Each vertex is processed with a vertex shader, i.e. one vertex goes into the shader and one vertex (processed) goes out. Here the shader typically maps the vertex 3D coordinates to the screen 2D coordinates (or [normalized device coordinates](ndc.md)) by:
|
||||||
|
- multiplying the vertex by a [model matrix](model_matrix.md) (transforms from [model space](model_space.md) to [world space](world_space.md), i.e. applies the model move/rotate/scale operations)
|
||||||
|
- multiplying by [view matrix](view_matrix.md) (transforms from [world space](world_space.md) to [camera space](camera_space.md), i.e. takes into account camera position and rotation)
|
||||||
|
- multiplying by [projection matrix](projection_matrix.md) (applies perspective, transforms from [camera space](camera_space.md) to [screen space](screen_space.md) in [homogeneous coordinates](homogeneous_coordinates.md))
|
||||||
|
3. Possible optional stages that follow are [tessellation](tessellation.md) and geometry processing ([tessellation shaders](tessellation_shader.md) and [geometry shader](geometry_shader.md)). These offer possibility of advanced vertex processing (e.g. generation of extra vertices which vertex shaders are unable to do).
|
||||||
|
4. **Stage: vertex post processing**: Usually not programmable (no shaders here). Here the GPU does things such as [clipping](clipping.md) (handling vertices outside the screen space), primitive assembly and [perspective divide](perspective_divide.md) (transforming from [homogeneous coordinates](homogeneous coordinates.md) to traditional [cartesian coordinates](cartesian_coordinates.md)).
|
||||||
|
5. **Stage: [rasterization](rasterization.md)**: Usually not programmable, the GPU here turns triangles into actual [pixels](pixel.md) (or [fragments](fragment.md)), possibly applying [backface culling](backface_culling.md), [perspective correction](perspective_correction.md) and things like [stencil test](stencil_test.md) and [depth test](dept_test.md) (even though if fragment shaders are allowed to modify depth, this may be postpones to later).
|
||||||
|
6. **Stage: pixel/fragment processing**: Each pixel (fragment) produced by rasterization is processed here by a [pixel/fragment shader](fragment_shader.md). The shader is passed the pixel/fragment along with its coordinates, depth and possibly other attributes, and outputs a processed pixel/fragment with a specific color. Typically here we perform [shading](shading.md) and [texturing](texture.md) (pixel/fragment shaders can access texture data which are again stored in texture buffers on the GPU).
|
||||||
|
7. Now the pixels are written to the output buffer which will be shown on screen. This can potentially be preceded by other operations such as depth tests, as mentioned above.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
TODO: example of specific data going through the pipeline
|
5
42.md
Normal file
5
42.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# 42
|
||||||
|
|
||||||
|
42 is an even integer with prime factorization of 2 * 3 * 7. This number was made kind of famous (and later overused in pop culture to the point of completely destroying the joke) by Douglas Adams' book The Hitchhiker's Guide to the Galaxy in which it appears as the answer to the ultimate question of life, the Universe and everything (the point of the joke was that this number was the ultimate answer computed by a giant supercomputer over millions of years, but it was ultimately useless as no one knew the question to which this number was the answer).
|
||||||
|
|
||||||
|
If you make a 42 reference in front of a TBBT fan, he will shit himself.
|
7
4chan.md
Normal file
7
4chan.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# 4chan
|
||||||
|
|
||||||
|
4chan (https://4chan.org/) is the most famous [image board](image_board.md) and a place where a lot of [memes](meme.md) come to existence. As most image boards, 4chan has a nice, oldschool minimalist look, even though it contains shitty captchas for posting and the site's code is [proprietary](proprietary.md). The site tolerates a great amount of [free speech](free_speech.md) up to the point of being regularly labeled "right-wing extremist site" (although bans for stupid reasons are very common, speaking from experience).
|
||||||
|
|
||||||
|
For us the most important part of 4chan is the technology board known as /g/ (for technoloGEE). Browsing /g/ can bring all kinds of emotion, it's a place of relative freedom and somewhat beautiful chaos where all people from absolute retards to geniuses argue about important and unimportant things, brands, tech news and memes, and constantly advise each other to kill themselves. Sometimes the place is pretty toxic and not good for mental health.
|
||||||
|
|
||||||
|
2022 update: abandon ship, /g is officially unusable, a bunch of capitalist children arguing about brands, [productivity cult](productivity_cult.md), crypto, consumerism, "open soars", no trace of [free software](free_software.md). Not worth it anymore. You can still read very old thread on archives such as https://desuarchive.org/g/page/280004/.
|
9
README.md
Normal file
9
README.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Less Retarded Wiki
|
||||||
|
|
||||||
|
This is online at https://www.tastyfish.cz/lrs/main.html.
|
||||||
|
|
||||||
|
Wiki about less retarded software and related topics.
|
||||||
|
|
||||||
|
By contributing you agree to release your contribution under CC0 1.0, public domain (https://creativecommons.org/publicdomain/zero/1.0/). Please do **not** add anything copyrighted to this Wiki (such as copy pasted texts from elsewhere, images etc.).
|
||||||
|
|
||||||
|
Start reading at the [main page](main.md).
|
362
acronym.md
Normal file
362
acronym.md
Normal file
|
@ -0,0 +1,362 @@
|
||||||
|
# Acronym
|
||||||
|
|
||||||
|
Acronym is an abbreviation of a multiple word term by usually appending the starting letters of each word to form a new word.
|
||||||
|
|
||||||
|
Here is a list of some acronyms:
|
||||||
|
|
||||||
|
- **[AA](aa.md)** (anti [aliasing](aliasing.md))
|
||||||
|
- **[AC](ac.md)** (alternating current, air conditioning)
|
||||||
|
- **[ACID](acid.md)** (atomicity consistency isolation durability)
|
||||||
|
- **[ACK](ack.md)** (acknowledgement)
|
||||||
|
- **[ADSL](adsl.md)** (asymmetric digital subscriber line)
|
||||||
|
- **[AF](af.md)** (as fuck)
|
||||||
|
- **[AFAIK](afaik.md)** (as far as I know)
|
||||||
|
- **[AJAX](ajax.md)** (asynchronous [JavaScript](js.md) and [XML](xml.md))
|
||||||
|
- **[AFK](afk.md)** (away from keyboard)
|
||||||
|
- **[ALU](alu.md)** (arithmetic logic unit)
|
||||||
|
- **[AM](am.md)** (amplitude modulation)
|
||||||
|
- **[ANCAP](ancap.md)** (anarcho capitalist)
|
||||||
|
- **[ANPAC](anpac.md)** (anarcho pacifist)
|
||||||
|
- **[ANSI](ansi.md)** (american national standards institute)
|
||||||
|
- **[AO](ao.md)** (ambient occlusion)
|
||||||
|
- **[API](api.md)** (application programming interface)
|
||||||
|
- **[ARM](arm.md)** (advanced [RISC](risc.md) machines)
|
||||||
|
- **[ARPANET](arpanet.md)** (advanced research projects agency network)
|
||||||
|
- **[ASAP](asap.md)** (as soon as possible)
|
||||||
|
- **[ASCII](ascii.md)** (American standard code for information interchange)
|
||||||
|
- **[ASM](asm.md)** (assembly)
|
||||||
|
- **[ATM](atm.md)** (at the moment, automated teller machine)
|
||||||
|
- **[B](b.md)** (byte, bit)
|
||||||
|
- **[B4](b4.md)** (before)
|
||||||
|
- **[BASH](bash.md)** (bourne again shell)
|
||||||
|
- **[BASIC](basic.md)** (beginner all purpose symbolic instruction code)
|
||||||
|
- **[BBS](bbs.md)** (bulletin board system)
|
||||||
|
- **[BC](bc.md)** (bytecode)
|
||||||
|
- **[BCD](bcd.md)** (binary coded decimal)
|
||||||
|
- **[BDFL](bdfl.md)** (benevolent dictator for life)
|
||||||
|
- **[BF](bf.md)** (brainfuck)
|
||||||
|
- **[BG](bg.md)** (background, bad game)
|
||||||
|
- **[BGR](bgr.md)** (blue green red)
|
||||||
|
- **[BIOS](bios.md)** (basic [input/output](io.md) system)
|
||||||
|
- **[BJ](bj.md)** (blow job)
|
||||||
|
- **[BJT](bjt.md)** (bipolar junction transistor)
|
||||||
|
- **[BS](bs.md)** (bullshit)
|
||||||
|
- **[BTFO](btfo.md)** (blown the fuck out)
|
||||||
|
- **[CAD](cad.md)** (computer aided design)
|
||||||
|
- **[CAPTCHA](captcha.md)** (completely automated public Turing test to tell computers and humans apart)
|
||||||
|
- **[CC](cc.md)** (creative commons)
|
||||||
|
- **[CC0](cc0.md)** (creative commons zero)
|
||||||
|
- **[CD](cd.md)** (compact disc, change directory)
|
||||||
|
- **[CEO](ceo.md)** (chief executive officer)
|
||||||
|
- **[CGI](cgi.md)** (computer generated imagery)
|
||||||
|
- **[CISC](cisc.md)** (complex instruction set computer)
|
||||||
|
- **[CLI](cli.md)** (command line interface)
|
||||||
|
- **[CMOS](cmos.md)** (complementary metal oxide semiconductor)
|
||||||
|
- **[CMS](cms.md)** (content management system)
|
||||||
|
- **[CMYK](cmyk.md)** (cyan magenta yellow key)
|
||||||
|
- **[COMPSCI](compsci.md)** (computer science)
|
||||||
|
- **[CP](cp.md)** (child porn, copy)
|
||||||
|
- **[CPU](cpu.md)** (central processing unit)
|
||||||
|
- **[CRC](crc.md)** (cyclic redundancy check)
|
||||||
|
- **[CRT](crt.md)** (cathode ray tube)
|
||||||
|
- **[CSG](csg.md)** (constructive solid geometry)
|
||||||
|
- **[CSS](css.md)** (cascading style sheet)
|
||||||
|
- **[CSV](csv.md)** (comma separated values)
|
||||||
|
- **[DAC](dac.md)** (digital analog converter)
|
||||||
|
- **[DB](db.md)** (database)
|
||||||
|
- **[DC](dc.md)** (direct current)
|
||||||
|
- **[DDOS](ddos.md)** (distributed denial of service)
|
||||||
|
- **[DDR](ddr.md)** (double data rate)
|
||||||
|
- **[DE](de.md)** (desktop environment)
|
||||||
|
- **[DHCP](dhcp.md)** (dynamic host configuration protocol)
|
||||||
|
- **[DL](dl.md)** (download)
|
||||||
|
- **[DMA](dma.md)** (direct memory access)
|
||||||
|
- **[DMCA](dmca.md)** (digital millennium copyright act)
|
||||||
|
- **[DND](dnd.md)** (dungeons & dragons, do not disturb)
|
||||||
|
- **[DNS](dns.md)** (domain name system)
|
||||||
|
- **[DOM](dom.md)** (document object model)
|
||||||
|
- **[DOS](dos.md)** (disk operating system, denial of service)
|
||||||
|
- **[DPI](dpi.md)** (dots per inch)
|
||||||
|
- **[DRAM](dram.md)** (dynamic RAM)
|
||||||
|
- **[DRM](drm.md)** (digital restrictions management)
|
||||||
|
- **[DRY](dry.md)** (don't repeat yourself)
|
||||||
|
- **[DVD](dvd.md)** (digital versatile disc)
|
||||||
|
- **[EEPROM](eeprom.md)** (electronically erasable programmable ROM)
|
||||||
|
- **[ELF](elf.md)** (executable and linkable format)
|
||||||
|
- **[EMCAS](emacs.md)** (editor macros)
|
||||||
|
- **[ENIAC](eniac.md)** (electronic numerical integrator and computer)
|
||||||
|
- **[EOF](eof.md)** (end of [file](file.md))
|
||||||
|
- **[EOL](eol.md)** (end of line, end of life)
|
||||||
|
- **[ESR](esr.md)** (Erik Steven Raymond)
|
||||||
|
- **[EULA](eula.md)** (end user license agreement)
|
||||||
|
- **[FAQ](faq.md)** (frequently asked questions)
|
||||||
|
- **[FE](fe.md)** (frontend)
|
||||||
|
- **[FET](fet.md)** (field effect transistor)
|
||||||
|
- **[FFS](ffs.md)** (for fuck's sake)
|
||||||
|
- **[FIFO](fifo.md)** (first in first out)
|
||||||
|
- **[FLAC](flac.md)** (free lossless audio codec)
|
||||||
|
- **[FLOSS](floss.md)** (free libre open source software)
|
||||||
|
- **[FM](fm.md)** (frequency modulation)
|
||||||
|
- **[FML](fml.md)** (fuck my life)
|
||||||
|
- **[FORTRAN](fortran.md)** (formula translation)
|
||||||
|
- **[FOSS](foss.md)** (free and open source software)
|
||||||
|
- **[FSF](fsf.md)** ([free software](free_software.md) foundation)
|
||||||
|
- **[FP](fp.md)** ([floating point](float.md))
|
||||||
|
- **[FPGA](fpga.md)** (field programmable gate array)
|
||||||
|
- **[FPS](fps.md)** (frames per second, first person shooter)
|
||||||
|
- **[FQA](fqa.md)** (frequently questioned answers)
|
||||||
|
- **[FS](fs.md)** (file system)
|
||||||
|
- **[FTP](ftp.md)** (file transfer protocol)
|
||||||
|
- **[FU](fu.md)** (fuck you)
|
||||||
|
- **[FXAA](fxaa.md)** (full screen anti aliasing)
|
||||||
|
- **[FYI](fyi.md)** (for your information)
|
||||||
|
- **[GB](gb.md)** ([gigabyte/gigabit](memory_unit.md), GameBoy)
|
||||||
|
- **[GBPS](gbps.md)** (GB per second)
|
||||||
|
- **[GCC](gcc.md)** (GNU compiler collection)
|
||||||
|
- **[GDB](gdb.md)** (GNU debugger)
|
||||||
|
- **[GI](gi.md)** (global illumination)
|
||||||
|
- **[GIB](gib.md)** (gibibyte)
|
||||||
|
- **[GIF](gif.md)** (graphics interchange format)
|
||||||
|
- **[GIGO](gigo.md)** (garbage in garbage out)
|
||||||
|
- **[GIMP](gimp.md)** (GNU image manipulation program)
|
||||||
|
- **[GLUT](glut.md)** (OpenGL utility toolkit)
|
||||||
|
- **[GNOME](gnome.md)** (GNU network object model environment)
|
||||||
|
- **[GNU](gnu.md)** (GNU's Not Unix)
|
||||||
|
- **[GPG](gpg.md)** (GNU privacy guard)
|
||||||
|
- **[GPGPU](gpgpu.md)** (general purpose GPU)
|
||||||
|
- **[GPL](gpl.md)** (GNU General Public License)
|
||||||
|
- **[GPLv2](gpl.md)** (GPL version 2)
|
||||||
|
- **[GPLv3](gpl.md)** (GPL version 3)
|
||||||
|
- **[GPS](gps.md)** (global positioning system)
|
||||||
|
- **[GPU](gpl.md)** (graphics processing unit)
|
||||||
|
- **[GRUB](grub.md)** (grand unified boot loader)
|
||||||
|
- **[GSM](gsm.md)** (global system for mobile communication)
|
||||||
|
- **[GTK+](gtk_plus.md)** (GIMP toolking)
|
||||||
|
- **[GUI](gui.md)** (graphical user interface)
|
||||||
|
- **[H8](hate.md)** (hate)
|
||||||
|
- **[HD](hd.md)** (high definition)
|
||||||
|
- **[HDD](hdd.md)** (hard disc drive)
|
||||||
|
- **[HDMI](hdmi.md)** (HD multimedia interface)
|
||||||
|
- **[HW](hw.md)** (hardware)
|
||||||
|
- **[HTML](html.md)** ([hypertext](hypertext.md) markup language)
|
||||||
|
- **[HTTP](http.md)** (hypertext transfer protocol)
|
||||||
|
- **[HTTPS](https.md)** (HTTP secure)
|
||||||
|
- **[HURD](hurd.md)** (hird of unix replacing demons)
|
||||||
|
- **[HQ](hq.md)** (high quality)
|
||||||
|
- **[HZ](hz.md)** (hertz)
|
||||||
|
- **[IANA](iana.md)** (internet assigned number authority)
|
||||||
|
- **[IANAL](ianal.md)** (I am not a lawyer)
|
||||||
|
- **[ICMP](icmp.md)** (internet control message protocol)
|
||||||
|
- **[IDC](idc.md)** (I don't care)
|
||||||
|
- **[IDE](ide.md)** (integrated development environment)
|
||||||
|
- **[IEEE](ieee.md)** (institute for electrical and electronic
|
||||||
|
- **[IM](im.md)** (instant messaging)
|
||||||
|
- **[IMAP](imap.md)** (internet message access protocol)
|
||||||
|
- **[IMHO](imho.md)** (in my honest opinion)
|
||||||
|
- **[IMO](imo.md)** (in my opinion)
|
||||||
|
- **[INB4](inb4.md)** (in before)
|
||||||
|
- **[IO](io.md)** (input/output)
|
||||||
|
- **[IOT](iot.md)** (internet of things)
|
||||||
|
- **[IPS](ips.md)** (instructions per second)
|
||||||
|
- **[IP](ip.md)** (internet protocol, intellectual property)
|
||||||
|
- **[IPV4](ipv4.md)** (IP version 4)
|
||||||
|
- **[IPV6](ipv6.md)** (IP version 6)
|
||||||
|
- **[IRC](irc.md)** (internet relay chat)
|
||||||
|
- **[IRL](irl.md)** (in real life)
|
||||||
|
- **[ISA](isa.md)** (instruction set architecture)
|
||||||
|
- **[ISO](iso.md)** (international organization for standardization)
|
||||||
|
- **[ISP](isp.md)** (internet service provider)
|
||||||
|
- **[ISS](iss.md)** (international space station)
|
||||||
|
- **[IS](is.md)** (information system)
|
||||||
|
- **[IT](it.md)** (information technology)
|
||||||
|
- **[J2ME](j2me.md)** (java 2 micro edition)
|
||||||
|
- **[JB](jb.md)** ([jailbait](jailbait.md))
|
||||||
|
- **[JDK](jdk.md)** (java development kit)
|
||||||
|
- **[JIT](jit.md)** (just in time)
|
||||||
|
- **[JK](jk.md)** (just kidding)
|
||||||
|
- **[JPEG/JPG](jpg.md)** (joint photographic expert group)
|
||||||
|
- **[JS](js.md)** (JavaScript)
|
||||||
|
- **[JSON](json.md)** (JavaScript object notation)
|
||||||
|
- **[K&R](k_and_r.md)** (Kernighan and Ritchie)
|
||||||
|
- **[KB](kb.md)** ([kilobyte/kilobit](memory_unit.md))
|
||||||
|
- **[KBPS](kbps.md)** (KB per second)
|
||||||
|
- **[KDE](kde.md)** (K desktop environment)
|
||||||
|
- **[KEK](kek.md)** (a meme version of [LOL](lol.md) coming from World Of Warcraft)
|
||||||
|
- **[KHZ](khz.md)** (kilohertz)
|
||||||
|
- **[KIB](kib.md)** (kibibyte)
|
||||||
|
- **[KILL](kill.md)** (keep it [Linux](linux.md) loser)
|
||||||
|
- **[KISS](kiss.md)** (keep it simple stupid)
|
||||||
|
- **[KLOC](kloc.md)** (kilo LOC)
|
||||||
|
- **[KKK](kkk.md)** (ku klux klan)
|
||||||
|
- **[KYS](kys.md)** ([kill yourself](suicide.md))
|
||||||
|
- **[LAMP](lamp.md)** (linux apache mysql php)
|
||||||
|
- **[LAN](lan.md)** (local area network)
|
||||||
|
- **[LCD](lcd.md)** (liquid crystal display)
|
||||||
|
- **[LED](led.md)** (light emitting diode)
|
||||||
|
- **[LGBT](lgbt.md)** (lesbian gay bisexual trans)
|
||||||
|
- **[LGBTQ](lgbt.md)** (lesbian gay bisexual trans queer)
|
||||||
|
- **[LGPL](lgpl.md)** (lesser GPL)
|
||||||
|
- **[LIFO](lifo.md)** (last in first out)
|
||||||
|
- **[LISP](lisp.md)** (list processing)
|
||||||
|
- **[LMAO](lmao.md)** (laughing my ass off)
|
||||||
|
- **[LOC](loc.md)** (lines of code)
|
||||||
|
- **[LOL](lol.md)** (laughing out loud)
|
||||||
|
- **[LQ](lq.md)** (low quality)
|
||||||
|
- **[LRS](lrs.md)** (less retarded software)
|
||||||
|
- **[LSB](lsb.md)** (least significant bit)
|
||||||
|
- **[LUT](lut.md)** (lookup table)
|
||||||
|
- **[MBR](mbr.md)** (master boot record)
|
||||||
|
- **[MHZ](mhz.md)** (megahertz)
|
||||||
|
- **[MIB](mib.md)** (mebibyte)
|
||||||
|
- **[MIME](mime.md)** (multipurpose internet mail extension)
|
||||||
|
- **[MIP](mip.md)** (multum in parvo)
|
||||||
|
- **[MIPS](mips.md)** (millions of instructions per second)
|
||||||
|
- **[MBPS](mpbs.md)** (MB per second)
|
||||||
|
- **[MCU](mcu.md)** (microcontroller unit)
|
||||||
|
- **[MD](md.md)** (markdown)
|
||||||
|
- **[MFW](mfw.md)** (my face when)
|
||||||
|
- **[MMO](mmo.md)** (massively multiplayer online)
|
||||||
|
- **[MMX](mmx.md)** (multimedia extension)
|
||||||
|
- **[MMORPG](mmorpg)** (MMO RPG)
|
||||||
|
- **[MOSFET](mosfet.md)** (metal oxide semiconductor field effect transistor)
|
||||||
|
- **[MPEG](mpeg.md)** (motion pictures experts group)
|
||||||
|
- **[MR](mr.md)** (merge request)
|
||||||
|
- **[MS/M$](ms.md)** (Micro$oft)
|
||||||
|
- **[MSB](msb.md)** (most significant bit)
|
||||||
|
- **[MSC](msc.md)** (master of science)
|
||||||
|
- **[MSG](msg.md)** (message)
|
||||||
|
- **[MUD](mud.mf)** (multi user dungeon)
|
||||||
|
- **[NAN](nan.md)** (not a number)
|
||||||
|
- **[NASA](nasa.md)** (national aeronautic and space administration)
|
||||||
|
- **[NAT](nat.md)** (network address translation)
|
||||||
|
- **[NC](nc.md)** (non commercial)
|
||||||
|
- **[NGL](ngl.md)** (not gonna lie)
|
||||||
|
- **[NOP](nop.md)** (no operation)
|
||||||
|
- **[NP](np.md)** (nondeterministic polynomial)
|
||||||
|
- **[NTFS](ntfs.md)** (NT file system)
|
||||||
|
- **[OEM](oem.md)** (original equipment manufacturers)
|
||||||
|
- **[OGL](ogl.md)** (OpenGL)
|
||||||
|
- **[OMG](omg.md)** (oh my god)
|
||||||
|
- **[OO](oo.md)** (object oriented)
|
||||||
|
- **[OOP](oop.md)** (object oriented/obsessed programming)
|
||||||
|
- **[OS](os.md)** (operating system, open source)
|
||||||
|
- **[OSS](oss.md)** (open source software)
|
||||||
|
- **[OSI](osi.md)** ([open source](open_source.md) initiative)
|
||||||
|
- **[P2P](p2p.md)** (peer to peer)
|
||||||
|
- **[PB](pb.md)** (petabyte, petabit, personal best)
|
||||||
|
- **[PBR](pbr.md)** (physically based rendering)
|
||||||
|
- **[PC](pc.md)** (personal computer, political correctness)
|
||||||
|
- **[PD](pd.md)** ([public domain](public_domain.md))
|
||||||
|
- **[PDF](pdf.md)** (portable document format)
|
||||||
|
- **[PCM](pcm.md)** (pulse code modulation)
|
||||||
|
- **[PGP](pgp.md)** (pretty good privacy)
|
||||||
|
- **[PHD](phd.md)** (doctor of philosophy)
|
||||||
|
- **[PID](pid.md)** (process ID)
|
||||||
|
- **[PIN](pin.md)** (personal identification number)
|
||||||
|
- **[PNG](png.md)** (portable network graphics)
|
||||||
|
- **[POP3](pop3.md)** (post office protocol version 3)
|
||||||
|
- **[POSIX](posix.md)** (portable operating system interface)
|
||||||
|
- **[PPC](ppc.md)** (power PC)
|
||||||
|
- **[PR](pr.md)** (pull request)
|
||||||
|
- **[PS](ps.md)** ([Photoshop](photoshop.md), [Postscript](postscript.md), [PlayStation](playstation.md))
|
||||||
|
- **[PS2](ps2.md)** (personal system 2)
|
||||||
|
- **[PTHC](pthc.md)** (preteen hardcore)
|
||||||
|
- **[QOS](qos.md)** (quality of service)
|
||||||
|
- **[RAID](raid.md)** (redundant array of inexpensive discs)
|
||||||
|
- **[RAM](ram.md)** (random access [memory](memory.md))
|
||||||
|
- **[RC](rc.md)** (release candidate)
|
||||||
|
- **[RCL](raycastlib.md)** (raycastlib)
|
||||||
|
- **[REGEX](regex.md)** (regular expression)
|
||||||
|
- **[RFC](rfc.md)** (request for comments)
|
||||||
|
- **[RGB](rgb.md)** (red green blue)
|
||||||
|
- **[RGBA](rgba.md)** (red green blue alpha)
|
||||||
|
- **[RISC](risc.md)** (reduced instruction set computer)
|
||||||
|
- **[RIP](rip.md)** (rest in piece)
|
||||||
|
- **[RLE](rle.md)** (run length encoding)
|
||||||
|
- **[RMS](rms.md)** (Richard Matthew Stallman)
|
||||||
|
- **[RN](rn.md)** (right now)
|
||||||
|
- **[ROFL](rofl.md)** (rolling on floor laughing)
|
||||||
|
- **[ROM](rom.md)** ([read-only](read_only.md) memory)
|
||||||
|
- **[RPG](rpg.md)** (role playing game)
|
||||||
|
- **[RT](rt.md)** (real time)
|
||||||
|
- **[RTFM](rtfm.md)** (read the fucking manual)
|
||||||
|
- **[RTOS](rtos.md)** (real time operating system)
|
||||||
|
- **[S3L](small3dlib.md)** (small3dlib)
|
||||||
|
- **[SAAS](saas.md)** (software as a service)
|
||||||
|
- **[SAASS](saass.md)** (service as a software substitute)
|
||||||
|
- **[SAF](saf.md)** (smallabstractfish)
|
||||||
|
- **[SCL](smallchesslib)** (smallchesslib)
|
||||||
|
- **[SD](sd.md)** (standard definition, secure digital)
|
||||||
|
- **[SDF](sdf.md)** (signed distance function)
|
||||||
|
- **[SDK](sdk.md)** (software development kit)
|
||||||
|
- **[SDL](sdl.md)** (simple directmedia layer)
|
||||||
|
- **[SEO](seo.md)** (search engine optimization)
|
||||||
|
- **[SFX](sfx.md)** (sound effects)
|
||||||
|
- **[SGML](sgml.md)** (standard generalized markup language)
|
||||||
|
- **[SHA](sha.md)** (secure hash algorithm)
|
||||||
|
- **[SIG](sig.md)** (special interest group)
|
||||||
|
- **[SIM](sim.md)** (subscriber identity module)
|
||||||
|
- **[SIMD](simd.md)** (single [instruction](instruction.md) multiple [data](data.md))
|
||||||
|
- **[SLOC](sloc.md)** (source lines of code)
|
||||||
|
- **[SMS](sms.md)** (short message service)
|
||||||
|
- **[SMTP](smtp.md)** (simple mail transfer protocol)
|
||||||
|
- **[SNTP](sntp.md)** (simple network time protocol)
|
||||||
|
- **[SOC](soc.md)** (system on chip)
|
||||||
|
- **[SQL](sql.md)** (structured query language)
|
||||||
|
- **[SRAM](sram.md)** (static RAM)
|
||||||
|
- **[SSAO](ssao.md)** (screen space ambient occlusion)
|
||||||
|
- **[SSD](ssd.md)** (solid state drive)
|
||||||
|
- **[SSH](ssh.md)** (secure shell)
|
||||||
|
- **[SSL](ssl.md)** (secure socket layer)
|
||||||
|
- **[STFU](stfu.md)** (shut the fuck up)
|
||||||
|
- **[SVG](svg.md)** (scalable vector graphics)
|
||||||
|
- **[SW](software.md)** (software)
|
||||||
|
- **[TAS](tas.md)** (tool assisted speedrun)
|
||||||
|
- **[TB](tb.md)** (terabyte, terabit)
|
||||||
|
- **[TCC](tcc.md)** (tiny [C](c.md) compiler)
|
||||||
|
- **[TCP](tcp.md)** (transmission control protocol)
|
||||||
|
- **[TFT](tft.md)** (thin filter transistor)
|
||||||
|
- **[TFW](tfw.md)** (that face when)
|
||||||
|
- **[TLA](tla.md)** (three letter acronym)
|
||||||
|
- **[TM](tm.md)** ([trademark](trademark.md), [Turing machine](turing_machine.md))
|
||||||
|
- **[TOS](tos.md)** (terms of service)
|
||||||
|
- **[TTY](tty.md)** (teletype)
|
||||||
|
- **[TUI](tui.md)** (text user interface)
|
||||||
|
- **[UBI](ubi.md)** (universal basic income)
|
||||||
|
- **[UDP](udp.md)** (user datagram protocol)
|
||||||
|
- **[UI](ui.md)** (user interface)
|
||||||
|
- **[UML](uml.md)** (unified modeling language)
|
||||||
|
- **[URI](uri.md)** (uniform resource identifier)
|
||||||
|
- **[URL](url.md)** (uniform resource locator)
|
||||||
|
- **[USA](usa.md)** (united states of america)
|
||||||
|
- **[USB](usb.md)** (universal serial bus)
|
||||||
|
- **[UTC](utc.md)** (coordinated universal time)
|
||||||
|
- **[UTF](utf.md)** (unicode transformation format)
|
||||||
|
- **[UX](ux.md)** (user experience)
|
||||||
|
- **[VCS](vcs.md)** (version control system)
|
||||||
|
- **[VOD](vod.md)** (video on demand)
|
||||||
|
- **[VHS](vhs.md)** (video home system)
|
||||||
|
- **[VIM](vim.md)** ([vi](vi.md) improved)
|
||||||
|
- **[VFX](vfx.md)** (visual effects)
|
||||||
|
- **[VLAN](vlan.md)** (virtual LAN)
|
||||||
|
- **[VLIW](vliw.md)** (very long instruction word)
|
||||||
|
- **[VM](vm.md)** (virtual machine)
|
||||||
|
- **[VPN](vpn.md)** (virtual private network)
|
||||||
|
- **[VPS](vps.md)** (virtual private server)
|
||||||
|
- **[VRAM](vram.md)** (video RAM)
|
||||||
|
- **[W3C](w3c.md)** (world wide web consortium)
|
||||||
|
- **[WAN](wan.md)** (wide area network)
|
||||||
|
- **[WAP](wap.md)** (wireless application protocol)
|
||||||
|
- **[WIFI](wifi.md)** (wireless fidelity)
|
||||||
|
- **[WOW](wow.md)** (World Of Warcraft)
|
||||||
|
- **[WPA](wpa.md)** (WIFI protected access)
|
||||||
|
- **[WTF](wtf.md)** (what the fuck)
|
||||||
|
- **[WTFPL](wtfpl)** (do what the fuck you want to public [license](license.md))
|
||||||
|
- **[WYSIWYG](wysiwyg.md)** (what you see is what you get)
|
||||||
|
- **[WM](wm.md)** (window manager)
|
||||||
|
- **[WWW](www.md)** (world wide web)
|
||||||
|
- **[XAML](xaml.md)** (extensible application markup language)
|
||||||
|
- **[XHTML](xhtml.md)** (extensible HTML)
|
||||||
|
- **[XML](xml.md)** (extensible markup language)
|
||||||
|
- **[YOLO](yolo.md)** (you only live once)
|
||||||
|
- **[ZOMG](zomg.md)** (when you want to write OMG but accidentally also hit Z)
|
7
ai.md
Normal file
7
ai.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Artificial Intelligence
|
||||||
|
|
||||||
|
Artificial intelligence (AI) is an area of [computer science](compsci.md) whose effort lies in making computers simulate thinking of humans and possibly other biologically living beings. This may include making computers play [games](game.md) such as [chess](chess.md), understand and processing audio, images and text on high level of [abstraction](abstraction.md) (e.g. translation between natural languages), making predictions about complex systems such as stock market or weather or even exhibit a general human-like behavior. Even though today's focus in AI is on [machine learning](machine_learning.md) and especially [neural networks](neural_network.md), there are many other usable approaches and models such as "hand crafted" state tree searching algorithms that can simulate and even outperform the behavior of humans in certain specialized areas.
|
||||||
|
|
||||||
|
There's a concern that's still a matter of discussion about the dangers of developing a powerful AI, as that could possibly lead to a [technological singularity](tech_singularity.md) in which a super intelligent AI might take control over the whole world without humans being able to seize the control back. Even though it's still likely a far future and many people say the danger is not real, the question seems to be about *when* rather than *if*.
|
||||||
|
|
||||||
|
By about 2020, "AI" has become a [capitalist](capitalism.md) [buzzword](buzzword.md). They try to put machine learning into everything just for that AI label -- and of course, for a [bloat monopoly](bloat_monopoly.md).
|
176
algorithm.md
Normal file
176
algorithm.md
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
# Algorithm
|
||||||
|
|
||||||
|
Algorithm is an exact description of how to solve a problem. Algorithms are basically what [programming](programming.md) is all about: we tell computers, in very exact ways (with [programming languages](programming_language.md)), how to solve problems -- we write algorithms. But algorithms don't have to be just computer programs, they are simply instruction for solving problems.
|
||||||
|
|
||||||
|
Cooking recipes are sometimes given as an example of a non-computer algorithm. The so called wall-follower is a simple algorithm to get out of any maze: you just pick either a left-hand or right-hand wall and then keep following it. You may write a crazy algorithm for how to survive in a jungle, but it has to be **exact**; if there is any ambiguity, it is not considered an algorithm.
|
||||||
|
|
||||||
|
Interesting fact: contrary to intuition there are problems that are mathematically proven to be unsolvable by any algorithm, see [undecidability](undecidability.md), but for most practically encountered problems we can write an algorithm (though for some problems even our best algorithms can be unusably slow).
|
||||||
|
|
||||||
|
Algorithms are mostly written as a **series of steps** (or instructions); these steps may be specific actions (such as adding two numbers or drawing a pixel to the screen) or **conditional jumps** to other steps ("if condition X holds then jump to step N, otherwise continue"). These jumps can be used to create **[branches](branch.md)** (in programming known as *if-then-else*) and **[loops](loop.md)** (these two constructs are known as [control structures](control_structure.md) -- they don't express an action but control where we move in the algorithm itself). All in all, **any algorithm can be written with only these three constructs**:
|
||||||
|
|
||||||
|
- **sequence**: A series of steps, one after another.
|
||||||
|
- **selection** (branches, *if-then-else*): Two branches (sequences of steps) preceded by a condition; the first branch is executed only if the condition holds, the second ("else") branch is executed only if the condition doesn't hold (e.g. "If user password is correct, log the user in, otherwise print out an error.").
|
||||||
|
- **iteration** (loops, repetition): Sequence of steps that's repeated as long as certain condition holds (e.g. "As long as end of file is not reached, read and print out next character from the file.").
|
||||||
|
|
||||||
|
Note: in a wider sense algorithms may be expressed in other ways than sequences of steps (non-[imperative](imperative.md) ways, see [declarative languages](declarative.md)), even mathematical equations are often called algorithms because they *imply* the steps towards solving a problem. But we'll stick to the common meaning of algorithm given above.
|
||||||
|
|
||||||
|
Additional constructs can be introduced to make programming more comfortable, e.g. [subroutines/functions](function.md) (kind of small subprograms that the main program uses for solving the problem) or [switch](switch.md) statements (selection but with more than two branches). Loops are also commonly divided into several types: counted loops, loops with condition and the beginning and loops with condition at the end (`for`, `while` and `do while` in [C](c.md), respectively). Similarly to mathematical equations, algorithms make use of [variables](variable.md), i.e. values which can change that have a specific name (such as *x* or *myVariable*).
|
||||||
|
|
||||||
|
[Flowcharts](flowchart.md) are a way of visually expressing algorithms, you have probably seen some. [Decision trees](decision_tree.md) are special cases of algorithms that have no loops, you have probably seen some too. Even though some languages (mostly educational such as [Snap](snap.md)) are visual and similar to flow charts, it is not practical to create big algorithms in this way -- serious programs are written as a text in [programming languages](programming_language.md).
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
Let's write a simple algorithm that counts the number of divisors of given number *x* and check if the number is [prime](prime.md) along the way. (Note that we'll do it in a naive, educational way -- it can be done better). Let's start by writing the steps in plain [English](english.md):
|
||||||
|
|
||||||
|
1. Read the number *x* from the input.
|
||||||
|
2. Set the *divisor counter* to 0.
|
||||||
|
3. Set *currently checked number* to 1.
|
||||||
|
4. While *currently checked number* is lower or equal than *x*:
|
||||||
|
a. If *currently checked number* divides *x*, increase *divisor counter* by 1.
|
||||||
|
b. Increase *currently checked number*.
|
||||||
|
5. Write out the *divisor counter*.
|
||||||
|
6. If *divisor counter* is equal to 2, write out the number is a prime.
|
||||||
|
|
||||||
|
Notice that *x*, *divisor counter* and *currently checked number* are [variables](variable.md). Step 4 is a loop (iteration) and steps *a* and 6 are branches (selection). The flowchart of this algorithm is:
|
||||||
|
|
||||||
|
```
|
||||||
|
START
|
||||||
|
|
|
||||||
|
V
|
||||||
|
read x
|
||||||
|
|
|
||||||
|
V
|
||||||
|
set divisor count to 0
|
||||||
|
|
|
||||||
|
V
|
||||||
|
set checked number to 1
|
||||||
|
|
|
||||||
|
------------>|
|
||||||
|
| |
|
||||||
|
| V no
|
||||||
|
| checked number <= x ? -------
|
||||||
|
| | |
|
||||||
|
| | yes |
|
||||||
|
| V |
|
||||||
|
| checked number no |
|
||||||
|
| divides x ? -------- |
|
||||||
|
| | | |
|
||||||
|
| | yes | |
|
||||||
|
| V | |
|
||||||
|
| increase divisor | |
|
||||||
|
| count by 1 | |
|
||||||
|
| | | |
|
||||||
|
| V | |
|
||||||
|
--------------<------------- |
|
||||||
|
V no
|
||||||
|
divisor count = 2 ? ------
|
||||||
|
| |
|
||||||
|
| yes |
|
||||||
|
V |
|
||||||
|
print "number is prime" |
|
||||||
|
| |
|
||||||
|
|<---------------|
|
||||||
|
V
|
||||||
|
END
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
This algorithm would be written in [Python](python.md) as:
|
||||||
|
|
||||||
|
```
|
||||||
|
x = int(input("enter a number: "))
|
||||||
|
|
||||||
|
divisors = 0
|
||||||
|
|
||||||
|
for i in range(1,x + 1):
|
||||||
|
if x % i == 0:
|
||||||
|
divisors = divisors + 1
|
||||||
|
|
||||||
|
print("divisors: " + str(divisors))
|
||||||
|
|
||||||
|
if divisors == 2:
|
||||||
|
print("It is a prime!")
|
||||||
|
```
|
||||||
|
|
||||||
|
and in [C](c.md) as:
|
||||||
|
|
||||||
|
```
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
int x, divisors = 0;
|
||||||
|
|
||||||
|
scanf("%d",&x); // read a number
|
||||||
|
|
||||||
|
for (int i = 1; i <= x; ++i)
|
||||||
|
if (x % i == 0)
|
||||||
|
divisors = divisors + 1;
|
||||||
|
|
||||||
|
printf("number of divisors: %d\n",divisors);
|
||||||
|
|
||||||
|
if (divisors == 2)
|
||||||
|
puts("It is a prime!");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Study of Algorithms
|
||||||
|
|
||||||
|
As algorithms are at the heart of [computer science](scompsci.md), there's a lot of rich theory and knowledge about them.
|
||||||
|
|
||||||
|
[Turing machine](turing_machine.md), created by [Alan Turing](turing.md), is the traditional formal tool for studying algorithms. From theoretical computer science we know not all problems are [computable](computability.md), i.e. there are problems unsolvable by any algorithm (e.g. the [halting problem](halting_problem.md)). [Computational complexity](computational_complexity.md) is a theoretical study of resource consumption by algorithms, i.e. how fast and memory efficient algorithms are (see e.g. [P vs NP](p_vs_np.md)). [Mathematical programming](mathematical_programming.md) is concerned, besides others, with optimizing algorithms so that their time and/or space complexity is as low as possible which gives rise to algorithm design methods such as [dynamic programming](dynamic_programming.md) ([optimization](optimization.md) is a less theoretical approach to making more efficient algorithms). [Formal verification](formal_verification.md) is a field that tries to mathematically (and sometimes automatically) prove correctness of algorithms (this is needed for critical software, e.g. in planes or medicine). [Genetic programming](generic_programming.md) and some other methods of [artificial intelligence](ai.md) try to automatically create algorithms (*algorithms that create algorithms*). [Quantum computing](quantum.md) is concerned with creating new kind of algorithms algorithms for quantum computers (a new type of still-in-research computers). [Programming language](programming_language.md) design is an art of finding best ways of expressing algorithms.
|
||||||
|
|
||||||
|
## Specific Algorithms
|
||||||
|
|
||||||
|
Following are some common algorithms classified into groups.
|
||||||
|
|
||||||
|
- [graphics](graphics.md)
|
||||||
|
- [DDA](dda.md): line drawing algorithm
|
||||||
|
- [flood fill](flood_fille.md)
|
||||||
|
- [FXAA](fxaa.md)
|
||||||
|
- [Hough transform](hough_transform.md): finds shapes in pictures
|
||||||
|
- [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
|
||||||
|
- [heap sort](heap_sort.md)
|
||||||
|
- [insertion sort](insertion_sort.md)
|
||||||
|
- [merge sort](merge_sort.md)
|
||||||
|
- [shaker sort](shaker_sort.md)
|
||||||
|
- [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)
|
||||||
|
- [fizzbuzz](fizzbuzz.md): problem/simple algorithm given in job interviews to filter out complete [noobs](noob.md)
|
||||||
|
- [FFT](fft.md): quickly converts signal (audio, image, ...) to its representation in frequencies, one of the most famous and important algorithms
|
||||||
|
- [Huffman coding](huffman_code.md): [compression](compression.md) algorithm
|
||||||
|
- [Kalman filter](kalman_filter.md)
|
||||||
|
- [k-means](k_means.md): [clustering](clustering.md) algorithm
|
||||||
|
- [MD5](md5.md): [hash](hash.md) function
|
||||||
|
- [minimax](minimax.md) plus [alpha-beta pruning](alpha_beta.md): used by many [AI](ai.md)s that play turn based games
|
||||||
|
- [proof of work](proof_of_work.md) algorithms: used by some [cryptocurrencies](crypto.md)
|
||||||
|
- [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
|
||||||
|
|
||||||
|
- [programming](programming.md)
|
||||||
|
- [design pattern](design_pattern.md)
|
||||||
|
- [recursion](recursion.md)
|
47
aliasing.md
Normal file
47
aliasing.md
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# Aliasing
|
||||||
|
|
||||||
|
Aliasing is a certain mostly undesirable phenomenon that distorts signals (such as sounds or images) when they are [sampled](sampling.md) [discretely](discrete.md) (captured at periodic intervals) -- this can happen e.g. when capturing sound with digital recorders or when [rendering](rendering.md) computer graphics. There exist [antialiasing](antialiasing.md) methods for suppressing or even eliminating aliasing. Aliasing can be often seen on small checkerboard patterns as a moiré pattern (spatial aliasing), or maybe more famously on rotating wheels or helicopter rotor blades that in a video look like standing still or rotating the other way (temporal aliasing, caused by capturing images at intervals given by the camera's [FPS](fps.md)).
|
||||||
|
|
||||||
|
The following diagram shows the principle of aliasing:
|
||||||
|
|
||||||
|
```
|
||||||
|
^ original sampling period
|
||||||
|
| | | |<------------->|
|
||||||
|
| | _ | _ | _ |
|
||||||
|
| .'|'. .' '| .' '. | .' '. |
|
||||||
|
|/__|__\_______/____|\_______/_____\|______/_____\__|___
|
||||||
|
| | \ / | \ / \ / \ |
|
||||||
|
| | '._.' | '._.' |'._.' '|_.'
|
||||||
|
| | | | |
|
||||||
|
| : : : :
|
||||||
|
V : : : :
|
||||||
|
: : : :
|
||||||
|
^ : : : :
|
||||||
|
| : : : :
|
||||||
|
|---o---...____ : : :
|
||||||
|
| | '''''o...____ : :
|
||||||
|
|___|_______________|______ ''''----o_______________:___
|
||||||
|
| '''----___ |
|
||||||
|
| ''''O---
|
||||||
|
| reconstructed
|
||||||
|
|
|
||||||
|
V
|
||||||
|
```
|
||||||
|
|
||||||
|
The top signal is a [sine](sin.md) function of a certain [frequency](frequency.md). We are sampling this signal at periodic intervals indicated by the vertical lines (this is how e.g. digital sound recorders record sounds from the real world). Below we see that the samples we've taken make it seem as if the original signal was a sine wave of a much lower frequency. It is in fact impossible to tell from the recorded samples what the original signal looked like.
|
||||||
|
|
||||||
|
Let's note that signals can also be two and more dimensional, e.g. images can be viewed as 2D signals. These are of course affected by aliasing as well.
|
||||||
|
|
||||||
|
The explanation above shows why a helicopter's rotating blades look to stand still in a video whose [FPS](fps.md) is synchronized with the rotation -- at any moment the camera captures a frame (i.e. takes a sample), the blades are in the same position as before, hence they appear to not be moving in the video.
|
||||||
|
|
||||||
|
Of course this doesn't only happen with perfect sine waves. [Fourier transform](fourier_transform.md) shows that any signal can be represented as a sum of different sine waves, so aliasing can appear anywhere.
|
||||||
|
|
||||||
|
**Nyquist–Shannon sampling theorem** says that aliasing can NOT appear if we sample with at least twice as high frequency as that of the highest frequency in the sampled signal. This means that we can eliminate aliasing by using a [low pass filter](low_pass.md) before sampling which will eliminate any frequencies higher than the half of our sampling frequency. This is why audio is normally sampled with the rate of 44100 Hz -- from such samples it is possible to correctly reconstruct frequencies up to about 22000 Hz which is about the upper limit of human hearing.
|
||||||
|
|
||||||
|
Aliasing is also a common problem in [computer graphics](computer_graphics.md). For example when rendering textured 3D models, aliasing can appear in the texture if that texture is rendered at a smaller size than its resolution (when the texture is enlarged by rendering, aliasing can't appear because enlargement decreases the frequency of the sampled signal and the sampling theorem won't allow it to happen). (Actually if we don't address aliasing somehow, having lower resolution textures can unironically have beneficial effects on the quality of graphics.) This happens because texture samples are normally taken at single points that are computed by the texturing algorithm. Imagine that the texture consists of high-frequency details such as small checkerboard patterns of black and white pixels; it may happen that when the texture is rendered at lower resolution, the texturing algorithm chooses to render only the black pixels. Then when the model moves a little bit it may happen the algorithm will only choose the white pixels to render. This will result in the model blinking and alternating between being completely black and completely white (while it should rather be rendered as gray).
|
||||||
|
|
||||||
|
The same thing may happen in [ray tracing](ray_tracing.md) if we shoot a single sampling ray for each screen pixel. Note that [interpolation/filtering](interpolation.md) of textures won't fix texture aliasing. What can be used to reduce texture aliasing are e.g. by [mipmaps](mip.md) which store the texture along with its lower resolution versions -- during rendering a lower resolution of the texture is chosen if the texture is rendered as a smaller size, so that the sampling theorem is satisfied. However this is still not a silver bullet because the texture may e.g. be shrink in one direction but enlarged in other dimension (this is addressed by [anisotropic filtering](anisotropic_filtering.md)). However even if we sufficiently suppress aliasing in textures, aliasing can still appear in geometry. This can be reduced by [multisampling](multisampling.md), e.g. sending multiple rays for each pixel and then averaging their results -- by this we **increase our sampling frequency** and lower the probability of aliasing.
|
||||||
|
|
||||||
|
**Why doesn't aliasing happen in our eyes and ears?** Because our senses don't sample the world discretely, i.e. in single points -- our senses [integrate](integration.md). E.g. a rod or a cone in our eyes doesn't just see exactly one point in the world, it sees an averaged light over a small area, and it also doesn't sample the world at specific moments like cameras do, its excitation by light falls off gradually which averages the light over time, preventing temporal aliasing.
|
||||||
|
|
||||||
|
So all in all, **how to prevent aliasing?** As said above, we always try to satisfy the sampling theorem, i.e. make our sampling frequency at least twice as high as the highest frequency in the signal we're sampling, or at least get close to this situation and lower the probability of aliasing. This can be done by either increasing sampling frequency (which can be done smart, some methods try to detect where sampling should be denser), or by preprocessing the input signal with a low pass filter or otherwise ensure there won't be too high frequencies.
|
49
analytic_geometry.md
Normal file
49
analytic_geometry.md
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# Analytic Geometry
|
||||||
|
|
||||||
|
Analytic geometry is part of [mathematics](math.md) that solves [geometric](geometry.md) problems with [algebra](algebra.md); for example instead of finding an intersection of a line and a circle with ruler and compass, analytic geometry finds the intersection by solving an equation. In other words, instead of using pen and paper we use numbers. This is very important in computing as computers of course just work with numbers and aren't normally capable of drawing literal pictures and drawing results from them -- that would be laughable (or awesome?). Analytic geometry finds use especially in such fields as [physics simulations](physics_engine.md) ([collision](collision.md) detections) and [computer graphics](graphics.md), in methods such as [raytracing](raytracing.md) where we need to compute intersections of rays with various mathematically defined shapes in order to render 3D images. Of course the methods are used in other fields, for example [rocket science](rocket_science.md) and many other physics areas. Analytic geometry reflects the fact that geometric and algebraic problem are often analogous, i.e. it is also the case that many times problems we encounter in arithmetic can be seen as geometric problems and vice versa (i.e. solving an equation is the same as e.g. finding an intersection of some N-dimensional shapes).
|
||||||
|
|
||||||
|
[Fun](fun.md) fact: approaches in the opposite direction also exist, i.e. solving mathematical problems physically rather than by computation. For example [back in the day](back_then.md) when there weren't any computers to compute very difficult [integrals](integral.md) and computing them by hand would be immensely hard, people literally cut physical function plots out of paper and weighted them in order to find the integral. Awesome oldschool [hacking](hacking.md).
|
||||||
|
|
||||||
|
Anyway, **how does it work?** Typically we work in a 2D or 3D [Euclidean space](euclidean_space.md) with [Cartesian coordinates](cartesian_coords.md) (but of course we can generalize to more dimensions etc.). Here, geometric shapes can be described with [equations](equation.md) (or [inequalities](inequality.md)); for example a zero-centered circle in 2D with radius *r* has the equation *x^2 + y^2 = r^2* ([Pythagorean theorem](pythagorean_theorem.md)). This means that the circle is a set of all points *[x,y]* such that when substituted to the equation, the equation holds. Other shapes such as [lines](line.md), [planes](plane.md), [ellipses](ellipse.md), [parabolas](parabola.md) have similar equations. Now if we want to find intersections/unions/etc., we just solve systems of multiple equations/inequalities and find solutions (coordinates) that satisfy all equations/inequalities at once. This allows us to do basically anything we could do with pen and paper such as defining helper shapes and so on. Using these tools we can compute things such as angles, distances, areas, collision points and much more.
|
||||||
|
|
||||||
|
Analytic geometry is closely related to [linear algebra](linear_algebra.md).
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
Let's say we want to find, in 2D, where a line *L* intersects a circle *C*. *L* goes through points *A = [-3,0.5]* and *B = [3,2]*. *C* has center at *[0,0]* and radius *r = 2*.
|
||||||
|
|
||||||
|
The equation for the circle *C* is *x^2 + y^2 = 2^2*, i.e. *x^2 + y^2 = 4*. This is derived from [Pythagorean theorem](pythagorean_theorem.md), you can either check that or, if lazy, just trust this. Equations for common shapes can be looked up.
|
||||||
|
|
||||||
|
One possible form of an equation of a 2D line is a "slope + offset" equation: *y = k * x + q*, where *k* is the [tangent](tangent.md) (slope) of the line and *q* is an offset. To find the specific equation for our line *L* we need to first find the numbers *k* and *q*. This is done as follows.
|
||||||
|
|
||||||
|
The tangent (slope) *k* is *(B.y - A.y) / (B.x - A.x)*. This is the definition of a [tangent](tangent.md), see that if you don't understand this. So for us *k = (2 - 0.5) / (3 - -3) = 0.25*.
|
||||||
|
|
||||||
|
The number *q* (offset) is computed by simply substituting some point that lies on the line to the equation and solving for *q*. We can substitute either *A* or *B*, it doesn't matter. Let's go with *A*: *A.y = k * A.x + q*, with specific numbers this is *0.5 = 0.25 * -3 + q* from which we derive that *q = 1.25*.
|
||||||
|
|
||||||
|
Now we have computed both *k* and *q*, so we now have equations for both of our shapes:
|
||||||
|
|
||||||
|
- circle *C*: *x^2 + y^2 = 4*
|
||||||
|
- line *L*: *y = 0.25 * x + 1.25*
|
||||||
|
|
||||||
|
Feel free to check the equations, substitute a few points and plot them to see they really represent the shapes (e.g. if you substitute a specific *x* shape to the line equation you will get a specific *y* for it).
|
||||||
|
|
||||||
|
Now to find the intersections we have to solve the above system of equations, i.e. find such couples (coordinates) *[x,y]* that will satisfy both equations at once. One way to do this is to substitute the line equation into the circle equation. By this we get:
|
||||||
|
|
||||||
|
*x^2 + (0.25 * x + 1.25)^2 = 4*
|
||||||
|
|
||||||
|
This is a [quadratic equation](quadratic_equation.md), let's get it into the standard format so that we can solve it:
|
||||||
|
|
||||||
|
*x^2 + 0.0625 * x^2 + 0.625 * x + 1.5625 = 4*
|
||||||
|
|
||||||
|
*1.0625 * x^2 + 0.625 * x - 2.4375 = 0*
|
||||||
|
|
||||||
|
Note that this makes perfect sense: a quadratic equation can have either one, two or no solution (in the realm of [real numbers](real_number.md)), just as there can either be one, two or no intersection of a line and a circle.
|
||||||
|
|
||||||
|
Solving quadratic equation is simple so we skip the details. Here we get two solutions: *x1 = 1.24881* and *x2 = -1.83704*. These are the x position of our intersections. We can further find also the y coordinates by simply substituting these into the line equation, i.e. we get the final result:
|
||||||
|
|
||||||
|
- intersection 1: *[1.24881, 1.5622025]*
|
||||||
|
- intersection 2: *[-1.83704, 0.79074]*
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [linear algebra](linear_algebra.md)
|
72
anarch.md
Normal file
72
anarch.md
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
# Anarch
|
||||||
|
|
||||||
|
Anarch is a [LRS](lrs.ms)/[suckless](suckless.md) first person shooter [game](game.md) similar to [Doom](doom.md), written by [drummyfish](drummyfish.md). It has been designed to follow the LRS principles very closely and set an example of how games, and software in general, should be written.
|
||||||
|
|
||||||
|
Tge repo is available at https://codeberg.org/drummyfish/Anarch
|
||||||
|
or https://gitlab.com/drummyfish/anarch. Some info about the game can also be found at the [libregamewiki](lgw.md): https://libregamewiki.org/Anarch.
|
||||||
|
|
||||||
|
```
|
||||||
|
h@\hMh::@@hhh\h@rrrr//rrrrrrrrrrrrrrrrrrrr@@@@hMM@@@M@:@hhnhhMnr=\@hn@n@h@-::\:h
|
||||||
|
hMhh@@\\@@@\\h:M/r/////rrrrrrrrrrrrrrr//r@@@@@MMh@@hhh\\\=rMr=M@hh\hn\:\:h::\@\:
|
||||||
|
@nh==hhhMM@hrh\M/r/////rrrrrrrrrrrrrrr//@@@@@@hhM@h\MhhhMM\@@@@@M\hh\\\Mhh\\\\hh
|
||||||
|
:hh=@Mh/;;;@hr:M,///;;/////rrr//rrrrrr//@@@@@@hh\h@@hM:==h\@@::\\\:M\@\h\M:\:=@h
|
||||||
|
\=MhM@hr `hMhhM///@@@@@@@@@@@@@@@@@@@//@@@@@@rMM@n\M=:@M\\\\Mh\\\hr\n\--h-::r:r
|
||||||
|
:Mh@M@@` `rh@\@///@@@@@@@@@@@@@@@@@@@@@@@@@@@Mr\@@\h@:\h\h@\Mhh@@\M@@@@-n\rn@:h
|
||||||
|
:MhhMn@//r;;@/hM@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@MhMhh:M@MhMhMh@\\rM/@h@nn=-MrnM@:h
|
||||||
|
:nhhhhh\\//\::@M@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@rMM@@nh@M\=nh@@@M@..=hM@n@-@@@@@:h
|
||||||
|
\@\h@@rrrr/rr@=M@@@@@@@@@@@@@@nr@@@@@@@@@@@@@@Mrhn@\M@:nMh\@@@@@...h:::::@---::h
|
||||||
|
-M\h=h\` rhM\M@@@@@@@@@@@@@@@=@@@@@@@@@@@@@@MhM@\hh@M@Mhh@-\MMhrr\\\:MMh::\\-\
|
||||||
|
h@hhh\h` `rMh\M@@@@@@@@@@@@@@nr;;;;rn@@@@@@@@r@r///=@\@\r\\hM@nrrr@\n\h\M\\\\\:
|
||||||
|
hn===hhM=;hhhh\MrMnrr=rrr=r@rhhr;.r,/hr=r=r=h=r@=/-;/MhhMr:h\@h=...r\@hMhM:/\h\=
|
||||||
|
@n==M\h@=;hhh\\Mrr=r=r=rMr=hrMMr;;;,;========MM@r=./;@:MMM\h=r=rM/rh@@@M-n---:-h
|
||||||
|
:\=hMn@@@=\hhh:M===============;/. ,,==========@r-/--@:@M\\@@@n@Mn:hM@n@-=\hr=-h
|
||||||
|
\hhnM@=@::@MM/h================;;;;.,======\h==M=/;r,//;;r=r=r=r@\=r=r=r=@rnMn:r
|
||||||
|
:Mrrr=rr==@rr=rrr=rrr=/=r===r==/:; ..===r\\-h==@r-,;-=r/;/;;;;;;rnrrr=rrr=rrr=r;
|
||||||
|
rrrrrrrr@=rrrrrrrrrrr//r=r=r=r=r;. ,.r=r\---hr=@r===-r=r=;;;r;;;hh@:;;;;;;;;;;-;
|
||||||
|
r=rrr=rr\\@rr=rrr=r/;/:rr=rrr=rr;r,..=r\--.-h=r@r----=rrr=rrr--:,;;:,;;;,;;;,;--
|
||||||
|
rrrr:-@=====:,;,;-/;/:rrrrrrrrr;;....r\--.,\hrrrrrrrrrrrrrrrrrrrrr-----rrrrrrrrr
|
||||||
|
,;,:,; ;,;;;-;;;,;/:-rrrrrrrrrrrrrrrrr\-.,;\@rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
|
||||||
|
;,;,;,.,;,;,;,;,;,:rrrrrrrrrrrrrrrrrr\--.;,\Mrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
|
||||||
|
,;,;.-.-.-::-:::--rr/rrr/rrr/rrr/rrr/\-.:;::@rrr/rrr/rrr/rrr/rrr/rrr/rrr/rrr/rrr
|
||||||
|
-.-.r/r/r/r/r/r/r/r/r/r/r/r/r/r/r/r/\---;::\@/r/r/r/r/r/r/r/r/r/r/r/r/r/r/r/r/r/
|
||||||
|
/r/r/r/r/r/r/r/r/r/r/r/r/r/r/r/r/r/r\-.,;:,:@r/r/r/r/r/r/r/r/r/r/r/r/r/r/r/r/r/r
|
||||||
|
///////////////////////////////////\::-,;,-:@///////////////////////////////////
|
||||||
|
;///;///;///;///;///;///;///;///;//,::-:,.,-@///;///;///;///;///;///;///;///;///
|
||||||
|
//////////////////////////////////\----:-.,-h///////////////////////////////////
|
||||||
|
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
|
||||||
|
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
|
||||||
|
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
|
||||||
|
nn..nnn...nn...nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn...nnnnnnnnnnnnnn
|
||||||
|
nnn.nnn.n.nn.n.nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn.n.nnnnnnnnnnnnnn
|
||||||
|
nnn.nnn.n.nn.n.nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn.n.nnnnnnnnnnnnnn
|
||||||
|
nn...nn...nn...nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn...nnnnnnnnnnnnnn
|
||||||
|
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
|
||||||
|
```
|
||||||
|
|
||||||
|
*screenshot from the terminal version*
|
||||||
|
|
||||||
|
Anarch has these features:
|
||||||
|
|
||||||
|
- It is completely **[public domain](public_domain.md)** [free software](free_software.md)/[free culture](free_culture.md) under [CC0](cc0.md), including all code and assets which were all made from scratch by drummyfish.
|
||||||
|
- It has extremely low hardware demands, fitting into **256 kb** (WITH assets) and requiring only about **32 kb of [RAM](ram.md)** and **50 MHz [CPU](cpu.md)**. [GPU](gpu.md)s need not apply.
|
||||||
|
- It is written in pure [C99](c.md) without any [dependencies](dependency.md) (not even the standard library). It uses no [dynamic heap allocation](dynamic_allocation.md) and no [floating point](float.md).
|
||||||
|
- It is **extremely portable**, written against a very tiny I/O layer. As such it has been ported to many platforms such as [GNU](gnu.md)/[Linux](linux.md), [BSD](bsd.md), [Pokitto](pokitto.md), browser [JavaScript](javascript.md), [Raspberry Pi](rpi.md) and many others.
|
||||||
|
- It is written in a [single compilation unit](scu.md) and without any [build system](build_system.md).
|
||||||
|
- It is created with only free software.
|
||||||
|
- It is well documented.
|
||||||
|
|
||||||
|
Gameplay-wise Anarch offers 10 levels and multiple enemy and weapon types. It supports mouse where available.
|
||||||
|
|
||||||
|
## Technical Details
|
||||||
|
|
||||||
|
Anarch's engine uses [raycastlib](raycastlib.md), a LRS library for advanced 2D [ray casting](ray_casting.md) which is often called a "pseudo 3D". This method was used by Wolf3D, but Anarch improves it to allow different levels of floor and ceiling which makes it look a little closer to Doom (which however used a different methods called [BSP](bsp.md) rendering).
|
||||||
|
|
||||||
|
The music in the game is [procedurally generated](procedural_generation.md) using [bytebeat](bytebeat.md).
|
||||||
|
|
||||||
|
All images in the game (textures, sprites, ...) are 32x32 pixels, compressed by using a 16 color subpalette of the main 256 color palette, and are stored in source code itself as simple [arrays](array.md) of bytes -- this eliminates the need for using [files](file.md) and allows the game to run on platforms without a [file system](file_system.md).
|
||||||
|
|
||||||
|
The game uses a tiny custom-made 4x4 bitmap [font](font.md) to render texts.
|
||||||
|
|
||||||
|
Saving/loading is optional, in case a platform doesn't have persistent storage. Without saving all levels are simply available from the start.
|
||||||
|
|
||||||
|
In the suckless fashion, mods are recommended to be made and distributed as [patches](patch.md).
|
11
anarchism.md
Normal file
11
anarchism.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Anarchism
|
||||||
|
|
||||||
|
Anarchism is a [socialist](socialism.md) political philosophy rejecting any social hierarchy and oppression. **Anarchism doesn't mean without rules, but without rulers**; despite popular misconceptions anarchism is not [chaos](chaos.md) -- on the contrary, it strives for a stable, ideal society of equal people that live in peace. The symbols of anarchism include the letter A in a circle and a black flag that for different branches of anarchism is diagonally split from bottom left to top right and the top part is filled with a color specific for that branch.
|
||||||
|
|
||||||
|
Most things about anarchism are explained in the text *An Anarchist FAQ*, which is [free licensed](free_culture.md) and can be accessed e.g. at https://theanarchistlibrary.org/library/the-anarchist-faq-editorial-collective-an-anarchist-faq-full.
|
||||||
|
|
||||||
|
Anarchism is a wide term and encompasses many flavors such as [anarcho communism](ancom.md), [anarcho pacifism](anpac.md), [anarcho syndicalism](ansyn.md), [anarcho primitivism](anprim.md) or [anarcho mutualism](anmut.md). Some of the branches disagree on specific questions, e.g. about whether [violence](violence.md) is ever justifiable, or propose different solutions to issues such as organization of society, however **all branches of anarchism are socialist** and all aim for **elimination of social hierarchy** such as social classes created by wealth, jobs and weapons, i.e. anarchism opposes [state](state.md) (e.g. police having power over citizens) and [capitalism](capitalism.md) (employers exploiting employees, corporations exploiting consumers etc.).
|
||||||
|
|
||||||
|
There exist fake, pseudoanarchist ideologies such as ["anarcho" capitalism](ancap.md) (which includes e.g. so caleed [crypto "anarchism"](crypto_anarchism.md)) that deceive by their name despite by their very definition NOT fitting the definition of anarchism (just like [Nazis](nazi.md) called themselves [socialists](socialism.md) despite being the opposite). Also such shit as ["anarcha" feminism](anfem.md) are just fascist bullshit. The propaganda also tries to deceive the public by calling various violent criminals anarchists, even though they very often can't fit the definition of a true anarchist.
|
||||||
|
|
||||||
|
[LRS](lrs.md) is an anarchist movement, specifically [anarcho pacifist](anpac.md) and [anarcho communist](ancom.md) one.
|
23
ancap.md
Normal file
23
ancap.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# "Anarcho" Capitalism
|
||||||
|
|
||||||
|
*Not to be confused with [anarchism](anarchism.md).*
|
||||||
|
|
||||||
|
So called "anarcho capitalism" (ancap for short, not to be confused with [anpac](anpac.md) or any form of [anarchism](anarchism.md)) is probably the worst, most retarded and most dangerous idea in the history of ever, and that is the idea of supporting [capitalism](capitalism.md) absolutely unrestricted by a state or anything else. No one with at least 10 brain cells and/or anyone who has spent at least 3 seconds observing the world could come up with such a stupid, stupid idea. We, of course, completely reject this shit.
|
||||||
|
|
||||||
|
It has to be noted that **"anarcho capitalism" is not real [anarchism](anarchism.md)**, despite its name. Great majority of anarchists strictly reject this ideology as any form of capitalism is completely incompatible with anarchism -- anarchism is defined as opposing any social hierarchy and oppression, while capitalism is almost purely based on many types of hierarchies (internal corporate hierarchies, hierarchies between companies, hierarchies of social classes of different wealth etc.) and oppression (employee by employer, consumer by corporation etc.). Why do they call it *anarcho* capitalism then? Well, partly because they're stupid and don't know what they're talking about (otherwise they couldn't come up with such an idea in the first place) and secondly, as any capitalists, they want to deceive and ride on the train of the *anarchist* brand -- this is not new, [Nazis](nazi.md) also called themselves *socialists* despite being the complete opposite.
|
||||||
|
|
||||||
|
The colors on their flag are black and yellow (this symbolizes shit and piss).
|
||||||
|
|
||||||
|
It is kind of another bullshit kind of "anarchism" just like "[anarcha feminism](anarcha_feminism.md)" etc.
|
||||||
|
|
||||||
|
## The Worst Idea In History
|
||||||
|
|
||||||
|
As if [capitalism](capitalism.md) wasn't extremely bad already, "anarcho" capitalists want to get rid of the last mechanisms that are supposed to protect the people from corporations -- [states](state.md). We, as anarchists ourselves, of course see states as eventually harmful, but they cannot go before we get rid of capitalism first. Why? Well, imagine all the bad things corporations would want to do but can't because there are laws preventing them -- in "anarcho" capitalism they can do them.
|
||||||
|
|
||||||
|
Firstly this means anything is allowed, any unethical, unfair business practice, including slavery, physical violence, blackmailing, rape, worst psychological torture, nuclear weapons, anything that makes you the winner in the jungle system. Except that this jungle is not like the old, self-regulating jungle in which you could only reach limited power, this jungle offers, through modern technology, potentially limitless power with instant worldwide communication and surveillance technology, with mass production, genetic engineering, AI and weapons capable of destroying the planet.
|
||||||
|
|
||||||
|
Secondly the idea of getting rid of a state in capitalism doesn't even make sense because **if we get rid of the state, the strongest corporation will become the state**, only with the difference that state is at least *supposed* to work for the people while a corporation is only by its very definition supposed to care solely about its own endless profit on the detriment of people. Therefore if we scratch the state, McDonalds or Coca Cola or Micro$oft -- whoever is the strongest -- hires a literal army and physically destroys all its competition, then starts ruling the world and making its own laws -- laws that only serve the further growth of that corporation such as that everyone is forced to work 16 hour shifts every day until he falls dead. Don't like it? They kill your whole family, no problem. 100% of civilization will experience the worst kind of suffering, maybe except for the CEO of McDonald's, the world corporation, until the planet's environment is destroyed and everyone hopefully dies, as death is what we'll wish for.
|
||||||
|
|
||||||
|
All in all, "anarcho" capitalism is advocated mostly by children who don't know a tiny bit about anything, by children who are being brainwashed daily in schools by capitalist propaganda, with no education besides an endless stream of ads from their smartphones, or capability of thinking on their own. However, these children are who will run the world soon. It is sad, it's not really their fault, but through them the system will probably come into existence. Sadly "anarcho" capitalism is already a real danger and a very likely future. It will likely be the beginning of our civilization's greatest agony. We don't know what to do against it other than provide education.
|
||||||
|
|
||||||
|
God be with us.
|
7
anpac.md
Normal file
7
anpac.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Anarcho Pacifism
|
||||||
|
|
||||||
|
Anarcho pacifism (anpac) is a form of [anarchism](anarchism.md) that completely rejects any violence. Anarcho pacifists argue that since anarchism opposes hierarchy and oppression, we have to reject violence which is a tool of oppression and establishing hierarchy. This would make it the one true purest form of anarchism. Anarcho pacifists use a black and white flag.
|
||||||
|
|
||||||
|
Historically anarcho pacifists such as [Leo Tolstoy](tolstoy.md) were usually religiously motivated for rejecting violence, however this stance may also come from logic and other than religious beliefs, e.g. the simple belief that violence will only spawn more violence ("eye for an eye will only make the whole world blind"), or pure unconditional love of life.
|
||||||
|
|
||||||
|
We, [LRS](lrs.md), advocate anarcho pacifism. We see how violence can be a short term solution, even to preventing a harm of many, however from the long term perspective we only see the complete delegitimisation of violence as leading to a truly mature society. We realize a complete, 100% non violent society may be never achieved, but with enough education and work it will be possible to establish a society with absolute minimum of violence, a society in which firstly people grow up in a completely non violent environment so that they never accept violence, and secondly have all needs secured so that they don't even have a reason for using violence. We should at least try to get as close to this ideal as possible.
|
9
antivirus_paradox.md
Normal file
9
antivirus_paradox.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Antivirus Paradox
|
||||||
|
|
||||||
|
{ I think this paradox must have had another established name even before antiviruses, but I wasn't able to find anything. If you know it, let me know. ~drummyfish }
|
||||||
|
|
||||||
|
Antivirus paradox is the paradox of someone who's job it is to eliminate certain undesirable phenomenon actually having an interest in keeping this phenomenon existing so as to keep his job. A typical example is an [antivirus](antivirus.md) company having an interest in the existence of dangerous [viruses](virus.md) and malware so as to keep their business running; in fact antivirus companies themselves secretly create and release viruses and malware.
|
||||||
|
|
||||||
|
It is a known phenomenon that many firefighters are also passionate arsonists because society simply rewards them for [fighting](fight_culture.md) fires (as opposed to rewarding them for the lack of fires).
|
||||||
|
|
||||||
|
In [capitalism](capitalism.md) and similar systems requiring people to have jobs this paradox prevents progress, i.e. actual elimination of undesirable phenomena, hence capitalism and similar systems are anti-progress. And not only that, the system pressures people to artificially creating new undesirable phenomena (e.g. lack of [women](woman.md) in tech and similar [bullshit](bs.md)) just to create new [bullshit jobs](bs_job.md) that "[fight](fight_culture.md)" this phenomena. In a truly good society where people are not required to have jobs and in which people aim to eliminate [work](work.md) this paradox largely disappears.
|
5
app.md
Normal file
5
app.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# App
|
||||||
|
|
||||||
|
App is a retarded [capitalist](capitalist_software.md) name for [application](application.md); it is used by [soydevs](soydev.md), corporations and normalfaggots (similarly to how "[coding](coding.md)" is used for [programming](programming.md)). This word is absolutely unacceptable and is only to be used to mock these retards.
|
||||||
|
|
||||||
|
Anything called an "app" is expected to be [bloat](bloat.md), badly designed and, at best, of low quality (and, at worst, malicious).
|
3
apple.md
Normal file
3
apple.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Apple
|
||||||
|
|
||||||
|
Apple is a [terrorist](terrorism.md) organization and one of the biggest [American](usa.md) computer fashion [corporations](corporation.md), infamously founded by [Steve Jobs](steve_jobs.md), it creates and sells overpriced, abusive, highly consumerist electronic devices.
|
16
approximation.md
Normal file
16
approximation.md
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Approximation
|
||||||
|
|
||||||
|
Approximating means calculating something with lesser than best possible precision -- estimating -- purposefully allowing some margin of error in results and using simpler mathematical models than the most accurate ones: this is typically done in order to save resources (CPU cycles, memory etc.) and reduce [complexity](complexity.md) so that our projects stay manageable. Simulating real world on a computer is always an approximation as we cannot capture the infinitely complex and fine nature of the real world with a machine of limited resources, but even withing this we need to consider how much, in what ways and where to simplify.
|
||||||
|
|
||||||
|
Using approximations however doesn't have to imply decrease in precision of the final result -- approximations very well serve [optimization](optimization.md). E.g. approximate metrics help in [heuristic](heuristic.md) algorithms such as [A*](a_star.md). Another use of approximations in optimization is as a quick preliminary check for the expensive precise algorithms: e.g. using bounding spheres helps speed up collision detection (if bounding spheres of two objects don't collide, we know they can't possibly collide and don't have to expensively check this).
|
||||||
|
|
||||||
|
Example of approximations:
|
||||||
|
|
||||||
|
- **Distances**: instead of expensive **Euclidean** distance (`sqrt(dx^2 + dy^2)`) we may use **Chebyshev** distance (`dx + dy`) or **Taxicab** distance (`max(dx,dy)`).
|
||||||
|
- **Engineering approximations** ("guesstimations"): e.g. **sin(x) = x** for "small" values of *x* or **pi = 3** (integer instead of float).
|
||||||
|
- **Physics engines**: complex triangle meshes are approximated with simple analytical shapes such as **spheres**, **cuboids** and **capsules** or at least **convex hulls** which are much easier and faster to deal with. They also approximate **relativistic** physics with **Newtonian**.
|
||||||
|
- **Real time graphics engines**, on the other hand, normally approximate all shapes with triangle meshes.
|
||||||
|
- **[Ray tracing](ray_tracing.md)** neglects indirect lighting. Computer graphics in general is about approximating the solution of the rendering equation.
|
||||||
|
- **Real numbers** are practically always approximated with [floating point](floating_point.md) or [fixed point](fixed_point.md) (rational numbers).
|
||||||
|
- **[Numerical methods](numerical.md)** offer generality and typically yield approximate solutions while their precision vs speed can be adjusted via parameters such as number of iterations.
|
||||||
|
- **[Taylor series](taylor_series.md)** approximates given mathematical function and can be used to e.g. estimate solutions of [differential equations](differential_equation.md).
|
7
arch.md
Normal file
7
arch.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Arch Linux
|
||||||
|
|
||||||
|
*"BTW I use Arch"*
|
||||||
|
|
||||||
|
Arch Linux is a [rolling-release](rolling_release.md) [Linux](linux.md) distribution for the "tech-savvy", mostly fedora-wearing weirdos.
|
||||||
|
|
||||||
|
Arch is [shit](shit.md) at least for two reasons: it has proprietary packages (such as [discord](discord.md)) and it uses [systemd](systemd.md). [Artix](artix.md) Linux is a fork of Arch without systemd.
|
7
art.md
Normal file
7
art.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Art
|
||||||
|
|
||||||
|
Art is an endeavor that seeks discovery and creation of [beauty](beauty.md) and primarily relies on intuition. While the most immediate examples of art that come to mind are for example [music](music.md) and painting, even the most [scientific](science.md) and rigorous effort like [math](math.md) and [programming](programming.md) becomes art when pushed to the highest level, to the boundaries of current knowledge where intuition becomes important for further development.
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [beauty](beauty.md)
|
145
ascii.md
Normal file
145
ascii.md
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
# ASCII
|
||||||
|
|
||||||
|
ASCII (American 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 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.).
|
||||||
|
|
||||||
|
ASCII was approved as an [ANSI](ansi.md) standard in 1963 and since then underwent many revisions every few years. The current one is summed up by the following table:
|
||||||
|
|
||||||
|
| dec | hex | oct | bin | symbol |
|
||||||
|
|-----|-----|-----|-------|-----------------------|
|
||||||
|
| 000 | 00 | 000 |0000000| NUL: null |
|
||||||
|
| 001 | 01 | 001 |0000001| SOH: start of heading |
|
||||||
|
| 002 | 02 | 002 |0000010| STX: start of text |
|
||||||
|
| 003 | 03 | 003 |0000011| ETX: end of text |
|
||||||
|
| 004 | 04 | 004 |0000100| EOT: end of stream |
|
||||||
|
| 005 | 05 | 005 |0000101| ENQ: enquiry |
|
||||||
|
| 006 | 06 | 006 |0000110| ACK: acknowledge |
|
||||||
|
| 007 | 07 | 007 |0000111| BEL: bell |
|
||||||
|
| 008 | 08 | 010 |0001000| BS: backspace |
|
||||||
|
| 009 | 09 | 011 |0001001| TAB: tab (horizontal) |
|
||||||
|
| 010 | 0a | 012 |0001010| LF: new line |
|
||||||
|
| 011 | 0b | 013 |0001011| VT: tab (vertical) |
|
||||||
|
| 012 | 0c | 014 |0001100| FF: new page |
|
||||||
|
| 013 | 0d | 015 |0001101| CR: carriage return |
|
||||||
|
| 014 | 0e | 016 |0001110| SO: shift out |
|
||||||
|
| 015 | 0f | 017 |0001111| SI: shift in |
|
||||||
|
| 016 | 10 | 020 |0010000| DLE: data link escape |
|
||||||
|
| 017 | 11 | 021 |0010001| DC1: device control 1 |
|
||||||
|
| 018 | 12 | 022 |0010010| DC2: device control 2 |
|
||||||
|
| 019 | 13 | 023 |0010011| DC3: device control 3 |
|
||||||
|
| 020 | 14 | 024 |0010100| DC4: device control 4 |
|
||||||
|
| 021 | 15 | 025 |0010101| NAK: not acknowledge |
|
||||||
|
| 022 | 16 | 026 |0010110| SYN: sync idle |
|
||||||
|
| 023 | 17 | 027 |0010111| ETB: end of block |
|
||||||
|
| 024 | 18 | 030 |0011000| CAN: cancel |
|
||||||
|
| 025 | 19 | 031 |0011001| EM: end of medium |
|
||||||
|
| 026 | 1a | 032 |0011010| SUB: substitute |
|
||||||
|
| 027 | 1b | 033 |0011011| ESC: escape |
|
||||||
|
| 028 | 1c | 034 |0011100| FS: file separator |
|
||||||
|
| 029 | 1d | 035 |0011101| GS: group separator |
|
||||||
|
| 030 | 1e | 036 |0011110| RS: record separator |
|
||||||
|
| 031 | 1f | 037 |0011111| US: unit separator |
|
||||||
|
| 032 | 20 | 040 |0100000| ` `: space |
|
||||||
|
| 033 | 21 | 041 |0100001| `!` |
|
||||||
|
| 034 | 22 | 042 |0100010| `"` |
|
||||||
|
| 035 | 23 | 043 |0100011| `#` |
|
||||||
|
| 036 | 24 | 044 |0100100| `$` |
|
||||||
|
| 037 | 25 | 045 |0100101| `%` |
|
||||||
|
| 038 | 26 | 046 |0100110| `&` |
|
||||||
|
| 039 | 27 | 047 |0100111| `'` |
|
||||||
|
| 040 | 28 | 050 |0101000| `(` |
|
||||||
|
| 041 | 29 | 051 |0101001| `)` |
|
||||||
|
| 042 | 2a | 052 |0101010| `*` |
|
||||||
|
| 043 | 2b | 053 |0101011| `+` |
|
||||||
|
| 044 | 2c | 054 |0101100| `,` |
|
||||||
|
| 045 | 2d | 055 |0101101| `-` |
|
||||||
|
| 046 | 2e | 056 |0101110| `.` |
|
||||||
|
| 047 | 2f | 057 |0101111| `/` |
|
||||||
|
| 048 | 30 | 060 |0110000| `0` |
|
||||||
|
| 049 | 31 | 061 |0110001| `1` |
|
||||||
|
| 050 | 32 | 062 |0110010| `2` |
|
||||||
|
| 051 | 33 | 063 |0110011| `3` |
|
||||||
|
| 052 | 34 | 064 |0110100| `4` |
|
||||||
|
| 053 | 35 | 065 |0110101| `5` |
|
||||||
|
| 054 | 36 | 066 |0110110| `6` |
|
||||||
|
| 055 | 37 | 067 |0110111| `7` |
|
||||||
|
| 056 | 38 | 070 |0111000| `8` |
|
||||||
|
| 057 | 39 | 071 |0111001| `9` |
|
||||||
|
| 058 | 3a | 072 |0111010| `:` |
|
||||||
|
| 059 | 3b | 073 |0111011| `;` |
|
||||||
|
| 060 | 3c | 074 |0111100| `<` |
|
||||||
|
| 061 | 3d | 075 |0111101| `=` |
|
||||||
|
| 062 | 3e | 076 |0111110| `>` |
|
||||||
|
| 063 | 3f | 077 |0111111| `?` |
|
||||||
|
| 064 | 40 | 100 |1000000| `@` |
|
||||||
|
| 065 | 41 | 101 |1000001| `A` |
|
||||||
|
| 066 | 42 | 102 |1000010| `B` |
|
||||||
|
| 067 | 43 | 103 |1000011| `C` |
|
||||||
|
| 068 | 44 | 104 |1000100| `D` |
|
||||||
|
| 069 | 45 | 105 |1000101| `E` |
|
||||||
|
| 070 | 46 | 106 |1000110| `F` |
|
||||||
|
| 071 | 47 | 107 |1000111| `G` |
|
||||||
|
| 072 | 48 | 110 |1001000| `H` |
|
||||||
|
| 073 | 49 | 111 |1001001| `I` |
|
||||||
|
| 074 | 4a | 112 |1001010| `J` |
|
||||||
|
| 075 | 4b | 113 |1001011| `K` |
|
||||||
|
| 076 | 4c | 114 |1001100| `L` |
|
||||||
|
| 077 | 4d | 115 |1001101| `M` |
|
||||||
|
| 078 | 4e | 116 |1001110| `N` |
|
||||||
|
| 079 | 4f | 117 |1001111| `O` |
|
||||||
|
| 080 | 50 | 120 |1010000| `P` |
|
||||||
|
| 081 | 51 | 121 |1010001| `Q` |
|
||||||
|
| 082 | 52 | 122 |1010010| `R` |
|
||||||
|
| 083 | 53 | 123 |1010011| `S` |
|
||||||
|
| 084 | 54 | 124 |1010100| `T` |
|
||||||
|
| 085 | 55 | 125 |1010101| `U` |
|
||||||
|
| 086 | 56 | 126 |1010110| `V` |
|
||||||
|
| 087 | 57 | 127 |1010111| `W` |
|
||||||
|
| 088 | 58 | 130 |1011000| `X` |
|
||||||
|
| 089 | 59 | 131 |1011001| `Y` |
|
||||||
|
| 090 | 5a | 132 |1011010| `Z` |
|
||||||
|
| 091 | 5b | 133 |1011011| `[` |
|
||||||
|
| 092 | 5c | 134 |1011100| `\` |
|
||||||
|
| 093 | 5d | 135 |1011101| `]` |
|
||||||
|
| 094 | 5e | 136 |1011110| `^` |
|
||||||
|
| 095 | 5f | 137 |1011111| `_` |
|
||||||
|
| 096 | 60 | 140 |1100000| `` ` ``: backtick |
|
||||||
|
| 097 | 61 | 141 |1100001| `a` |
|
||||||
|
| 098 | 62 | 142 |1100010| `b` |
|
||||||
|
| 099 | 63 | 143 |1100011| `c` |
|
||||||
|
| 100 | 64 | 144 |1100100| `d` |
|
||||||
|
| 101 | 65 | 145 |1100101| `e` |
|
||||||
|
| 102 | 66 | 146 |1100110| `f` |
|
||||||
|
| 103 | 67 | 147 |1100111| `g` |
|
||||||
|
| 104 | 68 | 150 |1101000| `h` |
|
||||||
|
| 105 | 69 | 151 |1101001| `i` |
|
||||||
|
| 106 | 6a | 152 |1101010| `j` |
|
||||||
|
| 107 | 6b | 153 |1101011| `k` |
|
||||||
|
| 108 | 6c | 154 |1101100| `l` |
|
||||||
|
| 109 | 6d | 155 |1101101| `m` |
|
||||||
|
| 110 | 6e | 156 |1101110| `n` |
|
||||||
|
| 111 | 6f | 157 |1101111| `o` |
|
||||||
|
| 112 | 70 | 160 |1110000| `p` |
|
||||||
|
| 113 | 71 | 161 |1110001| `q` |
|
||||||
|
| 114 | 72 | 162 |1110010| `r` |
|
||||||
|
| 115 | 73 | 163 |1110011| `s` |
|
||||||
|
| 116 | 74 | 164 |1110100| `t` |
|
||||||
|
| 117 | 75 | 165 |1110101| `u` |
|
||||||
|
| 118 | 76 | 166 |1110110| `v` |
|
||||||
|
| 119 | 77 | 167 |1110111| `w` |
|
||||||
|
| 120 | 78 | 170 |1111000| `x` |
|
||||||
|
| 121 | 79 | 171 |1111001| `y` |
|
||||||
|
| 122 | 7a | 172 |1111010| `z` |
|
||||||
|
| 123 | 7b | 173 |1111011| `{` |
|
||||||
|
| 124 | 7c | 174 |1111100| `|` |
|
||||||
|
| 125 | 7d | 175 |1111101| `}` |
|
||||||
|
| 126 | 7e | 176 |1111110| `~` |
|
||||||
|
| 127 | 7f | 177 |1111111| DEL |
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [Unicode](unicode.md)
|
||||||
|
- [ASCII art](ascii_art.md)
|
47
ascii_art.md
Normal file
47
ascii_art.md
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
# ASCII Art
|
||||||
|
|
||||||
|
ASCII art is the [art](art.md) of manually creating graphics and images only out of [fixed-width](fixed_width.md) [ASCII](ascii.md) characters. This means no [unicode](unicode.md) or extended ASCII characters are allowed, of course. ASCII art is also, strictly speaking, separate from mere [ASCII rendering](ascii_rendering.md), i.e. automatically rendering a bitmap image with ASCII characters in place of [pixels](pixel.md), and ASCII graphics that utilizes the same techniques as ASCII art but can't really be called art (e.g. computer generated diagrams). Pure ASCII art should make no use of [color](color.md).
|
||||||
|
|
||||||
|
This kind of art used to be a great part of the culture of earliest [Internet](internet.md) communities for a number of reasons imposed largely by the limitations of old computers -- it could be created easily with a text editor and saved in pure text format, it didn't take much space to store or send over a network and it could be displayed on text-only displays and terminals. The principle itself predates computers, people were already making this kind of images with type writers. Nevertheless the art survives even to present day and lives on in the hacker culture, in [Unix](unix.md) communities, on the [Smol Internet](smol_internet.md) etc. ASCII diagram may very well be embedded e.g. in a comment in a source code to explain some spatial concept -- that's pretty [KISS](kiss.md). We, [LRS](lrs.md), highly advocate use of ASCII art whenever it's [good enough](good_enough.md).
|
||||||
|
|
||||||
|
```
|
||||||
|
_,,_
|
||||||
|
/ ';_
|
||||||
|
. ( 0 _/ "-._
|
||||||
|
|\ \_ /_==-"""'
|
||||||
|
| |:---' (
|
||||||
|
\ \__." ) Steamer
|
||||||
|
'--_ __--' Duck!
|
||||||
|
|L_
|
||||||
|
|
||||||
|
|
||||||
|
[] [][][][][]
|
||||||
|
[][][] [][]
|
||||||
|
[][] []
|
||||||
|
[] XX XX[]
|
||||||
|
[] XXXX []
|
||||||
|
[][] []
|
||||||
|
[][][] [][]
|
||||||
|
[] [][][][][]
|
||||||
|
|
||||||
|
SAF FTW
|
||||||
|
|
||||||
|
^
|
||||||
|
|
|
||||||
|
| _.--._ _.--._
|
||||||
|
| .' '. .' '.
|
||||||
|
|/__________\____________/__________\______
|
||||||
|
| \ / \
|
||||||
|
| '. .' '.
|
||||||
|
| `'--'` `'-
|
||||||
|
|
|
||||||
|
V
|
||||||
|
```
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [ANSI art](ansi_art.md)
|
||||||
|
- [pixel art](pixel_art.md)
|
||||||
|
- [plain text](plain_text.md)
|
||||||
|
- [cowsay](cowsay.md)
|
||||||
|
- [figlet](figlet.md)
|
22
assembly.md
Normal file
22
assembly.md
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Assembly
|
||||||
|
|
||||||
|
*GUYS I AM NOT SUCH GREAT AT ASSEMBLY, correct my errors*
|
||||||
|
|
||||||
|
Assembly is, for any given hardware platform ([ISA](isa.md)), the unstructured, lowest levels language -- it maps 1:1 to [machine code](machine_code.md) (the actual CPU instructions) and only differs from actual binary machine code by utilizing a more human readable form. Assembly is compiled by [assembler](assembler.md) into the the machine code. Assembly is **not** a single language, it differs for every architecture, and is therefore not [portable](portability.md)!
|
||||||
|
|
||||||
|
## Typical Assembly Language
|
||||||
|
|
||||||
|
The language is unstructured, i.e. there are no control structures such as `if` or `for` statements: these have to be manually implemented using labels and jump instructions. The typical look of an assembly program is therefore a single column of instructions with arguments, one per line.
|
||||||
|
|
||||||
|
The working of the language reflects the actual hardware architecture -- usually there is a small number of registers (e.g. 16) which may be called something like R0 to R15. These registers are the fastest available memory (faster than the main RAM memory) and are used to perform calculations. Some registers are general purpose and some are special: typically there will be e.g. the FLAGS register which holds various 1bit results of performed operations (e.g. overflow, zero result etc.). Values can be moved between registers and the main memory.
|
||||||
|
|
||||||
|
Instructions are typically written as three-letter abbreviations and follow some unwritten naming conventions so that different assembly languages at least look similar. Common instructions found in most assembly languages are for example:
|
||||||
|
|
||||||
|
- MOV (move): move a number between registers and/or memory.
|
||||||
|
- JMP (jump): unconditional jump to far away instruction.
|
||||||
|
- BEQ (branch if equal): jump if result of previous comparison was equality.
|
||||||
|
- ADD (add): add two numbers.
|
||||||
|
- NOP (no operation): do nothing (used e.g. for delays).
|
||||||
|
- CMP (compare): compare two numbers and set relevant flags (typically for a subsequent conditional jump).
|
||||||
|
|
||||||
|
Assembly languages may offer simple helpers such as macros.
|
3
assertiveness.md
Normal file
3
assertiveness.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Assertiveness
|
||||||
|
|
||||||
|
Assertiveness is an [euphemism](euphemism.md) for being a [dick](dick.md).
|
23
atan.md
Normal file
23
atan.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# Arcus Tangent
|
||||||
|
|
||||||
|
Arcus tangent, written as *atan* or *tan^-1*, is the inverse [function](function.md) to the [tangent](tan.md) function. For given argument *x* (any real number) it returns a number *y* (from -[pi](pi.md)/2 to pi/2) such that *tan(y) = x*.
|
||||||
|
|
||||||
|
**Approximation**: Near 0 *atan(x)* can very rougly be approximated simply by *x*. For a large argument *atan(x)* can be approximated by *pi/2 - 1/x* (as *atan*'s [limit](limit.md) is pi/2). The following formula { created by me ~drummyfish } approximates atan with a [poylnomial](polynomial.md) for non-negative argument with error smaller than 2%:
|
||||||
|
|
||||||
|
*atan(x) ~= (x * (2.96088 + 4.9348 * x))/(3.2 + 3.88496 * x + pi * x^2)*
|
||||||
|
|
||||||
|
```
|
||||||
|
| y
|
||||||
|
pi/2 +
|
||||||
|
| _..---''''''
|
||||||
|
| _.''
|
||||||
|
| .'
|
||||||
|
-----------.+'-+--+--+--+--+--> x
|
||||||
|
_.' |0 1 2 3 4 5
|
||||||
|
_-' |
|
||||||
|
.--'' |
|
||||||
|
-pi/2 +
|
||||||
|
|
|
||||||
|
```
|
||||||
|
|
||||||
|
*plot of atan(x)*
|
15
atheism.md
Normal file
15
atheism.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# Atheism
|
||||||
|
|
||||||
|
*"In this moment I am euphoric ..."* --some retarded atheist
|
||||||
|
|
||||||
|
An atheist is someone who doesn't believe in god or any other similar supernatural beings.
|
||||||
|
|
||||||
|
An especially annoying kind is the **[reddit](reddit.md) atheist** who will DESTROY YOU WITH FACTS AND LOGIC^(TM). These atheists are 14 year old children who think they've discovered the secret of the universe and have to let the whole world know they're atheists who will destroy you with their 200 [IQ](iq.md) [logic](logic.md) and knowledge of all 10 [cognitive biases](cognitive_bias.md) and argument fallacies, while in fact they reside at the [mount stupid](mount_stupid.md) and many times involuntarily appear on other subreddits such as r/iamverysmart and r/cringe. They masturbate to [Richard Dawkins](richard_dawkins.md), love to read [soyentific](soyence.md) studiiiiiies about how race has no biological meaning and think that religion is literally [Hitler](hitler.md). They like to pick easy targets such as [flatearthers](flat_earth.md) and cyberbully them on [YouTube](youtube.md) with the power of SCIENCE and their enormously large thesaurus (they will never use a word that's among the 100000 most common English words). They are so [cringe](cringe.md) you want to [kill yourself](kys.md), but their discussions are sometimes entertaining to read with a bowl of popcorn.
|
||||||
|
|
||||||
|
On a bit more serious note: we've all been there, most people in their teens think they're literal [Einsteins](einstein.md) and then later in life cringe back on themselves. However, some don't grow out of it and stay arrogant, ignorant fucks for their whole lives. The principal mistake of the stance they retain is they try to apply "science" (or whatever it means in their world) to EVERYTHING and reject any other approach to solving problems -- of course, [science](science.md) (the real one) is great, but it's just a tool, and just like you can't fix every problem with a hammer, you can't approach every problem with science. In your daily life you make a million of unscientific decisions and it would be bad to try to apply science to them; you cross the street not because you've read a peer-reviewed paper about it being the most scientifically correct thing to do, but because you feel like doing it, because you believe the drivers will stop and won't run you over. Beliefs, intuition, emotion, non-rationality and even spirituality are and have to be part of life, and it's extremely stupid to oppose these concepts just out of principle. With that said, there's nothing wrong about being a well behaved man who just doesn't feel a belief in any god in his heart, just you know, don't be an idiot.
|
||||||
|
|
||||||
|
Among the greatest minds it is hard to find true atheists, even though they typically have a personal and not easy to describe faith. [Newton](newton.md) was a Christian. [Einstein](einstein.md) often used the word "[God](god.md)" instead of "nature" or "universe"; even though he said he didn't believe in the traditional personal God, he also said that the laws of physics were like books in a library which must have obviously been written by someone or something we can't comprehend. [Nikola Tesla](tesla.md) said he was "deeply religious, though not in the orthodox sense". There are also very hardcore religious people such as [Larry Wall](larry_wall.md), the inventor of [Perl](perl.md) language, who even planned to be a Christian missionary. The "true atheists" are mostly second grade "scientists" who make career out of the pose and make living by writing books about atheism rather than being scientists.
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [stupidity](stupidity.md)
|
3
autoupdate.md
Normal file
3
autoupdate.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Autoupdate
|
||||||
|
|
||||||
|
Autoupdate is a malicious [software](software.md) [feature](feature.md) that frequently remotely modifies software on the user's device without asking, sometimes silently and many times in a forced manner without the possibility to refuse this modification (typically in [proprietary](proprietary.md) software). This is a manifestation of [update culture](update_culture.md). These remote software modifications are called "updates" to make the user think they are a good thing, but in fact they usually introduce more [bugs](bug.md), [bloat](bloat.md), security vulnerabilities, annoyance (forced reboots etc.) and [malware](malware.md) (even in "[open source](open_source.md)", see e.g. the many projects on [GitHub](github.md) that introduced intentional malware targeted at Russian users during the Russia-Ukraine war).
|
5
avpd.md
Normal file
5
avpd.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Avoidant Personality Disorder
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
In many cases avoiding the problem really is the objectively best solution.
|
85
backpropagation.md
Normal file
85
backpropagation.md
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
# Backpropagation
|
||||||
|
|
||||||
|
{ Dunno if this is completely correct, I'm learning this as I'm writing it. There may be errors. ~drummyfish }
|
||||||
|
|
||||||
|
Backpropagation, or backprop, is an [algorithm](algorithm.md), based on the chain rule of derivation, used in training [neural networks](neural_network.md); it computes the partial derivative (or [gradient](gradient.md)) of the function of the network's error so that we can perform a [gradient descent](gradient_descent.md), i.e. update the weights towards lowering the network's error. It computes the analytical derivative (theoretically you could estimate a derivative numerically, but that's not so accurate and can be too computationally expensive). It is called backpropagation because it works backwards and propagates the error from the output towards the input, due to how the chain rule works, and it's efficient by reusing already computed values.
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
Consider the following neural network:
|
||||||
|
|
||||||
|
```
|
||||||
|
w000 w100
|
||||||
|
x0------y0------z0
|
||||||
|
\ / \ / \
|
||||||
|
\ / \ / \
|
||||||
|
\/w010 \/w11O \_E
|
||||||
|
/\w001 /\w1O1 /
|
||||||
|
/ \ / \ /
|
||||||
|
/ \ / \ /
|
||||||
|
x1------y1------z1
|
||||||
|
w011 w111
|
||||||
|
```
|
||||||
|
|
||||||
|
It has an input layer (neurons *x0*, *x1*), a hidden layer (neurons *y0*, *y1*) and an output layer (neurons *z0*, *z1*). For simplicity there are no biases (biases can easily be added as input neurons that are always on). At the end there is a total error *E* computed from the networks's output against the desired output (training data).
|
||||||
|
|
||||||
|
Let's say the total error is computed as the squared error: *E = squared_error(z0) + squared_error(z1) = 1/2 * (z0 - z0_desired)^2 + 1/2 * (z1 - z1_desired)^2*.
|
||||||
|
|
||||||
|
We can see each non-input neuron as a function. E.g. the neuron *z0* is a function *z0(x) = z0(a(z0s(x)))* where:
|
||||||
|
|
||||||
|
- *z0s* is the sum of inputs to the neuron, in this case *z0s(x) = w100 * y0(x) + +110 * y1(x)*
|
||||||
|
- *a* is the activation function, let's suppose the normally used [logistic function](logistic_function.md) *a(x) = 1/(1 + e^x)*.
|
||||||
|
|
||||||
|
If you don't know what the fuck is going on see [neural networks](neural_network.md) first.
|
||||||
|
|
||||||
|
What is our goal now? To find the **[partial derivative](partial_derivative.md) of the whole network's total error function** (at the current point defined by the weights), or in other words the **gradient** at the current point. I.e. from the point of view of the total error (which is just a number output by this system), the network is a function of 8 variables (weights *w000*, *w001*, ...) and we want to find a derivative of this function in respect to each of these variables (that's what a partial derivative is) at the current point (i.e. with current values of the weights). This will, for each of these variables, tell us how much (at what rate and in which direction) the total error changes if we change that variable by certain amount. Why do we need to know this? So that we can do a [gradient descent](gradient_descent.md), i.e. this information is kind of a direction in which we want to move (change the weights and biases) towards lowering the total error (making the network compute results which are closer to the training data).
|
||||||
|
|
||||||
|
Backpropagation is based on the **chain rule**, a rule of derivation that equates the derivative of a function composition (functions inside other functions) to a product of derivatives. This is important because by converting the derivatives to a product we will be able to **reuse** the individual factors and so compute very efficiently and quickly.
|
||||||
|
|
||||||
|
Let's write derivative of *f(x)* with respect to *x* as *D{f(x),x}*. The chain rule says that:
|
||||||
|
|
||||||
|
*D{f(g(x)),x} = D{f(g(x)),g(x)} * D{g(x),x}*
|
||||||
|
|
||||||
|
Notice that this can be applied to any number of composed functions, the product chain just becomes longer.
|
||||||
|
|
||||||
|
Let's get to the computation. Backpropagation work by going "backwards" from the output towards the input. So, let's start by computing the derivative against the weight *w100*. It will be a specific number; let's call it *'w100*. Derivative of a sum is equal to the sum of derivatives:
|
||||||
|
|
||||||
|
*'w100 = D{E,w100} = D{squared_error(z0),w100} + D{squared_error(z0),w100} = D{squared_error(z0),w100} + 0*
|
||||||
|
|
||||||
|
(The second part of this sum became 0 because with respect to *w100* it is a constant.)
|
||||||
|
|
||||||
|
Now we can continue and utilize the chain rule:
|
||||||
|
|
||||||
|
*'w100 = D{E,w100} = D{squared_error(z0),w100} = D{squared_error(z0(a(z0s))),w100} = D(squared_error(z0),z0) * D{a(z0s),z0s} * d{z0s,w100}*
|
||||||
|
|
||||||
|
We'll now skip the intermediate steps, they should be easy if you can do derivatives. The final results is:
|
||||||
|
|
||||||
|
*'w100 = (z0_desired - z0) * (z0s * (1 - z0s)) * y0*
|
||||||
|
|
||||||
|
**Now we have computed the derivative against w100**. In the same way can compute *'w101*, *'w110* and *'w111* (weights leading to the output layer).
|
||||||
|
|
||||||
|
Now let's compute the derivative in respect to *w000*, i.e. the number *'w000*. We will proceed similarly but the computation will be different because the weight *w000* affects both output neurons ('z0' and 'z1'). Again, we'll use the chain rule.
|
||||||
|
|
||||||
|
*w000 = D{E,w000} = D(E,y0) * D{a(y0s),y0s} * D{y0s,w000}*
|
||||||
|
|
||||||
|
*D(E,y0) = D{squared_error(z0),y0} + D{squared_error(z1),y0}*
|
||||||
|
|
||||||
|
Let's compute the first part of the sum:
|
||||||
|
|
||||||
|
*D{squared_error(z0),y0} = D{squared_error(z0),z0s} * D{squared_error(z0s),y0}*
|
||||||
|
|
||||||
|
*D{squared_error(z0),z0s} = D{squared_error(z0),z0} * D{a(z0s)),z0s}*
|
||||||
|
|
||||||
|
Note that this last equation uses already computed values which we can reuse. Finally:
|
||||||
|
|
||||||
|
*D{squared_error(z0s),y0} = D{squared_error(w100 * y0 + w110 * y1),y0} = w100*
|
||||||
|
|
||||||
|
And we get:
|
||||||
|
|
||||||
|
*D{squared_error(z0),y0} = D{squared_error(z0),z0} * D{a(z0s)),z0s} * w100*
|
||||||
|
|
||||||
|
And so on until we get all the derivatives.
|
||||||
|
|
||||||
|
Once we have them, we multiply them all by some value (**learning rate**, a distance by which we move in the computed direction) and subtract them from the current weights by which we perform the gradient descent and lower the total error.
|
||||||
|
|
||||||
|
Note that here we've only used one training sample, i.e. the error *E* was computed from the network against a single desired output. If more example are used in a single update step, they are usually somehow averaged.
|
19
bbs.md
Normal file
19
bbs.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# BBS
|
||||||
|
|
||||||
|
{ I am too young to remember this shit so I'm just writing what I've read on the web. ~drummyfish }
|
||||||
|
|
||||||
|
Bulletin board system (BBS) is, or rather used to be, a kind of [server](server.md) that hosts a community of users who connect to it via [terminal](terminal.md), who exchange messages, files, play [games](game.md) and otherwise interact -- BBSes were mainly popular before the invention of [web](www.md), i.e. from about 1978 to mid 1990s, however some still exist today. BBSes are powered by special BBS [software](software.md) and the people who run them are called sysops.
|
||||||
|
|
||||||
|
Back then people connected to BBSes via dial-up [modems](modem.md) and connecting was much more complicated than connecting to a server today: you had to literally dial the number of the BBS and you could only connect if the BBS had a free line. **Early BBSes weren't normally connected through Internet** but rather through other networks like [UUCP](uucp.md) working through phone lines. I.e. a BBS would have a certain number of modems that defined how many people could connect at once. It was also expensive to make calls into other countries so BBSes were more of a local thing, people would connect to their local BBSes. Furthermore these things ran often on non-[multitasking](multitasking.md) systems like [DOS](dos.md) so allowing multiple users meant the need for having multiple computers. The boomers who used BBSes talk about great adventure and a sense of intimacy, connecting to a BBS meant the sysop would see you connecting, he might start chatting with you etc. Nowadays the few existing BBSes use protocols such as [telnet](telnet.md), nevertheless there are apparently about 20 known dial-up ones in north America. Some BBSes evolved into more modern communities based e.g. on [public access Unix](pubnix.md) systems -- for example [SDF](sdf.md).
|
||||||
|
|
||||||
|
A BBS was usually focused on a certain topic such as technology, fantasy [roleplay](rolaplay.md), dating, [warez](warez.md) etc., they would typically greet the users with a custom themed [ANSI art](ansi_art.md) welcome page upon login -- it was pretty cool.
|
||||||
|
|
||||||
|
The first BBS was CBBS (computerized bulletin board system) created by Ward Christensen and Randy Suess in 1978 during a blizzard storm -- it was pretty primitive, e.g. it only allowed one user to be connected at the time. After publication of their invention, BBSes became quite popular and the number of them grew to many thousands -- later there was even a magazine solely focused on BBSes (*BBS Magazine*). BBSes would later group into larger networks that allowed e.g. interchange of mail. The biggest such network was [FidoNet](fidonet.md) which at its peak hosted about 35000 nodes.
|
||||||
|
|
||||||
|
{ Found some list of BBSes at http://www.synchro.net/sbbslist.html. ~drummyfish }
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [public access Unix](pubnix.md)
|
||||||
|
- [Usenet](usenet.md)
|
||||||
|
- [tildeverse](tildeverse.md)
|
21
beauty.md
Normal file
21
beauty.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# Beauty
|
||||||
|
|
||||||
|
Beauty is an attribute that makes something extremely appealing. In [technology](technology.md), [engineering](engineering.md), [mathematics](math.md) and other [science](science.md) beauty is, despite it's relative vagueness and subjectivity, an important aspect of design, and in fact this "mathematical beauty" has lots of times some clearly defined shapes -- for example [simplicity](kiss.md) is mostly considered beautiful.
|
||||||
|
|
||||||
|
Beauty can perhaps be seen as a [heuristic](heuristic.md), a touch of intuition that guides the expert in exploration of previously unknown fields, as we have come to learn that the greatest discoveries tend to be very beautiful. Indeed, beginners and [noobs](noob.md) are mostly concerned with learning hard facts, learning standards and getting familiar with already known ways of solving known problems, they often aren't able to recognize what's beautiful and what's ugly. But as one gets more and more experienced and find himself near the borders of current knowledge, there is suddenly no guidance but intuition, beauty, to suggest ways forward, and here one starts to get the feel for beauty. At this point the field, even if highly exact and rigorous, has become an [art](art.md).
|
||||||
|
|
||||||
|
What is beautiful then? As stated, there is a lot of subjectivity, but generally the following attributes are correlated with beauty:
|
||||||
|
|
||||||
|
- **[simplicity](minimalism.md)**, typically finding simplicity in complexity, e.g. a very short formula or algorithm that describes an infinitely complex [fractal](fractal.md) shape, a simple but valuable equation in physics (*e = m * c^2*), a short computer program that yields rich results ([demoscene](demoscene.md), [code golfing](golf.md), [suckless](suckless.md), ...).
|
||||||
|
- **generality**, i.e. if a simple equation can describe many problems, not just a specific case.
|
||||||
|
- **lack of exceptions**, i.e. when our equation works without having to deal with special cases (in programming represented by `if-then` branches).
|
||||||
|
- **[symmetry](symmetry.md)**, i.e. when we can e.g. swap variables in the equation and get some kind of opposite result.
|
||||||
|
- **aesthetics**, either of the equation itself or the generated thing (fractals, attractors, ...).
|
||||||
|
- TODO
|
||||||
|
|
||||||
|
Examples of beautiful things include:
|
||||||
|
|
||||||
|
- **Euler's identity**, an equation often cited as the most beautiful in mathematics: *e^{i*pi} + 1 = 0*. It is simple and contains many of the most important numbers: *e*, *pi*, *i* 1 and 0.
|
||||||
|
- **[minimalist software](suckless.md)**, **[Unix philosophy](unix_philosophy.md)**
|
||||||
|
- [fractals](fractal.md) TODO
|
||||||
|
- [bytebeat](bytebeat.md)
|
9
bill_gates.md
Normal file
9
bill_gates.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Bill Gates
|
||||||
|
|
||||||
|
William "Bill" Gates (28.10.1955 -- hopefully soon) is a [mass murderer and rapist](entrepreneur.md) (i.e. [capitalist](capitalism.md)) who established and led the terrorist organization [Micro$oft](microsoft.md).
|
||||||
|
|
||||||
|
He is really dumb, only speaks one language and didn't even finish university. He also has no moral values, but that goes without saying for any rich businessman. He was owned pretty hard in [chess](chess.md) by Magnus Carlsen on some shitty TV show.
|
||||||
|
|
||||||
|
Bill was mentally retarded as a child and as such had to attend a private school. In adolescence he raped little children. He never really understood programming but with a below average intelligence he had a good chance to succeed in [business](capitalism.md). Thanks to his family connections he got to Harvard where he met [Steve Ballmer](steve_ballmer.md) -- later he dropped out of the school due to his low intelligence.
|
||||||
|
|
||||||
|
In 1975 he founded [Micro$oft](microsoft.md), a [malware](malware.md) company named after his dick. By a sequence of extremely lucky events combined with a few dick moves by Bill the company then became successful: when around the year 1980 [IBM](ibm.md) was creating the [IBM PC](ibm_pc.md), they came to Bill because they needed an [operating system](os.md). He lied to them that he had one and sold them a license even though at the time he didn't have any OS (lol). After that he went to a programmer named Tim Paterson and basically stole (bought for some penny) his OS named QDOS and gave it to IBM, while still keeping ownership of the OS (he only sold IBM a license to use it, not exclusive rights for it). He basically fucked everyone for money and got away with it, the American way. For this he is admired by Americans.
|
33
billboard.md
Normal file
33
billboard.md
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Billboard
|
||||||
|
|
||||||
|
In [3D](3d.md) [computer graphics](graphics.md) billboard is a flat image placed in the scene that rotates so that it's always facing the camera. Billboards used to be greatly utilized instead of actual [3D models](3d_model.md) in old [games](game.md) thanks to being faster to render (and possibly also easier to create than full 3D models), but we can still encounter them even today and even outside retro games, e.g. [particle systems](particle_system.md) are normally rendered with billboards (each particle is one billboard). Billboards are also commonly called *[sprites](sprite.md)*, even though that's not exactly accurate.
|
||||||
|
|
||||||
|
There are two main types of billboards:
|
||||||
|
|
||||||
|
- Ones **rotating only about vertical axis**, i.e. billboards that change only their [yaw](yaw.md), they only face the camera in a top-down view of the scene. Such sprite may deform on the screen (when the camera is at different height level) just like 3D models do and when viewed completely from above will disappear completely. This may in some situations look better than other options (e.g. in [games](game.md) enemies won't appear lying on their back when seen from above).
|
||||||
|
- **Freely rotating** ones, i.e. ones that change all three [Euler angles](euler_angle.md) so that they ALWAYS face the camera from any possible angle. There may further be other two subtypes: billboards that align themselves with the camera's projection plane (they simply rotate themselves in the same way as the camera) which always end up on the screen as an undeformed and unrotated image, and billboards that face themselves towards the camera's position and copy the camera's [roll](roll.md) (though these may seem like two same things, they are not, for the latter we need to know the camera and billboard's positions, for the former we only need the camera's rotation). The former is simpler to implement and may also look better, so we normally don't even consider the latter.
|
||||||
|
|
||||||
|
Some billboards also choose their image based on from what angle they're viewed (e.g. an enemy in a game viewed from the front will use a different image than when viewed from the side, as seen e.g. in [Doom](doom.md)). Also some billboards intentionally don't scale and keep the same size on the screen, for example health bars in some games.
|
||||||
|
|
||||||
|
In older software billboards were implemented simply as image [blitting](blit.md), i.e. the billboard's scaled image would literally be copied to the screen at the appropriate position (this would implement the freely rotating billboard). Nowadays when rendering 3D models is no longer really considered harmful to performance and drawing pixels directly is less convenient, billboards are more and more implemented as so called [textured](texture.md) [quads](quad.md), i.e. they are really a flat square 3D model that may pass the same pipeline as other 3D models (even though in some frameworks they may actually have different [vertex shaders](vertex_shader.md) etc.) and that's simply rotated to face the camera in each frame (in [modern](modern.md) frameworks there are specific functions for this).
|
||||||
|
|
||||||
|
[Fun](fun.md) fact: in the old games such as [Doom](doom.md) the billboard images were made from photographs of actual physical models from clay. It was easier and better looking than using the primitive 3D software that existed back then.
|
||||||
|
|
||||||
|
## Implementation Details
|
||||||
|
|
||||||
|
The following are some possibly useful things for implementing billboards.
|
||||||
|
|
||||||
|
The billboard's position on the screen can be computed by projecting its center point in [world coordinates](world_space.md) with [modelview](modelview.md) and [projection](projection.md) matrices, just as we project vertices of 3D models.
|
||||||
|
|
||||||
|
The billboard's size on the screen shall due to [perspective](perspective.md) be multiplied by *1 / (tan(FOV / 2) * z)* where *FOV* is the camera's [field of view](fov.md) and *z* is the billboard's distance from camera's projection plane (which is NOT equal to the mere distance from the camera's position, that would create a [fisheye](fisheye.md) lens effect -- the distance from the projection plane can be obtained from the above mentioned [projection matrix](projection.md)). (If the camera's FOV is different in horizontal and vertical directions, then also the billboard's size will change differently in these directions.)
|
||||||
|
|
||||||
|
For billboards whose images depends on viewing angle we naturally need to compute the angle. We may do this either in 2D or 3D -- most games resort to the simpler 2D case (only considering viewing angle in a single plane parallel to the floor), in which case we may simply use the combination of [dot product](dot_product.md) and [cross product](cross_product.md) between the [normalized](normalization.md) billboard's direction vector and a normalized vector pointing from the billboard's position towards the camera's position (dot product gives the [cosine](cos.md) of the angle, the sign of cross product's vertical component will give the rest of the information needed for determining the exact angle). Once we have the angle, we [quantize](quantization.md) (divide) it, i.e. drop its precision depending on how many directional images we have, and then e.g. with a [switch](switch.md) statement pick the correct image to display. For the 3D case (possible different images from different 3D positions) we may first transform the sprite's 3D facing vector to [camera space](camera_space.md) with appropriate matrix, just like we transform 3D models, then this transformed vector will (again after quantization) directly determine the image we should use.
|
||||||
|
|
||||||
|
When implementing the free rotating billboard as a 3D quad that's aligning with the camera projection plane, we can construct the [model matrix](model_matrix.md) for the rotation from the camera's normalized directional vectors: *R* is camera's right vector, *U* is its up vector and *F* is its forward vector. The matrix simply transforms the quad's vertices to the coordinate system with bases *R*, *U* and *F*, i.e. rotates the quad in the same way as the camera. When using [row vectors](row_vector.md), the matrix is following:
|
||||||
|
|
||||||
|
```
|
||||||
|
R.x R.y R.z 0
|
||||||
|
U.x U.y U.z 0
|
||||||
|
F.x F.y F.z 0
|
||||||
|
0 0 0 1
|
||||||
|
```
|
34
binary.md
Normal file
34
binary.md
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Binary
|
||||||
|
|
||||||
|
Binary refers to to having two choices; in [computer science](compsci.md) binary refers to the base 2 numeral system, i.e. a system of writing numbers with only two symbols, usually [1](one.md)s and [0](zero.md)s. Binary is used in computers because this system is easy to implement in electronics (a switch can be on or off, i.e. 1 or 0; systems with more digits were tried but unsuccessful, they failed miserably in reliability). The word *binary* is also sometimes used as a synonym for a native [executable](executable.md) program.
|
||||||
|
|
||||||
|
One binary digit can be used to store exactly 1 [bit](bit.md) of [information](information.md). So the number of places we have for writing a binary number (e.g. in computer memory) is called a number of bits or bit **width**. A bit width *N* allows for storing 2^N values (e.g. with 2 bits we can store 4 values: 0, 1, 2 and 3).
|
||||||
|
|
||||||
|
At the basic level binary works just like the [decimal](decimal.md) (base 10) system we're used to. While the decimal system uses powers of 10, binary uses powers of 2.
|
||||||
|
|
||||||
|
For **example** let's have a number that's written as 10135 in decimal. The first digit from the right (5) says the number of 10^(0)s (= 1) in the number, the second digit (3) says the number of 10^(1)s (= 10), the third digit (1) says the number of 10^(2)s (= 100) etc. Similarly if we now have a number **100101** in binary, the first digit from the right (1) says the number of 2^(0)s (= 1), the second digit (0) says the number of 2^(1)s (= 2), the third digit (1) says the number of 2^(2)s (=4) etc. Therefore this binary number can be **converted to decimal** by simply computing 1 * 2^0 + 0 * 2^1 + 1 * 2^2 + 0 * 2^3 + 0 * 2^4 + 1 * 2^5 = 1 + 4 + 32 = **37**.
|
||||||
|
|
||||||
|
To **convert from decimal** to binary we can use a simple [algorithm](algorithm.md) that's derived from the above. Let's say we have a number *X* we want to write in binary. We will write digits from right to left. The first (rightmost) digit is the remainder after integer division of *X* by 2. Then we divide the number by 2. The second digit is again the remainder after division by 2. Then we divide the number by 2 again. This continues until the number is 0. For example let's convert the number 22 to binary: first digit = 22 % 2 = **0**; 22 / 2 = 11, second digit = 11 % 2 = **1**; 11 / 2 = 5; third digit = 5 % 2 = **1**; 5 / 2 = 2; 2 % 2 = **0**; 2 / 2 = 1; 1 % 2 = **1**; 1 / 2 = 0. The result is **10110**.
|
||||||
|
|
||||||
|
TODO: operations in binary
|
||||||
|
|
||||||
|
In binary it is very simple and fast to divide and multiply by (powers of) 2, just as it is simply to divide and multiple by (powers of) 10 in decimal (we just shift the radix point, e.g. the binary number 1011 multiplied by 4 is 101100, we just added two zeros at the end). This is why as a programmer **you should prefer working with powers of two**.
|
||||||
|
|
||||||
|
Binary can be very easily converted to and from [hexadecimal](hexadeciaml.md) and [octal](octal.md) because 1 hexadecimal (octal) digit always maps to exactly 4 (3) binary digits. E.g. the hexadeciaml number F0 is 11110000 in binary.
|
||||||
|
|
||||||
|
We can work with the binary representation the same way as with decimal, i.e. we can e.g. write negative numbers such as -110101 or [rational numbers](rational_number.md) such as 1011.001101. However in a computer memory there are no other symbols than 1 and 0, so we can't use extra symbols such as *-* or *.* to represent such values. So if we want to represent more numbers than non-negative integers, we literally have to only use 1s and 0s and choose a specific **representation**, or **format** of numbers -- there are several formats for representing e.g. [signed](signed.md) (potentially negative) or rational numbers, each with pros and cons. The following are the most common number representations:
|
||||||
|
|
||||||
|
- **[two's complement](twos_complement.md)**: Allows storing integers, both positive, negative and zero. It is **probably the most common representation** of integers because of its great advantages: basic operations (+, -, *) are performed exactly the same as with "normal" binary numbers, and there is no negative zero (which would be an inconvenience and waste of memory). Inverting a number (from negative to positive and vice versa) is done simply by inverting all the bits and adding 1. The leftmost bit signifies the number's sign (0 = +, 1 = -).
|
||||||
|
- **[sign-magnitude](sign_magnitude.md)**: Allows storing integers, both positive, negative and zero. It's pretty straightforward: the leftmost bit in a number serves as a sign, 0 = +, 1 = -, and the rest of the number is the distance from zero in "normal" representation. So e.g. 0011 is 3 while 1011 is -3. The disadvantage is there are two values for zero (positive, 0000 and [negative](negative_zero.md), 1000) which wastes a value and presents a computational inconvenience, and operations with these numbers are more complicated and slower (checking the sign requires extra code).
|
||||||
|
- **[one's complement](ones_complement.md)**: Allows storing integers, both positive, negative and zero. The leftmost bit signifies a sign, in the same way as with sign-magnitude, but numbers are inverted differently: a positive number is turned into negative (and vice versa) by inverting all bits. So e.g. 0011 is 3 while 1100 is -3. The disadvantage is there are two values for zero (positive, 0000 and [negative](negative_zero.md), 1111) which wastes a value and presents a computational inconvenience, and some operations with these numbers may be more complex.
|
||||||
|
- **[fixed point](fixed_point.md)**: Allows storing [rational numbers](rational_number.md) (fractions), i.e. numbers with a radix point (such as 1101.011), which can also be positive, negative or zero. It works by supposing a radix point at some fixed position in the binary representation, e.g. if we have an 8 bit number, we may consider 5 leftmost bits to represent the whole part and 3 rightmost bits to be the fractional part (so e.g the number 11010110 represents 11010.110). The advantage here is extreme simplicity (we can use normal integer numbers as fixed point simply by imagining a radix point). The disadvantage may be low precision and small range of representable values.
|
||||||
|
- **[floating point](float.md)**: Allows storing [rational numbers](rational_number.md) in great ranges, both positive, negative and zero, plus some additional values such as [infinity](infinity.md) and *[not a number](nan.md)*. It allows the radix point to be shifted which gives a potential for storing extremely big and extremely small numbers at the same time. The disadvantage is that float is extremely complex, [bloated](bloat.md), wastes some values and for fast execution requires a special hardware unit (which most "normal" computers nowadays have, but are missing e.g. in some [embedded systems](embedded.md)).
|
||||||
|
|
||||||
|
As anything can be represented with numbers, binary can be used to store any kind of information such as text, images, sounds and videos. See [data structures](data_structure.md) and [file formats](file_format.md).
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [bit](bit.md)
|
||||||
|
- [hexadecimal](hexadeciaml.md)
|
||||||
|
- [data structure](data_structure.md)
|
||||||
|
- [data type](data_type.md)
|
5
blender.md
Normal file
5
blender.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Blender
|
||||||
|
|
||||||
|
Blender is an "[open-source](open_source.md)" 3D modeling and [rendering](rendering.md) [software](software.md) -- one of the most powerful and "feature-rich" ones, even compared to [proprietary](proprietary.md) competition -- used not only by the [FOSS](foss.md) community, but also the industry (commercial [games](game.md), movies etc.), which is an impressive achievement in itself, however Blender is also a [capitalist](capitalist.md) software suffering from many not-so-nice features such as [bloat](bloat.md).
|
||||||
|
|
||||||
|
After version 2.76 Blender started REQUIRING [OpenGL](opengl.md) 2.1 due to its "[modern](modern.md)" [EEVEE](eevee.md) renderer, deprecating old machines and giving a huge fuck you to all users with incompatible hardware (for example the users of [RYF](ryf.md) software). This new version also stopped working with the [free](free_software.md) [Nouveau](nouvea.md) driver, forcing the users to use NVidia's proprietary drivers. Blender of course doesn't at all care about this. { I've been forced to use the extremely low FPS [software](sw_rendering.md) GL version of Blender after 2.8. ~drummyfish }
|
20
bloat.md
Normal file
20
bloat.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# Bloat
|
||||||
|
|
||||||
|
Bloat is a very wide term that in the context of software and technology means extreme growth in terms of source code size, complexity, number of [dependencies](dependency.md), useless features and resource usage, all of which lead to inefficient, badly designed technology with bugs and [security](security.md) vulnerabilities, as well as **loss of [freedom](free_software.md)**, waste of human effort and great obscurity and ugliness. Bloat is extremely bad and one of the greatest technological issues of today. Creating bloat is bad engineering at it worst and unfortunately it is what's absolutely taking over all technology nowadays, mostly due to [capitalism](capitalism.md), commercialization, consumerism and incompetent people trying to take on jobs they are in no way qualified to do.
|
||||||
|
|
||||||
|
[LRS](lrs.md), [suckless](suckless.md) and some others small groups are trying to address the issue and write software that is good, minimal, safe, efficient and well functioning. Nevertheless our numbers are very small and in this endeavor we are basically standing against the whole world and the most powerful tech corporations.
|
||||||
|
|
||||||
|
One of a very frequent questions you may hear a noob ask is **"How can bloat limit software freedom if such software has a [free](free_software.md) license?"** Bloat de-facto limits some of the four essential freedoms (to use, study, modify and share) required for a software to be free. A free license grants these freedoms legally, but if some of those freedoms are subsequently limited by other circumstances, the software becomes effectively less free. It is important to realize that **complexity itself goes against freedom** because a more complex system will inevitably reduce the number of people being able to execute freedoms such as modifying the software (the number of programmers being able to understand and modify a trivial program is much greater than the number of programmers being able to understand and modify a highly complex million [LOC](loc.md) program). As the number of people being able to execute the basic freedom drops, we're approaching the scenario in which the software is de-facto controlled by a small number of people who can (e.g. due to the cost) effectively study, modify and maintain the program -- and a program that is controlled by a small group of people (e.g. a corporation) is by definition [proprietary](proprietary.md). If there is a web browser that has a free license but you, a lone programmer, can't afford to study it, modify it significantly and maintain it, and your friends aren't able to do that either, when the only one who can practically do this is the developer of the browser himself and perhaps a few other rich corporations that can pay dozens of full time programmers, then such browser cannot be considered free as it won't be shaped to benefit you, the user, but rather the developer, a corporation.
|
||||||
|
|
||||||
|
## Example of Bloat
|
||||||
|
|
||||||
|
The following is a list of software usually considered a good example of bloat. However keep in mind that bloat is a relative term, for example [vim](vim.md) can be seen as a minimalist suckless editor when compared to mainstream software ([IDEs](ide.md)), but at the same time it's pretty bloated when compared to strictly [suckless](suckless.md) programs.
|
||||||
|
|
||||||
|
- [Web](web.md) since the onset of "web 2.0" has been steadily becoming more and more bloated with things such as Adobe Flash and [JavaScript](javascript.md). By today the situation about web bloat is reaching almost unbearable levels, especially in [modern](modern.md) sites such as [YouTube](youtube.md). For a great read see [The Website Obesity Crisis](https://idlewords.com/talks/website_obesity.htm).
|
||||||
|
- Ads, [spyware](spyware.md), [DRM](drm.md), anti-cheats, anti-viruses, anti-repair and other anti-user "features" are bloat.
|
||||||
|
- Desktop environments such as [KDE](kde.md) and [GNOME](gnome.md). The concept of a [desktop environment](de.md) itself is often considered bloat.
|
||||||
|
- [Windows](windows.md): one of the best examples of how software should NOT be done
|
||||||
|
- [Blender](blender.md): quite useful [FOSS](foss.md) 3D editor which however integrates things like a whole video editor, game engine, several renderers, scripting language with text editor and so on
|
||||||
|
- [CMake](cmake.md): gigantic build system that stands above other build systems (lol)
|
||||||
|
- [Electron](electron.md): [GUI](gui.md) [framework](framework.md) infamous for its huge resource consumption
|
||||||
|
- [glibc](glibc.md): TODO
|
7
bloat_monopoly.md
Normal file
7
bloat_monopoly.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Bloat Monopoly
|
||||||
|
|
||||||
|
Bloat monopoly is an exclusive control over or de-facto ownership of [software](software.md) not by legal means but by means of [bloat](bloat.md). I.e. even if given sofware is [FOSS](foss.md) (that is its source code is public and everyone has basic rights to it), it can still be made **practically** controlled exclusively by the developer because the developer is the only one with enough resources and/or know-how to be able to execute the basic rights such as meaningful modifications of the software.
|
||||||
|
|
||||||
|
Bloat monopoly is [capitalism](capitalism.md)'s bypass of [free](free.md) licenses and accommodation to their popularity. With bloat monopoly capitalists can stick an [FOSS](foss.md) license to their software, get an automatic approval of most "open-source" fans as well as their free work time, while really staying in control almost to the same degree as with [proprietary](proprietary.md) software.
|
||||||
|
|
||||||
|
Examples of bloat monopoly include web browsers, [Android](android.md) etc. This software is characteristic by its difficulty to be even compiled, yet alone understood and meaningfully modified, by its astronomical [maintenance](maintenance.md) cost that is hard to pay for volunteers, and by aggressive [update culture](update_culture.md).
|
9
brain_software.md
Normal file
9
brain_software.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Brain Software
|
||||||
|
|
||||||
|
Brain [software](software.md) is kind of a fun idea of software that runs on the human brain as opposed to a [computer](computer.md). This removes the [dependency](dependency.md) on computers and highly increases freedom. Of course, this also comes with a huge drop of computational power :) However, aside from being a fun idea to explore, this kind of software and "architectures" may become interesting from the perspective of [freedom](free_software.md) and [primitivism](primitivism.md) (especially when the technological [collapse](collapse.md) seems like a real danger).
|
||||||
|
|
||||||
|
Primitive tools helping the brain compute, such as pen and paper or printed out mathematical tables, may be allowed.
|
||||||
|
|
||||||
|
Example of brain software can be the [game](game.html) of [chess](chess.md). Chess masters can easily play the game without a physical chess board, only in their head, and they can play games with each other by just saying the moves out loud. They may even just play games with themselves, which makes chess a deep, entertaining game that can be 100% contained in one's brain. Such game can never be taken away from the person, it can't be altered by corporations, it can't become unplayable on new [hardware](hardware.md) etc., making it free to the greatest extent.
|
||||||
|
|
||||||
|
One may think of a pen and paper computer with its own simple instruction set that allows general purpose programming. This instruction set may be designed to be well interpretable by human and it may be accompanied by tables printed out on paper for quick lookup of operation results -- e.g. a 4 bit computer might provide a 16x16 table with precomputed multiplication results which would help the person execute the multiplication instruction within mere seconds.
|
92
brainfuck.md
Normal file
92
brainfuck.md
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
# Brainfuck
|
||||||
|
|
||||||
|
Brainfuck is an extremely simple, untyped [esoteric programming language](esoland.md); simple by its specification (consisting only of 8 commands) but intentionally very hard to program in. It works similarly to a pure [Turing machine](turing_machine.md). In a way it is kind of [beautiful](beauty.md) by its [simplicity](minimalism.md). It is very easy to write your own brainfuck [interpreter](interpreter.md).
|
||||||
|
|
||||||
|
There exist [self-hosted](self_hosting.md) brainfuck interpreters which is pretty fucked up.
|
||||||
|
|
||||||
|
The language is based on a 1964 language P´´ which was published in a mathematical paper; it is very similar to brainfuck except for having no [I/O](io.md).
|
||||||
|
|
||||||
|
Brainfuck has seen tremendous success in the [esolang](esolang.md) community as the **lowest common denominator language**: just as mathematicians use [Turing machines](turing_machine.md) in proofs, esolang programmers use brainfuck in similar ways -- many esolangs just compile to brainfuck or use brainfuck in proofs of [Turing completeness](turing_complete.md) etc. This is thanks to brainfuck being an actual, implemented and working language reflecting real computers, not just a highly abstract mathematical model with many different variants. For example if one wants to encode a program as an integer number, we can simply take the binary representation of the program's brainfuck implementation.
|
||||||
|
|
||||||
|
In [LRS](lrs.md) programs brainfuck may be seriously used as a super simple [scripting language](script.md).
|
||||||
|
|
||||||
|
## Specification
|
||||||
|
|
||||||
|
The "vanilla" brainfuck operates as follows:
|
||||||
|
|
||||||
|
We have a linear memory of **cells** and a **data pointer** which initially points to the 0th cell. The size and count of the cells is implementation-defined, but usually a cell is 8 bits wide and there is at least 30000 cells.
|
||||||
|
|
||||||
|
A program consists of these possible commands:
|
||||||
|
|
||||||
|
- `+`: increment the data cell under data pointer
|
||||||
|
- `-`: decrement the data cell under data pointer
|
||||||
|
- `>`: move the data pointer to the right
|
||||||
|
- `<`: move the data pointer to the left
|
||||||
|
- `[`: jump after corresponding `]` if value under data pointer is zero
|
||||||
|
- `]`: jump after corresponding `[` if value under data pointer is not zero
|
||||||
|
- `.`: output value under data pointer as an ASCII character
|
||||||
|
- `,`: read value and store it to the cell under data pointer
|
||||||
|
|
||||||
|
## Implementation
|
||||||
|
|
||||||
|
This is a very simple [C](c.md) implementation of brainfuck:
|
||||||
|
|
||||||
|
```
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define CELLS 30000
|
||||||
|
|
||||||
|
const char program[] = ",[.-]"; // your program here
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
char tape[CELLS];
|
||||||
|
unsigned int cell = 0;
|
||||||
|
const char *i = program;
|
||||||
|
int bDir, bCount;
|
||||||
|
|
||||||
|
while (*i != 0)
|
||||||
|
{
|
||||||
|
switch (*i)
|
||||||
|
{
|
||||||
|
case '>': cell++; break;
|
||||||
|
case '<': cell--; break;
|
||||||
|
case '+': tape[cell]++; break;
|
||||||
|
case '-': tape[cell]--; break;
|
||||||
|
case '.': putchar(tape[cell]); fflush(stdout); break;
|
||||||
|
case ',': scanf("%c",tape + cell); break;
|
||||||
|
case '[':
|
||||||
|
case ']':
|
||||||
|
if ((tape[cell] == 0) == (*i == ']'))
|
||||||
|
break;
|
||||||
|
|
||||||
|
bDir = (*i == '[') ? 1 : -1;
|
||||||
|
bCount = 0;
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
if (*i == '[')
|
||||||
|
bCount += bDir;
|
||||||
|
else if (*i == ']')
|
||||||
|
bCount -= bDir;
|
||||||
|
|
||||||
|
if (bCount == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
i += bDir;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Variants
|
||||||
|
|
||||||
|
TODO
|
3
bs.md
Normal file
3
bs.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# BS
|
||||||
|
|
||||||
|
[Bullshit](bullshit.md).
|
1
bullshit.md
Normal file
1
bullshit.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Bullshit
|
68
bytebeat.md
Normal file
68
bytebeat.md
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
# Bytebeat
|
||||||
|
|
||||||
|
Bytebeat is a procedural [chiptune](chiptune.md)/8bit style music generated by a short expression in a programming language; it was discovered/highlighted in 2011 by [Viznut](viznut.md) (author of [countercomplex](countercomplex.md) blog) and others, and the technique capable of producing quite impressive music by single-line code has since caught the attention of many programmers, especially in [demoscene](demoscene.md). There has even been a [paper](https://arxiv.org/abs/1112.1368) written about bytebeat.
|
||||||
|
|
||||||
|
This is a [beautiful](beauty.md) [hack](hacking.md) for [LRS](lrs.md)/[suckless](suckless.md) programmers because it takes quite a tiny amount of code, space and effort to produce nice music, e.g. for [games](game.md) (done e.g. by [Anarch](anarch.md)).
|
||||||
|
|
||||||
|
8bit samples corresponding to `unsigned char` are typically used with bytebeat. The formulas take advantage of [overflows](overflow.md) that create rhythmical patterns with potential other operations such as multiplication, division, addition, squaring, bitwise/logical operators and conditions adding more interesting effects.
|
||||||
|
|
||||||
|
Bytebeat also looks kind of cool when rendered as an image (outputting pixels instead of musical samples).
|
||||||
|
|
||||||
|
## How To
|
||||||
|
|
||||||
|
Quick experiments with bytebeat can be performed with online tools that are easy to find on the [web](www.md), these usually use [JavaScript](javascript.md).
|
||||||
|
|
||||||
|
Nevertheless, traditionally we use [C](c.md) for bytebeat. We simply create a loop with a *time* variable (`i`) and inside the loop body we create our bytebeat expression with the variable to compute a char that we output.
|
||||||
|
|
||||||
|
A simple "workflow" for bytebeat "development" can be set up as follows. Firstly write a C program:
|
||||||
|
|
||||||
|
```
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < 10000; ++i)
|
||||||
|
putchar(
|
||||||
|
i / 3 // < bytebeat formula here
|
||||||
|
);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Now compile the program and play its output e.g. like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
gcc program.c && ./a.out | aplay
|
||||||
|
```
|
||||||
|
|
||||||
|
Now we can just start experimenting and invent new music by fiddling with the formula indicated by the comment.
|
||||||
|
|
||||||
|
General tips/tricks and observations are these:
|
||||||
|
|
||||||
|
- Outputting the variable `i` creates a periodical saw-shaped beat, **multiplication/division decreases/increases the speed, addition/subtraction shifts the phase backward/forward**.
|
||||||
|
- Squaring (and other powers) create a **wah-wah effect**.
|
||||||
|
- Crazier patterns can be achieved by **using the variable in places of numerical constants**, e.g. `i << ((i / 512) % 8)` (shifting by a value that depends on the variable).
|
||||||
|
- Modulo (`%`) increases the frequency and **decreases volume** (limits the wave peak).
|
||||||
|
- So called **Sierpinski harmonies** are often used melodic expressions of the form `i*N & i >> M`.
|
||||||
|
- Bitwise and (`&`) can add distortion (create steps in the wave).
|
||||||
|
- A **macro structure** of the song (silent/louds parts, verse/chorus, ...) can be achieved by combining multiple patterns with some low-frequency pattern, e.g. this alternates a slower and faster beat: `int cond = (i & 0x8000) == 0;`, `cond * (i / 16) + !cond * (i / 32)`
|
||||||
|
- **Extra variables** can add more complexity (e.g. precompute some variable `a` which will subsequently be used multiple times in the final formula).
|
||||||
|
|
||||||
|
## Copyright
|
||||||
|
|
||||||
|
It is not exactly clear whether, how and to what extent [copyright](copyright) can apply to bytebeat: on one hand we have a short formula that's uncopyrightable (just like mathematical formulas), on the other hand we have music, an artistic expression. Many authors of bytebeat "release" their creations under [free](free_culture.md) [licenses](license.md) such as [CC-BY-SA](cc-by-sa.md), but such licenses are of course not applicable if copyright can't even arise.
|
||||||
|
|
||||||
|
We believe copyright doesn't and SHOULDN'T apply to bytebeat. To ensure this, it is good to stick [CC0](cc0.md) to any released bytebeat.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
A super-simple example can be just a simple:
|
||||||
|
|
||||||
|
- `i / 16`
|
||||||
|
|
||||||
|
The following more complex examples come from the [LRS](lrs.md) game [Anarch](anarch.md) (these are legally safe even in case copyright can apply to bytebeat as Anarch is released under [CC0](cc0.md)):
|
||||||
|
|
||||||
|
- distortion guitar rhythmical beat: `~((((i >> ((i >> 2) % 32)) | (i >> ((i >> 5) % 32))) & 0x12) << 1) | (i >> 11)`
|
||||||
|
- electronic/techno: `((0x47 >> ((i >> 9) % 32)) & (i >> (i % 32))) | (0x57 >> ((i >> 7) % 32)) | (0x06 >> ((i >> ((((i * 11) >> 14) & 0x0e) % 32)) % 32))`
|
||||||
|
- main theme, uses an extra variable: `(((i) & 65536) ? (a & (((i * 2) >> 16) & 0x09)) : ~a)`, where `uint32_t a = ((i >> 7) | (i >> 9) | (~i << 1) | i)`
|
162
c.md
Normal file
162
c.md
Normal file
|
@ -0,0 +1,162 @@
|
||||||
|
# C
|
||||||
|
|
||||||
|
{ We have a [C tutorial](c_tutorial.md)! ~drummyfish }
|
||||||
|
|
||||||
|
C is a [low level](low_level.md), [statically typed](static_typing.md) [imperative](imperative.md) compiled [programming language](programming_language.md), the go-to language of most [less retarded software](lrs.md). It is the absolutely preferred language of the [suckless](suckless.md) community as well as of most true experts, for example the [Linux](linux.md) and [OpenBSD](openbsd.md) developers, because of its good minimal design, level of control, uncontested performance and a greatly established and tested status.
|
||||||
|
|
||||||
|
C is usually not considered an easy language to learn because of its low level nature: it requires good understanding of how a computer actually works and doesn't prevent the programmer from shooting himself in the foot. Programmer is given full control (and therefore responsibility). There are things considered "tricky" which one must be aware of, such as undefined behavior of certain operators and raw pointers. This is what can discourage a lot of modern "coding monkeys" from choosing C, but it's also what inevitably allows such great performance -- undefined behavior allows the compiler to choose the most efficient implementation.
|
||||||
|
|
||||||
|
## 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), ...).
|
||||||
|
|
||||||
|
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 1989, the [ANSI C](ansi_c.md) standard, also known as C89, was released by the American ANSI. 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.
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
## Standards
|
||||||
|
|
||||||
|
C is not a single language, there have been a few standards over the years since its inception in 1970s. The notable standards and versions are:
|
||||||
|
|
||||||
|
- **K&R C**: C as described by its inventors in the book *The C Programming Language*, before official standardization. This is kind of too ancient nowadays.
|
||||||
|
- **C89/C90 (ANSI/ISO C)**: First fully standardized version, usable even today.
|
||||||
|
- **C95**: A minor update of the previous standard, adds wide character support.
|
||||||
|
- **C99**: Updated standard from the year 1999 striking a great balance between "modern" and "good old". This is a good version to use in LRS programs, but will be a little less supported than C89.
|
||||||
|
- **C11**: Updated standard from the year 2011. This one is too [bloated](bloat.md) and isn't worth using.
|
||||||
|
- **C17/C18**: Yet another update, yet more bloated and not worth using.
|
||||||
|
|
||||||
|
LRS should use C99 or C89 as the newer versions are considered [bloat](bloat.md) and don't have such great support in compilers, making them less portable and therefore less free.
|
||||||
|
|
||||||
|
The standards of C99 and older are considered pretty [future-proof](future_proof.md) and using them will help your program be future-proof as well. This is to a high degree due to C having been established and tested better than any other language; it is one of the oldest languages and a majority of the most essential software is written in C, C compiler is one of the very first things a new hardware platform needs to implement, so C compilers will always be around, at least for historical reasons. C has also been very well designed in a relatively minimal fashion, before the advent of modern feature-creep and and bullshit such as [OOP](oop.md) which cripples almost all "modern" languages.
|
||||||
|
|
||||||
|
## Compilers
|
||||||
|
|
||||||
|
- [gcc](gcc.md)
|
||||||
|
- [clang](clang.md)
|
||||||
|
- [tcc](tcc.md)
|
||||||
|
- scc
|
||||||
|
|
||||||
|
## Standard Library
|
||||||
|
|
||||||
|
So the standard library (libc) is a subject of live debate because while its interface and behavior are given by the C standard, its implementation is a matter of each compiler; since the standard library is so commonly used, we should take great care in assuring it's extremely well written. As you probably guessed, the popular implementations ([glibc](glibc.md) et al) are [bloat](bloat.md). Better alternatives thankfully exist, such as:
|
||||||
|
|
||||||
|
- [musl](musl.md)
|
||||||
|
- [uclibc](uclibc.md)
|
||||||
|
- [not using](dependency.md) the standard library :)
|
||||||
|
|
||||||
|
## Bad Things About C
|
||||||
|
|
||||||
|
C isn't perfect, it was one of the first relatively higher level languages and even though it has showed to have been designed extremely well, some things didn't age great, or were simply bad from the start. We still prefer this language as usually the best choice, but it's good to be aware of its downsides or smaller issues, if only for the sake of one day designing a better version of C. So, let's go:
|
||||||
|
|
||||||
|
- **C specification (the ISO standard) is [proprietary](proprietary.md)** :( The language itself probably can't be copyrighted, nevertheless this may change in the future, and a proprietary specs lowers C's accessibility and moddability (you can't make derivative versions of the spec).
|
||||||
|
- **The specification is also long as fuck**. A good, free language should have a simple definition. It could be simplified a lot by simplifying the language itself as well as dropping some truly legacy considerations (like [BCD](bcd.md) systems?) and removing a lot of undefined behavior.
|
||||||
|
- **Some behavior is weird and has exceptions**, for example a function can return anything, including a `struct`, except for an array. This makes it awkward to e.g. implement vectors which would best be made as arrays but you want functions to return them, so you may do hacks like wrapping them instide a struct just for this.
|
||||||
|
- **Some things could be made simpler**, e.g. using [reverse polish](reverse_polish.md) notation for expressions, rather than expressions with brackets and operator precedence, would make implementations much simpler, increasing sucklessness.
|
||||||
|
- Some things like [enums](enum.md) could be dropped entirely, they can easily be replaced with macros.
|
||||||
|
- **The preprocessor isn't exactly elegant**, it has completely different syntax and rules from the main language, not very suckless.
|
||||||
|
- **The syntax isn't perfect**, e.g. it's pretty weird that the condition after `if` has to be in brackets, it could be designed better. Keywords also might be better being single chars, like `?` instead of `if` or the weird long ass names with spaces like `unsigned long long` could be made nicer. A shorter, natural-language-neutral source code would be probably better. Both line and block comments could be implemented with a single character, e.g. `#` which would end either with a newline or another `#`.
|
||||||
|
- **Some basic things that are part of the standard library or extensions**, like fixed with types and binary literals, could be part of the language itself.
|
||||||
|
- TODO: moar
|
||||||
|
|
||||||
|
## Basics
|
||||||
|
|
||||||
|
This is a quick overview, for a more in depth tutorial see [C tutorial](c_tutorial.md).
|
||||||
|
|
||||||
|
A simple program in C that writes "welcome to C" looks like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
#include <stdio.h> // standard I/O library
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
// this is the main program
|
||||||
|
|
||||||
|
puts("welcome to C");
|
||||||
|
|
||||||
|
return 0; // end with success
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
You can simply paste this code into a file which you name e.g. `program.c`, then you can compile the program from command line like this:
|
||||||
|
|
||||||
|
`gcc -o program program.c`
|
||||||
|
|
||||||
|
Then if you run the program from command line (`./program` on Unix like systems) you should see the message.
|
||||||
|
|
||||||
|
## Cheatsheet
|
||||||
|
|
||||||
|
It's pretty important you learn C, so here's a little cheat sheet for you.
|
||||||
|
|
||||||
|
**data types** (just some):
|
||||||
|
|
||||||
|
- **int**: signed integer, at least 16 bits (-32767 to 32767) but usually more
|
||||||
|
- **unsigned int**: unsigned integer, at least 16 bit (0 to 65535) but usually more
|
||||||
|
- **char**: smallest integer of at least 8 bits (1 byte, 256 values), besides others used for containing [ASCII](ascii.md) characters
|
||||||
|
- **unsigned char**: like char but unsigned (0 to 255)
|
||||||
|
- **float**: [floating point](float.md) number (usually 32 bit)
|
||||||
|
- **double**: like float but higher precision (usually 64 bit)
|
||||||
|
- **short**: smaller signed integer, at least 16 bits (−32767 to 32767)
|
||||||
|
- **long**: bigger signed integer, at least 32 bits (-2147483647 to 2147483647)
|
||||||
|
- **pointer**: memory address (size depends on platform), always tied to a specific type, e.g. a pointer to integer: `*int`, pointer to double: `*double` etc.
|
||||||
|
- **array**: a sequence of values of some type, e.g. an array of 10 integers: `int[10]`
|
||||||
|
- **struct**: structure of values of different types, e.g. `struct myStruct { int myInt; chat myChar; }`
|
||||||
|
- note: header *stdint.h* contains fixed-width data types such as *uint32_t* etc.
|
||||||
|
- note: there is no **string**, a string is an array of *char*s which must end with a value 0 (string terminator)
|
||||||
|
- note: there is no real **bool** (actually it is in header *stdbool*), integers are used instead (0 = false, 1 = true)
|
||||||
|
|
||||||
|
**branching aka if-then-else**:
|
||||||
|
|
||||||
|
```
|
||||||
|
if (CONDITION)
|
||||||
|
{
|
||||||
|
// do something here
|
||||||
|
}
|
||||||
|
else // optional
|
||||||
|
{
|
||||||
|
// do something else here
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**for loop** (repeat given number of times):
|
||||||
|
|
||||||
|
```
|
||||||
|
for (int i = 0; i < MAX; ++i)
|
||||||
|
{
|
||||||
|
// do something here, you can use i
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**while loop** (repeat while CONDITION holds):
|
||||||
|
|
||||||
|
```
|
||||||
|
while (CONDITION)
|
||||||
|
{
|
||||||
|
// do something here
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**do while loop** (same as *while* but CONDITION at the end):
|
||||||
|
|
||||||
|
```
|
||||||
|
do
|
||||||
|
{
|
||||||
|
// do something here
|
||||||
|
} while (CONDITION);
|
||||||
|
```
|
||||||
|
|
||||||
|
**function definition**:
|
||||||
|
|
||||||
|
```
|
||||||
|
RETURN_TYPE myFunction (TYPE1 param1, TYPE2 param2, ...)
|
||||||
|
{ // return type can be void
|
||||||
|
// do something here
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [C tutorial](c_tutorial.md)
|
||||||
|
- [C pitfalls](c_pitfalls.md)
|
||||||
|
- [C programming style](programming_style.md)
|
||||||
|
- [IOCCC](ioccc.md)
|
51
c_pitfalls.md
Normal file
51
c_pitfalls.md
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
# C Pitfalls
|
||||||
|
|
||||||
|
[C](c.md) is a powerful language that offers almost absolute control and maximum performance which necessarily comes with responsibility and danger of shooting oneself in the foot. Without knowledge of the pitfalls you may well find yourself fallen into one of them.
|
||||||
|
|
||||||
|
Unless specified otherwise, this article supposes the C99 standard of the C language.
|
||||||
|
|
||||||
|
## Undefined/Unspecified Behavior
|
||||||
|
|
||||||
|
Undefined, unspecified and implementation-defined behaviors are kinds of unpredictable and sometimes non-intuitive behavior of certain operations that may differ between compilers, platforms or runs because they are not defined by the language specification; this is mostly done on purpose as to allow some implementation freedom which allows implementing the language in a way that is most efficient on given platform. This behavior may be completely random (unpredictable) or implementation-specified (consistent within each implementation but potentially different between implementations). In any case, one has to be very careful about letting such behavior influence computations. Note that tools such as [cppcheck](cppcheck.md) can help find undefined behavior in code. Description of some of these behaviors follow.
|
||||||
|
|
||||||
|
**Data type sizes including int and char may not be the same on each platform**. Even though we almost take it for granted than char is 8 bits wide, in theory it can be wider. The int (and unsigned int) type width should reflect the architectures native integer type, so nowadays mostly it's mostly 32 or 64 bits. To deal with this we can use the standard library `limits.h` and `stdint.h` headers.
|
||||||
|
|
||||||
|
**No specific [endianness](endian.md) is enforced**. Nowadays little endian is what you'll encounter on most platforms, but e.g. [PowerPC](ppc.md) uses big endian.
|
||||||
|
|
||||||
|
**Order of evaluation of operands and function arguments is not specified**. I.e. in an expression or function call it is not defined which operands or arguments will be evaluated first, the order may be completely random and the order may differ even when evaluating the same expression at another time. This is demonstrated by the following code:
|
||||||
|
|
||||||
|
```
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int x = 0;
|
||||||
|
|
||||||
|
int a(void)
|
||||||
|
{
|
||||||
|
x += 1;
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
printf("%d %d\n",x,a()); // may print 0 1 or 1 1
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Char data type signedness is not defined**. The signedness can be explicitly "forced" by specifying `signed char` or `unsigned char`.
|
||||||
|
|
||||||
|
**Bit shifts by type width or more are undefined.** Also bit shifts by negative values are undefined. So e.g. `x >> 8` is undefined if width of the data type of `x` is 8 bits.
|
||||||
|
|
||||||
|
**Overflow behavior of signed addition is not guaranteed.** Sometimes we suppose that addition of two signed integers that are past the data type's limit will produce two's complement overflow, but in fact this operation's behavior is undefined.
|
||||||
|
|
||||||
|
## Memory Unsafety
|
||||||
|
|
||||||
|
Besides being extra careful about writing memory safe code, one needs to also know that **some functions of the standard library are memory unsafe**. This is regarding mainly string functions such as `strcpy` or `strlen` which do not check the string boundaries (i.e. they rely on not being passed a string that's not zero terminated and so can potentially touch memory anywhere beyond); safer alternatives are available, they have an `n` added in the name (`strncpy`, `strnlen`, ...) and allow specifying a length limit.
|
||||||
|
|
||||||
|
## Different Behavior Between C And C++
|
||||||
|
|
||||||
|
C is **not** a subset of C++, i.e. not every C program is a C++ program (for simple example imagine a C program in which we use the word `class` as an identifier). Furthermore a C program that is at the same time also a C++ program may behave differently when compiled as C vs C++. Of course, all of this may also apply between different standards of C, not just between C and C++.
|
||||||
|
|
||||||
|
For portability sake it is good to try to write C code that will also compile as C++ (and behave the same). For this we should know some basic differences in behavior between C and C++.
|
||||||
|
|
||||||
|
TODO: specific examples
|
1685
c_tutorial.md
Normal file
1685
c_tutorial.md
Normal file
File diff suppressed because it is too large
Load diff
7
cancer.md
Normal file
7
cancer.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Cancer
|
||||||
|
|
||||||
|
Cancer is similar to [shit](shit.md) but is even worse because it spreads itself and infects anything else it touches (it is a subset of shit).
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [shit](shit.md)
|
68
capitalism.md
Normal file
68
capitalism.md
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
# Capitalism
|
||||||
|
|
||||||
|
*"Capitalism is the astonishing belief that the most evil among men will for the nastiest motives work for the benefit of all."*
|
||||||
|
|
||||||
|
Capitalism is the worst economic system we've yet seen in the history,^[source](logic.md) literally based on pure greed and artificially sustained conflict between people (so called [competition](competition.md)), abandoning all morals and putting money and profit (so called [capital](capital.md)) above everything else including preservation of life itself, capitalism fuels the worst in people and forces them to compete and suffer for basic resources, even in a world where abundance of resources is already possible to achieve. Capitalism goes against progress (see e.g. [antivirus paradox](antivirus_paradox.md)), [good technology](lrs.md), freedom, it supports immense waste of resources, wars, abuse of people, destruction of environment, decline of morals, invention of [bullshit](bullshit.md) (bullshit jobs, bullshit laws, ...), [torture](marketing.md) of people and animals and much more. Nevertheless, it's been truthfully stated that "it is now easier to imagine the end of all life than any substantial change in capitalism."
|
||||||
|
|
||||||
|
Capitalism produces the [worst imaginable technology](capitalist_software.md) and rewards people for [being cruel to each other](entrepreneur.md). It points the direction of society towards a [collapse](collapse.md) and may very likely be the [great filter](great_filter.md) of civilizations; in capitalism people de-facto own nothing and become wholly dependent on corporations which exploit this fact to abuse them as much as possible. This is achieved by [slowly boiling the frog](slowly_boiling_the_frog.md). No one owns anything, products become [services](saas.md) (your car won't drive without Internet connection and permission from its manufacturer), all independency and decentralization is lost in favor of a highly fragile and interdependent economy and infrastructure of services. Then only a slight break in the chain is enough to bring the whole civilization down.
|
||||||
|
|
||||||
|
**The underlying issue of capitalism is [competition](competition.md)** -- competition is the root of all evil in any social system, however capitalism is the glorification of competition, amplification of this evil to maximum. It is implemented by setting and supporting a very stupid idea that **everyone's primary and only goal is to be self-benefit**, i.e. maximization of capital. This is combined with the fact that the environment of [free market](free_market.md) is a system with **Darwinian evolution** which through natural selection extremely effectively and quickly optimizes the organisms (corporations) for achieving this given goal, i.e. generating maximum profit, on the detriment of all other values such as wellbeing of people, sustainability or morality. In other words capitalism has never promised a good society, it literally only states that everyone should try to benefit oneself as much as possible, i.e. defines the [fitness function](fitness_function.md) purely as the ability to seize as many resources as possible, and then selects and rewards those who best implement this function, i.e. those we would call sociopaths or "dicks", and to those is given the power in society. In other words we simply get what we set to achieve: find entities that are best at making profit at any cost. The inevitable decline of society can not possibly be prevented by laws, any effort of trying to stop evolution by inventing artificial rules on the go is a battle against nature itself and is extremely naive, the immense power of the evolutionary system that's constantly at work to find ways to bypass or cancel laws in the way of profit and abuse of others will prevails just as life will always find its way to survive and thrive even in the worst conditions on Earth. Trying to stop corporations with laws is like trying to stop a train by throwing sticks in its path. The problem is not that "people are dicks", it is that we choose to put in place a system that rewards the dicks, a system that fuels the worst in people and smothers the best in them.
|
||||||
|
|
||||||
|
From a certain point of view capitalism is not really a traditional socioeconomic system, it is **the failure to establish one** -- capitalism is the failure to prevent the establishment of capitalism, and it is also the punishment for this failure. It is the continuation of the jungle to the age when technology for mass production, mass surveillance etc. has sufficiently evolved -- capitalism will arise with technological progress unless we prevent it, just as cancer will grow unless we treat it in very early stages. This is what people mean when they say that capitalism [simply works](just_werks.md) or that it's *natural* -- it's the least effort option, one that simply lets people behave like animals, except that these animals are now equipped with weapons of mass destruction, tools for implementing slavery etc. It is natural in the same way in which wars, murders, bullying and deadly diseases are. It is the most primitive system imaginable, it is uncontrolled, leads to suffering and self-destruction.
|
||||||
|
|
||||||
|
## Attributes Of Capitalism
|
||||||
|
|
||||||
|
The following is a list of just SOME attributes of capitalism -- note that not all of them are present in initial stages but capitalism will always converge towards them.
|
||||||
|
|
||||||
|
- **[slavery](slavery.md), oppression, loss of freedom**: In capitalism people are slaves firstly as workers -- in work time, so called [wage slavery](wage_slavery.md) -- and secondly as consumers -- in "free" time. Banks create inflation to devalue money people save so that they have to work constantly for their whole lives as products are getting progressively more expensive. More and more essentially unnecessary spending purchases are forced on people -- new smartphone every year, mortgages, gas and maintenance to cars, new clothes according to fashion, insurances etc. Practically no one has a truly free time nowadays.
|
||||||
|
- **extreme waste**: Bullshit products, [bullshit jobs](bullshit_job.md) and the need for constant dynamics on the market force to waste energy, material and human work just on keeping everything in motion, even if purely arbitrarily. Corporations keep reinventing and reselling slightly modified version of already existing products, one group of people is creating something while another group is destroying it, just to keep everyone occupied. Byproduct physical waste such as plastics and chemicals are dumped in the environment and pollute it for decades, even centuries to come.
|
||||||
|
- **[antivirus paradox](antivirus_paradox.md)**: Sustaining and artificially creating negative phenomena so as to build a business in [fighting](fight.md) it, to keep and create jobs ("firefighters starting fires").
|
||||||
|
- **[artificial scarcity](artificial_scarcity.md)**: In order to be able to sell something, that something has to be scarce, an abundant resource such as air cannot be sold. Once technology emerges to make some resource abundant, it threatens those who have a business in selling that resource. This creates the huge interest in keeping resources scarce, sometimes by force. Corporations are known to routinely destroy food that can still be eaten, and other goods as well. Corporations indirectly conspire on keeping resources scarce by artificial obsolescence, outlawing old products as "unsafe", using [copyright](copyright.md) to prevent people from recycling old intellectual works etc.
|
||||||
|
- **[artificial obsolescence](artificial_obsolescence.md)**: To keep businesses running companies have an interest in making people consume even things that could otherwise last them even whole lives, so we see phenomena like people being forced to buy new phones every every year. There used to be the famous light bulb cartel ([Phoebus cartel](phoebus_cartel.md)) that fined any bulb manufacturer that made long lasting light bulbs, bulbs were forcefully made to last for a short time. [Apple](apple.md) has remotely decreased the performance of older [iPhones](iphone.md) when new ones came out. There are countless examples.
|
||||||
|
- **artificial crippling of technology**: It is nowadays the norm to create a high tier product, such as a CPU or a car, and then artificially cripple some of the manufactured units (limit car engine power by software, burn parts of the CPU, ...) so as to sell them as a lower tier of that product. It is cheaper than to separately invent several tiers of the product. So it costs the same (actually less) to create a high end CPU as the low end one -- we could all be using high end CPUs, but the poorer of us are forced to use the forcefully crippled versions, because "capitalism".
|
||||||
|
- **purposeful incompatibility in technology**: In market competition products of one company will often be incompatible with products of the competition on purpose, so as to discourage consumers from buying it. Technology corporations create their own "ecosystems" for consumers into which they are trying to lock them.
|
||||||
|
- **[bullshit jobs](bullshit_job.md), invention of bullshit products/needs**: As automatization takes people's jobs, people try to keep jobs by creating artificial bullshit, e.g. "lack of women in tech" leads to creation of "diversity departments", politicians try to *create more jobs* by increasing bureaucracy etc. This is of course in direct conflict with the base goal of civilization itself of eliminating the need for human work. One online company even successfully sold literal excrement (which had no actual use, it was just marketed as "funny and cool").
|
||||||
|
- **preventing progress, sustaining status quo**: Capitalism is extremely hostile towards social progress (more leisure time, more social security, ...), i.e. the main kind of progress. It is also, contrary to popular belief, against technological progress -- the established corporations want to perpetuate their established businesses and will attack and destroy new ideas that endanger it (i.e. electric cars vs fuel powered cars, ...).
|
||||||
|
- **[fascism](fascism.md)**: Capitalism is based on fascism, i.e. extreme hierarchy and "tribes" of which each fights to death for its own self interest. This fight happens between companies themselves, between state and companies, different departments inside companies, between workers and employers, between brands on the market etc.
|
||||||
|
- **no long term planning, irresponsibility**: Companies need to make immediate profit, it's extremely rare to plan longer than 5 years ahead. Managers hired to new positions are expected to immediately increase profits and they won't stay for long, so they simply do whatever it takes to create immediate profit without considering any long term consequence such as pollution etc.
|
||||||
|
- **extreme lowering of quality of products, deterioration of [art](art.md)**: Despite capitalist propaganda, capitalism doesn't lead to increased quality of products -- on the contrary it seeks to find the MINIMUM quality that will be accepted by the consumer. In seeking to minimize manufacturing cost of a single unit, companies save money wherever they can and rather invest in marketing etc. -- for example instead of paying several experts to produce a good, well fact-checked documentary, only one man will be paid to create the documentary with the focus on it being "fun and engaging" rather than factually correct. Art is hasted, scheduled, produced on short deadlines, littered with product placement etc.
|
||||||
|
- **[plutocracy](plutocracy.md), i.e. loss of (true) [democracy](democracy.md)**: In capitalism only illusion of democracy is sustained, there is no rule of the people, there is rule of the rich THROUGH people, as the rich are who make the laws and actually take the ruling positions and who have a tremendous power to manipulate masses via private media. State is becoming more and more the tool of corporations rather than a protection against them.
|
||||||
|
- **[monopolies](monopoly.md) with unlimited power, degeneration of competition**: The naive ideas of capitalists that markets will magically regulate themselves quickly falls apart, basically no one believes it. In a competitive market monopolies arise in a short time who will prevent any competition from even arising. Can a tiny starting company compete with an established corporations with billions of dollars at their hand? No. The corporation can defeat them by gigantic marketing, unfair practices (unfair prices etc.) despite fines, by buying them, legal trolling, negative internet reviews etc. Once a monopoly without competition exists, the few advantages of competition disappear completely. A corporation doesn't respond to demand, it creates the demand. It can do whatever it likes, it can set arbitrarily high prices, create arbitrarily shitty products and so on, no competition is pressuring it to do otherwise, people have no choice than to to subvert.
|
||||||
|
- **[poverty](poverty.md)**: Despite capitalist propaganda, not everyone can be successful in capitalism (if everyone could retire at 20, why doesn't everyone just do it?), and it is a fact that because [money makes money](money_makes_money.md), the gap between the poor and the rich is becoming wider and wider (as of 2020, 8 richest people owned as much wealth as the whole poorer half of the population). Poor people are pushed into loans, getting into debts, working multiple jobs, while their health deteriorates increasing their depth on medical bills, decreasing their ability to work more etc.
|
||||||
|
- **torture and killing of people**: The poorest, mostly in third world countries, including children, are forced to hard labor that destroys their lives. Whole cities live off of processing waste coming from first world countries, e.g. disintegrating used ships with primitive tools, no work safety, breathing cancerous fumes etc.
|
||||||
|
- **money and profit above everything**: By definition capitalism advises ONLY to maximize one's profit, any other values such as human well being, peace, preservation of life environment or progress are subverted to the goal of profit. As other values are often in conflict with profit, profit wins and people suffer.
|
||||||
|
- **[fight culture](fight_culture.md), extreme hostility between people, disappearance of morality**: The very basis of capitalism -- competition -- nurtures people towards self interest, self centeredness and hostility towards others while suppressing good attributes such as sharing, love for others and [altruism](altruism.md). With this morals decline. Furthermore the system of overcomplicated laws are starting to replace morals, people as "is it legal?" rather than "is it a good thing to do?". This creates a society of dicks and psychopaths who are additionally rewarded for their immoral behavior by becoming "successful" and wealthy. In long term this serves as a natural selection of Darwinian evolution, immorally behaving people are actually more likely to survive and reproduce, which leads to genes of psychopathic behavior becoming more and more common in society -- under capitalism good people quite literally become extinct in the long run.
|
||||||
|
- **[fear culture](fear_culture.md)**: To keep people consuming and constantly engaged a tension has to be kept, comfortable people are undesirable in capitalism. So there is constantly a propaganda of some threat, be it viruses, terrorism, pedophiles on the internet, computer viruses, killing bees etc.
|
||||||
|
- **[consumerism](consumerism.md)**: To keep businesses running people need to consume everything, even things that shouldn't be consumed and that could last for very long such as computers and cars. This leads to creation of hasted low quality products (even art such as TV series) that are meant to be used and thrown away, repairing is no longer considered.
|
||||||
|
- **commerce infects absolutely everything**: In advanced capitalism there is no such thing as a commerce free zone, everything is privatized eventually and serves selfish interests. Nowadays even such areas as health care, wellfare or education of children is permeated by money, ads and corporate propaganda. Even nonprofits have to make money. Educational videos in schools are preceded with ads (as they are played on [YouTube](youtube.md)), propagandists even legally go to school and brainwash little children (they call it "education in financial literacy" and teach children that they should e.g. create bank accounts in the propagandist's specific bank).
|
||||||
|
- **destruction of environment**: This is nowadays already pretty clear, [global warming](global_warming.md) is attributed mainly to capitalism. Lack of long term planning, consumerism and extreme waste (of energy, creating physical waste such as plastics etc.) lead to the destruction of nature itself.
|
||||||
|
- **loss of ethical behavior**: Ethical behavior is a disadvantage in a competitive environment of the market, it is a limitation. Those trying to behave ethically (e.g. fair prices, ...) will simply lose to the unethically behaving ones and be eliminated from the market. Eventually there only remain unethically behaving entities, just as for example vegetarian people would not survive in a jungle.
|
||||||
|
- **anti-people design**: By definition in capitalism technology is not to serve people, it is to serve companies to make profit and abuse people, so technology spies on its users, refuses to work ([DRM](drm.md), ...) shows [ads](ad.md), forces children into purchases (predatory [games](game.md)), breaks on purpose so as to enforce a paid repair etc.
|
||||||
|
- **[censorship](censorship.md)**: So called [intellectual property](intellectual_property.md) allows for extreme censorship. Privately owned media lawfully censor and manipulate information so as to manipulate people in whichever way they see will bring them most profit.
|
||||||
|
- **[surveillance](surveillance.md)**: Companies want to analyze behavior of people, manipulate them, target ads, spam, train neural networks on their data etc., so there is an interest in applying surveillance. Indeed, this is exactly what we see in practice.
|
||||||
|
- **extreme [brainwashing](brainwashing.md) and propaganda**: [Marketing](marketing.md) becomes extreme in capitalism, utilizing advanced psychological tricks and repetition to the point of becoming a torture, with the goal of teaching people brand loyalty, consumerist behavior etc. Application of this brainwashing even on children has already been normalized. Entrepreneurs create cults of personalities. There is now even a "legit" job called an [influencer](influencer.md) whose sole purpose is in spreading corporate propaganda on the Internet.
|
||||||
|
- **criminality**: This is a direct consequence of poverty and diminishing morality.
|
||||||
|
- **instability**: Lack of long term planning, fragility of the market, increasing wealth gap, pushing workers to poverty, creating extreme interdependencies, eliminating self sufficiency and other phenomena pose great dangers of market collapses, violent strikes, disasters and even societal [collapse](collapse.md).
|
||||||
|
- **need for extremely complex market control and laws, burdening society**: As corporations are absolutely unethical and pursue evil goals such as enslaving workers and abuse of consumers, there have to be an extremely complex set of constantly evolving laws and bureaucracy just to somehow "make corporations behave". However laws are imperfect and corporations work 24/7 on bypassing them as well as on attacking and eliminating the laws themselves via lobbyist etc. This creates a constant, extremely expensive legal war (which eventually corporations will likely win).
|
||||||
|
- **uncontrolled growth**: Capitalism is likened to [cancer](cancer.md) as it requires a constant uncontrolled growth which on a planet of limited resources inevitably leads to a catastrophic scenario.
|
||||||
|
- **hyperspecialization, loss of self sufficiency**: Entities (people, cities, companies, states, ...) lose self sufficiency as they hyperspecialize in some task and in everything else rely on someone else. This complete dependence creates slavery and danger -- in an event of a blackout for example people cannot survive as they cannot make their own food.
|
||||||
|
- **loss of humanity**: In capitalism humans are just consumers and resources -- corporations now routinely use these terms (*human resources department* etc.). People are brainwashed to no longer even take offense in being called such terms. People's worth is only in how much they can work or consume.
|
||||||
|
- **abuse of animals**: In capitalism animals are just products and resources, they are kept in very bad conditions just to be killed for meat or other purpose. They are slaughtered by millions just so we can overeat to morbid obesity. Maximizing profit dictates no money should be spent on animal comfort.
|
||||||
|
- **[productivity cult](productivity_cult.md)**: People are brainwashed and forced into becoming robots whose sole purpose is to produce. Working overtimes, skipping lunch, minimizing sleep etc. has already become part of the work culture for example in USA and Japan.
|
||||||
|
- **endangering existence of all life**: The mentioned lack of long term planning, irresponsibility and instability along with creating a dangerous overdependence on technology and interconnections of self insufficient states and cities is just waiting for a disaster such as [CME](cme.md) that immediately collapses the civilization and consequently endangers all life on Earth e.g. by meltdowns in nuclear plants or possible nuclear wars as a consequence of panic. The absolute preference of immediate profit is hostile towards investments in future and precautions.
|
||||||
|
|
||||||
|
## How It Works
|
||||||
|
|
||||||
|
Capitalism newly instated in a society kind of **works for a short time**, but it never lasts. Initially when more or less everyone is at the same start line, when there are no highly evolved corporations with their advanced methods of oppression, small businesses grow and take their small shares of the market, there appears true innovation, businesses compete by true quality of products, people are relatively free and it all feels natural because it is, it's the system of the jungle, i.e. as has been said, capitalism is the failure to establish a controlled socioeconomic system rather than a presence of a purposefully designed one. Its benefits for the people are at this point only a side effect, people see it as good and continue to support it. However the system has other goals of its own, and that is the development and constant growth that's meant to create a higher organism just like smaller living cells formed us, multi cell organisms. The system will start being less and less beneficial to the people who will only become cells in a higher organism to which they'll become slaves. A cell isn't supposed to be happy, it is supposed to sacrifice its life for the good of the higher organism.
|
||||||
|
|
||||||
|
{ This initial prosperous stage appeared e.g. in Czechoslovakia, where I lived, in the 90s, after the fall of the totalitarian regime. Everything was beautiful, sadly it didn't last longer than 10-20 years at most. ~drummyfish }
|
||||||
|
|
||||||
|
Slowly medium sized businesses will grow and become [corporations](corporation.md). These are the first higher order 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. A corporation has a super human intelligence but has no human emotion or conscience, it is basically the rogue [AI](ai.md) we read about 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.
|
||||||
|
|
||||||
|
Corporations make calculated decisions to eliminate any competition, they devour or kill smaller businesses with unfair practices, 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. 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.
|
||||||
|
|
||||||
|
This is a system with [Darwinian evolution](evolution.md) in which the fitness function is simply the [capital](capital.md). Entities involved in the market are simply chosen by natural selection to be the ones that best make profit, i.e. who are best at circumventing laws, brainwashing, hiding illegal activities etc. Ethical behavior is a disadvantage that leads to elimination; if a business decides to behave ethically, it is outrun by the one who doesn't have this weakness.
|
||||||
|
|
||||||
|
The unfair, unethical behavior of corporations is still supposed to be controlled by the [state](state.md), however corporations become stronger and bigger than states, they can manipulate laws by lobbying, financially supporting preferred candidates, brainwashing people via private media and so on. States are the only force left supposed to protect people from this pure evil, but they are too weak; a single organization of relatively few people who are, quite importantly, often corporation managers, won't compete against a plethora of the best warriors selected by the extremely efficient system of free market. States slowly turn to serving corporations, becoming their tools and then slowly dissolve (see how small role the US government already plays). This leads to "[anarcho capitalism](ancap.md)", the worst stage of capitalism where there is no state, no entity supposed to protect the people, there is only one rule and that is the unlimited rule of the strongest.
|
||||||
|
|
||||||
|
Here the strongest corporation takes over the world and starts becoming the higher order organism of the whole Earth. It doesn't have to pretend anything at this point, it can simply hire an army, it can use physical force, chemical weapons, torture, unlimited surveillance, anything to achieve further seize of remaining bits of power and resources. We can only guess what will happen here, a [collapse](collapse.md) due to instability or total destruction of environment is possible, which would at least save the civilization from the horrendous fate of being eternally tortured. If the system survives, humans will be probably genetically engineered to be more submissive, killing any hope of a possible revolt, surveillance chips will be implanted to everyone, reproduction will be controlled precisely and finally perhaps the system will be able, thanks to an advanced [AI](ai.md), to exist and work more efficiently without humans completely, so they will be eliminated. This is how the mankind ends.
|
5
capitalist_singularity.md
Normal file
5
capitalist_singularity.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Capitalist Singularity
|
||||||
|
|
||||||
|
Capitalist singularity is a point in time at which capitalism becomes irreversible and the cancerous growth of society unstoppable due to corporations taking absolute control over society. It is when people lose any power to revolt against corporations as corporations become stronger than states and any other collective effort towards their control.
|
||||||
|
|
||||||
|
This is similar to the famous [technological singularity](tech_singularity.md), the difference being that society isn't conquered by a digital [AI](ai.md) but rather a superintelligent entity in a form of corporation. While many people see the danger of superintelligent AIs, surprisingly not many have noticed that we've already seen rise of such AIs -- corporations. A corporation is an entity much more intelligent than any single individual, with the single preprogrammed goal of profit. A corporation doesn't have any sense of morals as morals are an obstacle towards making profit. A corporation runs on humans but humans don't control them; there are mechanisms in place to discourage moral behavior of people inside corporations and anyone exhibiting such behavior is simply replaced.
|
24
capitalist_software.md
Normal file
24
capitalist_software.md
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# 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.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.
|
||||||
|
|
||||||
|
A ridiculous example of capitalist software is the most consumerist type: [games](game.md). AAA games are pure evil that no longer even try to be good, they just try to be addictive like drugs. Games on release aren't even supposed to work correctly, tons of bugs are the standard, something that's expected by default, customers aren't even meant to receive a finished product for their money. They aren't even meant to own the product or have any control over it (lend it to someone, install it on another computer, play it offline or play it when it gets retired). These games spy on people (via so called [anti-cheat](anti_cheat.md) systems), are shamelessly meant to be consumed and thrown away, purposefully incompatible ("exclusives"), [bloated](bloat.md), discriminative against low-end computers and even targeting attacks on children ("lootboxes"). Game corporations attack and take down fan modification and remakes and show all imaginable kinds of unethical behavior such as trying to steal rights for maps/mods created with the game's editor (Warcraft: Reforged).
|
||||||
|
|
||||||
|
But how can possibly a [FOSS](foss.md) program be abusive? Let's mention a few examples:
|
||||||
|
|
||||||
|
- Being a **[bloat monopoly](bloat_monopoly.md)**.
|
||||||
|
- **Allowing [maintenance](maintenance.md) cost to be high** and prioritizing e.g. [features](feature_creep.md) leads to program being expensive to maintain which discriminizes against developers unable to pay this maintenance cost. If a rich corporation intentionally makes their program bloated and expensive to just maintain, it ensures no one poor will be able to fork the software and maintain it, which effectively removes the possibility of an ethical competition being made our of their "open source" program.
|
||||||
|
- **[Bloat](bloat.md), intentional [obscurity](obscurity.md) and [update_culture](update_culture.md) may lead to de-facto (as opposed to de-jure) limitations of basic [freedom conditions](free_software.md), despite a free license**. Specifically freedom 1 (to study the software, which may be unnecessarily difficult and **expensive**) and 2 (to modify the software, which requires its understanding, unnecessarily high cost of dealing with bad code and the ability to compile it which may be non-trivial). Therefore a company may, on paper, provide the rights to study and modify their program, but keep the actual know-how of the program's working and modification private, de-facto becoming the program's owner and sole controlling entity.
|
||||||
|
- **Allowing [proprietary](proprietary.md) [dependencies](dependency.md)**, especiall in [open source](open_source.md). While free software usually avoids this, open source if happy with e.g. Windows-only programs which of course requires the users to run abusive code in order for the program to function.
|
||||||
|
- **Unnecessarily high [hardware](hardware.md) demands and dropping support for old hardware** which drives [consumerism](consumerism.md) and discriminates against poor people and people who just don't want to "consoom" hardware. A group can make "open source" software that intentionally requires the latest hardware that they just happen to sell (e.g. [gaymes](game.md) with "AAA graphics"), even if the software might in theory run on older hardware. Possible "fixes" of this by third parties can be prevented by the above mentioned techniques.
|
||||||
|
- **Allowing [bloat](bloat.md) to increase the risk of security vulnerabilities and bugs** (which may in some ares be fatal and lead to literal deaths).
|
||||||
|
- **Obscurity may be used to successfully hide malicious features even withing publicly accessible code**. {TODO: examples. ~drummyfish}
|
||||||
|
- **Introducing dangerous dependencies**: for example a fully free software may be unnecessarily designed as [cloud](cloud.md) software which increases the risk of its non functionality e.g. in cases of Internet blackouts (or just any loss of connection).
|
||||||
|
- **Licenses can by bypassed**, e.g. [copyleft](copyleft.md) was legally eliminated by [Google](google.md)'s [Android](android.md) which is based on copylefted [Linux](linux.md): their proprietary Play Store is a 3rd party program to which the copyleft doesn't apply but which is essential for Android and serves to control Android (which should have been prevented by the copyleft).This is an example of a FOSS "protection mechanism" failing under capitalist pressure.
|
||||||
|
- Setting up a **discriminatory, fascist and toxic development environment**, e.g. in the form of [codes of conduct](coc.md). This allows to bully and "cancel" developers who are, for whatever reason, unwelcome.
|
||||||
|
|
||||||
|
The essential issue of capitalist software is in its goal: profit. This doesn't have to mean making money directly, profit can also mean e.g. gaining popularity and political power. This goal goes before and eventually against goals such as helping and respecting the users. A free license is a mere obstacle on the way towards this goal, an obstacle that may for a while slow down corporation from abusing the users, but which will eventually be overcome just by the sheer power of the market environment which works on the principles of Darwinian evolution: those who make most profit, by any way, survive and thrive.
|
||||||
|
|
||||||
|
Therefore "fixing" capitalist software is only possible via redefinition of the basic goal to just developing selfless software that's good for the people (as opposed to making software for profit). This approach requires eliminating or just greatly limiting capitalism itself, at least from the area of technology. We need to find other ways than profit to motivate development of software and yes, other ways do exist (morality, social status, fun etc.).
|
19
cathedral.md
Normal file
19
cathedral.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Cathedral
|
||||||
|
|
||||||
|
Welcome to the cathedral. Here we mourn the death of [technology](technology.md) by the hand of [capitalism](capitalism.md).
|
||||||
|
|
||||||
|
{ Sometimes we are very depressed from what's going on in this world, how technology is raped and used by living beings against each other. Seeing on a daily basis the atrocities done to the art we love and the atrocities done by it -- it is like watching a living being die. Sometimes it can help to just know you are not alone. ~drummyfish }
|
||||||
|
|
||||||
|
```
|
||||||
|
R. I. P.
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
TECHNOLOGY
|
||||||
|
|
||||||
|
long time ago - now
|
||||||
|
|
||||||
|
Here lies technology who was
|
||||||
|
helping people tremendously until
|
||||||
|
its last breath. It was killed by
|
||||||
|
capitalism.
|
||||||
|
```
|
25
cc0.md
Normal file
25
cc0.md
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
# CC0
|
||||||
|
|
||||||
|
CC0 is a [waiver](waiver.md) (similar to a [license](license.md)) of [copyright](copyright.md), created by [Creative Commons](creative_commons.md), that can be used to dedicate one's work to the [public domain](public_domain.md) (kind of).
|
||||||
|
|
||||||
|
Unlike a license, a waiver such as this *removes* (at least effectively) the author's copyright; by using CC0 the author willingly gives up his own copyright so that the work will no longer be owned by anyone (while a license preserves the author's copyright while granting some rights to other people). It's therefore the most [free](free_software.md) and [permissive](permissive.md) option for releasing intellectual works. CC0 is designed in a pretty sophisticated way, it also waives "neighboring rights" ([moral rights](moral_rights.md)), and also contains a fallback license in case waiving copyright isn't possible in a certain country. For this CC0 is one of the best ways, if not the best, of truly and completely dedicating works to public domain world-wide (well, at least in terms of copyright). In this world of extremely fucked up [intellectual property](intellectual_property.md) laws it is not enough to state "my work is public domain" -- you need to use something like CC0 to achieve legally valid public domain status.
|
||||||
|
|
||||||
|
CC0 is recommended by [LRS](lrs.md) for both programs and other art -- however for programs additional waivers of [patents](patent.md) should be added as CC0 doesn't deal with patents. CC0 is endorsed by the [FSF](fsf.md) but not [OSI](osi.md) (who rejected it because it explicitly states that trademarks and patents are NOT waived).
|
||||||
|
|
||||||
|
## Things Under CC0
|
||||||
|
|
||||||
|
Here are some things and places with CC0 materials that you can use in your projects so that you can release them under CC0 as well. **BEWARE**: if you find something under CC0, do verify it's actually valid, normies often don't know what CC0 means and happily post derivative works of proprietary stuff under CC0.
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
- software:
|
||||||
|
- much of [LRS](lrs.md) sofware: [Anarch](anarch.md), [small3dlib](small3dlib.md), [raycastlib](raycastlib.md), [SAF](saf.md), ...
|
||||||
|
- other assets:
|
||||||
|
- many things on [Wikimedia Commons](wikimedia_commons.md)
|
||||||
|
- many things on opengameart
|
||||||
|
- many things on BlendSwap
|
||||||
|
- all of [drummyfish's](drummyfish.md) stuff including fonts, textures, 3D models etc.
|
||||||
|
- [librivox](librivox.md) creates CC0 audiobooks from old books
|
||||||
|
- text:
|
||||||
|
- [Esolang Wiki](esolang.md)
|
||||||
|
- OSdev Wiki [since 2011](https://wiki.osdev.org/OSDev_Wiki:Copyrights)
|
19
chaos.md
Normal file
19
chaos.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Chaos
|
||||||
|
|
||||||
|
In [mathematics](math.md) chaos is a phenomenon that makes it extremely difficult to predict, even approximately, the result of some process even if we completely know how the process works and what state it starts in. In more technical terms chaos is a property of a [nonlinear](nonlinear.md) [deterministic](determinism.md) [system](system.md) in which even a very small change in input creates a great change in the output, i.e. the system is very sensitive to [initial conditions](initial_condition.md). Chaos is a topic studied by the field called **chaos theory** and is important in all [science](science.md). In [computer science](compsci.md) it is important for example for the generation of [pseudorandom](pseudorandom.md) numbers or in [cryptography](cryptography.md). Every programmer should be familiar with the existence of chaotic behavior because in mathematics (programming) it emerges very often, it may pose a problem but, of course, it may be taken advantage of as well.
|
||||||
|
|
||||||
|
Perhaps the most important point is that a chaotic system is difficult to predict NOT because of [randomness](randomness.md), lack of information about it or even its incomprehensible complexity (many chaotic systems are defined extremely simply), but because of its inherent structure that greatly amplifies any slight nudge to the system and gives any such nudge a great significance. This may be caused by things such as [feedback loops](feedback_loop.md) and [domino effects](domino_effect.md). Generally we describe this behavior as so called **[butterfly effect](butterfly_effect.md)** -- we liken this to the fact that a butterfly flapping its wings somewhere in a forest can trigger a sequence of events that may lead to causing a tornado in a distant city a few days later.
|
||||||
|
|
||||||
|
Examples of chaotic systems are the double pendulum, weather (which is why it is so difficult to predict it), dice roll, [rule 30](rule_30.md) cellular automaton, [logistic map](logistic_map.md), gravitational interaction of [N bodies](n_body.md) or [Lorenz differential equations](lorenz_system.md). [Langton's ant](langtons_ant.md) sometimes behaves chaotically. Another example may be e.g. a billiard table with multiple balls: if we hit one of the balls with enough strength, it'll shoot and bounce off of walls and other balls, setting them into motion and so on until all balls come to stop in a specific position. If we hit the ball with exactly the same strength but from an angle differing just by 1 degree, the final position would probably end up being completely different. Despite the system being deterministic (governed by exact and predictable laws of motion, neglecting things like quantum physics) a slight difference in input causes a great different in output.
|
||||||
|
|
||||||
|
A simple example of a chaotic equation is also the function *sin(1/x)* for *x* near 0 where it oscillates so quickly that just a tiny shift along the *x* axis drastically changes the result. See how unpredictable results a variant of the function can give:
|
||||||
|
|
||||||
|
| *x* | *1000 * sin(10^9 / x)* |
|
||||||
|
|-------|------------------------|
|
||||||
|
| 4.001 | 455,... |
|
||||||
|
| 4.002 | 818,... |
|
||||||
|
| 4.003 | -511,... |
|
||||||
|
| 4.004 | -974,... |
|
||||||
|
| 4.005 | -335,... |
|
||||||
|
|
||||||
|
|
85
chess.md
Normal file
85
chess.md
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
# Chess
|
||||||
|
|
||||||
|
Chess is an old two-player board [game](game.md), perhaps most famous and popular among all board games in history. It is a complete information game that simulates a battle of two armies on a 64x64 board with different battle pieces. Chess has a world-wide competitive community and is considered an intellectual sport but is also a topic of active research (chess is unlikely to be ever solved due to its non-trivial rules combined with enormous state space, Shannon estimated the number of possible games at 10^120) and programming (many chess engines, [AI](ai.md)s and frontends are being actively developed).
|
||||||
|
|
||||||
|
{ There is a nice black and white indie movie called *Computer Chess* about chess programmers of the 1980s, it's pretty good, very oldschool, starring real programmers and chess players, check it out. ~drummyfish }
|
||||||
|
|
||||||
|
[Drummyfish](drummyfish.md) has created a suckless/[LRS](lrs.md) chess library [smallchesslib](smallchesslib.md) which includes a simple engine called *smolchess*.
|
||||||
|
|
||||||
|
**At [LRS](lrs.md) we consider chess to be one of the best games**, if not the very best one, for the following reasons:
|
||||||
|
|
||||||
|
- It is just a greatly interesting and deep game in which luck plays minimal role.
|
||||||
|
- **It is [suckless](suckless.md)**, the rules are very simple, it can be implemented on simple 8bit computers. The game doesn't even require a computer to play and chess masters don't even need a physical board to play (they can completely visualize it in memory). In the end one can in theory just play against himself in his head, achieving ultimate freedom: the only dependency of the game is one's brain, i.e. it becomes a [brain software](brain_software.md). Chess is extremely inexpensive, doesn't discriminate against poor people and will survive even the most extreme technological [collapse](collapse.md).
|
||||||
|
- **No one owns chess**, the game is hundreds of years old and many books about it are also already in the [public domain](public_domain.md). It is extremely free.
|
||||||
|
- It is a basis for other derived games, for example many different chess variants or chess puzzles which can be considered a "singleplayer chess game".
|
||||||
|
- It is a source of many interesting [mathematical](math.md) and programming challenges.
|
||||||
|
|
||||||
|
## Chess in General
|
||||||
|
|
||||||
|
Chess evolved from ancient board games in India in about 6th century. Nowadays the game is internationally governed by **FIDE** which has taken the on role of an authority that defines the official rules: FIDE rules are considered to be the standard chess rules. FIDE also organizes tournaments, promotes the game and keeps a list of registered players whose performance it rates with so called Elo system – based on the performance it also grants titles such as **Grandmaster** (GM, strongest), **Internation Master** (IM, second strongest) or **Candidate Master** (CM).
|
||||||
|
|
||||||
|
**[Elo](elo.md) rating** is a mathematical system of numerically rating the performance of players (it is used in many sports, not just chess). Given two players with Elo rating it is possible to compute the probability of the game's outcome (e.g. white has 70% chance of winning etc.). The FIDE set the parameters so that the rating is roughly this: < 1000: beginner, 1000-2000: intermediate, 2000-3000: master. More advanced systems have also been created, namely the Glicko system.
|
||||||
|
|
||||||
|
The rules of chess are quite simple ([easy to learn, hard to master](easy_to_learn_hard_to_master.md)) and can be found anywhere on the Internet. In short, the game is played on a 64x64 board by two players: one with **white** pieces, one with **black**. Each piece has a way of moving and capturing (eliminating) enemy pieces, for example bishops move diagonally while pawns move one square forward and take diagonally. The goal is to **checkmate** the opponent's king, i.e. make the king attacked by a piece while giving him no way to escape this attack. There are also lesser known rules that noobs often miss and ignore, e.g. so called en-passant or the 50 move rule that declares a draw if there has been no significant move for 50 moves.
|
||||||
|
|
||||||
|
At the competitive level **clock** (so called *time control*) is used to give each player a limited time for making moves: with unlimited move time games would be painfully long and more a test of patience than skill. Clock can also nicely help balance unequal opponent by giving the stronger player less time to move. Based on the amount of time to move there exist several formats, most notably **correspondence** (slowest, days for a move), **classical** (slow, hours per game), **rapid** (faster, tens of minutes per game), **blitz** (fast, a few seconds per move) and **bullet** (fastest, units of seconds per move).
|
||||||
|
|
||||||
|
Currently the best player in the world is pretty clearly Magnus Carlsen from Norway with Elo rating 2800+.
|
||||||
|
|
||||||
|
During [covid](covid.md) chess has experienced a small boom among normies and [YouTube](youtube.md) chess channels have gained considerable popularity. This gave rise to [memes](meme.md) such as the bong cloud opening popularized by a top player and streamer Hikaru Nakamura; the bong cloud is an intentionally shitty opening that's supposed to taunt the opponent (it's been even played in serious tournaments lol).
|
||||||
|
|
||||||
|
## Chess and Computers
|
||||||
|
|
||||||
|
{[This](https://www.youtube.com/watch?v=DpXy041BIlA) is an absolutely amazing video about weird chess algorithms :) ~drummyfish}
|
||||||
|
|
||||||
|
Chess are a big topic in computer science and programming, computers not only help people play chess, train their skills, analyze positions and perform research of games, but they also allow mathematical analysis of chess and provide a platform for things such as [artificial intelligence](ai.md).
|
||||||
|
|
||||||
|
There is a great online Wiki focused on programming chess engines: https://www.chessprogramming.org.
|
||||||
|
|
||||||
|
Chess software is usually separated to **libraries**, **chess engines** and **frontends** (or boards). Chess engine is typically a [CLI](cli.md) program capable of playing chess but also doing other things such as evaluating arbitrary position, hinting best moves, saving and loading games etc. Frontends on the other hand are [GUI](gui.md) programs that help people interact with the underlying engine.
|
||||||
|
|
||||||
|
For communication between different engines and frontends there exist standards such as XBoard (engine [protocol](protocol.md)), UCI (another engine protocol), FEN (way of encoding a position as a string), PGN (way of encoding games as strings) etc.
|
||||||
|
|
||||||
|
Computers have already surpassed the best humans in their playing strength (we can't exactly compute an engine's Elo as it depends on hardware used, but generally the strongest would rate high above 3000 FIDE). As of 2021 the strongest chess engine is considered to be the [FOSS](foss.md) engine [Stockfish](stockfish.md), with other strong engines being e.g. Leela Chess Zero (also FOSS) or AlphaZero ([proprietary](proprietary.md), by [Google](google.md)). [GNU Chess](gnu_chess.md) is a pretty strong [free software](free_software.md) engine by [GNU](gnu.md). There are world championships for chess engines such as the *Top Chess Engine Championship* or *World Computer Chess Championship*. [CCRL](https://ccrl.chessdom.com/ccrl/4040/) is a list of chess engines along with their Elo ratings. Despite the immense strength of modern engines, there are still very specific situation in which humans beat the computer (shown e.g. in [this](https://www.youtube.com/watch?v=R9IZWgArWUE) video).
|
||||||
|
|
||||||
|
The first chess computer that beat the world champion (at the time Gary Kasparov) was famously [Deep Blue](deep_blue.md) in 1997. [Alan Turing](turing.md) himself has written a chess playing algorithm but at his time there were no computers to run it, so he executed it by hand -- nowadays the algorithm has been implemented on computers (there are bots playing this algorithm e.g. on lichess).
|
||||||
|
|
||||||
|
For online chess there exist many servers such as https://chess.com or https://chess24.com, but for us the most important is https://lichess.org which is gratis and uses [FOSS](foss.md) (it also allows users to run bots under special accounts which is an amazing way of testing engines against people and other engines). These servers rate players with Elo/Glicko, allow them to play with each other or against computer, solve puzzles, analyze games, play chess variants, explore opening databases etc.
|
||||||
|
|
||||||
|
Playing strength is not the only possible measure of chess engine quality, of course -- for example there are people who try to make the **smallest chess programs** (see [countercomplex](countercomplex.md) and [golfing](golf.md)). As of 2022 the leading programmer of smallest chess programs seems to be Óscar Toledo G. (https://nanochess.org/chess.html). Unfortunately his programs are [proprietary](proprietary.md), even though their source code is public. The programs include Toledo Atomchess (392 [x86](x86.md) instructions), Toledo Nanochess (world's smallest [C](c.md) chess program, 1257 non-blank C characters) and Toledo Javascript chess (world's smallest [Javascript](javascript.md) chess program). He won the [IOCCC](ioccc.md). Another small chess program is micro-Max by H. G. Muller (https://home.hccnet.nl/h.g.muller/max-src2.html, 1433 C characters, Toledo claims it is weaker than his program).
|
||||||
|
|
||||||
|
{ Nanochess is actually pretty strong, in my testing it easily beat [smallchesslib](smallchesslib.md) Q_Q ~drummyfish }
|
||||||
|
|
||||||
|
## Variants
|
||||||
|
|
||||||
|
Besides similar games such as [shogi](shogi.md) there are many variants of chess, i.e. slight modifications of rules, foremost worth mentioning is for example chess 960. The following is a list of some variants:
|
||||||
|
|
||||||
|
- **antichess**: The goal is to lose all pieces or get stalemated, rules are a bit changed, e.g. castling and checks are removed and taking is forced.
|
||||||
|
- **chess 960** aka **Fisher's random**: Starting position is randomly modified by shuffling the non-pawn rows (with these rules: king must be between rooks, bishops on opposite colors and black/white's positions are mirrored). The rules are the same with a slight modification to castling. This was invented by Bobby Fisher to emphasize pure chess skill as opposed to memorizing the best opening moves, he saw the opening theory as harmful to chess. Chess 960 is nowadays even advocated by some to become the "main" version of chess.
|
||||||
|
- **[chess boxing](chess_boxing.md)**: Chess combined with box, players switch between the two games, one wins either by checkmate or knockout.
|
||||||
|
- **different pieces**: Some variants use different pieces, e.g. empress (moves like rook and knight) or amazon (queen/knight).
|
||||||
|
- **fog of war**: Makes chess an incomplete-information game by allowing players to only see squares they can immediately move to (this is similarly to some strategy video games).
|
||||||
|
- **horde chess**: Asymmetric starting position: large number of black pawns vs a white army of traditional pieces. Rules are slightly modified, e.g. black can only be defeated by having all pawns captured (there is no black king).
|
||||||
|
- **infinite chess**: Infinite chessboard.
|
||||||
|
- **minichess**: Smaller chessboard, e.g. 4x4, 4x8 etc. Some are already solved (e.g. 3x3).
|
||||||
|
- **more players**: E.g. 3 man chess or 4 player chess allow more than two players to play, some use different boards.
|
||||||
|
- **old chess**: The rules of chess itself have been changing over time (e.g. adding the 50 move rule etc.). The older rule sets can be seen as variants as well.
|
||||||
|
- **puzzle**: For single player, chess positions are presented and the player has to find the best move or sequence of moves.
|
||||||
|
- **racing kings**: The starting position has both players on the same side, the goal is to get one's king to the other side first.
|
||||||
|
- **3D chess**: [3D](3d.md) generalization of chess.
|
||||||
|
|
||||||
|
## Programming Chess
|
||||||
|
|
||||||
|
Programming chess is a [fun](fun.md) and enriching experience and is therefore recommended as a good exercise. There is nothing more satisfying than writing a custom chess engine and then watching it play on its own.
|
||||||
|
|
||||||
|
The core of chess programming is writing the [AI](ai.md), everything else, i.e. implementing the rules, communication protocols etc., is pretty straightforward (but still a good programming exercise). Nevertheless one has to pay a great attention to eliminating as many bugs as possible; really, the importance of writing automatic tests can't be stressed enough as debugging the AI will be hard enough and can become unmanageable with small bugs creeping in.
|
||||||
|
|
||||||
|
The AI itself works in almost all cases on the same principle: firstly we implement so called static **evaluation function** -- a function that takes a chess position and outputs its evaluation number which say how good the position is for white vs black (positive number favoring white, negative black). This function considers a number of factors such as total material of both players, pawn structure, king safety, piece mobility and so on (in new engines this function is often a learned [neural network](neural_network.md), but it may very well be written by hand). Secondly we implement a **search** algorithm -- typically some modification of [minimax](minimax.md) algorithm -- that recursively searches the game tree and looks for a move that will lead to the best result, i.e. to position for which the evaluation function gives the best value. This basic principle, especially the search part, gets very complex as there are many possible weaknesses and optimizations.
|
||||||
|
|
||||||
|
Exhaustively searching the tree to great depths is not possible due to astronomical numbers of possible move combinations, so the engine has to limit the depth quite greatly. Normally it will search all moves to a small depth (e.g. 2 or 3 half moves or *plys*) and then extend the search for interesting moves such as exchanges or checks. Maybe the greatest danger of searching algorithms is so called **horizon effect** which has to be addressed somehow (e.g. by detecting quiet positions, so called *quiescence*). If not addressed, the horizon effect will make an engine misevaluate certain moves by stopping the evaluation at certain depth even if the played out situation would continue and lead to a vastly different result (imagine e.g. a queen taking a pawn which is guarded by another pawn; if the engine stops evaluating after the pawn take, it will think it's a won pawn, when in fact it's a lost queen). There are also many techniques for reducing the number of searched tree nodes and speeding up the search, for example pruning methods such as **alpha-beta** (which subsequently works best with correctly ordering moves to search), or **transposition tables** (remembering already evaluated position so that they don't have to be evaluated again when encountered by a different path in the tree).
|
||||||
|
|
||||||
|
Many other aspects come into the AI design such as opening books (databases of best opening moves), endgame tablebases (databases of winning moves in simple endgames), heuristics in search, clock management, pondering (thinking on opponent's move), learning from played games etc. For details see the above linked chess programming wiki.
|
||||||
|
|
||||||
|
## Rules
|
||||||
|
|
||||||
|
TODO
|
7
coc.md
Normal file
7
coc.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Code of Conduct
|
||||||
|
|
||||||
|
Code of conduct (COC) is a shitty invention of [SJW](sjw.md) fascists that dictates how development of specific software should be conducted, generally pushing toxic woke concepts such as forced inclusivity or use of politically correct language. COC is typically placed in the software repository as a `CODE_OF_CONDUCT` file. In practice COCs are used to kick people out of development because of their political opinions expressed anywhere, inside or outside the project, and to push political opinions through software projects.
|
||||||
|
|
||||||
|
**[LRS](lrs.md) must never include any COC**, with possible exceptions of anti-COC (such as NO COC) or parody style COCs, not because we dislike genuine inclusivity, but because we believe COCs are bullshit and mostly harmful as they support bullying, censorship and exclusion of people.
|
||||||
|
|
||||||
|
Anyway it's best to avoid any kind of COC file in the repository, it just takes up space and doesn't serve anything. We may simply ignore this shitty concept completely. You may argue why we don't ignore e.g. [copyright](copyright.md) in the same way and just not use any [licenses](license.md)? The situation with copyright is different: it exists by default, without a license file the code is proprietary and our neighbors don't have the legal safety to execute basic freedoms, they may be bullied by the state -- for this we are forced to include a license file to get rid of copyright. With COC there simply isn't any such implicit issues to be solved (because COCs are simply inventing their own issues), so we just don't try to solve non-issues.
|
6
coding.md
Normal file
6
coding.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Coding
|
||||||
|
|
||||||
|
Coding nowadays means low quality attempt at [programming](programming.md), usually practiced by [soydevs](soydev.md) and barely qualified coding monkeys.
|
||||||
|
|
||||||
|
Traditionally it means encoding and decoding of information as in e.g. video coding -- this is the only non-gay meaning of the word
|
||||||
|
|
17
collapse.md
Normal file
17
collapse.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Collapse
|
||||||
|
|
||||||
|
Collapse of our civilization is a concerning scenario in which basic structures of society relatively rapidly fall apart and cause world-wide horrors such as chaos, [wars](war.md), famine and loss of advanced technology. It is something that's very likely coming very soon: we are especially focusing on a very probable **technological collapse** (caused by badly designed technology as well as its wrong application and extreme overuse causing a dangerous dependence) but of course clues point to it coming from many directions (ecological, economical, political, natural disasters such as a coronal mass ejection etc.). Recently there has even appeared a specific term *collapsology* referring to the study of the potential collapse.
|
||||||
|
|
||||||
|
There is a [reddit](reddit.md) community for discussing the collapse at https://reddit.net/r/collapse. [WikiWikiWeb](wikiwikiweb.md) has a related discussion under *ExtinctionOfHumanity*.
|
||||||
|
|
||||||
|
In technological world a lot of people are concerned with the collapse, notable the [collapse OS](collapse_os.md), an operating system meant to run on simple [hardware](hw.md) after the technological supply chain collapses and renders development of modern computers impossible. They believe the collapse will happen before 2030. The chip shortage and energy crisis of 2020s are one of the first warnings and shows how fragile the systems really is.
|
||||||
|
|
||||||
|
[Ted Kaczynski](ted_kaczynski.md), a famous primitivist murderer, has seen the collapse as a possible option. People like [Luke Smith](luke_smith.md) advocate (and practice) simple, independent off-grid living, besides other reasons in order to be prepared for such an eventuality as a collapse. Even [proprietary](proprietary.md) normies such as [Jonathan Blow](jonathan_blow.md) warn of a coming disaster (in his talk *Preventing the Collapse of Civilization*). [Viznut](viznut.md) is another programmer warning about the collapse.
|
||||||
|
|
||||||
|
The details of the collapse cannot of course be predicted exactly -- it may come is an quick, violent form (e.g. in case of a disaster causing a blackout) or as a more agonizing slow death. CollapseOS site talks about two stages of the slow collapse: the first one after the collapse of the supply chain. i.e. when the production of modern computers halts, and the second (decades after) when the last modern computer stops working.
|
||||||
|
|
||||||
|
{ I've read a book called Blackout by Marc Elsberg whose story revolves around a large collapse of power supply in Europe. It goes into details on what the consequences would likely be. It's a nice read on the topic. ~drummyfish }
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [capitalist singularity](capitalist_singularity.md)
|
7
collision.md
Normal file
7
collision.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Collision
|
||||||
|
|
||||||
|
Collision happens when two or more things want to occupy the same spot. This situation usually needs to be addressed somehow; then we talk about **collision resolution**. In [programming](programming.md) there are different types of collisions, for example:
|
||||||
|
|
||||||
|
- **[hash](hash.md) collision**: When two items produce the same hash, they will map to the same index in a [hash table](hash_table.md). Typical solution is to have a [list](list.md) at each table index so that multiple items can fit there.
|
||||||
|
- **collision of bodies in a [physics engine](physics_engine.md)**: See [collision_detection](collision_detection.md). These collision are resolved by separating the bodies and updating their velocities so that they "bounce off" as in [real life](irl.md).
|
||||||
|
- **request collision**: General situation in which multiple clients request access to something that can be used only by one client at a time, e.g. a communication [bus](bus.md). Resolution is usually done by some kind of [arbiter](arbiter.md) who decides, by whatever algorithm, who to grant the access to.
|
21
collision_detection.md
Normal file
21
collision_detection.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# Collision Detection
|
||||||
|
|
||||||
|
Collision detection is an essential problem e.g. of simulating physics of mechanical bodies in [physics engines](physics_engine.md) (but also elsewhere), it tries to detect whether (and also how) geometric shapes overlap. Here we'll be talking about the collision detection in physics engine, but the problem appear in other contexts too (e.g. [frustum culling](frustum_culling.md) in [computer graphics](graphics.md)). Collision detection potentially leads to so called *collision resolution*, a different stage that tries to deal with the detected collision (separate the bodies, update their velocities, make them "bounce off"). Physics engines are mostly divided into 2D and 3D ones so we also normally either talk about 2D or 3D collision detection (3D being, of course, a bit more complex).
|
||||||
|
|
||||||
|
There are two main types of collision detection:
|
||||||
|
|
||||||
|
- **[discrete](discrete.md)**: Detecting collisions only at discrete points in time (each engine tick or "frame") -- this is easier but can result in detecting the collisions in wrong ways or missing them completely (imagine a fast flying object that in one moment is wholly in front of a wall and at the next instant wholly behind it). Nevertheless this is completely usable, one just has to be careful enough about the extreme cases.
|
||||||
|
- **[continuous](continuous.md)**: Detecting collisions considering the continuous motion of the bodies (still done at discrete ticks but [analytically](analytical.md) considering the whole motion since the last tick) -- this is more difficult to program and more costly to compute, but also correctly detects collisions even in extreme cases. Sometimes engines perform discrete detection by default and use continuous detection in special cases (e.g. when speeds become very high or in other error-prone situations). Continuous detection can be imagined as a collision detection of a higher dimensional bodies where the added dimension is time -- e.g. detecting collisions of 2D spheres becomes detecting collisions of "tubes" in 3D space. If you don't want to go all the way to implementing continuous collisions, you may consider an in-between solution by detecting collisions in smaller steps (which may also be done only sometimes, e.g. only for high speed bodies or only when an actual discrete collision is detected).
|
||||||
|
|
||||||
|
Collision detection is non-trivial because we need to detect not only the presence of the collision but also its parameters which are typically the exact **point of collision, collision depth and collision [normal](normal.md)** -- these are needed for subsequently resolving the collision (typically the bodies will be shifted along the normal by the collision depth to become separated and [impulses](impulse.md) will be applied at the collision point to update their velocities). We also need to detect **general cases**, i.e. collisions of whole volumes (imagine e.g. a tiny cuboid inside an arbitrarily rotated bigger cone). This is very hard and/or expensive for some complex shapes such as general 3D triangle meshes (which is why we approximate them with simpler shapes). We also want the detection algorithm to be at least reasonably **fast** -- for this reason collision detection mostly happens in two phases:
|
||||||
|
|
||||||
|
- **broad phase**: Quickly estimates which bodies MAY collide, usually with [bounding volumes](bounding_volume.md) (such as spheres or [axis aligned bounding boxes](aabb.md)) or space indexing and algorithms such as *[sweep and prune](sweep_and_prune.md)*. This phase quickly opts-out of checking collision of objects that definitely CANNOT collide because they're e.g. too far away.
|
||||||
|
- **narrow phase**: Applying the precise, expensive collision detection on the potentially colliding pairs of bodies determined in the broad phase. This yields the real collisions.
|
||||||
|
|
||||||
|
In many cases it is also important to correctly detect the **order of collisions** -- it may well happen a body collides not with one but with multiple bodies at the time of collision detection and the computed behavior may vary widely depending on the order in which we consider them. Imagine that body *A* is colliding with body *B* and body *C* at the same time; in [real life](real_life.md) *A* may have first collided with *B* and be deflected so that it never hits *C*, or the other way around, or it might have collided with both. In continuous collision detection we know the order as we also have exact time coordinate of each collision (even though the detection itself is still computed at discrete time steps), i.e. we know which one happened first. With discrete collisions we may use [heuristics](heuristic.md) such as the direction in which the bodies are moving, but this may fail in certain cases (considering e.g. rotations).
|
||||||
|
|
||||||
|
**On shapes**: general rule is that **mathematically simpler shapes are better for collision detection**. Spheres (or circles in 2D) are the best, they are stupidly simple -- a collision of two spheres is simply decided by their [distance](distance.md) (i.e. whether the distance of their center points is less that the sum of the radia of the spheres), which also determines the collision depth, and the collision normal is always aligned with the vector pointing from one sphere center to the other. So **if you can, use spheres** -- it is even worth using multiple spheres to approximate more complex shapes if possible. [Capsules](capsule.md) ("extruded spheres"), infinite planes, half-planes, infinite cylinders (distance from a line) and axis-aligned boxes are also pretty simple. Cylinders and cuboids with arbitrary rotation are bit harder. Triangle meshes (the shape most commonly used for real-time 3D models) are very difficult but may be [approximated](approximation.md) e.g. by a [convex hull](convex_hull.md) which is manageable (a convex hull is an intersection of a number of half-spaces) -- if we really want to precisely collide full 3D meshes, we may split each one into several convex hulls (but we need to write the non-trivial splitting algorithm of course). Also note that you need to write a detection algorithm for any possible pair of shape types you want to support, so for *N* supported shapes you'll need *N * (N + 1) / 2* detection algorithms.
|
||||||
|
|
||||||
|
{ In theory we may in some cases also think about using iterative/numerical methods to find collisions, i.e. starting at some point between the bodies and somehow stepping towards their intersection until we're close enough. Another ideas I had was to use [signed distance functions](sdf.md) for representing static environments, it could have some nice advantages. But I'm really not sure how well or whether it would really work. ~drummyfish }
|
||||||
|
|
||||||
|
TODO: some actual algorithms
|
17
comment.md
Normal file
17
comment.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Comment
|
||||||
|
|
||||||
|
Comment is part of computer code that doesn't affect how the code is interpreted by the computer and is intended to hold information for humans (even though comments can sometimes contain additional information for computers such as metadata and autodocumentation information). There are comments in basically all [programming languages](programming_language.md), they usually start with `//`, `#`, `/*` and similar symbols.
|
||||||
|
|
||||||
|
**You should comment you source code.** General tips on commenting:
|
||||||
|
|
||||||
|
- ALWAYS put a **global file comment** at the top of a file to make it [self-contained](self_contained.md). It should include:
|
||||||
|
- **Description of what the file actually does.** This is extremely important for [readability](readability.md), documentation and quick orientation. If a new programmer comes looking for a specific part of the code, he may waste hours on searching the wrong files just because the idiotic author couldn't be bothered to include fucking three sentences at the start of the file. [Modern](modern.md) program just don't fucking do this anymore, this is just [shit](shit.md).
|
||||||
|
- [License](license.md)/[waiver](waiver.md), either full text or link. Even if your repo contains a global license (which it should), it's good for the file to carry the license because the file may just be copy pasted on its own into some other project and then it will appear as having no license.
|
||||||
|
- **Name/nick of the author(s)** and roughly the date of creation (year is enough). This firstly helps legally assess [copyright](copyright.md) (who and for how long holds the copyright) and secondly helps others contact the author in case of encountering something weird in the code.
|
||||||
|
- Comment specific blocks of code with **keywords** -- this will help searching the code with tools like [grep](grep.md). E.g. in game's code add comment `// player: shoot, fire` to the part of code that handles player's shooting so that someone searching for any one of these two words will be directed here.
|
||||||
|
- All functions (maybe with exceptions of trivial one-liners) should come with a comment documenting:
|
||||||
|
- **Behavior** of the function, what it does and also how it does that (Is the function slow? Is it safe? Does it perform checks of arguments? Does it have [side effects](side_effect.md)? ...).
|
||||||
|
- **Meaning of all arguments** and if needed their possible values.
|
||||||
|
- **Return value meaning**.
|
||||||
|
- You may decide to use comment format of some [autodoc](autodoc.md) system such as [doxygen](doxygen.md) -- it costs nothing and helps firstly unify the style of your comments and secondly, obviously, generate automatic documentation of your code, as well as possibly automatically process it in other ways.
|
||||||
|
- TODO: moar
|
22
compsci.md
Normal file
22
compsci.md
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Computer Science
|
||||||
|
|
||||||
|
Computer science, abbreviated as "compsci", is (surprise-surprise) a [science](science.md) studying [computers](computer.md). The term is pretty wide, a lot of it covers very formal and theoretical areas that neighbor and overlap with [mathematics](marh.md), such as [formal languages](formal_language.md), [cryptography](cryptography.md) and [machine learning](machine_learning.md), but also more practical/applied and "softer" disciplines such as [software_engineering](software_engineering.md), [programming](programming.md) [hardware](hardware.md), computer networks or even [user interface](ui.md) design. This science deals with such things as [algorithms](algorithm.md), [data structures](data_structure.md), [artificial intelligence](ai.md) and [information](information.md) theory. The field has become quite popular and rapidly growing after the coming of the 21st century computer/[Internet](internet.md) revolution and it has also become quite spoiled and abused by its sudden lucrativity.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Notable fields of computer science include:
|
||||||
|
|
||||||
|
- [artificial intelligence](ai.md)
|
||||||
|
- [computer graphics](graphics.md)
|
||||||
|
- [databases](database.md)
|
||||||
|
- [hardware](hardware.md) design
|
||||||
|
- [networking](network.md)
|
||||||
|
- [security](security.md) and [cryptography](cryptography.md)
|
||||||
|
- [software engineering](software_engineering.md)
|
||||||
|
- theoretical computer science
|
||||||
|
- [user interface](ui.md)
|
||||||
|
- smaller field or subfields such as [operating systems](os.md), [compiler](compiler.md) design, formal verification, speech recognition etc.
|
||||||
|
|
||||||
|
Computer science also figures in interdisciplinary endeavors such as [bioinformatics](bioinformatics.md) and [robotics](robotics.md).
|
||||||
|
|
||||||
|
In the industry there have arisen fields of [art](art.md) and study that probably shouldn't be included in computer science itself, but are very close to it. These may include e.g. [web design](webdesign.md) (well, let's include it for the sake of completeness), [game](game.md) design, [system administration](sysadmin.md) etc.
|
32
computer.md
Normal file
32
computer.md
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# Computer
|
||||||
|
|
||||||
|
The word *computer* can be defined in many ways and can also take many different meanings; a somewhat common definition may be this: computer is a machine that automatically performs mathematical computations. We can also see it as a machine for processing information or, very generally, as any tool that helps computation, in which case one's fingers or even a [mathematical](math.md) formula itself can be considered a computer. Here we are of course mostly concerned with electronic [digital](digital.md) computers.
|
||||||
|
|
||||||
|
We can divide computers based on many attributes, e.g.:
|
||||||
|
|
||||||
|
- by **representation of data**: [digital](digital.md) vs [analog](analog.md)
|
||||||
|
- by **[hardware](hw.md) technology**: [electronic](electronics.md), [mechanical](mechanical.md), [quantum](quantum.md), biological etc.
|
||||||
|
- by **purpose**: special purpose vs general purpose, [personal](pc.md), [embedded](embedded.md), [supercomputers](supercomputer.md) etc.
|
||||||
|
- by **[programmability](programming.md)**: non-programmable, partially or fully programmable
|
||||||
|
- by **other criteria**: conventional vs [quantum computers](quantum.md), gaming computers etc.
|
||||||
|
|
||||||
|
Computers are studied by [computer science](compsci.md). The kind of computer we normally talk about consists of two main parts:
|
||||||
|
|
||||||
|
- **[hardware](hw.md)**: physical parts
|
||||||
|
- **[software](sw.md)**: [programs](program.md), made by [programmers](programmer.md)
|
||||||
|
|
||||||
|
The power of computers is limited, [Alan Turing](turing.md) mathematically proved that there exist problems that can never be completely solved by any [algorithm](algorithm.md), i.e. there are problems a computer (including our [brain](brain.md)) will never be able to solve (even if solution exists). He also invented the theoretical model of a computer called the [Turing machine](turing_machine.md). Besides the mentioned theoretical limitation, many solvable problems may take too long to compute, at least with computers we currently know (see [computational complexity](computational_complexity.md) and [P vs NP](p_vs_np.md)).
|
||||||
|
|
||||||
|
## Typical Computer
|
||||||
|
|
||||||
|
Computers we normally talk about are [electronic](electronics.md) [digital](digital.md) mostly personal computers such as [desktops](desktop.md) and [laptops](laptop.md), possibly also [cell phones](phone.md), [tablets](tablet.md) etc.
|
||||||
|
|
||||||
|
Such a computer consists of some kind of [case](case.md) (chassis), internal [hardware](hardware.md) plus [peripheral devices](peripheral.md) that serve for [input and output](io.md) -- these are for example a [keyboard](keyboard.md) and [mouse](mouse.md) (input devices), a [monitor](monitor.md) (output device) or [harddisk](hdd.md) (input/output device). The internals of the computer normally include:
|
||||||
|
|
||||||
|
- **[motherboard](motherboard.md)**: The main electronic circuit of the computer into which other components are plugged and which creates the network and interfaces that interconnect them (a [chipset](chipset.md)). It contains slots for expansion cards as well as connectors for external devices, e.g. [USB](usb.md). In a small memory on the board there is the most basic software ([firmaware](firmware.md)), such as [BIOS](bios.md), to e.g. enable installation of other software. The board also carries the [clock](clock.md) generator for synchronization of all hardware, heat sensors etc.
|
||||||
|
- **[CPU](cpu.md)** (central processing unit): Core of the computer, the chip plugged into motherboard that performs general calculations and which runs [programs](program.md), i.e. [software](sw.md).
|
||||||
|
- **[RAM](ram.md)/working memory**: Lower capacity volatile (temporary, erased when powered off) working memory of the computer, plugged into motherboard. It is used as a "pen and paper" by the CPU when performing calculations.
|
||||||
|
- **[disk](disk.md)**: [Non-volatile](volatile.md) (persisting when powered off) large capacity memory for storing [files](file.md) and other [data](data.md), connected to the motherboard via some kind of [bus](bus.md). Different types of disks exist, most commonly [hard disks](hdd.md) and [SSDs](ssd.md).
|
||||||
|
- **expansion cards ([GPU](gpu.md), sound card, network card, ...)**: Additional hardware cards plugged into motherboard for either enabling or accelerating specific functionality (e.g. GPU for graphics etc.).
|
||||||
|
- **[PSU](psu.md)** (power supply unit): Converts the input electrical power from the plug to the electrical power needed by the computer.
|
||||||
|
- other things like fans for [cooling](cooling.md), batteries in laptops etc.
|
18
copyleft.md
Normal file
18
copyleft.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Copyleft
|
||||||
|
|
||||||
|
Copyleft (also share-alike) is a concept of sharing something on the condition that others will share it under the same terms; this is practically always used by a subset of [free (as in freedom) software](free_software.md) to legally ensure this software and its modifications will always remain free. This kind of [hacks](hack.md) [copyright](copyright.md) to de-facto remove copyright by its own power.
|
||||||
|
|
||||||
|
Copyleft has been by its mechanisms likened to a virus because once it is applied to certain software, it "infects" it and will force its conditions on any descendants of that software, i.e. it will spread itself (in this case the word virus does not bear a negative connotation, at least to some, they see it as a good virus).
|
||||||
|
|
||||||
|
For free/open-source software the alternative to copyleft is so called **permissive** licensing which (same as with copyleft) grants all the necessary freedom rights, but does NOT require modified versions to grant these rights as well. This allows free software being forked and developed into [proprietary](proprietary.md) software and is what copyleft proponents criticize.
|
||||||
|
|
||||||
|
In the [FOSS](foss.md) world there is a huge battle between the copyleft camp and permissive camp ([LRS](lrs.md) advocates permissive licenses with a preference for 100% [public domain](public_domain.md)).
|
||||||
|
|
||||||
|
## Issues With Copyleft
|
||||||
|
|
||||||
|
In the great debate of copyleft vs permissive free-licenses we, as technological anarchists, stand on the permissive side. Here are some reasons for why we reject copyleft:
|
||||||
|
|
||||||
|
- By adopting copyleft one is **embracing and supporting the copyright laws** ("marrying the lawyers") because copyleft relies on and uses copyright laws. Copyleft chooses to play along with the capitalist bullshit [intellectual property](intellectual_property.md) game and threatens to use force and bullying in order to enforce *correct* usage of information.
|
||||||
|
- In a way it is **[bloat](bloat.md)**. Copyleft introduces **legal complexity**, [friction](friction.md) and takes programmers' [head space](head_space.md), especially when copyleft is probably mostly ineffective as **detecting its violation and actual legal enforcement is difficult, expensive and without a guaranteed positive outcome** ([FSF](fsf.md) encourages programmers to hand over their copyright to them so they can defend their programs which just confirms existence and relevance of this issue). Sure, corporations can probably "abuse" permissive (non-copyleft) software easier, but we argue that this is a problem whose roots lie in the broken basic principles of our society ([capitalism](capitalism.md)) and so the issue should be addressed by improving our socioeconomic system rather than by bullshit legal techniques that just imperfectly cure the symptoms.
|
||||||
|
- **The scope of copyleft is highly debatable** (which is why we have different kind of copyleft such as *strong*, *weak*, *network* etc.). I.e. it can't be objectively said what exactly should classify as violation of copyleft AND increasing copyleft scope leads to copylefted software being practically unusable. Consider this **example**: [Linux](linux.md) is copylefted which means we can't create a proprietary version of Linux, nevertheless we can create a proprietary operating system of which Linux is part (e.g. [Android](android.md) in which its proprietary app store makes it de-facto owned by [Google](google.md)), and so Linux is effectively used as a part of proprietary software -- the copyleft is bypassed. One might try to increase the copyleft scope here by saying *"everything Linux ever touches has to be free software"* which would however render Linux unusable on practically any computer as most computers contain at least some small proprietary software and hardware. The restriction would be too great.
|
||||||
|
- In practice, **copyleft licenses have to be complex and ugly** because they have to strictly describe the copyleft scope and include lots of legal [boilerplate](boilerplate.md) in order to make them well defendable in court -- and as we know, complexity comes with bugs, vulnerabilities and other burden. Indeed, we see this in practice: the only practically used copyleft licenses are the various versions of GPL of which all are ugly and have historically shown many faults (which is again evident from e.g. looking at GPL v1 vs v2 vs v3). Permissive licenses on the other hand are simple, clear and well understandable.
|
38
copyright.md
Normal file
38
copyright.md
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# Copyright
|
||||||
|
|
||||||
|
Copyright (better called copyrestriction) is one of many types of so called [intellectual property](intellectual_property.md) (IP), i.e. a legal concept that allows ownership (restriction) of certain kind of information. Copyright specifically allows to own (i.e. restrict other people's rights to) [art](art.md) creations such as images, songs or texts, which include source code of computer programs. Copyright is not to be confused with [trademark](trademark.md) or [patent](patent.md). Copyright is symbolized by C in a circle or in brackets: (C).
|
||||||
|
|
||||||
|
When someone creates something that can even remotely be considered artistic expression (even such things as e.g. a mere collection of already existing things), they automatically gain copyright on it, without having to register it anywhere or let it be known anywhere. They then have practically full control over the work and can successfully sue anyone who basically just touches it in any way. Therefore **any code without a [free](free_software.md) license attached is implicitly fully owned by its creator** (so called "all rights reserved") and can't be used by anyone without permission. It is said that copyright can't apply to ideas, only to expressions of ideas, however that's [bullshit](bs.md), the line isn't clear and is arbitrarily drawn by judges; for example regarding stories in books it's been established that the story itself can be copyrighted, not just its expression (you can't rewrite the Harry Potter story in different words and start selling it).
|
||||||
|
|
||||||
|
This current form of copyright (as well as other types of IP such as software patents) has been highly criticized by many people, even those whom it's supposed to "protect" (e.g. small game creators). Strong copyright laws basically benefit corporations and "trolls" on the detriment of everyone else. It smothers creativity and efficiency by prohibiting people to reuse, remix and improve already existing works. Most people are probably for *some* form of copyright but still oppose the current extreme form which is pretty crazy: copyright applies to everything without any registration or notice and last usually 70 years (!!!) **after** the author has died (!!!). This is 100 years in some countries. In some countries it is not even possible to waive copyright to own creations. Some people are against the very idea of copyright (those may either use waivers such as [CC0](cc0.md) or [unlicense](unlicense.md) or protest by not using any licenses and simply ignoring copyright which however will actually discourage other people from reusing their works).
|
||||||
|
|
||||||
|
Prominent critics include [Lawrence Lessig](lessig.md) (who established [free culture](free_culture.md) and [Creative Commons](creative_commons.md)) as a response), [Nina Paley](nina_paley.md) and [Richard Stallman](rms.md).
|
||||||
|
|
||||||
|
The book *Free Culture* by Lessig talks, besides others, about how copyright has started and how it's been shaped by corporations to becoming their tool for monopolizing art. The concept of copyright has appeared after the invention of [printing press](printing_press.md). The so called *Statute of Anne* of 1710 allowed the authors of books to control their copying for **14 years** and only after **registartion**. The term could be prolonged by anothert 14 years if the author survived. The laws started to get more and more strict as control of information became more valued and eventually the term grew to **life of authour plus 70 years**, without any need for registration or deposit of the copy of the work. Furthermore with new technologies, the scope of copyright has also extended: if copyright originally only limited *copying* of books, in the Internet age it started to cover basically any use, as any manipulation with digital data in the computer age requires making local copies. Addidionally the copyright laws were passing despite being unconstitutional as the US constitution says that copyright term has to be finite -- the corporations have found a way around this and simply regularly increased the copyright's term, trying to make it de-facto infinite. Their reason, of course, was to firstly forever keep ovenership of their own art but also, maybe more importantly, to **kill the [public domain](public_domain.md)**, i.e. prevent old works from entering the public domain where they would become a completely free, unrestricted work for all people, competing with their proprietary art. Nowadays, with coprporations such as [YouTube](youtube.md) and [Facebook](facebook.md) de-facto controlling most of infromation sharing among common people, the situation worsens further: they can simply make their own laws that don't need to be passed by the government but simply implemented on the platform they control. This way they are already killing e.g. the right to [fair use](fair_use.md), they can simply remove any content on the basis of "copyright violation", even if such content would normally NOT violate copyright because it would fall under fair use. This would normally have to be devided by court, but a corporation here itself takes the role of the court itself. So in terms of copyright, corporations have now a greater say than governments, and of course they'll use this power against the people (e.g. to implement censorship and surveillance).
|
||||||
|
|
||||||
|
Copyright rules differ greatly by country, most notably the US measures copyright length from the publication of the work rather than from when the author died. It is possible for a work to be copyrighted in one country and not copyrighted in another. It is sometimes also very difficult to say whether a work is copyrighted because the rules have been greatly changing (e.g. a notice used to be required for some time), sometimes even retroactively copyrighting public domain works, and there also exists no official database of copyrighted works (you can't safely look up whether your creation is too similar to someone else's). All in all, copyright is a huge mess, which is why we choose [free licenses](free_software.md) and even [public domain](public_domain.md) waivers.
|
||||||
|
|
||||||
|
[Copyleft](copyleft.md) (also share-alike) is a concept standing against copyright, a kind of anti-copyright, invented by [Richard Stallman](rms.md) in the context of [free software](free_software.md). It's a license that grants people the rights to the author's work on the condition that they share its further modification under the same terms, which basically hacks copyright to effectively spread free works like a "virus".
|
||||||
|
|
||||||
|
Copyright does **not** apply to facts (including mathematical formulas) (even though the formulation of them may be copyrighted), ideas (though these may be covered by [patents](patent.md)) and single words or short phrases (these may however still be [trademarked](trademark.md)). As such copyright can't e.g. be applied to game mechanics of a computer [game](game.md) (it's an idea). It is also basically proven that copyright doesn't cover [computer languages](programming_language.md) (Oracle vs Google). Depending on time and location there also exist various peculiar exceptions such as the freedom of panorama for photographs or uncopyrightable utilitarian design (e.g. no one can own the shape of a generic car). But it's never good to rely on these peculiarities as they are specific to time/location, they are often highly subjective, fuzzy and debatable and may even be retroactively changed by law. This constitutes a huge legal [bloat](bloat.md) and many time legal unsafety. Do not stay in the gray area, try to stay safely far away from the fuzzy copyright line.
|
||||||
|
|
||||||
|
A work which is not covered by copyright (and any other IP) -- which is nowadays pretty rare due to the extent and duration of copyright -- is in the **[public domain](public_domain.md)**.
|
||||||
|
|
||||||
|
[Free software](free_software.md) (and free art etc.) is **not** automatically public domain, it is mostly still copyrighted, i.e. "owned" by someone, but the owner has given some key rights to everyone with a free software license and by doing so minimized or even eliminated the negative effects of full copyright. The owner may still keep the rights e.g. to being properly credited in all copies of the software, which he may enforce in court. Similarly software that is in public domain is **not** automatically free software -- this holds only if source code for this software is available (so that the rights to studying and modifying can be executed).
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [copyleft](copyleft.md)
|
||||||
|
- [fair use](fair_use.md)
|
||||||
|
- [creative commons](cc.md)
|
||||||
|
- [license](license.md)
|
||||||
|
- [patent](patent.md)
|
||||||
|
- [trademark](trademark.md)
|
||||||
|
- [public domain](pd.md)
|
||||||
|
- [intellectual property](intellectual_property.md)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
3
cpp.md
Normal file
3
cpp.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# C++
|
||||||
|
|
||||||
|
C++ is an [object-obsessed](oop.md) [joke](jokes.md) language based on [C](c.md) to which it adds only [capitalist](capitalist_software.md) features and [bloat](bloat.md). Most good programmers agree that C++ is hilariously messy and also tragic in that it actually succeeded to become mainstream. As someone once said, "C++ is not an increment, it is excrement".
|
5
cracker.md
Normal file
5
cracker.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Cracker
|
||||||
|
|
||||||
|
Crackers are the good people who in computer systems, with use of [hacking](hacking.md), remove artificial barriers to obtaining and sharing of [infomration](information.md); for example they help remove [DRM](drm.md) from [games](game.md) or leak data from secret databases. This is normally illegal which makes the effort even more admirable.
|
||||||
|
|
||||||
|
Cracker is also food.
|
5
crow_funding.md
Normal file
5
crow_funding.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Crow Funding
|
||||||
|
|
||||||
|
Crow funding is when a crow pays for your program.
|
||||||
|
|
||||||
|
You probably misspelled [crowd funding](crowd_funding.md).
|
34
crypto.md
Normal file
34
crypto.md
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# Cryptocurrency
|
||||||
|
|
||||||
|
Cryptocurrency, or just *crypto*, is a digital, virtual (non-physical) currency used on the [Internet](internet.md) which uses [cryptographic](cryptography.md) methods (electronic signatures etc.) to implement a [decentralized](decentralized.md) system in which there is no authority to control the currency (unlike e.g. with traditional currencies that are controlled by the state or systems of digital payments controlled by the banks that run these systems). Cryptocurrencies use so called **[blockchain](blockchain.md)** as an underlying technology and are practically always implemented as [free and open-source software](foss.md). Example of cryptocurrencies are [Bitcoin](bitcoin.md), [Monero](monero.md) or [Dogecoin](dogecoin.md).
|
||||||
|
|
||||||
|
The word *crypto* in *crpytocurrency* **doesn't imply that the currency provides or protects privacy** -- it rather refers to the cryptographic algorithms used to make the currency work -- even though thanks to the decentralization, anonymity and openness cryptocurrencies actually are mostly privacy friendly (up to the points of being considered the currency of criminals).
|
||||||
|
|
||||||
|
[LRS](lrs.md) sees cryptocurrencies more or less as **unethical** because in our view money itself is unethical, plus the currencies based on proof of work waste not only human effort but also enormous amount of electricity and computing power that could be spent in a better way. Crypto is just an immensely expensive game in which people try to fuck each other over money that have been stolen from the people.
|
||||||
|
|
||||||
|
# History
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
# How It Works
|
||||||
|
|
||||||
|
Cryptocurrency is build on top of so called [blockchain](blockchain.md) -- a kind structure that holds records of transactions (exchanges of money or "coins", as called in the crypto world). Blockchain is a [data structure](data-structure.md) serving as a [database](database.md) of the system. As its name suggests, it consists of **blocks**. Each block contains various data, most important of which are performed transactions (e.g. "A sent 1 coin to B"), and each block points to a previous one (forming a [linked list](linked_list.md)). As new transactions are made, new blocks are created and appended at the end of the blockchain.
|
||||||
|
|
||||||
|
But where is the blockchain stored? It is not on a single computer; many computers participating in the system have their own copy of the blockchain and they share it together (similarly to how people share files via [torrents](torrent.md)).
|
||||||
|
|
||||||
|
But how do we know which one is the "official" blockchain? Can't just people start forging information in the blockchain and then distribute the fake blockchains? Isn't there a chaos if there are so many copies? Well yes, it would be messy -- that's why we need a **consensus** of the participants on which blockchain is the *real* one. And there are a few algorithms to ensure the consensus. Basically people can't just spam add new blocks, a new block to be added needs to be validated via some process (which depends on the specific algorithm) in order to be accepted by others. Two main algorithms for this are:
|
||||||
|
|
||||||
|
- [proof of work](proof_of_work.md): For a block to be confirmed it has to have a specific cryptographic puzzle solved, e.g. it may need to have appended some string that makes the block's hash some predetermined value. Participants try to solve this puzzle: finding the string is difficult and has to be done by [brute force](brute_force.md) (which wastes electricity and makes this method controversial). Once someone finds a solution, the block is confirmed and the solver gets a reward in coin -- this is therefore called **mining**.
|
||||||
|
- [proof of stake](proof_of_stake.md): This methods tries to waste less energy by not solving cryptographics puzzles but rather having some chosen participants validate/confirm the blocks. Basically participans can give some of their money at stake which then gives them a chance (proportional to the amount of money put at stake) to be chosen as validators. A validator is then chosen at random who will check the transactions and sign the block. For this they will get a small reward in coins. If they try to confirm fraudulent transactions (e.g. money sent from people without any money), the network will punish them by taking away the money they put at stake (so there is a financial motivation to not "cheat").
|
||||||
|
|
||||||
|
Can't people just forge transactions, e.g. by sending out a record that says someone else sent them money? This can be easily prevented by [digitally signing](digital_signature.md) the transactions, i.e. if there is e.g. a transaction "A sends 1 coint to B", it has to be signed by A to confirm that A really intended to send the money. But can't someone just copy-paste someone else's already signed transactions and try to perform them multiple times? This can also be prevented by e.g. numbering the transactions, i.e. recording something like "A sent 1 coin to B as his 1st transaction".
|
||||||
|
|
||||||
|
But where are the coins of a person actually stored? They're not explicitly stored anywhere; the amount of coins any participant has is deduced from the list of transactions, i.e. if it is known someone joined the network with 0 coins and there is a record of someone else sending him 1 coin, it is clear he now has 1 coin. For end users there are so called **wallets** which to them appear to store their coins, but a wallet is in fact just the set of cryptographic keys needed to perform transactions.
|
||||||
|
|
||||||
|
But why is blockchain even needed? Can't we just have a list of signed transactions without any blocks? Well, blockchain is designed to ensure coherency and the above mentioned consensus.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
3
data_hoarding.md
Normal file
3
data_hoarding.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Data Hoarding
|
||||||
|
|
||||||
|
TODO
|
32
data_structure.md
Normal file
32
data_structure.md
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# Data Structure
|
||||||
|
|
||||||
|
Data structure refers to a any specific way in which [data](data.md) is organized in computer memory. A specific data structure describes such things as order, relationships (interconnection, hierarchy, ...), formats and [types](data_type.md) of parts of the data. [Programming](programming.md) is sometimes seen as consisting mainly of two things: design of [algorithms](algorithm.md) and data structures these algorithm work with.
|
||||||
|
|
||||||
|
As a programmer dealing with a specific problem you oftentimes have a choice of multiple data structures -- choosing the right one is essential for performance and efficiency of your program. As with everything, each data structure has advantages and also its downsides; some are faster, some take less memory etc. For example for a searchable database of text string we can be choosing between a [binary tree](binary_tree.md) and a [hash table](hash_table.md); hash table offers theoretically much faster search, but binary trees may be more memory efficient and offer many other efficient operations like range search and sorting (which hash tables can do but very inefficiently).
|
||||||
|
|
||||||
|
## Specific Data Structures
|
||||||
|
|
||||||
|
These are just some common ones:
|
||||||
|
|
||||||
|
- [array](array.md)
|
||||||
|
- [binary_tree](binary_tree.md)
|
||||||
|
- [bitfield](bitfield.md)
|
||||||
|
- [blockchain](blockchain.md)
|
||||||
|
- [B+ tree](bplus_tree.md)
|
||||||
|
- [circular buffer](circular_bugger.md)
|
||||||
|
- [directed acyclic graph](dac.md)
|
||||||
|
- [graph](graph.md)
|
||||||
|
- [hash table](hash_table.md)
|
||||||
|
- [heap](heap.md)
|
||||||
|
- [linked list](linked_list.md)
|
||||||
|
- [N-ary tree](nary_tree.md)
|
||||||
|
- [record](record.md)
|
||||||
|
- [stack](stack.md)
|
||||||
|
- [string](string.md)
|
||||||
|
- [tree](tree.md)
|
||||||
|
- [queue](queue.md)
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [data](data.md)
|
||||||
|
- [data type](data_type.md)
|
9
de_facto.md
Normal file
9
de_facto.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# De Facto
|
||||||
|
|
||||||
|
De facto is [Latin](latin.md) for "in fact" or "by facts", it means that something holds in practice; it is contrasted with [de jure](de_jure.md) ("by law"). We use the term to say whether something is actually true in reality as opposed to "just on paper".
|
||||||
|
|
||||||
|
For example in [technology](tech.md) a so called [de facto standard](de_facto_standard.md) is something that, without it being officially formalized or forced by law in prior, most developers naturally come to adopt so as to keep [compatibility](compatibility.md); for example the [Markdown](md.md) format has become the de facto standard for [READMEs](readme.md) in [FOSS](foss.md) development. Of course it happens often that de facto standards are later made into official standards. On the other hand there may be standards that are created by official standardizing authorities, such as the state, which however fail to gain wide adoption in practice -- these are official standards but not de facto one. TODO: example? :)
|
||||||
|
|
||||||
|
Regarding politics and society, we often talk about **de facto [freedom](freedom.md)** vs **de jure freedom**. For example in the context of [free (as in freedom) software](free_software.md) it is stressed that software ought to bear a free [license](license.md) -- this is to ensure de jure freedom, i.e. legal rights to being able to use, study, modify and share such software. However in these talks the **de facto freedom of software is often forgotten**; the legal (de jure) freedom is worth nothing if it doesn't imply real and practical (de facto) freedom to exercise the rights given by the license; for example if a piece of "free" (having a free license) software is extremely [bloated](bloat.md), our practical ability to study and modify it gets limited because doing so gets considerably expensive and therefore limits the number of people who can truly exercise those rights in practice. This issue of diminishing de facto freedom of free software is addressed e.g. by the [suckless](suckless.md) movement, and of course our [LRS](lrs.md) movement.
|
||||||
|
|
||||||
|
There is also a similar situation regarding [free speech](free_speech.md): if speech is free only de jure, i.e. we can "in theory" legally speek relatively freely, BUT if then in reality we also CANNOT speek freely because e.g. of fear of being [cancelled](cancel_culture.md), **our speech is de facto not free**.
|
12
deferred_shading.md
Normal file
12
deferred_shading.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# Deferred Shading
|
||||||
|
|
||||||
|
In computer [graphics](graphics.md) programming deferred shading is a technique for speeding up the rendering of (mainly) [shaded](shading.md) 3D graphics (i.e. graphics with textures, materials, [normal maps](normal_mapping.md) etc.). It is nowadays used in many advanced 3D engines. In principle of course the idea may also be used in 2D graphics and outside graphics.
|
||||||
|
|
||||||
|
The principle is following: in normal forward shading (non-deferred) the shading computation is applied immediately to any rendered pixel (fragment) as they are rendered. However, as objects can overlap, many of these expensively computed pixels may be overwritten by pixels of other objects, so many pixels end up being expensively computed but invisible. This is of course wasted computation. Deferred shading only computes shading of the pixels that will end up actually being visible -- this is achieved by **two rendering passes**:
|
||||||
|
|
||||||
|
1. At first geometry is rendered without shading, only with information that is needed for shading (for example [normals](normal.md), material IDs, texture IDs etc.). The rendered image is stored in so called G-buffer which is basically an image in which every pixel stores the above mentioned shading information.
|
||||||
|
2. The second pass applies the shading effects by applying the pixel/fragment [shader](shader.md) on each pixel of the G-buffer.
|
||||||
|
|
||||||
|
This is especially effective when we're using very expensive/complex pixel/fragment shaders AND we have many overlapping objects. **Sometimes deferred shading may be replaced by simply ordering the rendered models**, i.e. rendering front-to-back, which may achieve practically the same speed up. In simple cases deferred shading may not even be worth it -- in [LRS](lrs.md) programs we may use it only rarely.
|
||||||
|
|
||||||
|
Deferred shading also comes with complications, for example **rasterization [anti aliasing](anti_aliasing.md) can't be used** because, of course, anti-aliasing in G-buffer doesn't really make sense. This is usually solved by some [screen-space](screen_space.md) antialiasing technique such as [FXAA](fxaa.md), but of course that may be a bit inferior. **Transparency also poses an issue**.
|
19
demoscene.md
Normal file
19
demoscene.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Demoscene
|
||||||
|
|
||||||
|
Demoscene is a [hacker](hacking.md) [art](art.md) subculture revolving around making so called [demos](demo.md), programs that produce rich and interesting audiovisual effects and which are sometimes limited by strict size constraints (so called [intros](intro.md)). The scene originated in northern [Europe](europe.md) sometime in 1980s (even though things like screen hacks existed long before) among groups of [crackers](cracker.md) who were adding small signature effect screens into their cracked software (like "digital graffiti"); programming of these cool effects later became an art of its own and started to have their own competitions (sometimes with high financial prizes), so called *[compos](compo.md)*, at dedicated real life events called *[demoparties](demoparty.md)* (which themselves evolved from *[copyparties](copyparty.md)*, real life events focused on [piracy](piracy.md)). The community is still centered mostly in the Europe (primarily Finland), it is underground, out of the mainstream; [Wikipedia](wikipedia.md) says that by 2010 its size was estimated to 10000 people (such people are called *demosceners*).
|
||||||
|
|
||||||
|
Demoscene is a bittersweet topic: on one side it's awesome, full of beautiful hacking, great ideas and minimalism, on the other side there are secretive people who don't share their source code (most demos are [proprietary](proprietary.md)) and ugly unportable programs that exploit quirks of specific platforms -- common ones are [DOS](dos.md), [Commodore 64](c64.md), [Amiga](amiga.md) or [Windows](windows.md). These guys simply try to make the coolest visuals and smallest programs, with all good and bad that comes with it. Try to take only the good of it.
|
||||||
|
|
||||||
|
Besides "digital graffiti" the scene is also perhaps a bit similar to the culture of street rap, except that there's less improvisation (obviously, making a program takes long) and competition happens between groups rather than individuals. Nevertheless the focus is on competition, originality, style etc. But demos should show off technological skills as the highest priority -- trying to "win by content" rather than programming skills is sometimes frowned upon. Individuals within a demogroup have roles such as a [programmer](programmer.md), visual artist, music artist, director, even [PR](pr.md) etc.
|
||||||
|
|
||||||
|
A demo isn't a video, it is a non-[interactive](interactive.md) [real time](real_time.md) executable that produces the same output on every run (even though categories outside of this may also appear). [Viznut](viznut.md) has noted that this "static nature" of demos may be due to the established culture in which demos are made for a single show to the audience. Demos themselves aren't really limited by resource constraints (well, sometimes a limit such as 4 MB is imposed), it's where the programmers can show off all they have. However compos are often organized for **intros**, demos whose executable size is limited (i.e. NOT the size of the source code, like in [code golfing](golf.md), but the size of the compiled binary). The main categories are 4Kib intros and 64Kib intros, rarely also 256Kib intros (all sizes are in [kibibytes](memory_units.md)). Apparently even such categories as 256 [byte](byte.md) intro appear. Sometimes also platform may be specified (e.g. [Commodore 64](c64.md), [PC](pc.md) etc.). The winner of a compo is decided by voting.
|
||||||
|
|
||||||
|
Some of the biggest demoparties are or were Assembly (Finland), The Party (Denmark), The Gathering (Norway), Kindergarden (Norway) and Revision (Germany). A guy on https://mlab.taik.fi/~eye/demos/ says that he has never seen a demo [female](female.md) programmer and that females often have free entry to demoparties while men have to pay because there are almost no women anyway xD Some famous demogroups include Farbrausch (Germany, also created a tiny 3D shooter game [.kkrieger](kkrieger.md)), Future Crew (Finland), Pulse (international), Haujobb (international), Conspiracy (Hungary) and [Razor 1911](razor_1911.md) (Norway). { Personally I liked best the name of a group that called themselves *Byterapers*. ~drummyfish } There is an online community of demosceners at at https://www.pouet.net.
|
||||||
|
|
||||||
|
**On technological side of demos**: great amount of hacking, exploitation of bugs and errors and usage of techniques going against "good programming practices" are made use of in making of demos. They're usually made in [C](c.md), [C++](cpp.md) or [assembly](assembly.md) (though some retards even make demos in [Java](java.md) [lmao](lmao.md)). In intros it is extremely important to save space wherever possible, so things such as [procedural generation](procgen.md) and [compression](compression.md) are heavily used. Manual [assembly](assembly.md) optimization for size can take place. [Tracker music](tracker_music.md), [chiptune](chiptune.md), [fractals](fractal.md) and [ASCII art](ascii_art.md) are very popular. New techniques are still being discovered, e.g. [bytebeat](bytebeat.md). [GLSL](glsl.md) shader source code that's to be embedded in the executable has to be minified or compressed. Compiler flags are chosen so as to minimize size, e.g. small size optimization (`-Os`), turning off buffer security checks or turning on fast [float](float.md) operations. The final executable is also additionally compressed with [specialized executable compression](executable_compression.md).
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [code golf](golf.md)
|
||||||
|
- [kkrieger](kkrieger.md)
|
||||||
|
- [LAN party](lan_party.md)
|
40
dependency.md
Normal file
40
dependency.md
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# Dependency
|
||||||
|
|
||||||
|
Dependency is something your program depends on -- dependencies are [bad](shit.md)! Unfortunately they are also unavoidable. We at least try to minimize dependencies as much as possible while keeping our program functioning as intended, and those we can't avoid we try to abstract in order to be able to quickly drop-in replace them with alternatives.
|
||||||
|
|
||||||
|
Having many dependencies is a sign of [bloat](bloat.md) and bad design. Unfortunately this is the reality of mainstream programming. For example at the time of writing this [Chromium](chromium.md) in [Debian](debian.md) requires (recursively) 395 packages LMAO xD And these are just runtime dependencies...
|
||||||
|
|
||||||
|
In [software](software.md) development context we usually talk about software dependencies, typically [libraries](library.md) and other software [packages](package.md). However, there are many other types of dependencies we need to consider when striving for the best programs. Let us list just some of the possible types:
|
||||||
|
|
||||||
|
- [software](software.md)
|
||||||
|
- [libraries](library.md)
|
||||||
|
- [compiler](compiler.md) supporting specific language standard
|
||||||
|
- [build system](build_system.md)
|
||||||
|
- [GUI](gui.md) capability
|
||||||
|
- [operating system](operating_system.md) and its services such as presence of a [window manager](file_system.md), [desktop environment](desktop_environment.md), presence of a [file system](file_system.md) etc.
|
||||||
|
- [Internet](internet.md) connection
|
||||||
|
- [hardware](hardware.md)
|
||||||
|
- [computing resources](computing_resources.md) (sufficient RAM, CPU speed, ...)
|
||||||
|
- [graphics card](gpu.md)
|
||||||
|
- [floating point unit](fpu.md) and other [coprocessors](coprocessor.md)
|
||||||
|
- CPU features such as special instructions
|
||||||
|
- [mouse](mouse.md), [speakers](monitor.md) and other I/O devices
|
||||||
|
- other:
|
||||||
|
- know-how/education: Your program may require specific knowledge, e.g. knowledge of advanced math to be able to meaningfully modify the program, or nonnegligiable amount of time spent studying your codebase.
|
||||||
|
- running cost: e.g. electricity, Internet connection cost
|
||||||
|
- culture: Your program may require the culture to allow what it is presenting or dealing with.
|
||||||
|
|
||||||
|
Good program will take into account all kinds of these dependencies and try to minimize them to offer freedom, stability and safety while keeping its functionality or reducing it only very little.
|
||||||
|
|
||||||
|
Why are dependencies so bad? Some of the reasons are:
|
||||||
|
|
||||||
|
- **less secure** (more [attack surface](attack_surface.md), i.e. potential for vulnerabilities which may arise in the dependencies)
|
||||||
|
- **more buggy** (more [fuck up surface](fuck_up_surface.md))
|
||||||
|
- **more expensive to [maintain](maintenance.md)** (requires someone's constant attention to just keep the dependencies up to date and keeping up with their changing API)
|
||||||
|
- **less [future proof](future_proof.md)** and more **fragile** (your program dies as soon as one of its dependencies, or any dependency of these dependencies)
|
||||||
|
- **less under your control** (in practice it's extremely difficult to modify and maintain a library you use even if it's [free](free_software.md), so you're typically doomed to just accept whatever it does)
|
||||||
|
- **more dangerous [legally](law.md)** (reusing work of other people requires dealing with several to many different licenses with possibly wild conditions and there's always a chance of someone starting to make trouble such as threatening to withdraw a license)
|
||||||
|
|
||||||
|
## How to Avoid Them
|
||||||
|
|
||||||
|
TODO
|
17
determinism.md
Normal file
17
determinism.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Determinism
|
||||||
|
|
||||||
|
*"God doesn't play dice."* --[some German dude](einstein.md)
|
||||||
|
|
||||||
|
Deterministic system is one which over time evolves without any involvement of [randomness](randomness.md) and probability; i.e. its current state along with the rules according to which it behaves unambiguously and precisely determine its following state. This means that a deterministic [algorithm](algorithm.md) will always give the same result if run multiple times with the same input values. Determinism is an extremely important concept in [computer science](compsci.md) and [programming](programming.md) (and in many other fields of science and philosophy).
|
||||||
|
|
||||||
|
[Computers](computer.md) are mostly deterministic by nature and design, they operate by strict rules and engineers normally try to eliminate any random behavior as that is mostly undesirable (with certain exceptions mentioned below) -- randomness leads to hard to detect and hard to fix [bugs](bug.md), unpredictability etc. Determinism has furthermore many advantages, for example if we want to record a behavior of a deterministic system, it is enough if we record only the inputs to the system without the need to record its state which saves a great amount of space -- if we later want to replay the system's behavior we simply rerun the system with the recorded inputs and its behavior will be the same as before (this is exploited e.g. in recording gameplay demos in video [games](game.md) such as [Doom](doom.md)).
|
||||||
|
|
||||||
|
Determinism can however also pose a problem, notable e.g. in cryptography where we DO want true randomness e.g. when generating [seeds](seed.md). Determinism in this case implies an attacker knowing the conditions under which we generated the seed can exactly replicate the process and arrive at the seed value that's supposed to be random and secret. For this reason some [CPUs](cpu.md) come with special hardware for generating truly random numbers.
|
||||||
|
|
||||||
|
Despite the natural determinism of computers as such, **computer programs aren't automatically deterministic** -- if you're writing a computer program, you have to make some effort to make it deterministic. This is because there are things such as [undefined behavior](undefined_behavior.md). For example the behavior of your program may depend on timing ([critical sections](critical_section.md), ...), performance of the computer (a game running on slower computer will render fewer [frames per second](fps.md), ...), [byte sex](endianness.md) (big vs little endian), accessing uninitialized memory (which many times contains undefined values) and many more things. All this means that your program run with the same input data will produce different results on different computers or under slightly different circumstances, i.e. it would be non-deterministic.
|
||||||
|
|
||||||
|
Even if we're creating a program that somehow works with probability, we usually want to make it deterministic. This means we don't use actual random numbers but rather [pseudorandom](pseudorandomness.md) number generators that output [chaotic](chaos.md) values which simulate randomness, but which will nevertheless be exactly the same when ran multiple times with the same initial seed. This is again important e.g. for [debugging](debugging.md) the system in which replicating the bug is key to fixing it.
|
||||||
|
|
||||||
|
In theoretical computer science non-determinism means that a model of computation, such as a [Turing machine](turing_machine.md), may at certain points decide to make one of several possible actions which is somehow most convenient, e.g. which will lead to finding a solution in shortest time. Or in other words it means that the model makes many computations, each in different path, and at the end we conveniently pick the "best" one, e.g. the fastest one. Then we may talk e.g. about how the computational strength or speed of computation differ between a deterministic and non-deterministic Turing machine etc.
|
||||||
|
|
||||||
|
Determinism is also a philosophical theory that says our Universe is deterministic, i.e. that everything is already predetermined by the state of the universe and the laws of physics, i.e. that we don't have "free will" (whatever it means) etc. Many believe [quantum physics](quantum.md) disproves determinism which is however not the case, there may e.g. exist hidden variables that still make quantum physics deterministic. Anyway, this is already beyond the scope of technological determinism.
|
7
digital.md
Normal file
7
digital.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Digital
|
||||||
|
|
||||||
|
Digital [technology](tech.md) is that which works with whole numbers, i.e. discrete values, as opposed to [analog](analog.md) technology which works with real numbers, i.e. continuous values. The name *digital* is related to the word *digit* as digital computers store data by digits, e.g. in 1s and 0s if they work in [binary](binary.md).
|
||||||
|
|
||||||
|
Normies confuse digital with [electronic](electronic.md) or think that digital computers can only be electronic, that digital computers can only work in [binary](binary.md) or have other weird assumptions whatsoever. **This is indeed false!** An [abacus](abacus.md) is digital device. Fucking normies.
|
||||||
|
|
||||||
|
The advantage of digital technology is its resilience to noise which prevents degradation of data and accumulation of error -- if a digital picture is copied a billion times, it will very likely remain unchanged, whereas performing the same operation with analog picture would probably erase most of the information it bears due to loss of quality in each copy. Digital technology also makes it easy and practically possible to create fully programmable general purpose [computers](computer.md) if great complexity.
|
9
digital_signature.md
Normal file
9
digital_signature.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Digital Signature
|
||||||
|
|
||||||
|
Digital signature is a method of mathematically (with [cryptographical](cryptography.md) algorithms) proving that, with a high probability, a digital message or document has been produced by a specific sender, i.e. it is something aka traditional signature which gives a "proof" that something has been written by a specific person.
|
||||||
|
|
||||||
|
It works on the basis of [asymmetric cryptography](asymmetric_cryptography.md): the signature of a message is a pair of a public key and a number (the signature) which can only have been produced by the owner of the private key associated with the public key. This signature is dependent on the message data itself, i.e. if the message is modified, the signature will no longer be valid, preventing anyone who doesn't posses the private key from modifying the message. The signature number can for example be a [hash](hash.md) of the message decoded with the private key -- anyone can check that the signature encoded with the public key gives the document hash, proving that whoever computed the signature number must have possessed the private key.
|
||||||
|
|
||||||
|
Signatures can be computed e.g. with the [RSA](rsa.md) algorithm.
|
||||||
|
|
||||||
|
The nice thing here is that **[anonymity](anonymity.md) can be kept with digital signatures**; no private information such as the signer's real name is required to be revealed, only his public key. Someone may ask why we then even sign documents if we don't know by whom it is signed lol? But of course the answer is obvious: many times we don't need to know the identity of the signer, we just need to know that different messages have all been written by the same person, and this is what a digital signature can ensure. And of course, if we want, a public key can have a real identity assigned if desirable, it's just that it's not required.
|
5
dinosaur.md
Normal file
5
dinosaur.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Dinosaur
|
||||||
|
|
||||||
|
In the [hacker](hacker.md) jargon *dinosaur* is a type of a big, very old, mostly non-interactive ([batch](batch.md)), possibly partly mechanical computer, usually an IBM [mainframe](mainframe.md) from 1940s and 1950s (so called Stone Age). They resided in *dinosaur pens* (mainframe rooms).
|
||||||
|
|
||||||
|
{ This is how I understood it from the [Jargon File](jargon_file.md). ~drummyfish }
|
7
dodleston.md
Normal file
7
dodleston.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Dodleston Mystery
|
||||||
|
|
||||||
|
The Dodleston mystery regards a teacher Ken Webster who in 1984 supposedly started exchanging messages with people from the past and future, most notably people from the 16th and 22nd century, via files on a [BBC micro](bbc_micro.md) computer. While probably a [hoax](hoax.md) and [creepypasta](creepypasta.md), there are some interesting unexplained details... and it's a fun story.
|
||||||
|
|
||||||
|
The guy has written a [proprietary](proprietary.md) book about it, called *The Vertical Plane*.
|
||||||
|
|
||||||
|
{ If the story is made up and maybe even if it isn't it may be a copyright violation to reproduce the story with all the details here so I don't know if I should, but reporting on a few facts probably can't hurt. Yes, this is how bad the copyrestriction laws have gotten. ~drummyfish }
|
19
dog.md
Normal file
19
dog.md
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Dog
|
||||||
|
|
||||||
|
Here is our dog. He doesn't judge you, he loves unconditionally. No matter who you are or what you did, this doggo will always be your best friend <3 We should all learn from this little buddy.
|
||||||
|
|
||||||
|
Send this to anyone who's feeling down :)
|
||||||
|
|
||||||
|
```
|
||||||
|
__
|
||||||
|
_ / \
|
||||||
|
(( / 0 0)
|
||||||
|
\\___\/ _o)
|
||||||
|
( | WOOOOOOOF
|
||||||
|
| /___| |(
|
||||||
|
|_)_) |_)_)
|
||||||
|
```
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [watchdog](watchdog.md)
|
11
doom.md
Normal file
11
doom.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Doom
|
||||||
|
|
||||||
|
Doom is a legendary video [game](game.md) released in 1993, perhaps the most famous game of all time, the game that popularized the [first person shooter](first_person_shooter.md) genre and shocked by its at the time extremely advanced [3Dish](pseudo_3D.md) graphics. It was made by [Id Software](id_software.md), most notably by [John Carmack](john_carmack.md) (graphics + engine programmer) and [John Romero](john_romero.md) (tool programmer + level designer). Doom is sadly [proprietary](proprietary.md), however its engine was later (1999) released as [free (as in freedom) software](free_software.md) under [GPL](gpl.md) which gave rise to many source ports. The assets remain non-free but a completely free alternative is offered by the [Freedoom](freedoom.md) project that has created [free as in freedom](free_culture.md) asset replacements for the game. [Anarch](anarch.md) is an official [LRS](lrs.md) game inspired by Doom, completely in the [public domain](public_domain.md).
|
||||||
|
|
||||||
|
{ Great books about Doom I can recommend: *Masters of Doom* (about the development) and *Game Engine Black Book: Doom* (details about the engine internals). ~drummyfish }
|
||||||
|
|
||||||
|
Partially thanks to the free release of the engine and its relatively [suckless](suckless.md) design ([C](c.md) language, [software rendering](sw_rendering.md), ...), Doom has been [ported](port.md), both officially and unofficially, to a great number of platforms (e.g. [Gameboy Advance](gba.md), [PS1](playstation.md), even [SNES](snes.md)) and has become a kind of **de facto standard [benchmark](benchmark.md)** for computer platforms -- you will often hear the phrase: **"but does it run Doom?"** Porting a Doom to any platform has become kind of a [meme](meme.md), someone allegedly even ported it to a pregnancy test (though it didn't actually run on the test, it was really just a display). { Still [Anarch](anarch.md) may be even more portable than Doom :) ~drummyfish }
|
||||||
|
|
||||||
|
The Doom engine was revolutionary and advanced (not only) video game graphics by a great leap, considering its predecessor [Wolf3D](wolf3D.md) was really primitive in comparison. Doom used a technique called **[BSP rendering](bsp.md)** that was able to render [realtime](realtime.md) 3D views of textured environments with distance fog and enemies and items represented by 2D [billboards](billboard.md) ("sprites"). No [GPU](gpu.md) acceleration was used, graphics was rendered purely with [CPU](cpu.md) (so called [software rendering](sw_rendering.md)). This had its limitations, for example the camera could not tilt up and down and the levels could not have rooms above other rooms. For this reason some call Doom "[pseudo 3D](pseudo3d.md)" or 2.5D rather than "true 3D". Nevertheless, though with limitations, Doom did present 3D views and internally it did work with 3D coordinates (for example the player or projectiles have 2D position plus height coordinate), despite some dumb YouTube videos saying otherwise. For this reason we prefer to call Doom a **primitive 3D** engine, but 3D nonetheless.
|
||||||
|
|
||||||
|
LOL someone created a Doom system monitor for [Unix](unix.md) systems called [psDooM](psdoom.md) where the monsters in game are the operating system [processes](process.md) and killing the monsters kills the processes.
|
15
double_buffering.md
Normal file
15
double_buffering.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# Double Buffering
|
||||||
|
|
||||||
|
In [computer graphics](graphics.md) double buffering is a technique of rendering in which we do not draw directly to [video RAM](vram.md), but instead to a second "back buffer", and only copy the rendered frame from back buffer to the video RAM ("front buffer") once the rendering has been completed; this prevents flickering and displaying of incompletely rendered frames on the display. Double buffering requires a significant amount of extra memory for the back buffer, however it is also necessary for how graphics is rendered today.
|
||||||
|
|
||||||
|
In most libraries and frameworks today you don't have to care about double buffering, it's done automatically. For this reason in many frameworks you often need to indicate the end of rendering with some special command such as `flip`, `endFrame` etc. If you're going lower level, you may need to implement double buffering yourself.
|
||||||
|
|
||||||
|
Though we encounter the term mostly in computer graphics, the principle of using a second buffer in order to ensure the result is presented only when it's ready can be applied also elsewhere.
|
||||||
|
|
||||||
|
Let's take a small example: say we're rendering a frame in a 3D game. First we render the environment, then on top of it we render the enemies, then effects such as explosions and then at the top of all this we render the [GUI](gui.md). Without double buffering we'd simply be rendering all these pixel into the front buffer, i.e. the memory that is immediately shown on the display. This would lead to the user literally seeing how first the environment appears, then enemies are drawn over it, then effects and then the GUI. Even if all this redrawing takes an extremely short time, it is also the case that the final frame will be shown for a very short time before another one will start appearing, so in the result the user will see huge flickering: the environment may look kind of normal but the enemies, effects and GUI may appear transparent because they are only visible for a fraction of the frame. The user also might be able to see e.g. enemies that are supposed to be hidden behind some object if that object is rendered after the enemies. With double buffering this won't happen as we perform the rendering into the back buffer, a memory which doesn't show on the display. Only when we have completed the frame in the back buffer, we copy it to the front buffer, pixel by pixel. Here the user may see the display changing from the old frame to the new one from top to the bottom, but he will never see anything temporary, and since the old and new frames are usually very similar, this top-to-bottom update may not even be distracting (it is addressed by [vertical synchronization](vsync.md) if we really want to get rid of it).
|
||||||
|
|
||||||
|
There also exists [triple buffering](triple_buffering.md) which uses yet another additional buffer to increase [FPS](fps.md). With double buffering we can't start rendering a new frame into back buffer until the back buffer has been copied to the front buffer which may further be delayed by [vertical synchronization](vsync.md), i.e. we have to wait and waste some time. With triple buffering we can start rendering into the other back buffer while the other one is being copied to the front buffer. Of course this consumes significantly more memory. Also note that triple buffering can only be considered if the hardware supports parallel rendering and copying of data, and if the FPS is actually limited by this... mostly you'll find your FPS bottleneck is elsewhere in which case it makes no sense to try to implement triple buffering. On small devices like embedded you probably shouldn't even think about this.
|
||||||
|
|
||||||
|
Double buffering can be made more efficient by so called page flipping, i.e. allowing to switch the back and front buffer without having to physically copy the data, i.e. by simply changing the [pointer](pointer.md) of a display buffer. This has to be somehow supported by hardware.
|
||||||
|
|
||||||
|
**When do we actually need double buffering?** Not always, we can avoid it or suppress its memory requirements if we need to, e.g. with so called **[frameless rendering](frameless.md)** -- we may want to do this e.g. in [embedded](embedded.md) programming where we want to save every byte of RAM. The mainstream computers nowadays simply always run on a very fast FPS and keep redrawing the screen even if the image doesn't change, but if you write a program that only occasionally changes what's on the screen (e.g. an e-book reader), you may simply leave out double buffering and actually render to the front buffer once the screen needs to change, the user probably won't notice any flicker during a single quick frame redraw. You also don't need double buffering if you're able to compute the final pixel color right away, for example with [ray tracing](ray_tracing.md) you don't need any double buffering, unless of course you're doing some complex [postprocessing](postprocessing.md). Double buffering is only needed if we compute a pixel color but that color may still change before the frame is finished. You may also only use a partial double buffer if that is possible (which may not be always): you can e.g. split the screen into 16 regions and render region by region, using only a 1/16th size double buffer. Using a [palette](palette.md) can also make the back buffer smaller: if we use e.g. a 256 color palette, we only need 1 byte for every pixel of the back buffer instead of some 3 bytes for full [RGB](rgb.md). The same goes for using a smaller resolution that is the actual native resolution of the screen.
|
17
drummyfish.md
Normal file
17
drummyfish.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Drummyfish
|
||||||
|
|
||||||
|
Drummyfish (also tastyfish, drumy etc.) is a programmer, [anarchopacifist](anpac.md) and proponent of [free software/culture](free_software.md), who started [this wiki](lrs_wiki.md) and invented the kind of software it focuses on: [less retarded software](lrs.md) (LRS). Besides others he has written [Anarch](anarch.md), [small3dlib](small3dlib.md), [raycastlib](raycastlib.md) and [SAF](saf.md). He has also been creating free culture art.
|
||||||
|
|
||||||
|
Drummyfish has a personal website at https://www.tastyfish.cz.
|
||||||
|
|
||||||
|
Aside from creating [LRS](lrs.md) drummyfish has contributed to a few [FOSS](foss.md) projects such as [OpenMW](openm.md). He's been contributing with [public domain](pd.md) art of all kind (2D, 3D, music, ...) and writings to [Wikipedia](wikipedia.md), [Wikimedia Commons](wm_commons.md), [opengameart](oga.md), [libregamewiki](lgw.md), freesound and others.
|
||||||
|
|
||||||
|
Drummyfish's real name is Miloslav Číž, he was born on 24.08.1990 and lives in Moravia, Czech Republic. He started programming at high school in [Pascal](pascal.md), then he went on to study [compsci](compsci.md) (later focused on [computer graphics](graphics.md)) in a Brno University of Technology and got a master's degree, however he subsequently refused to find a job in the industry, partly because of his views (manifested by [LRS](lrs.md)) and partly because of mental health issues (depressions/anxiety/avoidant personality disorder). He rather chose to do less harmful slavery such as cleaning and physical [spam](spam.md) distribution, and continues [hacking](hacking.md) on his programming (and other) projects in his spare time in order to be able to do it with absolute freedom.
|
||||||
|
|
||||||
|
In 2019 drummyfish has written a "manifesto" of his ideas called **Non-Competitive Society** that describes the political ideas of an ideal society. It is in the [public domain](public_domain.md) under [CC0](cc0.md) and available for download online.
|
||||||
|
|
||||||
|
{ Why doxx myself? Following the [LRS](lrs.md) philosophy, I believe information should be free. [Censorship](censorship.md) -- even in the name of [privacy](privacy.md) -- goes against information freedom. We should live in a society in which people are moral and don't abuse others by any means, including via availability of their private information. And in order to achieve ideal society we have to actually live it, i.e. slowly start to behave as if it was already in place. Of course, I can't tell you literally everything (such as my passwords etc.), but the more I can tell you, the closer we are to the ideal society. ~drummyfish }
|
||||||
|
|
||||||
|
He likes many things such as animals, peace, freedom, programming, [math](math.md) and [games](game.md) (e.g. [Xonotic](xonotic.md)).
|
||||||
|
|
||||||
|
Drummyfish is pretty retarded when it comes to leading projects or otherwise dealing with people or practical life.
|
45
dynamic_programming.md
Normal file
45
dynamic_programming.md
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# Dynamic Programming
|
||||||
|
|
||||||
|
Dynamic programming is a programming technique that can be used to make many algorithms more efficient (faster). It works on the principle of repeatedly breaking given problem down into smaller subproblems and then solving one by one from the simplest and remembering already calculated results that can be reused later.
|
||||||
|
|
||||||
|
It is usually contrasted to the *[divide and conquer](divide_and_conquer.md)* (DAC) technique which at the first sight looks similar but is in fact quite different. DAC also subdivides the main problem into subproblems, but then solves them [recursively](recursive.md), i.e. it is a top-down method. DAC also doesn't remember already solved subproblem and may end up solving the same problem multiple times, wasting computational time. Dynamic programming on the other hand starts solving the subproblems from the simplest ones -- i.e. it is a **bottom-up** method -- and remembers solutions to already solved subproblems in some kind of a [table](lut.md) which makes it possible to quickly reuse the results if such subproblem is encountered again. The order of solving the subproblems should be made such as to maximize the efficiency of the algorithm.
|
||||||
|
|
||||||
|
It's not the case that dynamic programming is always better than DAC, it depends on the situation. Dynamic programming is effective **when the subproblems overlap** and so the same subproblems WILL be encountered multiple times. But if this is not the case, DAC can easily be used and memory for the look up tables will be saved.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
Let's firstly take a look at the case when divide and conquer is preferable. This is for instance the case with many [sorting](sorting.md) algorithms such as [quicksort](quicksort.md). Quicksort recursively divides parts of the array into halves and sorts each of those parts: sorting each of these parts is a different subproblem as these parts (at least mostly) differ in size, elements and their order. The subproblems therefore don't overlap and applying dynamic programming makes little sense.
|
||||||
|
|
||||||
|
But if we tackle a problem such as computing *N*th [Fibonacci number](fibonacci_number.md), the situation changes. Considering the definition of *N*th Fibonacci number as a *"sum of N-1th and N-2th Fibonacci numbers"*, we might naively try to apply the divide and conquer method:
|
||||||
|
|
||||||
|
```
|
||||||
|
int fib(int n)
|
||||||
|
{
|
||||||
|
return (n == 0 || n == 1) ?
|
||||||
|
n : // start the sequence with 0, 1
|
||||||
|
fib(n - 1) + fib(n - 2); // else add two previous
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
But we can see this is painfully slow as calling `fib(n - 2)` computes all values already computed by calling `fib(n - 1)` all over again, and this inefficiency additionally appears inside these functions recursively. Applying dynamic programming we get a better code:
|
||||||
|
|
||||||
|
```
|
||||||
|
int fib(int n)
|
||||||
|
{
|
||||||
|
if (n < 2)
|
||||||
|
return n;
|
||||||
|
|
||||||
|
int current = 1, prev = 0;
|
||||||
|
|
||||||
|
for (int i = 2; i <= n; ++i)
|
||||||
|
{
|
||||||
|
int tmp = current;
|
||||||
|
current += prev;
|
||||||
|
prev = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
return current;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
We can see the code is longer, but it is faster. In this case we only need to remember the previously computed Fibonacci number (in practice we may need much more memory for remembering the partial results).
|
41
earth.md
Normal file
41
earth.md
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# Earth
|
||||||
|
|
||||||
|
Well, Earth is the [planet](planet.md) we live on. It is the third planet from the [Sun](sun.md) of our Solar system which itself is part of the [Milky Way](milky_way.md) [galaxy](galaxy.md). So far it is the only known place to have [life](life.md).
|
||||||
|
|
||||||
|
Now behold the grand rendering of the Earth map in [ASCII](ascii_art.md) ([equirectangular](equirectangular.md) projection):
|
||||||
|
|
||||||
|
```
|
||||||
|
X v v v v v v v v v v v v v v v X
|
||||||
|
.-,./"">===-_.----..----.. : -==-
|
||||||
|
-=""-,><__-;;;<""._ / : -===-
|
||||||
|
___ .=---""""\/ \/ ><."-, "\ /" : .--._ ____ __.-""""------""""---.....-----..
|
||||||
|
> -=_ """""---"" _.-" \_/ | .-" /"\ : _.'' ".."" """ <
|
||||||
|
"" _.'ALASKA {_ ,".__ "" '"' _ : ( _/| _ _..
|
||||||
|
"-._.--"""-._ CANADA "--" "\ / \: ""./ / _--"","/
|
||||||
|
"" \ _/_ ",_/:_./\_.' ASIA "--. \/
|
||||||
|
> } /_\/ \:EUROPE __ __ /\| <
|
||||||
|
\ ""=- __.-" /"":_-. -._ _, /__\ \ ( .-" ) >-
|
||||||
|
\__ USA _/ """:___" " ", "" ,-. \ __//
|
||||||
|
|\ __ / /"": ""._..../ \ "" \_/
|
||||||
|
> \\_ ." \| ATLANTIC / : \\ <'\ | <
|
||||||
|
\ \_/| -=- OCEAN ) :AFRICA \\_.-" """\ .'
|
||||||
|
PACIFIC "--._\ \___: "/ \ .""\_ <^,..-" __
|
||||||
|
OCEAN \"""-""-.._ :""\ / " | _) \_\INDONESIA
|
||||||
|
>.............................|..........",.............:...\......./................_\\_....__/\..,__..........<
|
||||||
|
| SOUTH \ : / | "-._\_ \__/ \ ""-_
|
||||||
|
\ AMERICA / : ( } """""===- """""_
|
||||||
|
\_ | : \ \ __.-""._,"",
|
||||||
|
> \ / : / / |\ ," AUSTRALIA \ <
|
||||||
|
| | : \ / \/ INDIAN "; __ )
|
||||||
|
| / : \___/ OCEAN """ ""-._ /
|
||||||
|
/ / : "" |\
|
||||||
|
> | / : {) // <
|
||||||
|
| | : ""
|
||||||
|
\_ \ :
|
||||||
|
""" :
|
||||||
|
> ., : <
|
||||||
|
__....___ _/"" \ : _____ ___.......___......-------...__
|
||||||
|
--....-----""""----"""" "" "-..__ __......--""""""" """ .;_.....
|
||||||
|
"""" : ANTARCTICA
|
||||||
|
X ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ X
|
||||||
|
```
|
5
easier_done_than_said.md
Normal file
5
easier_done_than_said.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Easier Done Than Said
|
||||||
|
|
||||||
|
Easier done than said is the opposite of [easier said than done](easier_said_than_done.md).
|
||||||
|
|
||||||
|
Example: exhaling, as saying the word "exhaling" requires exhaling plus doing some extra work such as correctly shaping your mouth.
|
18
easy_to_learn_hard_to_master.md
Normal file
18
easy_to_learn_hard_to_master.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Easy To Learn, Hard To Master
|
||||||
|
|
||||||
|
"Easy to learn, hard to master" (ETLHTM) is a type of design of a [game](game.md) (and by extension a potential property of any [art](art.md) or [skill](skill.md)) which makes it relatively easy to learn to play while mastering the play (playing in near optimal way) remains very difficult.
|
||||||
|
|
||||||
|
Examples of this are games such as [tetris](tetris.md), [minesweeper](minesweeper.md) or [Trackmania](trackmania.md).
|
||||||
|
|
||||||
|
[LRS](lrs.md) sees the ETLHTM design as extremely useful and desirable as it allows for creation of [suckless](suckless.md), simple games that offer many hours of [fun](fun.md). With this philosophy we get a great amount of value for relatively little effort.
|
||||||
|
|
||||||
|
This is related to a fun coming from **self imposed goals**, another very important and useful concept in games. Self imposed goals in games are goals the player sets for himself, for example completing the game without killing anyone (so called "pacifist" gameplay) or completing it very quickly ([speedrunning](speedrun.md)). Here the game serves only as a platform, a playground at which different games can be played and invented -- inventing games is fun in itself. Again, a game supporting self imposed goals can be relatively simple and offer years of fun, which is extremely cool.
|
||||||
|
|
||||||
|
The simplicity of learning a game comes from simple rules while the difficulty of its mastering arises from the complex emergent behavior these simple rules create. Mastering of the game is many times encouraged by [competition](competition.md) among different people but also competition against oneself (trying to beat own score). In many simple games such as [minesweeper](minesweeper.md) there exists a competitive scene (based either on direct matches or some measurement of skill such as [speedrunning](speedrun.md) or achieving high score) that drives people to search for strategies and techniques that optimize the play, and to training skillful execution of such play.
|
||||||
|
|
||||||
|
The opposite is [hard to learn, easy to master](hard_to_learn_easy_to_master.md).
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [easier done than said](easier_done_than_said.md)
|
||||||
|
- [speedrun](speedrun.md)
|
7
english.md
Normal file
7
english.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# English
|
||||||
|
|
||||||
|
*"English Motherfucker, do you speak it?"*
|
||||||
|
|
||||||
|
English is a natural human language spoken mainly in the [USA](usa.md), UK and Australia as well as in dozens of other countries and in all parts of the world. It is the default language of the world. It is a pretty simple and [suckless](suckless.md) language (even though not as suckless as [Esperanto](esperanto.md)), even a braindead person can learn it { Knowing Czech and learning Spanish, which is considered one of the easier languages, I can say English is orders of magnitude simpler. ~drummyfish }. It is the lingua franca of the tech world and many other worldwide communities. Thanks to its simplicity (lack of declension, fixed word order etc.) it is pretty suitable for computer analysis and as a basis for [programming languages](programming_language.md).
|
||||||
|
|
||||||
|
If you haven't noticed, this wiki is written in English.
|
3
entrepreneur.md
Normal file
3
entrepreneur.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Entrepreneur
|
||||||
|
|
||||||
|
Entrepreneur is a person practicing slavery and committing legal theft under [capitalism](capitalism.md); capitalists describe those actions by euphemisms such as "doing [business](business.md)". Successful entrepreneurs can also be seen as murderers as they consciously firstly hoard resources that poor people lack (including basic resources needed for living) and secondly cause and perpetuate situations such as the third world slavery where people die on a daily basis performing extremely difficult, dangerous and low paid work, so that the entrepreneur can buy his ass yet another private jet.
|
63
esolang.md
Normal file
63
esolang.md
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
# 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).
|
||||||
|
|
||||||
|
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 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 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*)
|
||||||
|
- Using [unicode](unicode.md) characters (e.g. *UniCode*).
|
||||||
|
- Being infinitely many languages (e.g. *MetaGolfScript*, each one solves a specific program in 0 bytes).
|
||||||
|
|
||||||
|
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 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.
|
||||||
|
|
||||||
|
## History
|
||||||
|
|
||||||
|
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 `š`.
|
3
evil.md
Normal file
3
evil.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Evil
|
||||||
|
|
||||||
|
*Evil always wins in the end.*
|
50
exercises.md
Normal file
50
exercises.md
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
# Exercises
|
||||||
|
|
||||||
|
Here let be listed exercises for the readers of this wiki. You can allow yourself to as many helpers and resources as you find challenging: with each problem you should either find out you know the solution or learn something new while solving it.
|
||||||
|
|
||||||
|
1. What's the difference between [free software](free_software.md) and [open source](open_source.md)?
|
||||||
|
2. Say we have an algorithm that finds all pairs of equal numbers in an array of numbers of length *N* and adds all of these (unordered) pairs to a set *S*. The algorithm is (pseudocode): `for i := 0 to N: for j := 0 to N: if numbers[i] == numbers[j]: add(S,pair(i,j))`. How can we optimize the algorithm in terms of its execution speed (i.e. make it perform fewer operations while keeping its results the same)? How did the asymptotic time complexity ("big O") class change?
|
||||||
|
3. In computer graphics, what is the difference between ray casting, ray tracing and path tracing?
|
||||||
|
4. Why are manhole lids round and not square?
|
||||||
|
5. Give one real-life example of each of the following binary [relation](relation.md) types: [transitive](transitivity.md) but not equivalence, non-transitive, [antisymmetric](antisymmetric.md) and symmetric at the same time, [asymmetric](asymmetry.md), non-trivial [equivalence](equivalence.md).
|
||||||
|
|
||||||
|
## Solutions
|
||||||
|
|
||||||
|
A solution to each problem should be listed here -- keep in mind there may exist other solutions that those listed here.
|
||||||
|
|
||||||
|
**solution 1**:
|
||||||
|
|
||||||
|
Both movements share very similar rules of licensing and technically free software and open-source are largely the same. However, free software is fundamentally aiming for the creation of ethical software -- that which respects its user's freedom -- while open source is a later movement that tries to adapt free software for the business and abandons the pursuit of ethics, i.e. it becomes corrupted by capitalism and no longer minds e.g. proprietary dependencies.
|
||||||
|
|
||||||
|
**solution 2**:
|
||||||
|
|
||||||
|
In the given algorithm we compare all numbers twice. This can be avoided by not comparing a number to previous numbers in the array (because these have already been compared). Additionally we don't have to compare the same number to itself, a number will always be equal to itself:
|
||||||
|
|
||||||
|
```
|
||||||
|
for i := 0 to N:
|
||||||
|
add(S,i,i) // no need to compare
|
||||||
|
|
||||||
|
for i := 0 to N:
|
||||||
|
for j := i + 1 to N:
|
||||||
|
if numbers[i] == numbers[j]:
|
||||||
|
add(S,pair(i,j))
|
||||||
|
```
|
||||||
|
|
||||||
|
While the first algorithm performs N^2 comparisons, the new one only needs N - 1 + N - 2 + N - 3 + ... ~= N * N / 2 = N^2 / 2 comparisons. Even though the new version is always twice as fast, its time complexity class remains the same, that is O(N^(2)).
|
||||||
|
|
||||||
|
**solution 3**:
|
||||||
|
|
||||||
|
They are all image-order methods of 3D [rendering](rendering.md). [Ray casting](ray_casting.md) casts a single ray for each screen pixel and determines the pixel color from a single hit of the ray. [Ray tracing](ray_tracing.md) is a [recursive](recursion.md) form of ray casting -- it recursively spawns secondary rays from the first hit to more accurately determine the pixel color, allowing for effects such as shadows, reflections or refractions. Path tracing is a method also based on casting rays, but except for the primary rays the rays are cast at random (i.e. it is a [Monte Carlo](monte_carlo.md) method) to approximately solve the rendering equation, progressively computing a more accurate version of the image (i.e. the image contains significant noise at the beginning which lowers with more iterations performed) -- this allows computing [global illumination](global_illumination.md), i.e. a very realistic lighting that the two previous methods can't achieve.
|
||||||
|
|
||||||
|
**solution 4**:
|
||||||
|
|
||||||
|
Round lid can't fall into the hole.
|
||||||
|
|
||||||
|
**solution 5**:
|
||||||
|
|
||||||
|
- transitive, not equivalence: *A* is a descendant from *B*.
|
||||||
|
- non-transitive: *A* is a friend of *B*.
|
||||||
|
- symmetric: *A* had sex with *B*.
|
||||||
|
- antisymmetric and symmetric: *A* is *B*.
|
||||||
|
- asymmetric: *A* is a mother of *B*.
|
||||||
|
- non-trivial equivalence: *A* is of same age as *B*.
|
5
facebook.md
Normal file
5
facebook.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Facebook
|
||||||
|
|
||||||
|
"*Facebook has no users, it only has useds.*" --[rms](rms.md)
|
||||||
|
|
||||||
|
TODO
|
3
faggot.md
Normal file
3
faggot.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Faggot
|
||||||
|
|
||||||
|
Faggot is a synonym to [gay](gay.md).
|
10
fail_ab.md
Normal file
10
fail_ab.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Type A/B Fail
|
||||||
|
|
||||||
|
Type A and type B fails are two very common cases of failing to adhere to the [LRS](lrs.md) politics/philosophy by only a small margin. Most people don't come even close to LRS politically or by their life philosophy -- these are simply general failures. Then there a few who ALMOST adhere to LRS politics and philosophy but fail in an important point, either by being/supporting [pseudoleft](pseudoleft.md) (type A fail) or being/supporting [right](left_right.md) (type B fail). The typical cases are following (specific cases may not fully fit these, of course):
|
||||||
|
|
||||||
|
- **type A fail**: Is anticapitalist, anticonsumerist, may incline towards minimalism, supports [free software](free_software.md) and [free culture](free_culture.md), may even be a vegan, [anarchist](anarchism.md), [C](c.md) programmer etc., however falls into the trap of supporting [pseudoleft](pseudoleft.md), e.g. [LGBT](lgbt.md) or [feminism](feminism.md) and things such as censorship ("[moderation](moderation.md)", [COCs](coc.md)), "just violence and bullying" (violence against fascists, e.g. [antifa](antifa.md)), falls for memes such as "[Rust](rust.md) is the new [C](c.md)".
|
||||||
|
- **type B fail**: Is against [pseudoleft](pseudoleft.md) bullshit and propaganda such as political correctness, is a [racial realist](racial_realism.md), highly supports [suckless](suckless.md) software, hacking and minimalism to achieve high freedom, usually also opposes [corporations](corporation.md) and state, however falls into the trap of being a [fascist](fascism.md), easily accepts violence, believes in "natural selection/wild west as a basis of society", supports and engages in [cryptocurrencies](crypto.md), believes in some form of [capitalism](capitalism.md) and that the current form of it can be "fixed" (["anarcho" capitalism](ancap.md) etc.)
|
||||||
|
|
||||||
|
Type A/B fails are the "great filter" of the rare kind of people who show a great potential for adhering to LRS. It may be due to the modern western culture that forces a [right](right.md)-[pseudoleft](pseudoleft.md) false dichotomy that even those showing a high degree of non-conformance eventually slip into the trap of being caught by one of the two poles. These two fails seem to be a manifestation of an individual's true motives of [self interest](self_interest.md) which is culturally fueled with great force -- those individuals then try to not conform and support non-mainstream concepts like free culture or sucklessness, but eventually only with the goal of self interest. It seems to be extremely difficult to abandon this goal, much more than simply non-conforming. Maybe it's also the subconscious knowledge that adhering completely to LRS means an extreme loneliness; being type A/B fail means being a part of a minority, but still a having a supportive community, not being completely alone.
|
||||||
|
|
||||||
|
However these kinds of people may also pose a hope: if we could educate them and "fix their failure", the LRS community could grow rapidly. If realized, this step could even be seen as the main contribution of LRS -- uniting the misguided rightists and pseudoleftists by pointing out errors in their philosophies (errors that may largely be intentionally forced by the system anyway exactly to create the hostility between the non-conforming, as a means of protecting the system).
|
29
fantasy_console.md
Normal file
29
fantasy_console.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Fantasy Console
|
||||||
|
|
||||||
|
Fantasy console, also fantasy computer, is a software platform intended mainly for creating and playing simple [games](game.md), which imitates parameters, simplicity and [look and feel](look_and_feel.md) of classic retro consoles such as [GameBoy](gameboy.md). These consoles are called *fantasy* because they are not [emulators](emulator.md) of already existing hardware consoles but rather "dreamed up" platforms, [virtual machines](vm.md) made purely in software with artificially added restrictions that a real hardware console might have. These restrictions limit for example the resolution and color depth of the display, number of buttons and sometimes also computational resources.
|
||||||
|
|
||||||
|
The motivation behind creating fantasy consoles is normally twofold: firstly the enjoyment of [retro](retro.md) games and retro programming, and secondly the immense advantages of [simplicity](minimalism.md). It is much faster and easier to create a simple game than a full fledged PC game, this attracts many programmers, simple programming is also more enjoyable (fewer bugs and headaches) and simple games have many nice properties such as small size (playability over [web](web.md)), easy embedding or enabling emulator-like features.
|
||||||
|
|
||||||
|
Fantasy consoles usually include some kind of simple [IDE](ide.md); a typical mainstream fantasy console both runs and is programmed in a [web browser](browser.md) so as to be accessible to normies. They also use some kind of easy scripting language for game programming, e.g. [Lua](lua.md). Even though the games are simple, the code of such a mainstream console is normally [bloat](bloat.md), i.e. we are talking about **[pseudominimalism](pseudominimalism.md)**. Nevertheless some consoles, such as [SAF](saf.md), are truly [suckless](suckless.md), free and highly portable (it's not a coincidence that SAF is an official [LRS](lrs.md) project).
|
||||||
|
|
||||||
|
## Notable Fantasy Consoles
|
||||||
|
|
||||||
|
The following are a few notable fantasy consoles.
|
||||||
|
|
||||||
|
| name | license | game lang. |parameters | comment |
|
||||||
|
|--------------------|------------------------|-------------------|-----------|------------------------|
|
||||||
|
|[CToy](ctoy.md) |[zlib](zlib.md) |[C](c.md) |128x128 |[suckless](suckless.md) |
|
||||||
|
|[LIKO-12](liko12.md)|[MIT](mit.md) |[Lua](lua.md) |192x128 | |
|
||||||
|
|[PICO-8](pico8.md) |[propr.](proprietary.md)|[Lua](lua.md) |128x128 4b |likely most famous |
|
||||||
|
|PixelVision8 |[MS-PL](ms_pl.md) (FOSS)|[Lua](lua.md) |256x240 |written in C# |
|
||||||
|
|Pyxel |[MIT](mit.md) |[Python](python.md)|256x256 4b | |
|
||||||
|
|[SAF](saf.md) |[CC0](cc0.md) |[C](c.md) |64x64 8b |[LRS](lrs.md), suckless |
|
||||||
|
|[TIC-80](tic80.md) |[MIT](mit.md) |Lua, JS, ... |240x136 4b |paid "pro" version |
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [open console](open_console.md)
|
||||||
|
- [handheld](handheld.md)
|
||||||
|
- [virtual machine](vm.md)
|
||||||
|
- [IBNIZ](ibniz.md)
|
||||||
|
- [SAF](saf.md)
|
120
faq.md
Normal file
120
faq.md
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
# Frequently Asked Questions
|
||||||
|
|
||||||
|
*Not to be confused with [fuck](fuck.md) or [frequently questioned answers](fqa.md).*
|
||||||
|
|
||||||
|
{ answers by ~drummyfish }
|
||||||
|
|
||||||
|
|
||||||
|
### Is this a joke? Are you trolling?
|
||||||
|
|
||||||
|
No.
|
||||||
|
|
||||||
|
### What the fuck?
|
||||||
|
|
||||||
|
See [WTF](wtf.md).
|
||||||
|
|
||||||
|
### How does LRS differ from [suckless](suckless.md), [KISS](kiss.md) and similar types of software?
|
||||||
|
|
||||||
|
Technically these sets largely overlap and LRS is sometimes just a slightly different angle of looking at the same things. I have invented LRS as my own take on suckless software -- as I cannot speak on behalf of the whole suckless community, I have created my own "fork" and simply set my own definitions without worrying about misinterpreting and misquoting someone else. However, LRS does have its specific ideas and areas of focus. The main point is that **LRS is derived from an unconditional love of all life** rather than some shallow idea such as "[productivity](productivity_cult.md)". In practice this leads to such things as a high stress put on [public domain](public_domain.md) and legal safety, altruism, anti-capitalism, accepting software such as games as desirable type of software, NOT subscribing to the [productivity cult](productivity_cult.md), seeing [privacy](privacy.md) as ultimately undesirable etc.
|
||||||
|
|
||||||
|
### Why this obsession with extreme simplicity? Is it because you're too stupid to understand complex stuff?
|
||||||
|
|
||||||
|
I used to be the mainstream, complexity embracing programmer. I am in no way saying I'm a genius but I've put a lot of energy into studying computer science full time for many years so I believe I can say I have some understanding of the "complex" stuff. I speak from own experience and also on behalf of others who shared their experience with me that the appreciation of simplicity and realization of its necessity comes after many years of dealing with the complex and deep insight into the field and into the complex connections of that field to society.
|
||||||
|
|
||||||
|
You may ask: well then but why it's just you and a few weirdos who see this, why don't most good programmers share your opinions? Because they need to make living or because they simply WANT to make a lot of money and so they do what the system wants them to do. Education in technology (and generally just being exposed to corporate propaganda since birth) is kind of a trap: it teaches you to embrace complexity and when you realize it's not a good thing, it is too late, you already need to pay your student loan, your rent, your mortgage, and the only thing they want you to do is to keep this complexity cult rolling. So people just do what they need to do and many of them just psychologically make themselves believe something they subconsciously know isn't right because that makes their everyday life easier to live. "Everyone does it so it can't be bad, better not even bother thinking about it too much". It's difficult doing something every day that you think is wrong, so you make yourself believe it's right.
|
||||||
|
|
||||||
|
It's not that we can't understand the complex. It is that the simpler things we deal with, the more powerful things we can create out of them as the overhead of the accumulated complexity isn't burdening us so much.
|
||||||
|
|
||||||
|
Simplicity is crucial not only for the quality of technology, i.e. for example its safety and efficiency, but also for its freedom. The more complex technology becomes, the fewer people can control it. If technology is to serve all people, it has to be simple enough so that as many people as possible can understand it, maintain it, fix it, customize it, improve it. It's not just about being able to understand a complex program, it's also about how much time and energy it takes because time is a price not everyone can afford, even if they have the knowledge of programming. Even if you yourself cannot program, if you are using a simple program and it breaks, you can easily find someone with a basic knowledge of programming who can fix it, unlike with a very complex program whose fix will require a corporation.
|
||||||
|
|
||||||
|
Going for the simple technology doesn't necessarily have to mean we have to give up the "nice things" such as computer games or 3D graphics. Many things, such as responsiveness and customizability of programs, would improve. Even if the results won't be so shiny, we can recreate much of what we are used to in a much simpler way. You may now ask: why don't companies do things simply if they can? Because complexity benefits them in creating de facto monopolies, as mentioned above, by reducing the number of people who can tinker with their creations. And also because capitalism pushes towards making things quickly rather than well -- and yes, even non commercial "FOSS" programs are pushed towards this, they still compete and imitate the commercial programs. Already now you can see how technology and society are intertwined in complex ways that all need to be understood before one comes to realize the necessity of simplicity.
|
||||||
|
|
||||||
|
### Who writes this wiki? Can I contribute.
|
||||||
|
|
||||||
|
At the moment it's just me, [drummyfish](drummyfish.md). This started as a collaborative wiki name *based wiki* but after some disagreements I forked it (everything was practically written by me at that point) and made it my own wiki where I don't have to make any compromises or respect anyone else's opinions. I'm not opposed to the idea of collaboration but I bet we disagree on something in which case I probably don't want to let you edit this. I also resist allowing contributions because with multiple authors the chance of legal complications grows, even if the work is under a free license or waiver (refer to e.g. the situation where some Linux developers were threatening to withdraw their code contribution license). But you can totally fork this wiki, it's [public domain](cc0.md).
|
||||||
|
|
||||||
|
If you want to contribute to the cause, just create your own website, spread the ideas you liked here -- you may or may not refer to LRS, everything's up to you. Start creating software with LRS philosophy if you can -- together we can help evolve and spread our ideas in a decentralized way, without me or anyone else being an authority, a potential censor. That's the best way forward I think.
|
||||||
|
|
||||||
|
### Since it is public domain, can I take this wiki and do anything with it? Even something you don't like, like sell it or rewrite it in a different way?
|
||||||
|
|
||||||
|
Yes, you can do anything... well, anything that's not otherwise illegal like falsely claiming authorship (copyright) of the original text. This is not because I care about being credited, I don't (you DON'T have to give me any credit), but because I care about this wiki not being owned by anyone. You can however claim copyright to anything you add to the wiki if you fork it, as that's your original creation.
|
||||||
|
|
||||||
|
### Why not keep politics out of this Wiki and make it purely about technology?
|
||||||
|
|
||||||
|
Firstly for us technological progress is secondary to the primary type of progress in society: the social progress. The goal of our civilization is to provide good conditions for life -- this is social progress and mankind's main goal. Technological progress only serves to achieve this, so technological progress follows from the goals of social progress. So, to define technology we have to first know what it should help achieve in society. And for that we need to talk politics.
|
||||||
|
|
||||||
|
Secondly examining any existing subject in depth requires also understanding its context anyway. Politics and technology nowadays are very much intertwined and the politics of a society ultimately significantly affects what its technology looks like ([capitalist SW](capitalist_software.md), [censorship](censorship.md), [bloat](bloat.md), [spyware](spyware.md), [DRM](drm.md), ...), what goals it serves (consumerism, [productivity](productivity_cult.md), control, war, peace, ...) and how it is developed ([COCs](cos.md), [free software](free_software.md), ...), so studying technology ultimately requires understanding politics around it. I hate arguing about politics, sometimes it literally make me suicidal, but it is inevitable, we have to specify real-life goals clearly if we're to create good technology. Political goals guide us in making important design decisions about features, [tradeoffs](tradeoff.md) and other attributes of technology.
|
||||||
|
|
||||||
|
Of course you can fork this wiki and try to remove politics from it, but I think it won't be possible to just keep the technology part alone so that it would still make sense, most things will be left without justification and explanation.
|
||||||
|
|
||||||
|
### What is the political direction of LRS then?
|
||||||
|
|
||||||
|
In three words: [anarcho pacifist](anpac.md) [communism](communism.md). For more details see the article about [LRS](lrs.md) itself.
|
||||||
|
|
||||||
|
### Why do you blame everything on capitalism when most of the issues you talk about, like propaganda, surveillance, exploitation of the poor and general abuse of power, appeared also under practically any other systems we've seen in history?
|
||||||
|
|
||||||
|
This is a good point, we talk about capitalism simply because it is the system of today's world and an immediate threat that needs to be addressed, however we always try to stress that the root issue lies deeper: it is **competition** that we see as causing all major evil. Competition between people is what always caused the main issues of a society, no matter whether the system at the time was called capitalism, feudalism or pseudosocialism. While historically competition and conflict between people was mostly forced by the nature, nowadays we've conquered technology to a degree at which we could practically eliminate competition, however we choose to artificially preserve it via capitalism, the glorification of competition, and we see this as an extremely wrong direction, hence we put stress on opposing capitalism, i.e. artificial prolonging of competition.
|
||||||
|
|
||||||
|
### WTF I am offended, is this a nazi site? Are you racist/Xphobic? Do you love Hitler?!?!
|
||||||
|
|
||||||
|
We're not fascists, we're in fact the exact opposite: our aim is to create technology that benefits everyone equally without any discrimination. I (drummyfish) am personally a pacifist anarchist, I love all living beings and believe in absolute social equality of all life forms. We invite and welcome everyone here, be it gays, communists, rightists, trannies, pedophiles or murderers, we love everyone equally, even you and Hitler.
|
||||||
|
|
||||||
|
What we do NOT engage in is political correctness, censorship, offended culture, identity politics and pseudoleftism. We do NOT support fascist groups such as feminists and LGBT and we will NOT practice bullying and [codes of conducts](coc.md). We do not pretend there aren't any differences between people and we will make jokes that make you feel offended.
|
||||||
|
|
||||||
|
### Why do you use the word Nigger so much?
|
||||||
|
|
||||||
|
To counter its censorship. The more they censor something, the more I am going to uncensor it. They have to learn that the only way to make me not say that word so often is to stop censoring it, so to their action of censorship I produce a reaction they dislike. That's basically how you train a dog. (Please don't ask who "they" are.).
|
||||||
|
|
||||||
|
It also has the nice side effect of making this less likely to be used by corporations and SJWs.
|
||||||
|
|
||||||
|
### How can you say you love all living beings and use offensive language at the same time?
|
||||||
|
|
||||||
|
The culture of being offended is [bullshit](bullshit.md), it is a [pseudoleftist](pseudoleft.md) (fascist) invention that serves as a weapon to justify censorship, canceling and bullying of people. Since I love all people, I don't support any weapons against anyone (not even against people I dislike or disagree with). People are offended by language because they're taught to be offended by it by the propaganda, I am helping them unlearn it.
|
||||||
|
|
||||||
|
### But how can you so pretentiously preach "absolute love" and then say you hate capitalists, fascists, bloat etc.?
|
||||||
|
|
||||||
|
OK, firstly we do NOT love *everything*, we do NOT advocate against hate itself, only against hate of living beings (note we say we love *everyone*, not *everything*). Hating other things than living beings, such as some bad ideas or malicious objects, is totally acceptable, there's no problem with it. We in fact think hate of some concepts is necessary for finding better ways.
|
||||||
|
|
||||||
|
Now when it comes to *"hating"* people, there's an important distinction to be stressed: we never hate a living being as such, we may only hate their properties. So when we say we *hate* someone, it's merely a matter of language convenience -- saying we *hate* someone never means we hate a person as such, but only some thing about that person, for example his opinions, his work, actions, behavior or even appearance. I can hear you ask: what's the difference? The difference is we'll never try to eliminate a living being or cause it suffering because we love it, we may only try to change, in non-violent ways, their attributes we find wrong (which we *hate*): for example we may try to educate the person, point out errors in his arguments, give him advice, and if that doesn't work we may simply choose to avoid his presence. But we will never target hate against him.
|
||||||
|
|
||||||
|
And yeah, of course sometimes we make jokes and sarcastic comments, it is relied on your ability to recognize those yourself.
|
||||||
|
|
||||||
|
### So you really "love" everyone, even dicks like Trump, school shooters, instagram influencers etc.?
|
||||||
|
|
||||||
|
Yes, but it may need an elaboration. There are many different kinds of love: love of a sexual partner, love of a parent, love of a pet, love of a hobby, love of nature etc. Obviously we can't love everyone with the same kind of love we have e.g. for our life partner, that's impossible if we've actually never even seen most people who live on this planet. The love we are talking about -- our universal love of everyone -- is an unconditional love of life itself. Being alive is a miracle, it's beautiful, and as living beings we feel a sense of connection with all other living beings in this universe who were for some reason chosen to experience this rare miracle as well -- we know what it feels like to live and we know other living beings experience this special, mysterious privilege too, though for a limited time. This is the most basic kind of love, an empathy, the happiness of seeing someone else live. It is sacred, there's nothing more pure in this universe than feeling this empathy, it works without language, without science, without explanation. While not all living beings are capable of this love (a virus probably won't feel any empathy), we believe all humans have this love in them, even if it's being suppressed by their environment that often forces them compete, hate, even kill. Our goal is to awaken this love in everyone as we believe it's the only way to achieve a truly happy coexistence of us, living beings.
|
||||||
|
|
||||||
|
### I dislike this wiki, our teacher taught us that global variables are bad and that OOP is good.
|
||||||
|
|
||||||
|
This is not a question you dummy. Have you even read the title of this page? Anyway, your teacher is stupid, he is, very likely unknowingly, just spreading the capitalist propaganda. He probably believes what he's saying but he's wrong.
|
||||||
|
|
||||||
|
### Lol you've got this fact wrong and you misunderstand this and this topic, you've got bugs in code, your writing sucks etc. How dare you write about things you have no clue about?
|
||||||
|
|
||||||
|
I want a public domain encyclopedia that includes topics of new technology. Since this supposedly modern society failed to produce even a single one and since every idiot on this planet wants to keep his copyright on everything he writes, I am forced to write the encyclopedia myself, even for the price of making mistakes. No, US public domain doesn't count as world wide public domain. Blame this society for not allowing even a tiny bit of information to slip into public domain. Writing my own encyclopedia is literally the best I can do in the situation I am in. Nothing is perfect, I still believe this can be helpful to someone. You shouldn't take facts from a random website for granted. If you wanna help me correct errors, email me.
|
||||||
|
|
||||||
|
### How can you use [CC0](cc0.md) if you, as anarchists, reject laws and intellectual property?
|
||||||
|
|
||||||
|
We use it to **remove** law from our project. Using a [license](license.md) such as [GFDL](gfdl.md) would mean we're keeping our copyright and are willing to execute enforcement of intellectual property laws, however using a CC0 [waiver](waiver.md) means we GIVE UP all lawful exclusive rights that have been forced on us. This has no negative effects: if law applies, then we use it to remove itself, and if it doesn't, then nothing happens. To those that acknowledge the reality of the fact that adapting proprietary information can lead to being bullied by the state we give a guarantee this won't happen, and others simply don't have to care.
|
||||||
|
|
||||||
|
### What software does this wiki use?
|
||||||
|
|
||||||
|
[Git](git.md), the articles are written in [markdown](md.md) and converted to [HTML](html.md) with a simple script.
|
||||||
|
|
||||||
|
### I don't want my name associated with this, can you remove a reference to myself or my software from your wiki?
|
||||||
|
|
||||||
|
No.
|
||||||
|
|
||||||
|
### Are you the only one in the world who is not affected by the propaganda?
|
||||||
|
|
||||||
|
It definitely seems so.
|
||||||
|
|
||||||
|
### How does it feel to be the only one on this planet to see the undistorted truth of reality?
|
||||||
|
|
||||||
|
Pretty lonely and depressing.
|
||||||
|
|
||||||
|
### Are you a crank?
|
||||||
|
|
||||||
|
Depending on exact definition the answer is either "no" or "yes and it's a good thing".
|
||||||
|
|
||||||
|
### Are you retarded?
|
||||||
|
|
||||||
|
:( Maybe, but even a stupid person can sometimes have smart ideas.
|
7
fascism.md
Normal file
7
fascism.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Fascism
|
||||||
|
|
||||||
|
Fascist groups are subgroups of society that strongly pursue [self interest](self_interest.md) on the detriment of others (those who are not part of said group). Fascism is a [rightist](left_right.md), [competitive](competition.md) tendency; fascists aim to make themselves as strong, as powerful and as rich as possible, i.e. to weaken and possibly eliminate competing groups, to have power over them, enslave them and to seize their resources. The means of their operation are almost exclusively [evil](evil.md), including [violence](violence.md), [bullying](bully.md), [wars](war.md), [propaganda](propaganda.md), [eye for an eye](revenge.md), [slavery](slavery.md) etc.
|
||||||
|
|
||||||
|
A few examples of fascist groups are [corporations](corporation.md), [nations](nationalism.md), NSDAP ([Nazis](nazi.md)), [LGBT](lgbt.md), [feminists](feminism.md), [Antifa](antifa.md), [KKK](kkk.md), [Marxists](marxism.md) and, of course, the infamous Italian fascist party of Benito Mussolini.
|
||||||
|
|
||||||
|
Fascism is always bad and we have to aim towards eliminating it. However here comes a great warning: **in eliminating fascism be extremely careful to not become a fascist yourself**. We purposefully do NOT advice to *[fight](fight_culture.md)* fascism as fight implies violence, the tool of fascism. **Elimination of fascism has to be done in a [non-violent](nonviolence.md) way**. Sadly, generation after generation keeps repeating the same mistake over and over: they keep opposing fascism by fascist means, eventually taking the oppressors place and becoming the new oppressor, only to again be dethroned by the new generation. This has happened e.g. with [feminism](feminism.md) and other [pseudoleftist](pseudoleft.md) movements. This is an endless cycle of stupidity but, more importantly, endless suffering of people. This cycle needs to be ended. We must choose not the easy way of violence, but the difficult way of non-violent rejection which includes loving the enemy as we [love](love.md) ourselves. Fascism is all about loving one's own group while hating the enemy groups -- if we can achieve loving all groups of people, even fascists themselves, fascism will have been by definition eliminated.
|
3
fascist.md
Normal file
3
fascist.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Fascist
|
||||||
|
|
||||||
|
See [fascism](fascism.md).
|
5
feminism.md
Normal file
5
feminism.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Feminism
|
||||||
|
|
||||||
|
Feminism is a [fascist](fascism.md) [terrorist](terrorism.md) [pseudoleftist](pseudoleft.md) movement aiming for establishing female as the superior gender and for social revenge on men. Similarly to [LGBT](lgbt.md), feminism is hugely violent, [toxic](toxic.md) and harmful, based on [brainwashing](brainwashing.md), [bullying](bullying.md) (e.g. the [metoo](metoo.md) campaign) and [propaganda](propaganda.md).
|
||||||
|
|
||||||
|
If anything's clear, then that feminism doesn't care about gender equality. Firstly it is not called *gender equality movement* but *feminism*, i.e. for-female, and as we know, [name plays a huge role](name_is_important.md). Indeed, women have historically been oppressed and needed support, but once that support reaches equality -- which has basically already happened a long time ago now -- feminist movement will, if only by [social inertia](social_inertia.md), keep pursuing more advantages for women (what else should a movement called *feminism* do?), i.e. at this point the new goal has already become female superiority. Another proof is that feminists care about things such as wage gap but of course absolutely don't give a damn about opposite direction inequality, such as men dying on average much younger than women etc. And of course, when men establish "men rights" movements to address this, suddenly feminists see those as "fascist", "toxic" and "violent" and try to destroy such movements.
|
3
femoid.md
Normal file
3
femoid.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Femoid
|
||||||
|
|
||||||
|
See [woman](woman.md).
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue