4th Øresund JavaScript Meetup report

The 4th Øresund JavaScript Meetup was just held at Hypergene‘s Malmö offices, yesterday night. Eight brave souls made the journey to Malmö C and came to Hypergene’s quite fancy offices. After a little pizza snack and introductory conversation, we repaired to a meeting room. Networking was in full swing, in at least three languages, when Jacob announced that he’d run his introductory JSpec presentation.

It turns out that JSpec is a BDD specification tool, which uses some Ruby to run its specs. The syntax was a mix of Ruby and JavaScript in the same file.

Mats Bryntse had quit his job to make an ExtJS web app, and he’ll be on his way to San Francisco in a few months. The app he made, Ext.ux.Scheduler is impressive.

Later, I got fiddly. Programming languages had come up in conversation. Scala! Clojure! Erlang! OCaml! So, I installed a few of them. We deciphered a bit of Scala, and tried it out. Quite entrancing, getting it to run, when four people stand around and shout suggestions. The Erlang Eclipse extension Erlide was hastily installed, but we ran out of time before we got anything done with it. And the title of the meetup is “Öresund JavaScript Meetup”. The irony was not lost on us.

“It’s dead easy to make Erlang web backends!”, I later exclaimed. “Can I quote you on that?” David retorted.

So, there’s my challenge. Using ErlyWeb, MochiWeb, and others, and perhaps Mnesia (the database), I’ll have to work hard until the next meetup to get an environment running – and make a web application.

Speaking of the next meetup, David, who’s working for streaming outfit XStream in Copenhagen, will try and convince his people that a JavaScript Meetup is just what they need to host, so we’ll probably be in Copenhagen next time.

What’s more? There were shoutouts to the Copenhagen PHP Meetup, and talk about coding dojos.

Free RFID workshop with Forskningsavdelningen

Forskningsavdelningen decided to have a RFID workshop on Thursday (today 27 August 2009), so please come today and bring your rfid tags and readers.

RFID tags come in all shapes and sizes

RFID tags come in all shapes and sizes

As you may know, RFID is a technology used in transportation cards sucha as the new Skånetrafiken “Jojo”, Stockholm Länstrafik’s “Access”, and the London Underground “Oystercard”, as well as Öresundsbron bridge “BroBizz”, and multiple other places. These cards operate without any internal battery/power source but are powered from the radio signals sent to it from the “reader”.

Wikipedia on RFID

Please come from 18:30 to 22:00. This event is all free. Holler to me if you need instructions on getting there.

Oresund JavaScript Meetup tonight

Quoth the Öresund JS meetup locally here:

18.00 - 18.15 Arrive, have some free pizza and soda
18.15 - 18.30 Introduction of members and talk about the future of the group
18.30 - 18.40 Mats Bryntse - How "global" are the modern Ajax frameworks
18.50 - 19.10 Olle Jonsson - Building a Dojo application using Bespin (by Mozilla Labs)
19.10 - 19-20 Fredric Berling - "Hello world" with ExtJS
----------------------------------------------------------------

It’s tonight. Wanna come? I go from Malmö after work.

So, my title there, it’s a bit off, I’m going to show you how to become a Bespin hacker. What steps to take. Where to fix things. (Since there’s an ample list of things to fix – as in every healthy FOSS project.)

Hackmeetup notes: Bubble Bobble theme song on my Arduino piezo

Hackmeetup last night was a new attendance record.

It also featured Mark saying “I’m finished with this project!”, again. A Bluetooth scanner project, which was using Rhino to wrap Java APIs, again.

There were some new faces, and lots of electronics know-how in the house. I learnt a ton from Micke, who show-cased his company’s home automation product: a dimmer for your lights. And also an RFID reader which was autonomous; it had its own network cable and all. It’s out was sending xPL messages to the network, like “if you, the automated lamp, is off, turn on, if not, do nothing”. (Cave: My loose interpretation of this might be off.)

I continued my investigations into the Arduino kit I bought at Reboot. The thermistor and the photoresistor got some exercise, and the piezo was used to play sounds, and soon after that we found a piece of software that Clay Shirky had been in on making, which allowed us to write sheet music notes with a duration. Thus armed, we set out on a chase after the Mario tune. I wanted the sounds when we enters the caves, but David found the better song: the Bubble Bobble theme. Looking at sheet music, coding notes, took a while. But it played. I have a rotten video about it here.

Morgan took pictures with a real camera, and I guess he’ll link to them sometime.

PS: I was in a co-worker’s dream last night “You were talking in Italian with a Spaniard.” The dream had vampires in it, too.

Hackmeetup on Javascript mini-report: RFID on Rhino

This past Tuesday, we ran another Hackmeetup. Same great location, same great time.

Mark ran a talk about Typography on the Web for an audience of three.

For the hardware experimentation session, Carl had left, so it was Mark, me, and David, and we all worked on the same project. Mark had brought a USB-connected RFID reader of the Phidgets brand, and the idea: Use Rhino to wrap the Phidgets Java API to the RFID reader in a JavaScript, so we could… script the thing.

Update: Physical.js is the software we wrote, now published under MIT license.

We printed out the Javadocs for the API, and began laughing at some of the names: getLEDOn(), getAntennaOn(). Then we whiteboard-sessioned up some simpler, JS-idiomatic names, and had our wishlist. Almost cheating: Rhino has __defineGetter__ and __defineSetter__. Then we scrambled to find out how Rhino’s Java-adapting mechanism really worked. Great fun! Mark was the only one with the Phidgets hardware and software platform installed, so he was typing what me and David sent to him.

Prototyping with Rhino is quick. Soon, we were able to read the RFID card that Mark brought, and also a keychain fob I had with me. When we had 30 minutes until the trains went, Mark said: Let’s also hook it up to chat Jabber! He installed an OpenFire XMPP server on his machine, created a “rfid” account, and had it send a message onTagEnter and onTagLeave (enter/leave sounds better than gain/loss: we’re web developers…). Then he took an extra step and made chat commands to enable/disable the LED and antenna.

We cheered. We’d done it all.

Conclusion: Working on the same project is very productive. This was the first time we had a theme, two speakers, a dropped talk, and gotten stuff Done and Ready and the end of the night. Also: snacks. Healthier snacks are better, so next time, let’s up the ante.

EuroPython 2008: My little log

This is an undetailed log of goings-on and other inspiration at EuroPython 2008, which took place in Vilnius, Lithuania (the southernmost of the Baltic countries).

Arriving in Vilnius, which has an airport the size of a thimble, we started into the city in a cab. Cab driver tried to upsell some prostitutes. We were more interested in his anecdotal mini-review of cities:

Moscow, very dark city, very bad people. Here? No problems. Nice little village. … My children can play in streets here.

We get to the small hotel Apia, in the old town. The desk clerk girl gives us a room key, and we climb the stairs, and find that the folks in the room have yet to check out. We are “early”. So, we stashed our bags in a small compartment behind the desk clerk desk (which incidentally only had room for a small bed), and walked the 10 minutes to the conference hotel.

The old town reminds me of a worn-down Visby. Local posters for events range from to Euro-regular to super-cool. A music event poster had remixed a medieval painting of three riders, adding a disco ball to one horse, a cauldron of mushrooms to its rider. One of the horsemen carried a boombox and a gold chain. Very classy execution.

The conference space at hotel Reval: pro. Everything was geared up, rooms were plentiful. The service was immaculate. When I needed to print a PDF document from my USB keyring, it was done for me faster than I could’ve done it myself.

The EuroPython time-slotting of talks: Merciless, in a good way. No speaker is allotted more time than planned. This bit one speaker: Mike P, who presented the interesting SnapLogic framework.

There is a BarCamp/Open Space track, which meant I got to sit in a “JavaScript for Pythonistas” session, talking about JavaScript. That had the upside of one Swedish guy asking the question: “Will you release that?” about some code Isak described. “We hope to do so” was the diplomatic answer. That session was started by Mr Jonathan Fine, who did a smart roundup of who was in the room, what they were interested in, and how we could partition the group smartly, so as to have good subgroups.

By coincidence, merely, we met people we’d met before, Maciej (aka “Fijal”), Jan K, and Grono-Krzysztof. Good clean networking fun. When I say “we”, I mean me and Isak, my colleague.

xFrac (name comes from: xUnit, and “frac” meaning “fraction” — something smaller than a unit) was a testing idea, introduced by Mr Jonathan Fine. It included the JSON subset XSON (which went something like):

['a',{b:'c'}, 'd'] -> <a b="c"><d/></a>

A way of expressing (X)HTML using a tighter format.

Tuesday: Psyco guy: “I just want to go back to PyPy.” He’s maintaining this pre-PyPy optimized C code that has to take care of all corner-cases of Python. (Easier than doing the same for Ruby, but that’s not saying much.) Lightning talks.

Hans Rosling (Trendalyzer, Gapminder Foundation) is a very good speaker: active, and explains things clearly. Not afraid of having opinions, either. He mentioned the SDMX data/metadata format, which seems like a super-complex notation.

Wednesday, final day of EuroPython. I got drafted to “time a speaker”, making sure no schedule over-runs got in the way of the schedule. My speakers were simple to time: tight talks, short questions period.

Thursday, sprint day 1. Me and Isak and Michael Moutakis (Swedish guy, answering the boring question What-do-you-do with “I’m a bureaucrat”.) set out making something “a terrain map of source code”. Terrain map, meaning that “a place should stay in roughly the same place on the map over time”. We wanted to build it using SVN metadata. One of the Launchpad men pointed me to the bzr-svn plugin to Bazaar 1.5. (I tried installing it, but foundered on the plugin.) Thanks!

Me and Isak would parse the SVN metadata, and Michael would use the PIL (Python image library) to create a bitmap image to visualize the data. A single empty line somewhere thwarted us.

Friday, sprint day 2. We continued our battle with the empty line, and grew more and more confused about the dump format. Isak nailed the empty line problem as we were landing in Copenhagen, later that night.

Got home. Beat. Great conference.

Hack-a-thon, in my town!

More groups of people who want to fiddle with opensource software: Hackaton.se. They have an event in Malmö, at a school, 23-25 november.

Just to let you know, so you can spread the word. I’ll write more when I know more.

Update! An attentive reader, also being the organizer of the upcoming event emailed me, and told me more. It’s called “Hack-a-ton”, note the Scandinavian spelling. URL changed to reflect this.

Copenhagen.rb meeting notes

Update: photos by Pelle.

Syndication with AtomPub, APP and GData… and Rails

Olle Jonsson “explores” some things you would want to do with Atom… and how Rails enables you to do it.

Update: My somewhat confused slides now available (PDF).

DHH on ActiveResource

…and then I got lucky, and David was able to give us “how to do all this painlessly in Rails.”

David HH presented the new ActiveResource stuff. Edge, plugins. “Undecided”, still, about if it’ll be in the standard distribution.

Suffix the URL with .xml (or any format your app responds_to!)

GET /posts/1.xml
POST /posts/1.xml {POST payload}

Clarifiction: The last line there, the POST payload, is not a Ruby block, it is what you send as the body of the HTTP request.

We saw the MIME-type format list that Rails’ ActiveResource can output. I missed the JSON format, mentioned it, and David showed how it would be simple to add JSON support to ActiveResource.

Let us cook that up! And David showed:

  • Register a new JSON mime-type
  • respond_to {} the :json, and spit that out
  • make .to_json()

There must be a plugin for this. And there is, we were informed.

Don’t Trust Yourself with Your Users’ Data

Pelle B. tells it like it is, and provides a plugin called EzCrypto. Short, simple presentation, very good. And also, notes on a couple of new developments from the productive programmer: secret URLs as a plugin.

JRuby at a glance

Teaser-like presentation (‘Part I’) by Morten Ch. from Aarhus.

[tags]ruby,rubyonrails,copenhagenrb,event[/tags]