“Ruby” Tagged Pages

Org-Mode iCalendar Import with Conversion to Floating Times

Revised on
Created on

In an earlier blog post I wrote about using Emacs Org mode for calendaring, and exporting iCalendar files with TIMEZONE information (including “VTIMEZONE” definitions, as specified by RFC 5545). Another side of the picture is importing from iCalendar into Org, and in this post I introduce a little Ruby script I recently finished writing for that purpose. I don't think I'm the first person to have written a half-baked script for iCalendar-to-Org import, but the special requirement I had was that I wanted to be able to interpret “DATE WITH UTC TIME” values in a non-standard way, and convert them into “floating” times (without time zone information).

Read more…

Org-Mode iCalendar Export with Explicit Time Zones

Revised on
Created on

For several years I used Symbian phones for calendaring, and the biggest issue for me was the lack of support for time zones: there was neither a way to specify a “floating” time, nor could you select a specific time zone for an appointment. Times would be interpreted in the context of the currently selected system-wide local time zone, and shifted later when changing the time zone setting. Consequently, I avoided ever changing time zones to retain the times as entered.

Read more…

Scanning for ABLD Errors and Warnings

Revised on
Created on

Symbian’s ABLD build system tends to produce a lot of output, especially when run with the verbose flag (-v), as I like to do to see the compiler invocations. Also, ABLD likes to run to “completion” despite individual build steps failing. The end result is that it takes some effort to look for the errors and warnings in the output. Some suggest scanning ABLD output in order to terminate the build on error or to highlight errors and warnings.

Read more…

C Socket Code in Ruby

Written on

When designing socket code to be implemented in C, it may well make sense to first sketch out the design in Ruby. The Socket class provides thin wrappings for just about all of the relevant C standard library functions. There also is the fcntl module, and select in Kernel. The socket code can thus be just about the same in Ruby as it would be in C, but trying out different designs for say managing sessions in a server is much less tedious in Ruby.

Read more…