master
Miloslav Ciz 2 weeks ago
parent ab31f1dd64
commit 55671625ef

@ -71,4 +71,5 @@ The following more complex examples come from the [LRS](lrs.md) game [Anarch](an
- [music tracker](music_tracker.md)
- [databending](databending.md)
- [MIDI](midi.md)
- [MIDI](midi.md)
- [beatbox](beatbox.md)

@ -16,6 +16,7 @@ Examples of cancer are:
- [fight culture](fight_culture.md)
- [hero culture](hero_culture.md)
- [politics](politics.md)
- "personal pronouns"
- biological cancer
- ...

@ -104,38 +104,41 @@ Here are some questions to test your LRS related knowledge :D
3. Name at least 10 different [programming languages](programming_language.md).
4. Why is text written on a piece of paper flipped horizontally when viewed in a mirror -- why is it not flipped vertically?
5. Say we want to generate a random number from 0 to 999 (including both) with uniform probability distribution (i.e. every number is equally likely). In C we often do it using the modulo operator like this: `int num = rand() % 1000`. However there is a problem with this -- describe what the problem is and how its negative effect can be reduced. Hint: it's called *modulo bias*.
6. What's the difference between [data](data.md) and [information](information.md)?
7. Bob has written a program and then committed [suicide](suicide.md) because Alice sued him for sexual harassment. His program is now [unmaintained](maintenance.md). Bob's program uses 10 libraries. The probability that the API of one such library will be [updated](update_culture.md) and changed in any given year is 5%. If this happens, Bob's program will stop working. During the next 5 years what is the probability of his program breaking?
8. What will the following C (C99) snippet print out? `int x = 2; putchar('a' + ((1 == 3 > 2) + ++x));`
9. Order the following software by the date of the release of their 1.0 version from oldest to newest: [TempleOS](temple_os.md), [MS DOS](dos.md), original [Unix](unix.md), [Linux](linux.md), [Windows](windows.md). Also point out which one stands out from others and why.
10. If you're running in a race and overtake the guy who's currently in third place, what place will you be in?
11. When multiplying two *N* bit numbers (unsigned integers, direct representation), what is the minimum number of bits we will need to store their product? Prove it.
12. We have two gears, each of same size and same number of teeth. Gear A is fixed in place, it can't move or rotate, gear B runs around gear A so that it keeps touching it (and therefore rotates along the way) until it gets to the place where it started. How many revolutions around its own axis (from your stationary point of view) has gear B made?
13. What's the worst socioeconomic system in the world? You don't even have to say why because that would take too long.
14. Manually convert the [binary](binary.md) numeral 10110000000010110101 to hexadecimal.
15. Why do astronauts on the ISS feel weightlessness?
16. How would you compute the circumference of a circle with radius *r* without using floating point? Consider just the approximate value of pi ~= 3.14, i.e. write the formula multiplying *2 * r* by 3.14 only using whole numbers (of course the result will be rounded to whole number too).
17. Name at least five licenses commonly used for [FOSS](foss.md) programs, five text editors/IDEs commonly used for programming and five operating systems whose source code is mostly free-licensed (none of these is allowed to be using the same or forked kernel of any other).
18. What is the minimum number of [bits](bit.md) that will allow us to represent 12345678910111213 distinct values?
19. Give at least one example of [analog](analog.md) electronic device and one of [digital](digital.md) mechanical device.
20. Is physical violence ever justified?
21. Find a normalized (having length 1) [normal](normal.md) ([vector](vector.md) that's perpendicular to surface) of the [triangle](triangle.md) defined by vertices *A = {1,2,3}*, *B = {5,5,1}* and *C = {1,5,2}*. (Orientation doesn't matter.)
22. Why will (in a typical programming language such as C) an infinite [recursion](recursion.md) crash the program but infinite loop generally won't?
23. Answer yes/no to following: Is base-three number 2101 greater than base-seven number 206? Is using [gemini](gemini.md) a good idea when [gopher](gopher.md) exists? Is there any [triangle](triangle.md) (in Euclidean geometry) whose one side is longer than the sum of lengths of its other two sides?
24. There are two walls 2 meters apart, the right wall is moving left by the speed 0.1 m/s, the left wall is moving right by the same speed 0.1 m/s. There is a fly in the middle between the walls, flying by speed 1 m/s. It is flying towards one wall, then when it reaches it it turns around and flies towards the other wall etc. When the walls completely close in, what distance would the fly have traveled? (There is a simple solution.)
25. Solve these [anagrams](anagram.md): *no cure sir*, *come piss ron*, *ginger*, *nicer shops*, *fog tag*, *trek now*.
26. At what times, with precision to seconds, do clock hands overlap (just compute AM, PM is the same)?
27. In 3D computer [graphics](graphics.md) what's the difference between [shading](shading.md) and drawing [shadows](shadow.md)?
28. Can we say that the traditional feed forward [neural networks](neural_network.md) are [Turing complete](turing_complete.md)? Explain why or why not.
29. Wicw mx uum yvfe bbt uhmtf ok?
30. What is the *Big O* time [complexity](complexity.md) of worst case scenario for [binary search](binary_search.md)?
31. Does the statement "10 does not equal 10" logically [imply](implication.md) that intelligent alien life exists?
32. What is the principle of [asymmetric cryptography](asymmetric_cryptography.md) and why is it called *asymmetric*?
33. What is the main reason for [Earth](earth.md) having seasons (summer, winter, ...)?
34. Name at least three [x86](x86.md) [assembly](assembly.md) instructions and shortly explain what they do.
35. WARNING: VERY HARD. There are two integers, both greater than 1 and smaller than 100. *P* knows their product, *S* knows their sum. They have this conversation: *P* says: I don't know the numbers. *S* says: I know you don't, I don't know them either. *P* says: now I know them. *S* says: now I know them too. What are the numbers? To solve this you are allowed to use a programming language, pen and paper etc. { Holy shit this took me like a whole day. ~drummyfish }
36. Compare advantages and disadvantages of [hash](hash.md) tables vs binary [trees](tree.md) for storing text strings, especially in regards to searching the string database.
37. Did you enjoy this quiz?
6. Why is it better to have round manhole covers than square ones?
7. What's the difference between [data](data.md) and [information](information.md)?
8. Bob has written a program and then committed [suicide](suicide.md) because Alice sued him for sexual harassment. His program is now [unmaintained](maintenance.md). Bob's program uses 10 libraries. The probability that the API of one such library will be [updated](update_culture.md) and changed in any given year is 5%. If this happens, Bob's program will stop working. During the next 5 years what is the probability of his program breaking?
9. What will the following C (C99) snippet print out? `int x = 2; putchar('a' + ((1 == 3 > 2) + ++x));`
10. Order the following software by the date of the release of their 1.0 version from oldest to newest: [TempleOS](temple_os.md), [MS DOS](dos.md), original [Unix](unix.md), [Linux](linux.md), [Windows](windows.md). Also point out which one stands out from others and why.
11. If you're running in a race and overtake the guy who's currently in third place, what place will you be in?
12. When multiplying two *N* bit numbers (unsigned integers, direct representation), what is the minimum number of bits we will need to store their product? Prove it.
13. We have two gears, each of same size and same number of teeth. Gear A is fixed in place, it can't move or rotate, gear B runs around gear A so that it keeps touching it (and therefore rotates along the way) until it gets to the place where it started. How many revolutions around its own axis (from your stationary point of view) has gear B made?
14. What's the worst socioeconomic system in the world? You don't even have to say why because that would take too long.
15. Manually convert the [binary](binary.md) numeral 10110000000010110101 to hexadecimal.
16. Why do astronauts on the ISS feel weightlessness?
17. How would you compute the circumference of a circle with radius *r* without using floating point? Consider just the approximate value of pi ~= 3.14, i.e. write the formula multiplying *2 * r* by 3.14 only using whole numbers (of course the result will be rounded to whole number too).
18. Name at least five licenses commonly used for [FOSS](foss.md) programs, five text editors/IDEs commonly used for programming and five operating systems whose source code is mostly free-licensed (none of these is allowed to be using the same or forked kernel of any other).
19. What is the minimum number of [bits](bit.md) that will allow us to represent 12345678910111213 distinct values?
20. Give at least one example of [analog](analog.md) electronic device and one of [digital](digital.md) mechanical device.
21. Is physical violence ever justified?
22. Find a normalized (having length 1) [normal](normal.md) ([vector](vector.md) that's perpendicular to surface) of the [triangle](triangle.md) defined by vertices *A = {1,2,3}*, *B = {5,5,1}* and *C = {1,5,2}*. (Orientation doesn't matter.)
23. Why will (in a typical programming language such as C) an infinite [recursion](recursion.md) crash the program but infinite loop generally won't?
24. Answer yes/no to following: Is base-three number 2101 greater than base-seven number 206? Is using [gemini](gemini.md) a good idea when [gopher](gopher.md) exists? Is there any [triangle](triangle.md) (in Euclidean geometry) whose one side is longer than the sum of lengths of its other two sides?
25. There are two walls 2 meters apart, the right wall is moving left by the speed 0.1 m/s, the left wall is moving right by the same speed 0.1 m/s. There is a fly in the middle between the walls, flying by speed 1 m/s. It is flying towards one wall, then when it reaches it it turns around and flies towards the other wall etc. When the walls completely close in, what distance would the fly have traveled? (There is a simple solution.)
26. Solve these [anagrams](anagram.md): *no cure sir*, *come piss ron*, *ginger*, *nicer shops*, *fog tag*, *trek now*.
27. At what times, with precision to seconds, do clock hands overlap (just compute AM, PM is the same)?
28. In 3D computer [graphics](graphics.md) what's the difference between [shading](shading.md) and drawing [shadows](shadow.md)?
29. Can we say that the traditional feed forward [neural networks](neural_network.md) are [Turing complete](turing_complete.md)? Explain why or why not.
30. Wicw mx uum yvfe bbt uhmtf ok?
31. What is the *Big O* time [complexity](complexity.md) of worst case scenario for [binary search](binary_search.md)?
32. Does the statement "10 does not equal 10" logically [imply](implication.md) that intelligent alien life exists?
33. What is the principle of [asymmetric cryptography](asymmetric_cryptography.md) and why is it called *asymmetric*?
34. What is the main reason for [Earth](earth.md) having seasons (summer, winter, ...)?
35. Name at least three [x86](x86.md) [assembly](assembly.md) instructions and shortly explain what they do.
36. Point out what's highly unusual or uncommon about this paragraph. That is find a quality of this paragraph that you wouldn't normally think to find if you took a random paragraph from, say, a random book in your library, or in similar work. It's not that difficult.
37. WARNING: VERY HARD. There are two integers, both greater than 1 and smaller than 100. *P* knows their product, *S* knows their sum. They have this conversation: *P* says: I don't know the numbers. *S* says: I know you don't, I don't know them either. *P* says: now I know them. *S* says: now I know them too. What are the numbers? To solve this you are allowed to use a programming language, pen and paper etc. { Holy shit this took me like a whole day. ~drummyfish }
38. Compare advantages and disadvantages of [hash](hash.md) tables vs binary [trees](tree.md) for storing text strings, especially in regards to searching the string database.
39. A woman 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. Hows is this possible?
40. Did you enjoy this quiz?
### Answers
@ -144,38 +147,41 @@ Here are some questions to test your LRS related knowledge :D
3. [C](c.md), [C++](cpp.md), [Java](java.md), [JavaScrip](javascript.md), [Python](python.md), [Lisp](lisp.md), [Forth](forth.md), [Brainfuck](brainfuck.md), [Fortran](fortran.md), [Pascal](pascal.md), [Haskell](haskell.md), [Prolog](prolog.md), [Smalltalk](smalltalk.md), [comun](comun.md), ...
4. The mirror doesn't really flip the text -- what's left/right in front of it is also left/right in it. It is you who flipped the text when you pointed it at the mirror -- you most likely flipped it horizontally so that's how you see it in the mirror, but you could as well have flipped it vertically; then the text would be flipped vertically in the mirror.
5. Modulo bias happens when the random number generator's range is non-divisible by our desired range that we enforce with modulo operator -- with shown approach some numbers then have higher probability of being generated than others. For example if rand() here return numbers from 0 to 1023, there is only one way to get 999 (999 % 1000) but two ways to get 0 (0 % 1000 and 1000 % 1000), i.e. 0 is more likely to be generated. Common approach to reducing this effect is to repeatedly generate numbers until we get one falling into the "fair" range (this is not guaranteed to end so we should limit the maximum number of attempts).
6. The relationship is commonly described like this: information is interpreted data. I.e. data is just a sequence of symbols, information is the knowledge we extract from it.
7. The probability of program breaking is 1 minus probability of it not breaking. For a program to NOT break during one year, all libraries have to stay unchanged (probability 0.95 for each one): that's 0.95 * 0.95 * 0.95 * ... = 0.95^10. Similarly the probability of it not breaking during 5 years is (0.95^10)^5, so the probability of the program breaking in 5 years is around 92%.
8. `e`
9. Original Unix (around 1970), MS DOS (1981), Windows (1985), Linux (1998), TempleOS (2007). Linux stands out because it's not an operating system, it's a kernel.
10. third
11. *2 * N*. We can multiply the greatest values: *(2^N - 1) * (2^N - 1) = 2^(2 * N) - 2^(N + 1) + 1*; The greatest term *2^(2 * N)* in binary is 1 with *2 * N* zeros after it, subtracting *(2^(N + 1) - 1)* will always definitely shorten this number by at least one bit (1000... minus anything non-zero will shorten the number). So at most we will need *2 * N* bits for the result, but we can't use fewer because for example 11 * 11 = 1001 -- in this case fewer than 2 * 2 = 4 bits wouldn't suffice. So in general we need *2 * N* bits.
12. two (try it, see coin rotation paradox)
13. [capitalism](capitalism.md)
14. B00B5
15. It's not because of the distance from the [Earth](earth.md), the force of gravity is practically the same there (from the Earth's perspective they're really not significantly far away, even the Moon still feels Earth's gravity very strongly so that it doesn't fly away). It's because they are orbiting the Earth, the path they are taking makes them constantly be in a kind of free fall while also preventing them from hitting the Earth (similarly to a comet who is kind of falling towards the Earth but just narrowly misses it, the orbital path of ISS is just much closer to being a circle than an ellipse). I.e. they feel the same kind of weightlessness you will feel in an elevator that's falling down.
16. *(2 * r * 314) / 100*
17. [GPL](gpl.md), LGPL, AGPL, [MIT](mit.md), BSD, Apache, [CC0](cc0.md), unlicense, zlib, WTFPL, ...; [vim](vim.md), [emacs](emacs.md), [Acme](acme.md), Geany, vi, Notepad++, Neovim, Kate, nano, gedit, ...; [Debian](debian.md), 9front, [OpenBSD](openbsd.md), [FreeDOS](freedos.md), [Haiku](haiku.md), [Minix](minix.md), ReactOS, [GNU](gnu.md)/[Hurd](hurd.md), V6 [Unix](unix.md), FreeRTOS, ...
18. The number is *N* such that 2^N = 12345678910111213, rounded up, that is ceil(log2(12345678910111213)) = 54.
19. amplifier, voltmeter, analog hardware for [neural networks](neural_net.md), ...; abacus, mechanical calculators such as Curta, Turing machine made of wood, ...
20. no
21. We can use [cross product](cross_product.md) to find a vector perpendicular to two vectors, so we can take e.g. vectors *U = B - A = {4,3,-2}* and *V = C - A = {0,3,-1}*; their cross product is *UxV = {3,4,12} = n* (just look up the formula for cross product). This is the normal, to normalize it we'll first compute its length, i.e. *|n| = sqrt(3^2 + 4^2 + 12^2) = 13* and then divide each component of *n* by this length, i.e. we finally get *n0 = {3/13,4/13,12/13}*. As a check we can compute [dot product](dot_product.md) of this normal with both *U* and *V* and we should get 0 in both cases (meaning the vectors are perpendicular).
22. Infinite loop just performs jumps back to some previous program instruction which can be repeated indefinitely, so unless there is something inside the loop that will lead to a crash after many repetitions, an infinite loop will just make the program run forever. With recursion, however, every successive recursive call allocates a new call frame on the call stack (so that the program knows where to return from the function) which will lead to running out of stack memory and to [stack overflow](stack_overflow.md).
23. no, no, no
24. The walls will collide in 10 seconds during which the fly has been constantly flying with the speed 1 m/s, so it traveled 10 meters.
25. *[recursion](recursion.md)*, *[compression](compression.md)*, *[nigger](nigger.md)*, *[censorship](censorship.md)*, *[faggot](faggot.md)*, *[network](network.md)*.
26. 1:5:27, 2:10:54, 3:16:21, 4:21:49, 5:27:16, 6:32:43, 7:38:10, 8:43:38, 9:49:05, 10:54:32, 12:00:00, you can compute it by making equations for position of the hour and minute hand depending on time, setting them equal and solving, i.e. you get something like *tm / (60 * 12) = (tm / 60) - (tm // 60)* (where *//* is integer division and *tm* is time in minutes); you will find the times are those when minute hand is at multiples of 60 / 11 minues (5:27), i.e. there are 11 such times around the circle and they are evenly spaced.
27. Shading is the process of computing surface color of 3D objects, typically depending on the object's material and done by GPU programs called [shaders](shader.md); shading involves for example applying textures, normal mapping and mainly lighting -- though it can make pixels lighter and darker, e.g. depending on surface normal, it only applies local models of light, i.e. doesn't compute true shadows cast by other objects. On the other hand computing shadows uses some method that works with the scene as a whole to compute true shadowing of objects by other objects.
28. We can't really talk about Turing completeness of plain neural networks, they cannot be Turing complete because they just transform fixed length input into fixed length output -- a Turing complete model of computation must be able to operate with arbitrarily large input and output. In theory we can replace any neural network with logic circuit or even just plain lookup table. Significance of neural networks doesn't lie in their computational power but rather in their efficiency, i.e. a relatively small and simple neural network may replace what would otherwise be an enormously large and complicated circuit.
29. two (or txq); The cipher offsets each letter by its position.
30. *log2(n)*; Binary search works by splitting the data in half, then moving inside the half which contains the searched item, recursively splitting that one in half again and so on -- for this the algorithm will perform at worst as many steps as how many times we can divide the data in halves which is what base 2 logarithm tells us.
31. Yes, a false statement implies anything.
32. The main difference against symmetric cryptography is we have two keys instead of one, one (private) for encrypting and one (public) for decrypting -- neither key can be used for the other task. Therefore encryption and decryption processes differ greatly (while in symmetric cryptography it's essentially the same, using the same key, just in reversed way), the problem looks different in one direction that the other, hence it is called *asymmetric*.
33. It's not the distance from the Sun (the distance doesn't change that much and it also wouldn't explain why opposite hemispheres have opposite seasons) but the tilted Earth axis -- the tilt changes the maximum height to which the Sun rises above any specific spot and so the angle under which it shines on the that spot; the [cosine](cos.md) of this angle says how much energy the place gets from the Sun (similarly to how we use cosine to determine how much light is reflected off of a surface in [shaders](shader.md)).
34. For example: MOV (moves values between memory locations or registers), JNE (jump if not equal, jumps to another instruction if comparison resulted in non-equality), ADD (adds values in memory or registers), CMP (compares two values and sets the flags register), RET (returns from procedure, pops return address and jumps there) etc.
35. 4 and 13, solution: make a table, columns are first integer, rows are second (remember, both *P* and *S* can be making their own table like this too). Cross out whole bottom triangle (symmetric values). *P* doesn't know the numbers, so cross out all combinations of two primes (he would know such numbers as they have only a unique product). *S* knew *P* didn't know the numbers, so the sum also mustn't be a sum of two primes (if the sum could be written as a prime plus prime, *S* couldn't have known that *P* didn't know the numbers, the numbers may have been those two primes and *P* would have known them). This means you can cross out all such numbers -- these are all bottom-left-to-top-right diagonals that go through at least one already crossed out number (combination of primes), as these diagonal have constant sum. Now *P* has a table like this with relatively few numbers left -- if he now leaves in only the numbers that make the product he knows, he'll very likely be left with only one combination of numbers -- there are still many combinations like this, but only the situation when the numbers are set to be 4 and 13 allows *S* to also deduce the numbers after *P* declares he knows the numbers -- this is because *S* knows the combination lies on one specific constant-sum diagonal and 4-13 lie on the only diagonal that in this situation has a unique product within the reduced table. So with some other combinations *P* could deduce the numbers too, but only with 4-13 *S* can finally say he knows them too.
36. Hash table will only allow efficient searching of exact matches while binary tree will also allow efficient searching e.g. for all strings starting with some prefix. On the other hand hash table may be faster, in ideal case searching for the match in constant time, but this will depend on the quality of implementation (hash function, number of hash bits, ...), in worst case hash table can degenerate to a mere list. Binary trees will generally be a bit slower, with logarithmic time, but here we'll also have to ensure good implementation, especially balancing the tree -- badly implemented tree may also degenerate to a list.
37. yes
6. Round covers can't fall in round hole (if the hole radius is just a tiny bit smaller than the cover, which is needed for the cover to work); a square cover CAN fall down a square hole if it is rotated certain way (try it if you can't see it).
7. The relationship is commonly described like this: information is interpreted data. I.e. data is just a sequence of symbols, information is the knowledge we extract from it.
8. The probability of program breaking is 1 minus probability of it not breaking. For a program to NOT break during one year, all libraries have to stay unchanged (probability 0.95 for each one): that's 0.95 * 0.95 * 0.95 * ... = 0.95^10. Similarly the probability of it not breaking during 5 years is (0.95^10)^5, so the probability of the program breaking in 5 years is around 92%.
9. `e`
10. Original Unix (around 1970), MS DOS (1981), Windows (1985), Linux (1998), TempleOS (2007). Linux stands out because it's not an operating system, it's a kernel.
11. third
12. *2 * N*. We can multiply the greatest values: *(2^N - 1) * (2^N - 1) = 2^(2 * N) - 2^(N + 1) + 1*; The greatest term *2^(2 * N)* in binary is 1 with *2 * N* zeros after it, subtracting *(2^(N + 1) - 1)* will always definitely shorten this number by at least one bit (1000... minus anything non-zero will shorten the number). So at most we will need *2 * N* bits for the result, but we can't use fewer because for example 11 * 11 = 1001 -- in this case fewer than 2 * 2 = 4 bits wouldn't suffice. So in general we need *2 * N* bits.
13. two (try it, see coin rotation paradox)
14. [capitalism](capitalism.md)
15. B00B5
16. It's not because of the distance from the [Earth](earth.md), the force of gravity is practically the same there (from the Earth's perspective they're really not significantly far away, even the Moon still feels Earth's gravity very strongly so that it doesn't fly away). It's because they are orbiting the Earth, the path they are taking makes them constantly be in a kind of free fall while also preventing them from hitting the Earth (similarly to a comet who is kind of falling towards the Earth but just narrowly misses it, the orbital path of ISS is just much closer to being a circle than an ellipse). I.e. they feel the same kind of weightlessness you will feel in an elevator that's falling down.
17. *(2 * r * 314) / 100*
18. [GPL](gpl.md), LGPL, AGPL, [MIT](mit.md), BSD, Apache, [CC0](cc0.md), unlicense, zlib, WTFPL, ...; [vim](vim.md), [emacs](emacs.md), [Acme](acme.md), Geany, vi, Notepad++, Neovim, Kate, nano, gedit, ...; [Debian](debian.md), 9front, [OpenBSD](openbsd.md), [FreeDOS](freedos.md), [Haiku](haiku.md), [Minix](minix.md), ReactOS, [GNU](gnu.md)/[Hurd](hurd.md), V6 [Unix](unix.md), FreeRTOS, ...
19. The number is *N* such that 2^N = 12345678910111213, rounded up, that is ceil(log2(12345678910111213)) = 54.
20. amplifier, voltmeter, analog hardware for [neural networks](neural_net.md), ...; abacus, mechanical calculators such as Curta, Turing machine made of wood, ...
21. no
22. We can use [cross product](cross_product.md) to find a vector perpendicular to two vectors, so we can take e.g. vectors *U = B - A = {4,3,-2}* and *V = C - A = {0,3,-1}*; their cross product is *UxV = {3,4,12} = n* (just look up the formula for cross product). This is the normal, to normalize it we'll first compute its length, i.e. *|n| = sqrt(3^2 + 4^2 + 12^2) = 13* and then divide each component of *n* by this length, i.e. we finally get *n0 = {3/13,4/13,12/13}*. As a check we can compute [dot product](dot_product.md) of this normal with both *U* and *V* and we should get 0 in both cases (meaning the vectors are perpendicular).
23. Infinite loop just performs jumps back to some previous program instruction which can be repeated indefinitely, so unless there is something inside the loop that will lead to a crash after many repetitions, an infinite loop will just make the program run forever. With recursion, however, every successive recursive call allocates a new call frame on the call stack (so that the program knows where to return from the function) which will lead to running out of stack memory and to [stack overflow](stack_overflow.md).
24. no, no, no
25. The walls will collide in 10 seconds during which the fly has been constantly flying with the speed 1 m/s, so it traveled 10 meters.
26. *[recursion](recursion.md)*, *[compression](compression.md)*, *[nigger](nigger.md)*, *[censorship](censorship.md)*, *[faggot](faggot.md)*, *[network](network.md)*.
27. 1:5:27, 2:10:54, 3:16:21, 4:21:49, 5:27:16, 6:32:43, 7:38:10, 8:43:38, 9:49:05, 10:54:32, 12:00:00, you can compute it by making equations for position of the hour and minute hand depending on time, setting them equal and solving, i.e. you get something like *tm / (60 * 12) = (tm / 60) - (tm // 60)* (where *//* is integer division and *tm* is time in minutes); you will find the times are those when minute hand is at multiples of 60 / 11 minues (5:27), i.e. there are 11 such times around the circle and they are evenly spaced.
28. Shading is the process of computing surface color of 3D objects, typically depending on the object's material and done by GPU programs called [shaders](shader.md); shading involves for example applying textures, normal mapping and mainly lighting -- though it can make pixels lighter and darker, e.g. depending on surface normal, it only applies local models of light, i.e. doesn't compute true shadows cast by other objects. On the other hand computing shadows uses some method that works with the scene as a whole to compute true shadowing of objects by other objects.
29. We can't really talk about Turing completeness of plain neural networks, they cannot be Turing complete because they just transform fixed length input into fixed length output -- a Turing complete model of computation must be able to operate with arbitrarily large input and output. In theory we can replace any neural network with logic circuit or even just plain lookup table. Significance of neural networks doesn't lie in their computational power but rather in their efficiency, i.e. a relatively small and simple neural network may replace what would otherwise be an enormously large and complicated circuit.
30. two (or txq); The cipher offsets each letter by its position.
31. *log2(n)*; Binary search works by splitting the data in half, then moving inside the half which contains the searched item, recursively splitting that one in half again and so on -- for this the algorithm will perform at worst as many steps as how many times we can divide the data in halves which is what base 2 logarithm tells us.
32. Yes, a false statement implies anything.
33. The main difference against symmetric cryptography is we have two keys instead of one, one (private) for encrypting and one (public) for decrypting -- neither key can be used for the other task. Therefore encryption and decryption processes differ greatly (while in symmetric cryptography it's essentially the same, using the same key, just in reversed way), the problem looks different in one direction that the other, hence it is called *asymmetric*.
34. It's not the distance from the Sun (the distance doesn't change that much and it also wouldn't explain why opposite hemispheres have opposite seasons) but the tilted Earth axis -- the tilt changes the maximum height to which the Sun rises above any specific spot and so the angle under which it shines on the that spot; the [cosine](cos.md) of this angle says how much energy the place gets from the Sun (similarly to how we use cosine to determine how much light is reflected off of a surface in [shaders](shader.md)).
35. For example: MOV (moves values between memory locations or registers), JNE (jump if not equal, jumps to another instruction if comparison resulted in non-equality), ADD (adds values in memory or registers), CMP (compares two values and sets the flags register), RET (returns from procedure, pops return address and jumps there) etc.
36. There is no letter "e", one of the most common letters in English and other languages -- this is very unlikely to happen by chance.
37. 4 and 13, solution: make a table, columns are first integer, rows are second (remember, both *P* and *S* can be making their own table like this too). Cross out whole bottom triangle (symmetric values). *P* doesn't know the numbers, so cross out all combinations of two primes (he would know such numbers as they have only a unique product). *S* knew *P* didn't know the numbers, so the sum also mustn't be a sum of two primes (if the sum could be written as a prime plus prime, *S* couldn't have known that *P* didn't know the numbers, the numbers may have been those two primes and *P* would have known them). This means you can cross out all such numbers -- these are all bottom-left-to-top-right diagonals that go through at least one already crossed out number (combination of primes), as these diagonal have constant sum. Now *P* has a table like this with relatively few numbers left -- if he now leaves in only the numbers that make the product he knows, he'll very likely be left with only one combination of numbers -- there are still many combinations like this, but only the situation when the numbers are set to be 4 and 13 allows *S* to also deduce the numbers after *P* declares he knows the numbers -- this is because *S* knows the combination lies on one specific constant-sum diagonal and 4-13 lie on the only diagonal that in this situation has a unique product within the reduced table. So with some other combinations *P* could deduce the numbers too, but only with 4-13 *S* can finally say he knows them too.
38. Hash table will only allow efficient searching of exact matches while binary tree will also allow efficient searching e.g. for all strings starting with some prefix. On the other hand hash table may be faster, in ideal case searching for the match in constant time, but this will depend on the quality of implementation (hash function, number of hash bits, ...), in worst case hash table can degenerate to a mere list. Binary trees will generally be a bit slower, with logarithmic time, but here we'll also have to ensure good implementation, especially balancing the tree -- badly implemented tree may also degenerate to a list.
39. They are two of triplets (or quadruplets, ...).
40. yes
## Other

@ -35,12 +35,14 @@ As perhaps the most influential man in history whose image has been twisted, use
**fun facts about Jesus**:
- **He had siblings** according to the Bible: brothers James, Joses, Simon, Jude and some sisters.
- **He had siblings** (or at least half-siblings), according to both the Bible and historians: brothers James (who further greatly helped promote the teaching of Jesus), Joses, Simon, Jude and some sisters.
- **He was most likely crucified naked**, as was common practice to dishonor the crucified people. Covering his nudity in most depictions may be because of the effort to make it less obvious he was a [jew](jew.md), i.e. that his penis was circumcised.
- **He is acknowledged by other religions such as the [Islam](islam.md)**, though in these he usually plays some minor role of just some mortal preacher.
- We do not sport any anti-white [political correctness](political_correctness.md), however **the traditional depictions of his looks are likely wrong**, he most likely looked much different from the bearded, long-hair white man depictions we see in paintings -- these were likely affected by the Greek ideals of what gods look like. Jesus was a jew, probably of darker skin like all people from the area he lived in, possibly without long hair as some of his followers mention in the Bible that it is inappropriate for a man to have long hair.
- There are some non-canonical gospels (not accepted to Bible) that talk some funny shit about Jesus, e.g. the Infancy Gospel of Thomas talks about how Jesus **as a child killed other children in revenge with his supernatural powers**.
- **His father** is sometimes theorized, by historians, to have been a roman soldier Tiberius Julius Abdes Pantera to whom point some of the clues and whose grave has been found in Germany.
- Bible gives his **genealogy back to Adam**: Luke (however with some disagreement with Matthew) recounts all ancestors of Jesus back to God (who created Adam) -- Jesus is 77th in row here.
- His **profession** probably wasn't a "carpenter" in the sense of "working mainly with wood", he was more likely a mason/stonecutter/builder -- the translation in Bible is firstly inaccurate and using wood as a material wasn't that common back then. He was likely a very poor laborer whose life conditions may have been even worse than that of some slaves living in bigger cities.
- **Jesus is supposed to return** and judge the people: this is known as the Second Coming and is hinted on in the Bible, though the details on the date or even the nature of the event are unclear and interpreted differently. Before the second coming **a number of antichrists, or false prophets, are to appear**.
- ...
@ -52,9 +54,13 @@ This is a quick summary of life and death of Jesus Christ, mostly according to t
{ There is a nice safe public domain book from 1898, digitized on gutenberg.org, called *Bible Pictures and Stories in Large Print* -- it's a very nice, quite short retelling of the Bible, with nice pictures, like a Bible tl;dr. Check it out. ~drummyfish }
Jesus was **born** around 6 to 4 BC (this offset is cause by an error made in Middle Ages when they wrongly calculated his birth year, the error was only revealed once year counting had already been long established) in Bethlehem (in Israel) to Mary and Joseph, with Mary still being a virgin (which is a miracle claimed by Bible, denied by historians and even some churches); his father is said to be God, Mary was made pregnant by Holy Spirit. Jesus grew up in Nazareth and became a carpenter, as Joseph. Even as young he was very knowledgeable of the scripture.
Jesus was **born** around 6 to 4 BC (this offset is cause by an error made in Middle Ages when they wrongly calculated his birth year, the error was only revealed once year counting had already been long established) in Bethlehem (in Israel) to Mary and Joseph, with Mary still being a virgin -- a miracle claimed by Bible but denied by historians and even some churches; his father is said to be God, Mary was made pregnant by Holy Spirit. Some historians theorize Mary got actually pregnant with someone else before Joseph, maybe the roman soldier Tiberius Pantera, and that Joseph then took her for wife, adopting Jesus by doing so (and after that had other children with Mary). Jesus grew up in Nazareth and became a "carpenter" (or rather a mason), like Joseph (though there is actually quite very little evidence about his profession). Even as young he was very knowledgeable of the scripture.
An important event was the **baptism** (the ritual of "purification by water") of Jesus in Jordan river by John the Baptist around 28 AD. This is seen as a real historical event nowadays. John the Baptist was a preacher who foretold the coming of Jesus and some of his followers then started to follow Jesus.
The gospel of Matthew gives a legend that says that Jesus's birth was followed by a bright star appearing above Bethlehem that led many people to visit the place and bring gifts to baby Jesus, among them three wise men from the east. The king Herod heard about this and that "a new King of the Jews was born in Bethlehem" and out of fear he ordered all children under 2 years of age to be killed there (Jesus and his family escaped to Egypt so he was saved) -- this is known as the massacre of the innocents, but no evidence of it having happened was ever found.
There is almost nothing known about the majority of his life -- before he started his ministry -- this is called his **unknown years**. Some wild theories state that he traveled to Egypt, Asia or even the British islands, however those are mostly not accepted. More realistically it is thought that during this time Joseph (his father) died (he may have been a lot older than Mary), as he stops being mentioned completely later on, and that Jesus had to take care of his family, he probably had to work very hard; he may have worked on rebuilding the city of Sepphoris.
An important event was the **baptism** (the ritual of "purification by water") of Jesus in Jordan river by John the Baptist around 28 AD. This is seen as a real historical event nowadays. John the Baptist was a preacher (actually genetically related to Jesus) who foretold the coming of Jesus and some of his followers then started to follow Jesus.
After this Jesus went on to preaching, he chose **twelve apostles**, the closest followers to further preach his words to others; they were (there seems to be some differences between the gospels) Peter, Andrew, James, John, Philip, Bartholomew, Thomas, Matthew, James, Judas, Simon and Matthias. Jesus spoke in parables and made miracles like healing the blind, walking on water, feeding masses of people with only five loaves of bread and even resurrecting dead (Lazarus). His preaching was mainly about the [love](love.md) of [God](god.md), coming to God's kingdom after death, forgiveness (people should forgive others and their own sins will in turn be forgiven by God) and loving other people, even one's enemies, he advocated [nonviolence](nonviolence.md), modesty and frugality.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -3,9 +3,9 @@
This is an autogenerated article holding stats about this wiki.
- number of articles: 577
- number of commits: 774
- total size of all texts in bytes: 3670729
- total number of lines of article texts: 28314
- number of commits: 775
- total size of all texts in bytes: 3672904
- total number of lines of article texts: 28324
- number of script lines: 262
- occurences of the word "person": 8
- occurences of the word "nigger": 73
@ -15,8 +15,8 @@ longest articles:
- [c_tutorial](c_tutorial.md): 124K
- [capitalism](capitalism.md): 68K
- [how_to](how_to.md): 68K
- [chess](chess.md): 56K
- [exercises](exercises.md): 56K
- [chess](chess.md): 56K
- [less_retarded_society](less_retarded_society.md): 52K
- [number](number.md): 52K
- [faq](faq.md): 44K
@ -36,12 +36,12 @@ longest articles:
top 50 5+ letter words:
- which (2107)
- there (1592)
- there (1593)
- people (1378)
- other (1145)
- example (1111)
- other (1146)
- example (1112)
- software (1043)
- number (1010)
- number (1011)
- about (950)
- program (853)
- their (791)
@ -56,7 +56,7 @@ top 50 5+ letter words:
- numbers (677)
- without (641)
- programming (632)
- function (630)
- function (631)
- something (628)
- these (596)
- however (596)
@ -69,8 +69,8 @@ top 50 5+ letter words:
- doesn (521)
- society (517)
- though (495)
- memory (493)
- while (485)
- memory (495)
- while (486)
- using (483)
- drummyfish (483)
- technology (473)
@ -89,6 +89,18 @@ top 50 5+ letter words:
latest changes:
```
Date: Mon Apr 22 20:21:03 2024 +0200
approximation.md
emoticon.md
exercises.md
needed.md
often_confused.md
random_page.md
stereotype.md
trolling.md
wiki_pages.md
wiki_stats.md
youtube.md
Date: Sun Apr 21 20:52:14 2024 +0200
21st_century.md
ascii_art.md
@ -110,21 +122,6 @@ Date: Sat Apr 20 14:23:58 2024 +0200
disease.md
emoticon.md
exercises.md
fail_ab.md
hacking.md
how_to.md
human_language.md
jesus.md
jokes.md
lrs_dictionary.md
nationalism.md
phd.md
progress.md
random_page.md
rock.md
wiki_pages.md
wiki_stats.md
woman.md
```
most wanted pages:
@ -137,11 +134,11 @@ most wanted pages:
- [quake](quake.md) (10)
- [lisp](lisp.md) (10)
- [irl](irl.md) (10)
- [tree](tree.md) (9)
- [meme](meme.md) (9)
- [gpl](gpl.md) (9)
- [drm](drm.md) (9)
- [complex_number](complex_number.md) (9)
- [tree](tree.md) (8)
- [syntax](syntax.md) (8)
- [pointer](pointer.md) (8)
- [html](html.md) (8)

Loading…
Cancel
Save