This commit is contained in:
Miloslav Ciz 2024-05-31 21:16:28 +02:00
parent e973c9d271
commit cbedf57724
16 changed files with 1912 additions and 1886 deletions

View file

@ -2,12 +2,9 @@
*Poor man's [Doom](doom.md)?*
Anarch is a [LRS](lrs.md)/[suckless](suckless.md), [free as in freedom](free_software.md) first man 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. It also tries to be compatible with principles of [less retarded society](less_retarded_society.md), i.e. it promotes [anarchism](anarchism.md), anti-[capitalism](capitalism.md), pacifism etc.
Anarch is a [LRS](lrs.md)/[suckless](suckless.md), [free as in freedom](free_software.md) ([public domain](public_domain.md)) first man shooter [game](game.md) similar to [Doom](doom.md), created completely from scratch 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. It also tries to be compatible with principles of [less retarded society](less_retarded_society.md), i.e. it promotes [anarchism](anarchism.md), anti-[capitalism](capitalism.md), pacifism etc.
The 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.
{ Though retrospectively I can of course see many mistakes and errors about the game and though it's not nearly perfect, I am overall quite happy about how it turned out for what it is, it got some attention among the niche of suckless lovers and many people have written me they liked the game and its philosophy. Many people have ported it to their favorite platforms, some have even written me their own expansions of the game lore, tricks they found etc. If you're among them, thank you :) ~drummyfish }
The 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. The 1.0 version was released on 1st December 2020, it was officially in the making since September 2019, but we may also see the inception of the game to be the start of [raycastlib](raycastlib.md) development in 2018.
```
h@\hMh::@@hhh\h@rrrr//rrrrrrrrrrrrrrrrrrrr@@@@hMM@@@M@:@hhnhhMnr=\@hn@n@h@-::\:h
@ -79,9 +76,15 @@ Saving/loading is optional, in case a platform doesn't have persistent storage.
In the suckless fashion, mods are recommended to be made and distributed as [patches](patch.md).
### Bad Things (Retrospective)
### Bad Things Plus Comments, Retrospective (/Post Mortem?)
The following is a retrospective look on what could have been done better, written by [drummyfish](drummyfish.md) (a potential project for someone might be to implement these and so make the game even more awesome):
*written by [drummyfish](drummyfish.md)*
Though retrospectively I can of course see many mistakes and errors about the game and though it's not nearly perfect, I am overall quite happy about how it turned out and for what it is overall, it got some attention among the niche of suckless lovers and many people have written me they liked the game and its philosophy. Many people have ported it to their favorite platforms, some have even written me their own expansions of the game lore, tricks they found etc. Some even created small mods. If you're among them, thank you :)
There were also a few people I've heard criticism from -- and that's absolutely fine -- that the game is just shit, too simple, badly designed, boring and so on. Indeed, about the quality of the game as such (from the "consumer's" point of view) I actually agree, the game isn't the most fun one to play, but when judging it please keep in mind the following. Firstly it was ALL made by a single man, absolutely from scratch -- if you've ever tried to create something from nothing, you know that despite it not looking that hard, it is indeed extremely difficult and time consuming to make something from the ground up, AND I couldn't even use any free assets, sound samples, game engines, not even fonts -- except for the programming language I had to create EVERYTHING from nothing, which required not only great amount of time, but also skills which I cannot master all: that of a visual artist, engineer, level designer, sound artist and so on and so forth. You only see the result but not the dozens of blind paths, hundreds of lines of rewritten code that was thrown to trash, hours and hours spent hunting down silly little bugs. All the skills needed for making a complete game are so vastly different that unless one is a genius, they cannot be mastered at once, one would simply have to be an excellent painter, writer, musician, mathematician, programmer, psychologist and many different things at once. Secondly I didn't work on it full time, I worked on other things, went to work, I was even hospitalized etc. Thirdly the goal wasn't to make a game that would be excellent by its gameplay AT ALL, the context of its creation was absolutely different from that of a typical game that has to try to appeal to many people, Anarch was focused on showing the technological side, prove a point of a certain development philosophy, and that mostly to rather a few people who want to make games themselves. By its philosophy it's also not meant to be a "fixed product" as is, again, common to think of games nowadays, it is really meant to be a basis for improvement, mods, a starting codebase for [forks](fork.md) and so on. So even though there are many shortcomings and things done plainly wrong, I think the main goal was more or less achieved, though some people miss to see that goal. If this philosophy of simplicity allows a single guy (quite average and in many ways retarded and that) to make a WHOLE game completely from scratch, with zero budget, only over weekend evenings, and that game is additionally very well made (extremely small, portable, modifiable, free, ...), what if let's say three brilliant people worked on it? What if five people worked on something similar full time? What marvels would we see? This is the number one question I wanted to highlight.
The following is a retrospective look on what could have been done better (a potential project for someone might be to implement these and so make the game even more awesome):
- It might have been better to write it in C89 than C99 for better portability.
- Sound effects would likely be better procedurally generated just like music. It would be less code and data in ROM and the quality probably wouldn't be that much worse as the samples are shitty quality anyway.

View file

@ -12,7 +12,7 @@ What is beautiful then? As stated, there is a lot of subjectivity, but generally
- **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.
- **unification**, i.e. if multiple nice things meet, for example the [Euler's identity](eulers_identity.md) brings together into one equation the most important numbers in mathematics: *i*, *pi*, 1 and 0.
- **aesthetics**, either of the equation itself or the generated thing (fractals, attractors, ...).
- **aesthetics**, either of the equation itself (or for example the source code) or the generated object ([fractals](fractal.md), attractors, ...).
- TODO
Examples of beautiful things include:

View file

@ -13,6 +13,7 @@ Here there will be a constantly WIP list of [books](book.md) that might be of in
- **Free Culture** (Lessig, 2004): Creative-commons licensed (non-free but gratis) book by the founder of [Creative Commons](creative_commons.md) and [free cutlure](free_culture.md), goes into details on how copyright became abused by capitalism, why public domain is being smothered and why we must support free culture.
- **Game Engine Black Book: Doom** (Sanglard, 2019): Gratis, very nice book dissecting all the details about the legendary [Doom](doom.md) engine and its internals -- how it worked, why was it so fast, what hacks went into it, written so that a reader of any programming skill (even none) will find something interesting. A must read for fans of oldschool game programming.
- **Game Engine Black Book: Wolfenstein 3D** (Sanglard, 2019): Same as the Doom engine book from the same author, just about the older game Wolfenstein 3D, also amazing.
- **Guinness Book of World Records, BEFORE 2000**: The older books were excellent, ideally get some from 80s or earlier, there are funny records like most rats killed by cat in one hour, most primitive languages and so on. Do NOT buy the new editions, these are uttermost absolute garbage equivalent to an expensive toilet paper.
- **Industrial Society and Its Future** (Kaczynski, 1995): A bit boring read by the famous [Unabomber](ted_kaczynski.md), criticizing rapid technology advancement, but an important read for those who are more into politics, if only for the memes :)
- **ISO/IEC 9899:1999** (1999): Specification of the version of [C](c.md) programming language that [suckless](suckless.md)/[LRS](lrs.md) very often uses. It's nice to skim over it to get an idea how a language is actually specified. You'll also probably learn something new about C in the process.
- **Just for Fun** (2001): Official biography of [Linus Torvalds](torvalds.md), the original creator of [Linux](linux.md). It recounts valuable historical moments with comments by Linus himself, revealing many interesting details and also a bit of Torvalds' personality (shows some of his evil side).

2
dog.md
View file

@ -21,6 +21,8 @@ Dog is the symbol of [cynics](cynicism.md).
## See Also
- [god](god.md)
- [woof](woof.md)
- [bark](bark.md)
- [Puppy Linux](puppy.md)
- [watchdog](watchdog.md)
- [cat](cat.md)

View file

@ -1,6 +1,6 @@
# Doom
Doom is a legendary video [game](game.md) released in December [1993](1990s.md), perhaps the most famous video game of all time, the game that popularized the [first man shooter](first_person_shooter.md) genre and shocked by its at the time extremely advanced [3D](pseudo_3D.md) graphics (yes, **Doom is 3D**) and caused one of the biggest revolutions in video game history. 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), it was originally distributed as [shareware](shareware.md) (a gratis "demo" was available for playing and sharing with the option to buy a full version). However the game 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](port.md) and "improved" "[modern](modern.md)" engines (which however look like shit, the original looks by far the best, if you want to play Doom use Chocolate Doom or Crispy Doom, avoid anything with GPU rendering). 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). Doom named a whole generation of so called [doomers](doomer.md).
Doom is a legendary video [game](game.md) released in December [1993](1990s.md), perhaps the most famous video game of all time, the game that popularized the [first man shooter](first_person_shooter.md) genre and shocked by its at the time extremely advanced [3D](pseudo_3D.md) graphics (yes, **Doom is 3D**) and caused one of the biggest revolutions in video game history. 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) -- all in all the game was developed by about 5 to 6 men in about a year. Doom is sadly [proprietary](proprietary.md), it was originally distributed as [shareware](shareware.md) (a gratis "demo" was available for playing and sharing with the option to buy a full version). However the game 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](port.md) and "improved" "[modern](modern.md)" engines (which however look like shit, the original looks by far the best, if you want to play Doom use Chocolate Doom or Crispy Doom, avoid anything with GPU rendering). 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). Doom named a whole generation of so called [doomers](doomer.md).
Doom has a cool wiki at https://doomwiki.org.
@ -28,11 +28,13 @@ Some **[interesting](interesting.md) things** about Doom:
Doom source code is written in [C89](c.md) and is about 36000 [lines of code](loc.md) long. The original system requirements stated roughly a 30 MHz [CPU](cpu.md) and 4 MB [RAM](ram.md) as a minimum. It had 27 levels (9 of which were shareware), 8 weapons and 10 enemy types. The engine wasn't really as flexible in a way "[modern](modern.md)" programmers expect, many things were hard coded, there was no [scripting](script.md) or whatever (see? you don't fucking need it), new games using the engine had to usually modify the engine internals.
The code itself looks alright, files are nicely organized into groups by their prefix (`g_`: game, `r_`: rendering, `s`: sound etc.). The same goes for the function names. There seems to be tabs mixed with spaces though, sometimes a bit shitty formatting, but overall MUCH better than [duke 3D](duke3D)'s code (well, that doesn't say much though). [Comments](comment.md) are plentiful.
The game only used [fixed point](fixed_point.md), no [float](float.md)!
The **Doom engine** (also called *id Tech 1*) was revolutionary and advanced (not only but especially) video game graphics by a great leap, considering its predecessor [Wolf3D](wolf3D.md) was really primitive in comparison (Doom basically set the direction for future trends in games such as driving the development of more and more powerful [GPUs](gpu.md) in a race for more and more impressive visuals). Doom used a technique called **[BSP rendering](bsp.md)** (levels were made of convex 2D sectors that were then placed in a BSP tree which helped quickly sort the walls for rendering front-to-back) that was able to render [realtime](realtime.md) 3D views of textured (all walls, floors and ceilings) environments with primitive lighting (per-sector plus diminishing lighting), enemies and items represented by 2D [billboards](billboard.md) ("[sprites](sprite.md)"). No [GPU](gpu.md) acceleration was used, graphics was rendered purely with [CPU](cpu.md) (so called [software rendering](sw_rendering.md), GPU rendering would come with Doom's successor [Quake](quake.md), and would also later be brought to Doom by newer community made engines, though the original always looks the best). This had its limitations, for example the camera could not look up and down, there could be no tilted walls and the levels could not have rooms above other rooms. The geometry of levels was only static, i.e. it could not change during play (only height of walls could), because rendering was dependent on precomputed BSP trees (which is what made it so fast). For these reasons some call Doom "[pseudo 3D](pseudo3d.md)" or 2.5D rather than "true 3D", some retards took this even as far as calling Doom 2D with its graphics being just an "illusion", as if literally every 3D graphics ever wasn't a mere illusion. 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. Other games later used the Doom engine, such as Heretic, Hexen and Strife. The Doom engine was similar to and competing with [Build](build_engine.md) engine that ran games like [Duke Nukem 3D](duke_3d.md), Blood and Shadow Warrior. All of these 90s shooters were amazing in their visuals and looked far better than any [modern](modern.md) shit. Build engine games had similar limitations to those of the Doom engine but would improve on them (e.g. faking looking up and down by camera tilting, which could in theory be done in Doom too, or allowing sloped floor and dynamic level geometry).
Indexed ([palette](palette.md)) mode with "only" 256 colors was used for rendering. Precomputed color tables were used to make dimming of colors faster.
Indexed ([palette](palette.md)) mode with "only" 256 colors was used for rendering. Precomputed color tables were used to make dimming of colors faster. Similarly a [look up table](lut.md) was used for [random number generation](rng.md) -- two independent [pseudorandom](pseudorandomness.md) generators are present, one is used for things such as visual effects while the other one is utilized purely for the game simulation so that it stays deterministic independently on graphics etc.
Doom also has a [deterministic](determinism.md) [FPS](fps.md)-independent physics which allows for efficient recording of [demos](demo.md) of its gameplay and creating [tool assisted speedruns](tas.md), i.e. the time step of game simulation is fixed (35 tics per second). Such demos can be played back in high quality while being minuscule in size and help us in many other ways, for example for verifying validity of [speedruns](speedrun.md). This is very nice and serves as an example of a well written engine (unlike later engines from the same creators, e.g. those of [Quake](quake.md) games which lacked this feature -- here we can see how things get progressively shittier in computer technology as we go forward in time).

View file

@ -1,6 +1,6 @@
# Duke Nukem 3D
Duke Nukem 3D (often just *duke 3D*) is a legendary first man shooter video [game](game.md) released in January 1996 (as [shareware](shareware.md)), one of the best known such games and possibly the second greatest 90s FPS right after [Doom](doom.md). It was made by 3D realms, a company competing with Id software (creators of Doom), in engine made by [Ken Silverman](key_silverman.md). Duke 3D is a big sequel to two previous games which were just 2D platformers; when this 3rd installment came out, it became a hit. It is remembered not only for being very technologically advanced, further pushing advanced fully textured 3D graphics that Doom introduced, but also for its great gameplay and above all for its humor and excellent parody of the prototypical 80s overtestosteroned [alpha male](chad.md) hero, the protagonist Duke himself -- it showed a serious game didn't have to take itself too seriously and became loved exactly for things like weird alien enemies or correct portrayal of [women](woman.md) as mere sexual objects which nowadays makes [feminists](feminism.md) screech in furious rage of thousand suns. Only idiots criticised it. Duke was later ported to other platforms (there was even a quite impressive 3D port for [GBA](gba.md)) and received a lot of additional "content".
Duke Nukem 3D (often just *duke 3D*) is a legendary first man shooter video [game](game.md) released in January 1996 (as [shareware](shareware.md)), one of the best known such games and possibly the second greatest 90s FPS right after [Doom](doom.md). It was made by 3D realms, a company competing with Id software (creators of Doom), in engine made by [Ken Silverman](key_silverman.md) -- the game was developed by around 10 people and was in the making since 1994. Duke 3D is a big sequel to two previous games which were just 2D platformers; when this 3rd installment came out, it became a hit. It is remembered not only for being very technologically advanced, further pushing advanced fully textured 3D graphics that Doom introduced, but also for its great gameplay and above all for its humor and excellent parody of the prototypical 80s overtestosteroned [alpha male](chad.md) hero, the protagonist Duke himself -- it showed a serious game didn't have to take itself too seriously and became loved exactly for things like weird alien enemies or correct portrayal of [women](woman.md) as mere sexual objects which nowadays makes [feminists](feminism.md) screech in furious rage of thousand suns. Only idiots criticised it. Duke was later ported to other platforms (there was even a quite impressive 3D port for [GBA](gba.md)) and received a lot of additional "content".
Of course, Duke is sadly [proprietary](proprietary.md), as most gaymes, though the source code was later released as [FOSS](foss.md) under [GPL](gpl.md) (excluding the game data and proprietary engine, which is only [source available](source_available.md)). A self-proclaimed [FOSS](foss.md) engine for Duke with GPU accelerated graphics exists: [EDuke32](eduke32.md) -- the repository is kind of a mess though and it's hard to tell if it is legally legit as there are parts of the engine's proprietary code (which may be actually excluded from the compiled binary), so... not sure.
@ -8,12 +8,16 @@ Duke was very much influenced by a very cool anticapitalist movie called *They L
## Code
The codebase (including Build engine) is roughly 100000 [LOC](loc.md) of [C](c.md), with some parts in [assembly](assembly.md).
The codebase (including Build engine) is roughly 100000 [LOC](loc.md) of [C](c.md), with some parts in [assembly](assembly.md). [Programming style](programming_style.md) looks like a disaster, formatting of the code isn't nicest (at least in the version reviewed here, got somewhere from the net), tabs are mixed with spaces, there are large parts of code commented out, inserting spaces and newlines is inconsistent, looks like a work in progress temporary code. There is A GREAT DEAL of [magic constants](magic_constant.md) and spaghetti code (for example just randomly found: *if* inside *while* inside *if* inside *if* inside *if* inside *else if* inside *switch* inside *while* -- doing it may be OK sometimes, but here it's all over the place constantly). Yes, there are even [gotos](goto.md). { I think John Carmack also said the code looked like complete garbage. ~drummyfish }
The original system requirements were roughly following: 66 MHz [CPU](cpu.md), 16 MB [RAM](ram.md) and 30 MB storage space.
Duke ran on **[Build](build.md) engine**, a legendary [software rendering](sw_rendering.md) [primitive 3D](pseudo_3d.md) engine that had limitations similar to those of [Doom](doom.md) engine, i.e. the camera could not genuinely rotate up or down (though it could fake this with kind of a "tilting") and things like rooms above other rooms in a level were allowed only in limited ways ([hacks](hacking.md) such as extra rendering passes or invisible teleports were used to allow this). The engine was not unsimilar to that of Doom, enemies and other objects were represented with 2D [sprites](sprite.md) and levels were based on the concept of sectors (a level was really made as a 2D map in which walls were assigned different heights and textures), however it had new features -- most notably [dynamic](dynamic.md) environment, meaning that levels could change on the fly without the need for [precomputation](precomputation.md), allowing e.g. destructible environments. How the fuck did they achieve this? Instead of [BSP](bsp.md) rendering (used by Doom) Build engine used **[portal rendering](portal_rendering.md)**: basically (put in a quite simplified way) there was just a set of sectors, some of which shared walls ("portals") -- rendering would first draw the sector the player stood in (from the inside of course) and whenever it encountered a portal wall (i.e. a wall that sees into another sector), it would simply [recursively](recursion.md) render that too in the same way -- turns out this was just fine. Other extra features of the engine included tilted floors and ceilings, fake looking up/down, 3rd man view etc. The Build engine was also used in many other games (most notably [Shadow Warrior](shadow_warrior.md) and [Blood](blood.md)) and later incorporated even more advanced stuff, such as [voxel](voxel.md) models, though these weren't yet present in Duke. Just like Doom, Build engine **only used [fixed point](fixed_point.md)**, no [float](float.md)! { Hmm, actually maybe there was a small exception, see the link below. ~drummyfish }
The game uses 256 colors and [palettes](palette.md).
[Pseudorandom](pseudorandomness.md) number generation is done with linear congruential generator (function `krand`), using multiplier 27584621 and adding 1, returning highest 16 bits of the result.
{ Here are some details on the engine internals from a guy who specializes on this stuff: https://fabiensanglard.net/duke3d/build_engine_internals.php. ~drummyfish }
## See Also

View file

@ -148,54 +148,57 @@ Bear in mind the main purpose of this quiz is for you to test your understanding
44. A [woman](woman.md) gave birth to two sons in the span of a single hour, i.e. they are of the same age, but they aren't twins. How is this possible?
45. Name at least two TCP/IP or OSI [network](network.md) layers: about each shortly explain its purpose, addressing and at least one protocol of this layer.
46. We know [HTTPS](https.md) is shit because it's [encrypted](encryption.md) and requires [certificates](certificate.md). Explain what these certificates are, why HTTPS needs them, how their absence could be "abused" and who issues them.
47. We have two barrels, one with water, one with wine, each having the same amount of liquid. We take a cup, fill it with water from the water barrel, pour it over to the wine barrel, mix it up, and then we fill the same cup with this mixture of water and wine from this barrel and pour it back to the water barrel. Both barrels now have the same amount of liquid again, but the liquids are mixed. What percentage of water is in the water barrel and what percentage of wine is in the wine barrel? Find a general formula for a cup of any size.
48. In context of programming languages explain the difference between *[lvalue](lvalue.md)* and *[rvalue](rvalue.md)* -- Where do they appear? What are they? How do they differ and what conditions are placed on each? Also place each of the following expressions under these categories (i.e. say which are lvalues, rvalues or both; details may depend on programming language, so just comment on that): `123`, `someVariable + 123`, `someArray[20]`, `*(somePointer + 4)`, `someVariable`.
49. Which star is the closest to [Earth](earth.md)?
50. A symmetric [relation](relation.md) is that for it hold that if A is in relation with B, then also B is in relation with A (for example "is married to"). Antisymmetric relation is that for which it holds that if A is in relation with B and A is distinct from B, then B is NOT in relation with A (for example "is parent of"). Give an example of relation that is both symmetric and antisymmetric.
51. Is [LGBT](lgbt.md) [good](good.md)?
52. Write a [C](c.md) function in 60 characters or fewer that takes a string (`char *`, consider zero terminated ASCII string) and replaces all semicolons in it with colons (`;` -> `:`). It can return nothing (`void`).
53. Order the following [people](people.md) by date of their birth from oldest: [Alan Turing](turing.md), Caesar, [Buddha](buddha.md) (Siddhartha Gautama), Johannes Gutenberg, Aristotle, [Charles Babbage](babbage.md), [Linus Torvalds](torvalds.md), [Jesus](jesus.md), [Adolf Hitler](hitler.md), Muhammad (prophet of Islam), [Albert Einstein](einstein.md), [Richard Stallman](rms.md), Napoleon, Leonardo da Vinci, [Karl Marx](marx.md).
54. Start with number 967; in each step you can either add all the digits (e.g. 456 -> 4 + 5 + 6 = 15), multiply all the digits (e.g. 45 -> 4 * 5 -> 20) or shuffle the digits in any way (e.g. 320 -> 23); your goal is to get to number 3. { This one is mine. ~drummyfish }
55. State at least 5 reasons for why [Rust](rust.md) sucks so much.
56. Find at least one function *f(x)* that's defined for all non-negative integers and for which it holds that *x + f(x) - f(x + 1) = 0*. (It's enough if you show a sequence of numbers with obvious continuation.)
57. What do we call a program that prints its own source code?
58. You receive a 1 bit (black&white) image of 8x8 resolution encoded as hexadecimal string 0xf91919ffff98989f. The string encodes consecutive rows of pixels from top to bottom, each pixel with 1 bit. What does the image show?
59. Show (even just geometrically) that for EVERY right triangle if we draw a circle going through all its vertices, the triangle's hypotenuse (longest side) will be the circle's diameter and the circle's center will lie in the middle of the hypotenuse.
60. What was the name of the computer that first beat the world [chess](chess.md) champion in an official match and in which year, with tolerance plus/minus 2, did it happen?
61. Consider the following set of numbers: 416, 81, 82, 69, 94, 28, 785, 44. Which of the following numbers belongs among them: 609, 11, 436, 88, 61 or 325?
62. As a programmer how would you represent a [set](set.md) that may contain integer numbers from 1 to 32 (including both)? What's the minimum number of bits you will need for storing this set? Additionally, how would you implement a multiset? I.e. what if you wanted to further allow any number in the set to potentially be present more than once (you can suppose an upper limit for this count at 255)? How many bits will you need then? Hint: set is much different from a list, for example order of its members doesn't matter.
63. What's heavier, 20 kilograms of black hole or 30 kilograms of nothing?
64. We have a village of 27 people; in upcoming elections 17 want to vote for candidate A and 10 for candidate B. People will be divided into 3 districts, each with 9 people -- in each district one candidate will be picked by majority of votes, and then the candidate who wins in most districts will win the elections. Sort people into districts so that candidate B wins.
65. Some rich faggot got himself a house with opening roof -- it's a flat roof that after a button press will start to slide and so enlarge the hole in the roof linearly from 0 to 10 m^2 over 10 seconds. Closing is the same, just in opposite direction. Some idiot pressed the button during rain, the roof is opening and it's raining in the house all over his stereo and home cinema, he will close the roof but he can only do it once it has opened completely (so it will be raining inside for 20 seconds). The rain's intensity is such that 1 m^2 of area catches 1 litre of water in 1 second. When the roof has closed, how much water has poured into the room?
66. Please tell me why a human without pressure suit diving under water to great depth will be rekt to pieces by the pressure while a small fish made out of jello is just fine under that enormous pressure.
67. Rewrite the following snippet so that it [doesn't perform any branching](branchless.md): `if (a > 10) a += 16; else a += 4;`. Watch out, you can't use the ternary operator (`a += a > 10 ? 16 : 4;`) because that's typically just a syntax sugar for a branch.
68. [Elon Musk's](elon_musk.md) net worth is about 200 billion USD, suppose he spends all his net worth on $1 prostitutes, how many times to the Moon and back would they reach? Suppose the length of a [woman](woman.md) with stretched arms is 2 meters, distance to the Moon 380000 km and neglect the fact that there are only 8 billion people on Earth. Also considering cost of normal living to be $30 per day and average life span 70 years how many lifetimes could he live off of this fortune?
69. Say we have a square digital image, i.e. a grid of pixels of resolution *N x N*. We want to scale it down to *N/2 x N/2*. For this we could subdivide the image into 2x2 blocks and out of each block take only one pixel, for example the top left one, discarding the three other pixels. However there is a danger in doing this -- for example downscaling a black and white [dithering](dithering.md) pattern (a kind of checker board) this way would result in either a completely black or completely white image, drastically changing the overall brightness of the whole image! What's this problem called and how could we prevent it?
70. Give numeric answers to queries that will follow, then compute average error against each correct answer; you want an error not greater than 3. Number of essential software freedoms defined by GNU. Year when Creative Commons non-profit was established. PDP 10 word size divided by 5 (use integer division). Century (its one-based sequential number) in which Western Roman Empire officially ended (lost its last emperor). Century in which [Nikola Tesla](tesla.md) was born. Year when first man set foot on the Moon.
71. You've probably seen a game freeze and become unresponsive and then you likely heard audio get stuck too in a weird way: a short piece of sound is just played over and over like a broken vinyl record. Why does this happen? How and WHY is audio typically implemented here?
72. Mention at least one advantage and one disadvantage of using [matrices](matrix.md) to represent transformations in 3D engines.
73. A nudist is lying completely horizontally on a beach with his dick pointed up towards the sky when a hot 16 year old jailbait walks by and he gets an erection, the sun is shining under the angle 20 degrees (measured from horizon), his dick is now pointed up completely vertically and casts a shadow that reaches up to his feet, i.e. the shadow (completely horizontal) has a length of 60 cm. How long is his dick (with erection)?
74. If your computer resides in a private network that's connected to the Internet through a router that performs network address translation ([NAT](nat.md), common with many ISPs), why you typically cannot host a server that would be publicly accessible from the outside [Internet](internet.md)? I.e. explain how NAT works and say what's preventing outside computers from reaching your server behind it. How can you make your server work even behind NAT?
75. We know that in C (C99) we can kind of use arrays and pointers "interchangeably", we are taught they are really the same. However show at least one example of when the difference matters, i.e. considering e.g. `int *a;` vs `int a[N];` write some expressions with `a` in it where the distinction will be significant.
76. Write sed substitution command (the one that starts with `s/`) that will convert Markdown links (format: `[link text](destination)`) to HTML links (format: `<a href="destination">link text</a>`). You probably need [regular expression](regex.md) capture groups for this.
77. Give at least three examples of palindromic English words (written the same forward and backwards), each at least four letters long.
78. Six extremely obese [women](woman.md) ([Rust](rust.md) developers) -- three normal and three lesbian -- want to get to a party that's in the sixth floor of a building. As they are morbidly obese using stairs is not an option, they have to take the lift. The lift is on the ground floor but its outside button is broken, it can only ride if there is at least one human inside it who controls it (and it also doesn't go to any other floor than the two), but it also cannot carry more than two women at once (remember, they are obese). Lesbian must never outnumber the normal women otherwise they wouldn't be able to control themselves and would rape them. The women are too dumb to solve the problem of how to get to the sixth floor without any rape happening, they call you to help them -- find a solution to this.
79. Does 0.999... (infinitely many 9s) equal 1?
80. If [capitalism](capitalism.md) is bad why are people migrating into capitalist countries such as [USA](usa.md)?
81. Why are low quality videos "blocky"?
82. What's the next number in the following sequence? 0, 1, 5, 19, 65, 211, 665, 2059, 6305, 19171, 58052, ???
83. Programming language specifications sometimes purposefully leave some behavior undefined -- for example [C](c.md) specification says that if you declare a local variable (variable inside a function), its initial value is undefined, even though the specification could have simply said the value of such variable has to be always zero which might be safer for programmers. Why do specifications purposefully choose to leave some things undefined like this?
84. What does [GNU](gnu.md) (Richard Stallman's project) stand for?
85. Is political correctness and censorship ever justified?
86. Firstly convert the expression *x + (1 + 2) / (3 - 4)* to [postfix notation](postfix.md) (also reverse Polish notation). State some major advantages of postfix notation against infix notation. Now please state disadvantage of postfix notation, especially that which would be significant if we e.g. use it for expression such as *myFunc(x,y,myFunc2(z))*.
87. What does the [demultiplexer](demultiplexer.md) logic circuit do? Give an example of when it's used. How is it related to [multiplexer](multiplexer.md)?
88. [Optical fiber](optical_fiber.md) cabels mustn't be bent too much -- one reason for this is that the fibers inside might crack, but another reason is related to the physics of how the light travels inside. What is this effect of optics called and why does it limit the bend radius?
89. We know that an [ellipse](ellipse.md) is a set of points in 2D plane that have constant sum of [distances](distance.md) to some two given points that are called *focal points*. What if we instead consider a taxicab distance (computed as distance alongside X axis plus distance alongside Y axis)? Consider the constant sum of distances to always be set higher than the taxicab distance of the two focal points. What shape will we get? Just describe the shape and intuitively show why it looks like that.
90. What does [Turing tarpit](turing_tarpit.md) mean?
91. =fgtnmtg qlcowj jakju lm vglcnr gjv dm gocl gjv qk vcjU
92. Please solve the following inequality: *sin(2 * x) / (2 - 2 * sin^2(x)) - log2(1 / 8^(-1/3)) >= 0*, mathematically write exactly which values of *x* will satisfy it. Don't use calculator, ok? But you can look up goniometric formulas etc.
93. Given continuous differentiable function *f(x)*, derive the formula for computing the length of the curve of the function graph on interval *[x1,x2]*. No need to provide 100% formal proofs, you can use intuition as long as you get the correct formula and show it works on a few examples. For example the length of the graph of function *f(x) = x* on interval *[0,1]* will be *sqrt(2)* (holds from Pythagorean theorem). Compute the length of curve of the graph of *f(x) = sin(x)* on interval *[0,2 * pi]*.
94. Did you enjoy this quiz?
47. What's the next number in this series: 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3?
48. We have two barrels, one with water, one with wine, each having the same amount of liquid. We take a cup, fill it with water from the water barrel, pour it over to the wine barrel, mix it up, and then we fill the same cup with this mixture of water and wine from this barrel and pour it back to the water barrel. Both barrels now have the same amount of liquid again, but the liquids are mixed. What percentage of water is in the water barrel and what percentage of wine is in the wine barrel? Find a general formula for a cup of any size.
49. In context of programming languages explain the difference between *[lvalue](lvalue.md)* and *[rvalue](rvalue.md)* -- Where do they appear? What are they? How do they differ and what conditions are placed on each? Also place each of the following expressions under these categories (i.e. say which are lvalues, rvalues or both; details may depend on programming language, so just comment on that): `123`, `someVariable + 123`, `someArray[20]`, `*(somePointer + 4)`, `someVariable`.
50. Which star is the closest to [Earth](earth.md)?
51. A symmetric [relation](relation.md) is that for it hold that if A is in relation with B, then also B is in relation with A (for example "is married to"). Antisymmetric relation is that for which it holds that if A is in relation with B and A is distinct from B, then B is NOT in relation with A (for example "is parent of"). Give an example of relation that is both symmetric and antisymmetric.
52. Is [LGBT](lgbt.md) [good](good.md)?
53. Write a [C](c.md) function in 60 characters or fewer that takes a string (`char *`, consider zero terminated ASCII string) and replaces all semicolons in it with colons (`;` -> `:`). It can return nothing (`void`).
54. Order the following [people](people.md) by date of their birth from oldest: [Alan Turing](turing.md), Caesar, [Buddha](buddha.md) (Siddhartha Gautama), Johannes Gutenberg, Aristotle, [Charles Babbage](babbage.md), [Linus Torvalds](torvalds.md), [Jesus](jesus.md), [Adolf Hitler](hitler.md), Muhammad (prophet of Islam), [Albert Einstein](einstein.md), [Richard Stallman](rms.md), Napoleon, Leonardo da Vinci, [Karl Marx](marx.md).
55. Start with number 967; in each step you can either add all the digits (e.g. 456 -> 4 + 5 + 6 = 15), multiply all the digits (e.g. 45 -> 4 * 5 -> 20) or shuffle the digits in any way (e.g. 320 -> 23); your goal is to get to number 3. { This one is mine. ~drummyfish }
56. State at least 5 reasons for why [Rust](rust.md) sucks so much.
57. Find at least one function *f(x)* that's defined for all non-negative integers and for which it holds that *x + f(x) - f(x + 1) = 0*. (It's enough if you show a sequence of numbers with obvious continuation.)
58. What do we call a program that prints its own source code?
59. You receive a 1 bit (black&white) image of 8x8 resolution encoded as hexadecimal string 0xf91919ffff98989f. The string encodes consecutive rows of pixels from top to bottom, each pixel with 1 bit. What does the image show?
60. Show (even just geometrically) that for EVERY right triangle if we draw a circle going through all its vertices, the triangle's hypotenuse (longest side) will be the circle's diameter and the circle's center will lie in the middle of the hypotenuse.
61. What was the name of the computer that first beat the world [chess](chess.md) champion in an official match and in which year, with tolerance plus/minus 2, did it happen?
62. Consider the following set of numbers: 416, 81, 82, 69, 94, 28, 785, 44. Which of the following numbers belongs among them: 609, 11, 436, 88, 61 or 325?
63. As a programmer how would you represent a [set](set.md) that may contain integer numbers from 1 to 32 (including both)? What's the minimum number of bits you will need for storing this set? Additionally, how would you implement a multiset? I.e. what if you wanted to further allow any number in the set to potentially be present more than once (you can suppose an upper limit for this count at 255)? How many bits will you need then? Hint: set is much different from a list, for example order of its members doesn't matter.
64. What's heavier, 20 kilograms of black hole or 30 kilograms of nothing?
65. We have a village of 27 people; in upcoming elections 17 want to vote for candidate A and 10 for candidate B. People will be divided into 3 districts, each with 9 people -- in each district one candidate will be picked by majority of votes, and then the candidate who wins in most districts will win the elections. Sort people into districts so that candidate B wins.
66. Some rich faggot got himself a house with opening roof -- it's a flat roof that after a button press will start to slide and so enlarge the hole in the roof linearly from 0 to 10 m^2 over 10 seconds. Closing is the same, just in opposite direction. Some idiot pressed the button during rain, the roof is opening and it's raining in the house all over his stereo and home cinema, he will close the roof but he can only do it once it has opened completely (so it will be raining inside for 20 seconds). The rain's intensity is such that 1 m^2 of area catches 1 litre of water in 1 second. When the roof has closed, how much water has poured into the room?
67. Please tell me why a human without pressure suit diving under water to great depth will be rekt to pieces by the pressure while a small fish made out of jello is just fine under that enormous pressure.
68. Rewrite the following snippet so that it [doesn't perform any branching](branchless.md): `if (a > 10) a += 16; else a += 4;`. Watch out, you can't use the ternary operator (`a += a > 10 ? 16 : 4;`) because that's typically just a syntax sugar for a branch.
69. [Elon Musk's](elon_musk.md) net worth is about 200 billion USD, suppose he spends all his net worth on $1 prostitutes, how many times to the Moon and back would they reach? Suppose the length of a [woman](woman.md) with stretched arms is 2 meters, distance to the Moon 380000 km and neglect the fact that there are only 8 billion people on Earth. Also considering cost of normal living to be $30 per day and average life span 70 years how many lifetimes could he live off of this fortune?
70. Say we have a square digital image, i.e. a grid of pixels of resolution *N x N*. We want to scale it down to *N/2 x N/2*. For this we could subdivide the image into 2x2 blocks and out of each block take only one pixel, for example the top left one, discarding the three other pixels. However there is a danger in doing this -- for example downscaling a black and white [dithering](dithering.md) pattern (a kind of checker board) this way would result in either a completely black or completely white image, drastically changing the overall brightness of the whole image! What's this problem called and how could we prevent it?
71. Give numeric answers to queries that will follow, then compute average error against each correct answer; you want an error not greater than 3. Number of essential software freedoms defined by GNU. Year when Creative Commons non-profit was established. PDP 10 word size divided by 5 (use integer division). Century (its one-based sequential number) in which Western Roman Empire officially ended (lost its last emperor). Century in which [Nikola Tesla](tesla.md) was born. Year when first man set foot on the Moon.
72. You've probably seen a game freeze and become unresponsive and then you likely heard audio get stuck too in a weird way: a short piece of sound is just played over and over like a broken vinyl record. Why does this happen? How and WHY is audio typically implemented here?
73. Mention at least one advantage and one disadvantage of using [matrices](matrix.md) to represent transformations in 3D engines.
74. A nudist is lying completely horizontally on a beach with his dick pointed up towards the sky when a hot 16 year old jailbait walks by and he gets an erection, the sun is shining under the angle 20 degrees (measured from horizon), his dick is now pointed up completely vertically and casts a shadow that reaches up to his feet, i.e. the shadow (completely horizontal) has a length of 60 cm. How long is his dick (with erection)?
75. If your computer resides in a private network that's connected to the Internet through a router that performs network address translation ([NAT](nat.md), common with many ISPs), why you typically cannot host a server that would be publicly accessible from the outside [Internet](internet.md)? I.e. explain how NAT works and say what's preventing outside computers from reaching your server behind it. How can you make your server work even behind NAT?
76. We know that in C (C99) we can kind of use arrays and pointers "interchangeably", we are taught they are really the same. However show at least one example of when the difference matters, i.e. considering e.g. `int *a;` vs `int a[N];` write some expressions with `a` in it where the distinction will be significant.
77. Write sed substitution command (the one that starts with `s/`) that will convert Markdown links (format: `[link text](destination)`) to HTML links (format: `<a href="destination">link text</a>`). You probably need [regular expression](regex.md) capture groups for this.
78. Give at least three examples of palindromic English words (written the same forward and backwards), each at least four letters long.
79. Six extremely obese [women](woman.md) ([Rust](rust.md) developers) -- three normal and three lesbian -- want to get to a party that's in the sixth floor of a building. As they are morbidly obese using stairs is not an option, they have to take the lift. The lift is on the ground floor but its outside button is broken, it can only ride if there is at least one human inside it who controls it (and it also doesn't go to any other floor than the two), but it also cannot carry more than two women at once (remember, they are obese). Lesbian must never outnumber the normal women otherwise they wouldn't be able to control themselves and would rape them. The women are too dumb to solve the problem of how to get to the sixth floor without any rape happening, they call you to help them -- find a solution to this.
80. Does 0.999... (infinitely many 9s) equal 1?
81. If [capitalism](capitalism.md) is bad why are people migrating into capitalist countries such as [USA](usa.md)?
82. Why are low quality videos "blocky"?
83. What's the next number in the following sequence? 0, 1, 5, 19, 65, 211, 665, 2059, 6305, 19171, 58052, ???
84. Programming language specifications sometimes purposefully leave some behavior undefined -- for example [C](c.md) specification says that if you declare a local variable (variable inside a function), its initial value is undefined, even though the specification could have simply said the value of such variable has to be always zero which might be safer for programmers. Why do specifications purposefully choose to leave some things undefined like this?
85. What does [GNU](gnu.md) (Richard Stallman's project) stand for?
86. Is political correctness and censorship ever justified?
87. Firstly convert the expression *x + (1 + 2) / (3 - 4)* to [postfix notation](postfix.md) (also reverse Polish notation). State some major advantages of postfix notation against infix notation. Now please state disadvantage of postfix notation, especially that which would be significant if we e.g. use it for expression such as *myFunc(x,y,myFunc2(z))*.
88. What does the [demultiplexer](demultiplexer.md) logic circuit do? Give an example of when it's used. How is it related to [multiplexer](multiplexer.md)?
89. [Optical fiber](optical_fiber.md) cabels mustn't be bent too much -- one reason for this is that the fibers inside might crack, but another reason is related to the physics of how the light travels inside. What is this effect of optics called and why does it limit the bend radius?
90. We know that an [ellipse](ellipse.md) is a set of points in 2D plane that have constant sum of [distances](distance.md) to some two given points that are called *focal points*. What if we instead consider a taxicab distance (computed as distance alongside X axis plus distance alongside Y axis)? Consider the constant sum of distances to always be set higher than the taxicab distance of the two focal points. What shape will we get? Just describe the shape and intuitively show why it looks like that.
91. What does [Turing tarpit](turing_tarpit.md) mean?
92. =fgtnmtg qlcowj jakju lm vglcnr gjv dm gocl gjv qk vcjU
93. Please solve the following inequality: *sin(2 * x) / (2 - 2 * sin^2(x)) - log2(1 / 8^(-1/3)) >= 0*, mathematically write exactly which values of *x* will satisfy it. Don't use calculator, ok? But you can look up goniometric formulas etc.
94. Given continuous differentiable function *f(x)*, derive the formula for computing the length of the curve of the function graph on interval *[x1,x2]*. No need to provide 100% formal proofs, you can use intuition as long as you get the correct formula and show it works on a few examples. For example the length of the graph of function *f(x) = x* on interval *[0,1]* will be *sqrt(2)* (holds from Pythagorean theorem). Compute the length of curve of the graph of *f(x) = sin(x)* on interval *[0,2 * pi]*.
95. Give correct answers to at least three of the following. Full name of an influential software engineering essay that's shortened as *catb*. Name of the creator and BDFL of the Perl language. First name (by which he was known) of a famous suckless and cat-v member who commited suicide in 2012. Name of [esolang](esolang.md) made in 1972 that's considered to be the first esolang ever. First name that was shared by the two most famous members of the [Doom](doom.md) development team, the engine programmer and level designer.
96. Write a function in C, in 100 characters or fewer, that counts the number of 1 bits in a number of `unsigned int` type.
97. Did you enjoy this quiz?
### Answers
@ -245,55 +248,58 @@ Bear in mind the main purpose of this quiz is for you to test your understanding
44. They are two of triplets (or quadruplets, ...).
45. For example: application layer (highest level layer, concerned with applications communicating with each other, addressing by ports, protocols: HTTP, Gopher, FTP, DNS, SSH, ...), transport layer (middle level layer, concerned with delivering data over a potentially unreliable channel, implements establishment of connection, handshakes, reliable delivery, delivering in correct order etc., protocols: TCP, UDP, ...), network layer (below transport layer, concerned with delivering packets over a network, implements routing, forwarding etc., addressing by IP addresses, i.e. numerical machine addresses, protocols: IPv4, IPv6, ...), OSI physical layer (lowest level layer, concerned with sending bits between two directly connected devices, works with frequencies, electronic circuits etc., no addressing, protocols: ethernet, USB, Bluetooth, ...), ...
46. Certificate is a file that contains the domain's public key (needed to communicate using asymmetric cryptography) that is [digitally signed](digital_signature.md) by some "trusted authority", a business that declares itself to be trusted and lets itself be paid for cryptographically confirming that public keys belong to specific servers. Without certificates a [man in the middle](man_in_the_middle.md) "attack" could be performed in which a middle man could sneakily swap a public key that's being exchanged for his own public key which would then allow him to listen to the unencrypted communication.
47. Let's say both barrels hold 1 unit of liquid volume at the beginning, *n* is the portion of one barrel we'll be pouring over (e.g. *n = 4* means 1/4th of a barrel), *x* is water, *y* is wine. At beginning we have the following in respective barrels: *x* and *y*. After first pour over we have: *x - x/n* and *y + x/n*. After pour back we'll have: *x - x/n + (y + x/n)/(n+1)* and *y + x/n - (y + x/n)/(n+1)*. Note: the division by *n + 1* is important, dividing by *n* would be an error (we are taking away a part of barrel that is over its original capacity). Now we can just simplify the expressions to see the amount of water and wine in each barrel, i.e. we'll get: *x * (1 - 1/n + 1/(n^2+n)) + y * 1/(n+1)* and *x * (1/n - 1/(n^2+n)) + y * (1 - 1/(n+1))*. So for example amount of water in the first barrel is *1 - 1/n + 1/(n^2+n)* which simplifies to *n/(n+1)* -- that is also the exact amount of wine in the other barrel (*1 - 1/(n+1)* simplifies to the same expression). So the answer is there is *n/(n+1)* of the barrel's original liquid (and 1 minus that of the other). Logically we see the purity of each barrel has to be the same just because of the conservation laws.
48. The details may differ from language to language, but generally *lvalues* and *rvalues* appear in assignment commands -- lvalue is any value or expression that may appear on the left side of assignment, rvalue is that which may appear on the right. For example in `myVariable = x + 4` the left side, `myVariable`, is lvalue, and the right side, `x + 4`, is rvalue. From this follow the conditions on lvalues and rvalues, i.e. rvalue must be something that returns some computed value and lvalue must be something that identifies a place where a value can be stored -- sometimes an expression can be both lvalue and rvalue at the same time. Examples: `123` is rvalue, `someVariable + 123` is rvalue, `someArray[20]` is both lvalue and rvalue, `*(somePointer + 4)` is also both and `someVariable` is both too.
49. The Sun. Some people get tricked here, not realizing Sun is a star.
50. For example "is equal to" or empty relation (no element is in relation with any other). For such a relation it must generally hold that any element may only be in relation with itself.
51. hell no
52. For example: `void r(char *s) { while (*s) s += (*s -= *s == ';') != 0; }`;
53. Buddha (< -480), Diogenes (-404), Aristotle (-384), Caesar (-100), Jesus (around -5), Muhammad (around 570), Gutenberg (around 1400), Da Vinci (1452), Napoleon (1769), Babbage (1791), Marx (1818), Einstein (1879), Hitler (1889), Turing (1912), Stallman (1953), Torvalds (1969).
54. `967 (*) --> 378 (*) --> 168 (*) --> 48 (+) --> 12 (+) --> 3`.
55. For example: it's bloated, slow, can't be compiled on good computers, it's tranny software with toxic fascist community, it has issues with legal freedom (trademarks), it has [code of censorship](coc.md), it has no specification, it's obsessed with "safety", the name is complete shit, it is associated with [corporations](corporation.md), has some abomination of [OOP](oop.md), it's littered with dependencies, it's [capitalist monopoly software](capitalist_software.md), it's trying to displace [C](c.md), it is hosted on [GitHub](github.md), the users are and devs idiots and so on and so forth.
56. We can rewrite the condition as *f(x + 1) = f(x) + x* from which it's clear that the next number in the sequence is the previous one minus its position (a bit similar to [Fibonacci](fibonacci.md) sequence), so for example this sequence will satisfy the equation: 0, 0, 1, 3, 6, 10, 15, ...
57. [quine](quine.md)
58. swastika
59. Draw any right triangle; drawing an identical triangle mirrored by the hypotenuse clearly makes the both triangles together form a rectangle (it can be shown generally all angles in it will always be 90 degrees) in which the hypotenuse (that the both triangles share) is the rectangle's diagonal. Now draw also the other diagonal of the rectangle. If we draw a circle going through all the rectangle's verticles (which is the same circle that goes through the original triangle's vertices), it is clear (e.g. just by symmetries) its center lies in the middle of the rectangle, i.e. on the intersection of the diagonals; i.e. the circle's center lies in the middle of the hypotenuse, which also implies the hypotenuse is the circle's diameter (it's a straight line going through the circle's center).
60. [Deep Blue](deep_blue.md), 1997
61. 436; in the original group each number's digits have a total count of closed loops equal to 2.
62. The most common and natural way is to use a [bit field](bit_field.md), i.e. an "array of bits" -- position of each bit is associated with an object that may potentially be present in the set and the bit's value then says if the object really is present or not. We want to be able to store 32 numbers, so we'll need 32 bits; the lowest bit says if number 1 is present, the next one says if number 2 is present etc. So we can really just use one 32 bit number to store this whole set. Implementing multiset is similar, we just allocate more bits for each potential member to indicate the count; in our case we suppose maximum value 255 so we can use 8 bits for each member (in C we would naturally implement this as an array of bytes), so we'll need 32 * 8 = 256 bits.
63. I don't know lol. (That's the correct answer, it shows we can't know everything.)
64. District one: all A voters, district two and three will each have 5 B voters and 4 A voters.
65. The area of the roof hole says the rate at which the water pours in, we have to [integrate](integral.md) the hole area over the 20 seconds. We can split this to two parts that we'll add: from 0 to 10 seconds the function that says the area of the hole is simply *f1(t) = t*; from 10 to 20 seconds we can use a function *f2(t) = 10 - t* from 0 to 10 seconds. Integral of *f1* is *1/2 * t^2* which at *t = 10* gives us 50 litres; integral of *f2* is *10 * t - 1/2 * t^2* which also gives 50 litres (it's logical -- opening and closing of the roof is symmetric, same amount of water will fall in). So all in all there will be 100 litres of water in the room.
66. Well, it's not the pressure alone that destroys you, it's the difference of external and internal pressure -- human has air of atmospheric pressur in his lungs and other parts of body but the pressure in the depth is greater and overpowers it, so you implode. The fish is happy because it has water inside it, the pressures are in balance.
67. something like ` a += 4 << ((a > 10) << 1);`
68. About 1052 distances to the Moon, about 260926 lives.
69. It's called [aliasing](aliasing.md), it's addressed by [antialiasing](antialiasing.md) which usually suppresses or removes the effect by increasing the sampling frequency, in our case of downscaling image this would mean replacing each of the small 2x2 blocks by an average pixel value in that block, i.e. taking into account all four samples as opposed to just one.
70. 4, 2001, 7 (the word size is 36), 5 (year 476), 19 (year 1856), 1969.
71. Continuous audio is normally implemented with a [circular buffer](circular_buffer.md) -- that is we have a buffer of audio samples of certain size *N* and that is being played over and over, with the play head going from start to finish and then back to start again; the program has to keep updating this buffer regularly to fill it with new samples to play and it has to keep ahead of the play head. Circular buffer is nice because we don't have to shift it as a whole (which would require moving a lot of values in memory), the only thing that is moving is the play head, that's why it's used as opposed to e.g. a queue. When a game freezes, it stops operating correctly and it stops updating the audio buffer, so whatever is in it will just be played over and over in a loop.
72. Main advantage is that a matrix can hold any combination of transformations and that applying all the transformations is then simply performed by performing a single matrix multiplication which additionally may be implemented with quite fast matrix multiplication algorithms. Not only can a matrix represent for example the whole translation+rotation+scale transformation of a single object, it can hold any number of such transformations performed in any order so that we can for example precompute a matrix that will perform world transformation, camera space transformation and view space transformations all at once! That's very fast. Disadvantages of matrices may be that they can only hold affine transformations (i.e. they can't represent ANY transformation whatsoever), it may also be a bit harder to extract back the parameters of the transformation from a matrix (though it can be done) etc. Also in case of some extreme memory limitations matrices may take up more space than would be strictly needed.
73. From the right triangle: *dick_legth / shadow_length = tan(20 degrees) => dick_legth = tan(20 degrees) * shadow_length ~= 21.83 cm*.
74. Behind NAT you're in a private network, computers inside it have no public addresses (their IP addresses are in the private range and potentially same as addresses of computers in other private networks), only the router has a public IP address that's unique within the Internet, i.e. from Internet's point of view there is only one device connected -- your router. Computers behind this router are invisible, so no one can connect to the server that's behind it. The possibility of you having a two way communication from within this private network with the outside Internet is enabled by the router who communicates for you when you ask for it, i.e. when you (from inside the private network) initiate the connection -- the router then creates the connection for you and talks to the outside world for you (translating your private address to its public address, hence *network address translation*). But no one can initiate communication from the outside, the router wouldn't know to whom he wants to speak. This can be solved e.g. by port forwarding (setting some default computer to which communication from outside will be redirected) or tunneling (keeping a constant connection with some outside proxy server that's listening to requests and resending them).
75. For example `sizeof(a)`: if `a` is a pointer, size of pointer will be returned whereas in case of array the size of the whole array will be returned. Similarly e.g. `&a`: if `a` is a pointer, we'll get a pointer to pointer (generally a different address) whereas in case of array `a` and `&a` gives the same address -- that of the array's first element (though the type will be different).
76. Something like `s/\[\([^]]*\)\](\([^)]*\))/<a href="\2">\1<\/a>/g`.
77. For example: poop, boob, civic, deed, level, rotor, madam, refer, stats etc.
78. For example (`L` = lesbian, `N` = normal): `LLLNNN *|` -> `NNNL |* LL` -> `NNNLL *| L` -> `NNN |* LLL` -> `NNNL *| LL` -> `NL |* NNLL` -> `NNLL *| NL` -> `LL |* NNNL` -> `LLL *| NNN` -> `L |* NNNLL` -> `LL *| NNNL` -> `|* NNNLLL`.
79. yes (look it up)
80. For the same reason mosquitoes fly into the mosquito killer lamps -- they have microscopic brains.
81. Possibly for several reasons but the most prominent one is likely that video codecs typically try to save space by not saving every frame of the video as a picture but rather encode movements of small blocks into which keyframes (static pictures saved at relatively low "FPS") are chopped. This exploits temporal redundancy -- the fact that frames close in time are similar to one another, i.e. that knowing one frame we can most likely get approximate version of the next frame by splitting the current frame into blocks and just moving them around a bit. Of course this doesn't work perfectly and low bitrate or nontypical scenes can make the blocks highly visible. It would be possible to come up with similar methods that don't use blocks and may look prettier but rectangular blocks of pixels are very easy and fast to work with and the results look good enough, so they are usually used. Another reason for blockiness of videos may be e.g. that the keyframes themselves are compressed with some lossy JPEG-like compression that makes them "blocky".
82. 175099, formula for the series is *3^n - 2^n*.
83. To allow efficient implementations. By saying "we don't force you to do this" the specification gives those who implement it a freedom to do it in the most efficient way possible, depending on the specific technology they have at hand. Of course this can get tricky, but correctly choosing what to define versus what to leave undefined leads to very efficient languages. Imagine for example an instruction manual for making a boat: it may also leave the choice of its body shape up to you, you will choose the best shape depending on your situation (You want a stable boat? Fast boat? Cheap boat? Is this shape easier to make from material you have at hand? Etc.).
84. GNU is Not Unix.
85. no
86. *x 1 2 + 3 4 - / +*; Advantages are for example not needing brackets at all and simple parsing and evaluation, for example we don't have to care about operator precedence. Disadvantages may be e.g. lower readability; we also have to know each operator's arity because from postfix notation it can't be deduced -- with infix notation expression *myFunc(x,y,myFunc2(z))* it is clear that *myFunc* takes 3 arguments and *myFunc2* takes 1, but if we convert it to postfix notation, we get *x y z myFunc2 myFunc3*, from which it isn't clear how many arguments each function takes.
87. It's a circuit that on its input takes data and output address -- a number from 0 to *N - 1* -- and that sends the data to one of *N* output ports (identified by the given address). It can be imagined like a switch that redirects an input stream to one of *N* output channels. Its use may be for example to redirect input data, for example audio, to one of several output devices, for example speakers, headphones and audio recorders. Multiplexer is a circuit that does the opposite (i.e. chooses input from *N* channels that is then sent to a single output channel).
88. Total internal refraction -- light travelling in the fibers bounces off of the walls of the fiber, but in order to bounce (be reflected) when it hits the boundary it must hit it under an angle that's smaller than so called critical angle which is calculated from the indices of refraction of the fiber and the material outside of it. If the cable was bent too much, light could hit the boundary under and angle close to perpendicular and by this it would escape to the outside medium.
89. Kind of octagon but with unevenly long sides; a rectangle with bevelled corners, i.e. two horizontal sides, two vertical sides, two 45 degree walls and two 135 degree walls. We can imagine taxicab distance from given point like sort of a diamond, it creates 4 quadrants around the point, in each the distance increases linearly in diagonal direction -- regions of constant distance here form 45 degree angled squares. Boundaries between these quadrants form a cross of infinite size. Taking two different points these two crosses will overlap and form 9 regions (draw it): top-left, top-middle, top-right, middle-left etc. Examining each of the regions we will find that it either keeps the increasing direction the same (if both overlaid directions are the same) or that some principal direction cancels out and leave the sum increasing only in one principal direction -- basically we find that in each of those regions the sum increases linearly in one of 8 directions separated by 45 degrees (except for the middle region where the sum is constant). It's also clear the heightmap has to stay continuous as both of the summed functions are continuous. From all this we can deduce the shape basically.
90. It's a [Turing complete](turing_complete.md) system (typically a [programming language](programming_language.md)) that's however extremely hard to use for any practical programming, i.e. it can be seen as a programming language in which it is theoretically possible to program anything (anything programmable in any other language) but practically it's impossible to program anything significant because of the complicated nature of that language. This terms is related to [esoteric languages](esolang.md).
91. [Earth](earth.md) or jvpcG. The cipher reverses the ASCII string and xors every byte (that's not a space) with 0x02 (i.e. flips the second lowest bit) -- don't bitch too much about this being too arbitrary, you can notice the string is reversed by the last character being uppercase and the first one being special char (?), then you can kind of recognize the words as the encoded chars are close to their decoded versions and the lengths of the words also hint on the words (for example a question is quite likely to start with "What").
92. Let's simplify the left-hand side: *sin(2 * x) / (2 - 2 * sin^2(x)) - log2(1 / 8^(-1/3)) = 2 * sin(x) * cos(x) / (2 * (1 - sin^2(x))) - log2(8^1/3) = 2 * sin(x) * cos(x) / (2 * cos^2(x)) - log2(2) =
47. 2, the series says the number of 1 bits in numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, ...
48. Let's say both barrels hold 1 unit of liquid volume at the beginning, *n* is the portion of one barrel we'll be pouring over (e.g. *n = 4* means 1/4th of a barrel), *x* is water, *y* is wine. At beginning we have the following in respective barrels: *x* and *y*. After first pour over we have: *x - x/n* and *y + x/n*. After pour back we'll have: *x - x/n + (y + x/n)/(n+1)* and *y + x/n - (y + x/n)/(n+1)*. Note: the division by *n + 1* is important, dividing by *n* would be an error (we are taking away a part of barrel that is over its original capacity). Now we can just simplify the expressions to see the amount of water and wine in each barrel, i.e. we'll get: *x * (1 - 1/n + 1/(n^2+n)) + y * 1/(n+1)* and *x * (1/n - 1/(n^2+n)) + y * (1 - 1/(n+1))*. So for example amount of water in the first barrel is *1 - 1/n + 1/(n^2+n)* which simplifies to *n/(n+1)* -- that is also the exact amount of wine in the other barrel (*1 - 1/(n+1)* simplifies to the same expression). So the answer is there is *n/(n+1)* of the barrel's original liquid (and 1 minus that of the other). Logically we see the purity of each barrel has to be the same just because of the conservation laws.
49. The details may differ from language to language, but generally *lvalues* and *rvalues* appear in assignment commands -- lvalue is any value or expression that may appear on the left side of assignment, rvalue is that which may appear on the right. For example in `myVariable = x + 4` the left side, `myVariable`, is lvalue, and the right side, `x + 4`, is rvalue. From this follow the conditions on lvalues and rvalues, i.e. rvalue must be something that returns some computed value and lvalue must be something that identifies a place where a value can be stored -- sometimes an expression can be both lvalue and rvalue at the same time. Examples: `123` is rvalue, `someVariable + 123` is rvalue, `someArray[20]` is both lvalue and rvalue, `*(somePointer + 4)` is also both and `someVariable` is both too.
50. The Sun. Some people get tricked here, not realizing Sun is a star.
51. For example "is equal to" or empty relation (no element is in relation with any other). For such a relation it must generally hold that any element may only be in relation with itself.
52. hell no
53. For example: `void r(char *s) { while (*s) s += (*s -= *s == ';') != 0; }`;
54. Buddha (< -480), Diogenes (-404), Aristotle (-384), Caesar (-100), Jesus (around -5), Muhammad (around 570), Gutenberg (around 1400), Da Vinci (1452), Napoleon (1769), Babbage (1791), Marx (1818), Einstein (1879), Hitler (1889), Turing (1912), Stallman (1953), Torvalds (1969).
55. `967 (*) --> 378 (*) --> 168 (*) --> 48 (+) --> 12 (+) --> 3`.
56. For example: it's bloated, slow, can't be compiled on good computers, it's tranny software with toxic fascist community, it has issues with legal freedom (trademarks), it has [code of censorship](coc.md), it has no specification, it's obsessed with "safety", the name is complete shit, it is associated with [corporations](corporation.md), has some abomination of [OOP](oop.md), it's littered with dependencies, it's [capitalist monopoly software](capitalist_software.md), it's trying to displace [C](c.md), it is hosted on [GitHub](github.md), the users are and devs idiots and so on and so forth.
57. We can rewrite the condition as *f(x + 1) = f(x) + x* from which it's clear that the next number in the sequence is the previous one minus its position (a bit similar to [Fibonacci](fibonacci.md) sequence), so for example this sequence will satisfy the equation: 0, 0, 1, 3, 6, 10, 15, ...
58. [quine](quine.md)
59. swastika
60. Draw any right triangle; drawing an identical triangle mirrored by the hypotenuse clearly makes the both triangles together form a rectangle (it can be shown generally all angles in it will always be 90 degrees) in which the hypotenuse (that the both triangles share) is the rectangle's diagonal. Now draw also the other diagonal of the rectangle. If we draw a circle going through all the rectangle's verticles (which is the same circle that goes through the original triangle's vertices), it is clear (e.g. just by symmetries) its center lies in the middle of the rectangle, i.e. on the intersection of the diagonals; i.e. the circle's center lies in the middle of the hypotenuse, which also implies the hypotenuse is the circle's diameter (it's a straight line going through the circle's center).
61. [Deep Blue](deep_blue.md), 1997
62. 436; in the original group each number's digits have a total count of closed loops equal to 2.
63. The most common and natural way is to use a [bit field](bit_field.md), i.e. an "array of bits" -- position of each bit is associated with an object that may potentially be present in the set and the bit's value then says if the object really is present or not. We want to be able to store 32 numbers, so we'll need 32 bits; the lowest bit says if number 1 is present, the next one says if number 2 is present etc. So we can really just use one 32 bit number to store this whole set. Implementing multiset is similar, we just allocate more bits for each potential member to indicate the count; in our case we suppose maximum value 255 so we can use 8 bits for each member (in C we would naturally implement this as an array of bytes), so we'll need 32 * 8 = 256 bits.
64. I don't know lol. (That's the correct answer, it shows we can't know everything.)
65. District one: all A voters, district two and three will each have 5 B voters and 4 A voters.
66. The area of the roof hole says the rate at which the water pours in, we have to [integrate](integral.md) the hole area over the 20 seconds. We can split this to two parts that we'll add: from 0 to 10 seconds the function that says the area of the hole is simply *f1(t) = t*; from 10 to 20 seconds we can use a function *f2(t) = 10 - t* from 0 to 10 seconds. Integral of *f1* is *1/2 * t^2* which at *t = 10* gives us 50 litres; integral of *f2* is *10 * t - 1/2 * t^2* which also gives 50 litres (it's logical -- opening and closing of the roof is symmetric, same amount of water will fall in). So all in all there will be 100 litres of water in the room.
67. Well, it's not the pressure alone that destroys you, it's the difference of external and internal pressure -- human has air of atmospheric pressur in his lungs and other parts of body but the pressure in the depth is greater and overpowers it, so you implode. The fish is happy because it has water inside it, the pressures are in balance.
68. something like ` a += 4 << ((a > 10) << 1);`
69. About 1052 distances to the Moon, about 260926 lives.
70. It's called [aliasing](aliasing.md), it's addressed by [antialiasing](antialiasing.md) which usually suppresses or removes the effect by increasing the sampling frequency, in our case of downscaling image this would mean replacing each of the small 2x2 blocks by an average pixel value in that block, i.e. taking into account all four samples as opposed to just one.
71. 4, 2001, 7 (the word size is 36), 5 (year 476), 19 (year 1856), 1969.
72. Continuous audio is normally implemented with a [circular buffer](circular_buffer.md) -- that is we have a buffer of audio samples of certain size *N* and that is being played over and over, with the play head going from start to finish and then back to start again; the program has to keep updating this buffer regularly to fill it with new samples to play and it has to keep ahead of the play head. Circular buffer is nice because we don't have to shift it as a whole (which would require moving a lot of values in memory), the only thing that is moving is the play head, that's why it's used as opposed to e.g. a queue. When a game freezes, it stops operating correctly and it stops updating the audio buffer, so whatever is in it will just be played over and over in a loop.
73. Main advantage is that a matrix can hold any combination of transformations and that applying all the transformations is then simply performed by performing a single matrix multiplication which additionally may be implemented with quite fast matrix multiplication algorithms. Not only can a matrix represent for example the whole translation+rotation+scale transformation of a single object, it can hold any number of such transformations performed in any order so that we can for example precompute a matrix that will perform world transformation, camera space transformation and view space transformations all at once! That's very fast. Disadvantages of matrices may be that they can only hold affine transformations (i.e. they can't represent ANY transformation whatsoever), it may also be a bit harder to extract back the parameters of the transformation from a matrix (though it can be done) etc. Also in case of some extreme memory limitations matrices may take up more space than would be strictly needed.
74. From the right triangle: *dick_legth / shadow_length = tan(20 degrees) => dick_legth = tan(20 degrees) * shadow_length ~= 21.83 cm*.
75. Behind NAT you're in a private network, computers inside it have no public addresses (their IP addresses are in the private range and potentially same as addresses of computers in other private networks), only the router has a public IP address that's unique within the Internet, i.e. from Internet's point of view there is only one device connected -- your router. Computers behind this router are invisible, so no one can connect to the server that's behind it. The possibility of you having a two way communication from within this private network with the outside Internet is enabled by the router who communicates for you when you ask for it, i.e. when you (from inside the private network) initiate the connection -- the router then creates the connection for you and talks to the outside world for you (translating your private address to its public address, hence *network address translation*). But no one can initiate communication from the outside, the router wouldn't know to whom he wants to speak. This can be solved e.g. by port forwarding (setting some default computer to which communication from outside will be redirected) or tunneling (keeping a constant connection with some outside proxy server that's listening to requests and resending them).
76. For example `sizeof(a)`: if `a` is a pointer, size of pointer will be returned whereas in case of array the size of the whole array will be returned. Similarly e.g. `&a`: if `a` is a pointer, we'll get a pointer to pointer (generally a different address) whereas in case of array `a` and `&a` gives the same address -- that of the array's first element (though the type will be different).
77. Something like `s/\[\([^]]*\)\](\([^)]*\))/<a href="\2">\1<\/a>/g`.
78. For example: poop, boob, civic, deed, level, rotor, madam, refer, stats etc.
79. For example (`L` = lesbian, `N` = normal): `LLLNNN *|` -> `NNNL |* LL` -> `NNNLL *| L` -> `NNN |* LLL` -> `NNNL *| LL` -> `NL |* NNLL` -> `NNLL *| NL` -> `LL |* NNNL` -> `LLL *| NNN` -> `L |* NNNLL` -> `LL *| NNNL` -> `|* NNNLLL`.
80. yes (look it up)
81. For the same reason mosquitoes fly into the mosquito killer lamps -- they have microscopic brains.
82. Possibly for several reasons but the most prominent one is likely that video codecs typically try to save space by not saving every frame of the video as a picture but rather encode movements of small blocks into which keyframes (static pictures saved at relatively low "FPS") are chopped. This exploits temporal redundancy -- the fact that frames close in time are similar to one another, i.e. that knowing one frame we can most likely get approximate version of the next frame by splitting the current frame into blocks and just moving them around a bit. Of course this doesn't work perfectly and low bitrate or nontypical scenes can make the blocks highly visible. It would be possible to come up with similar methods that don't use blocks and may look prettier but rectangular blocks of pixels are very easy and fast to work with and the results look good enough, so they are usually used. Another reason for blockiness of videos may be e.g. that the keyframes themselves are compressed with some lossy JPEG-like compression that makes them "blocky".
83. 175099, formula for the series is *3^n - 2^n*.
84. To allow efficient implementations. By saying "we don't force you to do this" the specification gives those who implement it a freedom to do it in the most efficient way possible, depending on the specific technology they have at hand. Of course this can get tricky, but correctly choosing what to define versus what to leave undefined leads to very efficient languages. Imagine for example an instruction manual for making a boat: it may also leave the choice of its body shape up to you, you will choose the best shape depending on your situation (You want a stable boat? Fast boat? Cheap boat? Is this shape easier to make from material you have at hand? Etc.).
85. GNU is Not Unix.
86. no
87. *x 1 2 + 3 4 - / +*; Advantages are for example not needing brackets at all and simple parsing and evaluation, for example we don't have to care about operator precedence. Disadvantages may be e.g. lower readability; we also have to know each operator's arity because from postfix notation it can't be deduced -- with infix notation expression *myFunc(x,y,myFunc2(z))* it is clear that *myFunc* takes 3 arguments and *myFunc2* takes 1, but if we convert it to postfix notation, we get *x y z myFunc2 myFunc3*, from which it isn't clear how many arguments each function takes.
88. It's a circuit that on its input takes data and output address -- a number from 0 to *N - 1* -- and that sends the data to one of *N* output ports (identified by the given address). It can be imagined like a switch that redirects an input stream to one of *N* output channels. Its use may be for example to redirect input data, for example audio, to one of several output devices, for example speakers, headphones and audio recorders. Multiplexer is a circuit that does the opposite (i.e. chooses input from *N* channels that is then sent to a single output channel).
89. Total internal refraction -- light travelling in the fibers bounces off of the walls of the fiber, but in order to bounce (be reflected) when it hits the boundary it must hit it under an angle that's smaller than so called critical angle which is calculated from the indices of refraction of the fiber and the material outside of it. If the cable was bent too much, light could hit the boundary under and angle close to perpendicular and by this it would escape to the outside medium.
90. Kind of octagon but with unevenly long sides; a rectangle with bevelled corners, i.e. two horizontal sides, two vertical sides, two 45 degree walls and two 135 degree walls. We can imagine taxicab distance from given point like sort of a diamond, it creates 4 quadrants around the point, in each the distance increases linearly in diagonal direction -- regions of constant distance here form 45 degree angled squares. Boundaries between these quadrants form a cross of infinite size. Taking two different points these two crosses will overlap and form 9 regions (draw it): top-left, top-middle, top-right, middle-left etc. Examining each of the regions we will find that it either keeps the increasing direction the same (if both overlaid directions are the same) or that some principal direction cancels out and leave the sum increasing only in one principal direction -- basically we find that in each of those regions the sum increases linearly in one of 8 directions separated by 45 degrees (except for the middle region where the sum is constant). It's also clear the heightmap has to stay continuous as both of the summed functions are continuous. From all this we can deduce the shape basically.
91. It's a [Turing complete](turing_complete.md) system (typically a [programming language](programming_language.md)) that's however extremely hard to use for any practical programming, i.e. it can be seen as a programming language in which it is theoretically possible to program anything (anything programmable in any other language) but practically it's impossible to program anything significant because of the complicated nature of that language. This terms is related to [esoteric languages](esolang.md).
92. [Earth](earth.md) or jvpcG. The cipher reverses the ASCII string and xors every byte (that's not a space) with 0x02 (i.e. flips the second lowest bit) -- don't bitch too much about this being too arbitrary, you can notice the string is reversed by the last character being uppercase and the first one being special char (?), then you can kind of recognize the words as the encoded chars are close to their decoded versions and the lengths of the words also hint on the words (for example a question is quite likely to start with "What").
93. Let's simplify the left-hand side: *sin(2 * x) / (2 - 2 * sin^2(x)) - log2(1 / 8^(-1/3)) = 2 * sin(x) * cos(x) / (2 * (1 - sin^2(x))) - log2(8^1/3) = 2 * sin(x) * cos(x) / (2 * cos^2(x)) - log2(2) =
sin(x) / cos(x) - log2(2) = tg(x) - 1*, so we get *tg(x) >= 1*. So that will hold when *pi/4 + pi * n <= x < pi/2 + pi * n*, *n* is an integer.
93. Considering an infinitely small non-zero interval *dx*, and the graph height increase over this interval *dy*, the distance increase (from Pythagorean theorem) on this interval will be *sqrt(dx^2 + dy^2)*. We can replace *dy* by *tan(alpha) * dx*. By definition tangent of the function's angle at a certain point is its derivative, so we can also replace *tan(alpha)* by derivative of the function, *f'(x)*. So we get length increase *sqrt(dx^2 + f'(x)^2 * dx^2) = sqrt(dx^2 * (1 + f'(x)^2)) = dx * sqrt(1 + f'(x)^2)*. Now to add infinitely many values over infinitely small intervals we use integrals, so to add all these small length increases we can write the final formula: *length(x1,x2) = Integral(x1,x2) sqrt(1 + f'(x)^2) dx*. Testing this on *f(x) = x* from 0 to 1 we get the expected *length(0,1) = Integral(0,1) sqrt(1 + 1^2) dx = sqrt(2)*. For *f(x) = sin(x)* from 0 to *2 * pi* we get *length(0,2 * pi) = Integral(0,2 * pi) sqrt(1 + cos^2(x)) dx ~= 7.64*, which seems about right (it's a bit more than 2 * pi).
94. yes
94. Considering an infinitely small non-zero interval *dx*, and the graph height increase over this interval *dy*, the distance increase (from Pythagorean theorem) on this interval will be *sqrt(dx^2 + dy^2)*. We can replace *dy* by *tan(alpha) * dx*. By definition tangent of the function's angle at a certain point is its derivative, so we can also replace *tan(alpha)* by derivative of the function, *f'(x)*. So we get length increase *sqrt(dx^2 + f'(x)^2 * dx^2) = sqrt(dx^2 * (1 + f'(x)^2)) = dx * sqrt(1 + f'(x)^2)*. Now to add infinitely many values over infinitely small intervals we use integrals, so to add all these small length increases we can write the final formula: *length(x1,x2) = Integral(x1,x2) sqrt(1 + f'(x)^2) dx*. Testing this on *f(x) = x* from 0 to 1 we get the expected *length(0,1) = Integral(0,1) sqrt(1 + 1^2) dx = sqrt(2)*. For *f(x) = sin(x)* from 0 to *2 * pi* we get *length(0,2 * pi) = Integral(0,2 * pi) sqrt(1 + cos^2(x)) dx ~= 7.64*, which seems about right (it's a bit more than 2 * pi).
95. [The Cathedral And The Bazaar](bazaar.md), Larry Wall, Uriel, INTERCAL, John (Carmack and Romero).
96. For example: `int c1(unsigned int x) { int r = x % 2; while (x) r += (x >>= 1) % 2; return r; }`.
97. yes
## Other

1
fun.md
View file

@ -28,4 +28,5 @@ This is subjective AF, even within a single man this depends on day, hour and mo
- [cowsay](cowsay.md)
- [autostereograms](autostereogram.md)
- [math](math.md) and data visualizations, e.g. [fractals](fractal.md), [phase diagrams](phase_diagram.md) (https://yt.artemislena.eu/watch?v=b-pLRX3L-fg), strange [attractors](attractor.md), [procgen](procgen.md), [cellular automata](cellular_automaton.md), plotting wild 2D [functions](function.md), ...
- `#21stcenturychallenge`: If someone on [YouTube](youtube.md) tries to trick you into audience interaction by saying something like "tell me down in the comments...", you have to stop watching YouTube for 14 days. You can cancel this curse by finding a [transsexual](tranny.md) who has no [tattoos](tattoo.md), but you can use any tattooless transsexual only once (not that you will find any though).
- ...

View file

@ -27,6 +27,7 @@ On this wiki we kind of use LMAO as a synonym to [LULZ](lulz.md) as used on Ency
- { Some time in May 2023 I've seen a guy try to upload a "2D game sprite" to [opengameart](opengameart.md) but accidentally uploading a screenshot of him asking ChatGPT how to make a game in Python lol. ~drummyfish }
- Some people believe there is a fictional whole number between 6 and 7 called [thrembo](thrembo.md).
- Some company was accused of racism when its policies forbid hiring people with criminal history, the accusation was that such policy is discriminatory against [black](black.md) people. This left many [SJW](sjw.md)s scratching their heads in confusion -- are the accusers in fact good because they help black people get jobs or bad because they assume criminals are mostly black? :D
- God's miracle caught on stream! On April 5th 2013 a "disabled" twitch streamer ZilianOP who was supposedly paralyzed and couldn't walk forgot for a while during live stream that he was paralyzed, he stood up from the wheelchair and went for something, revealing he was in fact just faking the disability so as be considered an American [hero](hero_culture.md) and get more of those viewers seeking inspirational motivators or something :D I'M DISABLED BUT STILL PLAY VIDEO GAMES, WHAT'S YOUR EXCUSE! He then hilariously tried to cover it up along with his girlfriend, saying shit like "nonono, I fell from the chair" and then switching to "I could walk a bit thanks to therapy but I was keeping it secret because I wanted to surprise my girlfriend", you wouldn't believe to what lengths they went lol. On the other hand if you're white and not a [female](woman.md) with large breasts, being disabled is the only chance to ever get any views, so can we really blame him?
- On ocassion [reddit](reddit.md) offered its fair share of quality material as well, for example one TIFU (today I fucked up... might actually even have been the TIL subreddit lol) thread recounted a true story of a guy who grew up well into adulthood thinking that toilet seats were ONLY MEANT TO BE USED BY [WOMEN](woman.md) and that men simply sit on the cold toilet edge when they shit :D Apparently no one ever taught him and he only learned about the fact that men can use the seat too when he was buying a new toilet seat and joked with the salesman by saying something along the lines of "haha, if I didn't have a wife I wouldn't have to be spending money on toilet seats" -- then when the guy just stared in confusion all came to be revealed.
- In 2024 the twitter account of Greta Thunberg's father, Svante Thunberg, was hijacked by soyjak.party and started posting some funny stuff about [niggas](nigger.md), telling Greta she was adopted, offending journalists in DMs and so on.
- ...

View file

@ -44,4 +44,5 @@ Defending pedophilia in itself is enough to be cancelled, perhaps even imprisone
- [jailbait](jailbait.md)
- [loli](loli.md)
- [necrophilia](necrophilia.md)
- [zoophilia](zoophilia.md)
- [zoophilia](zoophilia.md)
- [pedobear](pedobear.md)

File diff suppressed because it is too large Load diff

View file

@ -8,6 +8,8 @@ In the real world absolutely pure selflessness may be very hard to find, partly
**Selflessness doesn't mean one seeks no reward**, there is practically always at least one reward for a selflessly behaving individual: the good feeling that comes from the selfless action. Selfless acting may also include physical rewards, for example if a programmer dedicates years of his life to developing a [free](free_software.md) [public domain](public_domain.md) software that will help all people, he himself will get the benefits of using that program. The key thing is that he doesn't use the program to harm others, e.g. by charging money for it or even by using a license that forces others to credit him and so increase his reputation. He sacrificed part of his life purely to increase good in the world for everyone without trying to gain an edge over others.
**Selflessness can cure the world epidemic of [depression](depression.md)** -- selflessness is something that is practically guaranteed to make you feel better, that gives your life a meaning AND which at the same time can be done by absolutely anyone and by everyone at the same time, it's a completely healthy cure to depressive thoughts which is also at the same time helpful to society. Contrast this with the capitalist "feel good drug" -- that of winning in competition and endlessly chasing "success". That is something that only very few can do -- only the most talented and lucky ones will get the psychological reward in a competitive system, after dedicating everything to it, and even those will only get it temporarily and will be craving more and more, like a heroin addict; by definition only one man can be a winner, others will be losers, hence the masses of depressed people in the population.
The latter is important to show that what's many times called selflessness nowadays is only **pseudoselflessness**, fake selflessness. This includes e.g. all the celebrities who publicly financially support charities; this seems like a nice gesture but it's of course just a PR stunt, the money spent on charities is money invested into promoting oneself, increasing fame, sometimes even tax hacking etc. This also goes for professional firefighters, doctors, [FOSS](foss.md) programmers that use licenses with conditions such as attribution etc. This is not saying the behavior of such people is always pure evil, just that it's not really selfless.
Selfless programs and art should be put into the [public domain](public_domain.md) with waivers such as [CC0](cc0.md). Using licenses (free or not) that give the programmer some advantage over others (even e.g. attribution) are not selfless.

View file

@ -29,6 +29,8 @@ Here are some potentially entertaining ways of trolling (they'll be written from
- **Weird life goal troll**: This one requires extreme dedication and is a bit risky, but it might be one of the highest trolling peaks if performed successfully and well. So what's the troll here? We know that life goal cannot be objectively set, you can make your life goal whatever you want and no one can ever objectively refute it. So you can for example set your life goal to just walk forward -- you will dedicate everything to only walking forward as much as you can. You will stop going to work, you will only eat and drink if absolutely necessary, you'll just get up from the bed one day and start walking over the country in your pajamas -- if people ask you if you're alright you just say "yes, thank you". If you are starving, you just grab nearest food and eat it, if you need to sleep, you just lie down somewhere and sleep and then just walk again. Soon you'll probably be taken to mental asylum -- there you have to just prove you're completely normal, convince them you know what you're doing, that you're not feeling any anxiety or depression, that you hear no voices, you have only set walking as your life goal -- there is no objective way to refute this life goal. You will probably end up in asylum or jail anyway sooner or later, then just try to maximize walking, be nice and lie if you have to. If they lead you to the court, just turn around and start walking out of the building. If they put you in chains, just behave nicely and say you won't try to run away -- if they take the chains down, just start walking away. Whenever you get out of jail, just start walking again and so on. Now there is a risk that you may just waste your life without attracting any attention, but you may also become famous and then highlight the fact that current society is extremely retarded and is not ready for people who aren't conforming and just set their life goal arbitrarily.
- ...
{ I got asked a very good question: is trolling in fact [fascism](fascism.md) and how can I, a LRS supporter, like it then? I want to leave at least a short answer here: Yes, seeking fun (a kind of self benefit) on the detriment of others is, at least by our definition, a form of fascism. I enjoy the acts of trolling, and though it may be partly an imperfection of me as a human being, I try to keep it compatible with LRS in the following ways. Firstly I never support actually very harmful trolling (such as "cutting for Bieber") to be DONE, though I do enjoy reviewing the cases that already happened and I may find them both funny and sad at the same time -- this is similar to how one can be a pacifist and completely reject violence while still finding some value in watching gore videos. Secondly trolling may be done to entities that aren't living beings, for example companies or states. Thirdly I may support acts of trolling that I don't think are significantly harmful, for example lighthearted pranks (the kind of joke you play on someone and it eventually entertains both of you, but it mustn't be taken too far, harm must be negligible), or Internet trolling. It's similar to sports or video games -- it is completely acceptable (and desirable) to create environments -- which must always be entered VOLUNTARILY -- that simulate amoral behavior and relieve some of our amoral animal needs, for example those for competition or fight, despite such behavior not being acceptable in other contexts. I.e. it is for example acceptable to kill each other in video games. Internet, or at least a great part of it, is such an environment -- it is a kind of playground anyone can enter voluntarily, that's known to have the kind of trolling game going on. On the Internet we only interact by speech and speech alone can never hurt anyone -- if one cannot bear reading something on the Internet, he can avoid using it (at least that's how it should be). ~drummyfish }
## See Also
- [fun](fun.md)

File diff suppressed because one or more lines are too long

View file

@ -3,9 +3,9 @@
This is an autogenerated article holding stats about this wiki.
- number of articles: 580
- number of commits: 811
- total size of all texts in bytes: 3854318
- total number of lines of article texts: 29436
- number of commits: 812
- total size of all texts in bytes: 3861737
- total number of lines of article texts: 29462
- number of script lines: 262
- occurences of the word "person": 7
- occurences of the word "nigger": 86
@ -13,7 +13,7 @@ This is an autogenerated article holding stats about this wiki.
longest articles:
- [c_tutorial](c_tutorial.md): 124K
- [exercises](exercises.md): 88K
- [exercises](exercises.md): 92K
- [capitalism](capitalism.md): 68K
- [how_to](how_to.md): 68K
- [less_retarded_society](less_retarded_society.md): 60K
@ -35,60 +35,79 @@ longest articles:
top 50 5+ letter words:
- which (2208)
- there (1674)
- which (2212)
- there (1675)
- people (1469)
- example (1229)
- other (1195)
- example (1234)
- other (1196)
- number (1113)
- software (1073)
- about (1000)
- program (876)
- their (823)
- because (791)
- would (778)
- software (1075)
- about (1002)
- program (879)
- their (825)
- because (792)
- would (781)
- called (760)
- language (740)
- numbers (736)
- being (735)
- computer (732)
- being (730)
- things (705)
- simple (703)
- things (702)
- something (688)
- something (690)
- without (664)
- function (658)
- programming (654)
- function (653)
- these (620)
- however (620)
- these (619)
- different (617)
- world (577)
- system (562)
- should (562)
- world (578)
- system (564)
- should (564)
- doesn (549)
- games (541)
- point (540)
- games (544)
- point (541)
- society (539)
- though (511)
- while (507)
- drummyfish (503)
- using (498)
- while (508)
- drummyfish (504)
- using (499)
- memory (498)
- still (485)
- possible (480)
- still (486)
- possible (482)
- technology (479)
- similar (478)
- course (477)
- simply (468)
- course (478)
- simply (469)
- https (456)
- really (431)
- value (428)
- really (433)
- value (432)
- always (426)
- extremely (423)
- always (422)
- actually (421)
latest changes:
```
Date: Thu May 30 17:55:03 2024 +0200
cancer.md
capitalism.md
disease.md
evil.md
exercises.md
feminism.md
john_carmack.md
lrs.md
main.md
often_confused.md
pedophilia.md
random_page.md
shit.md
wiki_pages.md
wiki_stats.md
wiki_style.md
woman.md
www.md
Date: Tue May 28 21:17:58 2024 +0200
capitalism.md
network.md
@ -103,25 +122,6 @@ Date: Mon May 27 22:48:10 2024 +0200
compression.md
consumerism.md
less_retarded_society.md
lrs_dictionary.md
main.md
pseudorandomness.md
random_page.md
wiki_pages.md
wiki_stats.md
woman.md
youtube.md
Date: Sat May 25 21:44:26 2024 +0200
duke3d.md
entrepreneur.md
exercises.md
fsf.md
gay.md
interesting.md
jokes.md
love.md
main.md
needed.md
```
most wanted pages:
@ -150,7 +150,7 @@ most wanted pages:
most popular and lonely pages:
- [lrs](lrs.md) (281)
- [capitalism](capitalism.md) (214)
- [capitalism](capitalism.md) (215)
- [c](c.md) (213)
- [bloat](bloat.md) (201)
- [free_software](free_software.md) (165)
@ -159,7 +159,7 @@ most popular and lonely pages:
- [proprietary](proprietary.md) (117)
- [computer](computer.md) (94)
- [kiss](kiss.md) (93)
- [modern](modern.md) (89)
- [modern](modern.md) (90)
- [minimalism](minimalism.md) (88)
- [linux](linux.md) (88)
- [gnu](gnu.md) (82)
@ -167,18 +167,18 @@ most popular and lonely pages:
- [free_culture](free_culture.md) (80)
- [fun](fun.md) (78)
- [math](math.md) (76)
- [less_retarded_society](less_retarded_society.md) (75)
- [less_retarded_society](less_retarded_society.md) (76)
- [foss](foss.md) (75)
- [censorship](censorship.md) (75)
- [public_domain](public_domain.md) (74)
- [fight_culture](fight_culture.md) (74)
- [hacking](hacking.md) (73)
- [fight_culture](fight_culture.md) (73)
- [bullshit](bullshit.md) (73)
- [programming_language](programming_language.md) (71)
- [art](art.md) (71)
- [shit](shit.md) (69)
- [float](float.md) (67)
- [chess](chess.md) (65)
- [chess](chess.md) (66)
- ...
- [wiki_pages](wiki_pages.md) (4)
- [whale](whale.md) (4)

View file

@ -99,7 +99,8 @@ Here is a list of almost all historically notable women:
- **Eve of the Bible**: achieved probably the biggest fuck up in [history](history.md), she did the single one thing she was forbidden from doing without even gaining much benefit from it, she ate some kind of [God](god.md) forbidden fruit, enraged God and doomed all people who will ever live to be banished from paradise :D
- **Helen of Troy**: caused the Troy war.
- **Hermione Granger**: smart girl, also fictional (these two attributes seem to go together in girls).
- Jack The Ripper's victims: prostitutes famous for being killed by a famous serial killer.
- **Jack The Ripper's victims**: prostitutes famous for being killed by a famous serial killer.
- **J. K. Rowling**: woman who wrote 7 books on a toilet paper because she didn't have money for normal paper, pretty impressive.
- **Joan of Arc**: [militant](military.md) nationalist [fascist](fascism.md), basically Christian [jihadist](jihad.md).
- **Judit Polgar**: best non-fictional female [chess](chess.md) player that at her peak managed the incredible feat of ranking #56 in the world while actually existing.
- **[Marie Curie](marie_curie.md)**: this one was actually probably quite skilled and based, won two Nobel Prizes (at the time when there were no diversity quotas so it actually counts), though she probably stole most of her work from her husband. She was quite ugly tho.