Functional JS, IRC servers and the internet of things

I attended the London Functional JS meet up past Wednesday. James Coglan gave a nice walkthrough of the approach he's been experimenting with to write functional JS. This doesn't mean just using and other "functional JS" tools but going way further and encapsulating the data into unified types--for example Promises, or Streams-- so that nothing can be synchronous or maybe asynchronous or both, sometimes, anymore (and so we can't release The Zalgo). Transducers also showed up.

I must confess I am not really an expert in any of these things, which is precisely why I went. I didn't get all the concepts he discussed, and I'm perfectly fine with that: it is food for thought for when I come back from Berlin. I like having undigested ideas kind of mulling on the back of my brain, and then at some unpredictable point they all come together and voilà, I have the solution to some woe that has been chasing me for weeks.

After the presentation proper there was time for a coding dojo. So James had a bit of skeleton starter for an IRC client written in a functional manner, and we had to implement more commands. Sadly I hadn't brought my laptop because I didn't know there was a dojo, and I don't find value in carrying a laptop to a social meetup generally (I have my phone for tweeting or taking notes anyway), but there was some more people I knew from "the London JS scene" (Howard, Karolis), so we "tri-pair programmed" on Karolis' laptop. Or might I more accurately say that they did most of the work and typing while I threw random ideas at them based on my limited knowledge of functional and CoffeeScript?

Anyway, it was fun, and again it rekindled an idea that has been lingering on my mind since I attended NodeConf London: this notion of using IRC to have services communicate between them. Yes, you can connect them via a socket or using HTTP requests or whatever invisible protocol but since someone mentioned using Jabber as a protocol for connecting "things" from the Internet of Things, somehow my brain transfigured it into having these "things" use IRC instead of Jabber and I became interested in the idea of poking into the realtime conversation between machines. I'm not really sure what they would be talking about or what kind of messages they'd be exchanging, but it would be weirdly interesting to sort of program them to reprogram themselves as they learn, and see where they would go when they all output their stuff to this common data bus, i.e. an IRC channel. And how would they react to whatever humans said to them?

I tried playing with hubot a few months ago in a bit of spare time I had (that was like 6 hours) but I didn't quite understand how to access "its brain"--is it just a massive key-value set of pairs? and how long does it persist?

There was also the issue of it being written in CoffeeScript, and how shitty inadequate and oldschool their module management system was, but I could deal with those if I closed my eyes and played the pragmatic game. Perhaps there are better bot-that-speak-to-IRC alternatives, but I don't know any; ideas are welcome!

I also envision this notion of being able to visualise any of these services' brains while they are running and learn and remorph their fact base. I imagine it would look like something like this, which has nothing to do with that but it's how I imagine it:

Now to more Web Audio workshop preparations :D