Update
This commit is contained in:
parent
fa1f0b9cbd
commit
d44127c798
13 changed files with 2124 additions and 1701 deletions
96
ascii_art.md
96
ascii_art.md
|
@ -2,7 +2,7 @@
|
|||
|
||||
ASCII art is the [art](art.md) of (mostly manually) creating graphics and images only out of [fixed-width](fixed_width.md) (monospace) [ASCII](ascii.md) characters. Strictly speaking this means no [Unicode](unicode.md) or extended ASCII characters are allowed -- these would rather be called Unicode art, [ANSI art](ansi_art.md) etc., though the term ASCII art is quite often used loosely for any art of this kind. If we keep being pedantic, ASCII art might also be seen as separate from mere [ASCII rendering](ascii_rendering.md), i.e. automatically rendering a bitmap image with ASCII characters in place of [pixels](pixel.md), and ASCII graphics that utilizes the same techniques as ASCII art but can't really be called art (e.g. computer generated diagrams); though in practice this distinction is also rarely made. Pure ASCII art is [plain text](plain_text.md), i.e. it can't make use of [color](color.md), text decoration and other [rich text](rich_text.md) formatting.
|
||||
|
||||
This kind of art used to be a great part of the [culture](culture.md) of earliest [Internet](internet.md) communities for a number of reasons imposed largely by the limitations of old computers -- it could be created easily with a text editor and saved in pure text format, it didn't take much space to store or send over a network and it could be displayed on text-only displays and terminals. The principle itself predates computers, people were already making this kind of images with type writers. Nevertheless the art survives even to present day and lives on in the hacker culture, among [programmers](programming.md), in [Unix](unix.md) communities, on the [Smol Internet](smol_internet.md) etc. ASCII diagram may very well be embedded e.g. in a comment in a source code to explain some spatial concept -- that's pretty [KISS](kiss.md). We, [LRS](lrs.md), highly advocate use of ASCII art whenever it's [good enough](good_enough.md).
|
||||
This kind of art used to be a great part of the [culture](culture.md) of earliest [Internet](internet.md) and near-Internet (e.g. [BBS](bbs.md)) communities for a number of reasons imposed largely by the limitations of old computers -- it could be created easily with a text editor and saved in pure text format, it didn't take much space to store or send over a network and it could be displayed on text-only displays and [terminals](terminal.md). The idea itself even predates computers, people were already making this kind of images with type writers, e.g. some poets were formatting their poems with typewriters to picture-shapes. Despite the technical limitations of displays having been overpassed, ASCII art survives even to present day and lives on in the [hacker culture](hacking.md), among [programmers](programming.md), in [Unix](unix.md) and "retro" game communities as well as on the [Smol Internet](smol_internet.md), among people who just want to [keep it simple](kiss.md) and so on. ASCII diagram may very well be embedded in a comment on a text-only forum or in source code to explain some spatial concept. We, [LRS](lrs.md), highly advocate use of ASCII art whenever it's [good enough](good_enough.md).
|
||||
|
||||
Here is a simple 16-shade ASCII [palette](palette.md) (but watch out, whether it works will depend on your font): `#OVaxsflc/!;,.- `. Another one can be e.g.: `WM0KXkxocl;:,'. `.
|
||||
|
||||
|
@ -82,6 +82,100 @@ V
|
|||
|___|_[H]___|=|=|=|=|=|=|=|=|
|
||||
```
|
||||
|
||||
The following is a raster picture auto-converted to ASCII: { For copyright clarity, it's one of my OGA pictures. ~drummyfish }
|
||||
|
||||
```
|
||||
!.-
|
||||
clxVl.
|
||||
c###xl,
|
||||
,.- -,/ac/l!,
|
||||
.,,,;;,.;.---!c..;.-
|
||||
-!;.;,;cl;c##aV#s,....ca//cfs!;;.--,,,;
|
||||
!;;/s/,,c/slc;,;/#l!as;!f/c;;cVOfOf;---.s#c-
|
||||
-OOfl,,,,;/,,,!ll.!;!,,!c/!;;!/;cxxO/.;aO##a/,.,!,c;.
|
||||
!,;,,,,!!,/f/c!a,,,!//c;;;;;;;!cVOV/lf/......------,l/;.---
|
||||
!.!/!/!/;,//c! ;#s,///;;;;;;!c/a#l;-.----....------.,...,..;,-
|
||||
;x/;;;cslsac #a!,,;;/,,./casl,---..!cxfs/.,.,!x#xl....-.;,/l,
|
||||
-;;;;;- s;!V....;;;lca#/.---;f#Vxcf######s;.,..-----,,;ssa.
|
||||
xxl!,,,.!,//c##l ;/c!.,;....c#/.;ac,.,----.,,,fs;a,
|
||||
!Os;!!c,scfa##x- ---,,,,/,,..###x#;.,!-!,-.lc/cfx/#f
|
||||
xOOs##lO##f;;, ,-,,,,,,,;l#V;,!/,,,;.#--l#.;;/!,,#!
|
||||
- !##,,,,, -ax;,,,,,.,f/...c//!./;-#,-##!,,c! ,l;/-
|
||||
/#c- -/, ##/;,,,,,;./,,,;lclll/ -.V##.,,,c! !.,/;
|
||||
/##! -.;,;#/,,,,,;,l,,,,,sl,x### - ,#/,,,,c; c,.,l/.
|
||||
ls#,,,,l.#f.,,,.ff/;;;;O; ;l/s ---;#;,,;V ./lOcfl!.-
|
||||
.lf#;,;/!Vl,,,,,xccccs/ ac/,--xf;,,,;# #////f#l,
|
||||
l/cflc/;.;al/;lclx!, .f//--.;,,,,O f/fcx##l.
|
||||
;s////l-;f#;,;,-- s//f;,,!,,;/ l#xf.c/!!
|
||||
,;,//!--;;,,,c !///x.,,,,f- -c/f ./,/
|
||||
,fl!flll.,!/cc, .ll//f;,,,,/; !;;. ,,;/
|
||||
lf;!;!O/,;c;l!fc -fllclc/!!,,!l -,;;!- ;;!
|
||||
////cc;llVcl/f #s/lccx;.!/c/c. .,lc!, !;;
|
||||
./,,,!c--..,,,! x//cf#fscf/c/f. c,f; ;;!
|
||||
-f///!!;---,.,!,f .cc!;/!f;;;//sf. .fl! !flls,
|
||||
- fxl;#/!V/fc/ l! ,!;;;c ;l/lc- ,#Olcs;
|
||||
- -!,-,l!; x.;a!/cfc ./ff; !.-
|
||||
```
|
||||
|
||||
The are many tools for this, but for educational purposes this one was made using the following custom [C](c.md) program:
|
||||
|
||||
```
|
||||
#include <stdio.h>
|
||||
|
||||
const char palette[] = "#OVaxsflc/!;,.- ";
|
||||
|
||||
int readNum(void)
|
||||
{
|
||||
int r = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
char c = getchar();
|
||||
|
||||
if (c > '9' || c < '0')
|
||||
break;
|
||||
|
||||
r = r * 10 + c - '0';
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
void skipAfterNewline(void)
|
||||
{
|
||||
while (getchar() != '\n');
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
skipAfterNewline(); // skip magic number
|
||||
skipAfterNewline(); // skip header
|
||||
|
||||
int w = readNum(); // read width
|
||||
int h = readNum(); // read height
|
||||
|
||||
skipAfterNewline(); // skip to pixels
|
||||
|
||||
for (int j = 0; j < h; ++j) // read rows
|
||||
{
|
||||
for (int i = 0; i < w; ++i) // read columns
|
||||
{
|
||||
/* The following is a bit cryptic way of reading RGB, averaging it (giving
|
||||
higher significance to green, for human sight bias) to convert it to
|
||||
grayscale and then getting it to range 0 to 15 (palette size). */
|
||||
int v = ((getchar() + getchar() * 2 + getchar()) * 16) / (4 * 256);
|
||||
putchar(palette[v]);
|
||||
}
|
||||
|
||||
putchar('\n');
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
This program is extremely simple, it just reads an image in [PPM](ppm.md) format on standard input and outputs the image to terminal. Watch out, it won't work for all PPM images -- this one worked with a picture exported from [GIMP](gimp.md) in raw RGB PPM. Also note you have to scale the image down to a very small size AND its aspect ratio has to be highly stretched horizontally (because text characters, i.e. pixels, are much more tall than wide). Also for best results you may want to mess with brightness, contrast, sharpness etc.
|
||||
|
||||
## See Also
|
||||
|
||||
- [ANSI art](ansi_art.md)
|
||||
|
|
4
coc.md
4
coc.md
|
@ -4,7 +4,9 @@
|
|||
|
||||
Code of conduct (COC), also *code of coercion* or *code of [censorship](censorship.md)*, is a [shitty](shit.md) invention of [SJW](sjw.md) [fascists](fascism.md) that's put up in projects (e.g. software) and which declares how developers of a specific project must behave socially (typically NOT just within the context of the development but also outside of it), generally pushing toxic woke concepts such as forced inclusivity, exclusivity of people with unapproved political opinions or use of [politically correct](political_correctness.md) language ([newspeak](newspeak.md)). Sometimes a toxic COC hides under a different name such as *social contract* or *mission statement*, though not necessarily. COC is typically placed in the project repository as a `CODE_OF_CONDUCT` file. In practice COCs are used to establish dictatorship and allow things such as kicking people out of development because of their political opinions expressed anywhere, inside or outside the project, and to push political opinions through software projects. COCs are an indication of [tranny software](tranny_software.md). See also http://techrights.org/2019/04/23/code-of-coercion/.
|
||||
|
||||
**COCs are extremely controversial and opposed by many**, for example [Alexandre Oliva](alexandre_oliva.md), one of the top people at [Free Software Foundation](fsf.md), the maintainer of [Linux libre](linux_libre.md) who was a serious candidate of the FSF president, himself identifying as "neurodivergent" and being rather [politically correct](political_corretness.md), has expressed extreme criticism ([here](http://www.fsfla.org/ikiwiki/blogs/lxo/2023-09-28-objections-to-binutils-CoC.en.html)) of forcing a COC into GNU Binutils. He criticized not only forceful push of the decision to put a COC (they basically just announced it without asking if people agree with it), but also stated very true observations such as that "[the power of] enforcement and exclusion tends to attract people with authoritarian leanings" and that he himself feels "vulnerable and unsafe" -- again, someone who basically plays by the pseudoleftist rules. Expanding on the guillotine comparison, Oliva knows that the French revolution (and all other revolutions) devoured many of its children, and though he probably feels part of this revolution, he still criticized the guillotine.
|
||||
**COCs are extremely controversial and opposed by many**, for example [Alexandre Oliva](alexandre_oliva.md), one of the top people at [Free Software Foundation](fsf.md), the maintainer of [Linux libre](linux_libre.md) who was a serious candidate of the FSF president, himself identifying as "neurodivergent" and being rather [politically correct](political_corretness.md), has expressed extreme criticism ([here](http://www.fsfla.org/ikiwiki/blogs/lxo/2023-09-28-objections-to-binutils-CoC.en.html)) of forcing a COC into GNU Binutils. He criticized not only forceful push of the decision to put a COC (they basically just announced it without asking if people agree with it), but also stated very true observations such as that "[the power of] enforcement and exclusion tends to attract people with authoritarian leanings" and that he himself feels "vulnerable and unsafe" -- again, someone who basically plays by the pseudoleftist rules. Expanding on the guillotine comparison, Oliva knows that the French revolution (and all other revolutions) devoured many of its children, and though he probably feels part of this revolution, he still criticized the guillotine.
|
||||
|
||||
{ Also here's some site: https://nocodeofconduct.com/, tho it's not shitting on it hard enough. ~drummyfish }
|
||||
|
||||
**[LRS](lrs.md) must never employ any COC**, with possible exceptions of anti-COC (such as NO COC) or parody style COCs, not because we dislike genuine inclusivity, but because we believe COCs are bullshit and mostly harmful as they support bullying, censorship and exclusion of people.
|
||||
|
||||
|
|
26
faq.md
26
faq.md
|
@ -70,6 +70,28 @@ Yes.
|
|||
|
||||
No, of course not you dumbo. There is no intention of deception, this project started as a collaborative wiki with multiple contributors, named *Based Wiki*, however I (drummyfish) forked my contributions (most of the original Wiki) into my own Wiki and renamed it to *Less Retarded Wiki* because I didn't like the direction of the original wiki. At that point I was still allowing and looking for more contributors, but somehow none of the original people came to contribute and meanwhile I've expanded my LRS Wiki to the point at which I decided it's simply a snapshot of my own views and so I decided to keep it my own project and kept the name that I established, the *LRS Wiki*. Even though at the moment it's missing the main feature of a wiki, i.e. collaboration of multiple people, it is still a project that most people would likely call a "wiki" naturally (even if only a personal one) due to having all the other features of wikis (separate articles linked via hypertext, non-linear structure etc.) and simply looking like a wiki -- nowadays there are many wikis that are mostly written by a single man (see e.g. small fandom wikis) and people still call them wikis because culturally the term has simply taken a wider meaning, people don't expect a wiki to absolutely necessarily be collaborative and so there is no deception. Additionally I am still open to the idea to possibly allowing contributions, so I'm simply keeping this a wiki, the wiki is in a sense waiting for a larger community to come. Finally the ideas I present here are not just mine but really do reflect existing movements/philosophies with significant numbers of supporters (suckless, free software, ...).
|
||||
|
||||
### Why did you make this wiki? What is its purpose?
|
||||
|
||||
There are many reasons, it serves multiple purposes which also change a bit over time -- the "net good" arising from the existence of this wiki seems to be quite higly positive, so it keeps existing and at least for now flourishes. Anyway here are some reasons for why this wiki exists:
|
||||
|
||||
- At the beginning this was mostly a silly fun and a way of communicating among a few people, though soon it became just my own project.
|
||||
- It really tries to explore -- and also show -- how technology could be done well. By writing this wiki I invent new terms, categorize them, connect concepts together, find useful ideas burried in the history of technology. This wiki can become useful if there is a turnaround, e.g. after the collapse. It also tries to SHOW that many things can be done simply, many articles contain short code snippets that do very useful work in very few lines of code. Many project like libraries and games have been done just by myself and though they many not be perfect, just imagine if some real genius, of a small team of people, tried to do things the way I do them -- we would see miracles happen. Many articles link to cool minimalist programs and projects that demostrate the principles.
|
||||
- Hopefully it's going to be a useful resource for people who want to e.g. start programming in C, if only as a repository of code snippets for example. By this I hope to help bring more people to the world of good technology. It's also going to be a big book that's completely CC0, there is never enough of these.
|
||||
- Similarly I hope to spark some critical thinking and non-mainstream midsets such as those of altruism, minimalism, nonviolence and selflessness. There are so few resources that do this, everything is overshadowed by the huge circlejerk avalanche of modern brainwashing of competitiveness, secrecy, self interest, basically just pure evil. I really feel that if I don't say certain things, no one else will.
|
||||
- I hope to perhaps inspire others to make something similar, be it a wiki in similar style or any other kind of art, shared selflessly in the public domain, trying to lead some moral example etc.
|
||||
- It's an experiment in creating what for now seems to be a unique kind of work, a highly uncensored "brain dump" of a social outcast which combines a serious encylopedia, half serious shitposting, repository of various data, social comments and so on. It's also being published continuously, with TODOs and WIPs, errors and mistakes, there are no "stable versions", just a kind of "as is" stream of data, take whatever you will out of it.
|
||||
- The wiki tries to document contemporary society, it may be useful for future historians.
|
||||
- It helps me cope, vent my emotion.
|
||||
- It immensely helps me explain my worldviews without wasting my time and having to talk to people too much. Before this wiki whenever someone asked me "why do you think X?" over email, I had to spend an hour formulating a reply, then I would send it, the guy would be like "hmm it's cool but I disagree" -- so that was an hour of my life lost. People kept asking me the same things over and over, I used to have the exact same hour long converstations with many people, so now I just write my reasonings here and point to my articles without having to suffer retarded arguments over and over. Really it made me much less suicidal.
|
||||
- They said I can't write this stuff on their site and that I should go make my own site, so I did. They banned me so I made myself more free. Maybe also a nice example for others.
|
||||
- I just love making it, it makes me relax like nothing else. I write this wiki in between making my software projects which I love too but which require a bit more effort. A few times in my life I wanted to perhaps be a teacher as I like education and explaining things but at the same time I CANNOT STAND FUCKING PEOPLE -- this wiki makes me able to do what I like without having to suffer what I hate.
|
||||
- It satisfied my obsessive needs for making lists, cheatsheets and so on. Also helps me keep my notes, ideas etc.
|
||||
- It makes me (and hopefully others) learn about and research quite obscure things, I have personally discovered so many new amazing things while writing this wiki. Browsing the Internet is sometimes not enough, writing about something is what makes you go deeper.
|
||||
- I hope to contribute to the downfall of capitalism, though TBH I don't believe it can happen at this point.
|
||||
- This also helped me find some cool online friends. If you go searching for people like you, you won't find them, but if you put your ideas publicly on the display, people with similar ideas will reach out to you themselves.
|
||||
- Probably other reasons I couldn't recall right now :-)
|
||||
- ...
|
||||
|
||||
### Why is this rather not a blog?
|
||||
|
||||
Because blogs suck, they are based on the idea of content consumerism and subscribers following celebrities just like on youtube or facebook, blog posts are hasted, ugly and become obsolete in a week, this wiki is trying to create a reference work that can be polished and will last last some time.
|
||||
|
@ -96,6 +118,10 @@ In three words basically [anarcho pacifist](anpac.md) [communism](communism.md),
|
|||
|
||||
This is a good point, we talk about [capitalism](capitalism.md) simply because it is the system of today's world and an immediate threat that needs to be addressed, however we always try to stress that the root issue lies deeper: it is **[competition](comptetition.md)** that we see as causing all major evil. Competition between people is what always caused the main issues of a society, no matter whether the system at the time was called capitalism, feudalism or pseudosocialism. While historically competition and conflict between people was mostly forced by the nature, nowadays we've conquered technology to a degree at which we could practically eliminate competition, however we choose to artificially preserve it via capitalism, the glorification of competition, and we see this as an extremely wrong direction, hence we put stress on opposing capitalism, i.e. artificial prolonging of competition.
|
||||
|
||||
### Why are you calling everything "capitalism" when clearly you can't generalize so much, capitalism needs mass production, things like free trade, corporatism, libertarianism etc. are different things than capitalism, no?
|
||||
|
||||
Nah, it's all essentially the same, as long as it's based on [competition](competition.md) it's just a different stage of capitalism at best, all these things are based on the fundamentally flawed idea of letting humans compete -- this will always lead to things like trade, money, people forming bigger groups, companies, cartels and eventually corporations etcetc. Only those who believe capitalism can somehow be fixed or made manageable find it important to distinguish different types of it, we just oppose it all, so we don't bother to distinguish between different flavors of shit too much, that would be just unnecessary and distracting.
|
||||
|
||||
### How is this different from [Wikipedia](wikipedia.md)?
|
||||
|
||||
In many ways. Our wiki is better e.g. by being more [free](free_culture.md) (completely [public domain](public_domain.md), no [fair use](fair_use.md) [proprietary](proprietary.md) images etc.), less [bloated](bloat.md), better accessible, not infected by [pseudoleftist](psedoleft.md) [fascism](fascism.md) and censorship (we only censor absolutely necessary things, e.g. copyrighted things or things that would immediately put us in jail, though we still say many things that may get us in jail), we have articles that are better readable etc.
|
||||
|
|
1
fun.md
1
fun.md
|
@ -9,6 +9,7 @@ Fun is a rewarding lighthearted satisfying feeling you get as a result of doing
|
|||
This is subjective AF, even within a single man this depends on day, hour and mood. Anyway some fun stuff may include:
|
||||
|
||||
- the `#capitalistchallenge`: Try to win this game, you have as many shots as you want. Go to some tech store, seek the shop assistant and tell him you are deciding to buy one of two products, ask which one he would recommend. If he recommends the cheaper one you win.
|
||||
- the [fight culture](fight_culture.md) drinking game: Watch some [modern](modern.md) documentary, take a drink every time someone says the word *fight*. Harder mode: also drink when they say the word *[right](rights_culture.md)*.
|
||||
- [programming](programming.md)
|
||||
- [games](game.md) such as [chess](chess.md), [go](go.md) and [shogi](shogi.md), [racetrack](racetrack.md), even vidya gaymes (programming them and/or playing them), but only old+libre ones
|
||||
- [jokes](jokes.md)
|
||||
|
|
6
iq.md
6
iq.md
|
@ -70,7 +70,11 @@ It's been observed that the **IQ of a group** is roughly equal to the IQ of its
|
|||
|
||||
## Real Genius VS Pseudogenius
|
||||
|
||||
Most people are called a genius nowadays -- any recent so called "genius" (such as [Steve Jobs](steve_jobs.md)) is in fact most likely of below average IQ; just barely above mediocre idea someone comes up with by chance will be celebrated as that of a genius, **real genius ideas will be met with hostility**; real genius ideas are too good and too far ahead and unacceptable to normal people. Furthermore success in [business](business.md) requires lack of intelligence so as to be unable to see the consequences of one's actions. Your cat watching you solve Riemann hypothesis will not even know what's happening, to it you are a retard wasting time on sliding a stick over table, on the other hand the cat will judge a monkey capable of opening a can of cat food a genius. Society is composed solely of idiots, they can only see if someone is a tiny bit better at what they do than them, and those they celebrate, if you are light years ahead of them they don't even have the capacity to comprehend how good you are at what you do because they can't even comprehend the thing you do. { The short story *Country of the Blind* by H. G. Wells is a nice story about this phenomenon of too much competence being seen as a lack of competence, illustrated on a story of a completely healthy man who finds himself in a village of people who are all blind. ~drummyfish } This includes even [PhD](phd.md)s and people with several Nobel Prizes, everyone except the few supporters of [LRS](lrs.md) are just blind idiots playing along with the system, some lucky to succeed in it and some not. This is why shit technology is prospering and [LRS](lrs.md) is being overlooked. It's just another confirmation our ideas as superior.
|
||||
Most people are called a genius nowadays -- any recent so called "genius" (such as [Steve Jobs](steve_jobs.md)) is in fact most likely of below average IQ; just barely above mediocre idea someone comes up with by chance will be celebrated as that of a genius, **real genius ideas will be met with hostility**; real genius ideas are too good and too far ahead and unacceptable to normal people. Furthermore success in [business](business.md) requires lack of intelligence so as to be unable to see the consequences of one's actions. Your cat watching you solve Riemann hypothesis will not even know what's happening, to it you are a retard wasting time on sliding a stick over table, on the other hand the cat will judge a monkey capable of opening a can of cat food a genius. Society is composed solely of idiots, they can only see if someone is a tiny bit better at what they do than them, and those they celebrate, if you are light years ahead of them they don't even have the capacity to comprehend how good you are at what you do because they can't even comprehend the thing you do. This includes even [PhD](phd.md)s and people with several Nobel Prizes, everyone except the few supporters of [LRS](lrs.md) are just blind idiots playing along with the system, some lucky to succeed in it and some not. This is why shit technology is prospering and [LRS](lrs.md) is being overlooked. It's just another confirmation our ideas as superior.
|
||||
|
||||
Consider this analogy (yes, analogies are good): in a race you can only see those who are plus or minus 20 meters away from you, you can assess everyone else's position only by someone else telling you, so if someone is 50 meters ahead of you, you can know but only by someone ahead of you telling you that someone ahead of him told him he saw him there. Now since there are many fewer of high IQ people, they have lower probability of being recognized, simply since there are few people capable of recognizing them -- in mainstream places like Universities you still likely will be recognized as there are smart people around, and the knowledge of your genius will be chain propagated to the mainstream monkeys, but if you're a genius outside a mainstream place, the chance is almost zero you will be recognized. With this mainstream will simply lack information about your intelligence, they will only see a question mark above your head -- they know you're not average, because averages get recognized very quickly, everyone can assess those -- so now they know you're either really smart or really dumb, and since you don't fit the false, twisted idea of mainstream pseudogenius (being rich, famous, ...), they will conclude you belong to the latter class, i.e. that you're a retard. Note that average IQ entrepreneurs will still manage to be called geniuses simply by deception, they create the image of pseudogenius, they will pay smart people to tell others they are smart, they will buy or steal authorship of things that were invented by others etc.
|
||||
|
||||
{ The short story *Country of the Blind* by H. G. Wells is a nice story about this phenomenon of too much competence being seen as a lack of competence, illustrated on a story of a completely healthy man who finds himself in a village of people who are all blind. ~drummyfish }
|
||||
|
||||
## Quick IQ Test
|
||||
|
||||
|
|
2
linux.md
2
linux.md
|
@ -1,6 +1,6 @@
|
|||
# Linux
|
||||
|
||||
Linux (also Lunix or Loonix) is a partially "[open-source](open_source.md)" [unix-like](unix_like.md) [operating system](operating_system.md) [kernel](kernel.md), probably the most successful "mostly FOSS" kernel. One of its greatest advantages is support of a lot of [hardware](hardware.md); it runs besides others on [x86](x86.md], [PowerPC](ppc.md), [Arm](arm.md), has many [drivers](driver.md) and can be compiled to be very minimal so as to run well even on very weak computers. **Linux is NOT an operating system**, only its basic part -- for a whole operating system more things need to be added, such as some kind of [user interface](ui.md) and actual user programs (so called [userland](userland.md)), and this is what [Linux distributions](linux_distro.md) do (there hundreds of these) -- Linux distributions, such as [Debian](debian.md), [Arch](arch.md) or [Ubuntu](ubuntu.md) are complete operating systems (but beware, most of them are not fully [FOSS](foss.md)). Linux is one of the biggest collaborative programming projects, as of now it has more than 15000 contributors. Despite popular misconceptions **Linux is [proprietary](proprietary.md) software** by containing binary blobs -- completely free distributions have to use forks that remove these (see e.g. [Linux-libre](linux_libre.md)). Linux is also greatly [bloated](bloat.md) (though not anywhere near [Windows](windows.md) and such) and [tranny software](tranny_software.md), abusing technology as a vehicle for promoting [harmful politics](sjw.md).
|
||||
Linux (also Lunix or Loonix) is a partially "[open-source](open_source.md)" [unix-like](unix_like.md) [operating system](operating_system.md) [kernel](kernel.md), probably the most successful "mostly FOSS" kernel. One of its greatest advantages is support of a lot of [hardware](hardware.md); it runs besides others on [x86](x86.md], [PowerPC](ppc.md), [Arm](arm.md), has many [drivers](driver.md) and can be compiled to be very minimal so as to run well even on very weak computers. **Linux is NOT an operating system**, only its basic part -- for a whole operating system more things need to be added, such as some kind of [user interface](ui.md) and actual user programs (so called [userland](userland.md)), and this is what [Linux distributions](linux_distro.md) do (there hundreds of these) -- Linux distributions, such as [Debian](debian.md), [Arch](arch.md) or [Ubuntu](ubuntu.md) are complete operating systems (but beware, most of them are not fully [FOSS](foss.md)). Linux is one of the biggest collaborative programming projects, as of now it has more than 15000 contributors. Despite popular misconceptions **Linux is [proprietary](proprietary.md) software** by containing binary blobs -- completely free distributions have to use forks that remove these (see e.g. [Linux-libre](linux_libre.md), [Debian](debian.md)'s Linux fork etc.). Linux is also greatly [bloated](bloat.md) (though not anywhere near [Windows](windows.md) and such) and [tranny software](tranny_software.md), abusing technology as a vehicle for promoting [harmful politics](sjw.md).
|
||||
|
||||
[Fun](fun.md) note: there is a site that counts certain words in the Linux source code, https://www.vidarholen.net/contents/wordcount. For the lulz in 2019 some word counts were: "fuck": 16, "shit": 33, "idiot": 17, "retard": 4, "hack": 1571, "todo": 6166, "fixme": 4256.
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ DATE=`date +"%D"`
|
|||
FILECOUNT=`ls *.md | wc -l`
|
||||
FILELIST="wiki_pages"
|
||||
RANDPAGE="random_page"
|
||||
HEADER="<html><head><link rel=\"stylesheet\" href=\"style.css\"><title>LRS Wiki</title></head><body><h1>less_retarded_wiki</h1><span class=\"nav\"><a href=\"main.html\">main page</a>, <a class=\"notdead\" href=\"$FILELIST.html\">file list ($FILECOUNT)</a>, <a class=\"notdead\" href=\"https://git.coom.tech/drummyfish/less_retarded_wiki/archive/master.zip\">source</a>, <a class=\"notdead\" href=\"lrs_wiki.tar.gz\">all in md+txt+html+pdf</a>, <a class=\"notdead\" href=\"report.html\">report abuse</a>, <a class=\"notdead\" href=\"wiki_stats.html\">stats</a>, <a class=\"notdead\" href=\"$RANDPAGE.html\">random article</a>, <a class=\"notdead\" id=\"fancylink\" href=\"pimp_my_lrs.html?p=main.html&s=style_fancy.css\">consoomer version</a>, wiki last updated on $DATE</span><hr />"
|
||||
HEADER1="<html><head><link rel=\"stylesheet\" href=\"style.css\"><title> LRS Wiki: "
|
||||
HEADER2="</title></head><body><h1>less_retarded_wiki</h1><span class=\"nav\"><a href=\"main.html\">main page</a>, <a class=\"notdead\" href=\"$FILELIST.html\">file list ($FILECOUNT)</a>, <a class=\"notdead\" href=\"https://git.coom.tech/drummyfish/less_retarded_wiki/archive/master.zip\">source</a>, <a class=\"notdead\" href=\"lrs_wiki.7z\">all in md+txt+html+pdf</a>, <a class=\"notdead\" href=\"report.html\">report abuse</a>, <a class=\"notdead\" href=\"wiki_stats.html\">stats</a>, <a class=\"notdead\" href=\"$RANDPAGE.html\">random article</a>, <a class=\"notdead\" id=\"fancylink\" href=\"pimp_my_lrs.html?p=main.html&s=style_fancy.css\">consoomer version</a>, wiki last updated on $DATE</span><hr />"
|
||||
FOOTER="<hr/><p>All content available under <a class=\"notdead\" href=\"https://creativecommons.org/publicdomain/zero/1.0/\">CC0 1.0</a> (public domain). Send comments and corrections to drummyfish at disroot dot org. </p></body></html>"
|
||||
|
||||
rm $RANDPAGE.md
|
||||
|
@ -52,7 +53,7 @@ done
|
|||
for f in *.md; do
|
||||
fname=$(echo "$f" | sed "s/\.md//g")
|
||||
f2="html/${fname}.html"
|
||||
echo $HEADER > $f2
|
||||
echo "$HEADER1 $fname $HEADER2" > $f2
|
||||
cmark-gfm -e table $f | sed "s/\.md\"/.html\"/g" >> $f2
|
||||
echo $FOOTER >> $f2
|
||||
done
|
||||
|
@ -71,7 +72,7 @@ rm mark_dead_links
|
|||
cd ..
|
||||
# mark dead links end
|
||||
|
||||
echo "$HEADER<a href="main.html">Go to main page.</a>$FOOTER" >> html/index.html
|
||||
echo "$HEADER1 redirect $HEADER2<a href="main.html">Go to main page.</a>$FOOTER" >> html/index.html
|
||||
|
||||
echo "</ul> $FOOTER" >> html/$FILELIST
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ Here is a table of notable programming languages in chronological order (keep in
|
|||
| [Ada](ada.md) | ??? | 1983 | | | { No idea about this, sorry. ~drummyfish } |
|
||||
| Object Pascal | no | 1986 | | | Pascal with OOP (like what C++ is to C), i.e. only adds bloat |
|
||||
| Objective-C | probably not | 1986 | | | kind of C with Smalltalk-style "pure" objects? |
|
||||
| [Perl](perl.md) | rather not | 1987 | | | interpreted, focused onstrings, has kinda cult following |
|
||||
| [Perl](perl.md) | rather not | 1987 | | | interpreted, focused on strings, has kinda cult following |
|
||||
| [Bash](bash.md) | well | 1989 | | | Unix scripting shell, very ugly syntax, not so elegant but bearable |
|
||||
| [Haskell](haskell.md) | **kind of** | 1990 | | 150, proprietary | [functional](functional.md), compiled, acceptable |
|
||||
| [Python](python.md) | NO | 1991 | | 200? (p. lang. ref.) | interpreted, huge bloat, slow, lightweight OOP, artificial obsolescence |
|
||||
|
|
3350
random_page.md
3350
random_page.md
File diff suppressed because it is too large
Load diff
90
regex.md
90
regex.md
|
@ -42,4 +42,92 @@ There exist different standards and de-facto standards for regular expressions,
|
|||
| `\d` | digit, *0* to *9* | Perl | |
|
||||
| `\s` | like `[:space:]` | Perl | |
|
||||
|
||||
TODO
|
||||
## Examples And Fun
|
||||
|
||||
Here we'll demonstrate some practical uses of regular expressions. Most common [Unix](unix.md) tools associated with regular expressions are probably **[grep](grep.md)** (for searching) and **[sed](sed.md)** (for replacing).
|
||||
|
||||
The most basic use case is you just wanting to **search** for some pattern in a file, i.e. for example you are looking for all [IP addresses](ip_address.md) in a file, for a certain exact word inside source code comment etc.
|
||||
|
||||
The following uses grep to find and count all occurences of the word `capitalism` or `capitalist` (disregarding case with the `-i` flag) in a plain text version of [this wiki](lrs_wiki.md) and passes them to be counted with *wc*.
|
||||
|
||||
`grep -i -o "capitalis[mt]" ~/Downloads/lrs_wiki.txt | wc -l`
|
||||
|
||||
We find out there are `829` such occurrences.
|
||||
|
||||
Of course, quite frequently you may want to see the lines that match along with files and line numbers, try also e.g. `grep -m 10 -H -n "Jesus" ~/Downloads/lrs_wiki.txt`.
|
||||
|
||||
Now let's search for things that suck with (`-o` prints out just the matches instead of whole line, `-m 10` limits the output to 10 results at most):
|
||||
|
||||
```
|
||||
grep -o -m 10 "[^ ]* \(sucks\|is shit\)" ~/Downloads/lrs_wiki.txt
|
||||
```
|
||||
|
||||
Currently we get the following output:
|
||||
|
||||
```
|
||||
body sucks
|
||||
OS sucks
|
||||
everything sucks
|
||||
Everything is shit
|
||||
language sucks
|
||||
it sucks
|
||||
D&D sucks
|
||||
writing sucks
|
||||
Fediverse sucks
|
||||
This sucks
|
||||
```
|
||||
|
||||
Now let's try **replacing** stuff with *sed* -- this is done with a very common format (which you should remember as it's often used in common speech) `s/PATTERN/REPLACE/g` where `PATTERN` is the regular expression to match, `REPLACE` is a string with which to replace the pattern (`s` stands for substitute and `g` for global, i.e. "replace all"). Let's say we are retarded and obsessed with [muh privacy](privacy.md) and want to censor all names in a portion of the wiki we want to print, so we'll just replace all words composed of letters that start with uppercase letter (and continue with lowercase letters) -- this will also censor other words than names but let's [keep it simple](kiss.md) for now. The command may look something like:
|
||||
|
||||
```
|
||||
cat ~/Downloads/lrs_wiki.txt | tail -n +5003 | head -n 10 | sed "s/[A-Z][a-z]\+/<BEEP>/g"
|
||||
```
|
||||
|
||||
Here we may get e.g.:
|
||||
|
||||
```
|
||||
they typically have a personal and not easy to describe faith. [19]<BEEP>
|
||||
was a <BEEP>. [20]<BEEP> often used the word "[21]<BEEP>" instead of
|
||||
"nature" or "universe"; even though he said he didn't believe in the
|
||||
traditional personal <BEEP>, he also said that the laws of physics were like
|
||||
books in a library which must have obviously been written by someone or
|
||||
something we can't comprehend. [22]<BEEP> <BEEP> said he was "deeply
|
||||
religious, though not in the orthodox sense". <BEEP> are also very hardcore
|
||||
religious people such as [23]<BEEP> <BEEP>, the inventor of [24]<BEEP>
|
||||
language, who even planned to be a <BEEP> missionary. <BEEP> "true
|
||||
atheists" are mostly second grade "scientists" who make career out of the
|
||||
```
|
||||
|
||||
A more advanced feature is what we call **capture groups** that allow us to reuse parts of the matched pattern in the replacement string -- this is needed in some cases, for example if you just want to insert some extra characters in the pattern. Capture groups are parts of the pattern inside brackets (`(` and `)` which sometimes have to be escaped to `\(` and `\)`); in the replacement string we then reference them with `\1` (first group), `\2` (second group) etc. Let's demonstrate this on the following example that will highlight all four letter words:
|
||||
|
||||
```
|
||||
cat ~/Downloads/lrs_wiki.txt | tail -n +8080 | head -n 7 | sed "s/ \([^ ]\)\([^ ]\)\([^ ]\)\([^ ]\) / \!\!\!\1-\2-\3-FUCKING-\4\!\!\! /g"
|
||||
```
|
||||
|
||||
The result may look something like this:
|
||||
|
||||
```
|
||||
Bootstrapping as a general principle can aid us in creation of extremely
|
||||
!!!f-r-e-FUCKING-e!!! technology by greatly minimizing all its [7]dependencies, we are able
|
||||
to create a small amount of !!!c-o-d-FUCKING-e!!! that !!!w-i-l-FUCKING-l!!! self-establish our whole
|
||||
computing environment !!!w-i-t-FUCKING-h!!! only !!!v-e-r-FUCKING-y!!! small effort during the process. The
|
||||
topic mostly revolves around designing [8]programming language
|
||||
[9]compilers, but in general we may be talking about bootstrapping whole
|
||||
computing environments, operating systems etc.
|
||||
```
|
||||
|
||||
Now a pretty rare use case is **generating [random](randomness.md) patterns** -- we can imagine we have a regular expression describing for example a valid username in a game and for some reason we want to generate 1000 random strings that match this pattern (e.g. for bots). Now going into depth on this topic could take a long time because e.g. considering [probability distributions](probability_distribution.md) we may get into some mathematical rabbit holes (considering that for example the regex `.*` matches an arbitrarily long string, what will be the average length of a string randomly generated by this pattern? 10? 1000? 1 billion?). Anyway let's leave this aside -- if we do, there is actually a quite simple and natural way of generating random patterns from regular expressions. We can convert the regexp into [nondeterministic finite automaton](nfa.md), the make a [random traverse](random_walk.md) of the graph and generate the string along the way. There don't even seem to be many Unix tools for doing this -- at the time of writing this one of the simplest way seems to be with [Perl](perl.md) and one of its libraries, which currently still has some great limitations (no groups, no special characters in square brackets, ...), but it's better than nothing. The command we'll be using is:
|
||||
|
||||
```
|
||||
perl -e "use String::Random; for (1..20) { print String::Random->new->randregex('REGEX') . \"\n\"; }" 2>/dev/null
|
||||
```
|
||||
|
||||
Here are some strings generated with different `REGEX`es:
|
||||
|
||||
- `....*`: `\n\"; }"`, `/dB|^hRR/3za~`, `![5q-%ONK`, `"oJT.UzSa}0`, `t"}Yq]sWZjIv`, `Fq<xs~_e`, `H=5yt9q<>29XW`, `<EoVf)ORH{m`, ...
|
||||
- `[A-Z][a-z]{3,8}`: `Ponic`, `Xwawo`, `Hgrtky`, `Brmcitpsw`, `Qrogdze`, `Olhyb`, `Gqeelz`, `Igppehljz`, `Azrdava`, ...
|
||||
- `[:;=8B][-o]?[)({}/|PS]`: `;o}`, `:-)`, `;(`, `B(`, `8o)`, `=/`, `:o|`, `=}`, `=-(`, ...
|
||||
- `[lL][oue]+lz?`: `Loeeolz`, `Luel`, `luuuolz`, `lol`, `Leelz`, `Leoeuoeoueulz`, `luueeoolz`, ...
|
||||
- ...
|
||||
|
||||
TODO: moar, code
|
||||
|
|
213
steganography.md
213
steganography.md
|
@ -12,4 +12,215 @@ Some notable methods and practices of steganography include:
|
|||
- Embedding in **images**. One of the simplest methods is storing data in least significant bits of pixel values (which won't be noticeable by human eyes). Advanced methods may e.g. modify statistical properties of the image such as its color [histogram](histogram.md).
|
||||
- Embedding in **sound**, **video**, vector graphics and all other kinds of media is possible.
|
||||
- All kinds of data can be embedded given enough storage capacity of given bearing medium (e.g. it is possible to store an image in text, sound in another sound etc.).
|
||||
- Information that's present but normally random or unimportant can be used for embedding, e.g. the specific order of items in a list (its [permutation](premutation.md)) can bear information as well as length of time delays in timed data, amount of noise in data etc.
|
||||
- Information that's present but normally random or unimportant can be used for embedding, e.g. the specific order of items in a list (its [permutation](premutation.md)) can bear information as well as length of time delays in timed data, amount of noise in data etc.
|
||||
|
||||
The following two pictures encode text, each picture a different one, written under it. (The method used for the encoding as well as the whole code will be present further below.)
|
||||
|
||||
```
|
||||
-,~.',.
|
||||
'.,, -.....~.
|
||||
_..-, .-.'.,~>"
|
||||
,,-.,-.'',,-.!$$r><l+
|
||||
'':~:~:::'.,.'.,,-.,+$$Ofls5'
|
||||
.~:~''':::~:;:_::;_.,',,_:s"(!s^x}$;
|
||||
-.~JJ<;.'::;~;;_::_::::_;<+F!v!r{888
|
||||
-.<#O#$$ezrslll)l+lfr}{V$88#$!
|
||||
'~+588#O$8$O8$8#O$#$O5,
|
||||
,sOO#$O8$8#88#.
|
||||
O8$$ $Opa{a{^x_
|
||||
$@ M$ 8W M$ eFc>!vs:;sJ:/, , -:_!\
|
||||
$@ @8 8@ @# ^esCc+//s^;_^c+cc+cc+cc+cCi
|
||||
88#8 8# 88 #exoCC+cc>^^s^^s^^s^^s^^s//>/c+c/
|
||||
#8 8#88 #VxsFC)CC+cc+cc+cc+//+cc+cc+cc)/
|
||||
8#88 #8Vi^^oFFoFFoFFoFFoF^oFFoFFoFFs
|
||||
8@ W8 8#88 s88#Ve}xxixxiee}ee}eeixxi^^_
|
||||
88#88# 8@- 8@ #8 8#88#88#88#88#88#88#88#x
|
||||
8W @8 #@, #88#8 ,#88#88#88#88#88#88#88)
|
||||
88#8 8W ,8# ,V#88#88#88#88#88#^
|
||||
8W 88 -C8#88#88#8^-
|
||||
,8#8,-^Vie,
|
||||
_;;oF^#88+c,-cc),
|
||||
,>,, -,/>/,
|
||||
sCC)c/s^/s,
|
||||
,_,,
|
||||
```
|
||||
|
||||
*The ability of accurate observation is often called cynicism by those who have not got it.*
|
||||
|
||||
```
|
||||
-,~.,-,
|
||||
,-.. '.'.,,_.
|
||||
;-'.' ,,-.,':/+
|
||||
'.,,,-'.,.,-,^#$r\<("
|
||||
,,;;;__;~.',...'.,,,+$#$flsV,
|
||||
-~:;.',:~:;;_~::~~:.'.'._~!cls!!x}$;
|
||||
',;cc/_,,_;;_;;_;;_;;_;;_/co^^sxe#88
|
||||
-,/#88#8eix^)CC)Cc)Fx}eV#88#8^
|
||||
-;cb88#88#88#88#88#88b,
|
||||
,s88#88#88#88#,
|
||||
8#88 #8V}ee}^x_
|
||||
8@ W8 8W @8 }Fc>^^s;;sc;>, , -;;s/
|
||||
8W @8 #@ @# ^esCc+//s^;_^c+cc+cc+cc+cCi
|
||||
88#8 8# 88 #exoCC+cc>^^s^^s^^s^^s^^s//>/c+c/
|
||||
#8 8#88 #VxsFC)CC+cc+cc+cc+//+cc+cc+cc)/
|
||||
8#88 #8Vi^^oFFoFFoFFoFFoF^oFFoFFoFFs
|
||||
8@ W8 8#88 s88#Ve}xxixxiee}ee}eeixxi^^_
|
||||
88#88# 8@- 8@ #8 8#88#88#88#88#88#88#88#x
|
||||
8W @8 #@, #88#8 ,#88#88#88#88#88#88#88)
|
||||
88#8 8W ,8# ,V#88#88#88#88#88#^
|
||||
8W 88 -C8#88#88#8^-
|
||||
,8#8,-^Vie,
|
||||
_;;oF^#88+c,-cc),
|
||||
,>,, -,/>/,
|
||||
sCC)c/s^/s,
|
||||
,_,,
|
||||
```
|
||||
|
||||
*To be or not to be. That is the question.*
|
||||
|
||||
## Example Code
|
||||
|
||||
Here is a quite basic [C](c.md) program that hides text in ASCII grayscale pictures (used to generate the examples above):
|
||||
|
||||
```
|
||||
#include <stdio.h>
|
||||
|
||||
const char alphabet[] = // our 6 bit alphabet, position = code
|
||||
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .";
|
||||
|
||||
const char groups[] = // newline separated groups of similar brightness chars
|
||||
"@WM0" "\n" "Q&%R" "\n" "8#O$" "\n" "B69g" "\n"
|
||||
"NUmP" "\n" "w3XD" "\n" "Vbp5" "\n" "d24S" "\n"
|
||||
"qkGK" "\n" "EHAZ" "\n" "hY[T" "\n" "e}a{" "\n"
|
||||
"]y17" "\n" "Fofu" "\n" "n?Ij" "\n" "C)(l" "\n"
|
||||
"xizr" "\n" "^sv!" "\n" "t*=L" "\n" "/>\\<" "\n"
|
||||
"c+J\"" "\n" ";_~:" "\n" ",-'." "\n";
|
||||
|
||||
unsigned char toAlphabet(unsigned char c) // encodes char to 6 bit alphabet
|
||||
{
|
||||
for (unsigned char i = 0; i < 64; ++i)
|
||||
if (alphabet[i] == c)
|
||||
return i;
|
||||
|
||||
return 63;
|
||||
}
|
||||
|
||||
unsigned char fromAlphabet(unsigned char c) // decodes char from 6 bit alphabet
|
||||
{
|
||||
return alphabet[c & 0x3f];
|
||||
}
|
||||
|
||||
int canEncode(char c) // says if specific visual char can be used for encoding
|
||||
{
|
||||
if (c == '\n')
|
||||
return 0;
|
||||
|
||||
for (int i = 0; i < sizeof(groups) - 1; ++i)
|
||||
if (groups[i] == c)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *seekGroup(char c) // helper, seeks to similar brightness group
|
||||
{
|
||||
const char *s = groups;
|
||||
|
||||
while (c != *s)
|
||||
s++;
|
||||
|
||||
while (*s != '\n')
|
||||
s++;
|
||||
|
||||
s--;
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
char encode(char c, int n) // encodes value n in given encodable char
|
||||
{
|
||||
const char *s = seekGroup(c);
|
||||
|
||||
while (n)
|
||||
{
|
||||
s--;
|
||||
n--;
|
||||
}
|
||||
|
||||
return *s;
|
||||
}
|
||||
|
||||
int decode(char c) // decodes value n from given encodable char
|
||||
{
|
||||
int n = 0;
|
||||
|
||||
const char *s = seekGroup(c);
|
||||
|
||||
while (*s != c)
|
||||
{
|
||||
s--;
|
||||
n++;
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
unsigned char currentChar = 0;
|
||||
int pos = 0, done = 0;
|
||||
|
||||
while (1) // read all chars from input
|
||||
{
|
||||
int c = getchar();
|
||||
|
||||
if (c == EOF)
|
||||
break;
|
||||
|
||||
if (argc < 2)
|
||||
{
|
||||
// decoding text from image
|
||||
|
||||
if (canEncode(c))
|
||||
{
|
||||
currentChar = (currentChar << 2) | decode(c);
|
||||
|
||||
if (pos % 3 == 2)
|
||||
{
|
||||
putchar(fromAlphabet(currentChar));
|
||||
currentChar = 0;
|
||||
}
|
||||
|
||||
pos++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// encoding text into image
|
||||
|
||||
if (canEncode(c))
|
||||
{
|
||||
unsigned char c2 = !done ? argv[1][pos / 3] : 0;
|
||||
|
||||
if (!c2)
|
||||
{
|
||||
done = 1;
|
||||
c2 = ' ';
|
||||
}
|
||||
|
||||
c2 = (toAlphabet(c2) >> ((2 - pos % 3) * 2)) & 0x03;
|
||||
c = encode(c,c2);
|
||||
pos++;
|
||||
}
|
||||
|
||||
putchar(c);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
The usage is following: make a file with a grayscale [ASCII art](ascii_art.md) picture, then pass it to the standard input of this program along with text you want to encode (maximum length of the text you can encode is given by the count of usable characters in the input image) passed as the first argument to the program, for example: `cat picture.txt | ./program "hello"`. The program will print out the image with the text embedded in. To read the text from the image similarly pass the picture to the program's input, without passing any arguments, for example: `cat picture2.txt | ./program`. The text will be written to terminal.
|
||||
|
||||
The method used is this: firstly for the encoded message we use our own 6 bit alphabet -- this only allows us to represent 63 symbols (which we have chosen to be uppercase and lowercase letters, space and period) but will allow us to store more of them. Each 6 bit symbol of our alphabet will be encoded by three bit pairs (3 * 2 = 6). One bit pair will be encoded in one ASCII art character by altering that character slightly -- we define groups of ASCII characters that have similar brightness. Each of these groups consists of 4 characters (e.g. `@WM0` is the group of darkest characters), so a character can be used to encode 2 bits (one bit pair of the encoded symbol). The first character in the group encodes `00`, the second one `01` etc. However not all ASCII art characters can be used for encoding, for example space (` `) has no similar brightness characters, so these are just skipped.
|
File diff suppressed because one or more lines are too long
|
@ -3,8 +3,8 @@
|
|||
This is an autogenerated article holding stats about this wiki.
|
||||
|
||||
- number of articles: 563
|
||||
- number of commits: 724
|
||||
- total size of all texts in bytes: 3197222
|
||||
- number of commits: 725
|
||||
- total size of all texts in bytes: 3200211
|
||||
|
||||
longest articles:
|
||||
|
||||
|
@ -24,6 +24,15 @@ longest articles:
|
|||
latest changes:
|
||||
|
||||
```
|
||||
Date: Sun Mar 3 17:52:09 2024 +0100
|
||||
diogenes.md
|
||||
faq.md
|
||||
race.md
|
||||
random_page.md
|
||||
rationalwiki.md
|
||||
unix_philosophy.md
|
||||
wiki_pages.md
|
||||
wiki_stats.md
|
||||
Date: Sat Mar 2 20:30:32 2024 +0100
|
||||
aaron_swartz.md
|
||||
avpd.md
|
||||
|
@ -48,19 +57,6 @@ altruism.md
|
|||
bullshit.md
|
||||
charity_sex.md
|
||||
culture.md
|
||||
digital.md
|
||||
dog.md
|
||||
drummyfish.md
|
||||
internet.md
|
||||
jesus.md
|
||||
less_retarded_society.md
|
||||
pedophilia.md
|
||||
privacy.md
|
||||
programming_tips.md
|
||||
random_page.md
|
||||
shit.md
|
||||
wiki_pages.md
|
||||
wiki_stats.md
|
||||
```
|
||||
|
||||
most wanted pages:
|
||||
|
|
Loading…
Reference in a new issue