Lambda on the Move on Tero Hasuhttps://tero.hasu.is/blog/
Recent content in Lambda on the Move on Tero HasuHugo -- gohugo.ioen-usSun, 20 Jan 2019 21:34:10 +0100Org-Mode iCalendar Import with Conversion to Floating Timeshttps://tero.hasu.is/blog/org-icalendar-import/
Sun, 20 Jan 2019 21:34:10 +0100https://tero.hasu.is/blog/org-icalendar-import/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).Org-Mode iCalendar Export with Explicit Time Zoneshttps://tero.hasu.is/blog/org-icalendar-timezone-export/
Tue, 03 Jul 2018 15:22:45 +0300https://tero.hasu.is/blog/org-icalendar-timezone-export/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.Fetching Web Pages into NotDefthttps://tero.hasu.is/blog/fetching-web-pages-into-notdeft/
Thu, 22 Mar 2018 19:30:04 +0200https://tero.hasu.is/blog/fetching-web-pages-into-notdeft/I'm increasingly using NotDeft not only for note taking, but also for capturing information from various sources. To some extent it already acts as a lightweight substitute for the likes of Evernote. As explained in the documentation, Org mode's built-in capture protocol can be used to send snippets of text from a page open in a web browser into one's NotDeft note collection. Sometimes, however, we already have a URL of an interesting page in our clipboard, and we would like to fetch the entire page's textual content into NotDeft with a single command.Org-Mode Export of Scheme-less Absolute Path Linkshttps://tero.hasu.is/blog/org-bare-absolute-link-export/
Mon, 29 Jan 2018 18:47:05 +0200https://tero.hasu.is/blog/org-bare-absolute-link-export/I sometimes turn Org format notes into blog posts (as in the case of this one), and when doing so it's good to be mindful of how Org links get translated on export. In some cases we want the output link to have the absolute path of the resource (for the site, not the file system), but no URL scheme or authority part. Emacs Org mode (as of version 9) interprets scheme-less links with an absolute path as file: links of the same path.Transient Directories in NotDefthttps://tero.hasu.is/blog/transient-directories-in-notdeft/
Sun, 21 Jan 2018 16:11:59 +0200https://tero.hasu.is/blog/transient-directories-in-notdeft/My NotDeft note manager has an optional notdeft-path feature to better support transient directories of notes. Also in the standard configuration, the notdeft-directories list may contain directories that do not have to always exist, as any non-existing directories are simply ignored; if and when they appear, they can be included in subsequent searches. Note, however, that the notdeft-directories variable is normally set only once, and if the initializer expression includes wildcards, the variable value may not contain directories that get mounted or copied over later.Opening Racket Modules in Emacshttps://tero.hasu.is/blog/2014-07-06-racket-open-module-at-point.html
Sun, 06 Jul 2014 19:57:57 +0200https://tero.hasu.is/blog/2014-07-06-racket-open-module-at-point.htmlIn recent past, I've adopted Greg Hendershott's racket-mode for Emacs, added keyword completion, hover help, documentation lookup, customized syntax highlighting and indentation and such for my personal tastes, but one thing I haven't really looked at so far is code navigation support for Racket. What seemed like an easy place to start was implementing a function for loading a Racket source file by its module path, as would appear within a require form.Dictionary-Enabled Racket Support for Emacshttps://tero.hasu.is/blog/2013-08-24-ractionary.html
Sat, 24 Aug 2013 00:26:43 +0200https://tero.hasu.is/blog/2013-08-24-ractionary.htmlFor the last month or so I've found Racket programming even more enjoyable than before. The reason for this is a tool named Ractionary (short for Racket Dictionary Generator), which I wrote for extracting information about Racket language names. Said information can easily be used for setting up some Racket language awareness for Emacs. There is an Emacs tradition of running an external Lisp (or "inferior Lisp") process to allow for dynamic evaluation of foreign (non Emacs Lisp) code, and this kind of a solution could be used to query information known to Racket on demand.Another PIM Data Exporterhttps://tero.hasu.is/blog/2013-08-22-introducing-anyxporter.html
Thu, 22 Aug 2013 18:16:20 +0200https://tero.hasu.is/blog/2013-08-22-introducing-anyxporter.htmlMy little SMS Exporter utility app has probably been downloaded quite a few times by virtue of it having been available for many years. Now it's time to introduce another PIM data exporter application: Anyxporter. This new application is capable of exporting contact data, and supports both MeeGo Harmattan and (some versions of) Symbian. One of the shortcomings of SMS Exporter is that its export data format is not as machine readable as it could be.SMS Exporter v1.10 Releasedhttps://tero.hasu.is/blog/2013-05-22-sms-exporter.html
Wed, 22 May 2013 00:47:44 +0200https://tero.hasu.is/blog/2013-05-22-sms-exporter.htmlI was recently motivated to install some Symbian SDKs again, after quite a long break from Symbian programming. So here, an updated release of SMS Exporter for Symbian. SMS Exporter v1.10 should fix some of the potential-incompatibility installation warnings that the previous release may have caused on newer phones. The good news is that since there probably aren't going to be any still newer Symbian phones (now that the Nokia 808 PureView has indeed been confirmed to be "Times Are Hard for Racketeers, toohttps://tero.hasu.is/blog/2013-01-06-racket-time-conversion.html
Sun, 06 Jan 2013 02:21:31 +0100https://tero.hasu.is/blog/2013-01-06-racket-time-conversion.htmlAPIs dealing with dates and times must be hard to get right. I'm not aware of any programming language whose standard library for dealing with times is both intuitive and comprehensive. Racket has built-in libraries that are second to none, but even it presently leaves something to be desired when it comes to support for handling dates and times.
For example, Racket's racket/date module (in its current incarnation) includes a date-&gt;string function, but no string-&gt;date function.Rascal Mode for Emacs Releasedhttps://tero.hasu.is/blog/2012-10-09-rascal-emacs-mode.html
Tue, 09 Oct 2012 00:38:07 +0200https://tero.hasu.is/blog/2012-10-09-rascal-emacs-mode.htmlDuring the last year or so I've written some program transformations in the Rascal programming language. I find it beneficial to have an Emacs mode for any language I make significant use of. Not finding an existing one for Rascal, I proceeded to put one together myself. See Emacs Mode for Rascal (on GitHub) for the code. The mode has its imperfections. Rascal is not exactly a small language, and while it has a C-like surface syntax, there is some unusual syntax that seems tricky to get right.On Racket Support in Emacs Org-Modehttps://tero.hasu.is/blog/2011-09-08-on-racket-support-in-emacs-org-mode.html
Thu, 08 Sep 2011 22:35:15 +0200https://tero.hasu.is/blog/2011-09-08-on-racket-support-in-emacs-org-mode.htmlEarlier I blogged about Epresent, which is basically a piece of code for making Org-Mode suitable for preparing presentation slides. There are times when I can&#8217;t resist mentioning the innovative Racket programming language in a presentation. In those situations I tend to want to have syntax-highlighted Scheme code on my slides, and also to evaluate the code snippets and insert the results next to the code listing. This is apparently the sort of thing one can do with Org-Mode Babel, for a variety of languages.Presenting with Emacshttps://tero.hasu.is/blog/2011-02-23-presenting-with-emacs.html
Wed, 23 Feb 2011 20:18:37 +0200https://tero.hasu.is/blog/2011-02-23-presenting-with-emacs.htmlText rendering in Emacs has been looking mighty good since 23.1, and this opens up possibilities to do even more in Emacs. For example, I recently came across something called epresent.el on GitHub, by Eric Schulte et al. The epresent.el Emacs Lisp file leverages Org-Mode to implement a simple presentation mode for Emacs. Using Org-Mode is, at least for me, faster than struggling with something like OpenOffice.org Impress.
Having discovered epresent.Let Us Have More C++ Languageshttps://tero.hasu.is/blog/2011-01-07-let-us-have-more-c-languages.html
Fri, 07 Jan 2011 18:33:02 +0200https://tero.hasu.is/blog/2011-01-07-let-us-have-more-c-languages.htmlC++ is a good language in that it is widely supported and has a large ecosystem around it. As a result, it has a large number of libraries, including extensive cross-platform frameworks (such as Qt). There are also entire operating systems written in C++, of which Symbian is an example. All of this provides ample motivation to use C++ (or at least its libraries) from time to time.
However, as a language C++ can feel verbose and constraining at times.Mixing Hand-Written, Generating, and Generated Code with Kooghttps://tero.hasu.is/blog/2010-09-28-mixing-hand-written-generating-and-generated-code-with-koog.html
Tue, 28 Sep 2010 20:58:24 +0300https://tero.hasu.is/blog/2010-09-28-mixing-hand-written-generating-and-generated-code-with-koog.htmlSome days ago I released a little code generation utility that I have been using for well over a year in cranking out repetitive C++ code. Koog is&#8212;for lack of a better established term&#8212;a mixed-code generator. It is similar to other tools of its kind (such as Cog), but the only one that I know of that uses the Scheme language for specifying what code to generate.
The concept of mixed-code generation is simple.ContextLogger2 Technical Report Publishedhttps://tero.hasu.is/blog/2010-08-28-contextlogger2-technical-report-published.html
Sat, 28 Aug 2010 18:53:34 +0300https://tero.hasu.is/blog/2010-08-28-contextlogger2-technical-report-published.htmlI wrote a technical report about the ContextLogger2 software that I&#8217;ve been working on at HIIT of late. The direct URL and other publication details can be found from this page. The entire series of electronically published HIIT technical reports is available from here.On Patching S60 SDKs for GCCE 4 Compatibilityhttps://tero.hasu.is/blog/2010-08-01-on-patching-s60-sdks-for-gcce-4-compatibility.html
Mon, 02 Aug 2010 00:45:29 +0300https://tero.hasu.is/blog/2010-08-01-on-patching-s60-sdks-for-gcce-4-compatibility.htmlI&#8217;ve tried GCCE version 4 before for building Symbian software, but have been somewhat put off by all the warnings it produces, mostly due to incompatibilities with the header files in the existing S60 SDKs. Well, I finally managed to get a working S60 application built with GCCE 4 without any warnings. Mind you, this was just one application, and not built with the full Symbian toolchain, but still.
I used the S60 5th Edition SDK with a number of patches, some of which I have posted here.Scanning for ABLD Errors and Warningshttps://tero.hasu.is/blog/2010-07-30-scanning-for-abld-errors-and-warnings.html
Fri, 30 Jul 2010 21:54:01 +0300https://tero.hasu.is/blog/2010-07-30-scanning-for-abld-errors-and-warnings.htmlSymbian&#8217;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 &#8220;completion&#8221; 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.Deleting Hidden Untrusted S60 Themes How-Tohttps://tero.hasu.is/blog/2009-11-28-deleting-hidden-untrusted-s60-themes-how-to.html
Sat, 28 Nov 2009 18:39:52 +0200https://tero.hasu.is/blog/2009-11-28-deleting-hidden-untrusted-s60-themes-how-to.htmlEarlier I wrote about a problem with restoring data to my Nokia E71 after a firmware upgrade. Well, there was also another problem. Once again, I started getting the &#8220;Untrusted software found on memory card. To install, go to Application manager.&#8221; complaint upon my Nokia E71 booting or otherwise mounting the memory card. Application Manager showed no applications marked as &#8220;Not installed&#8221;, and reinstalling the applications I tend to have installed didn&#8217;t fix the problem.A Summary of the History of Luahttps://tero.hasu.is/blog/2009-11-22-a-summary-of-the-history-of-lua.html
Sun, 22 Nov 2009 07:32:59 +0200https://tero.hasu.is/blog/2009-11-22-a-summary-of-the-history-of-lua.htmlThe other day I gave a presentation on the history of the programming language Lua, in a HOPL conference inspired seminar course at TKK. If you asked a presentation expert, you&#8217;d probably be told that the slides have too many words in them, but perhaps that will make them easier to follow without the accompanying talk. In any case, the presentation slides have been posted on the web.Nokia's Products Are Error (Message) Freehttps://tero.hasu.is/blog/2009-11-08-nokia-s-products-are-error-message-free.html
Sun, 08 Nov 2009 19:12:30 +0200https://tero.hasu.is/blog/2009-11-08-nokia-s-products-are-error-message-free.htmlSo I upgrade the firmware of my Nokia E71 from v200 something to v300 something.
After the upgrade, I proceed to restore my data, as one would. No errors reported, and indeed everything was restored, with the minor exception of all of my 1540 Calendar entries, which were nowhere to be seen. The same thing with restore from memory card and restore with Nokia PC Suite. Sometimes I wish something this important would just work.Please Remove the Battery to Continuehttps://tero.hasu.is/blog/2009-04-27-please-remove-the-battery-to-continue.html
Mon, 27 Apr 2009 23:16:35 +0300https://tero.hasu.is/blog/2009-04-27-please-remove-the-battery-to-continue.htmlNot quite up there with &#8220;Keyboard not found. Press F1 to continue.&#8221;, but&#8230;
So I wanted to use my Nokia E71 for something, but first had to try dismissing this dialog, but of course first I would have needed to remove the keylock, but hey, it was the keylock controlling application that had crashed.Look, S60 Software Installation with No Handshttps://tero.hasu.is/blog/2009-01-17-look-s60-software-installation-with-no-hands.html
Sat, 17 Jan 2009 11:50:53 +0200https://tero.hasu.is/blog/2009-01-17-look-s60-software-installation-with-no-hands.htmlS60 3rd Edition has been out for quite a while by now, and for me, the one thing that has all but killed the pleasure of developing native software for the platform has been the humiliating wait&#8212;dismiss dialog&#8212;wait&#8212;dismiss dialog&#8212;wait&#8212;dismiss dialog&#8212;wait procedure during installation of the software being tested and developed. For one-off installations the installation procedure is no problem, but when you&#8217;re a developer it gets old real fast.
On 1st and 2nd edition I would bypass the installer by simply transferring the binaries to where they ultimately belong on the target filesystem, using a tool such as obexftp.Another PyS60 Extension with a take_photo Functionhttps://tero.hasu.is/blog/2009-01-09-another-pys60-extension-with-a-take-photo-function.html
Fri, 09 Jan 2009 02:07:49 +0200https://tero.hasu.is/blog/2009-01-09-another-pys60-extension-with-a-take-photo-function.htmlEarlier releases of the Miso PyS60 extension had a take_photo function, for taking photos (without a viewfinder). This functionality (and more) has since then been integrated to PyS60 itself in the form of the built-in camera module.
I&#8217;d now like to introduce the pynewfile library for PyS60, which (at least for some S60 phones) offers an alternative to the camera module when wishing to take photos interactively with a viewfinder.Accessing OBEX Pushed Messages with Python for S60https://tero.hasu.is/blog/2009-01-02-accessing-obex-pushed-messages-with-python-for-s60.html
Fri, 02 Jan 2009 19:55:22 +0200https://tero.hasu.is/blog/2009-01-02-accessing-obex-pushed-messages-with-python-for-s60.htmlEarly last year at HIIT I hacked the Python for S60 inbox module to have it support querying for the content and metadata of messages in the device Inbox that have been sent via Bluetooth OBEX Push. (The built-in inbox module apparently only supports accessing SMS messages.) I changed the name of the hacked module to pyinbox, to avoid conflicts with the built-in Inbox access module.
I recently made pyinbox available via a dedicated webpage, in case it should prove useful to others.pyaosocket aka aosocketnativenew Released Standalonehttps://tero.hasu.is/blog/2008-11-29-pyaosocket-aka-aosocketnativenew-released-standalone.html
Sat, 29 Nov 2008 13:51:56 +0200https://tero.hasu.is/blog/2008-11-29-pyaosocket-aka-aosocketnativenew-released-standalone.htmlIn the PDIS project at HIIT we developed a socket library for Python for S60. The library consisted of both a native extension and quite a bit of Python code. The native extension was called aosocketnativenew, and became somewhat well known as an extension supporting non-interactive Bluetooth discovery.
We never made a standalone release of the library, nor did we release a version of the native extension built for S60 3rd Edition.Passing on Keyword Arguments in PLT Schemehttps://tero.hasu.is/blog/2008-11-15-passing-on-keyword-arguments-in-plt-scheme.html
Sat, 15 Nov 2008 11:57:26 +0200https://tero.hasu.is/blog/2008-11-15-passing-on-keyword-arguments-in-plt-scheme.htmlI am a big fan of Python&#8217;s keyword argument facility, and especially its support for *args and **kwargs function parameter declarations. *args and **kwargs capture any explicitly undeclared positional and keyword arguments, respectively, and this facility in many cases allows one to avoid repeating function interfaces. This is both less typing and more future proof, and makes it easier to see the parameters that directly concern a function. Contrast this with Java, which not only has no keyword arguments, and no support for *args style declarations, but which also forces you to repeat caught exception declarations in function signatures.Finding Out the Best-Before Date of a SIS Filehttps://tero.hasu.is/blog/2008-10-16-finding-out-the-best-before-date-of-a-sis-file.html
Thu, 16 Oct 2008 03:49:02 +0300https://tero.hasu.is/blog/2008-10-16-finding-out-the-best-before-date-of-a-sis-file.htmlThere are a few Symbian software authors who occasionally write a piece of Symbian code, possibly with no intention of ever touching the code again, package it up as a SIS file, and then &#8220;fire and forget&#8221; that SIS file to some web site in case someone should find it useful. Or forget until such time that someone complains about the SIS file having been expired.
Some of the blame here falls to Symbian&#8217;s makekeys tool, which by default generates certificates with the validity period of only one year.SMS Exporter v1.09 Releasedhttps://tero.hasu.is/blog/2008-08-08-sms-exporter-v1-09-released.html
Sat, 09 Aug 2008 02:25:34 +0300https://tero.hasu.is/blog/2008-08-08-sms-exporter-v1-09-released.htmlThe certificate used to sign v1.08 had expired, so created a longer lived one with openssl, and signed with that. Added the backup registration file while at it, as it had been missing from previous 3rd edition releases.Faster Menu Navigation by Crashing the Icon Serverhttps://tero.hasu.is/blog/2008-07-09-faster-menu-navigation-by-crashing-the-icon-server.html
Wed, 09 Jul 2008 21:16:10 +0300https://tero.hasu.is/blog/2008-07-09-faster-menu-navigation-by-crashing-the-icon-server.htmlSome operations on the Nokia E61 are painfully slow. For instance navigating the applications menu can be time consuming, especially if the folders being opened have many items in them. The other day I managed&#8212;by (un)installing some SIS files&#8212;to get the icon server of the device to crash (it produced a panic). This resulted in an iconless applications menu, with only application names visible, but otherwise seemed to have no adverse effect.S60 SDK API Plug-in Installation for GnuPochttps://tero.hasu.is/blog/2008-05-29-s60-sdk-api-plug-in-installation-for-gnupoc.html
Thu, 29 May 2008 18:45:54 +0300https://tero.hasu.is/blog/2008-05-29-s60-sdk-api-plug-in-installation-for-gnupoc.htmlThe SDK API Plug-in package for S60 SDKs has quite a few interesting APIs, such as the Browser Launcher API and the New File Service Client API.
Some days ago I wrote a script for installing plugins from the package onto GnuPoc style SDKs. It may be downloaded from http://www.hiit.fi/files/fi/da/gnupoc/.C Socket Code in Rubyhttps://tero.hasu.is/blog/2008-01-20-c-socket-code-in-ruby.html
Sun, 20 Jan 2008 17:38:00 +0200https://tero.hasu.is/blog/2008-01-20-c-socket-code-in-ruby.htmlWhen 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.