-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
107 lines (80 loc) · 5.43 KB
/
index.html
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
<!doctype html>
<html lang="en">
<head>
<title>Entropy - andrew-hoyer.com</title>
<meta charset="utf-8">
<meta property="og:type" content="website"/>
<meta property="og:title" content="Entropy - Andrew-Hoyer.com"/>
<meta property="og:image" content="http://andrew-hoyer.com/experiments/entropy/assets/og-image.png"/>
<meta property="og:url" content="http://andrew-hoyer.com/experiments/entropy/"/>
<meta property="og:description" content="Entropy is a programming language about giving up control..."/>
<link href="http://fonts.googleapis.com/css?family=Bitter" rel="stylesheet" type="text/css">
<link href="assets/main.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="warning">
Sorry it looks like your browser does not support Entropy :(<br/>
<span>You may want to look into trying out the latest version of <a href="http://www.google.com/chrome">chrome</a>, <a href="http://www.apple.com/safari/">safari</a> or <a href="http://www.mozilla.org/firefox/">firefox</a>.</span>
</div>
<h1>Entropy</h1>
<blockquote>
<p>Entropy is a programming language about giving up control. All data decays as the program runs: each value alters slightly every time it's used, becoming less precise. An Entropy programmer needs to abandon the pursuit of precision which most programming demands—often working against years of habit—in order to program effectively. Any output from an Entropy program will be approximate, and the more the data is accessed, the more random it will become. The programmer has, at best, a short window to get his/her idea across before the program corrodes.</p>
<cite>From the <a href="http://esolangs.org/" target="_blank">Esolang</a> wiki entry for <a href="http://esolangs.org/wiki/Entropy" target="_blank">Entropy</a>.</cite>
</blockquote>
<div class="canvas-wrapper">
<canvas id="demo-game"></canvas>
<span> ↺ </span>
</div>
<hr/>
<blockquote>
<p>[Entropy] was inspired by the glitch aesthetic ... and by esolangs in the tradition of brainfuck, which twist logic into delicious nonsense.</p>
<cite>From the <a href="http://esolangs.org/" target="_blank">Esolang</a> wiki entry for <a href="http://esolangs.org/wiki/Entropy" target="_blank">Entropy</a>.</cite>
</blockquote>
<div class="canvas-wrapper">
<canvas id="demo-image"></canvas>
<span> ↺ </span>
</div>
<hr/>
<blockquote>
<p>Entropy addresses the compulsive thinking reinforced by programming, the rigidity of logic, and the way we must compromise with the computer in order to get it to understand us. It is something that has become more familiar to non-programmers as people manage more of their social interactions and other messy human stuff through computers.</p>
<cite>From the <a href="http://esolangs.org/" target="_blank">Esolang</a> wiki entry for <a href="http://esolangs.org/wiki/Entropy" target="_blank">Entropy</a>.</cite>
</blockquote>
<div id="slider">
<div id="thumb">
<div id="label"></div>
</div>
</div>
<div id="verse"></div>
<hr/>
<h3>A little explanation</h3>
<p>All of the above demos are written using a partial JavaScript implementation of the Entropy programming language. It is by no means complete, as JavaScript does not allow you to easily override primitives to return different values.</p>
<p>Quick example usage:</p>
<pre><code>var myObj = Entropy.watch({
x: 100,
y: 50,
});</code></pre>
<p>So now every time <code>x</code> or <code>y</code> on <code>myObj</code> are used their values will shift slightly:</p>
<pre><code>> console.log(myObj.x, myObj.y);
99.99081870880879 50.022617200930924
> console.log(myObj.x, myObj.y);
99.96514272731977 50.00067855522405
> console.log(myObj.x, myObj.y);
99.9494216624665 49.95761874290215</code></pre>
<p>Again because of the limitations of JavaScript, this implementation will only allow <em>entropification</em> of explicitly watched objects.</p>
<p>Mad props to <a href="http://danieltemkin.com/">Daniel Temkin</a> for dreaming up such a brilliant idea.</p>
<h3>Links</h3>
<ul>
<li><a href="https://github.com/ndrwhr/entropy">Source code for this experiment.</a></li>
<li><a href="https://github.com/rottytooth/Entropy">Original .net implementation by Daniel Temkin.</a></li>
<li><a href="http://danieltemkin.com/Entropy.aspx">Entropy home page.</a></li>
<li><a href="http://esolangs.org/wiki/Entropy">Entropy wiki page.</a></li>
<li><a href="http://andrew-hoyer.com">More experiments.</a></li>
</ul>
<div class="social-links">
<iframe src="http://www.facebook.com/plugins/like.php?href=http://andrew-hoyer.com/experiments/entropy/&layout=button_count&show_faces=false&width=90&action=like&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://andrew-hoyer.com/experiments/entropy/" data-text="Entropy:" data-count="horizontal" data-via="ndrwhr">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
<script type="text/javascript" src="entropy.js"></script>
<script type="text/javascript" src="demos.js"></script>
</body>
</html>