
A new version of
RQuantLib
(a package combining the quantitative analytics of
QuantLib with the
R statistical computing environment and language)
is now out at
CRAN and
in
Debian (where it depends on the 1.0.0
beta of
QuantLib that is currently in the NEW
queue with its new library version). This
RQuantLib
release works with either the
current release 0.9.9 as well as with the just-released first beta of
QuantLib 1.0.0.
This versions brings a few cleanups due to minor
Rcpp changes (in
essence: we now define the macro
R_NO_REMAP before including R's
headers and this separate non-namespaced functions like
error()
or
length() out into prefixed-versions
Rf_error()
and
Rf_length() which is a good thing).
It also adds a number of
calendaring and holiday utilities that Khanh just added: tests for weekend,
holiday, endOfMonth as well dayCount, date advancement and year fraction
functions commonly used in fixed income.
Full changelog details, examples and more details about this package are at
my
RQuantLib page.
This is a
book on a graphic library, so when they first told me it will be printed in black&white I was quite surprised and puzzled. The editor explained it was to reduce paper copy cost, and that the PDF version will still be in full color, but I would be quite upset if I bought the book and then discover it's black&white without knowing it upfront.
Thus I've asked to at least let the images be downloadable from the book website, so that any reader (either for the paper or electronic copy) can see the pictures as if they're running the programs.
The first request went ignored, but keep pushing got results: now images can be downloaded!! To get them, got the book
webpage, then in the "Code Download" section, and request the zip file: in it you'll find either the source code and the images.
The pictures are quite big, because they are the same used for book production (so with specific dimensions and DPI) but you got colors now :)
On Tuesday, I released version 0.02 of
Net::NationalRail::LiveDepartureBoards
to CPAN. So far, no one has complained. This module is probably of
interest only to people in the UK; it looks up which trains are next
to arrive/depart from a particular station.
This release was prompted by a patch sent to me by Ian Dash,
implementing a filtering feature I was too lazy to write myself. If
someone wants to put a fancy GNOME applet around it, I'd be
grateful. ;) I think the next step is to add a nicer OO interface.
My original reason for writing the module was to advertise
this SOAP API
that ATOC publishes - it could easily be wrapped in languages other
than Perl. That particular URL was found by inspecting the official
widget for Windows Vista.

Should have problems getting Oracle XE run under Debian, check that you are
using the package
from
their repository not the ones available at their
website.
The later ones seem to be outdated and buggy; don't know why the haven't
changed their website yet; the fixed packages are only available since May
2006...
Recently, I've been working on a file transfer app for the N900.
It's called
monorail and
I uploaded it to extras-devel last night, so you can
try it out right
now.

I implemented an
OssoABookContactView with support for filtering on
Contact Capabilities (or a draft of it, at least) as
old-style caps aren't great. This gives a nice list of address
book contacts who have at least one account that should support
receiving file transfers. It would be nice if these extra caps
could go into the address book which is where they belong, but it
won't.
If someone would find this widget useful, I'll clean up the code
and maybe throw it in its own library.

Choose one of the accounts which support file transfer.
I also started to implement a
sharing plugin, but it turns out it's poorly documented and
appears to be impossible to do anything useful for my use-case,
like popping up a dialog when the user taps "Share". The
example isn't very exemplary, but does contain some
amusing code.
This sharing plugin is only half-written and impossible to
debug. If anyone has any pointers on writing these plugins, I would
appreciate them.

It's a shame that although Hildon widgets can look really good
on the device, it can often take some fiddling to make them look
consistent with the rest of the UI. Additionally,
oddities in some widgets can leave you baffled, or amused.
The most annoying thing I have come across regarding this app is
just how little I can get it integrated. The file manager is all
hard-coded so there's no way to add a
Send to Contact menu
item, and no buttons can be added to the libsharing dialog (which
appears when the user shares a photo) which is annoying as it
looks
like it's missing this feature.

Oh, and Telepathy is pretty sweet.
A few weeks ago, I got
a cool
Christmas present from
work. It's pretty sweet, and I've
been writing some apps for it. I'll try and blog about them
here.

A while ago, I wrote some a number of account plugins for Maemo
5, so that other Telepathy connection managers could be used and
well-integrated into the N900's Contacts and Conversations User
interface. This enables the following extra protocols:
There are still a few problems which I'll try to iron out soon
enough but they appear to be working pretty well. The best thing
about it is clearly the integration with the rest of the phone, as
demonstrated by Marco in the screenshot above.
The
PR1.1
update, which is due today, also opens the door for enabling
other protocols dynamically by providing libpurple plugins. I will
be adding Facebook Chat support soon, and someone else has made a
package for Twitter.
This is in extras-testing for you all to download and try out.
You can find all the packages in the "Network" category of the
Application manager. The
Extra protocol plugins for
Conversations and Contacts metapackage (telepathy-extras, in
reality) pulls in all the cool account plugins and connection
managers of the time. File bugs from the maemo.org package
link.
I m developing a huge backlog of things to write about, going back as far as a couple of posts inspired by the Kerberos conference in October. However, those require more effort putting together the post, so I m going to focus on something more recent.
Part of running a business even a small business like Painless Security is dealing with the administrative and bookkeeping. The normal solution seems to be Intuit s Quick Books. When I set up the company, I looked into that. However, Intuit s accessibility story starts with give up, and goes down hill from there. Apparently, screen reader vendors have offered to work with Intuit to help them, but have been turned down, or at least that s the strong implication I get from reading blogs from these accessibility vendors. So, I d definitely rather not give Intuit my money. I m also looking for a bit more than the minimum in accounting software. Keeping the books in order enough to pay taxes would be easy. However I want to be able to understand where I m making money; I want to be able to figure out if the fixed price contracts I enter into end up being good ideas. I want to understand how expensive community projects Painless Security gets involved in like Debian and IETF work are both in terms of direct costs and opportunity costs. I want to understand what sorts of work ends up being the most profitable. All of these are fairly typical management questions; solutions to varying degrees are understood. however it means I m actually going to use an accounting product more than just to track my invoices and prepare taxes.
I decided to see what the open source world was like in this space. I started with
Ledger SMB. Ledger SMB s main claim to fame is that it tries to be better than SQL Ledger. Being better than SQl Ledger is definitely a good thing. It worked well enough to generate invoices and income statements. It nominally had facilities to track the sort of per-project information I m looking for, but the facilities are not near good enough. Also, there were some issues things like the fact that total debits didn t particularly need or tend to sum to total credits got old after a very short while. Also, facilities for correcting mistakes were unfortunate. You could either operate in a mode where you could delete a transaction, or a mode where you reverse transactions. Deleting transactions in practice meant deleting most of a transaction; balances became out of sync and half of the transaction tended to stick around using some interfaces but not other interfaces. Database cleanup was almost always required. In principle, reversals are better. However, there is no facility to indicate that you re not expecting payment on a reversed invoice. The receivables/payables account balance out because of the reversing transaction, but both the reversing and reversed transaction end up becoming over-due. Hey, can you please send me some anti-money to clean this up? The code was dreadful; the goal was to have better abstraction than SQL Ledger. Perhaps that was achieved, but man that leaves a lot to desire.
Now, I m playing with
Open ERP. It wants to grow up some day to be a competitor to SAP R3. In a way that sounds good, although it does mean there s a high complexity cost. There s a lot of functionality. There s reasonably good separation between view and model (and possibly even controller). The code is often clean, although the random blocks of commented out code with no explanation cause me to cringe. Many aspects of the system seem incredibly well designed; you can approach the system through a web client, graphical client, two different RPC mechanisms, XL and Open Office plugins.
However, there s this mix of missing stuff and completely broken that causes me to wonder whether I m going to be sad. First, there appears to be basically no support for the US. All addresses are European format and are
hard coded. Each individual report needs to be changed. Recently, I found cases where as best I can tell debits and credits are just
reversed. I ve found a case where backing up the database succeeds but generates a zero length file. I almost lost data through that last one. There s a complex set of mechanisms to deal with units-of-measure for products for example, some jobs billed in hours, some are billed in days. However other parts of the code just add quantities.
Playing around with this I am reminded again that I really enjoy thinking about these sorts of problems. An interesting ERP project could be fun to work on. for example, I bet handling ERP needs for some cloud-centered company would be a lot of fun.
Also, as part of looking at Open ERP, I ve more or less developed the necessary scripts to migrate a simple service company from Ledger SMB to Open ERP. There are limitations of course, but if this would be useful to you, drop me a line.
There s a lot of responsibility on the shoulders of system administrators. Unless you re one, it s probably hard to grasp the full weight of it. This week has been full of reminders for me.
This afternoon, shortly after lunch, I got word that people were having trouble with phones. A few minutes of testing showed that calls within our city were working fine, but it was completely impossible to place or receive long-distance calls. A little while later, a local newspaper s website indicated that numerous cities over a multi-county region, all served by the CenturyLink local telephone company, were out of service in this manner. I figure that represents hundreds of square miles, or a patch of rural Kansas roughly the size of Los Angeles.
Adding to the problem was the fact that emergency 911 services are accessed via these long-distance lines that were down. For roughly three hours, 911 was completely down across this entire area. What s more, many cellphone towers and Internet access options were also taken down, since they feed from these same lines.
This adds up to a situation that could very easily cost lives due to delayed response of emergency medical, fire, or police services.
In the end, the problem was traced to a bad controller card on a Titan 5500 owned by AT&T.
Now, here s the system administration angle: If you worked for the phone company and had to troubleshoot a problem that you knew had taken down emergency services for thousands of people, what kind of pressure would you be feeling? Would you be able to keep your cool? I m glad that I don t have that kind of job.
I also wouldn t like to be the engineer (or, more likely, accountant) that decided that they didn t need any more redundancy to provide good service to the area. Especially considering this is the second time in the last year or two this has happened.
But, ironically, yesterday I signed a purchase order for a new Asterisk PBX (corporate phone) server. When selecting a machine for that task, I am always completely conscious of the responsibility on my shoulders: several hundred employees rely on the machine that is ultimately my responsibility to select. Our own access to 911 would be cut if the machine were to go down. I never forget that the correct operation of the systems that our team sets up and deploys could help save someone s life, and that a malfunction could cost the company dearly in terms of revenue, productivity, image or worse.
Nearly four years ago, we switched from an analog PBX, with outsourced support, to a digital VOIP system running Asterisk. Note that we use VOIP in-house, but do not use it externally. Anyhow, I can not say that the Asterisk PBX has been 100% perfect; I doubt that this could be honestly said of any PBX of any complexity.
I can say, though, that it saved us well over $100,000 AND has proven far more reliable than the system it replaced. Outages are exceptionally rare and brief now. Plus we have internal expertise to fix it, rather than having to wait for a technician to be dispatched from a city 2 hours away to fix anything. I know I don t have the resources to build a perfect PBX that will never go down (if such a thing is even possible), but I take my responsibility regarding a reliable PBX extremely seriously.
We used to have a frequent problem: someone would call 911, then hang up. We suspected this was often on accident maybe people hit 9 for an outside line, then misdialed their number. In any case, 911 dispatch would then call our main office, saying they got a hangup. A person or team would then go across our entire campus making sure nobody was in distress that nobody had managed to dial, then passed out, for instance.
With Asterisk, I was able to help this situation. Whenever somebody calls 911 now, two emails are generated: the first contains details about the call, such as the extension number that called and the duration of the call. This goes to all people that are likely to receive a callback from 911. It may not always pinpoint the source (as with somebody using a wireless phone), but almost every time will give us a very good idea where the call came from. The second email is a recording of the call, and serves as an additional clue, but goes to fewer people.
I am aware that email isn t a perfect medium, but: it let us make a dramatic (albeit imperfect) solution to a problem that very few institutions our size are able to address nearly so well.
There s a lot of weight on our shoulders: keeping the accounting system up, the Internet links up, the web store or the sales phone lines, the shipping systems or the document archives up. These things going down can spell deep trouble in many ways.
And sometimes the systems we maintain might save a life. Such as this morning, when someone was feeling symptoms of a heart attack, used our phones to call a colleague for help, that person called 911, and an ambulance was dispatched. I know the system worked exactly as it should, because I had two familiar emails from Asterisk in my mailbox this morning when I got to work.
Magnus Larsson gave an interesting TED talk about using bacteria to transform dunes into architecture [1]. The concept of making a wall across Africa to stop sand dunes from overtaking farm land is obviously a good one, the idea of using bacteria to convert sand into sandstone to do so cheaply is also good. But making that into houses seems a little risky. I wouldn t want to live under shifting sand with only bacteria generated sandstone to protect me.
Cory Doctorow gave an interesting speech titled How to Destroy the Book , here is the transcript [2]. He talks about how much he loves books and described his opposition to the DRM people who want to destroy the book culture.
Sendmail has a DKIM Wizard for generating ADSP (Domain Signing Policy) records [3]. If I knew that ADSP records were so easy to implement then I would have used them a year ago!
Loretta Napoleoni gave an insightful TED talk about the economics of terrorism [4]. Apparently the US dollar used to be THE currency for international crime, when the PATRIOT act was passed it s anti-money-laundering provisions encouraged many shady people to invest in Euros instead and thus led to the devaluation of the US currency. It s also interesting to note that terrorist organisations are driven by economics, if only we could prevent them from making money
Ryan Lobo gave an interesting TED talk about his photographic work [5]. The effectiveness of the all-women peace-keeping force is noteworthy. The part about the Liberian war criminal who has become an evangelical Christian and who now tours Liberia begging forgiveness from his victims (and their relatives in the case of the people he murdered). Should someone like that be permitted to remain free if his victims forgive him?
Charles Stross has an appealing vision for how Apple and Google can destroy the current mobile telephony market [6]. I can t wait for the mobile phone market to be entirely replaced by mobile VOIP devices!
James Geary gave an interesting TED talk about metaphors [7]. The benefits of metaphors in poetry are well known (particularly in lyrics), but the impact of metaphors in influencing stock market predictions surprised me.
Shaffi Mather gave an interesting TED talk about his company that makes money from fighting corruption [8]. Instead of paying a bribe you can pay his company to force the official(s) in question to do the right thing. Apparently the cost of doing so tends to be less than 10% the cost of the bribe if you know what you are doing. His previous company was an ambulance service that charges what the patient can afford is also interesting.
John Robb wrote an interesting article about lottery winners and griefers [9]. He suggests that publishing the names, addresses, etc of rich people will be a new trend in
Griefing. One thing I ve been wondering about is the value of the HR database at a typical corporation. A single database typically contains the home addresses, phone numbers, and salaries of all the employees. It would be very easy to do an SQL dump and store it on a USB flash device to carry out of the office. Then it could be sold to the highest bidder. They could probably make a market in the private data about rich people in the same way that there is currently a market for credit card data maybe they have already done this but it s kept quiet to stop others from implementing the same idea.
Michael Smith wrote an interesting article for the Washington Times about home schooling and socialisation [10]. It seems that people who were home schooled as children tend to be more academically successful and involved in civic life as well as being happier and having career success.
Richard Seager wrote an interesting article for American Scientist about ocean currents and heat transfer from the tropics [11]. It seems that when the ocean currents shut down the UK and other parts of northern Europe won t be getting a mini ice-age.
Ian Lance Taylor (most known for the gold linker) has written a good summary of the situation in regard to climate change and what must be done about it [12].
The Wrath of the Killdozer article about how one angry man converted a bulldozer into a tank [13]. This wasn t a big bulldozer (every mining company has bigger ones) and he didn t have any serious weapons (only rifles). Imagine what terrorists could do if they started with a mining vehicle and serious weapons
Simon Singh has written about being sued for libel by the British Chiropractic Association [14]. The BCA didn t like his article criticising chiropractors for claiming to be able to treat many conditions unrelated to the spine. Remember, chiropractors are not doctors all they can do is alleviate some back problems. See a GP if you have any medical condition that doesn t involve a sore back or neck. Avoid uppity chiropracters who claim to be able to cure all ills.
Nicholas D. Kristof wrote an interesting article for the New York times about how happy the people in Costa Rica are [15]. He claims that the Costa Rican government s decision in 1949 to dissolve it s armed forces and invest the money in education is the root cause of the happy population. Maybe if the US government would scale back military spending the US population could be as happy as the Costa Ricans. While there are good arguments for having some sort of military, there are no good arguments for spending more money on the military than the rest of the world combined (as the US does).
NZZ Folio, the monthly that comes with my newspaper, had this topic in its January edition, sparking a few thoughts about capital punishment.
Why am I against capital punishment? Primarily, because no justice system will ever be safe (make no mistakes, know no abuse.) Then there is the fact that life is something special and isn't ours to take away, but on the other hand, we assume that it's ok for us to judge that somebody should be locked in the rest of his life, and I'm not quite sure how big that difference is.
Ok, I one thought. Everything else I was going to write was just technical stuff on the execution of death penalty, which I have established I'm against. This engineer's brain can't stop thinking yes but what if ...

Having stupidly, and very painfully, ruptured a ligament in my foot (while getting off a bus. Not drunk, no sports whatsoever.) I was less mobile than I wished to be and could finally make some time to watch
Nikita by Luc Besson (I've not seen much he was involved in;
L on was one of the exceptions which I like very much. I've got the DVD of
The Fifth Element right here, so no need to chastise me that I haven't seen that one yet.)
But back to Nikita: you
may know that I like strange movies for some values of strange. Nikita obediently starts off in a very dark mood. And then suddenly turns into quite a normal secret service thriller with a romance element. I liked both parts of the movie very much, but it took me a bit by surprise at first.
I also like fun stuff, and so I've watched my first three episodes (9 to 11) of
Kottan ermittelt, wonderfully silly Austrian whodunnits from the late 70s/early 80s. If you don't speak german (and understand it well, even I have difficulties understanding some of the Viennese dialect), you just don't know what you're missing. Or if it is translated (don't know): probably like watching
Bienvenue chez les Ch'tis in German. Which I did, because my french is not that good, but I'll have to watch it again en fran ais, just to get the Authentic Expierence of this wonderful movie.
Update: Speaking of a foot, and of movies: I don't think I've mentioned
My Left Foot on my blog so far. The biography of Christy Brown, a cripple who grows up in a poor Irish working class family to finally become a famous artist. I found it just a bit corny (hmm. Not sure if that's the right word here, shows up for kitsch in any case), but still very impressive.
- GPG key, better late than never
Thanks to go to ana for her howto.
- linux.conf.au, I hear awesome folks are going to be there!
- battery, sucks to be at a conference with a crap laptop battery
- regret, using and working on non-free software is driving me insane
- hope, to meet Debian folks in Thailand again and eat Thai food
- want, to escape the internets for the sea and local wilderness
- wish, that there was more time in a decade, year and day
Thanks to all the Debian, FLOSS and Indymedia folks out there, you've made the last decade much more enjoyable.
I have direct knowledge (through observation or first-hand reports) of the following use cases for Netbooks:
- System administrator s emergency workstation something light to carry when you might get an SMS about a problem.
- A really small laptop for a serious technical user, can be used for programming and other serious tasks. Only someone who is really dedicated to the hobby of computing would choose a system with a tiny screen for their main computer so that they can take it everywhere.
- A computer for a child. Children are less demanding about some aspects of their computer experience, no-one wants to buy a really expensive toy for a young child, and children find it difficult to carry full size laptops.
1 and 2 are the options that interest me. But it would be good if the extensive children s toy market could drive economies of scale and reduce the expenses of my hobby and profession. I have found my EeePC 701 to provide adequate CPU performance (Celeron-M 630MHz) for light compiling tasks and I have used it for some Debian development work. The SSD that is built in is very fast and OpenOffice load times compare well to my Thinkpad T41p because of it.
The main problems I have with my EeePC for sysadmin and coding tasks are the small keyboard (which can t be fixed the overall size of the machine needs to remain small), the small screen (which could be expanded without changing the case size), the low resolution screen (which has been fixed in newer netbooks), and the fact that my 3G dongle sticks out and is likely to get broken. More recent Netbooks address these issues while having the trade-off of being heavier and larger.
There are also some tasks which are generally not performed on a Netbook but that could be if it was properly designed. Here are some examples of things that I think should be done on a Netbook:
- Basic image editing and blogging something that a lot of people do on smart-phones nowadays. It can be done more effectively and with less effort on a general purpose computer I can t imagine the GIMP or Inkscape running on a smart-phone.
- Reading electronic books. The number of people who want a Netbook but don t want to read electronic books would be quite small as would the number of people who only want to read electronic books and never want to use a general purpose computer while travelling. No-one really wants to carry both a Netbook and an ebook reader at the same time.
- Watching movies.
- Everything that you might want to do on a terminal in an Internet cafe those machines are always 0wned, just say no for security reasons.
- Games. The Nintendo DS has two ARM CPUs running at 66MHz and 33MHz and a combined screen resolution of 256*384*18bpp [1] and the Sony PSP has a 333MHz MIPS R4000 CPU and a screen resolution of 480*272*24bpp [2]. The original EeePC had more CPU power and more screen resolution than the DS and the PSP so it IS suitable for games even though it won t run the latest 3D games. There are lots of great games like Wesnoth that don t require much video performance.
- Educational Software. Portable educational devices include the awful V.smile system for young children [3] and the educational software for the DS (I ve seen a demonstration of a training program in rapid completion of basic maths problems for elderly people and presume it s not the only educational software on that platform).
Image editing requires a color screen of high resolution. Effective blogging requires a platform with a resolution that compares to the typical web user
according to Hitslink 1024*768 is the most popular resolution of web browsing systems at 28.34% and the most popular resolution that is less than 1024*768 is 800*600 at 3.28% [4]. So even the most casual blogger will have an incentive to get a screen that is of higher resolution than all but the latest Netbooks.
The recently released EeePC 1201 has a screen resolution of 1366*768 which should be barely adequate for those tasks.
Reading electronic books requires a reasonable resolution. Based on my experience with the 1400*1050 display in my Thinkpad it seems that a resolution of 1366*768 would be barely adequate for reading an academic paper that has two columns in a small font. But as the original Kindle had a resolution of 600*800 and the latest Kindle has a resolution of 824*1200 [5] it seems that perhaps the epaper displays are good enough to allow reading the text at a lower resolution. A display that can draw little or no power when idling (as epaper does) is simply required for an ebook.
The Pixel-Qi hybrid displays are claimed to offer the best features of TFT and epaper displays [6] but they haven t been released yet. I think it s reasonable to assume that someone will achieve that Pixel-Qi is attempting and that it will become the standard display for a Netbook.
Watching movies and playing games (even games like Wesnoth) requires better video performance than epaper can deliver, we just have to hope that Pixel-Qi release something soon.
Watching movies and reading ebooks are both things that are best done without a keyboard in the way.
The Always Innovating Touch Book [7] seems like a good solution to this problem. It s a tablet PC that can be connected to a keyboard base if/when you desire. It should also be good for web browsing and reading email while on the move, I find that my EeePC is unreasonably heavy and awkward for typing email while walking.
Intel CPUs are not particularly energy efficient. As there are ARM CPUs with clock speeds as high as 2GHz and with as many as four CPU cores it seems that the ARM architecture can provide as much CPU power as is required. Debian currently supports two versions of the ARM CPU, if another one became commonly used it wouldn t be that difficult to run Debian build servers for it.
Given a screen resolution equal to the latest Kindle, CPU power greater than the early Netbooks, and the ability to run a free software OS the range of educational and gaming software should be adequate.
So it seems that the ideal netbook would have a detachable keyboard and base and a touch-screen in the computer part. It would have a Pixel-Qi display (or equivalent) with a resolution of 1400*1050 or better. It would have USB, Gig-E, Wifi, and Bluetooth connectivity and the ability to have an internally mounted USB dongle (as the Always Innovating Touch Book does). I think that this is not overly difficult to achieve it is basically an Always Innovating system with a better display.
Update: Another criteria is the ability to start operating quickly when requested. Even mobile phones are often limited in their utility by the time that is taken to activate them (I can t get my mobile phone to take a photo in much less than 7 seconds after removing it from my pocket). The Always Innovating system is apparently always in suspend to RAM mode when it s not being used so that it can start quickly. That combined with fast application load times and a good menu system could allow turning the system on and launching an application in less than 2 seconds.
If I was buying a Netbook right now the only thing that would stop me from buying an Always Innovating device is the shipping delay. But as my EeePC is working quite well I m not going to buy another system unless I am going to get significant benefits such as a high resolution PixelQi display.

I keep almost all of my notes and to-do lists in plain text files, so I can
edit and search them with Vim, grep, and other standard Unix tools. I often
indent lines in these files to create a simple outline structure, and use the
autoindent and
foldmethod=indent options to make Vim into a simple
outliner.
To get useful output when searching through these outline-structured files, I
wrote a simple grep replacement. Given a text file with a Python-style
indentation structure,
ogrep searches the file for a regular expression. It
prints matching lines, with their "parent" lines as context. For example, if
input.txt looks like this:
2009-01-01
New Year's Day!
No work today.
Visit with family.
2009-01-02
Grocery store and library.
2009-01-03
Stay home.
2009-01-04
Back to work.
Remember to set an alarm.
then
ogrep work input.txt will produce the following output:
2009-01-01
New Year's Day!
No work today.
2009-01-04
Back to work...
You can download ogrep from the
outline-grep repository on GitHub, or
just read the
literate Haskell file. The code is almost trivial (40
lines of code, plus imports and comments); I'm publishing it just in case
anyone else has a use for it, and because some of my friends were curious
about how I'm using Haskell. I've now written a few "real-world" Haskell
programs (
compleat was the first). I'm finding Haskell very well suited
to such programs, though this particular one would be equally easy in a
language like Perl, Python, or Ruby.
This is a one-off tool to fill a gap in my workflow; there are no
configuration options or useful error messages. It would be fairly easy to
extend it, though. For example, it might be handy to have an option
to include children (as well as parents) of matching lines. I recently
realized that ogrep often works for searching through source code too, which
might generate some more unexpected use cases.

Not even two weeks after the
Rcpp 0.7.1 release,
Romain and I have a new one
to present:
Rcpp 0.7.2.
It has been uploaded to
CRAN and
Debian, and the respective package
management systems should carry them around in the next few hours. As always,
the
local page is
also available for download too.
A lot of the momentum for the new API is continuing, thanks in large part to
Romain. A number of new
classes have been added, and existing ones have been enhanced. There are more unit
tests than ever, and more documentation. We have better build support (with g++
version detection so that we can add some
C++0x support where available) and a new
examples sub-directory.
We did take one toy away, though.
The
Doxygen-generated docs were getting so big
that we decided to keep them out of the source tarball. (And arguably, they
are also too volatile.) We still have
the browseable html docs
as well as the
pdf version (now at over 300 pages!).
And we added zip archives of the docs in
html,
latex, and
man format for download.
As always, full details are in the ChangeLog on the
Rcpp page.
Questions, comments etc: bring them to the
rcpp-devel mailing list
off the
R-Forge page
Although I obviously had nothing to do with
Google s decision vis-a-vis China, having only started working there for a week, I was definitely glad to see it and it made me proud to be able to say that I work there. Kudos to Google s management team for having made (IMHO) the right decision. Hopefully Yahoo and Microsoft will consider carefully what the ethical implications of their collusion and collaboration with the Chinese government s attempt to control free speech and the human rights implications of the same.
I have my own opinion regarding the
IETF s decision to meet in Beijing, since as we ve seen with the Search Engine industry s attempt to accommodate the Chinese, engagement doesn t necessarily always lead to openness and goodness. All I can suggest is that those people who do decide to travel to that meeting be very careful about what sort of message they want to send with respect to China, as well as being very careful about protecting themselves against targetted information security attacks.
No related posts.

Although I obviously had nothing to do with
Google s decision vis-a-vis China, having only started working there for a week, I was definitely glad to see it and it made me proud to be able to say that I work there. Kudos to Google s management team for having made (IMHO) the right decision. Hopefully Yahoo and Microsoft will consider carefully what the ethical implications of their collusion and collaboration with the Chinese government s attempt to control free speech and the human rights implications of the same.
I have my own opinion regarding the
IETF s decision to meet in Beijing, since as we ve seen with the Search Engine industry s attempt to accommodate the Chinese, engagement doesn t necessarily always lead to openness and goodness. All I can suggest is that those people who do decide to travel to that meeting be very careful about what sort of message they want to send with respect to China, as well as being very careful about protecting themselves against targetted information security attacks.
No related posts.

I've long been a fan of
Danga's Memcached, back in 2005 I
wrote about it for the first time.
Recently I've been looking at the persistant version,
memcachedb which is essentially a Berkeley Database using the memcached protocol as the transport layer. This allows you to get persistance for free, and means you can rely upon the content being present, rather than just hoping it will be there as an opportunistic cache.
However in this brave new world of
nosql I've been mulling over different options for new projects / new toys. I have to say that memcachedb lost out for me, and that
Redis is my preferred flavour of new hot.
Redis has a rich API allowing you to store interesting datatypes such as lists, and it allows both replication and distribution (neither of which I need just yet, but both are useful to have as options for the future).
The documentation is great
including a well-documented Twitter clone, and the facilities that are available are a step up from memcached, albeit obvious extensions which you'd expect if you were doing interesting things.
The
redis-server package is already part of Debian GNU/Linux, and creating
.deb package of
the Redis module was trivial.
So now that I'm familiar with it, what to use it for? Well I think the first thing will be the new 2010 Valentines site.
Over the years I've hosted several Livejournal Valentine sites, and this year is no different. (Why? I like matching people, and I like social stuff. This is why I did ctrl-alt-delete in the past, even if that failed it was a great learning experience and I'd do it again if I had the time/patience/more optimism).
So far the site only has a couple of users but I fully expect it to ramp up considerably before the magical day (ha!). In the past I've limited the lifetime of the site(s) from Feb 1st to Feb 14th and still managed to achieve 5000+ users. Right now I'm using flat files for storage specifically to avoid database-load issues (which caused me considerable pain one year).
I suspect the backend will be Redis-based in the very very near future, but in the meantime if you're open to amusement and use Livejournal then feel free to poke at it:
ljvalentine.com.
ObFilm: Indiana Jones and the Temple of Doom
I read The Iliad recently; see
my review of it here.
This article isn t about The Iliad, but about Shmoop s coverage of it.
I have never been a person who puts much stock on study guides before, and my own prejudice is that they have probably earned their reputation as useful for little more than a tool to help students pass exams without reading the material. However, I felt rather unequal to reading The Iliad; after all, it has been many years since I had been exposed to Greek mythology, and even then it was very brief. I had remembered from Amazon s blog that they are offering some of the classics with a Shmoop study guide built in. I figured the $2.39 would be worth it. But I m not sure it was.
The
resulting ebook has two sections: the main text, and the Shmoop overview. The overview contains essentially the information available for free on their site. This information is pretty good. It has some overviews of the entire book, plus summaries of each chapter. They helpfully provide the backstory in the chapter summaries, so I know why certain gods are on the side of the Trojans and the others on the side of the Achaeans. It helped me figure out the point to some of the actions described on the text. These are linked to at the beginning of each book (chapter) of the Iliad, which was a bit inconvenient because I prefer to read them after reading the main text. Nevertheless, it wasn t a big problem.
The summaries were written colloquially, sometimes too much so. I grinned as the less grabbin , more stabbin summary of the Achaeans being told to salvage armor from the dead later and keep fighting now. I cringed as no way Jose , and rolled my eyes as it described how one of the heroes got owned . That would have been less clear than the original for many.
I would probably have given the Shmoop edition 4 or 5 stars on Amazon were it not for numerous boneheaded mistakes they made.
The commentary uses one translation (Lattimore), while the included text uses a different one (Butler). That s bad enough, but it gets worse: Lattimore uses the Greek names for the gods and heroes, while Butler uses the Roman ones. So you can be reading through the text, learning about Jove, Ulysses, Juno, and Mars. But the commentary refers instead to Zeus, Odysseus, Hera, and Ares. Now, some might have memorized the Greek and Roman names for everyone, but then such people probably aren t wanting a study guide. I finally had to print out a page to help me understand the study guide. That is terrible, and completely inexcusable. They should have used the same translation for the text as the commentary, or at least have provided parenthetical notes throughout the commentary.
Next, they really did a poor job of the main text itself. They have apparently grabbed the Butler ASCII text from Project Gutenberg, and cut and pasted it into some editor. I say this because each line renders as a paragraph; that is, the text doesn t reflow to fit the screen as every single other book does. Worse, it s too wide for the Kindle. So you get one line full width, the next only half as wide as the display (some of the first having wrapped), then the next full width again, on down. Butler is a prose, not a poetic, translation, so this is pointless. Moreover, the line endings are exactly where they are at Project Gutenberg.
So, what we have here is that somebody at Shmoop cut and pasted from their own website and Project Gutenberg, and nobody bothered to check if the resulting product was crap. At least with the new Kindle firmware you can read in landscape mode to prevent most of the lines from wrapping. Still, I m very annoyed at this.
There are other flaws. They highlighted some passages in the text. Clicking on them goes to some commentary about it. OK, fine. But why are some passages highlighted in the text, and some mentioned in the chapter summary? There seemed no rhyme or reason. The highlighted passages commentary was iffy in quality. Sometimes it was useful, and sometimes it asked a question of the sort I might expect in a jr. high English question When has pride helped you in your life? or some such. Worse, not all of the highlights linked to the correct place, and they also suffered from the Greek/Roman name issue.
In all, Shmoop has helped me understand The Iliad and place it in context. But they need to spend a lot more effort on copyediting. Even a couple of hours of someone actually looking at their Kindle product on an actual Kindle would have immediately shown these problems. They could have made a far better product with a few hours more effort.