Category: operating system

Watching 720p matroska on ASUS Transformer

Yesterday I decided to try and watch a series episode on my Eee ASUS Transformer (TF101). First, notice that I rooted it, and it is running CyanogenMod, with Android version 4.1.2.

The episode was stored on a SD card. It is not a fast SD card (class 4), but should suffice. The file was encoded with Matroska (MKV) in 720p. So far, so good.

Asked a friend about what player he would recommend. he said there were two, but just reminded of one name: MX Player.

Nevertheless, I didn’t like to notice that MX Player free version has advertisement, and therefore decided to try VLC. I use it on my Mac, and I like it (and its icon), so, why not test?

VLC installed cleanly, but when playing, it wasn’t able to render a single frame. From 5 to 5 seconds it changed the frame, but full of noise and encoding blocks. Gah, #fail.

Then, if VLC doesn’t work, let’s hear my friend suggestion, and try MX Player. Installed the free version, and then, needed to install the codecs package. Didn’t like much this approach… it could download the codecs itself, why to hide them in an app. Nevertheless, it installed with more or less effort. When playing, it was able to render the image perfectly, with acceptable number of frame per seconds (don’t ask how many, I don’t know, but enough to watch smoothly the video). The problem was that I could just watch the video, as there was no sound at all. No, it wasn’t a volume problem. Neither an option. As far as I could get after googling a little, there are more people complaining that MX Player doesn’t play sound when watching a Matroska file. Weird. #fail.

In one of those googling, somebody said he converted the Matroska file to MP4 with Handbrake. That is too much trouble for someone like me. But somebody else said that BSPlayer had a free version for Android that worked. Righto! Downloaded it, it installed cleanly and played the video at first. #win.

Dotcloud and Perl Versions

Today I waste all my afternoon trying to solve a problem with Perl versions and DotCloud. I say I wasted the afternoon because I could not solve the issue during the afternoon, only in the beginning of the night.

Enough complain, and let me explain what was going on. Yes, this post is a little as a complain to the DotCloud tech guys, but also as a guide to someone that stumble in a similar situation.

I had a service running with Dancer. It worked, it connected perfectly to the database. Next step was to set up a cron job to fetch some data from the Web. I added its dependencies in the Makefile.PL file for the website, and hoped that the deploy system would install them. But the cron job continued failing. I tried to force its installation, but the deploy system said it was up to date. Something wrong was going on. I forced a little more the installation, adding the URL to the module tarball. This way the deploy system could not guess its version, and therefore, would install the module anyway. It worked, but the deploy system continued complaining about other and other module.

It got stranger when the cron job complained about the lack of the DBI module. Hey, how can it be, if the website is running and using it? Well, DBI is based on C code, so probably I am missing to include a sub-folder of the local module installation. And then, it got clearer: the cron job complained that the version of could not be loaded into Perl because of unresolved symbols. Aha! Then, there are two Perl versions.

And indeed, the web application was running Perl 5.14.x (I requested it on my DotCloud configuration file) and the Perl used by the cron job was Perl 5.10.x. Basically, DotCloud folks keep the system Perl, and install custom Perl versions under /opt/perl5, and creates some symlinks there, so that /opt/perl5/perls/current points to the Perl version requested.

So, the solution is to make the cron job use the correct Perl version. In my case I set the full path, but you could change the PATH environment variable in your .bashrc-like file.

This wasn’t that hard, but it was quite time consuming, because deploys take some time. Probably I could get faster if I remembered to test Perl versions right ahead, but I forgot to.

I suggest DotCloud guys to do one of two things: or document this in the same doc where it is explained how to request a specific Perl version, or fix the damn environment so that cron jobs and other code uses the same Perl version as the one requested by the system.

Apple discriminating… again!

Yes, yet again, Apple discriminating. Not sure if by their own will, or just because they are stupid. Nevertheless, they got warned, and their action will clarify this point.

Now, why? Not sure why (there is a page with that story but I really never read it) but Apple has a trailers page. It is a nice page, with HD version of trailers. So, why not use it. The problem is that the HD versions, that are watched opening QuickTime (or supposedly, any other similar application), doesn’t work if you are using Firefox (on Mac OS X). You get a redirect to the original trailers index page.

Nevertheless, if you change your Firefox user agent string to the Safari user agent string, then the link will work properly. This means it is not a technology problem or anything. It is just Apple filtering what user agents can watch the movies.

So, if you still want to use Firefox and Apple trailers page for this task, then install, for instance, the Firefox user agent switcher plugin.

And a final thank you to João Neves for his precious help debugging this problem.

Diablo III – Open Beta/Stress Test Weekend

This weekend was the Beta Open Weekend, or the Stress Test Weekend. This fact is already interesting. I do not know any other company with any similar initiative. This is not only great for them as a mechanism to check how good their servers can cope with the game and some hundreds or thousand players, but also because this works a demo. I would love to know how many players made the pre-order during this weekend. I am one of those.

There are lots of critics about this game. Most of them are funded. The characters don’t seem as dark or scary, but more comic-like, the magic system is more simple, the inventory items are smaller with less detail, etc. I defend that we need to be open to new approaches to the same game. If it is all similar, just an enhanced version with new enemies and new characters, that doesn’t get that interesting (my opinion).

We expect some issues to improve in the final release, but we can’t expect much changes.

I didn’t play much, but my main complains are that for two times that the game returned me a black screen only with a cursor when exiting (Mac OS X), and that it doesn’t have any logic to have a character (witch doctor) whose primary weapon is a jar full of spiders. And, as far as I could dig, I can’t have a standard weapon instead of those “magic” weapons. But probably I didn’t dig enough.

Now, waiting for the release in May.

Nine tools I can’t live without (for Windows)

First, a relevant disclaimer: I use Windows mostly for two purposes, test my Perl modules under a Windows environment, and printing some stuff as my Mac sometimes can’t find some Windows printers in the network. This said, my Windows runs in a virtual machine, and I install these tools right after installing Windows.


The first thing you need to know is that Windows does not include a web browser. It includes a tool that is mainly used to download a Web browser. Its name is Internet Explorer, and you can use it to download Firefox, Google Chrome, Safari or Opera. In my main machine, I use Firefox. There are some features that I like that are not available on other browsers. But for my virtual machine I need a tool to check my mail, and to download some other tools. Not much more.


Now I am cheating. In my virtual machine I do not have an antivirus installed. It is too easy to reinstall a new virtual machine, and you all know that an antivirus running is wasting some resources that can be relevant for virtual machines. Nevertheless, I want to suggest two antivirus. In fact, I suggest these two because they are the two I install when I need one (note that I do not install both, I install one or other). I am not sure what is the best. Avira seems to be lighter, AVG seems to be more professional and heavy.

Both these antivirus software have their professional paid version. This means that if you like their performance, you can buy the paid version for better protection. They also include some functionality that are common on current antivirus software, like trojan detection and web site security.



I need to transfer files to and from my Mac and/or Linux servers to the Windows machine. For that I can make the file available to download, or I can use a tool to copy files. As FTP is not that secure, the best approach is to use SCP or Secure Copy. For that, I suggest WinSCP tool. It also support FTP, but its main strength is the ability to use the SSH protocol.

A similar necessity raises when I need to connect to a Linux server from Windows. Again, I do not need this when using a virtual machine, as I can use a terminal from the host machine to ssh anywhere I want. But if you have a dual boot machine, or you just work on windows, then you will need this. Putty is the better telnet/ssh client I ever seen for Windows. It not only supports ssh, but it also supports ssh keys, making your connection even more secure.

Version Control

My main repository of code is still a SubVersion one. I am now using GitHub a lot, too, but my main tools are still in the old SVN repository. To checkout and commit from Windows I use TortoiseSVN. Not only because it has a nice and cute logo, but because it integrates perfectly in Explorer. Also, I love a recent feature, where TortoiseSVN commit message window auto-completes your commit messages with the filenames or contents of the modified files. Very cool.

Text Editor

I do not use that much Windows to have a dedicated IDE. I usually use Notepad++ for my editing needs. It knows about file encoding, it knows about end-of-line differences among operating systems, it knows how to highlight main programming languages, it is light and easy to use. It is not full of features, but I do not need them. Or at least, I think I don’t. Also, I confess I never dig much all of its potentialities.

Programming Language

My main programming language is Perl. I occasionally need some C, and some of my Perl modules link to C and C++. So, to fill my need for these three programming languages I choose to install Strawberry Perl. I never ever used Perl with so ease in Windows before Strawberry Perl. It supports more than 90% of CPAN modules, and it includes a C and C++ compilers (gcc based) and a make command. What else one needs?

Compression Tool

Windows knows (it its recent incarnations) about what are zip files. But it ignores all about rar, gzip, bzip2 or tar files. Most Perl modules come in tgz format, so I need a tool to extract them. Most people tend to use WinRar or 7zip. I am not sure why, but I prefer IzArc. It is lightweight, supports most compression algorithms, and integrate pretty well with explorer.

PDF Visualizer

If up to now I defended the use of lightweight applications, now I’m going to the other side, and my choice to read PDF documents is Adobe Reader. There are other free and more lightweight applications, like FoxIt Reader, but I had so many trouble with PDFs and PDFs compatibility that I prefer to have the application from the PDF creators. I know that doesn’t mean much, but at least it can work as an excuse.

What I miss…

There are some tools that I miss. First, I miss a decent command prompt window. One that let me select text, copy and paste easily, that let me make full screen, that let me change easily the font, and not just some stupid predefined sizes. Together with this, a decent command prompt, or shell, with better completion, better prompt configuration, better history, etc. To install cygwin is not an option. For that, I would use linux.

Also, and as I stated above, now I am using GitHub a lot. Then, I miss a Git client. I tried TortoiseGit but it didn’t work well for me. Probably it was a beta release, and now it is better. I need to test. I used the Git binary, that includes a Git shell, and mostly works. But it do not integrate well with the operating system.

Firefox vs Safari on Mac OS X

I confess I use Firefox, and I really prefer firefox user interface. But this is just stupid! I never had problems with Firefox before, and now that I have a fast machine and 8 GB of RAM Flash acts like this? OK, I know it is Flash.. but.. :-/

Also, no idea why I can’t get my Quicktime plugin to manage .mov files. It just does nothing. Check below how it behaves in Firefox and in Safari.

Firefox 9, Mac OS X Lion and Apple Trailers page

I am having some trouble with Firefox 9 (well, I had it already with Firefox 8, and after the update the behavior continues) and Mac OS X Lion, when trying to download a trailer from Apple trailers page. I have no clue about what is going on, so if you have any idea that can solve my problem, please leave a comment, or contact me directly.

First, choose a movie from Apple trailers page. Any movie will work. I chose Prometheus, just because it is one of the first in the list, and Science Fiction. There is a small bar at the left that reads “View Trailers (4)”. I expand it clicking the arrow. Before continuing, I activated the Web Console for Firefox, that shows what is going on (that is, lists the requests that are sent to the server, and the received response).

Next step, choose one of the trailers. Let’s say, the first. In the small arrow in the “watch now” button, you have two sections. One of them is named “watch” and the other “download”. Let’s try to download one trailer (or watch it in QuickTime, instead of watching it directly in the webpage). Click the 480p (20MB) link.

What happens?

Well, for most users, it will open QuickTime and start loading the video. For me, nothing happens. The Web Console just issues GET as it should. And logs the answer as [HTTP/1.1 302 Moved Temporarily 118ms]. And it is all. No further messages in the watch window, no QuickTime starting, nothing. Rien!

I have no clue about what is going on. If you have, please let me know (and if you say not to use Mac or to use Safari I’ll be punching you in the teeth).

Mac OS X ‘ls’ vs GNU ‘ls’

There are a few details that can change completely you decision when to use one version of a command or another. Mac OS X ‘ls’ command is one of those you do not want, and you are desperate to install GNU version of ‘ls’. Check the differences (below ‘gls’ is the GNU version of ‘ls’).

[ambs@stravinski Liturgica]$ ls
0001			0068			0135
0002			0069			0136
0003			0070			0137
0004			0071			0138
0005			0072			0139
0006			0073			0140
0007			0074			0141
0008			0075			0142
0009			0076			0143
0010			0077			0144
0011			0078			0145
0012			0079			0146
0013			0080			0147
0014			0081			0148
0015			0082			0149
0016			0083			0150
0017			0084			0151
0018			0085			0152
0019			0086			0153
0020			0087			0154
0021			0088			0155
0022			0089			0156
0023			0090			0157
0024			0091			0158
0025			0092			0159
0026			0093			0160
0027			0094			0161
0028			0095			0162
0029			0096			0163
0030			0097			0164
0031			0098			0165
0032			0099			0166
0033			0100			0167
0034			0101			0168
0035			0102			0169
0036			0103			0170
0037			0104			0171
0038			0105			0172
0039			0106			0173
0040			0107			0174
0041			0108			0175
0042			0109			0176
0043			0110			0177
0044			0111			0178
0045			0112			0179
0046			0113			0180
0047			0114			0181
0048			0115			0182
0049			0116			0183
0050			0117			0184
0051			0118			0185
0052			0119			0186
0053			0120			0187
0054			0121			0188
0055			0122			TODO
0056			0123			book.lytex
0057			0124			cleanGenerated
0058			0125
0059			0126			letra.dtd
0060			0127
0061			0128			letra.rnc
0062			0129			letra.x
0063			0130
0064			0131			schemas.xml
0065			0132
0066			0133
0067			0134


[ambs@stravinski Liturgica]$ gls
0001  0021  0041  0061	0081  0101  0121  0141	0161  0181
0002  0022  0042  0062	0082  0102  0122  0142	0162  0182
0003  0023  0043  0063	0083  0103  0123  0143	0163  0183
0004  0024  0044  0064	0084  0104  0124  0144	0164  0184
0005  0025  0045  0065	0085  0105  0125  0145	0165  0185
0006  0026  0046  0066	0086  0106  0126  0146	0166  0186
0007  0027  0047  0067	0087  0107  0127  0147	0167  0187
0008  0028  0048  0068	0088  0108  0128  0148	0168  0188
0009  0029  0049  0069	0089  0109  0129  0149	0169  TODO
0010  0030  0050  0070	0090  0110  0130  0150	0170  book.lytex
0011  0031  0051  0071	0091  0111  0131  0151	0171  cleanGenerated
0012  0032  0052  0072	0092  0112  0132  0152	0172
0013  0033  0053  0073	0093  0113  0133  0153	0173  letra.dtd
0014  0034  0054  0074	0094  0114  0134  0154	0174
0015  0035  0055  0075	0095  0115  0135  0155	0175  letra.rnc
0016  0036  0056  0076	0096  0116  0136  0156	0176  letra.x
0017  0037  0057  0077	0097  0117  0137  0157	0177
0018  0038  0058  0078	0098  0118  0138  0158	0178  schemas.xml
0019  0039  0059  0079	0099  0119  0139  0159	0179
0020  0040  0060  0080	0100  0120  0140  0160	0180
[ambs@stravinski Liturgica]$ 

My terminal has 46 lines and the first version doesn’t appear completely in the window. The second would fit perfectly ever if I had the usual 24/25 lines. Yeah, it will not fit for ever, as I am adding more items to this folder, but you understood the idea…

Lion, and some more impressions

And here I am, back on my comments on Lion. First, I will let you know that the things that I am liking more in this new machine are not related with the operating system itself, but different approaches I am taking, like the usage of homebrew for installing UNIX software. Also, the hardware makes a difference, when you have an i7 processor, 8GB of RAM and an SSD (unfortunately 128 GB of disk is not that much).

Regarding Lion, I already figured a way to put spaces or desktops or whatever you would like to call, behaving like my old spaces, having a shortcut for each one of them, and pinning applications to specific desktops. Unfortunately, I am not able to change all spaces backgrounds at once. I can change one at a time, but I do not have a way to change them all. Unless I destroy all the spaces I have, change the first one, and recreate them all again. Not feasible, specially when you have pinned applications.

The way 801.1X configuration is done is not clear to me as well. Fortunately I got the profile ready to use, but the Lion interface could be more helpful. It says “contact your system administrator for a profile”, but if you are the sysadmin (usually when you buy a laptop) you need to know where to create the profile. So, probably a few more help would be good.

When using Colloquy or Adium with the US keyboard, I can’t type a key and maintain it pressed to repeat the letter. A popup appears where you can choose an accented letter. If you press a letter that cannot have an accent, it gets typed once, and no repeat is done. I do not think this is completely Lion fault, as other applications like Firefox behave correctly, but I do not think this is Colloquy and Adium fault altogether.

Regarding launchpad, I am not able to understand why would I need it. Switch to it and searching an icon is slower than typing the shortcut to spotlight and typing the application name. I wonder when Mac developers stop working on the eye candy and start worrying with the operating system problems. For example, since Tiger (at least, since Tiger that I can confirm) locales are broken for C++ programs.

Unless you have a very good reason to do the upgrade, I do not think Lion worth it. I updated my old mac to Lion only because it was running Leopard (not the Snow one) and a lot of software stopped being supported.

Mac OS X Lion – First Impressions

I am using Max OS X Lion for two days, in fact, for two partial days, and I have a lot of complains already. It is typical of me. And, please, do not comment that it is my fault as I bought a Mac. That I know already.

Ok, first complain, now the Mac OS X installation procedure doesn’t let the user customize the installation. Why is this bad? Because in Leopard we could save about 1GB of space choosing the software to install (disabling GarageBand, disabling I18N stuff, etc.). Now, it doesn’t make any questions.

Then, to download XCode you need to use AppStore. Ok, sure. But why do you need a credit card to register if XCode is for free? Just to have a card to charge if anything goes wrong? Not sure. I would say it is incompetence. Any way, thanks to Portuguese MBNet system, I created a virtual VISA card with 5 euro plafond. Should be enough for a free download. Then, XCode took about 5 hours do download. Downloaded MacTeX that takes more space than XCode, and it got here faster. Anyway, after the download complete, App Store says that XCode is installed.

Is it? Well, no, it isn’t. Try to run ‘gcc’ in the command line, and you’ll not have an answer. Before thinking that the download failed, and you need another 5 hours of download, learn the most important thing on using a Mac: do not trust him. He didn’t install XCode. It would be too fast. He downloaded the installer and… installed the installer. Yes, go to the Applications folder and you’ll have there the XCode installer.

And now, it goes for another complain: Xcode installation is not possible to customize, again. Why this is bad? Because I could save some more MB of space. Why this freaking idea of saving disk? Because I am running in a 128 GB SSD and I have pr0n that is more important than some freaking software XCode installs (ok, kidding about the pr0n).

Oh, after running the XCode installation command, do not forget to download it. Yes, you have 1.5 GB of disk space in your Applications folder, that is an installer. And why the fuck would you put an installer there? Well, because you are from Apple…