JRuby to support \K escape sequence in

Allow me to celebrate the JRuby team (and nearby efforts) in that the next patch release of it will include \K as a regular expression special character.

This GitHub Issue was just closed with a resolution in the Joni library: https://github.com/jruby/jruby/issues/4871

Its support is in a little select company, randomly listed at StackOverflow, which has such google-juice that it felt worth it to shout about JRuby on there.

I’ll repeat the example from the GitHub Issue:

$ irb
2.3.1 :001 > 'street'.match( /s\Kt/)
 => #<MatchData "t"> 

Io: my errno adventure in C

This pastie holds my first C patch. It actually repaired a Readline problem that appeared on my Mac when I git pull‘d Io’s source today. See the Io issue at their bugtracker.

The pgsql heroes fixed the problem way before, so I could stand on the shoulders of smart giants.

I don’t know how to test C stuff, except for running the programs, and Jonas reminded to actually do that:

c-5b66e555:~ olle$ rm .io_history 
c-5b66e555:~ olle$ mkdir .io_history
c-5b66e555:~ olle$ io
Io 20080120

 Exception: while loading history file '/Users/olle/.io_history', reason: Is a directory
 loadHistory                         Z_CLI.io 47
 ReadLine ?                           Z_CLI.io 47
 Call relayStopStatus                 A2_Object.io 295
 CLI loadHistory                      Z_CLI.io 94
 CLI interactiveMultiline             Z_CLI.io 82
 CLI run                              IoState_runCLI() 1

c-5b66e555:~ olle$ 

So, the complaining functionality is retained.

What’s it do?

For those who are beginners at C, like I am, this small digression might interest:

  • First we include the errno mechanism as an include: #include <errno.h>
  • in each function, initialize the value of the static global variable “errno” to 0
  • functions like read_history(filename), from the libedit library return an int, but…
  • We are not interested in the return value, so we cast the computation to be void, the errno mechanism will take care of remembering that int on its own
  • It seems to be culturally correct to check for success instead of failure.

All these factoids are guesstimates of what went on, and I’m interested in the real story someday. Please provide any insight as comments, dear reader.

PS: As you can tell, mucking about other people’s C code is not something I do every day. I felt good, but weird.

WideFinder in Io: it’s now too late

A Swede made the first WideFinder implementation in Io: Ragnar Dahlén.

The results were informative, but not performant. Io can not compete just there, just yet.

Me and Thorbiörn were conspiring last week to implement WideFinder, but we got waylaid by… distractions. The distractions were speculative, lazy, and touched on different OCamls. Like this: “We need an OCaml-shaped project. To help us learn.”

The usual get-started project is “Make an HTTP server than can 200 and 404. At least.” Hardly qualifies as OCaml-shaped…

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.

Web hacking Øresund, a local computer get-together

Folks, I live in Malmö, Sweden. Update: Web Hacking Oresund web page.

And I like hanging out, making stuff. So, I set up a Facebook group called “Web Hacking Øresund”. (yeah, yeah, silo-of-content, and all, I’ll go and set up an Upcoming Event for it, instead).

The concept: meet up, checking out the stuff you’ve saved up to check out. Do stuff.

Last time, which was the first, we looked at C64 conversions of PC demos. Wild stuff. Processing, the graphics programming environment (basically NodeBox for Java) was installed and fiddled with. Some Web stuff was demoed, but our focus was on getting to know each other, make our interests known. A Clubbe, simply.

We later adjourned the meeting for a quiet pilsner in a nearby café.

Things went well, plans were hatched. Next meetup will be about starting stuff, possibly getting to know more about text-mining. Or math. Or Apache projects. Or ExtJs. Or something else.

Look, Ma! (linked Io glimpse)

The Io blog points to a ramshackle example Io thing authored by me and quag.

If you’ve heard about Io, and wonder what it looks like, this is a… very small example.

(I didn’t know they’d gone and published it, and it turned up in my newsreader. Now I have to improve it. Gosh, the pressure.)


Visited a gamefest: Nordic Game Jam 2007

Copy-party (or less aggressively, and perhaps more descriptively “demo-party”), that was the name of a weekend of mildly Dionysian digital festival here in Northern Europe during the late 80s and the 90s.

*Update:* Danish radio DR1’s show Harddisken has Frederik Berg Olsen’s radio programme about NGJ07. FBO had a tape recorder with him, and made a Gonzo radio reportage from the event, which’ll be broadcast (in Danish) tonight at 20:00. You can also download it, and hear it at your leisure.

Yesterday, I experienced the same kind of group exhilaration at Nordic Game Jam, a meetup of kindred souls from the Nordic area in Copenhagen’s IT university building. A whole weekend! 36 hours to design and make a computer game. No holds barred.

(I think the constraints of this Jam was about game design, not about technology.)

Fellow Copenhagener Frederik Berg Olsen was there, participating with the Snowscape team, as a game designer. I met his team-mates, and even though the rigors of completing a computer game in a limited time-span take their toll, they were a cheerful and kind lot. The puns at mid-afternoon on Sunday were quite… ripe. “RoboSnow! SnoboCop!”

My thoughts about what tools to bring to the next year’s Jam was:

* exotic hardware (dance mats, game joysticks with “force feedback”, light pistols, NES handcontrols — hm, should one make a NES game? Thorbiörn, whaddya say?)
* super-productive software kit to run said hardware (Pygame, some Ruby wrappers for SDL, perhaps, some Windows package — maybe HGE — to make games). Having tried the software before could be good. Does it run on my laptop? Does it do sound input? You know, trying to moderate the effects of Murphy’s Law.
* or, taking the “prevalent” route: Flash, with all bells and whistles. Or, even Javascript? In-browser, or not?
* or, tying in the Web in some way
* good ideas, games that you want to make

Yes, I say next year, ’cause I’m coming then. It looked like tons of fun.

Practical details that might be useful:

* Integration/build machine for Java projects. Run the Buildix live-CD Linux distribution.
* A wiki-wall of Post-its and so on, where Help Wanted, Stuff We Brought, Have You Seen My Blue Cable, etc, could be put up
* Pre-event setup Subversion repositories for everything — maybe Google Code? But, you need to be able to set the stuff up lightning-fast
* Perhaps having your own team’s tech-support/auxiliary guru to solve any crises. (But, hey, no crises, please.)

Update: I got Gosu with Ruby to work! It’s a delightful 2D-game framework. Cute!


Intro to J language

Via Dave, my favorite Dutch-speaking Australian Computer Scientist, I got wind of this fine J programming language introduction, written by our common acquaintance Cratylus.

A short text, it goes directly into parsing how J looks, and then a bit about its operators. No speculation, just explanation. Thanks, C!

And, Dave: I love the new handle-bars.