Planet maemo: category "feed:04088ede8ecf981676b12f87999d25d2"

Alberto Mardegan

libSDL2 and VVVVVV for the Wii

2024-02-02 17:50 UTC  by  Alberto Mardegan
0
0

Just a quick update on something that I've been working on in my free time.

I recently refurbished my old Nintendo Wii, and for some reason I cannot yet explain (not even to myself) I got into homebrew programming and decided to port libSDL (the 2.x version -- a 1.x port already existed) to it. The result of this work is already available via the devkitPro distribution, and although I'm sure there are still many bugs, it's overall quite usable.

In order to prove it, I ported the game VVVVVV to the Wii:

During the process I had to fix quite a few bugs in my libSDL port and in a couple of other libraries used by VVVVVV, which will hopefully will make it easier to port more games. There's still an issue that bothers me, where the screen resolution seems to be not totally supported by my TV (or is it the HDMI adaptor's fault?), resulting in a few pixels being cut at the top and at the bottom of the screen. But unless you are a perfectionist, it's a minor issue.

In case you have a Wii to spare, or wouldn't mind playing on the Dolphin emulator, here's the link to the VVVVVV release. Have fun! :-)

Categories: curiositates
Alberto Mardegan

Will the internet forget russophobia?

2023-06-04 07:41 UTC  by  Alberto Mardegan
0
0

I've often wondering what will happen when this horrific war in Europe will finally be over. I won't be discussing politics here, but what is mostly interesting to me is how (and if) all the companies who made high proclaims about not doing business with Russia will justify their getting back into the Russian market. They will probably count on the fact that the war will be long, and that people will forget what these companies' stance was. After all, the world has forget about all the companies who collaborated with the Nazi regime, so we can expect the same to happen with this war.

Click to read 2054 more words
Categories: actualitate
Alberto Mardegan

Back to Maemo!

2023-01-08 19:48 UTC  by  Alberto Mardegan
0
0

New year, new job. After leaving Canonical I'm back to working on the same software platform on which I started working back in 2006: Maemo. Well, not exactly the vanilla Maemo, but rather its evolution known as Aurora OS, which is based on Sailfish OS. This means I'm actually back to fixing the very same bugs I introduced back then when I was working in Nokia, since a lot of the middleware has remained the same.

At the moment OMP (the company developing Aurora OS) is mostly (or even exclusively, AFAIK) targeting business customers, meaning corporations such as the Russian posts and the railway company, whereas the consumer market is seen as something in the far away future. Just in case you were curious whether there were any devices on sale with Aurora OS.

I should also explain why I've refused several very well paying job opportunities from Western companies: it's actually for a reason that has been bothering me since last March, and it's a very simple one. The fact is that because of the sanctions against Russia I already had to change bank once (as the one I was using fell under sanctions), and in these months I've always been working with the fear of not being able to receive my salary, since new sanctions are introduced every month and more and more banks are being added to the blacklist. That's why I've restricted my job search to companies having an official presence in Russia; and to my surprise (and from some point of view, I could even say disappointment) the selection and hiring processes were so quick that I received three concrete offers while I was still working my last weeks at Canonical, and I joined OMP on that very Monday after my last Friday at Canonical.

I mean, I could have rested a bit, at least until the Christmas holidays, but no. ☺ Anyway, I'm so far very happy with my new job, and speaking Russian at work is something totally new for me, both challenging and rewarding at the same time.

Categories: english
Alberto Mardegan

The “idiotism” of software developers

2022-11-08 17:11 UTC  by  Alberto Mardegan
0
0

Before you get angry at me for this title, please let me state that I count myself in the number of the “idiots” and, secondly, that what I mean by “idiotism” here is not to be intended as an offence, but as some traits of mindset which are typical of very logical brains.

Click to read 3886 more words
Categories: english
Alberto Mardegan

If you have been writing C++ classes for mocking out your C or C++ dependencies, you know how tedious it is. I generally write small classes with just a handful of methods, so it's generally bearable, but when using third-party code I'm usually not that lucky. If the dependency is a C library this becomes especially tricky, both because they might be larger than what you can handle, and both because the lack of an object-oriented design might not offer you an easy solution to store the mock object data.

Click to read 1024 more words
Categories: english
Alberto Mardegan

As you know, I'm trying to get the FM radio to work in Ubuntu Touch, and I basically have it working on the Redmi Note 7 Pro. But then I remembered that the BQ Aquaris E4.5 (which is the first commercial device officially supporting Ubuntu Touch) also comes with an FM radio, so I decided to put some effort in getting that to work, too. You might think it's a waste of time, but as a matter of fact this device is built on a Mediatek SoC, and FM radio support is exposed to userspace in a very similar way across all Mediatek devices — so this work should be covering other devices as well.

Click to read 1152 more words
Categories: english
Alberto Mardegan

Enabling the FM radio in Ubuntu Touch

2021-12-07 16:41 UTC  by  Alberto Mardegan
0
0

I recently realized that my Xiaomi Redmi Note 7 Pro, on which I installed Ubuntu Touch not so long ago, has a working FM radio. One of the many psychological bugs of mine is the irrational urge I feel of having my hardware, no matter whether I use it or not, supported by Linux. So, the fact that I never listen to the radio is unfortunately not a reason to dissuade me from wasting time on getting the FM radio working in Ubuntu Touch.

Click to read 3576 more words
Categories: english
Alberto Mardegan

While developing MiTubo I've recently felt the need of parsing HTML pages: the first problem I wanted to solve was implementing proper RSS feed detection when the user entered a website URL into MiTubo's search box, so that MiTubo would parse the site's HTML, look for <link rel="alternate"...> URLs in the HEAD section, and let the user subscribe to any video feeds found there.

A quick search in the internet did not provide a clear answer: I found a Qt HTML parser in (stalled) development, and a few other C++ or C parsers (among the latters, lexbor is the most inspiring), but all of them seem to take the approach of parsing the HTML file into a DOM tree, while I was hoping to find a lightweight SAX-like parser. Pretty much like Python's html.parser.

Anyway, I don't remember how it happened, but at a certain point I found myself looking at html.parser source code, and I was surprised to see how compact it was (apart, of course, for the long list of character references for the HTML entities!). Upon a closer look, it also appeared that the code was not making much use of Python's dynamic typing, so, I thought, maybe I could give it a try to rewrite that into a Qt class. And a few hours later QHtmlParser was born.

As this post's title suggests, the process of rewriting html.parser with Qt was quite straightforward, and the nice thing about it is that I didn't have to spend any time reading the HTML standard or trying to figure out how to implement the parser: I just had to translate Python code into C++ code, and thanks to the nice API of QString (which in many ways resembles Python's — or vice versa) this was not too hard. I even left most of the original code comments untouched, and reused quite a few tests from the test suite.

It was time well spent. :-)

If you think you might need an HTML parser for your Qt application, you are welcome to give it a try. It's not a library, just a set of files that you can import into your project; for the time being I only have a build file for QBS, but I'll happily accept contributions to make it easier to use QHtmlParser with projects built using other build systems. You can see here the changes I made in MiTubo to start using it and detect RSS feed in a webpage's HEAD.

That's all for now. And in case you missed the link before, you can find QHtmlParser here.

Categories: english
Alberto Mardegan

This is the second part of my porting odyssey; for the first part, follow this link.

Click to read 4240 more words
Categories: energia
Alberto Mardegan

In case you have a sense of deja-vu when reading this post, it's because indeed this is not the first time I try porting a device to Ubuntu Touch. The previous attempt, however, was with another phone model (and manufacturer), and did not have a happy ending. This time it went better, although the real ending is still far away; but at least I have something to celebrate.

Click to read 8096 more words
Categories: energia
Alberto Mardegan

Qbs and code coverage reports

2019-07-01 13:42 UTC  by  Alberto Mardegan
0
0

You know that I'm not an early adopter. That's why it was only a couple of weeks ago when I decided to give Qbs a try, by using the good old Mappero (and its spin-off, Mappero Geotagger) as a test bench. Yes, I know that the Qt company is not going to maintain Qbs anymore in the future, but the little I knew about Qbs was enough to convince me that it's a project worth supporting. So, better late than never -- and hopefully the community (me included) will do a good job in keeping Qbs thriving.

Click to read 1874 more words
Categories: english
Alberto Mardegan

A critical view on the blockchain

2019-04-24 19:59 UTC  by  Alberto Mardegan
0
0

At the beginning of this month I participated to the foss-north conference, in Gothenburg, and took the stage to give a short presentation of the blockchain technology. Given that my talk was somehow critical of the blockchain (or rather, of the projects using it without due reason) I was prepared to receive a wave of negative remarks, assuming that all the hype surrounding this technology would have infected a good part of my audience as well. I was therefore positively surprised when several people came to me afterwords to express their appreciation for my speech, appreciation that now makes me confident enough to share the video of the presentation here too:

I want to publicly thank Johan Thelin and all the other foss-north staff and volunteers who organized such a successful conference. They also managed to get the video recordings out in a surprisingly short time. Indeed, the above video is taken from the foss-north YouTube channel, which I recommend you to visit as there were a lot of good talks at the conference; the topics were so varied, that I'm sure you'll find at least a couple of talks of your interest.

Categories: blockchain