-
"nanoc is a tool that runs on your local computer and compiles Markdown, Textile, Haml, etc. documents into static web pages, ready for uploading to any web host." Easily build static sites with a teeny bit of templating.
-
"This library implements the Software serial Arduino library to establish a serial connection to a Mobile phone. The methods methods hides the AT+ commands from the user allowing messages to be sent by passing the method on a phone number or email and the message." Oh, now that is interesting.
-
"Late last year, my family found a line-a-day diary maintained by my great-aunt from 1937 to 1941. She was in her early teens, living on a small farm in rural Illinois with her two brothers, one of which was my grandfather." Now it's being syndicated, one line per day, on Twitter.
-
"This is the real line-a-day diary of a young farmgirl in 1937. It is maintained by @griner."
-
"We should be an embodied person in the world rather than a disembodied finger tickling a screen walking down the street. We need to unfold and unpack the screen into the world." Wonderfully put. I love Jones.
-
"It's just 4 names, on a t-shirt. Buy it now because you know whats coming and by then, it'll be too late. Good luck." Want, so bad. And the kerning's not a million miles out.
-
"MagiCal is a FREE menu-based clock and calendar. It features a huge range of configuration options for how the time and date are displayed, and can operate either in conjunction with, or as a replacement for the built in system menu clock." Quite pretty, and makes a nice companion for FuzzyClock.
-
"The microprinter is an experiment in physical activity streams and notification, using a repurposed receipt printer connected to the web. I use it for things like reminders, notifications, and my day at-a-glance, but anything that can be injected from the web and suits text only, short format messaging, will work." Tom writes up his printer in more detail.
-
"We’ve recently switched a number of projects to ThinkingSphinx here at Hashrocket. These projects were originally using SOLR or UltraSphinx. Today, we’ll explore the differences between UltraSphinx and ThinkingSphinx and why we chose to switch." Detailed explanation of the advantages of ThinkingSphinx over UltraSphinx or other alternatives.
-
"Last night I laser-etched the top of my Eee PC with the complete level maps of Super Mario Land ( on the Game Boy)." Just beautiful. (Thanks, Offworld!)
-
"Compared to a standard web (un)conference where everyone knows their space, expertise and opinions, here lots (most?) of us were exploring stuff outside of our day job and business-as-usual. It was passionate and interesting and I felt completely out of my depth, which was was great. So in 2009, less of the comfort zone stuff please, and more like this." I can get behind that.
-
"Morph was sometimes supposed to copy Hart's own artistic work, but not perfectly. In this way nervous children were reassured that even their endearing hero Morph could get it wrong, which made them determined to pick up their pens and pencils and other objects and do better… He believed that most of the things he did could be done only [on television]: "I hope that by example, and by humour, children will start to make pictures for themselves. Show them, don't tell them!"" I was terrible at art, and most forms of drawing, but I could watch his hands work all day.
-
The New Frontiersman is on Flickr. The paperverse is collapsing. (Although: "taken on August 10, 2008" breaks the illusion a little).
-
Leslie roughly captures a few thoughts I've had and some reasonably opinions. In a nutshell: the social value of tagging is broad, fuzzy, and a second-order effect. As a loose, freeform taxonomy for personal use, they're superb, and delicious captures that excellently. I tag for me; if it's useful for you, that's a nice side effect.
-
"Yesterday was the inaugural papercamp in London, alongside its big sister bookcamp. I presented a half bookish half paperish presentation about travel guides. What I forgot to mention or make explicit: how there are totally different stages and needs for guide books – especially pre-booking, pre-travel, during travel, during holiday. So here is, from memory, what I talked about, with a few additions:" This was jolly good, an a neat branching point between the Paper and the Books.
-
Lots of corrections. addenda, and general props from John Romero (who has a sweet personal domain) about the Game Developer article from 1994 linked to recently. Some interesting stuff, including commentary on the NeXTStep screengrab, some of the internal toolchain, and a few clarifications about the id/Apogee/Softdisk relationship.
-
"We aim to re-start production of analog INTEGRAL FILM for vintage Polaroid cameras in 2010. We have acquired Polaroid's old equipment, factory and seek your support." They're serious. Wow.
-
"A Ruby library that wraps the Viapost SOAP API, providing an easy way of sending post (you know, real letter box post) from your applications."
-
"FeedTools is a simple Ruby library for handling rss, atom, and cdf parsing, generation, and translation as well as caching. It attempts to adhere to Postel’s law—i.e. a liberal parsing and conservative generation policy." Wasn't aware of this until now, remarkably.
-
I would kill to be 14 and to be taught by David. Other than this: wow, what a line-up of casual talks, and what a wake-up call about how kids use the internet.
-
Gmap of all the Sam Smiths pub in London. Or, at least, a lot of them. The Cardinal isn't on there, for starters.
Twit 4 Dead: more silly nonsense with Twitter bots.
29 December 2008
As a little post-Christmas present, I thought I’d share a little code toy I’ve been working on recently.
You might know that I’m a fan of Twitter as a messaging bus, and I’ve already built some entertainingly daft bots in my time with it. Recently, I decided to flex my programming skills a bit and build not one but four bots. And, more specifically: four bots that talk to each other.
Enter @louis_l4d, @zoey_l4d, @bill_l4d and @francis_l4d. You might notice that they’re named for the characters in Left 4 Dead.
This is not a coincidence.
One of the most wonderful things in that game (which I’ve already commented on the brilliance of) is the banter between the four player characters. There’s so much dense, specific scripting, and enough dialogue so that it rarely repeats. I thought it would be interesting to see if you could simulate the four players’ dialogue over Twitter, sharing some state between the bots, but also finding a way to make them communicate a little with each other.
Well, a bit later, I worked out how, and this is the result:
You get the picture. They run a scenario, they bump into boss zombies, they find stuff, they get hurt (and help each other), they get scared (and reassure each other). At the moment, there are some dialogue overlaps; my main work at the moment is adding more unique dialogue for each bot. Bill is sounding pretty good, but the rest of them need work. It takes about 2-3 hours for them to run a scenario, and it’s usually fun to watch. (And, as you can see, it makes sense to follow all four of them).
So how does it work?
It turned out that rather than trying to build any real AI, it was much more fun just to simulate intelligence. The bots are state machines; they have a variety of states, which they transition in or out of dependent on factors, and suitable dialogue for each state.
I wrote the bots in Ruby. There are two main components to the twit4dead code: the Actor class and the Stage class. The Stage is a singleton; it’s where the state of the world is determined, and global variables tracked. It’s also where all the probabilities are run from. The Actor class is what each of the bots are, and it’s based on the Alter Ego state-machine library for Ruby. We have a lot of states, rules for transition, a selection of methods to handle being helped or talked to by friends, and a method to choose a random piece of dialogue appropriate to the current state.
All the bots are instantiated from a YAML file. For each bot, I store its Twitter username and password, and a nested tree of dialogue for each state. This means it’s really easy to add new states and maintain the dialogue for each bot. It’s also easy to add new bots – you just create a top-level entry in the YAML file.
Originally, I thought about the bots broadcasting and listening over Twitter, but the API calls were just going to get out of hand, and it turned out that Twitter didn’t like being bombarded with messages and would drop a few over time. So I separated out writing the script and broadcasting it. A small utility generates a script file; each line of this file consists of three delimited fields for username, password, and message to send to Twitter. Then, another program – which I currently run on a screen
ed shell – reads that file and broadcasts one line of it every minute until it’s done.
And that’s it. I have to run it by hand for now, which is fine – it’s more something I fire up every now and then, rather than something you want to permanently run. I originally was going to keep track of loads of statistics – health, zombies in play, etc – but found a cruder set of rules worked much better. Every time they’re in combat, there’s a slim chance somebody gets hurt; every time somebody’s hurt, a friend will rush to save them. That sort of thing. Simulated Intelligence, then, rather than Artificial Intelligence.
Alter Ego turned out to be a lovely library; dead simple to use, and as a result the bots are really nicely modelled (or, at least, I’m very happy with how they’re modelled). The notion of a Stage with Actors, rather than a Game with Players, feels about right, and the modularity of it all is pretty nifty. It still requires a little refactoring, but the architecture is solid, and I’m proud of that.
I think my favourite aspect of it, though, is that at times, watching the bots play together is a little like magic. The first time I saw them talk to each other, cover each other whilst reloading, help each other up after a Boomer attacked, I felt a little (only a little, mind) like a proud father. They’re dumb as a sack of hammers, but they look convincing, and that was the real goal. It’s fun to watch them fight the horde amidst all my other friends on Twitter.
Nonsense, then, but a fun learning exercise about state machines, object orientation, and simulating conversations. State machines are a ton of fun and if you’ve not seriously played with them, I thoroughly recommend it.
Do follow the four of them, if you fancy; I’ll make sure I run them with reasonable regularity, and I’ll be fixing the dialogue over time. After all, I want to keep Francis happy.
-
A nice post to end the year from Kars – it feels like a top-trump of so many things that have risen to the surface in my head in 2008.
-
"Today is a fairly momentous day in the history of Ruby web frameworks. You will probably find the news I’m about to share with you fairly shocking, but I will attempt to explain the situation." Yehuda Katz weighs in with a great, informative post.
-
"Merb and Rails already share so much in terms of design and sensibility that joining forces seemed like the obvious way to go. All we needed was to sit down for a chat and hash it out, so we did just that." No, really. Not an April Fool. It sounds like the architecture changes that are going to be made are going to be a big win for Rails 3. Looking forward to it.
-
Not concerned with the Javascript bundle, but the Vibrant Ink syntax-highlighting link is lovely.
-
"Rails Metal is a thin wrapper around Rails’ new Rack middleware support." Which means you can process requests outside of ActionPack, which is useful for the odd performance boost in certain places. Interesting to see concerns separating out within Rails like this.
-
Lots of suggestions for simple but yummy puddings here. Will need to check this list out again.
-
"If you need to perform data analysis, provide graphics for your users in your webapp, or produce high quality plots I encourage you to investigate the combination of ruby, GSL and GNUPlot." Looks good. I should probably give this a poke some time; could come in handy.
-
"Feed cake to the cat for a megaburp; use the owl to block bullets." Lovely: you control the fat cat *and* the owl; the owl makes a path for the cat. It's slightly bulletty in places, and juggling two controls is tricky, but still quite laidback. A lovely, lovely flash shmup. The artwork and music helps, too.
-
"So much joyful digital stuff is only a pleasure because it's hugely convenient; quick, free, indoors, no heavy lifting. That's enabled lovely little thoughts to get out there. But as 'digital natives' get more interested in the real world; embedding in it, augmenting it, connecting it, weaponising it, arduinoing it, printing it out, then those thoughts/things need to get better. And we might all need to acquire some analogue native skills." Yes. I am slighty frustrated by the attitude that you can make anything physical with an Arduino and some other stuff. It's the "other stuff" that's the important bit.
-
"Our tireless multi-touch team is pleased to announce another bit of software meant to make your prototyping life a bit easier, via support for using a wiimote with our flash API to quickly turn any TV or projection surface into a multi-touch environment" Nice, simple, hacky.
-
The comments thread on this is pretty epic, and I'm really not wading into that one. Suffice to say: it's quite a while before somebody mentions the word "criticism", and it's not in the main body of the article at all. That's the important word, to my mind.
-
"Of all the adverts I’ve seen this year, I think this (late entry) surprised me the most. Not because of the concept – the hilarious coincidence that sometimes people who are not famous share names with people who are famous has been used before – or the clumsy copy. It surprised me because I actually know the person in the photograph. And she really is called Julia Roberts." So do I. She really is, you know.
-
Lovely article about the White House cinema, the first occupant of which was Eisenhower. I came upon this post-"If Gamers Ran The World" if only to find out who the first film-literate (ie: willing to have it inside the White House) president was. The article is a gem.
-
"AlterEgo is a Ruby implementation of the State pattern as described by the Gang of Four. It differs from other Ruby state machine libraries in that it focuses on providing polymorphic behavior based on object state. In effect, it makes it easy to give an object different “personalities” depending on the state it is in." Oh, that could be really handy.
-
Oh gosh this is brilliant.
-
"Simply stick your finger in the hole and a virtual representation appears on the screen. Then you can use your virtual finger to play all kinds of cool mini games… from swinging a panda to having a karate fight with a tiny little man." Um, wow. Although I'm always afraid of putting appendages in boxes I can't see inside, though.
-
I think they're wrong, you know. It's not theatre; it's protocol. Maybe people aren't used to the protocol; if yours is the first app they encounter, they'll think that it's OK to show what passwords are – and perhaps that it's OK to write them down elsewhere in plaintext. Applications have a degree of responsibility for users' interactions across the internet, and quirky and cute as this may be, it's just not the place to demonstrate your shining personality.
-
The Brian Dettmer is beautiful. Also: didn't realise the heart/cube cogs were paper, not wood.
-
"…it's another little example of the way the ipod/iphone is such an attention-demanding device. It doesn't orient to you, it orients to itself." Yes. This is a problem.
-
"The US auto industry is on the verge of imploding. People are losing their homes to foreclosure. And, on the off chance that you had the nerve to try to buy something, credit is almost impossible to come by. It is against that backdrop that I would like to talk about working for free. Why? Because I think it is one of the fastest ways to make yourself a better photographer, whether you are a pro or an amateur."
-
"To the extent that the web is becoming truly ubiquitous, and involves increasingly multimodal paradigms of interaction, it seems appropriate to define a Web standard for representing emotion-related states, which can provide the required functionality." No, it does not seem appropriate. It seems bonkers.
-
Hey, I've been in that relationship too! These made me laugh a lot.
-
"bill. francis. louis – look here. help." Ah, the fun of the farm. It's all coming back to me now.
These are my links for November 3rd through November 4th:
-
"igraph is a free software package for creating and manipulating undirected and directed graphs. It includes implementations for classic graph theory problems like minimum spanning trees and network flow, and also implements algorithms for some recent network analysis methods, like community structure search." Oh, that could be very handy
-
"We’re just two regular guys who love grilling and football on Sunday afternoons, eating until we can’t get off the couch and of course, the taste of great bacon. And it’s our dream to make everything taste like bacon.", as the about page says. There are no words.
-
"My election party tomorrow will feature DMX controlled RGB LED lighting. The color of the house should reflect the electoral balance. The color will start purple, and drift toward either red or blue, depending on who’s winning." Awesome.
-
'"There is currently a work-around that may allow you to bypass this issue. Since you have the first 19 characters of the code already, you can basically try guessing the last character," explains the EA customer support site, helpfully.' DRMLOLZ. You cannot make this up.
-
Singles ad written as an SQL query.
-
"Maybe this could eventually become an entire category of entertainment: You're dropped into a huge, lush, gorgeous, sprawling world, and all you do is just sort of … wander around. We could even give it a name. Radical singleplayer: The game of solitude."