This commit is contained in:
Miloslav Ciz 2022-06-07 21:20:30 +02:00
parent dd2c2a1f41
commit f7e0fb4b27
8 changed files with 46 additions and 10 deletions

View file

@ -102,6 +102,7 @@ Here is a list of some acronyms:
- **[FP](fp.md)** ([floating point](float.md)) - **[FP](fp.md)** ([floating point](float.md))
- **[FPGA](fpga.md)** (field programmable gate array) - **[FPGA](fpga.md)** (field programmable gate array)
- **[FPS](fps.md)** (frames per second, first person shooter) - **[FPS](fps.md)** (frames per second, first person shooter)
- **[FQA](fqa.md)** (frequently questioned answers)
- **[FS](fs.md)** (file system) - **[FS](fs.md)** (file system)
- **[FTP](ftp.md)** (file transfer protocol) - **[FTP](ftp.md)** (file transfer protocol)
- **[FU](fu.md)** (fuck you) - **[FU](fu.md)** (fuck you)

3
faq.md
View file

@ -1,7 +1,10 @@
# Frequently Asked Questions # Frequently Asked Questions
*Not to be confused with [frequently questioned answers](fqa.md).*
{ answers by ~drummyfish } { answers by ~drummyfish }
### Is this a joke? ### Is this a joke?
No. No.

3
fqa.md Normal file
View file

@ -0,0 +1,3 @@
# Frequently Questioned Answers
TODO: figure out what to write here

30
free_culture.md Normal file
View file

@ -0,0 +1,30 @@
# Free Culture
*Information wants to be free.*
Free (as in freedom) culture is a movement aiming for the relaxation of [intellectual property](intellectual_property.md) restrictions, mainly that of [copyright](copyright.md), to allow free usage, reusing and sharing of [artworks](art.md) and other kind of [information](information.md). Free culture argues that our society has gone too far in forcefully restricting the natural freedom of information by very strict laws (e.g. by authors holding copyright even 100 years after their death) and that we're hurting art, creativity, education and progress by continuing to strengthen restrictions on using, modifying ([remixing](remix.md)) and sharing things like [books](book.md), [music](music.md) and scientific papers. The word "free" in free culture refers to freedom, not price!
The promoters of free culture want to relax intellectual property laws ([copyright](copyright.md), [patents](patent.md), [trademarks](tm.md) etc.) but also promote an ethic of sharing and remixing being good (as opposed to the demonizing anti-"[piracy](piracy.md)" propaganda of today), they sometimes mark their works with words **"some rights reserved"**, as opposed to the traditional "all rights reserved".
Free culture is kind of a sister movement to the **[free software](free_software.md)** movement, in fact it has been inspired by it (we could call it its [fork](fork.md)). While free software movement, established in 1983, was only concerned with freedoms relating to computer program source code, free culture later (around 2000) took its ideas and extended them to all information including e.g. artworks and scientific data. There are **clearly defined criteria** for a work to be considered free (as in freedom) work, i.e. part of the body of free cultural works. The criteria are very similar to those of free software (the definition is at https://freedomdefined.org/Definition) and can be summed up as follows:
A free cultural work must allow anyone to (legally and practically):
1. **Use it** in any way and for any purpose, even commercially.
2. **Study it**.
3. **Share it**, i.e. redistribute copies, even commercially.
4. **Modify it** and redistribute the modified copies, even commercially.
Some of these conditions may e.g. further require a source code of the work to be made available (e.g. sheet music, to allow studying and modification). Some conditions may however still be imposed, as long as they don't violate the above -- e.g. if a work allows all the above but requires crediting the author, it is still considered free (as in freedom). [Copyleft](copyleft.md) (also share-alike, requirement of keeping the license for derivative works) is another condition that may be required. This means that many (probably most) free culture promoters actually rely and even support the concept of e.g. copyright, they just want to make it much less strict.
It was in 2001 when **[Lawrence Lessig](lessig.md)**, an American lawyer who can be seen as the movement's founder, created the **[Creative Commons](creative_commons.md)**, a non-profit organization which stands among the foundations of the movement as is very much connected to it. By this time he was already educating people about the twisted intellectual property laws and had a few followers. Creative Commons would create and publish a set of [licenses](license.md) that anyone could use to release their works under much less restrictive conditions than those that lawfully arise by default. For example if someone creates a song and releases it under the [CC-BY](cc_by.md) license, he allows anyone to freely use, modify and share the song as long as proper attribution is given to him. It has to be noted that **NOT all Creative Commons licenses are free culture** (those with NC and ND conditions break the above given rules)! It is also possible to use other, non Creative Commons licenses in free culture, as long as the above given criteria are respected.
In 2004 Lessig published his **book** called Free Culture that summarized the topic as well as proposed solutions -- the book itself is shared under a Creative Commons license and can be downloaded for free (however the license is among the non-free CC licenses so the book itself is not part of free culture [lmao](lmao.md), big fail by Lessig).
{ I'd recommend reading the Free Culture book to anyone whose interests lie close to free culture/software, it's definitely something you should start with. ~drummyfish }
In the book Lessig gives an overview of the history of copyright -- it has been around since about the time of invention of [printing press](printing_press.md) to give some publishers exclusive rights (an artificial [monopoly](monopoly.md)) for printing and publishing certain books. The laws evolved but at first were not so restrictive, they only applied to very specific uses (printing) and for limited time, plus the copyright had to be registered. Over time corporations pressured to make it more and more restrictive -- nowadays copyright applies to basically everything and lasts for 70 years AFTER the death of the author (!!!). This is combined with the fact that in the age of computers any use of information requires making a copy (to read something you need to download it), i.e. copyright basically applies to ANY use now. I.e. both scope and term of copyright have been extended to the extreme, and this was done even AGAINST the US constitution -- Lessig himself tried to fight against it in court but lost. This form of copyright now restricts culture and only helps corporations who want to e.g. **kill the [public domain](public_domain.md)** (works that run out of copyright and are now "free for everyone") by repeatedly prolonging the copyright term so that people don't have any pool of free works that would compete (and often win simply by being gratis) with the corporate created "content". In the books Lessig also mentions many hard punishments for breaking copyright laws and a lot of other examples of corruption of the system. He then goes on to propose solutions, mainly his Creative Commons licenses.
Free culture has become a relative success, the free Creative Commons licenses are now widely used -- e.g. **[Wikipedia](wikipedia.md) is part of free** culture under the [CC-BY-SA](cc_by_sa.md) license and its sister project [Wikimedia Commons](wm_commons.md) hosts over 80 million free cultural works! There are famous promoters of free culture such as [Nina Paley](nina_paley.md), webcomics, books, songs etc. In development of libre [games](game.md) free cultural licenses are used (alongside free software licenses) to liberate the game assets -- e.g. the [Freedoom](freedoom.md) project creates free culture content replacement for the game [Doom](doom.md). There are whole communities such as [opengameart](oga.md) or Blendswap for sharing free art, even sites with completely public domain stock photos, vector images, music and many other things. Many scientists release their data to public domain under [CC0](cc0.md). And of course, [LRS](lrs.md) highly advocated free culture, specifically [public domain](public_domain.md) under [CC0](cc0.md).
**BEWARE of fake free culture**: there are many resources that look like or even call themselves "free culture" despite not adhering to its rules. This may be by intention or not, some people just don't know too much about the topic -- a common mistake is to think that all Creative Commons licenses are free culture -- again, this is NOT the case (the NC and ND ones are not). Some think that "free" just means "gratis" -- this is not the case (free means freedom, i.e. respecting the above mentioned criteria of free cultural works). Many people don't know the rules of copyright and think that they can e.g. create a remix of some non-free pop song and license it under CC-BY-SA -- they CANNOT, they are making a derivative work of a non-free work and so cannot license it. Some people use licenses without knowing what they mean, e.g. many use CC0 and then ask for their work to not be used commercially -- this can't be done, CC0 specifically allows any commercial use. Some try to make their own "licenses" by e.g. stating "do whatever you want with my work" instead of using a proper waiver like CC0 -- this is with high probability legally unsafe and invalid, it is unfortunately not so easy to waive one's copyright -- DO use the existing licenses. Educate yourself and if you're unsure, ask away in the community, people are glad to give advice.

2
kek.md
View file

@ -1,6 +1,6 @@
# Kek # Kek
Kek means [lol](lol.md). It comes from [World of Warcraft](wow.md) where the two opposing factions (Horde and Alliance) were made to speak mutually unintelligibile languages so as to prevent enemy players from communicating; when someone from Horde typed "lol", an Alliance player would see him say "kek". The other way around (i.e. Alliance speaking to Horde) would render "lol" as "bur", however kek became the popular one. On the Internet this further mutated to forms like *kekw*, *topkek* etc. Nowadays in some places such as [4chan](4chan.md) kek seems to be used even more than lol, it's the newer, "cooler" way of saying lol. Kek means [lol](lol.md). It comes from [World of Warcraft](wow.md) where the two opposing factions (Horde and Alliance) were made to speak mutually unintelligibile languages so as to prevent enemy players from communicating; when someone from Horde typed "lol", an Alliance player would see him say "kek". The other way around (i.e. Alliance speaking to Horde) would render "lol" as "bur", however kek became the popular one. On the Internet this further mutated to forms like *kik*, kekw*, *topkek* etc. Nowadays in some places such as [4chan](4chan.md) kek seems to be used even more than lol, it's the newer, "cooler" way of saying lol.
## See Also ## See Also

View file

@ -1,10 +1,8 @@
# Optimization # Optimization
Optimization means making a program more efficient in terms of some metric such as speed or memory usage (but also others such as power consumption, network usage etc.) while preserving its functionality. Optimization means making a program more efficient in terms of consumption of some computing resource or by any similar metric, commonly aiming for greater execution speed or lower memory usage (but also e.g. lower power consumption, lower network usage etc.) while preserving how the program functions externally. Unlike [refactoring](refactoring.md), which aims primarily for a better readability of source code, optimization changes the inner behavior of the executed program to a more optimal one.
Unlike [refactoring](refactoring.md), optimization changes the behavior of the program to a more optimal one (but again, it doesn't change its functionality). ## General Tips'N'Tricks
## General Tips'n'Tricks
These are mainly for [C](c.md), but may be usable in other languages as well. These are mainly for [C](c.md), but may be usable in other languages as well.
@ -30,11 +28,12 @@ These are mainly for [C](c.md), but may be usable in other languages as well.
- Search literature for **algorithms with better [complexity class](complexity_class.md)** (sorts are a nice example). - Search literature for **algorithms with better [complexity class](complexity_class.md)** (sorts are a nice example).
- For the sake of embedded platforms **avoid [floating point](floating_point.md)** as that is often painfully slowly emulated in software. Use [fixed point](fixed_point.md). - For the sake of embedded platforms **avoid [floating point](floating_point.md)** as that is often painfully slowly emulated in software. Use [fixed point](fixed_point.md).
- **Early branching can create a speed up** (instead of branching inside the loop create two versions of the loop and branch in front of them). This is a kind of space-time tradeoff. - **Early branching can create a speed up** (instead of branching inside the loop create two versions of the loop and branch in front of them). This is a kind of space-time tradeoff.
- **You can optimize critical parts of code in [assembly](assembly.md)**, i.e. manually write the assembly code that takes most of the running time of the program, with as few and as inexpensive instructions as possible (but beware, popular compilers are very smart and it's often hard to beat them). But note that such code loses portability! So ALWAYS have a C (or whatever language you are using) [fallback](fallback.md) code for other platforms, use [ifdefs](ifdef.md) to switch to the fallback version on platforms running on different assembly languages.
## When to Actually Optimize? ## When To Actually Optimize?
Nubs often ask this. Generally fine, sophisticated optimization should come as one of the last steps in development, when you actually have a working thing. These are optimizations requiring significant energy/time to implement -- you don't want to spend resources on this at the stage when they may well be dropped in the end, or they won't matter because they'll be outside the bottleneck. However there are two "exceptions". Nubs often ask this. Generally fine, sophisticated optimization should come as one of the last steps in development, when you actually have a working thing. These are optimizations requiring significant energy/time to implement -- you don't want to spend resources on this at the stage when they may well be dropped in the end, or they won't matter because they'll be outside the bottleneck. However there are two "exceptions".
The highest-level optimization is done as part of the initial design of the program, before any line of code gets written. This includes the choice of data structures and mathematical models you're going to be using, the very foundation around which you'll be building your castle. This happens in your head at the time you're forming an idea for a program, e.g. you're choosing between [server-client](server_client.md) or [P2P](p2p.md), [monolithic or micro kernel](kernel.md), [raytraced](ray_tracing.md) or [rasterized](rasterization.md) graphics etc. These choices affect greatly the performance of your program but can hardly be changed once the program is completed, so they need to be made beforehand. **This requires wide knowledge and experience**. The highest-level optimization is done as part of the initial design of the program, before any line of code gets written. This includes the choice of data structures and mathematical models you're going to be using, the very foundation around which you'll be building your castle. This happens in your head at the time you're forming an idea for a program, e.g. you're choosing between [server-client](server_client.md) or [P2P](p2p.md), [monolithic or micro kernel](kernel.md), [raytraced](ray_tracing.md) or [rasterized](rasterization.md) graphics etc. These choices affect greatly the performance of your program but can hardly be changed once the program is completed, so they need to be made beforehand. **This requires wide knowledge and experience** as you work by intuition.
Another kind of optimization done during development is just automatically writing good code, i.e. being familiar with specific patterns and using them without much thought. For example if you're computing some value inside a loop and this value doesn't change between iterations, you just automatically put computation of that value **before** the loop. Without this you'd simply end up with a shitty code that would have to be rewritten line by line at the end. Another kind of optimization done during development is just automatically writing good code, i.e. being familiar with specific patterns and using them without much thought. For example if you're computing some value inside a loop and this value doesn't change between iterations, you just automatically put computation of that value **before** the loop. Without this you'd simply end up with a shitty code that would have to be rewritten line by line at the end. Yes, compilers can often do this simple kind of optimization for you, but you don't want to rely on it.

View file

@ -1,6 +1,6 @@
# Selflessness # Selflessness
Selflessness means acting with the intent of helping others without harming them, gaining edge over them or taking advantage of them or anyone else in any way. It is the opposite of [self interest](self_interest.md). Selflessness is the basis of an [ideal society](ideal_society.md) and [good technology](lrs.md) (while sadly self interest is the basis of our current dystopian [capitalist](capitalism.md) society). Selflessness means acting with the intent of helping others without harming them, gaining edge over them or taking advantage of them in any way. It is the opposite of [self interest](self_interest.md). Selflessness is the basis of an [ideal society](ideal_society.md) and [good technology](lrs.md) (while sadly self interest is the basis of our current dystopian [capitalist](capitalism.md) society).
Selflessness is about the **intent** behind behavior rather than about the behavior itself; for example being a [vegetarian](vegetarian.md) (or even [vegan](vegan.md)) for ethical reasons (to spare animals of suffering) is selfless while being a vegetarian only because of one's health concerns is not selfless. Similarly if a selfless behavior unpredictably results in harming someone, it is still a selfless behavior as long as the intent behind it was pure. (Note that this does **NOT** at all advocate the "[ends justify the means](ends_justify_the_means.md)" philosophy.) Selflessness is about the **intent** behind behavior rather than about the behavior itself; for example being a [vegetarian](vegetarian.md) (or even [vegan](vegan.md)) for ethical reasons (to spare animals of suffering) is selfless while being a vegetarian only because of one's health concerns is not selfless. Similarly if a selfless behavior unpredictably results in harming someone, it is still a selfless behavior as long as the intent behind it was pure. (Note that this does **NOT** at all advocate the "[ends justify the means](ends_justify_the_means.md)" philosophy.)

2
vim.md
View file

@ -1,6 +1,6 @@
# Vim # Vim
{ This is WIP, I use Vim but am not such guru really so there may appear some errors in the text, be aware of that. ~drummyfish } { This is WIP, I use Vim but am not such guru really so there may appear some errors, I know this topic is pretty religious so don't eat me. ~drummyfish }
Vim (Vi Improved) is a legendary [free as in freedom](free_software.md), fairly [minimalist](minimalism.md) and [suckless](suckless.md) [terminal](terminal.md)-only (no [GUI](gui.md)) [text editor](text_editor.md) for skilled programmers and hackers, possibly the best editor you can choose for text editing and [programming](programming.md). It is a successor of a much simpler editor [vi](vi.md) that was made in 1976 and which has become a standard text editor installed on every [Unix](unix.md) system. Vim added features like tabs, [syntax highlight](syntax_highlight.md), [scriptability](script.md), sessions and plugins and as such has become not just a simple text editor but an editor that can comfortably be used for [programming](programming.md) instead of any bloated [IDE](ide.md). Observing a skilled Vim user edit text is really like watching a magician or a literal movie hacker -- the editing is extremely fast, without any use of mouse, it transcends mere text editing and for some becomes something akin a way of life. Vim (Vi Improved) is a legendary [free as in freedom](free_software.md), fairly [minimalist](minimalism.md) and [suckless](suckless.md) [terminal](terminal.md)-only (no [GUI](gui.md)) [text editor](text_editor.md) for skilled programmers and hackers, possibly the best editor you can choose for text editing and [programming](programming.md). It is a successor of a much simpler editor [vi](vi.md) that was made in 1976 and which has become a standard text editor installed on every [Unix](unix.md) system. Vim added features like tabs, [syntax highlight](syntax_highlight.md), [scriptability](script.md), sessions and plugins and as such has become not just a simple text editor but an editor that can comfortably be used for [programming](programming.md) instead of any bloated [IDE](ide.md). Observing a skilled Vim user edit text is really like watching a magician or a literal movie hacker -- the editing is extremely fast, without any use of mouse, it transcends mere text editing and for some becomes something akin a way of life.