From 2358418fd2bd076d8adb6d3971085153afa2ba05 Mon Sep 17 00:00:00 2001 From: Miloslav Ciz Date: Mon, 7 Mar 2022 14:02:19 +0100 Subject: [PATCH] COOOOOM --- exercises.md | 57 ++++------------------------------------------------ hw.md | 2 +- living.md | 2 +- people.md | 5 +++-- woman.md | 4 ++-- 5 files changed, 11 insertions(+), 59 deletions(-) diff --git a/exercises.md b/exercises.md index d4e7dc0..d80e0b9 100644 --- a/exercises.md +++ b/exercises.md @@ -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. 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. -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? -4. In computer graphics, what is the difference between ray casting, ray tracing and path tracing? +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. In computer graphics, what is the difference between ray casting, ray tracing and path tracing? ## Solutions @@ -18,54 +17,6 @@ Both movements share very similar rules of licensing and technically free softwa **solution 2**: -``` -#include -#include - -#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: ``` @@ -75,11 +26,11 @@ for i := 0 to N: for i := 0 to N: for j := i + 1 to N: 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). -**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. \ No newline at end of file diff --git a/hw.md b/hw.md index 3e26204..a3dd6e7 100644 --- a/hw.md +++ b/hw.md @@ -1,3 +1,3 @@ # 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. \ No newline at end of file +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. \ No newline at end of file diff --git a/living.md b/living.md index b21b6d3..3ff7f60 100644 --- a/living.md +++ b/living.md @@ -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. - **[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. -- **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}). - **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} diff --git a/people.md b/people.md index 3f9ef91..a68793b 100644 --- a/people.md +++ b/people.md @@ -2,6 +2,7 @@ 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 - **[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 @@ -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 - **[Ó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) -- **[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 - **[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 -- **[viznut](viznut.md)** (Ville-Matias Heikkilä): creator or [countercomplex](countercomplex.md), minimalist programmer, hacker, [collapse](collapse.md) "prepper" \ No newline at end of file +- **[viznut](viznut.md)** (Ville-Matias Heikkilä): creator or [countercomplex](countercomplex.md), minimalist programmer, inventor of [bytebeat](bytebeat.md), hacker, [collapse](collapse.md) "prepper" \ No newline at end of file diff --git a/woman.md b/woman.md index 28baa9f..6d98e5d 100644 --- a/woman.md +++ b/woman.md @@ -1,8 +1,8 @@ # 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