Posts

Showing posts from January, 2009

Trivial calculation related to computer displays (core version)

Here's the core of the other version. I made something similar at first (except that it used zip ++). I have subsequently upgraded it to an ever neater form, but this does essentially the same. Read this one if you are short on time! ;-) #!/usr/bin/runhugs -- Calculates basic LCD monitor parameters from diagonals. -- -- Copyright (c) bkil, 2009 -- License: GNU GPL v2 (or later), see the -- attached gpl-2.0.txt for details. -- --Changelog: -- 2009.01.20 v0.0 first release -- 2009.01.22 v0.1 refactoring: cleanup, typo in comments -- 2009.01.29 v0.2 refactoring: friendlier names, Html type -- 2009.01.30 v0.2.1 messy version -- --the routine that calculates all the parameters -- input: diagonal, horizontal pixels, vertical pixels -- getparams :: Float -> Int -> Int -> String getparams diag_inch xi yi = show diag_inch ++ "in; " ++ show a ++ ":" ++ show b ++ "; " ++ show xi ++ "px; " ++ show yi ++ "px; " ++ show dotpitch ++

A hierarchical to-reply list embedded in E-mail

There's a nice feature in most software unit testers: branch checking (in short: it's a hierarchical to-do list). I'll elaborate on what I mean. You need to check every path of execution of program branches (including nested ones). The program segments that contain paths that are yet unchecked are marked with a cross and are highlighted (usually with a color like red). After you are finished checking some paths of execution, those parts of the program source that are fully tested are given a tick and are highlighted (usually with different color). We would need a feature like this in our E-mail clients! It would sure help some of the people I exchange mails with. You see, there exist peers who are notorious of forgetting to reply to parts of (my) messages - often the most informative parts! I usually follow this up by kindly asking them to give an answer or give the answer of not telling. They often reply that they simply forgot to answer, or that they had an impression of

Trivial calculation related to computer displays v0.3.1

Here's a simple program I wrote to aid in comparing basic data about standard computer displays. Enjoy! I will upload it to it's regular place later, but I need a bit more time than usual this time. Edited to version v0.3.1 on 2010.04.07 -- Calculates basic LCD monitor parameters from diagonals. -- -- Copyright (c) bkil, 2009 -- License: GNU GPL v2 (or later), see the --  attached gpl-2.0.txt for details. -- --Changelog: -- 2009.01.20 v0.0 first release -- 2009.01.22 v0.1 refactoring: cleanup, typo in comments -- 2009.01.29 v0.2 refactoring: friendlier names, Html type -- 2009.02.04 v0.3 refactoring: tidied comments, improved formatting, --            fixed a few names (CamelCase), used html more -- 2010.04.07 v0.3.1 DPI, EEE, widescreens added -- --HTML substring type newtype HtmlChar = HtmlChar Char type Html = [HtmlChar] instance Show HtmlChar where          show (HtmlChar ch) = [ch] showHtml :: Html -> String showHtml = concat . map show --does conversion with simple HT

The Evolution of a Haskell Programmer

The original one was a bit lame, but this one sure kicks ass (and demonstrates a lot of neat things you can do in this language): http://www.willamette.edu/~fruehr/haskell/evolution.html The Evolution of a Haskell Programmer

One and two handed keyboard layouts

Do you consider intervened keyboard and mouse use ergonomic on your PC? I bet I could give you an exercise that could kill the nerve of one with a two-handed layout! Note that the original designers of the computer mouse and the first graphical user interfaces (that we still mindlessly clone) also had to decide how users ought to handle the two-handed keyboard and the single handed mouse at the same time. They had to choose between either letting the user touch-type two-handed and occasionally withdraw to position the cursor with the mouse, or instructing to use a single-handed keyboard layout that frees the other hand for positioning tasks. They have chosen the former. While it does have its use cases, I don't completely agree with it's dominance. It is pretty versatile, but there may exists scenarios where it would be advantageous to keep one hand on the keyboard and the other on the mouse. Compared to the default method, this one is more ergonomic in applications where you n

A character font that resembles Morse code?

While refreshing my Morse code skills, the following came to my mind. It would be nice to have an on-screen character font that spells out Morse! :) I recall encountering something similar before, but I haven't tried it out yet. It can come in very handy when you need to chat or write messages in the presence of nosy co-workers and the like. Unfortunately, I can't seem to be able to find it at the moment. If you have any information on the topic please post a comment! If all fails, I may draw one myself... You can also comment if you have any tips about that. http://en.wikibooks.org/wiki/Guide_to_X11/Fonts a good start

Providing E-mail reliability with addendum #1

We need mail client software support for the following. Make it automatically prepend a few identifier characters and a (decimal) sequence number to the subject line of outbound messages. The sequence number would get incremented, and could perhaps wrap around. In case of replying to a similarly formatted message, the mailer could also send back the highest number up until all mail have been successfully received from the given sender. The MUA could automatically resend the lost messages. These measures would ensure reliability - just like how they do it in TCP! I know you could easily implement this in Emacs, but I would like to see this in some more mainstream mail user agents. Add 1: Of course we could also create a new header field for this purpose. Also note that this method could replace message disposition notification in almost all cases. RFC?

new key from 2009 addendum #1

-----BEGIN PGP SIGNED MESSAGE----- ######################################################## # # The text of this message was stamped by # stamper.itconsult.co.uk with reference 0542767 # at 11:20 (GMT) on Sunday 11 January 2009 # # For information about the Stamper service see # http://www.itconsult.co.uk/stamper.htm # ######################################################## - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I hereby claim that the following key belonged to me until yesterday: - - -----BEGIN PGP PUBLIC KEY BLOCK----- Version: PGP Universal 2.6.0 mQGiBEdyyDkRBADX1YkFztpdhQ14ypq2gu6L6D2POXZn5cBikVBGvmiE8nkQiEBQ ONcnF/u+2EEBSXPjFCuQPwJ1jIg68aNqv+mC20gOX1hFARKqASe8PqlRMViPzzwP mTZc/JZvOTdboMirY0TdLNu/OZXLWkMrd7wsOgdMibqvsySvbLLQUeNJOwCg78RG I+9bvYXbiBz5O2R0qD/G4dcD/jXVnYkk36Lt8e4PU23+iDHGPbnjg6X8V+XTtgz5 PP1FxfzKLwCIN+Ouv3LbReLnAGc7EuvHnvRirwZ4Wx9duxUUZZfc3PQrpKVw0Pfu ZMZD6PB1cjxDJs1+sSuFv7sXPJZHgX//l/lkPKPpeVgrJAnKTPEDYxy5CvSo0khd kwepBACMvv9F3ewOd++8YOQy5cyWvRWO5bBSZ

new key from 2009

-----BEGIN PGP SIGNED MESSAGE----- ######################################################## # # The text of this message was stamped by # stamper.itconsult.co.uk with reference 0542661 # at 17:10 (GMT) on Saturday 10 January 2009 # # For information about the Stamper service see # http://www.itconsult.co.uk/stamper.htm # ######################################################## - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I hereby claim that the following key belongs to me from now on: - - -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v2.0.9 (GNU/Linux) mQGiBElow3QRBACtqKMulVx3zv6IR0lP9lGC/dbOt6BkbBrwDtpfXoGADf9Kgohy T1BOADhNpnkPnTfTp6YnJSNEAiJ6UjfYhOY0i5Q9aFoWQKqHNxUDBEZ26mqspcp0 guQ97mWdRhAUDC/Mkzm9Fl+sxUhsxSaWle8TUlHBJ8F8SiFFx7M8jzh7KwCg/zd3 Og0zr575sIL73WgpsZDj+DsD/jXfMCU3ZKzRNdxIvQs4KFXwnbtfxNg2/7Qgfu3C Q7MvYi28JrBeUgXp8QeYOTKawyYhkY3gofi8RNSH38KjJ9Sp7x/YtPDtbRvfJ49T /I6nZGKSXZaACw0MDt5qOk2HIM44i33qGMrwVICWfSMlq/pLsr//XwRU7y3OzriW 4hnnBACAM8OpI4LnMVyvcdBvosRXJV4ZPLp

Static mirroring this blog on my final homepage

I am considering to mirror a statically generated version of this blog on my homepage. The reason is that some countries and many employers have unconditional blocks on the whole blogspot domain. I also plan to relocate my previous "new" homepage to my "final" homepage in a week or so.

The "linux" tag in my blog

Please don't be intimidated by the fact that I always tag my articles with "linux". This is not snob ignorance and I don't mean to ignore or belittle any other operating system. I can't come up with a tag that is both fair *and* remotely understandable by humans! :) As of 2008, I think "the Linux operating system" (yeah, I'm on your side in the argument for distributions and the */GNU marking! :-D) does ring a bell in some heads. After Minix$N has gained world domination, I will adjust my tags accordingly. I have considered trying some other tags, like: oss-os, libre-os, gnu-os, posix-os, unix, unix-like, bsd-os, darwin, plan9, inferno, opensolaris, minix3, haiku, ... In short, if I write something related to the Linux kernel, I will use the tag "linux kernel". Otherwise when I use the tag "linux", I refer to any free open source software operating system.

Protecting your E-mail address from spam bots

Common wisdom helps you achieve that: never publishing your contact information in a trivially machine readable form (e.g. writing it out in the clear at the top of your site, by the way: click here to see my E-mail address book ) and avoid getting into circumstances that can transitively result in the former case. I, however, can give you some more advanced advice. Create accounts with names that are randomly generated and are at least 8 character long each. Don't let your more valuable addresses get into other people's address books, because malware can easily harvest it from there. If only one in a hundred will get infected, your address is breached for good. So you mustn't give away all of your addresses to everybody. Don't hesitate to change your address if you receive spam: your digital signature can identify you regardless of location. In fact, only your digital signature can identify you, and the address a given message has been sent from is irrelevant, bec

Happy new year + infelte account

Happy new year, you all! Don't forget that I'm phasing off my account at infelte, so do choose another destination for your messages.

Shopping delivery system using bikes

I'm pondering if it would be feasible to start a subscription based, regular scheduled shopping delivery system with bikes. Viability summary follows. Reduced vehicle purchase and operating costs help make pricing competitive. The slower top speed is not an issue because of both the scheduled manner of delivery, and because driving is mostly composed of short sections, given a reasonable number of subscribers in each region. An online shopping application could serve the customers. Registration would be possible only in person and at the shipping address. The application would need to provide a calendar for setting shipping time, and a product catalog that contains photos and basic data of each product - like size and weight. Handling of orders, generating the shopping lists and optimizing the allocation of drivers would also happen automatically. To be continued...

Light cargo towing system using bikes

I'm pondering if it would be feasible to start an on-demand light cargo delivery system with bikes. You probably already have heard of on-demand small package delivery services offered in many cities that also use bikes. The proposed difference is offering transport for goods that are overweight or oversized for the prior solutions. The key aspect would be using heavy-duty bike trailers. Speed and driver comfort could be greatly improved by equipping the vehicles with regenerative braking. and perhaps with an aerodynamically-enhanced fairing for both the bikes and the trailers. The limits imposed on the load would be about a weight of 80kg and the dimensions of small furniture. Viability summary follows. Reduced vehicle purchase and operating costs help make pricing competitive. The slower top speed is not a big issue to the customers because of both the low average speeds attainable in heavily populated areas, and because of the competitive pricing. It is not an issue to the opera