Mary is a brilliant scientist who is, for whatever reason, forced to investigate the world from a black and white room via a black and white television monitor. She specialises in the neurophysiology of vision and acquires, let us suppose, all the physical information there is to obtain about what goes on when we see ripe tomatoes, or the sky, and use terms like ‘red’,’ ‘blue’, and so on. She discovers, for example, just which wave-length combinations from the sky stimulate the retina, and exactly how this produces via then central nervous system the contraction of the vocal chords and expulsion of air from the lungs that results in the uttering of the sentence ‘The sky is blue’. [..] What will happen when Mary is released from he black and white room or is given a colour television monitor? Will she learn anything or not? It seems just obvious that she will lean something about the world and our visual experience of it. But then it is inescapable that her previous knowledge was incomplete. But she had all the physical information. Ergo there is more to have than that, and Physicalism is false.
…So goes the famous Mary’s Room thought experiment… Read More
In this world we are surrounded by particular things. A table, a chair, a house, a person… these are all individual particular things. But, many of the particular things around us have something in common. An apple is red and so might be a fire hydrant. A horse is fast and so is a race car. Napoleon was a person and so was his wife. Philosophers often use the term universals to describe these things that different particular objects have in common, or in other words, any word that can be predicated, or said, of multiple things is a universal. That means just about anything, “Horse” in a universal, because it refers to a category of things called “horses”. “Human” is a universal because it refers to a category of things called “humans”. “Redness” is a universal because it’s possible for more than one thing to be the color red. “Large”, “short”, “white”, “table”, etc… just about any adjective or noun that isn’t a proper noun is arguably a universal… Read More
There is an interesting paper called How Complex Systems Fail. It’s a collection of 18 related observations about complex systems and about when and how they fail. The observations are as follows:
Recently, a fried told me he was having trouble getting a Parallax RFID reader working on a Raspberry Pi for a project he was working on. I wondered how hard it could be so I got one of the readers for myself and hooked it up to a Pi. It turns out that it was harder than I thought it would be, but only because I didn’t know what I was doing.
When the reader is connected to the computer, it is auto-mounted as a serial port at /dev/ttyUSB0
. You might think that because the letters ‘tty’ are in the device name that this is a TTY device, but it turns out that TTY devices are just connected over serial ports. This was not actually a TTY device. Once I understood that, it turns out that connected to a serial port on Linux though Python is actually rather simple. One just needs the pyserial
library.
Here are some instructions and sample code to get this device working with a Raspberry Pi… Read More
So, the other week I was in the store purchasing some toothpaste. Now toothpaste, at least in America, is a great example of that phenomenon of a huge number of indifferentiatable choices you often get when shopping at a typical grocery store. There are maybe a dozen brands of toothpaste and each brand has maybe a dozen products all advertising slightly different advantages in the realm of tooth care. One tube of toothpaste offers defense against cavities while another advertises that it will prevent plaque build up. Now, never mind the fact that the default expectation is that all brands of toothpaste will help prevent cavities, there is really no way for the casual shopper to really evaluate the claims of these different products.(With the exception of anti-sensitivity toothpaste where I imagine a person with sensitive teeth could tell if the toothpaste helped.) If one uses one brand of toothpaste for a year and never gets a cavity, there is generally no way to know if it was that toothpaste which prevented, or if any brand would have done.… Read More
I’m going to be expanding on something I’ve talked about before. This idea of Unix’s supposed simplicity and how Unix has deviated over the years rather fascinates me.
Some years ago I remember reading the The Art of Unix Programming by the vociferous Eric Raymond. I remember this book making a strong impact on how a I thought about system design and the writing of new programs. TAoUP is not, by itself, a revolutionary book. Rather, it is a collection of received wisdom regarding the design of the Unix operating system and of programs intended to be run in the Unix environment. I think that the most important idea put forward in the book is the notion of Unix, rather than simply being a platform on which to run large complicated programs, is rather a collection of smaller programs, unified by a few metaphors.… Read More
I’ve been playing, of late, with ClojureScript front-ends, specifically with Om and with Reagent. Between the two, I like Reagent much better. The short reason why is that it feels much more ‘Clojurish’ and the programming model feels much more accessible, especially to someone already familiar with Clojure/ClojureScript. Om, by contrast, feels like a thinner wrapper over React And even though it does a number of neat things, it’s ultimately more unwieldy. (I haven’t tried the other ClojureScript React wrapper, Quiescent. It looks promising, leaving the question of state management to developer entirely, unlike either Reagent or Om. I’ll have to take a real look at it sometime.)
Both of these frameworks are basically wrappers for Reactjs which is one of the more unique Javascript front end frameworks out there. The quick low-down on React is that it is a tool for generating a UI (basically, your HTML DOM), from application data. Instead of attempting to mutate a static DOM in-place, React effectively regenerates the DOM from scratch with every update to the application data. React has a number of tricks to make this performant, significantly: creating a stripped down virtual DOM which the application code operates on instead of the browser’s actual DOM. Operating on the VDOM is quicker than operating on the browser’s native DOM and it can be diffed with older versions to allow React to selectively update the browser’s DOM. The end result is that using React involves defining a lot of objects called ‘components’ which generate HTML from plain Javascript data. This means you can separate your application logic, which generates and operates on the application state from your UI layer which is merely passed the application state (or a part of it.) This makes it rather functional in conception, making it a good match for ClojureScript, which is strictly functional… Read More
Systemd has been the controversial hot-button topic for the Linux community for the past few years. Systemd replaces the traditional System V init system and basically just redoes the whole core of the operating system. It takes over the init system, the logging system, and all of the automatic launchers for X, and just crams them into this single monolithic system. Systemd changes everything and for what? Aside from faster boot times, What does systemd give us that we didn’t have before and why are all the distros adopting it? I’ll tell you why… Read More
I was reading Complexity by M. Waldrop and I started thinking about cellular automaton. One thing led to another and I ended up building an instance of Conway’s Game of Life in the browser. I wrote it in Clojurescript and if features the ability to step forward and backwards through sequence, as well as detect end states with some basic cycle detection. It runs in near realtime which was a bit of a feat as Conway’s Game of Life is a rather CPU intensive application to run a realtime for a pattern of any real size. It’s still not quite as fast as a good GoL implementation should be, but I feel like this application nevertheless represents a bit of a case study of a performance intensive application written in Clojurescript… Read More
Web applications have come a long way in the past decade or so. Back in the 90s a ‘web application’ was basically a group of web forms and web pages hidden behind some CGI scripts. In 2004, the same thing was basically still true though people were maybe using servlets rather than CGI. Nowadays however, web applications can be very similar to native applications in terms of functionality and usage. Over the years, the web has transformed from a document delivery system to an application delivery system and we’ve succeeded in replicating just about every native application in web form to some degree or another. This is kind of wild.
Yet, to a large degree, web applications still suck… Read More
I just finished reading Michael Lewis’s book Flash Boys. Its the first Michael Lewis book I’ve read and I’m not yet certain what I think of him as an author or a journalist. I’ll probably read a few more before I’m certain.
What I am certain of is that Flash Boys is a very interesting book. It’s about high frequency trading and its effects on the stock market. It mainly details the less ethical tactics of high frequency traders as well as the creation of IEX, a stock exchange designed to counter those tactics. It raises some very interesting questions about the effects of technology not just on the stock market but in general, and for me, also raises questions about what constitutes fair-play in a free market… Read More
Recently I was writing some code to ingest new entries for my church search website. The application is written in Clojure, but the downloading is done with an external script that downloads new entries and saves them as files in a directory, but at a slow rate. I wanted to be able to specify a range of entries to download, and have the script run and then have my application ingest the files that the script generates. I wanted this to work concurrently, with multiple downloaders and multiple ingesters running at the same time. And I wanted all of this to be triggered from Clojure.
This is basically a concurrency problem so it’s a good thing I was trying to do it in using Clojure. The most obvious solution would be to launch multiple downloaders, and then have a thread which watches the directory, feeding filepaths to ingester threads using channels and core.async. Unfortunately, I’m stuck using an older version of Clojure for this project for the moment and core.async is not available. Thankfully, lazy sequences can be used as a substitute for channels in a pinch… Read More
Parsing a website used to be rather straightforward affair: You download the webpages and then you poke through the HTML with regular expressions until you find what you’re looking for. You could set up a pretty good data extractor going in Perl rather quickly. Later e replaced the regular expressions with proper HTML parsers, but on the whole the process remained rather simple.
These days however, it’s rarely so simple. AJAX, which is essentially the practice of having the webpage communicate with the server through javascript, has become so common we don’t even call it AJAX anymore. Now we just call it ‘The way things are done.’(Calling a website ‘dynamic’ is another alternative.) This is nice in a way because it allows web applications to be much more responsive and interactive. A modern website feels more like a client program than a downloaded document. On the other hand, this makes it much harder to parse webpages… Read More
When attempting to scale software systems, that is, make it possible for the system to take on a higher load or more users, people usually take on of two strategies. vertical scaling and horizontal scaling. Vertical scaling is the practice of buying newer and faster computers on which to run the software while horizontal scaling is the practice of simply buying more computers on which to spread the software across. Between the two, horizontal scaling is often interpreted as having the better scaling potential. Unfortunately, this is not always the case and can lead to some naive attempts to solve very intractable problems… Read More
I’ve been reading a book on Linux’s networking internals and it occurs to me that it’s not always necessary to use concurrency semantics to maintain shared state. So long as the stateful element is naturally atomic and has only one writer globally in the program, it’s safe to use it without concurrency semantics. One example that I’m thinking of is in the Linux kernal’s time management functions. The variable jiffies
is globally available in the kernel which measures the number of ticks since the system booted. (The length of a tick is architecture dependent.) jiffies
is only changed in one place, the internal timekeeping code, but it can be read by any part of the system. Because jiffies
is a single numerical value, operations on it are atomic so it’s impossible to read it in an inconsistent state and because it is only written to by one part of the application, race conditions are also a non-issue. So locks, STM and other forms of concurrency semantic are unnecessary in this instance. I suspect that this could apply to any global counter.
When I first heard about Bitcoin several years ago, I was dismissive that a currency not backed by a central bank or valuable commodity could succeed as a currency. It still seems doubtful to me that Bitcoin could establish itself as a proper world currency, but recent events have lead me to believe that it’s possible and that those involved are not necessarily participating in a de-facto ponzi scheme. Bank of America seems to be getting into the game so Bitcoin looks to me like it might be on it’s way to legitimacy. With this in mind, I thought I’d do some back-of-the-envelope calculations to see if I could figure out the likely future worth of Bitcoins and the value of investing in them at the present time… Read More
I was recently playing around with D3 and ClojureScript and I ended up creating this silly exhaustive sort simulator for the TSP. I ended up learning a couple of things… Read More
I was looking for some more information on how to construct lazy sequences and realized that there is little in the way of documentation on lazy sequences in Clojure. These design notes were the best I could find on the subject and while they are illuminating, I thought the concept could be explained better.
Lazy Sequences are an integral part of the Clojure programming language but one you don’t see in a lot of other programming languages. A sequence, in Clojure, is a sort of metatype or protocol. It signifies a class of datastructures which store items in a logical sequence, such as arrays or lists. Clojure has several types of sequences including classic Lisp-style lists, vectors (which correspond most closely to arrays in other languages,) and lazy sequences… Read More
I’ve been a little bit interested in blackjack of late and in card counting. It turns out that this is a topic about which it is easy to get information. I suppose there is a huge market for advice for would be card counters.
Blackjack is interesting in that it is the only casino card game in which it is possible to beat the house edge through clever play, though to do so requires a lot of work. Essentially, the reason is that a standard game of blackjack already has a very thin edge for the house, only about 0.28% if you play an optimal strategy, (according to stats I found online,) so if you can get a further edge you can beat it. Card counting lets you do this, but only be a very thin margin.
I was considering attempting to fully model a blackjack game mathematically, but this would have been very labor intensive. Also, it’s been done a lot of times before. So, I thought it would be fun to instead simulate a game of blackjack and compare various strategies to see how much they lose or gain over time… Read More
Some time ago I subscribed to the local RSS feed for ‘computer gigs’ on Craigslist. I was hoping that this might lead to some side money but so far most of the stuff advertised has been data-entry positions or wordpress theme updates. Stuff that would be a waste of my time, in other words. Anyway, after following the feed some time, I came across some rather interesting stuff… Read More
I’ve recently just finished switching a project from using MongoDB to PostgreSQL and I’m 100% certain I’ve made the correct decision in doing so. Running at basically the same load, PostgreSQL returns queries much faster and uses much less CPU and RAM. Despite it’s popularity a few years ago, Mongo really strikes me as a bit of a mess… Read More
Of all the features usually attributed to Lisp, by far the most distinguishing is it’s unique sort of homoiconicity. The language itself is represented in the same syntax as its chief datastructure (the singly linked list,) and is in fact parsed into that datastructure for pre-processing before it is actually compiled or interpreted.(Lisps of all sorts can come in compiled or interpreted variations.) This feature allows Lisp code to be manipulated programmatically far more easily than most programming languages. Usually, this is used to extend the language through Lisp macros, but I wonder why it isn’t more often used to enable better editors and IDEs… Read More
The thing about people, is that we are terribly susceptible to a thing called confirmation bias. When we have an idea or opinion, even just a hunch, and we look for evidence to either confirm or deny that notion, we have a tendency to prefer evidence which supports our hypothesis than evidence which refutes it. This is why, for example, people can believe in such zany conspiracy theories. Generally, if you start with a hypothesis and look for evidence proving its truth, you will find it, no matter the hypothesis.(This is partly why scientific experiments generally need to be ‘falsifiable’ to be considered reliable.) This is also why, I think, different people given the same information through the same newsmedia, will arrive at wildly different conclusions.
Here’s my theory: It’s common knowledge that the news gets things wrong. Headlines are frequently misleading, facts are missed, people are misquoted, etc. This is a fact of life and some of it is due to honest mistakes by newspeople but often it’s due to partisan politics or agendas getting in the way of facts. The worst is in politics when two news organizations can take the same story and spin completely different narratives. Most people take this in stride and know to be skeptical of the most outlandish things they hear about in the news, especially from less reliable sources. The problem is, how do people know what is outlandish or likely to be true, without a source of facts as the baseline? Fact checkers can invest the time to follow information to its source and determine facts, but most people don’t have the time to fact check every news article or political story. Instead, we fact check stories which seem false to us, and the article which seems false to us are those with which we already disagree. This is the confirmation bias at full effect.
The problem is then, by consuming news, people will absorb stories they agree with, and dispute stories that challenge them, and thereby continually be reinforced in their point of view… Read More
The thing about people, is that we are terribly susceptible to a thing called confirmation bias. When we have an idea or opinion, even just a hunch, and we look for evidence to either confirm or deny that notion, we have a tendency to prefer evidence which supports our hypothesis than evidence which refutes it. This is why, for example, people can believe in such zany conspiracy theories. Generally, if you start with a hypothesis and look for evidence proving its truth, you will find it, no matter the hypothesis.(This is partly why scientific experiments generally need to be ‘falsifiable’ to be considered reliable.) This is also why, I think, different people given the same information through the same newsmedia, will arrive at wildly different conclusions.
Here’s my theory: It’s common knowledge that the news gets things wrong. Headlines are frequently misleading, facts are missed, people are misquoted, etc. This is a fact of life and some of it is due to honest mistakes by newspeople but often it’s due to partisan politics or agendas getting in the way of facts. The worst is in politics when two news organizations can take the same story and spin completely different narratives. Most people take this in stride and know to be skeptical of the most outlandish things they hear about in the news, especially from less reliable sources. The problem is, how do people know what is outlandish or likely to be true, without a source of facts as the baseline… Read More
Imagine, if you will, a flock of birds. There are thousands of them scattered in a field resting, until, suddenly in one glorious motion they lift off at once. The entire flock rises into the sky, flips back and forth, as if it were a single organism with a single purpose, and comes to rest at once on some power lines. It’s an amazing sight, especially with larger flocks of birds, and it’s an example of emergent behavior… Read More
As I sit, I listen to the buzz of a million ravenous, lustful insects. My usually peaceful neighborhood has been invaded by a swarm of black, red, and orange creatures who have emerged from the earth like zombies and have proceeded to lay claim to all before them. I speak, of course, of the periodical cicada… Read More
One thing I spend a lot of time doing at work is picking apart applications written by people who have come before me and left leaving nary a trace of their intentions. Software developers should write more comments. It’s either a form of hubris to think that you will be the last person to see your code and you will never need to reread it, or a form laziness to simply not care and take the time to type some simple, high-level documentation into your code.
However, occasionally it’s not the developer’s fault that there are no comments. Sometimes commenting just doesn’t make as much sense. One such place is in SQL schemas… Read More
The political spectrum across the developed world is often divided along the lines of Right versus Left. This dichotomy dates back to the French Revolution when members of the General Assembly clambering most for change and radical action sat to left of the chamber while those who urged caution sat to the right. Since then, this duality has become part of the standard taxonomy for nearly every political movement.
These days, politicians are either ‘Right-wing,’ ‘Left-wing,’ or more occasionally, ‘Moderate.’ George Bush was right, Obama left. The Tea Party is right wing, while the Green Party is left wing. Anarcho-syndicalists are leftists, while anarcho-capitalists are right-wingers. Everything and everyone is either left or right, liberal or conservative, Bolshevik or Bourgeois, and people fight long hard verbal wars over who belongs in which category… Read More
Some months ago, I got a Raspberry Pi in the mail and proceeded to install MPD on it. After a few days playing with an embedded MPD server and figuring out what I liked and didn’t like about the arrangement, I decided on a significantly more elaborate project to build on it. I wanted to be able to control the player, even if all of the computers in the house were off. I also wanted to run player while using my desktop, which I couldn’t really do because they shared the same desktop speakers. I ended up with a list of features for an embedded music system… Read More
One thing I’ve written about before is the problem of Compulsive Internet Use before. One thing I’ve tried in the past to deal with is was my Shutdown Nag. This, at the time, was a quick extension to my Window Manager which would lock the computer at a preset time and then give me the opportunity to save my work before shutting the computer down for the night. It worked reasonably well, but I’ve since changed the window manager I use from Stumpwm to Xmonad and the old tool no longer works. I’ve since intended to replace it with a similar window manager agnostic tool, but hadn’t the will to actually go through the effort to write it, until now… Read More
I wanted to attach a knob to my Raspberry Pi to act as a volume control for my MPD based jukebox. Traditionally volume control devices are implemented with potentiometers acting as inputs for amplifiers. A potentiometer is a hardware device with a knob or a slider that, in a word allows for a variable voltage input into a circuit. (Potentiometers are called ‘pots’ for short and their very common. You probably interact with them every day even if you don’t know it. If you’ve ever used a physical volume control on an amplifier or a pair of speakers or an amplifier or a knob on a dimmer switch, that knob was probable attached to a ‘pot’.) The problem here is that this is a very hardware oriented method of setting volume, when what I really wanted to do was set the software volume setting on the Raspberry Pi. I wanted to be able to change the volume from the operating system (a la alsamixer) or through the MPD client, and still be able change it up or down by physically turning the knob on the device. Essentially, I wanted the ALSA PCM element volume to increase as I turned the knob clockwise, and decrease as I turned the knob counterclockwise, I wanted to actual volume to be independent of the position of the knob and because a potentiometer is an absolute input device which returns it’s position and cannot be turned indefinitely there was no way to make one work for what I needed… Read More
Waaay back when I first finished college and moved out on my own, I remember taking a small amount of pride in not intending to own a television set. My thinking was that if I didn’t own a television, I could avoid some of the most addictive distractions that modern people deal with. Rather, all I would get was an Internet connection, which would be much more educational, productive, and less addictive than television. I would spend my time chasing ‘elevating’ pursuits. I could be a modern renaissance man.
Damn I was a fool… Read More
So, after 6 months of waiting, a Raspberry Pi finally arrived in the mail a few days ago and I’ve finally had the chance to play with it.
One of the enduring complaints people have with American political system is the two party system. We have two warring political parties which position themselves in the center of American politics and take opposites sides of every controversial issue at stake and them some. They create an artificial dichotomy where American voters are consistently forced to choose side on issues which they would otherwise not care about in order to choose the “lesser” of two evils. The two parties have a polarizing effect on American politics where people are lumped into “right” and “left” categories and have their views increasingly flanderized. The two party system is clearly a problem, but how can it be dealt with? Here are a few suggestions… Read More
So I’ve recently come across “numbers” radio stations. What these are, are shortwave radio stations across the world which regularly broadcast streams of seemingly random numbers. To give you an idea, here’s a recording of the Lincolnshire Poacher:
Once upon a time, I was working on a personal programming project which I kept in a public repository on Github when I unthinkingly committed some sensitive information into git and pushed it to the repository.(It was a database login. I know that I could have just changed the login; I did so, and later deleted he whole database. That’s not the point. It’s impossible that you didn’t use a similar password elsewhere and even if you didn’t, it could still reveal information about your password creation process. It’s better to restrict that kind of information as much as possible and not get sloppy.) It was a remarkably harebrained mistake I admit, but these things happen to everybody sooner or later. Anyway, I didn’t notice my mistake right away and I pushed a lot more changes to the public repository before noticing what I had done, several month’s worth… Read More
Smart people sometimes believe the dumbest things. I know people who can read through massive tomes in an afternoon, translate pages from one dead language to another and yet despite all evidence to the contrary, believe fervently in the efficacy of homeopathic medicine. I’ve known others who are convinced that George Bush initiated the bombing of the World Trade Center but are otherwise as well spoken as any person your likely to meet. I know a man who can hold the designs for vast computer networks in his head yet still believes everything he reads in the news without question, so long as reaffirms his prior beliefs… Read More
Recently I built a small webapp to allow me to view my org files online. I know that I can export org files to HTML and scp them to my server, but this was for a TODO list among other things and I wanted to both password protect it and possibly also make so that I could perform simple edits to the file from the web. As a result, I decided to write a webapp which parsed and converted the org file to HTML on the fly with each request. What resulted was a very simple web application, written in Clojure, which can display a directory of org files online. If you want to use it, you can get the code here.
Anyway, while writing this, I struggled a little with Clojure’s mostly functional nature to write an efficient and clean parser/translator for the org files. The issue is that, for me, the most natural way to parse something more complicated than a simple sequence of tokens, is to use a state engine to keep track of the context while parsing in each new character, line, or token… Read More
In the 1960’s NASA needed a writing instrument that could be used in the vacume of space. In order to combat this problem, they spent over a million dollars on R&D in developing the Astronaut Pen. When faced with the same problem, the Russians used a pencil.
Or so the legend goes. Actually the truth is a bit different. In the beginning of the space race, both NASA and the Soviet Union used pencils. But pencils break, and they are also inflammable. In space, both of these things are very bad… Read More
Godwin’s Law:
As an online discussion grows longer, the probability of a comparison involving Nazis or Hitler approaches 1.
In 1990, Mike Godwin made the above observation. To date, it has held up, as people today seem to like comparisons to Hitler just as much as they did in 1990. In addition, there’s a corollary to Godwin’s law which states that if you are the one to make that comparison, or to pull a Godwin, then you are the one who is wrong… Read More
Sometimes I think that Unix is pretty awesome. You can strip it down to nothing but a kernel and a shell and maybe a few drivers/modules and end up with a perfectly useful, if minimal, system. At the same time you can build Unix out into anything from a desktop system to a high trafficked webserver to even a phone OS depending on your definition of Unix. Unix is pretty flexible is what I’m saying.
A lot has been written about the flexibility and power of Unix. Suffice to say, Unix’s power is due in a large way to its modularity and the composability of its component programs. One key ingredient of this composability is the venerable pipeline idiom, Unix’s ability to feed the output stream of one program to the input stream of another. Pipes actually are quite amazing, at the shell, they turn a set of small utilities into a complete system administration toolkit… Read More
If you use SSH to administer your own server there’s a strong possibility that you use public key authentication rather than password authentication to log into it. Public key authentication is generally more desirable than password authentication for a number of reasons. For one, it’s more secure; it doesn’t transmit any secrets over the wire and has a much larger secret to guess, making snooping and brute force attacks practically impossible. Nothing secret is stored on the server either so one compromised login cannot compromise other logins. Because keys are unique to client, it becomes simple to disable logins which have become compromised or have outlived their usefulness. Finally, if one knows what one is doing, one can set up key based authentication so that it does not require any password entry to login, which is a great convenience.
One inconvenience however with public key authentication however, is that logging in from a new machine is somewhat more involved. You’ve can’t just install PuTTY (or whatever) and type your password to login. You need the a key to login and this computer doesn’t have it. Now, your first temptation when presented with this situation might be to copy one of your private keys to the new machine and log in with it. However there is an easier way. Temporarily enable password authentication on the server and add the new client while it’s open. All you need is access to an already active client. I’ll show you what to do… Read More
EDIT: I didn’t realize when I wrote this that I sounded as critical as I did. I’d like to make clear that this post about a minor philosophical difference and not about any real usability problems with Clojure.
Clojure is probably my current favorite programming language. It combines most of the advantages of Lisp with the most important advantages of Java and introduces a number of ideas not present in either. Some of those ideas nearly unique to Clojure. In all, I believe Clojure occupies a pretty awesome sweet spot in language design that is hard to beat. Despite that, there are at least a few “warts” in the language, (there always are,) and I’m going to write about one here which annoys me.
Clojure’s core language seems to contain a number of leaky macros. For a language community which seems to try so hard to be functional and avoid macros whenever possible, presumably to avoid leaky abstractions, this baffles me. The biggest offender I think, is the “with-open” macro… Read More
I’ve just finished reading the book Life of Pi. I personally think that it’s a fantastic book and the author, Yann Martell, does a brilliant job making the quite outlandish and surreal story seem so believable. I’ll confess that through the first half of the book or so, I thought I was reading a true story; he’s that good. Of course, that’s actually part of the point of the story. It deliberately challenges what one accepts as criterion for belief by asking the question, “Between two equally complete and sound explanations for an event, which makes the better story?”
I’d like to ask you a question. It’s a little personal, but in this day and age of social networks and online exhibitionism who really cares about privacy and personal space? Anyway, here goes: when was the last time you got your Facebook account broken into by a hacker? Never? Good, you’re either lucky or you know how to defend yourself against online attacks. However, far too often I find myself up against spam and vandalism being sent to me via Facebook, email, etc. from people who are ostensibly my friends and wouldn’t be sending me adverts for “V14gra” if they could help it. Really, considering that defending one’s online accounts from attack isn’t that complex, and how damaging these attacks can be,(They’re bad enough when you know about them, but identity theft can take years to be discovered and by then you’ll be out thousands of dollars.) There’s really no excuse for not doing so. In that spirit I’m writing this as a practical guide to defending oneself from online attacks.… Read More
Yesterday, hundreds of websites(Including such notables as Wikipedia, Reddit, and even my rather unimportant corner of the web.) were “blacked out” in protest against two pieces of particularly onerous legislation, SOPA and PIPA.((For those whe don’t know, these are anti-piracy bills (in the sense of copyright infringers, not open seas marauders) which threaten to emplace draconian measures which will affect thousands of perfectly legal and innocent websites and businesses along with the criminals. Google has more info. )) In addition to the blackouts, many other websites posted information about these two bills on their websites along with reasons to oppose them. As a result 18 senators, some of who had previously been cosponsors, have newly announced their opposition to these bills. In addition, the subject has broached the national consciousness and now mainstream new organizations across the country are reporting on the debate. With all kerfluffle, one would think that the blackout has served it’s primary purpose in spreading awareness and dealt a powerful blow to forces attempting to push these bills through Congress.
There are, however, dissenting voices. Maddox an individual known for his controversial entertainment website has made the claim that “Blackout Day” is just another example of Internet “Slacktivism,” which will ultimately go nowhere and is a symptom of the general malaise and of todays generation of protesters: people who will protest anything so long as they can do so from the safety and comfort of their own computer screens… Read More
So I read a book. I know. Surprise! This book is called Blindsight, it’s by Peter Watts, and you can read it here. This is an interesting book. It’s a piece of hard science fiction, which means it focuses on the exploration of scientific theory and maintains strong fidelity to scientific accuracy. Blindsight also heavily features vampires. Weird, yet this isn’t the most interesting thing about this book. What is the most interesting thing is what this book is attempting to say about the human condition: That human consciousness is a superfluous, and probably temporary aberration of the natural progress of evolution… Read More
So I’ve been working with Clojure webapps again lately and I noticed how I keep forgetting what middleware is, what it does, and how to use it. This is a shame because it’s actually not very complicated and it’s quite useful once you get it. So I’m going to place here a write-up on middleware and an example of its use… Read More
I have a pet pieve. Actually, I have many, but only a few worth complaining about. One of these is when programmers describe their creations as “beautiful.” At first blush it might seem strange that people would describe computer code, filled with semi-colons, parentheses, and brackets as “beautiful.” One might be tempted to ask whether they were just in love with their syntax highlighters. However, I’ll be fair. The term “beautiful” in this sense refers not to visual aesthetics, but to a sort of notional aesthetic: ideas which seem so simple and elegent that they provide a certain sense of pleasure when one comes to understand them. When coders use beautiful as an adjective to describe their programs, they aren’t describing the visual asthetics of their computer code, they are discussing the presummed elegence of their solutions. They are declaiming the cleverness of their own inventions… Read More
I just bought a car today. The sway bar broke on the old one and instead of getting it fixed I decided to drive on it while looking for a new car. I spent several weeks planning, researching, weighing priorities, fretting over trade-offs and just all around pulling out my hair all the while waiting in anxious anticipation for my current model fall apart while I’m driving down the highway and 65 miles an hour. I wanted a car that was small, fuel efficient, reliable, and sporty. Eventually, I decided that money was priority one and sporty had to go, ultimately picking a used Honda Civic. How boring… and yet very practical. It’s just the kind of thing I would get. Anyway, you may be wondering what this has to do with God and His proof thereof… Read More
I use Stumpwm as my primary window manager on my desktop at home. Stumpwm is actually a pretty neat window manager: it’s tiled, provides facilities for group and be controlled completely from the keyboard, no mouse necessary, but it’s chief advantage to me is that it’s written and configured with Common Lisp, which make it much easier for me to script and modify. I can arbitrarily load programs, libraries, and code into the Stumpwm runtime in realtime while it is still running just to see if and how it works. This actually makes it much more deeply modifiable than most other windows managers (or indeed, programs of any sort,) and I’ve taken advantage of this from time to time.
One of my more perennial problems is a sort of insomnia that I have. I’ve found however, that if I limit my computer usage in the evening and spend a couple hours away from it before going to bed, it becomes much less of an issue. This presents a bit of a discipline problem however with me having to remember and be willing to do so every night. That’s a pain so I figured why the hell not write a program that helps me with this? Stumpwm seemed like a natural place to put it. … Read More
So… It would seem that classical music is dead. That might seem like a bold claim. After all, people still listen to classical music all the time. It has it’s own stations on the radio. There are whole orchestras devoted to it. It’s the first thing people learn in most music classes. Many people dedicate their lives to playing and improving at classical music. All this is much more than is dedicated to say, jazz. I’m not saying jazz is dead am I? No, (well, maybe) but I am say that classical music is dead, or largely so.… Read More
I’ve been fiddling with Sacraspot lately and I discovered that the technique I’ve been using to daemonize the server and integrate it into my init-environment wasn’t working properly. This is a lisp application which I was running with start-stop-daemon. The problem was that for some reason, start-stop-daemon was failing to fully daemonize the application. The Repl seemed to conflict with start-stop-daemon’s ability to do this properly and while it would look like it worked at first, once one closed the shell which lisp was started from, the lisp process would close.… Read More
What is evolution? Seriously. Think about what that word is supposed to mean. It means gradual change over time. It usually refers to the process which life on Earth has gone through over the past something odd million-billion years. Now think about what we supposedly know about evolution. It works by random mutation and natural selection, meaning small changes accumulate in different species and changes which improve the odds of reproduction of an individual or population relative to other populations will be propagated and contribute to long-term, substantial change. That is, it’s driven by natural forces and random chance. So why do people insist on assigning teleological purpose to a materialistic phenomenon like evolution?… Read More
In its day, one of the more interesting places on earth was the Kowloon walled city. Just outside of Hong Kong proper, on a disputed part of the Kowloon peninsula, Kowloon walled city was not so much a city as it was a neighborhood. And, it wasn’t so much a neighborhood as it was the closest thing to a nest that human beings have every built or inhabited. Actually, even ‘nest’ is the wrong word, ‘hive’ would be better. Only 0.01 sq mi in area,(6.5 acres) at its peek, the Kowloon Walled City housed an estimated 33,000 people, making it the most densely populated place on earth. … Read More
I’ve been writing this blog and maintaining this site for almost two months now. For most of that time, I’ve been maintaining it using a program called nanoc which generates a static website from some templates and source files. I talk more about that here.
One of the things I like about this setup is that it give me a lot of flexibility in how this website works. For example, I can apply a series of filters to my source files to generate the final web pages I want. I use Markdown, for example, to convert most of my blog posts (Like this one!) from a legible plain text to html. I can also write my own filters: I’ve written two of them and I thought that they were worth sharing even if they didn’t merit there own projects.… Read More
So I was brushing up on my algorithms knowledge and I stumbled across something that rather blew my mind. It turns out I’ve been computing powers the wrong way all this time. … Read More
While doing doing a project properly from the start is a fine goal, there’s something to be said for just shipping. It’s pretty rare that that you have all of the requirements from the get-go and you certainly can’t predict every problem that’s going to arise while your project is in production. If you attempt to anticipate every feature you could need it’s likely that the project will never be finished, it’s certain they you’ll waste a lot of time on uneeded features, and it’s still possible that you’ll miss features and bugs that are important. In fact, it’s more likely that you’ll miss things as many issues don’t arrise or make themselves apparent until you reach production… Read More
So I have an idea for a web-based game. I don't have time to write it just yet, but I thought I'd outline the concept here for now instead.
The general premise is that of players competing in an election for president of a fictional country. Each player will have to court lobbyists, political parties, public opinion, ethnic groups, etc by making campaign promises, establishing positions on issues, making backroom deals, advertising, etc.
I've divided up the general aspects of the game as below. The specific mechanics haven't been worked out yet; they'll probably take a turn a day structure where players manage their candidates through a panel which allows them to schedule actions and set general policies. … Read More
I kind of hate Facebook. There I said it. Now, I hate Facebook for a lot reasons: the chronic privacy issues, its walled garden nature, the shallow level of communication it encourages, the fact that it’s taking over the Internet, but one reason in particular bugs me the most. Now, I know this makes me a rather sore sport, but I hate how Facebook turns me into the odd man out.
You remember that big party back in college? The one that everyone went to? Everyone but you? You remember out for months afterwards everyone would laugh about something that happened at that party and when you would ask what was so funny everyone would just say, “You really had to be there?” Do you remember that? Well, for me, Facebook is that party.… Read More
Recently, I listened to a story about an Asimov style robot. You know, robots which surpass their creators and have to deal with the existential confusion which arises…
Anyway, this story reminded me of one of the major staples of Asimov’s robots which is the so-called Three Laws of Robotics. The story didn’t actually make use of these laws but I’m not actually talking about that story. What I am talking about are Asimov’s Three Laws of Robotics and why I think that they’re impossible.… Read More
A recent debate attended has prompted me to think about the issue of just how extensive the right of freedom of speech should be in a modern society, specifically whether pornography should be protected under the guise of freedom of speech. In principle, we tend to think of freedom of speech as being pretty absolute, that we should be able to say whatever we want without regard for the consequences and people should have to accept that. However, in practice, this right seems to be abridged all the time. We need a permit for most kinds of demonstrations, some things such as slander are forbidden outright, and advertising is subjected to such a dizzying array of restrictions that one must wonder whether it was ever considered free at all. … Read More
So, I’m about a third of the way through the book Snowcrash. It’s one of the standard novels of the cyberpunk genre of books that were popular in the 80s and early 90s. ‘Cyberpunk’, for those unfamiliar with the term, refers to science fiction stories featuring computers and computer hackers. Usually there is some kind Internet which manifests itself as a complex virtual reality which rebellious protagonists log in and out of to perform heroic deeds which would be impossible in the real world. … Read More
So I’ve encountered my first major nuisance in using nanoc. In nanoc, the filenames of source files are treated rather unintuitively and it can be confusing why one can’t have multiple files with the same name but different extensions at first. I haven’t found a lot of information about this so I’ll put down a quick writup on this. … Read More
So, I’m currently working on getting my house in order. By ‘my house’ I mean this website. I’ve been looking for a way to get a nice combination blog, project portfolio that a lot of software developers seem to have. I decided early on that I wanted a statically generated site as that would simplify a lot of things from server security, to maintenance. It’d be easier to migrate. Also, and this is important, it would be a lot simpler to use Emacs as my primary editor if I use a static generator rather than a solution like Wordpress or Blogger which generally require editing little boxes on a website which I hate. (I suspect this can be worked around with WP, but I’d rather not try.)… Read More
I recently finished reading the book How to Survive in a Science Fictional Universe. This is an interesting book, both in its unusual style but also in its strange plotting and subject matter. The book is a lot easier to read if you don’t try too hard to understand what is going on and how things work in the world that the author creates.
The book takes place in world which is literally fiction, even from the viewpoint of the characters. Science in this world is based on story-lines and expressed in terms of human emotions. This is interesting but is not deeply important to the story. It would seem to be more a stylistic choice on the part of the author, except for that moment in the story where the protagonist describes how the concept of time travel (which is an integral part of the story,) works in a science fictional universe.… Read More
Most people are aware of the First World War and have some knowledge of its history. They know that it was started when some Austrian prince was shot and that it ended when the English invented tanks and drove them into Germany. They know that in between there was a lot of fighting and that a lot of it had to do with trenches and machine guns and gas masks and Red Barrons and many might be able to name drop the Somme or Gallipoli. But, when it comes down to it, everyone remembers the Second World War better.
And why not? The Second War was bigger, broader, louder… It had clear villains and clear heroes. The motives of all sides were clear and everything was black and white (almost.) What’s more, even though there was an unprecedented amount of tragedy in that Second War, he good guys won and peace was restored throughout the world. All in all, it had all the markings of a great story and was quite photogenic. … Read More
The turn of the twentieth century was a pretty crazy time. Major European wars were a thing of the past (or so people thought.) The world had mostly been conquered by Europeans and was rapidly being tamed. Technological advancement was on the rise and new wonders, such as recorded sound, moving picture, electric lights, the telephone… Oh yeah! And in 1896 and 97 men from Mars were trolling about the American midwest, kidnapping people and taking them hostage in their airships. … Read More