2 <!-- Blerg is (C) 2011 The Dominion of Awesome, and is distributed under a
3 BSD-style license. Please see the COPYING file for details.
8 <link rel="stylesheet" href="css/blerg.css">
9 <script type="text/javascript" src="js/prototype.js"></script>
10 <script type="text/javascript" src="js/blerg.js"></script>
11 <meta http-equiv="content-type" content="text/html; charset=utf-8">
12 <meta name="viewport" content="width=device-width, user-scalable=no, maximum-scale=1.0"/>
14 <body onload="init()">
18 <img src="/images/blerglogo.png" class="logo" width="125" height="122">
19 <h1><a href="/">Blërg!</a></h1>
20 <h2><span name="section">Welcome</span></h2>
23 <form style="font-size: small" id="login" onsubmit="loginStatus.login($('login.username').value, $('login.password').value); return false">
24 username: <input type="text" id="login.username" size="10">
25 password: <input type="password" id="login.password" size="10">
26 <input type="submit" value="login">
27 <p style="font-size: large"><a href="#" onclick="$('welcome').hide(); $('items').hide(); $('post').hide(); $('signup').show(); return false;">I want to blërg!</a></p>
29 <div id="logout" style="display: none">
30 Hello, <a href="#" id="userlink"></a>. <a href="#" onclick="loginStatus.logout(); return false">logout</a><br>
31 <a href="#" onclick="postPopup(); return false">Write new entry</a><br>
32 <a href="#" id="reflink">Chatter about me</a>
34 <div id="rss" style="display:none"><a id="rsslink" href=""><img src="/images/rss.png" width="16" height="16"> RSS</a></div>
36 <div style="clear:both"></div>
37 <div id="post" style="display:none">
38 <h2>What's on your mind?</h2>
39 <form onsubmit="loginStatus.post($('post.content').value); return false">
40 <textarea rows="3" id="post.content" onkeydown="resizePostContent()"></textarea>
41 <div id="post.buttons">
42 <input type="submit" value="close" onclick="$('post').hide(); return false">
43 <input type="submit" value="post">
51 <div id="items" style="display:none">
56 <div style="float: right; width: 25%; margin: 0 0 8pt 8pt">
57 <h2>Quick and dirty hack to show recent tags</h2>
58 <div id="newtags"></div>
60 <h2>And here are some users with recent activity</h2>
61 <div id="newusers"></div>
64 <h2>I am 12 and what is this</h2>
66 <p>Blërg is a microblogging platform. Or maybe a miniblogging
67 platform. Blërg is not sure. Blërg is a lot like <a
68 href="http://twitter.com/">Twitter</a>, but aims to fix some of its
69 idiosyncracies. Blërg does not want to be a full blogging platform
70 like <a href="http://wordpress.com/">Wordpress</a> or <a
71 href="http://livejournal.com/">Livejournal</a>. Blërg is also an <a
72 href="/doc/">open source tagged text database engine</a> written in C
73 that does the back-end work. Blërg's author finds it entertaining to
74 anthropomorphize Blërg in the third person.</p>
76 <h2>But what's wrong with Twitter?</h2>
78 <p>I'M GLAD YOU ASKED. There are two aspects of Twitter that just bug
79 me as an engineer:</p>
82 <li><strong>Ruby on Rails</strong> - Using rails to prototype a system is
83 fine — scaling up to a million hits a day with it is just a bad
84 idea. As the service grew, I'm sure it cost them a lot more time than
86 <li><strong>140 characters is not enough</strong> - I routinely write
87 sentences longer than 140 characters, so I can't even begin to imagine
88 making a point in such a small space. This textual confinement has
89 led to the rise of URL shorteners, which are <a
90 href="http://bytex64.net/blog/e2256">breaking the internet</a>.
93 <p>Blërg solves these problems by applying absurd reactionary
94 engineering. Blërg's database backend is a custom C program that
95 handles requests over HTTP and stores data in a very small and
96 efficient indexed log-structured database. The frontend is done
97 entirely in client-side Javascript. A single post can be up to 65535
100 <p>Which is not to say that I believe writing your service in C is the
101 solution to all your problems. Clearly, this approach has just as
102 many hairy problems that will bite you in the ass sooner or later.
103 The best way, as with most things, lies somewhere in the middle of
104 high-level abstraction and ZOMGHARDCORE OPTIMIZATION.</p>
106 <h2>Is this a joke?</h2>
108 <p>Yes. No. Maybe. Blërg is an exercise in constructive satire — a
109 fully functional service created in a fit of hubris to poke fun at Twitter's
110 engineering. It's just for fun, but no one is going to keep you from using
113 <h2>Tell me more about this database engine.</h2>
115 <p>Here, take a look at the <a href="/doc/#design">design docs</a>.</p>
117 <h2>I'm a social media whore and I want to share links!</h2>
119 <p>I've created a bookmarklet just for you: <a href="javascript:location.href='http://blerg.dominionofawesome.com/?post/'+encodeURIComponent(document.title)+'/'+encodeURIComponent(location.href)">Blërg it!</a></p>
123 <div id="navigation">
124 <a id="newer_link" href="#" onclick="newer_page(); return false" style="display:none"><< newer</a>
125 <a id="older_link" href="#" onclick="older_page(); return false" style="display:none">older >></a>
128 <div id="signup" style="display:none">
131 <tr><td>Username:</td><td><input type="text" id="signup.username" width="40"></td>
132 <tr><td>Password:</td><td><input type="password" id="signup.password" width="40"></td>
134 <button onclick="signup()">Signup</button> <button onclick="signup_cancel()">Cancel</button>