RSS Feed

Thomas Ross Hallock

Fractio

9-July 2012


Fractio: a socket-based distributed Mandelbrot calculator

Fractio is a refinement of my distributed mandelbrot calculator from a few years ago. This version uses sockets to manage the communication between the browser and the server so polling can be avoided altogether.

Links:

  • demo – Click “Make a worker” a few times to get it going. The more workers you make the faster it will render.
  • source on github

(It may be down since I haven’t daemonized the process yet)

Interview with Amazon for Kindle Cloud Reader

28-March 2012

Okay, the real reason I went to Seattle was to interview at Amazon for a developer position on their Kindle Cloud Reader project. I should preface this by stating that I am actually quite comfortable working at RGE, however I do not see my position with them as having much potential for making great web applications, which is my current career objective. That is the only reason I am looking to work elsewhere; otherwise, I am quite happy there :) Here is the lowdown on my experience with Amazon’s recruiting efforts:
(more…)

Octi For Kids Haskellbot

17-April 2011

North: 12 prongs
+---+---+---+---+---+---+
|   |   |   |   |   |   |
|   |   |   |   |   |   |
|   |   |   |   |   |   |
+---+---+---+---+---+---+
|   |   |   |   |   |   |
|   | O | O | O | O |   |
|   |   |   |   |   |   |
+---+---+---+---+---+---+
|   |   |   |   |   |   |
|   |   |   |   |   |   |
|   |   |   |   |   |   |
+---+---+---+---+---+---+
|   |   |   |   |   |   |
|   |   |   |   |   |   |
|   |   |   |   |   |   |
+---+---+---+---+---+---+
|   |   |   |   |   |   |
|   |   |   |   |   |   |
|   |   |   |   |   |   |
+---+---+---+---+---+---+
|   | | |   |   |   |   |
|   | X | X | X | X |   |
|   |   |   |   |   |   |
+---+---+---+---+---+---+
|   |   |   |   |   |   |
|   |   |   |   |   |   |
|   |   |   |   |   |   |
+---+---+---+---+---+---+
South: 11 prongs

On the heels of last week’s post of my implementation of Tonobeb for the web, I bring you another board game blast from my past: back in 2001, I wrote a simple minimax AI in Haskell for a board game called Octi for Kids, a simplified version of Don Green‘s OCTI board game.

I finally had some time this morning to recompile the Haskell code into a binary that runs on my webhost, so now you can play against it while it thinks:

Inspection of the url in the links above will reveal how to arbitrarily increase the look-ahead level.

The code is available here on github.

My implementation of Tonobeb – a board game played with dice

10-April 2011

Back in 1983, my uncle Bruce came up with a fun board game played with dice. My dad made a nice wooden board for it and Bruce got a write-up of the the game published in Gameplay Magazine. Fast forward to 2006 and I made a playable web version of the game; it was the first web application that I finished, and even now, I’m a bit impressed in using it. This pre-dates jQuery, so please savor the library-free hand-coded javascript ajaxy goodness. Without further ado, I present Web Tonobeb:

If someone else loads this page at the same time as you, you will be matched with them automatically. Alternatively, you can challenge a friend by e-mail.

I just open sourced Web Tonobeb on github; I probably won’t have much time to turn it into something that Yahoo games would want to acquire, but you might! Clone away!

Fractile: browser-based distributed computation of Mandelbrot set tiles. Now on Google Code!

17-September 2010

I open sourced my Yahoo Open Hack NYC 2009 entry into a google code project called fractile. It’s currently only one php file with embedded Javascript at the moment. Feel free to let me know if you would be interested in joining the project to turn this into something useful; the idea has tons of potential for any sort of problem that can be parallelized well low-bandwidth ray-tracking, for example.

A proof of concept HTML + JS-based distributed computing platform

10-October 2009

[update] Just fixed a bug that was preventing this from working in most browsers. Go ahead and give it a try now.
distributed browser based Mandelbrot set rendererI made this browser-based Mandelbrot set zoomer for Yahoo’s Open Hack Day NYC 2009. It is built in HTML + JS and will use the browser of anyone that has the page loaded to construct fractal images for other users that are also viewing the page. Click on the large image to zoom deeper and deeper. It works best in Safari 4, okay in Firefox 3.

This is a proof of concept of portable browser-based distributed computing. (It even runs on iPhone.) The web server will ask your browser to render a specific square on the complex plane onto a canvas. Your browser will then submit the rendered square by turning the canvas into a data URL and posting it to the server’s cache. At the same time, your browser is requesting that the server send out render requests for all squares necessary to make up your current view of the complex plane. These requests may be rendered by your browser, or they may be rendered by another user’s browser that currently has the page running. Load it up on two or three computers at the same time and you’ll notice a significant increase when rendering parts of the fractal. The server caches the tiles, so browse to an obscure part of the fractal to make sure that the system is actually sending requests to the swarm. You can see the last square that your browser rendered just below the large square.

This technique can be used for a specific type of problem where the information that describes the problem and the result is significantly lighter-weight than the computation required to solve it. Specifically, this would also work well for a web-based ray-tracer.

This idea was partially inspired by Resig’s Test Swarm service that distributes front-end toolkit testing to any user that hits the site with their browser.

Life after 40; W3C compliance, IPv6, cloud policy, and open APIs

7-September 2009

My hipper-than-thou grandmother asked for comments on this article provoked by the 40th anniversary of the internet and the issues regarding the erosion of the openness that the internet was founded on.

So, here are four things that I’m looking forward to, or concerned about that are in the internet’s immediate future:

full standards compliance across web browsers

Web standards are becoming stronger. The latest versions of all the major web browsers support HTML 5 to some extent, and are all relatively standards compliant. The popularity of older versions of Microsoft Internet Explorer put application development into a dark age that spanned almost a decade. Internet Explorer was not standards compliant, so it made it very difficult make web applications that worked the same way on other browsers like Firefox and Safari.

The web is more standards-compliant than it ever has been, and as people and IT departments get around to upgrade their browsers, innovation on the web will flourish in ways that we have not yet seen. This is a very good thing.

Saturation of IPv4 will force rapid adoption of IPv6

The article references difficulties that some developers experience with getting applications to talk to each other across internal company networks. The inevitable coming of IP6 will make this less of an issue. IP is the addressing system used on the internet that identifies each machine on the network. All internet-connected machines use IP version 4 (IPv4), but we are approaching a point where the number of machines connected to the internet will be greater than the number of addresses that IPv4 can uniquely identify. Wikipedia says that all IPv4 addresses will be used up some time in 2010.

The IPv4 problem is the equivalent of a neighborhood policy stating that house numbers can only have three digits, and there is demand for over 1000 houses to be in the neighborhood. This creates a supply vs. demand situation, so the price of IPv4 addresses will increase as more and more of them are needed as the internet grows.

The address space problem has been mitigated to some extent by using a technique called NAT (we use it at the Old Homestead). NAT (Network Address Translation) allows a sub-network of machines to communicate with the internet using a single public IP address. While it mitigates the IPv4 address shortage problem, NAT makes it a bit more difficult to establish point-to-point communication between two computers that are each behind a NAT gateway. So, instead of making software that works like this: (computer A) <--> (computer B), you have software that works like this: (computer A) <--> (service provider) <--> (computer B). NAT is the reason behind a significant number of providers of internet services; it allows them to act as, and in some cases charge for being an intermediary between you and whoever you are trying to connect to. Services like Vonage, GoToMyPC, WebEx, and Skype come to mind as I’m writing this.

To summarize, the limits of IPv4 have made it expensive to uniquely identify computers on the internet, and have fostered a genre of companies that act as an unnecessary middle-man to many online services to solve this problem.

IPv6 solves the address space problem completely; IPv6 allows for enough addresses to uniquely identify every atom in the universe. In an ideal scenario, ISPs would offer an unlimited number of IPv6 addresses to their customers, allowing them to address their machines from anywhere without the need of a third party. The middle-man companies would have to change their business model or go out of business, and a new type of peer-to-peer software would blossom and bring about all sorts of new innovative applications to the internet. There are security implications that go along with this new model of communication, so we end up with the classic toss-up of availability vs. security, but that’s a choice that I would like to have.

We may also see new hardware applications that leverage the increased network availability that IPv6 brings for things that are currently considered too trivial for network connectivity. For example, controllable light switches that can report that they are left on, and temperature sensors that can tell you if you need to start your A/C or heater before you come home.

Two more things and I’m done:

Cloud services

Google, Amazon, and Microsoft all offer cloud services that promise nearly unlimited scaling and reliability for hosted web applications. This is great, but it also leads to centralization of policy between only a few companies, which may end up stifling innovation if the company that owns the cloud decides to prohibit services that compete against the ones that they already offer. This has not proved to be a problem yet, but this issue parallels the net neutrality debate and controversies around Apple’s iPhone app store to some extent.

Open APIs

Many services, big and small, eBay, Google, UPS, and FaceBook, just to name a few, are “opening up” their platform using standards like SOAP, REST, or plain XML. This means that they are releasing formal specifications that tell people like myself how to write software that interacts with their service and extend it in ways that the company hasn’t yet anticipated. In an interesting twist on the idea of using standards to open platforms, the RSSCloud project proposes using RSS in an innovative way to replace centralized messaging services like twitter and Facebook.

turning the premailer interface invisible

28-August 2009

[update: looks like premailer changed their interface a little,
which broke my domain-level meta-interface for it. I'll fix it sometime, just not now :(]

Premailer is a nifty ruby script that turns most of the css from external stylesheets and style blocks into inline css on each element. This is useful if you want to be sure that HTML e-mails will remain mostly in-tact in the viewer’s mail client.

It’s a great script, but the interface could be better… and by better, I mean invisible. … so I bought the domain inlinecss.com and made it work with premailer and your URLs. No interface required; just add .inlinecss.com after the TLD in the URL of the page that you want to inline, and the site will mirror the inlined version of your page.

For example, to inline google.com, turn http://google.com/ into http://google.com.inlinecss.com/

Plans for my 15.4″ 1200p LCD DIY projector

9-June 2009

I designed and partially built a projector about a year ago. I found these plans in my files and thought I’d post them. Download the full plans in Google Sketchup format here.
projector-design_with_top

Playing with GE’s augmented reality

15-April 2009

I find it a bit ironic that this green-themed marketing campaign instructs people to print a sheet of paper for personal amusement. It’s still pretty cool. See my solution to the paper problem below.
ge_reality

refracting magnifying glass effect with Javascript

20-March 2009

After playing with this code and this demo of a javascript mouseover zoom effect, I decided to take the magnifying glass effect one step further and add some refraction:

It uses concentric images placed on top of each other to achieve the illusion. Paste in a URL to any image you want and you can play with it. It’s in an iframe, so you’ll have to dig a little if you want the source; it’s pretty ugly right now.

Google Voice!

17-March 2009

Google just finished converting my GrandCentral account to their new Google Voice service. Try calling me with this nifty widget:

Open for business: PHP + MySQL (LAMP)

10-February 2009

Just FYI: I offer website repair, customization, integration, and anything else that doesn’t involve graphic design work. Rate is $60 / hr. I am best working with PHP + MySQL, but can adapt as needed. Please send me a note if you have a project you would like me to tackle. Please see my resume for links to websites I have worked on in the past.

Expiration date decoder

3-January 2009

This page explains how to decipher many of the cryptic expiration dates found on food containers. This is very useful, but it occured to me that it would be even more useful if this could be implemented in a script that could be accessed from something portable like an iPhone. Enjoy!

Hallock Chemical Truck video and pictures

22-March 2006

My great grandfather designed, built, and sold something called the “Hallock Chemical Truck”. I managed to get some video footage of one of their depression-era marketing campaigns. Click “read more” to see some photos.
(more…)

Template Metaprogramming

1-May 2002

As part of a research and writing project in my Junior year, I wrote an explanation of template metaprogramming in C++ and how it relates to the functional programming paradigm.