Disclaimer: This is a personal web page. Contents written here do not represent the position of my employer.
Saturday, March 02, 2024
Safety shouldn't be opt-in
Many years ago, when I was starting to have my first experiences with Functional Programming (thanks to learning the amazing F# language), I discovered what seemed to be a problem that was not really a concern in the OOP world that I was leaving behind: stack overflows caused by stack recursion.
I was puzzled: from one point of view, mutability is dangerous and has to be avoided; however, if you avoid it in a certain way by using recursion, you might hit this other kind of problem. Sure, an exception at runtime is much better than the typical problems associated with mutability (race conditions or heisenbugs, which are very hard to debug and fix), however there was no way of making sure that you don't hit this problem in your recursion-based algorithms unless you made sure that... you use TailCall-friendly recursion.
Huh? What in the world does TailCall-friendly recursion means? When I first tried to wrap my head around this concept, it was hard, and to this day it is still is. But the real problem I saw is that there was no deterministic way to make sure that your recursive algorithm that you tried to make TailCall-friendly, is indeed TailCall-friendly. That's why I thought: wouldn't it be nice that the compiler warns me when I didn't succeed in making this algorithm TailCall-friendly? And that's why I filed an enhancement request in the proper channel for that which, at the time, used to be UserVoice.
Several weeks or months later, I discovered that my enhancement request was the most upvoted of all?! Maybe because the F# team had recently moved to UserVoice and I had been lucky to be one of the first people to file a ticket, which subsequently got a lot of views? I don't know, but I was happy. And the team agreed to implement it "in principle" (as far as I remember).
Some years passed, and I started getting better and better at F#, to the point that I started my own opensource project using it. But in the back of my mind I was still concerned about this downside that I had discovered when delving for the first time in Functional Programming. So I looked for the UserVoice ticket to see if it had been finally implemented: sadly, the F# team had moved out from UserVoice to a different way of tracking enhancement requests, and therefore, all the upvotes of it had vanished, and it was no longer "the most upvoted". Also, it hadn't been marked as fixed or actioned at all. There were some people talking about it and proposing ways of doing it, but nothing had really been set in stone.
Until last December! It turns out someone had finally worked on it and contributed it upstream. I was very happy and delighted that you can finally protect yourself at compile-time from this pitfall. However, when I saw how the feature can be used, I was a bit heart-broken. The initial feature request was titled along the lines of "Emit a compiler warning when a recursive algorithm is not tail-recursive", then probably Microsoft renamed it to "Enable a compiler-warning when...". Then I thought: ah, they are going to make it opt-in at the project level, probably. Boo! They didn't make it opt-in at the project level, not even at the module level! They made it opt-in at the function level! :-(
Oh well, it's a step in the right direction for sure. But don't we all think that SAFETY SHOULDN'T BE OPT-IN? Especially as F# developers, because many of us moved away from C# because F# has safer defaults, for example: if you want to use mutability, you can still do it, but then you need to use a keyword to opt-in: `mutable` (not like in C# in which safety is opt-in, e.g. the keyword `readonly`).
So then... I decided to do something about it.
If you're a lover of static typing, you rather prefer to get compiler errors than runtime errors. And if you like compiler errors, there's a chance that you also like warnings. And if you like warnings, there's a chance that you like to turn on "warnings as errors". And if you like warnings as errors, there's a chance that you also normally like to go the extra mile: you like linters and static analysis tools. And so, if you're already using a tool like this, wouldn't you expect them to give you extra protection? And wouldn't you want that the strongest protection layers that these tools provide are enabled by default, not opt-in? Enter EnsureTailCallDiagnosticsInRecursiveFunctions!!: a new FSharpLint rule that my team has implemented which will not shut up until you have marked all your recursive functions with the `[<TailCall>]` attribute, to make sure you are properly warned when you're not protected from potential stack overflows.
I merged the PR that implemented this rule this week, and made a release, 0.24.2, so that you can already adopt it in your project, and be protected by default (because the rule is enabled by default). And so if you're using FSharpLint, safety is not opt-in anymore, it is default. And you can opt-out from safety by disabling this rule (completely, or in a case-by-case basis) in case you need it.
Labels: General, Ingenieria, Programacion
Saturday, December 18, 2021
geewallet 0.4.300.0 released!
10th of my 21-day quarantine*! And to celebrate, I'm going to release a new version of geewallet. It's not that I blog about geewallet releases often (or blog at all, lately), but this one is a special one for me. We decided to call it 0.4.300.0
The highlights:
- We fixed the GTK theme for our snap package. (Long version of the story: ever since we upgraded our snap generation process to take place in Ubuntu 20.04 instead of Ubuntu 18.04, the theme stopped working so the app was not showing anymore with the default theme of the system, but with the default Gtk theme, which is very plain. Even if you might consider this issue important, we haven't had time to look at it because we've been very busy finishing Lightning support. Sorry.)
- The chart rendering doesn't use SkiaSharp anymore, but good-old Cairo. This fixes some UI glitches that we had in the GTK frontend. (Long version: for this, we didn't just draw the chart using Cairo in our Gtk frontend, we actually wrote an implementation of the Shapes API for the Xamarin.Forms' GTK backend, and we contributed the work upstream: https://github.com/xamarin/Xamarin.Forms/pull/14235 . Hopefully they merge it soon so that we don't need to use our own forked repo/nuget anymore.)
- Fixed a crash when pairing with a cold-storage wallet. (Long version: user might not know that pairing is only allowed against another geewallet instance; low-hanging fruit bugfix which I shouldn't have neglected for so long, I know.)
- Fixed a crash when scanning some QR-codes that contained unknown parameters in the bitcoin URI. (Long version: I was actually in El Salvador and when trying to use a BTM, I found this bug! Apparently some BTMs here add an extraneous "chivo" param in the URI's querystring, in case the wallet being used is the one from the government; not sure why. In this case, geewallet was failing fast instead of ignoring the unexpected intruder.)
- Our CI now checks that our Android, macOS, and iOS frontends don't break. Previously the only frontends that we built in CI were the Gtk one (Linux) and the Console one (cross-platform, it's just terminal-based).
- We do snap package generation in GitLab now instead of GitHub. This is good because Microsoft keeps changing the Linux VMs being used in the GitHubActions service so we cannot keep up fixing things that just break out of the blue (so, they break independently from what we change in our commits, which is very confusing!). (Long version: we had to use GitHubActions because GitLabCI uses docker under the hood; so given that snapcraft uses systemd, it conflicts with it; now we use a "docker in docker" approach to be able to run in GitLabCI; which also allows us to publish the snap package as an artifact in the GitLabCI pipeline, not just publishing it to the Snap Store; this way, in case you somehow need a previous version in the future you can grab it from there, something that you couldn't just via snap AFAIU).
- Even though this wallet supports two ETH currencies (ETH itself, and DAI), we don't recommend their use at the moment because of the high fees and long confirmation waits these days. This is because the wallet waits for an ETH transaction to be mined (to make sure it didn't run out of gas, and if it did, report the problem to the user), but these days this wait is longer than the time-out. The short-term fix for this is either a) assume it will never ran out of gas, since our address is not a contract anyway (so I guess it can never run out of gas, right? feel free to prove me wrong, my ETH knowledge is not top-notch), or b) have some UI indicating that a transaction has been sent but not accepted by the network yet. The long-term fix is to have off-chain (Layer2) technology supported by the wallet, but we don't know which technology we will choose for this, and of course we're giving priority to the first Layer2 technology: Lightning (which is only compatible with BTC and LTC). All this aside, the wallet works well with ETC (an Ethereum-compatible technology). Anyway, this doesn't worry me too much because... what is the ETH blockchain used for these days, mainly? NFTs and DeFi pyramid schemes. In case you didn't get the memo, most of the former (if not all) are scams, and the latter are all of them mainly based on dubious centralized stablecoins (which could suffer fractional reserve and therefore cause bank runs, as Elizabeth Warren has already warned about).
- Despite this wallet being implemented with .NET (F#), our Windows compatibility story is very poor :'-( We ran into limitations of the Microsoft's AOT technology being used for UWP apps (required by the official process required to publish it in the WindowsStore) in the past. Nowadays apparently you can publish apps in the WindowsStore without these limitations, but we haven't tried again. Maybe by the next time we give it another go, we might have moved to MAUI already (which means WinUI instead of UWP under the hood). As always, if this is your cup of tea, we accept MRs!
Labels: General, Gnome, Mono, Programacion, SoftwareLibre, Xamarin
Saturday, February 08, 2020
Xamarin forks and whatnots
- In Linux(GTK), cold storage mode when pairing was broken, because the absence of internet connection was not being detected properly. The bug was in a 3rd-party nuget library we were using: Xam.Plugin.Connectivity. But we couldn't migrate to Xamarin.Essentials for this feature because Xamarin.Essentials lacks support for some platforms that we already supported (not officially, but we know geewallet worked on them even if we haven't released binaries/packages for all of them yet). The solution? We forked Xamarin.Essentials to include support for these platforms (macOS and Linux), fixed the bug in our fork, and published our fork in nuget under the name `DotNetEssentials`. Whenever Xamarin.Essentials starts supporting these platforms, we will stop using our fork.
- The clipboard functionality in geewallet depended on another 3rd-party nuget library: Xamarin.Plugins.Clipboard. The GTK bits of this were actually contributed by me to their github repository as a Pull Request some time ago, so we just packaged the same code to include it in our new DotNetEssentials fork. One dependency less to care about!
- Xamarin.Forms had a strange bug that caused some buttons sometimes to not be re-enabled. This bug has been fixed by one of our developers and its fix was included in the new pre-release of Xamarin.Forms 4.5, so we have upgraded geewallet to use this new version instead of v4.3.
Labels: CSharp, General, Ingenieria, Miscelanea, Mono, Programacion, SoftwareLibre, Xamarin
Sunday, January 05, 2020
Introducing geewallet
- Make it even more user friendly: blockchain addresses are akin to the numeric IP addresses of the early 80s when DNS still didn’t exist. We plan to use either ENS or IPNS or BNS or OpenCAP so that people can identify recipients much more easily.
- Implement Layer2 technologies: we’re already past the proof of concept phase. We have branches that can open channels. The promise of these technologies is instantaneous transactions (no waits!) and ridiculous (if not free) fees.
- Switch the GTK Xamarin.Forms driver to work with the new “GtkSharp” binding under the hood, which doesn’t require glue libraries. (I’ve had quite a few nightmares with native dependencies/libs when building the sandboxed snap package!)
- Integrate with some Rust projects: MimbleWimble(Grin) lib, the distributed COMIT project for trustless atomic swaps, or other Layer2-related ones such as rust-lightning.
- Cryptography work: threshold keys or deniable encryption (think "duress" passwords).
- NFC support (find recipients without QR codes!).
- Tizen support (watches!).
- Acceptance testing via UI Selenium tests (look up the Uno Platform).
- Flatpak support: unfortunately I haven’t had time to look at this sandboxing technology, but it shouldn’t be too hard to do, especially considering that there’s already a Mono-based project that supports it: SparkleShare.
- Ubuntu packaging: there’s a patch blocked on some Ubuntu bug that makes the wallet (or any .NET app these days, as it affects the .NET package manager: nuget) not build in Ubuntu 19.10. If this patch is not merged soon, the next LTS of Ubuntu will have this bug :( As far as I understand, what needs to be solved is this issue so that the latest hotfixes are bundled. (BTW I have to thank Timotheus Pokorra, the person in charge to package Mono in Fedora, for his help on this matter so far.)
- GNOME community: I’m in search for a home for this project. I don’t like that it lives in my GitLab username, because it’s not easy to find. One of the reasons I’ve used GitLab is because I love the fact that being open source, many communities are adopting this infrastructure, like Debian and GNOME. That’s why I’ve used as a bug tracker, for merge requests and to run CI jobs. This means that it should be easy to migrate to GNOME’s GitLab, isn’t it? There are unmaintained projects (e.g. banshee, which I couldn’t continue maintaining due to changes in life priorities...) already hosted there, so maybe it’s not much to ask if I could host a maintained one? It's probably the first Gtk-based wallet out there.
- Please don’t ask me to add support for your favourite %coin% or <token>.
- If you want to contribute, don’t ask me what to work on, just think of your personal itch you want to scratch and discuss it with me filing a GitLab issue. If you’re a C# developer, I wrote a quick F# tutorial for you.
- Thanks for reading up until here! It’s my pleasure to write about this project.
PS: If you're still not convinced about these technologies or if you didn't understand that PoW video I posted earlier, I recommend you to go back to basics by watching this other video produced by a mathematician educator which explains it really well.
Labels: CSharp, General, Gnome, Ingenieria, Miscelanea, Mono, Programacion, Seguridad, SoftwareLibre, Xamarin
Wednesday, January 23, 2019
WORA-WNLF
- Xamarin (the company) was bought by Microsoft and, at the same time, Xamarin (the product) was open sourced.
- Xamarin.Forms is opensource now (TBH not sure if it was proprietary before, or it was always opensource).
- Xamarin.Forms started supporting macOS and Windows UWP.
- Xamarin.Forms 3.0 included support for GTK and WPF.
Labels: CSharp, General, Gnome, Ingenieria, Mono, Programacion, SoftwareLibre, Xamarin
Tuesday, March 17, 2015
How do you upgrade your distro? A tale of two workarounds
Every classic Linuxer would know why it's very handy to dedicate a separate partition for the /home folder of your tree: you could in theory share it between multiple OSs that you installed in your box (which you choose to run when you start your computer).
Now, I'm guessing that many people reading and nodding to the above, will also know that sharing /home/ is one thing, sharing $HOME (/home/yourUserName) is a completely different beast.
For example: you have a stable distro installed in your box; you decide to install a new version of that distro along the old one, in the same box. You run the new distro with a new account tied to the old /home/yourUserName folder: KABOOM!!! Weird things start happening. Among these:
- The newer versions of your desktop or desktop programs don't run properly with the settings saved in your .dotDirectories (they are to blame because they didn't probably have a settings-conversion feature).
- The newer versions of your desktop or desktop programs have a buggy settings-conversion feature; because your program does not run properly, or as well as it would have run if it had been ran for the first time with no settings saved at all.
- The newer versions of your non-buggy desktop or desktop programs convert your settings to a new format. Then when you go back and run your old distro again, your old-versioned programs stop working because they see settings in a new format which they don't understand. (This is impossible to fix, or very hard.) It's very important that this scenario works, because the migration to the new version of your distro may not be immediate, it may take you some days to figure everything out, and until that happens, you want to still be able to run the stable version of your desktop and desktop programs
- Etc.
To workaround these problems, I have a strategy: I use a different /home/ sub-directory for each distro installed in my system. For example, for distro X version A.B I use /home/knocteXAB/, for distro Y version C.D I use /home/knocteYCD/. The advantage about this is that you can migrate your settings manually and at your own pace. But then, you may be asking, how to really take advantage of sharing the /home folder when using this technique?
Easy: I keep non-settings data (mainly the non-dotfiles) in a different /home/ folder with no associated account in any of the distros. For example: /home/knocte/ (no version suffix). Then, from each of the suffixed /home/ subfolders, I setup symlinks to this other folder, setting the appropriate permissions. For instance:
- /home/knocteXAB/Music -> /home/knocte/Music
- /home/knocteXAB/Documents -> /home/knocte/Documents
- /home/knocteYCD/Music -> /home/knocte/Music
- /home/knocteYCD/Documents -> /home/knocte/Documents
- Etc.
- Debugger not stopping on breakpoints.
- Builds breaking with obscure error messages.
- Debugger opening file in the IDE which was already open, duplicating two tabs for the same file.
- Etc.
So I had to use a workaround for my workaround: clone all my projects in $HOME instead of /home/knocte/Documents/Code/OpenSource/ (yah, I'm this organized ;) ).
I've been trying to fix these problems for a while, without much time on my hands.
But the last weeks a magical thing happened: I decided to finally sit down and try to fix the last two remaining, and my patches were all accepted and merged last week! (at least all the ones fixing symlink-related problems), woo!!!
So the lessons to learn here are:
- Even the slickest workarounds have problems. Try to fix or report settings-conversion bugs!!
- Don't ever quit trying to fix a problem. Some day you'll have the solution and you will realize it was simpler than you thought.
- realpath is your friend.
- MonoDevelop (master branch) is now less buggy and as amazing as (or more than) ever (</PUBLIC_SERVICE_ANNOUNCEMENT>).
Labels: CSharp, General, Gnome, Mono, Programacion, SoftwareLibre
Tuesday, May 20, 2014
Banshee GSoC-2014 projects under Gnome umbrella
This time, Google has given plenty of slots to the GNOME project, so we could accept many participants, including 3 brilliant students to work on the Banshee project. In case they haven't blogged about it, or didn't give much detail, I'll elaborate a bit about what they will be aiming to do these months:
- Nicholas Little will be working on creating a new extension for Bluetooth synchronization, and if time permits, refactoring our MTP support. In regards to the latter, if you have an Android phone you might have experienced some bugs getting it to work with Banshee lately (our MassStorage synchronization support is great, but the latest versions of Android have been deprecating this mode in favour of MTP, which we never supported very well); we have been working hard on fixing them, but Nicholas is going to try to give it that extra push at the end of the summer, which I'm confident he will do very well (he was the developer who brought Symbian support for the masses -or rather, for his Nokia N95 ;) -, on Banshee 2.9.0). And you may be wondering, why do we need Bluetooth sync? Well, we understand that it's much slower than USB or Wifi, but:
- USB can work for the first sync, but whenever you update your library, I never remember to connect my phone again with my cable, or I'm too lazy to do it. Now imagine that whenever your phone is near your computer (and of course if you have Banshee running), they could negotiate together to update the sync without the need of moving a finger!
- Wifi could work also for the use case I just explained, but getting Wifi to work, compared to Bluetooth, would involve creating an app for the phone that could talk with Banshee. And we all know what are the problems associated with that: we would need to be cross-platform for at least the 3 main mobile platforms out there (well, iOS wouldn't even work neither with this nor with Bluetooth, because there are no public APIs to integrate with the music database of the OS, sigh iTunes...), and that means a lot of maintenance burden (even if we choose a same-language native platform like Xamarin), and a user experience that is not so seamless (as it would require the user to install an app first).
- Marcin Kolny, which has convinced us that he will do a great job given his great patches and the fact that he's already very involved in opensource (maintainer of C++ bindings to GStreamer if I recall correctly), will be working on integration with AcoustID. To summarize it very bluntly, AcoustID is the open-source alternative to Shazam, so thanks to this, if you have many tracks in your library which didn't get ripped properly with tags, or you got from some friend which is not very metadata-driven ;) then you will be able to fix this situation! We will be likely reusing the MetadataFixer extension that we already have in Banshee, to not reinvent the UI wheel.
- Dmitriy Petukhov, a very motivated Russian student, will be helping us get two extensions in shape, which were developed in the last GSoC (more details about this in my previous blog post), but were not ready for mainstream yet. The FanArt.TV extension, which retrieves artist logos and shows them next to your album icons, needs some caching (we could even violate FanArt.TV service's ToS if we don't do this) and UI polish (our ListView widget doesn't play well with differently-sized images, so we need to modify this custom GTK widget to allow rendering rows with different heights). The SongKick extension works great, but also needs caching, and it especially needs GeoLocation to maybe even work autonomously (imagine, you don't even know what SongKick is, and because you installed the banshee-community-extensions package of your distro, you suddenly get told that one of your favorite bands is soon playing a gig near your city!).
I'm very happy about starting the mentoring of these projects this year. And I'm specially jealous about my students... I became mentor of GSoC myself without being GSoC student first! (Maybe I should switch roles in the future?)
Wish them good luck! It was actually just yesterday when GSoC really started! (gotta love mondays)
UPDATE: Fixed embarrassing typo: I meant AcoustID, not OpenID!
Labels: General, Gnome, Mono, Programacion, SoftwareLibre
Monday, May 05, 2014
GSoC 2013 with Gnome
In summer 2013, Tomasz Maczynski worked on Banshee as a GSoC student, and he did great work! He developed a SongKick extension, and a FanArt.tv one. Both were worked on in the banshee-community-extensions repository. They work very well but there are a few downsides about this work, which we didn't have time to fix:
- The FanArt.TV extension depended on some Banshee API that hasn't been added yet to mainline. The patch to add it lived in bugzilla for a while, in a bug about a feature request to have images in the artist list. The reason for not committing the patch even if I had already reviewed it was because I was wary about it, since it allowed FanArt.TV to hook its ArtistList widget, but wouldn't be really extension friendly. What I mean is that if there was other extension that wanted to also attach a different ArtistList, it would conflict with FanArt extension when enabled at the same time. The ideal thing would be to expose this functionality as an extension point, so that if more than one extension attached a new kind of ArtistList widget, the user could switch between the two from the UI when both extensions were enabled. When I mentioned this in the bug, awesome Banshee-extension developer Frank Ziegler jumped in and created the extension interface necessary for this. I've been reviewing the patches in the last days (couldn't do it before because I really wanted to release 2.9.1 and 2.6.2 versions before landing this work) and I'll likely commit them this week.
- The FanART.TV extension uses Hyena's ListView widget to show images. This is the main widget that Banshee uses for showing the tracks in the main view. It's a great custom widget because it allows very fast rendering of data coming from an SQLite database, but it wasn't optimized for rendering images. The main disadvantage of it is in the case that images have different heights, because the ListView will just allocate a height for each row equal to the tallest of the images used. This means that the widget shown could be a bit ugly if you have many artists in your library and some of them have very differently sized images. Tomasz worked on this a bit, but couldn't finish it because of lack of time (we have a WIP patch). But fortunately this will be fixed this summer!
- Both SongKick and FanArt.TV don't implement caching yet. This is not only important to save bandwidth from the point of view of the client, but also from the point of view of the server! (We could even violate their ToS if we didn't implement this, IIRC.) Fortunately this will be fixed this summer!
- SongKick extension provides several ways to discover gigs: searching by city, by artist, etc. It even suggests you artists extracted from your library that composed songs which you marked with a high rating! But IMO this is not enough, SongKick extension should even be smarter and query ahead of time looking for your favorite artists *and* near your area (doing the latter via GeoLocation). Fortunately this will be fixed this summer! (and we will use Gnome infrastructure for it)
That is all folks! Stay tuned for the next blog post, which will explain the plan for GSoC 2014 (this year I get to mentor three students!).
Labels: CSharp, General, Gnome, Programacion, SoftwareLibre
Sunday, May 04, 2014
Belated Gnome .NET Hackfest post
- I got my house refurbished in the last months, which has been such a long planning endeavour, and a real stressful PITA while it was being done.
- Before the above started, and after it was finished, I had to move, so that's 2 moves! (I hate moving)
- I've been kind of busy in regards to Gnome-related contributions: we released Banshee 2.6.2, GStreamer-Sharp 0.99.0, Banshee 2.9.1, and a big etcetera (including pre-mentoring for GSoC! more about that in a subsequent post).
- Hylke Bons, sparkleshare creator, Red Hat designer.
- Mirco Bauer, smuxi creator and debian developer (mono packager).
- Jo Shields, debian developer (mono packager), Collabora sysadmin.
- Robert Nordan, Pinta contributor.
- Jared Jennings, Tomboy contributor.
- Stephen Shaw, ex-Novell coworker (build developer), and currently at Xamarin. (Yes, I was Stephen's team-mate when at Novell, but had never met him in person!)
- Stefan Hammer, Tomboy contributor and hackfest local-host.
- Timo Dörr, Tomboy and Banshee contributor, GSoC student.
- Stephan Sundermann, GSoC student for GStreamerSharp and Bindinator.
(BTW I didn't include the awesome Bertrand Lorentz, fellow Banshee co-maintainer and GtkSharp gatekeeper, in the list, because I had already met him before, it wasn't my first time!).
And it was with the latter Stephan (not Stefan) the one I ended up spending more time with, because we decided to work on the new GStreamerSharp bindings since the 2nd day of the hackfest (the 1st day I mainly worked with Bertrand to release Banshee 2.9.0, our first Gtk3 compatible release, which he already blogged about).
So what was special about this work?
- GStreamerSharp 0.10.x releases were not compatible with GStreamer 1.x releases, so this had to be fixed soon. However, much of the architecture of this old version of the bindings used many manually crafted binding code.
- Stephan, by using the new Bindinator (a GObjectIntrospection metadata parser that outputs GAPI metadata, that allows generating .NET bindings, created by Andreia Gaita) in his GSoC, created a better foundation for the new bindings.
- He targetted GI metadata from GStreamer 1.0 and 1.2 versions (the jump from 0.10 to 1.0 was a big and not easy leap, since lots of APIs were modified and deprecated).
- We needed to polish them enough to make Banshee be able to consume them without glitches.
Main kudos should go to him though. I mainly added Banshee expertise, gtk-sharp contributing expertise, and lots of motivation (or at least I thought).
We had a big success: a Banshee playing audio with GStreamerSharp. Unfortunately video playback was freezing. But some months later after the hackfest we fixed it, and we released first GStreamerSharp 1.0 preview, which we called "0.99.0", and we released the first Banshee release that depends on this work: 2.9.1.
And it was my first time in Austria (and in Vienna). Overall a great experience, and I need to mention our awesome sponsors:

Labels: General, Gnome, Mono, Programacion, SoftwareLibre
Monday, October 28, 2013
Launchpad pull request
Stop right there! The content of this blog post has been migrated to this question in stackoverflow. Move on, nothing to see here.
Labels: General, Miscelanea, Programacion, SoftwareLibre
Friday, June 14, 2013
Modernizing blam's autotools (or shaving the yak to move out from GoogleReader...)
Yes, I've been victim of Google's cuts too... And I was wondering, where should I move? Feedly? ThingyBob? Well, I shouldn't make the same mistake twice, right?
Actually, some time ago I was using a desktop app to avoid relying on software that I cannot control (yes, vendor lock-in, the most important thing that open source tries to solve, right?): Thunderbird. But somehow the convenience of a web app (that I can access from any computer) and the hassle of using my mail client for RSS reading made me move to the web.
I should be able to find a replacement that no company or individual can "take down", and which feels less clunky than Thunderbird for reading RSS. So, enter blam (in the future I'll figure out how to sync its state between computers, maybe using SparkleShare?, to achieve that same convenience that a web-app provides), that Gnome app that has strangely managed to not catch my eye until now...
Well, maybe because if I install it from debian sid and I try to import my very first RSS feed from my GoogleReader list it doesn't work? Well, apparently it is a bug that is already fixed upstream, thanks to Carlos which has modernized the way that the program deals with XML and serialization.
Then I went ahead and tried to compile master myself... and guess what, the autogen.sh execution fails. Here the yak shaving begins, when I feel like this when trying to fix the autotools stuff:
Fortunately, after some tinkering (and some copy&paste from banshee's build scripts), I managed to fix the problem, and also modernized a bit some things (like using the brand new ".ac" extension instead of ".in" for the configure script, or using properly the AC_INIT and AM_AUTOMAKE_INIT macros,...).
Anyway, the real thing to highlight here is that while I was fixing this stuff and pushing to the repository...
... I saw some really good stuff committed by Carlos: using the new .NET 4.5 C# async patterns to get rid of those ugly callbacks! Kudos to him.
And if you're willing to help more with our autotools housekeeping, please do, I still feel this autogen.sh is way too long and needs some ironing.
* And if you're wondering what's up with GSoC (aka Google Summer of Code):
- I had Nicholas Little lined up to work on Rygel+Banshee integration, but sadly he couldn't apply due to work commitments (hopefully he will still work with me on it in his spare time).
- I had Rashid Khan lined up to work on Cydin+Banshee integration, but sadly there were not enough GSoC spots for him :( (fortuntately he told me he still wanted to work on it with me in his spare time).
- I had Tomasz Maczyński lined up to work on Banshee integration with more REST APIs, and fortunately he was selected! So expect some nice FanArt.TV and SongKick plugins soon!
Labels: CSharp, General, Gnome, Mono, SoftwareLibre
Tuesday, May 01, 2012
Apple and LastFM can still receive open source love
But contradicting what you may think, open source is still friendly to them.
If you have an Apple device supported by libgpod* and you're an avid user of LastFM's scrobbling feature, you can today configure Banshee to send all the songs that were played on your device to your LastFM account the next time you connect your device while you have Banshee running.
Pretty handy, especially if you own a device that doesn't have internet connection these days (something definitely not on the rise). You should thank our new Banshee developer Phil Trimble for doing an awesome job on implementing this feature (and on resisting to not sending me to hell when I made the patch reviews...).
The next version of Banshee, in the 2.5.x series, should include this feature. Until then, hold on to your seats! (or compile it yourself from master ;) )
* Beware: not the last generation ones! you would have to donate to libgpod project if you want those recognised.
PS: If you're a developer and want to extend this feature to other kind of devices, you should just implement the interface IBatchScrobblerSource in the corresponding Source class of your device. If you want to make it scrobble to a different service than LastFM, just create a Banshee addin (simple sample here) that subscribes to the ServiceManager.SourceManager.SourceAdded event to then later subscribe to the IBatchScrobbleSource.ReadyToScrobble event from it, to later make the corresponding HttpWebRequests to the scrobbling service.
Labels: CSharp, General, Gnome, Mono, Programacion, SoftwareLibre
Sunday, May 08, 2011
#gtk#
I had never seen this channel with people in it at all in the past. I guess the recent interest comes from the fact that gtk-sharp master is already targeting Gtk+ 3.x API and some people are starting to use it to port things.
One example is Hyena, the awesome library that Gnome projects F-Spot, Banshee and PdfMod use (am I missing some other?). I started the port some weeks ago and all I have received is positive feedback, encouragement, and also a lot of help! For example Olivier Dufour (which I guess he will be recently known as one of the superstars that brought DVD support to Banshee -- work finished but still unmerged) who helped with accessibility and warnings, and Mike Kestner (father/maintainer of all these GAPI-based *-sharp bindings) which helped reviewing my patches to the binding and fixing other issues I reported (and of course for making huge efforts, in the first place, to have the bindings ready for the 3.x cycle, with even some GObject-Introspection experimentation, which I guess is still in the early stages and not enabled yet).
Stay tuned for the progress! (as new contributors have expressed interest in helping out soon). Branches are being created so you can join the effort if you feel like (bugs in bugzilla too, to track what's pending).
Labels: CSharp, General, Gnome, Mono, Programacion, SoftwareLibre
Monday, April 11, 2011
Calling hackers who care about Android+Banshee
Unfortunately my Android phone broke completely (don't ask me the details...) so I cannot work on the patch anymore. Anyone wants to continue the work?
If yes, go ahead and ask me anything you want, I'm usually in irc://irc.gnome.org/banshee with the "knocte" nickname, or you could also ask the question on the channel if I'm not there, there are usually awesome contributors there that will try to help. If you haven't ever coded for banshee, check the Contributing page first.
BTW, kudos to all the people involved in the Banshee v.2.0 release!
Labels: CSharp, General, Mono, Programacion, SoftwareLibre
Sunday, April 10, 2011
WTF reduction
What it basically does is a bit of what I call WTF reduction: you will no longer get a confusing message like "For property 'Foo' expected 'Bar' of type 'Bar' but got 'Bar' of type 'Bar'" when unit testing your entities' properties.
AFAIK the next release will include this, and will be the first one to link to the new version of NHibernate, 3.0, which I've found that works very well.
Labels: CSharp, General, Mono, Programacion, SoftwareLibre
Sunday, March 27, 2011
RT: MEF vs MonoAddins
> Can you give a short summary on why you replaced MEF with Mono.Addins?
Basically it came down to maturity. Mono.Addins seems far more stable and mature than MEF. The MEF documentation was lacking, inconsistent and out of date in a lot of places. But all that could be worked around, and for the first few internal versions of our app, MEF was servicing us just fine.
Then our addins became a bit more complex. We needed to package them up with multiple files, ideally distribute them as an archive, host them online in a plugin exchange, allow them to be discovered and installed easily. Essentially this page covers features in Mono.Addins that made us switch rather than implementing a lot of the same things using MEF ourselves:
http://monoaddins.codeplex.com/wikipage?title=Creating%20and%20Managing%20Add-in%20Packages&referringTitle=Programming%20Guide
At the time as well MEF had issues on Mono on linux. This might have been a problem with how we were using it, but it just turned out easier to plonk Mono.Addins in instead. Was an easy migration and has a lot more power and features straight out of the box (and it worked on Linux).
Your millage may vary, and your needs are probably different. MEF might be an awesome tool for your requirements. It is a little simpler to get up and running and requires less engineering to support it (which was one of the reasons we used it first off).
Hope that helps,
Michael
Labels: CSharp, General, Mono, Programacion, SoftwareLibre
Wednesday, September 08, 2010
Version Tolerant Serialization with Mono
(Zoot Woman - Lonely By Your Syde)
During the last months I've kept working {with|on} Mono, but not working for Novell anymore.
Today I'm proud to blog about a bit of work I've done on Mono towards a better Binary Serialization experience:
- mono-api-info command now can output ABI instead of API if you append the flag --abi. It has been useful for us in LindenLab while working on binary serialization compatibility between versions (already upstream!, so will be available in Mono v2.8, even with a new man page).
If you ever wondered why your .NET code is no longer capable of deserializing some old binary object you had in your servers, instead of fixing the problem in a case-by-case basis, you can now see the whole picture by just diffing the output of mono-api-info --abi from your current and old codebase! A small TODO that I haven't completed yet is to deal with automatic properties (because we still don't use them) so that would be an exercise for the reader! - Fix for upstream Mono to act as .NET in regards to Version Tolerant Serialization, a patch to which I have just added a lot more unit tests (soon to be pushed hopefully).
You can see the patch of this quite old mono bug here. Disclaimer: to be honest you will only need the previous --abi tool if you use a Mono version prior this fix, because from my testing VTS in MS.NET works as if every new field had an [OptionalField] attached! (At least the BinaryFormatter, the TODO here for the reader is to test the SoapFormatter ;) )
On a totally unrelated note: kudos to the MonoDevelop team for making such a great releases lately (and fixing the bugs I report so promptly). I've been testing it the last months on Windows and I can say it's a great experience to see your favorite IDE working cross-platform and making you not depend on VS anymore if you need to work on Windows from time to time (I know the Express versions are free, and are great! but they do not support plugins :( ). BTW, I've been lately experimenting with the C language support in this IDE, and have had some problems, but the real culprit seems to lay behind some wierd behaviour of my gdb in opensuse. Taking advantage that I'm in opensuse planet, can I do a couple of lazyweb requests?:
a) If you're quite familiar with gdb, can you take a look at these 2 bugs in case it rings any bell for you? BNC#588175, BNC#459274
b) Can you try to reproduce those bugs in openSUSE 11.3? (I haven't migrated yet from 11.2 because I fear about the HALlessness of it :) )
PS: Wondered why the video on the top? Well, I like the trend that some people have about posting random photos in their blog posts even when they may be completely unrelated, but in my case I love music so I figured this would suit better. Of course I would rather embed a WebM video or, even better, something that can preview a song (without video) in a "normally-lower-quality-than-what-you-can-buy" way, so if you have any hints, those are welcome! I especially mention the latter in this case because the Album version of the song above is much much better (synth pop FTW!).
UPDATE 28-AUG-2012: Found a video-less alternative to youtube for embedding songs! It is GoEar.
Labels: CSharp, General, Ingenieria, Mono, Programacion, SoftwareLibre
Tuesday, July 06, 2010
Mono? What?
.NET Culture Shock: Why .NET Adoption Lags Among Startups
Especially sad to find that Mono is not mentioned in the article.
Especially super sad to find that Mono is mentioned in the comments, but in a negative way.
Hey Mono community, help me reply all this nonsense.
Labels: CSharp, General, Ingenieria, Mono, Programacion, SoftwareLibre, WebDev
Monday, June 01, 2009
It's all about synchronization
Who could have imagined at that time, that 3 years later I would not only be working for Novell, but also be able to contribute to it at normal work hours! Yes, this is ITO, and our team spent a week hacking on other projects. In my case, I worked with the awesome guys Stephen Shaw and Mario Carrión. We managed to create an iFolder appliance for the server based on openSUSE 11.1, very easy to install thanks to SUSE Studio and to a new OBS repository where we packaged a preview of Mono 2.4.2 and some fixes needed to make it work.
We even created some demos! (Sorry for the quality of the sound, we had some problems when recording them)
The first one: setting up the appliance.
The second one: creating a user and using the Linux iFolder client.
Now, the next two videos are intended to show the second part of our work on that innovation week: new features.
The third one: automatic/immediate local detection of changes, server side trash can.
The fourth one: automatic/immediate remote synchronization of changes.
How cool is that? Unfortunately, the patches still need work and cleanup (help welcome!), but I plan to do it soon and/or on next hack week.
Before coming back to hacking on iFolder, I wanted to finish some stuff am working on for Banshee, which is also about synchronization! Look at this bug for more details. Yes! bidirectional Rating synchronization, not only from Banshee to the iPod but from the iPod to Banshee. The patch is working fine for me, be sure to give it a go and provide some feedback. Thanks!
Another thing I have on my TODO list is integrate some old mono-based GPL ed2k library into monsoon, now that it's getting MonoAddins support! (Lately there's been many people asking me for the source code.) And now that I talk about monotorrent, how cool would be to make iFolder work with this awesome library??
PS: Hello PlanetSUSE! First post. Hola Planeta GnomeHispano ;)
UPDATE Jun-08-2009: It seems someone wants to resurrect the lphant kernel as well, but using WPF! (WTF?): http://sourceforge.net/projects/hathi/.
Labels: CSharp, General, Mono, Programacion, SoftwareLibre
Monday, March 30, 2009
I14Y happens
Some months later I came to know the new term 'a11y', and I started to see it in a lot of places. By that time, I only associated it with the web development world. Terms like "Unobstrusive JavaScript" were very related to it (and I even created an "AJAXy" library called AMUSE for this purpose).
Now let's talk about the next one: I14Y. This concept is present when things like this happen: "I can open an (Microsoft's)OpenXML file with some (Novell's) edition of (Sun's)OpenOffice". Or even more weird things: "I can manage my (Apple's)IPod thanks to a (Microsoft's).NET-powered application called (Novell's)Banshee". Or even more awesome ones: "I can use (Sun?'s)Orca screen reader to control my (Microsoft's)Windows.Forms-powered applications in my (Novell's)SUSE Linux Box!".
So, yeah, we made it! Along with the awesome releases of Mono 2.4 and MonoDevelop 2.0.
Now, guess what's the word?
Labels: CSharp, General, Ingenieria, Mono, Mozilla, Programacion, SoftwareLibre, WebDev