Mastodon

Category Archives: Technology

Awesome Politics Technology

Bringing light to the poor, one liter at a time


A simple water bottle, a little bit of bleach, and a little hole in the roof brings sunlight from the rooftops into homes below. Brilliant, simple, cheap and most importantly, effective.
 
Bringing light to the poor, one liter at a time | Video | Reuters.com.

Rants Technology

The Semantics of Emptyness

Empty space, often realized as indentation, is a common method to signifying meaning in programming languages. Python is famous for this, Haml uses indentation to represent the structure of HTML. I, for one, am not a fan.

In human language, information and meaning, codified, take the shape of syntax and semantics. Syntax being the framework within which the semantics can be parsed. I like to think of syntax as a protocol, the agreement we make to enable the exchange of meaning. English syntax enforces word order, whereas Latin requires declension and conjugation to provide a framework within which we can communicate. Syntax itself informs and modifies Semantics, subtle shifts in word order and conjugation change the meaning of a sentence. A set of words that violate the syntax of english are in essence almost meaningless aside from them self. If I were to take all the words in this paragraph, sort them  randomly, remove the spaces and all punctuation, the result would be gibberish. Additionally, syntactic elements, separated from the words they encompass are without meaning as well.  All of the spaces, punctuation and the order of the parts of speech of the words in the paragraph would also contain very little information at all.

With programming languages, so much of the same holds true: the syntax provides the framework through which the meaning of a program can be understood. My problem with considering whitespace as meaningful with regards to syntax and semantics is that for almost every language, including human language, whitespace has one purpose: token separation. It is only important because of what it is not. Let me try to provide a concrete example.

Above this line there are four spaces. This sentence on the other hand, has eight spaces. The spaces above are meaningless, because empty space itself is almost a purely syntactic element. It has absolutely no semantic value. Beyond that, it’s almost impossible for you to visual discern exactly how many spaces there are because typically the syntactic element we use to separate tokens is the very token you are trying to count.

Haml has many graces: it makes it very easy to whip up totally valid html in a flash and templating is a joy, however, it’s use of whitespace indentation to indicate html element nesting levels is maddening, precisely because it has radically overloaded the concept of emptiness and indentation. To give you an example of this degree of exactly how maddening it is, in one of the sentences above, between two words, there is a double space. Where is it? Can you see it by quickly scanning the document?

I’ve never been able to tinker in python, at least not in the same way that ruby lets me throw together things that just work anywhere I’ve got a text editor (that I can clean up later, naturally). I literally find myself cursing the emptiness. If programming is about expressiveness and power, I for one would not like to wield that ability with a void.

Awesome Technology

Roomba Art


 
Roomba Art, created by attaching LEDs to a roomba and using a long exposure to capture it’s trail. Check out the Roomba Art Pool on flickr for more.

Awesome Technology

Hoverbike: possibly the most awesome & dangerous thing ever.


 

My god. I want one of these so badly. How else am I going to live out my Return of the Jedi speederbike fantasy?

hover-bike.com

Politics Rants Technology

The Internet is my Religion

Watch live streaming video from pdf2011 at livestream.com
Technology

SLR Camera Simulator



Learn what all of the various and sundry knobs and whistles do on your camera. After spending a few minutes playing with this  SLR camera simulator, you’ll be able to navigate through manual mode with ease, while taking better pictures in more environments.

Technology

Magic Regex Generator

txt2re.com: input the text you’d like to run a regex against, and then select the results you’d like returned, and presto! it provides the code in the language of your choice.

This system acts as a regular expression generator. Instead of trying to build the regular expression, you start off with the string that you want to search. You paste this into the site, click submit and the site finds recognisable patterns in your string. You then select the patterns that you are interested in and it writes a fully fledged program that extracts those patterns from that string. You then copy the program into your editor or IDE and play with it to integrate it into your program.

Amazing.

Technology

Glasses free 3d on the ipad 2

Using the forward facing camera to track the location of your eyes, the iPad2 can dynamically create a 3D environment that reorients itself as you and the iPad2 move.

Technology

Nginx, WordPress Network, and Fastcgi Cache: The Ultimate Guide.