Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
.gitignore | H A D | 16-Jan-2021 | 18 | 3 | 2 | |
LICENSE | H A D | 16-Jan-2021 | 426 | 15 | 9 | |
Makefile | H A D | 16-Jan-2021 | 467 | 29 | 19 | |
PKGBUILD | H A D | 16-Jan-2021 | 656 | 31 | 26 | |
README.md | H A D | 16-Jan-2021 | 1.8 KiB | 78 | 54 | |
censor.c | H A D | 16-Jan-2021 | 2 KiB | 79 | 55 | |
lolcat.c | H A D | 16-Jan-2021 | 8.4 KiB | 244 | 201 |
README.md
1# What? 2 3![](https://raw.githubusercontent.com/jaseg/lolcat/master/LOLCat-Rainbow.jpg) 4 5## Screenshot 6 7![](https://raw.githubusercontent.com/jaseg/lolcat/master/screenshot.png) 8 9![](./sl.gif) 10 11## Installation 12 13### Archlinux 14 15There's an [AUR package](https://aur.archlinux.org/packages/c-lolcat): 16 17```bash 18$ git clone https://aur.archlinux.org/packages/c-lolcat 19$ cd c-lolcat 20$ makepkg -csi 21``` 22 23### Fedora ### 24 25```bash 26$ dnf install lolcat 27``` 28 29### Ubuntu (Snap) 30 31See [this awesome blog post by a kind person from the internet](https://blog.simos.info/how-to-make-a-snap-package-for-lolcat-with-snapcraft-on-ubuntu/): 32 33```bash 34$ snap install lolcat-c 35``` 36 37### Mac 38 39Build loclcat with: 40``` 41$ make lolcat 42``` 43...and put the resulting binary at a place of your choice. 44 45### Others 46 47```bash 48$ make && sudo make install 49``` 50 51## Why? 52 53This `lolcat` clone is an attempt to reduce the world's carbon dioxide emissions by optimizing inefficient code. It's >10x as fast and <0.1% as large as the original one. 54 55```bash 56newton~/d/lolcat <3 dmesg>foo 57newton~/d/lolcat <3 time upstream/bin/lolcat foo 5813.51user 1.34system 0:15.99elapsed 92%CPU (0avgtext+0avgdata 10864maxresident)k 590inputs+0outputs (0major+1716minor)pagefaults 0swaps 60newton~/d/lolcat <3 time ./lolcat foo 610.02user 0.00system 0:00.09elapsed 34%CPU (0avgtext+0avgdata 1936maxresident)k 620inputs+0outputs (0major+117minor)pagefaults 0swaps 63``` 64 65Bonus comparison with [python-lolcat](https://github.com/tehmaze/lolcat/): 66```bash 67newton~/d/lolcat <3 dmesg>foo 68$ time python-lolcat foo 6912.27user 0.00system 0:12.29elapsed 99%CPU (0avgtext+0avgdata 11484maxresident)k 700inputs+0outputs (0major+1627minor)pagefaults 0swaps 71$ time c-lolcat foo 720.29user 0.00system 0:00.30elapsed 98%CPU (0avgtext+0avgdata 468maxresident)k 730inputs+0outputs (0major+21minor)pagefaults 0swaps 74``` 75 76(Read: ```c-lolcat << python-lolcat << ruby-lolcat```) 77 78