diff --git a/404.html b/404.html index 457125f..3eb57a6 100644 --- a/404.html +++ b/404.html @@ -7,7 +7,7 @@
- + Fork me on GitHub
@@ -24,7 +24,7 @@ diff --git a/_layouts/base.html b/_layouts/base.html index 49a4ded..2fc6d42 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -6,11 +6,11 @@ - +
- + Fork me on GitHub
@@ -18,7 +18,7 @@
{{ content }}
diff --git a/_layouts/home.html b/_layouts/home.html index da6505e..8f1fbf0 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -24,19 +24,19 @@ layout: base Wikipedia - [[User:The Earwig]] + [[User:The Earwig]] GitHub - earwig + earwig BitBucket - earwig + earwig Twitter - @the_earwig + @the_earwig Tumblr @@ -49,9 +49,9 @@ layout: base
- Earwig + Earwig
-

I'm Ben Kurtovic, a student, software developer, and Wikipedian who occasionally messes around with game production. I'm the guy behind mwparserfromhell and EarwigBot.

+

I'm Ben Kurtovic, a student, software developer, and Wikipedian who occasionally messes around with game production. I'm the guy behind mwparserfromhell and EarwigBot.

On this page, you can find my identities on a few other sites, check out the projects I'm working on, and read some of my incessant ramblings in blog form.

Posts

-

Tweets

-
Follow @the_earwig +

Tweets

+
- Tweets by @the_earwig + Tweets by @the_earwig @@ -76,7 +76,7 @@ layout: base (function () { var s = document.createElement('script'); s.async = true; s.type = 'text/javascript'; - s.src = 'http://' + disqus_shortname + '.disqus.com/count.js'; + s.src = '//' + disqus_shortname + '.disqus.com/count.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(s); }()); diff --git a/_layouts/post.html b/_layouts/post.html index cd21f45..46348c3 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -21,9 +21,9 @@ layout: base var disqus_developer = 1; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; - dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; + dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); - +
diff --git a/_posts/2011-08-23-earwigbot-progress-page-editing.md b/_posts/2011-08-23-earwigbot-progress-page-editing.md index 318b301..ed8452d 100644 --- a/_posts/2011-08-23-earwigbot-progress-page-editing.md +++ b/_posts/2011-08-23-earwigbot-progress-page-editing.md @@ -12,13 +12,13 @@ Because of [this](http://git.io/Nw-rLQ), doing this: >>> site = wiki.get_site() >>> page = site.get_page("User:EarwigBot/Sandbox") >>> page.edit("I can has content?", "BOT: Testing new framework", minor=True) ->>> +>>> {% endhighlight %} ...produces -[this](http://en.wikipedia.org/w/index.php?title=User%3AEarwigBot%2FSandbox&diff=prev&oldid=446401978). -Clearly a MASSIVE DEVELOPMENT. +[this](//en.wikipedia.org/w/index.php?title=User%3AEarwigBot%2FSandbox&diff=prev&oldid=446401978). +Clearly a MASSIVE DEVELOPMENT. After 5,800 lines of code, 54 files, and over 200 commits, EarwigBot can actually edit Wikipedia! diff --git a/_posts/2012-01-29-earwigbot-and-toolserver-updates.md b/_posts/2012-01-29-earwigbot-and-toolserver-updates.md index bd20641..29fde47 100644 --- a/_posts/2012-01-29-earwigbot-and-toolserver-updates.md +++ b/_posts/2012-01-29-earwigbot-and-toolserver-updates.md @@ -30,7 +30,7 @@ EarwigBot's wiki toolset from `copyvios.mako`, and the config file is written, so running the detector is trivial once it works. The only thing left here is to have the tool produce relatively eye-pleasing output, perhaps with a "details" section showing the Markov chains formed from the two sources and -comparing them visually. Not necessary at all, but a nice touch. +comparing them visually. Not necessary at all, but a nice touch. Unfortunately, there's still a bit more work to do on EarwigBot before he's ready for his first release (0.1!). Aside from the copyvio stuff above, which @@ -48,10 +48,10 @@ Now that that's covered, let's look at something (mostly unrelated) I finished a couple days ago: dynamic backgrounds for [my new toolserver site](http://toolserver.org/~earwig/rewrite)! You can see it in action a bit better on [this page](http://toolserver.org/~earwig/earwigbot). -The background is the the [Wikimedia Commons](http://commons.wikimedia.org/) -[Picture of the Day](http://commons.wikimedia.org/wiki/Commons:Picture_of_the_day), +The background is the the [Wikimedia Commons](//commons.wikimedia.org/) +[Picture of the Day](//commons.wikimedia.org/wiki/Commons:Picture_of_the_day), loaded and displayed with JavaScript. -[Here's the code for it](https://github.com/earwig/toolserver/blob/master/static/js/potd.js), +[Here's the code for it](//github.com/earwig/toolserver/blob/master/static/js/potd.js), a good deal more code than I had expected to write. Here's what we have to do: diff --git a/_posts/2014-06-01-obfuscating-hello-world.md b/_posts/2014-06-01-obfuscating-hello-world.md index ab2c942..45eb121 100644 --- a/_posts/2014-06-01-obfuscating-hello-world.md +++ b/_posts/2014-06-01-obfuscating-hello-world.md @@ -5,10 +5,9 @@ description: Fun with functional programming in Python. --- A few months ago, I got first place in -[this Code Golf contest](http://codegolf.stackexchange.com/q/22533) to create -the weirdest obfuscated program that prints the string "Hello world!". I -decided to write up an explanation of how the hell it works. So, here's the -entry: +[this Code Golf contest](//codegolf.stackexchange.com/q/22533) to create the +weirdest obfuscated program that prints the string "Hello world!". I decided to +write up an explanation of how the hell it works. So, here's the entry: {% highlight python %} @@ -73,9 +72,9 @@ sys.stdout.write("Hello world!\n") {% endhighlight %} But let's use something lower-level: -[`os.write()`](https://docs.python.org/2/library/os.html#os.write). We need -`stdout`'s [file descriptor](https://en.wikipedia.org/wiki/File_descriptor), -which is `1` (you can check with `print sys.stdout.fileno()`). +[`os.write()`](//docs.python.org/2/library/os.html#os.write). We need +`stdout`'s [file descriptor](//en.wikipedia.org/wiki/File_descriptor), which is +`1` (you can check with `print sys.stdout.fileno()`). {% highlight python %} @@ -85,7 +84,7 @@ os.write(1, "Hello world!\n") {% endhighlight %} We want a single expression, so we'll use -[`__import__()`](https://docs.python.org/2/library/functions.html#__import__): +[`__import__()`](//docs.python.org/2/library/functions.html#__import__): {% highlight python %} @@ -180,9 +179,9 @@ convert = lambda num: chr(num % 256) + convert(num // 256) if num else "" {% endhighlight %} Now we use -[anonymous recursion](https://en.wikipedia.org/wiki/Anonymous_recursion) to -turn this into a single expression. This requires a -[combinator](https://en.wikipedia.org/wiki/Combinatory_logic). Start with this: +[anonymous recursion](//en.wikipedia.org/wiki/Anonymous_recursion) to turn this +into a single expression. This requires a +[combinator](//en.wikipedia.org/wiki/Combinatory_logic). Start with this: {% highlight pycon %} @@ -238,7 +237,8 @@ some random function: {% endhighlight %} What we're _really_ doing here is looking at the -[line number table](http://svn.python.org/projects/python/branches/pep-0384/Objects/lnotab_notes.txt) of the `code` object contained within the function. Since it's anonymous, there +[line number table](http://svn.python.org/projects/python/branches/pep-0384/Objects/lnotab_notes.txt) +of the `code` object contained within the function. Since it's anonymous, there are no line numbers, so the string is empty. Replace the `0` with `_` to make it more confusing (it doesn't matter, since the function's not being called), and stick it in. We'll also refactor out the `256` into an argument that gets @@ -481,8 +481,8 @@ function. It's getting long, so I'll paste only the first half: Only two more things are left. We'll start with the easy one: `256`. \\(256 = 2^8\\), so we can rewrite it as `1 << 8` (using a -[left bit shift](http://stackoverflow.com/a/141873)), or `_ << ________` with -our obfuscated variables. +[left bit shift](//stackoverflow.com/a/141873)), or `_ << ________` with our +obfuscated variables. We'll use the same idea with `802616035175250124568770929992`. A simple divide-and-conquer algorithm can break it up into sums of numbers which are @@ -490,7 +490,7 @@ themselves sums of numbers that are shifted together, and so on. For example, if we had `112`, we could break it up into `96 + 16` and then `(3 << 5) + (2 << 3)`. I like using bit shifts because the `<<` reminds me of `std::cout << "foo"` in C++, or -[`print` chevron](https://docs.python.org/2/reference/simple_stmts.html#the-print-statement) +[`print` chevron](//docs.python.org/2/reference/simple_stmts.html#the-print-statement) (`print >>`) in Python, both of which are red herrings involving other ways of doing I/O. diff --git a/index.html b/index.html index 3922658..8becb46 100644 --- a/index.html +++ b/index.html @@ -5,34 +5,34 @@ title: Home
- earwigbot (Python // started April 2009) + earwigbot (Python // started April 2009)
- EarwigBot is a Python robot that edits Wikipedia and interacts with people over IRC. It has a separate repository for plugins. + EarwigBot is a Python robot that edits Wikipedia and interacts with people over IRC. It has a separate repository for plugins.
- mwparserfromhell (Python // started May 2012) + mwparserfromhell (Python // started May 2012)
- MWParserFromHell is an easy-to-use and outrageously powerful Python parser for MediaWiki wikicode. + MWParserFromHell is an easy-to-use and outrageously powerful Python parser for MediaWiki wikicode.
- copyvios (Web // started July 2009) + copyvios (Web // started July 2009)
- Copyvios is a copyright violation detector running on Wikimedia Labs. + Copyvios is a copyright violation detector running on Wikimedia Labs.
- earwig.github.com (Web // started June 2011) + earwig.github.com (Web // started June 2011)
earwig.github.com is... well... what you're viewing right now. In source code form! @@ -41,7 +41,7 @@ title: Home
- git-repo-updater (Python // started June 2011) + git-repo-updater (Python // started June 2011)
Gitup is a console script that allows you to easily pull to multiple git repositories at once. @@ -50,25 +50,25 @@ title: Home
- music-quizzer (Python // started May 2011) + music-quizzer (Python // started May 2011)
- MusicQuizzer is a Tk-based program that can help you prepare for your music final with randomly-generated listening quizzes. + MusicQuizzer is a Tk-based program that can help you prepare for your music final with randomly-generated listening quizzes.
- lobo (NetLogo // started December 2011) + lobo (NetLogo // started December 2011)
- Lobo is Logo Bolo: a re-envisioning of the classic tank game by Stuart Cheshire in NetLogo. + Lobo is Logo Bolo: a re-envisioning of the classic tank game by Stuart Cheshire in NetLogo.
- func-smash (Python // started April 2012) + func-smash (Python // started April 2012)
FuncSmash, a small for-the-hell-of-it project, tries to generate random Python functions using Markov chains.