Lambda on the Move

A (non-)personal blog about programming, Symbian, and little else.

Fetching Web Pages into NotDeft

Written on

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.

Read more…

Transient Directories in NotDeft

Revised on
Created on

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.

Read more…

Org-Mode Export of Scheme-less Absolute Path Links

Written on

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.

Read more…

Mixing Hand-Written, Generating, and Generated Code with Koog

Revised on
Created on

Some 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—for lack of a better established term—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.

Read more…

ContextLogger2 Technical Report Published

Revised on
Created on

I wrote a technical report about the ContextLogger2 software that I’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 Racket Support in Emacs Org-Mode

Revised on
Created on

Earlier 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’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.

Read more…

Opening Racket Modules in Emacs

Revised on
Created on

In 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.

Read more…

Times Are Hard for Racketeers, too

Revised on
Created on

APIs 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->string function, but no string->date function.

Read more…

Dictionary-Enabled Racket Support for Emacs

Written on

For 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.

Read more…

Another PIM Data Exporter

Written on

My 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.

Read more…

SMS Exporter v1.10 Released

Written on

I 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 "

Read more…

Let Us Have More C++ Languages

Revised on
Created on

C++ 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.

Read more…

Rascal Mode for Emacs Released

Written on

During 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.

Read more…

Presenting with Emacs

Revised on
Created on

Text 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.

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…

On Patching S60 SDKs for GCCE 4 Compatibility

Written on

I’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.

Read more…

Nokia's Products Are Error (Message) Free

Revised on
Created on

So 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.

Read more…

Deleting Hidden Untrusted S60 Themes How-To

Written on

Earlier 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 “Untrusted software found on memory card. To install, go to Application manager.” complaint upon my Nokia E71 booting or otherwise mounting the memory card. Application Manager showed no applications marked as “Not installed”, and reinstalling the applications I tend to have installed didn’t fix the problem.

Read more…

A Summary of the History of Lua

Written on

The 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’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.

Please Remove the Battery to Continue

Written on

Not quite up there with “Keyboard not found. Press F1 to continue.”, but… 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 Hands

Written on

S60 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—dismiss dialog—wait—dismiss dialog—wait—dismiss dialog—wait procedure during installation of the software being tested and developed. For one-off installations the installation procedure is no problem, but when you’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.

Read more…

Another PyS60 Extension with a take_photo Function

Written on

Earlier 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’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.

Read more…

Accessing OBEX Pushed Messages with Python for S60

Written on

Early 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.

Read more…

pyaosocket aka aosocketnativenew Released Standalone

Written on

In 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.

Read more…

Passing on Keyword Arguments in PLT Scheme

Written on

I am a big fan of Python’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.

Read more…

Finding Out the Best-Before Date of a SIS File

Written on

There 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 “fire and forget” 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’s makekeys tool, which by default generates certificates with the validity period of only one year.

Read more…

SMS Exporter v1.09 Released

Written on

The 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 Server

Written on

Some 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—by (un)installing some SIS files—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.

Read more…

S60 SDK API Plug-in Installation for GnuPoc

Written on

The 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 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…