This commit is contained in:
Miloslav Ciz 2022-03-07 14:02:19 +01:00
parent 4c73283f7c
commit 2358418fd2
5 changed files with 11 additions and 59 deletions

View file

@ -3,9 +3,8 @@
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. 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)? 1. What's the difference between [free software](free_software.md) and [open source](open_source.md)?
2. Write a program in [C](c.md) that computes the value of [pi](pi.md) without using float/double and any libraries except for `stdio.h` and `stdint.h` -- you can only use built-in integer types and those from `stdint.h`. The program must compute pi as accurately as possible (at least 2 decimals) and write the value out as base 10 decimal. 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: `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)? How did the asymptotic time complexity ("big O") class change?
3. 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: `for i := 0 to N: for j := 0 to N: if numbers[i] == numbers[j]: add(S,set(i,j))`. How can we optimize the algorithm in terms of its execution speed (i.e. make it perform fewer operations)? 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. In computer graphics, what is the difference between ray casting, ray tracing and path tracing?
## Solutions ## Solutions
@ -18,54 +17,6 @@ Both movements share very similar rules of licensing and technically free softwa
**solution 2**: **solution 2**:
```
#include <stdio.h>
#include <stdint.h>
#define DECIMALS 10000
int main(void)
{
int64_t previousError = 10000000000;
uint64_t previousPi = 0;
for (uint64_t gridSize = 2; gridSize < 200000; gridSize *= 2)
{
/* We'll sample a grid of points and count those that fall inside the
circle with radius of gridSize. Thanks to the 8-symmtery of a circle we
only sample the 1/8th of the plane. */
uint64_t inCircle = 0;
for (int y = 0; y < gridSize; ++y)
for (int x = y; x <= gridSize; ++x)
if ((x * x + y * y) / gridSize <= gridSize) // if distance is < radius
inCircle++; // count the point
// compute pi from the formula for circle area (area = 2 * pi * r):
uint64_t pi = (inCircle * 8 * DECIMALS) / (gridSize * gridSize);
int64_t error = pi - previousPi;
if (error < 0)
error *= -1;
if (error > previousError) // error got bigger due to overflows, stop
{
puts("that's it");
break;
}
previousError = error;
previousPi = pi;
printf("%d.%d\n",pi / DECIMALS,pi % DECIMALS);
}
}
```
**solution 3**:
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: 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:
``` ```
@ -75,11 +26,11 @@ for i := 0 to N:
for i := 0 to N: for i := 0 to N:
for j := i + 1 to N: for j := i + 1 to N:
if numbers[i] == numbers[j]: if numbers[i] == numbers[j]:
add(S,set(i,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). 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 4**: **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. 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.

2
hw.md
View file

@ -1,3 +1,3 @@
# Hardware # Hardware
Hardware (HW), as opposed to [software](sw.md), are the physical parts of a [computer](computer.md), i.e. the circuits, the mouse, keyboard, the printer etc. Hardware (HW), as opposed to [software](sw.md), are the physical parts of a [computer](computer.md), i.e. the circuits, the mouse, keyboard, the printer etc. Anything you can smash when the machine pisses you off.

View file

@ -23,7 +23,7 @@ Considering all things mentioned above, here are some concrete things of making
- **[donations](donation.md)**: You may ask for donations e.g. on your website or Patreon (people often ask for [cryptocurrencies](crypto.md) or traditional money via services like [Liberapay](liberapay.md), PayPal or Buy Me a Coffee). For significant earnings you need to be somewhat popular because people donate extremely rarely, but if your work is good, there sometimes appears a generous donor who sends you a lot of money ({Happened to me at least once. I hereby thank the person greatly. ~drummyfish}). It can help if you create "content" such as programming videos alongside your project to get some "following", but it may also distract you and take some of your energy. People like [Luke Smith](luke_smith.md) make quite some big money like this. A lot of [free culture](free_culture.md) artists are successful in creating free art this way. - **[donations](donation.md)**: You may ask for donations e.g. on your website or Patreon (people often ask for [cryptocurrencies](crypto.md) or traditional money via services like [Liberapay](liberapay.md), PayPal or Buy Me a Coffee). For significant earnings you need to be somewhat popular because people donate extremely rarely, but if your work is good, there sometimes appears a generous donor who sends you a lot of money ({Happened to me at least once. I hereby thank the person greatly. ~drummyfish}). It can help if you create "content" such as programming videos alongside your project to get some "following", but it may also distract you and take some of your energy. People like [Luke Smith](luke_smith.md) make quite some big money like this. A lot of [free culture](free_culture.md) artists are successful in creating free art this way.
- **[crowd funding](crowd_funding.md)**: A method similar to donations but a little more "encouraging" for the donors. You set a financial goal and if enough people donate to reach that goal, you get the money and create the project. Patreon and Kickstarter are typically used for this. - **[crowd funding](crowd_funding.md)**: A method similar to donations but a little more "encouraging" for the donors. You set a financial goal and if enough people donate to reach that goal, you get the money and create the project. Patreon and Kickstarter are typically used for this.
- **[pay what you want](pay_what_you_want.md)**: Here you create the work and then offer a download with optional payment, typically with some suggested price. People who can't afford to pay don't have to. This method has the advantage of not putting you under deadline pressures like the crowd funding method. Sites like [itch.io](https://itch.io/) are friendly to this option. - **[pay what you want](pay_what_you_want.md)**: Here you create the work and then offer a download with optional payment, typically with some suggested price. People who can't afford to pay don't have to. This method has the advantage of not putting you under deadline pressures like the crowd funding method. Sites like [itch.io](https://itch.io/) are friendly to this option.
- **selling physical products and [merchandise](merch.md)** ("merch"): This method makes use of the fact that selling physical items is usually not considered unethical, unlike selling copies of information. So you can e.g. create a [free](free_software.md) video [gameg](game.md) and then sell T-shirts or coffee mugs with that video game's themes. In the past some [GNU](gnu.md)/[Linux](linux.md) distros used to sell their systems on nice "officials" CDs, but nowadays CDs are kind of dead. [Open consoles](open_console.md) kind of do this as well, they create [FOSS](foss.md) games and tools and then sell hardware that runs these games. - **selling physical products and [merchandise](merch.md)** ("merch"): This method makes use of the fact that selling physical items is usually not considered unethical, unlike selling copies of information. So you can e.g. create a [free](free_software.md) video [game](game.md) and then sell T-shirts or coffee mugs with that video game's themes. In the past some [GNU](gnu.md)/[Linux](linux.md) distros used to sell their systems on nice "officials" CDs, but nowadays CDs are kind of dead. [Open consoles](open_console.md) kind of do this as well, they create [FOSS](foss.md) games and tools and then sell hardware that runs these games.
- You can specifically **make use of the advantages of LRS** and get some company to pay you. For example an [open console](open_console.md) creator will be highly interested in an engine for 3D games that will run on very low-spec embedded hardware because that will increase interest in their product. Existing FOSS engines, even the lightweight ones, are [bloated](bloat.md) and won't run on such hardware, however LRS ones, such as [small3dlib](small3dlib.md), will. Even if the company doesn't pay you directly, they might at least send you their product for free ({I got some open consoles for free for porting [Anarch](anarch.md) to them. ~drummyfish}). - You can specifically **make use of the advantages of LRS** and get some company to pay you. For example an [open console](open_console.md) creator will be highly interested in an engine for 3D games that will run on very low-spec embedded hardware because that will increase interest in their product. Existing FOSS engines, even the lightweight ones, are [bloated](bloat.md) and won't run on such hardware, however LRS ones, such as [small3dlib](small3dlib.md), will. Even if the company doesn't pay you directly, they might at least send you their product for free ({I got some open consoles for free for porting [Anarch](anarch.md) to them. ~drummyfish}).
- **selling services**: Like with merchandise, selling services is normally not considered unethical and so we can do it. The services can e.g. be running a server with [LRS](lrs.md) software with paid accounts or offering maintenance/configuration of someone else's servers. This supports the development of the software in question and helps you get paid. - **selling services**: Like with merchandise, selling services is normally not considered unethical and so we can do it. The services can e.g. be running a server with [LRS](lrs.md) software with paid accounts or offering maintenance/configuration of someone else's servers. This supports the development of the software in question and helps you get paid.
- **selling on proprietary sites** (CONTROVERSIAL): This may not be acceptable by everyone, but it can be possible to create a free work and then distribute it under [free](free_software.md) conditions in some places and simultaneously sell this item in places distributing [proprietary](proprietary.md) assets. E.g. one may create a 3D model and put it under a free license on [opengameart](oga.md) while also selling it in 3D models stores like TurboSquid -- this will make the model available for everyone as free but will make people who don't bother to search the free sites pay for it. This may potentially bring much more money than the other methods as the proprietary stores have big traffic and people there are specifically willing to spend money. However, this supports the [intellectual property](intellectual_property.md) business. **Important note**: read the terms&condition of the proprietary site, it may for example be illegal for you to share your assets elsewhere if the proprietary site makes you *sign* an exclusive deal for them. {I am actually guilty of this, been selling some small 3D models on TurboSquid. It provides a kind of stable mini-income of about $3/month. ~drummyfish} - **selling on proprietary sites** (CONTROVERSIAL): This may not be acceptable by everyone, but it can be possible to create a free work and then distribute it under [free](free_software.md) conditions in some places and simultaneously sell this item in places distributing [proprietary](proprietary.md) assets. E.g. one may create a 3D model and put it under a free license on [opengameart](oga.md) while also selling it in 3D models stores like TurboSquid -- this will make the model available for everyone as free but will make people who don't bother to search the free sites pay for it. This may potentially bring much more money than the other methods as the proprietary stores have big traffic and people there are specifically willing to spend money. However, this supports the [intellectual property](intellectual_property.md) business. **Important note**: read the terms&condition of the proprietary site, it may for example be illegal for you to share your assets elsewhere if the proprietary site makes you *sign* an exclusive deal for them. {I am actually guilty of this, been selling some small 3D models on TurboSquid. It provides a kind of stable mini-income of about $3/month. ~drummyfish}

View file

@ -2,6 +2,7 @@
This is a list of notable people in technology. This is a list of notable people in technology.
- **[Alan Turing](turing.md)**: mathematician, father of [computer science](compsci.md), [gay](gay.md)
- **[Bill Gates](bill_gates.md)**: founder and CEO of [Micro$oft](microsoft.md), huge faggot - **[Bill Gates](bill_gates.md)**: founder and CEO of [Micro$oft](microsoft.md), huge faggot
- **[Dennis Ritchie](dennis_ritchie)**: creator of [C](c.md) language and co-creator of [Unix](unix.md) - **[Dennis Ritchie](dennis_ritchie)**: creator of [C](c.md) language and co-creator of [Unix](unix.md)
- **[Donald Knuth](knuth.md)**: computer scientist, Turing-award winner, author of the famous [Art of Computer Programming](taocp.md) books and the [TeX](tex.md) typesetting system - **[Donald Knuth](knuth.md)**: computer scientist, Turing-award winner, author of the famous [Art of Computer Programming](taocp.md) books and the [TeX](tex.md) typesetting system
@ -18,8 +19,8 @@ This is a list of notable people in technology.
- **[Noam Chomsky](noam_chomsky.md)**: linguist notable in theoretical [compsci](computer_science.md), anarchist - **[Noam Chomsky](noam_chomsky.md)**: linguist notable in theoretical [compsci](computer_science.md), anarchist
- **[Óscar Toledo G.](toledo.md)**: programmer of tiny programs and [games](game.md) (e.g. the smallest [chess](chess.md) program), sadly [proprietary](proprietary.md) [winfag](windows.md) - **[Óscar Toledo G.](toledo.md)**: programmer of tiny programs and [games](game.md) (e.g. the smallest [chess](chess.md) program), sadly [proprietary](proprietary.md) [winfag](windows.md)
- **[Richard Stallman](rmd.md)**: inventor of [free software](free_software.md) and [copyleft](copyleft.md), founder of [GNU](gnu.md) and [FSF](fsf.md), hacker, also created [emacs](emacs.md) - **[Richard Stallman](rmd.md)**: inventor of [free software](free_software.md) and [copyleft](copyleft.md), founder of [GNU](gnu.md) and [FSF](fsf.md), hacker, also created [emacs](emacs.md)
- **[Steve Jobs](steve_jobs.md)**: founder and CEO of [Apple](apple.md) - **[Steve Jobs](steve_jobs.md)**: founder and CEO of [Apple](apple.md), huge retard and dickhead
- **[Ted Kaczynski](ted_kaczynski.md)**: AKA the Unabomber, mathematician, primitivist and murderer who pointed out the dangers of modern technology - **[Ted Kaczynski](ted_kaczynski.md)**: AKA the Unabomber, mathematician, primitivist and murderer who pointed out the dangers of modern technology
- **[Terry Davis](terry_davis.md)**: deceased schizophrenic genius, creator of [Temple OS](temple_os.md), became a tech [meme](meme.md) - **[Terry Davis](terry_davis.md)**: deceased schizophrenic genius, creator of [Temple OS](temple_os.md), became a tech [meme](meme.md)
- **[Uriel](uriel.md)**: deceased member of the [suckless](suckless.md) community, philosophical advisor - **[Uriel](uriel.md)**: deceased member of the [suckless](suckless.md) community, philosophical advisor
- **[viznut](viznut.md)** (Ville-Matias Heikkilä): creator or [countercomplex](countercomplex.md), minimalist programmer, hacker, [collapse](collapse.md) "prepper" - **[viznut](viznut.md)** (Ville-Matias Heikkilä): creator or [countercomplex](countercomplex.md), minimalist programmer, inventor of [bytebeat](bytebeat.md), hacker, [collapse](collapse.md) "prepper"

View file

@ -1,8 +1,8 @@
# Woman # Woman
A woman (also femoid) is one of two genders of humans, the other one being [man](man.md). Women are notoriously bad at [programming](programming.mg), [math](math.md) and [technology](technology.md): in the field they usually "work" on [bullshit](bullshit.md) (and harmful) positions such as "diversity", [marketing](marketing.md), "HR" or [UI](ui.md)/[user experience](ux.md). If they get close to actual technology, their highest "skills" are mostly limited to casual "[coding](coding.md)" (which itself is a below-average form of [programming](programming.md)) in a baby language such as [Python](python.md). Mostly they are just hired for quotas and make coffee for men who do the real work. A woman (also femoid) is one of two genders of humans, the other one being [man](man.md). Women are notoriously bad at [programming](programming.mg), [math](math.md) and [technology](technology.md): in the field they usually "work" on [bullshit](bullshit.md) (and harmful) positions such as some "diversity department", [marketing](marketing.md), "HR" or [UI](ui.md)/[user experience](ux.md). If they get close to actual technology, their highest "skills" are mostly limited to casual "[coding](coding.md)" (which itself is a below-average form of [programming](programming.md)) in a baby language such as [Python](python.md) or [Javascript](javascript.md). Mostly they are just hired for quotas and make coffee for men who do the real work.
But of course there exist exceptions, even though rare. The issue is women are very often involved with a cult such as the feminists who waste their effort on fighting men instead of focusing on study and creation of real technology, and on actually loving it. They don't see technology as a beautiful field of art and science, they see it as a battlefield, a political tool to be weaponized to achieve social status, revenge on society etc. They can't understand the pure joy of [programming](programming.md), the love of creation for its own sake, they think more in terms of "learning to code will get me new followers on social networks" etc. But of course there exist exceptions, even though rare. The issue is women are very often involved with a cult such as the feminists who waste their effort on fighting men instead of focusing on study and creation of real technology, and on actually loving it. They don't see technology as a beautiful field of art and science, they see it as a battlefield, a political tool to be weaponized to achieve social status, revenge on society etc. They can't understand the pure joy of [programming](programming.md), the love of creation for its own sake, they think more in terms of "learning to code will get me new followers on social networks" etc. You will never find a basement dweller programmer of female gender, a hacker who is happy existing in a world of his own programs without the need for approval or external reward, a woman will never be able to understand this.
# Women in Tech # Women in Tech