Posts

Showing posts with the label me

Unintentionally formatting your system drive is a bad idea

One day, I was playing with a chroot jail. This whole incident has taken place some months ago. I wanted to test if I could install software from user mode because my apt-get was doing a system update. Well, building from source via "apt-get -b source" would have also solved the issue, though dependency handling in this case is not automatic if I understand correctly. In order for this process to take as little overhead as possible, I wanted to simulate a manual copy-on-write filesystem by creating links to the parts that are common with my root system, and recreating directories which are partially different. I first tried to use symbolic links, but I had to realize that relative links that point outside the sandbox were dysfunctional. Hence I made a hardlink for my root in the chroot. Well, it was a read-only bind-mount to be more exact. Note that I did succeed previously with a different system and kernel (Gentoo 2005.x) by using symbolic links, that's why I gave it a...

A little background information about this blog

I write almost all articles and text on my Ericsson MC218 when I'm traveling and have nothing better to do. Note that I can touch type almost as fast on my mini-Dvorak as on my full-sized one, so this is by no means a limitation (>55WPM)! :-) When I get home, I upload them to my PC, covert them with a simple script of mine, proof-read them and run a second pass of spell checking. I then put them in a waiting queue based on completion ratio and importance, sometimes doing a bit splitting at the same time. Once in a while, I take one from the top of the stack and publish it. Hence for me, there's no such thing as lack of time or inspiration! :-D

POLL: How do you use this site; posts you check

Note that checking multiple options is allowed in both polls. I forgot to post an entry about it, but one of my most die-hard readers has already noticed! Actually, I think the majority of my readers have already voted... XD The low readership is expected because of many issues with the articles, like the abstract, specialized, mostly time-invariant knowledge and language. I believe that to reach as far as possible, especially of such narrow-scope material, you need to write in a suitable language. Toki Pona and Lojban would have been my second choice... ;-D

Design a minimalistic font with grave discrepancy

My plan is to experiment with (monochromatic-) font designs. They would need to have a one-to-one correspondence with the Latin alphabet and Hindu-Arabic numerals. The object is to provide better clarity than the best possible with standard fonts. I will start investigating numerals first. It is a bonus if some symbols would resemble standard ones.

NEWS: summa v0.1, links

I have done minor refactoring on "summa.erl": abstracted seq/2 and reorganized maps into list comprehension. Added links related to the firearm debate. Fixed some small distro related ones.

NEWS: ASCII v0.1.2, SI v0.1, working on bikes

I put some of my new drawings in the collection, so enjoy! As I use the SI measure converter regularly, I have enhanced it's interface with the common function "convert". For example si:convert( 40,psi, bar) converts 40 psis into bars, or si:convert( 15,mph, kph) converts from miles per hour into kilometers per hour. si:convert(mph,kph) gives the scalar factor (1.6). Complex measures also work as usual, so you can query si:convert( {u,314,[ft,ft,lb],[s,s]}, {u,1,[n,m],[]} ). A bicycle related post or two is in the works. They're almost ready to be more exact.

Simple container fitting checker for a fridge in Psion OPL

I have finally uploaded my nice OPL program that I used with the fridge mentioned. It can be found at my scripts , in the repo! Direct link: >> fridge.opl << It might happen that some more small programs of mine will follow.

Haskell is not the Holy Grail of programming languages

Well, actually it is, but never mind. :) At first, I thought one had no choice but to migrate to Haskell or Clean if in a need for programming in an elegant manner. Fortunately, I since then have found some languages that would also do the trick. I plan to review most of these based on some criteria, preferably through a real-life problem set. Maybe I will initially base my research on the ready-made solutions found at the great language shoot-out game. As you probably already know, Haskell (and Clean) allow the expression of deep thoughts with very conscious syntax (and semantics) for most domains. Erlang is also nice, though a bit LISP-like on the syntax side (read: crude). I still need to learn a few more languages that are said to be pretty interesting. As I've heard OCaml (ML) and maybe Python could be good candidates. Now, before you come up with the valid argument that powerful language-extending features and Turing-completeness make this a non-issue, I am not sure if I woul...

NEWS: Updated graphics, refactored quotes, fixed links

I still need to get used to blogging. I have added some new creations to my ASCII art section last week. I have also done some major refactoring of the quotes - I added some more while at it. I have updated or removed a few broken links from my archive. I try to finish updating them in a month (or a few?), but progress is slow. The ones below the asterisks are left. I know how frustrating broken links can be, so I handle this with top priority.

My previous experience with operating systems

The first OS I have installed was probably some DOS for a friend or classmate in primary school, I can't remember which. You understand if normal people can't install and configure that properly, as it is considered pretty difficult. I then did winblows a few times, though that's a harder treat. How do you expect a normal user to feel at home with his computer if he can't even install it for himself? It's supposed to be user friendly or so. Also note, that after removing the installer disk and placing it on the shelf does not end your responsibilities. If you install new hardware, software, or just simply switch some setting that change a major part of the system, you will need to get used to handling setup dialogs and wizards. And by the way, if the installation process is usually done by a semi-professional anyway - either in the shop before you buy, or if you ask help from a friend - then that voids the major part of the very common argument against using any unu...

Testing Lenny: installation with debootstrap under Etch

I'm not specialized in doing that, but I had to commence many operating system installs to this day. I plan to write a bit on that next time. Here's how I've installed Debian 5.0 Lenny (qualified as testing as of September of 2008). I did it two times in a row to be exact, because of an unfortunately hardware fault after two days of usage (okay, maybe it was partially mine). The second one should have taken much less time, but I goofed with the settings of apt-move. You see I got it right with Etch before, but I forgot to write it down (I found it in the file anyway). I have been writing down what I customize from the start just because of that. Thankfully, that's a good habit of mine. Some words about the instructions in the file ("almost" a shell script). I tried to be self-explanatory, and have written a little preface to help place things in context. NO WARRANTY OF ANY KIND: I am not held liable for anything you do wrong with the text given below, not even...

A logo for my T-shirt?

Planning to construct a logo for a T-shirt has been on my mind for some time now. It should look neat, but be practical at the same time. What I am certain of at the moment, is that the design ought to include program source code or ASCII art of some sort. License will be GPL of course ;-> In both cases, the number of characters should be minimal. I'm thinking along the lines of a few hundred bytes or so, and about six or seven lines of code. Readability is at paramount: a well educated person if mathematics, information technology or engineering ought to understand it in a minute.

Simple artificial intelligence for board games with functional programming

This is nearly a trivial project, really. However, I do plan to achieve the most general implementation feasible. What needs to be done are the following. * Internal representation of the game state (board, turn); * Presentation to the user (only coordinates at first); * Input from the human player (coordinates); * Generating valid steps for the AI (simple enumeration at first); * Heuristic function for the AI (something wired-in at first); * AI core: minimax at first, alpha-beta with some simple ordering and pruning later on; * Simple interface that enables a GUI at a later date.

Church bells and synthesis using computers

I am interested in simulating the generation of the sound of bells. My ultimate objective is to synthesise a bicycle bell. I had done some web research on the topic, but it is not easy to find concrete implementation details. I had to resort to a bell manufacturer's site that included a lot of details on the sound generation modes of church bells in general. Thankfully, it also had a few graphs on the sound spectrum of these, so I had a good starting point. I then started coding some test routines (sadly in C++), and got pretty promising results after some fiddling with constants and the like. I am pleased with the end result, as it closely resembles the real thing. What is still left, is to record and analyze spectrograms of those bells that are used with bicycles. I have previously tried tweaking the constants of the church bell with no luck.

Functional programming in SH and Bash?!

I made a few functional oriented and list processing functions for bash. Nothing serious, and it's very slow for practical use. Profiling tells that the head and tail operators are the bottleneck, so forking them off to a different process would help. Though I don't feel an urge to update it that way, as this was made just for the fun of it! Another upgrade would involve updating the free form recursive data structure to something faster, or doing less and/or faster conversion. A last resort would be writing hard-coded implementation for the core functions like map, foldl and filter. I also have the choice of moving to the very powerful (and speedy) Bash syntax. These are all viable, but would degrade the elegance of the library as a whole, so I'm hesitant to apply them. And don't forget, that it's a much more sane solution to embed O/S functions, or even a full-blown bash into a fully capable language, instead of the other way around. I've been thinking along t...

Aid in choosing plastic food containers

I did some experimenting with my handheld computer, the Psion 5MX clone. I wrote a pretty neatly structured program in OPL, that would assist me at shopping. You see I was in a need for some containers that could efficiently fit in our fridge. I made measurements as a hole, and on a shelf basis, and input that as (factored out) constants. The structure of this console application is as follows, almost literally. The program runs in a loop until interrupted (by nonsense input). The loop first asks for the dimensions of the container in question, then outputs the computed efficiencies for each shelf. The efficiency for a shelf is the maximum of possible packing efficiencies for the shelf. Possible packing methods include a simple fixed set of orientations and some combinations. This is an almost trivial solution that gives a practically perfect approximation to the three dimensional packing problem with real world constrains (all container boxes facing up, etc.). The most difficult p...

Your own keyboard layout at work or on shared computers?

I have modified the international standard Dvorak keyboard layout few years ago that accommodates national accents by simply correcting the output of "xmodmap -pke". I have recently created a similar one for winblows. I had to download and install msklc (after validation) first, in order to achieve that. The only problem was that I couldn't install the created layout, as I lacked the needed priviliges at our computer lab! I used it anyway to type in a CV with the help of it's test layout function and regular copy-pasting. Not a very elegant solution, but I think it was a fair way to accomplish the task. I wish I kept my keydrive bootable with DSL.

What is this all about?

This is a sandbox for random, uncategorized or just "fresh" ideas. Isn't this the motivation behind all blogs? :) I try to constantly and eventually integrate most content found here into my homepage . You may expect new posts here appearing about weekly, and updates there to be committed about monthly. Note that I plan to relocate the former linked site before about February, 2009, so do check back from time to time.