blob: b5ffa4a4b92a5e7df735100f41aa05a55f8f828b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
<!DOCTYPE html>
<html><head>
<meta charset="utf-8">
<title>lolcat-c | Home</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="mobile-web-app-capable" content="yes">
<meta name="color-scheme" content="dark light">
<link rel="stylesheet" href="/style.css">
</head>
<body><nav>
<a href="/" title="Home">Home</a>
<a href="/blog/" title="Blog">Blog</a>
<a href="/projects/" title="Projects">Projects</a>
<a href="/about/" title="About">About</a>
<span class="spacer"></span>
<a href="https://git.jaseg.de/" title="cgit">cgit</a>
<a href="https://github.com/jaseg" title="Github">Github</a>
<a href="https://gitlab.com/neinseg" title="Gitlab">Gitlab</a>
<a href="https://chaos.social/jaseg" title="Mastodon">Mastodon</a>
</nav>
<header>
<h1>lolcat-c</h1>
<ul class="breadcrumbs">
<li><a href="/">jaseg.de</a></li>
<li><a href="/projects/">Projects</a></li><li><a href="/projects/lolcat-c/">lolcat-c</a></li>
</ul>
</header>
<main>
<div class="document">
<div class="section" id="what">
<h2>What?</h2>
<img alt="LOLCat-Rainbow.jpg" src="LOLCat-Rainbow.jpg" />
</div>
<div class="section" id="screenshot">
<h2>Screenshot</h2>
<img alt="screenshot.png" src="screenshot.png" />
<img alt="sl.gif" src="sl.gif" />
</div>
<div class="section" id="installation">
<h2>Installation</h2>
<div class="section" id="archlinux">
<h3>Archlinux</h3>
<p>There's an <a class="reference external" href="https://aur.archlinux.org/packages/c-lolcat">AUR package</a>:</p>
<pre class="code sh literal-block">
$<span class="whitespace"> </span>git<span class="whitespace"> </span>clone<span class="whitespace"> </span>https://aur.archlinux.org/packages/c-lolcat<span class="whitespace">
</span>$<span class="whitespace"> </span><span class="name builtin">cd</span><span class="whitespace"> </span>c-lolcat<span class="whitespace">
</span>$<span class="whitespace"> </span>makepkg<span class="whitespace"> </span>-csi
</pre>
</div>
<div class="section" id="fedora">
<h3>Fedora</h3>
<pre class="code sh literal-block">
$<span class="whitespace"> </span>dnf<span class="whitespace"> </span>install<span class="whitespace"> </span>lolcat
</pre>
</div>
<div class="section" id="ubuntu-snap">
<h3>Ubuntu (Snap)</h3>
<p>See <a class="reference external" href="https://blog.simos.info/how-to-make-a-snap-package-for-lolcat-with-snapcraft-on-ubuntu/">this awesome blog post by a kind person from the internet</a>:</p>
<pre class="code sh literal-block">
$<span class="whitespace"> </span>snap<span class="whitespace"> </span>install<span class="whitespace"> </span>lolcat-c
</pre>
</div>
<div class="section" id="mac">
<h3>Mac</h3>
<p>Build loclcat with:</p>
<pre class="code sh literal-block">
$<span class="whitespace"> </span>make<span class="whitespace"> </span>lolcat
</pre>
<p>...and put the resulting binary at a place of your choice.</p>
</div>
<div class="section" id="others">
<h3>Others</h3>
<pre class="code sh literal-block">
$<span class="whitespace"> </span>make<span class="whitespace"> </span><span class="operator">&&</span><span class="whitespace"> </span>sudo<span class="whitespace"> </span>make<span class="whitespace"> </span>install
</pre>
</div>
</div>
<div class="section" id="why">
<h2>Why?</h2>
<p>This <cite>lolcat</cite> 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.</p>
<pre class="code sh literal-block">
newton~/d/lolcat<span class="whitespace"> </span><<span class="literal number">3</span><span class="whitespace"> </span>dmesg>foo<span class="whitespace">
</span>newton~/d/lolcat<span class="whitespace"> </span><<span class="literal number">3</span><span class="whitespace"> </span><span class="name builtin">time</span><span class="whitespace"> </span>upstream/bin/lolcat<span class="whitespace"> </span>foo<span class="whitespace">
</span><span class="literal number">13</span>.51user<span class="whitespace"> </span><span class="literal number">1</span>.34system<span class="whitespace"> </span><span class="literal number">0</span>:15.99elapsed<span class="whitespace"> </span><span class="literal number">92</span>%CPU<span class="whitespace"> </span><span class="operator">(</span>0avgtext+0avgdata<span class="whitespace"> </span>10864maxresident<span class="operator">)</span>k<span class="whitespace">
</span>0inputs+0outputs<span class="whitespace"> </span><span class="operator">(</span>0major+1716minor<span class="operator">)</span>pagefaults<span class="whitespace"> </span>0swaps<span class="whitespace">
</span>newton~/d/lolcat<span class="whitespace"> </span><<span class="literal number">3</span><span class="whitespace"> </span><span class="name builtin">time</span><span class="whitespace"> </span>./lolcat<span class="whitespace"> </span>foo<span class="whitespace">
</span><span class="literal number">0</span>.02user<span class="whitespace"> </span><span class="literal number">0</span>.00system<span class="whitespace"> </span><span class="literal number">0</span>:00.09elapsed<span class="whitespace"> </span><span class="literal number">34</span>%CPU<span class="whitespace"> </span><span class="operator">(</span>0avgtext+0avgdata<span class="whitespace"> </span>1936maxresident<span class="operator">)</span>k<span class="whitespace">
</span>0inputs+0outputs<span class="whitespace"> </span><span class="operator">(</span>0major+117minor<span class="operator">)</span>pagefaults<span class="whitespace"> </span>0swaps
</pre>
<p>Bonus comparison with <a class="reference external" href="https://github.com/tehmaze/lolcat/">python-lolcat</a>:</p>
<pre class="code sh literal-block">
newton~/d/lolcat<span class="whitespace"> </span><<span class="literal number">3</span><span class="whitespace"> </span>dmesg>foo<span class="whitespace">
</span>$<span class="whitespace"> </span><span class="name builtin">time</span><span class="whitespace"> </span>python-lolcat<span class="whitespace"> </span>foo<span class="whitespace">
</span><span class="literal number">12</span>.27user<span class="whitespace"> </span><span class="literal number">0</span>.00system<span class="whitespace"> </span><span class="literal number">0</span>:12.29elapsed<span class="whitespace"> </span><span class="literal number">99</span>%CPU<span class="whitespace"> </span><span class="operator">(</span>0avgtext+0avgdata<span class="whitespace"> </span>11484maxresident<span class="operator">)</span>k<span class="whitespace">
</span>0inputs+0outputs<span class="whitespace"> </span><span class="operator">(</span>0major+1627minor<span class="operator">)</span>pagefaults<span class="whitespace"> </span>0swaps<span class="whitespace">
</span>$<span class="whitespace"> </span><span class="name builtin">time</span><span class="whitespace"> </span>c-lolcat<span class="whitespace"> </span>foo<span class="whitespace">
</span><span class="literal number">0</span>.29user<span class="whitespace"> </span><span class="literal number">0</span>.00system<span class="whitespace"> </span><span class="literal number">0</span>:00.30elapsed<span class="whitespace"> </span><span class="literal number">98</span>%CPU<span class="whitespace"> </span><span class="operator">(</span>0avgtext+0avgdata<span class="whitespace"> </span>468maxresident<span class="operator">)</span>k<span class="whitespace">
</span>0inputs+0outputs<span class="whitespace"> </span><span class="operator">(</span>0major+21minor<span class="operator">)</span>pagefaults<span class="whitespace"> </span>0swaps
</pre>
<p>(Read: <cite>c-lolcat << python-lolcat << ruby-lolcat</cite>)</p>
</div>
</div>
</main><footer>
Copyright © 2023 Jan Sebastian Götte
/ <a href="http://jaseg.de/about/">About</a>
/ <a href="http://jaseg.de/imprint/">Imprint</a>
</footer>
</body>
</html>
|