Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaseg/lolcat
High-performance implementation of https://github.com/busyloop/lolcat
https://github.com/jaseg/lolcat
Last synced: 2 days ago
JSON representation
High-performance implementation of https://github.com/busyloop/lolcat
- Host: GitHub
- URL: https://github.com/jaseg/lolcat
- Owner: jaseg
- License: other
- Created: 2014-10-24T09:12:12.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2024-07-16T09:44:03.000Z (4 months ago)
- Last Synced: 2024-08-02T13:30:21.175Z (3 months ago)
- Language: C
- Homepage:
- Size: 1.7 MB
- Stars: 362
- Watchers: 10
- Forks: 46
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# What?
![](./LOLCat-Rainbow.jpg)
## Screenshot
![](./screenshot.png)
![](./sl.gif)
## Installation
### Archlinux
There's an [AUR package](https://aur.archlinux.org/packages/c-lolcat):
```bash
$ git clone https://aur.archlinux.org/packages/c-lolcat
$ cd c-lolcat
$ makepkg -csi
```### Fedora ###
```bash
$ dnf install lolcat
```### Ubuntu (Snap)
See [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/):
```bash
$ snap install lolcat-c
```### Mac
Build loclcat with:
```
$ make lolcat
```
...and put the resulting binary at a place of your choice.### Others
Note: Debian users may need the `python-is-python3` package.
```bash
$ make && sudo make install
```## Why?
This `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.
```bash
newton~/d/lolcat <3 dmesg>foo
newton~/d/lolcat <3 time upstream/bin/lolcat foo
13.51user 1.34system 0:15.99elapsed 92%CPU (0avgtext+0avgdata 10864maxresident)k
0inputs+0outputs (0major+1716minor)pagefaults 0swaps
newton~/d/lolcat <3 time ./lolcat foo
0.02user 0.00system 0:00.09elapsed 34%CPU (0avgtext+0avgdata 1936maxresident)k
0inputs+0outputs (0major+117minor)pagefaults 0swaps
```Bonus comparison with [python-lolcat](https://github.com/tehmaze/lolcat/):
```bash
newton~/d/lolcat <3 dmesg>foo
$ time python-lolcat foo
12.27user 0.00system 0:12.29elapsed 99%CPU (0avgtext+0avgdata 11484maxresident)k
0inputs+0outputs (0major+1627minor)pagefaults 0swaps
$ time c-lolcat foo
0.29user 0.00system 0:00.30elapsed 98%CPU (0avgtext+0avgdata 468maxresident)k
0inputs+0outputs (0major+21minor)pagefaults 0swaps
```(Read: ```c-lolcat << python-lolcat << ruby-lolcat```)