Fri Mar 13 23:39:01 IRST 2020

Viewing Tips

To make this blog page easier to read, one thing you can do is simply zoom in on the page. Because it is not currently well-formated for widescreen displays, another trick you can do is simply decrease the width of the window; one way to do that is by relegating it to one half of the screen, which can be automatic in some UI's.

Posted by admin | Permanent link | Translate | File under: english

Wed Mar 11 23:49:05 IRST 2020

Font Size

I think it would be nice if my blog had larger text, but I can't figure out how to do that, so you're just going to have to zoom in to make it more readable.

Posted by admin | Permanent link | Translate | File under: english

Wed Mar 11 00:39:43 IRST 2020

Trying Nano

For years I used to use vim exclusively on unix-like systems, not wanting to bother using another text editor. I had the idea that vim is more powerful than simpler or easier editors and therefore was worth its weight. Of course, long ago when I first started using Linux I had also learned the basics of emacs and could still appreciate its capabilities, though I do not use it any longer and have almost forgotten how.

Recently I decided to take a look at other text editors for writing these blog posts in text mode, because I found that while vim is good for editing files, it's not that great for writing and editing lengthy natural language texts. I thought I would use something like emacs that is always in edit mode, but my server has very limited storage, and the thought of sacrificing 100+ megabytes for emacs was not appealing. (That is for emacs-nox, mind you.) In my search for lighter emacs-like text editors, I found that some tiny clones of emacs have gotten rather famous over the years, with Linus Torvalds using some version of micro-emacs. I was pleasantly surprised to find one version, "mg", actively maintained and widely available, even available by default in OpenBSD.

While looking at tiny editors, of course I had to take a second look at nano, which I had come across some years ago and whose fame I'm well aware of. One thing about it I really didn't like was how obnoxiously it displayed a "frequent commands" menu at the bottom of the screen all the time, obviously to help people who have no idea what they are doing to get around. Of course, as a learner I was able to make use of it, and after determining to really make an effort to use nano quickly learned how to disable the menu so I could get on with my editing.

Now after spending some time playing with nano and studying its commands, I've common to the conclusion that while being beautifully and elegantly simple and easy to use, it has a perfect balance of functions and features to make the editor truly powerful. In fact, I feel rather foolish now for not having used it all these years in cases where it clearly would have come in handy.

Well, that doesn't mean that I'll be ditching vim any time soon, as I'm much too used to vi commands by now. A lot of vim's common commands I use instinctually, almost reflexively, so no doubt trying to use nano for everything would cause a fair bit of frustration, but habit aside it is fairly equally capable for most of what you'd need to use a basic text editor for. (Not sure if I'd want to write code in it, though.)

So maybe switching between vim and nano is like switching between screen and tmux. I know a lot of people like tmux, but I've always preferred screen, and I even tried using tmux for a while to see if it was really better! Anyhow, for nanoblogger, the nano text editor is exactly what I was looking for. Maybe for science I'll spend some time using mg as well.

Posted by admin | Permanent link | Translate | File under: english

Tue Mar 10 02:24:04 IRST 2020

Minor Update

Created a simple contact page linked it in the side panel.

Posted by admin | Permanent link | Translate | File under: english

Fri Dec 20 20:16:58 IRST 2019

Digital Freedom With Conversations

On a chilly December in Mashhad in 2019, I was sitting in a coffee shop with my friend Vit from the Czech Republic, who had come to my university to take Persian classes. In what might be considered stereotypical fashion, I was drinking an Americano and he had his usual V60.

Because Vit liked to go out for coffee quite often (it beat sitting alone in his small hotel room), we had the opportunity to talk about a lot of things. Being the civically minded person that he is, we talked a little bit about international politics and civil society in places like the EU. With Brexit well underway and the prospect of possibly seeing a united Craicistan in our lifetimes, it was impossible to avoid talking about such things. Having specialized in the study of the EU, Vit is a real expert.

As the conversation meandered into the broader state of things, Vit began to talk about the threat of "big data", and how large corporations like Facebook and Amazon are a threat not only to individuals, but to democracy, no less.

After all, what good is there in such businesses who know literally everything about you and keep track of everything you do online and offline? Facebook has access to your WhatsApp and Instagram, and alternatives like Telegram are only slightly better because in the end they are accumulating all your data on their servers, available for access at any time.

Being the tech enthusiast that I am, I already knew about and used good alternatives to these online platforms. Several months ago, my wife and I stopped using WhatsApp and Telegram entirely when I discovered the Conversations app and how to run my own messaging server.

The problem was, that while I raved about Conversations and showed it to my friends, none of them cared or showed interest in it. What do they care if it grants them privacy and true freedom from such evil corporations? That it saves democracy? I had even shown it to Vit personally and explained what it is a couple weeks prior, but clearly no one was interested.

I often mulled over the idea of writing a blog post attempting to explain to people why they should use Conversations and the open messaging protocol it utilizes, XMPP. It's harder than you think, because people don't really care about their privacy or freedom. They don't care how good the tech is, that decades of engineering has gone into the production of such amazing software. They don't care that it saves democracy, prevents genocide, etc.

But you know what? I don't care that they don't care. I have to write posts like this because at the very least I don't want the apathy of others to translate into apathy on my part. I'll just write the posts anyway in case even just one person benefits from it.

I realize that some people would use the XMPP messaging protocol if they simply knew what it is and knew how. Hopefully up to this point my post gave you some idea of what it is. (Even a slight idea.) Now here's how:

I'm going to focus on mobile because that's where people do most of their messaging nowadays. I could explain how to set it up on your desktop or access it via the web, which are all convenient possibilities, but mobile is our top priority.

First, get any Android device and install Conversations. It's on Google Play for a very small amount of money; you should buy it in order to support the project and its developers, who do important and thankless work. Alternatively, you can download it (also officially) for free from the software repository F-Droid. (Here is the link.)

If you use iOS there are other apps you can use. I can't help much there because I have little experience with Apple, but iPhone users often mention using ChatSecure. There is an app called Monal as well that I believe is available through beta testing.

Once the app is installed, you need to create an XMPP account. You can think of XMPP as working something like e-mail, where you need an account on a server, but it doesn't matter which one. To message someone you don't even have to be on the same sever; only their address is needed.

A lot of apps, including Conversations can suggest their own server. You're free to choose whatever you like, although if any of you plan to message me and send me attachments, I don't recommend using the service simply because it's blocked in my country and therefore I wouldn't be able to open attachments without turning on my VPN, which I hate doing.

If you're looking for a server to sign up with, the number available is a bit daunting. This page randomly suggests five servers every time you open or refresh it. comes highly recommended in spite of its silly name. (I suspect having an unattractive name is some clever way of controlling their user count.) They seem to have some affiliation with which also offers the service. (Yes, most of these guys are based in Germany.)

Other alternatives include and its related domains, which seems like a decent service based in Poland, based in Finland, in Spain, and so on. Some communities like and grant accounts if you write them a personal request.

Once you've got this working you can send me a message at or if you are having trouble getting it to work just send me a e-mail and I'll help you out. Only then will you be free from corporations like Google and Facebook spying on you and reading your messages.

Posted by admin | Permanent link | Translate | File under: english

Wed Oct 16 01:00:01 IRST 2019

ejabberd vs. Prosody

Like many people, I recently have been re-discovering the XMPP messaging protocol and ended up running my own server. In fact, this blog is essentially a result of that effort, though it functions independently from the XMPP service.

You see, I had used XMPP back in my college days when we used to call it Jabber and before today's most popular messaging platforms based their protocols on it. To me and many others, XMPP just meant (Sure, there were other servers, but one would expect the original implementation to be the leader and cutting edge.)

I kept using the protocol as much as was practical, though its practicality diminished greatly over the years. Over a decade passed where logging into with Psi or maybe Pidgin was a pointless affair. The protocol used to interoperate with Google Talk, but that eventually came to an end when Google gradually became more and more evil. (And this is a true story: They literally removed the "don't be evil" clause from their official corporate policy.)

So, what was the point of using XMPP anymore? Nobody used it, and messaging had revolutionized and gone mobile; nobody needed desktop messengers, but mobile phone ones. Even an app like Skype could not compete with services like WhatsApp and Telegram. XMPP would be a joke by comparison, with a handful of Android clients of abysmal quality and not suited for mobile use and mobile connections.

However, over the years XMPP silently evolved and grew powerful. Someone randomly mentioned to me online that they not only still use it, but that it's awesome thanks to modern clients like Conversations. Eventually I too decided to use Conversations, but for that I needed a server.

As it turned out, had dropped the ball. My account on their server still works even, but their server is not modern in the sense that it doesn't even support half the features Conversations needs to provide a great mobile experience on par with WhatsApp. (And yes, it really does this.)

I figured OK, I have what I need to run my own server. I just need to install the free software and let it do its thing. I think I had even played around with ejabberd once many years ago.

And that's where I fell into the trap that you might fall into as well. I knew that ejabberd existed and was available, but I thought, "Gosh, ejabberd is ancient! It's like the original XMPP server. And it's written in that probably obsolete language, Erlang." If is obsolete, what would ejabberd be? even stopped using ejabberd long ago in favor of a newer server.

That's why I did a quick search around, and Prosody caught my attention. I had heard of it once before, and at the time it had a pretty good reputation, and now it seemed to me like it was the most cutting edge and modern server. It certainly seemed to be the most currently popular, so people who know their stuff must all be using Prosody, right?

Well, Prosody got installed on my server the day I downloaded Conversations, and setting it up was indeed painless at first. It was simple enough to install and get up and running, and the base configuration was a breeze. I was able to log in right away and things were looking alright.

However, it didn't take long for me to realize that something was amiss. First of all, Conversations supports all these fantastic features that Prosody also supports, but they aren't ready out of the box. Some of the advanced features have to be enabled manually by loading "community" modules. That is, these are modules that implement some tricky features in the protocol that are not officially part of Prosody or supported by its devs, but are provided as a separate thing you can install made by community members who contribute them. Not to say that community modules are bad or anything like that, but the fact that they're separated is not totally desirable.

Now, Conversations is nice enough to tell you for the most part what is working on your server and what isn't. So the first step of enabling the modules I needed in order to have all the features I wanted was not too difficult. However, then problems started creeping in.

Some modules had dependencies to other modules that were not entirely clear. Some modules have zero documentation. Modules have their dependencies automatically loaded if you forget one, so that's not such a big deal, but some modules can conflict with each other, and you have to make choices as to which module is right for you. (For example, stream management for mobile devices.) But how do you make that choice when the models that you apparently have to choose between may not be sufficiently documented, or one is beta quality and may not work?

I spent hours and days tweaking my Prosody configuration to make Conversations happy. I talked to the Prosody people, Googled as many tutorials and configuration examples as I could find, and there was never any clear known-good setup. It was always just, "Well, maybe if you load this or that module it'll work this way." Every example config I looked at recommended different modules apparently without anyone really being sure which ones are needed and which ones aren't.

My hard work did yield some progress, and I got to the point where I had a config or two that should be perfect for my client, but there was just one show-stopper:

Without getting too technical, a mobile phone can't maintain a solid connection to the server all the time because mobile phones are very touch-and-go. The app gets backgrounded and put to sleep, the Internet comes and goes depending on your signal, and so on.

What Conversations is designed to do is work together with the server to understand that these things happen and not terminate your session and break your communications at the slightest hiccup. That means the client can lose connectivity and regain the original connection by letting the server know it's still there.

This is exactly what wasn't working with my Prosody server, and when Conversations tried to resume a preestablished connection it would just hang and never connect. This meant that it would frustratingly stop working after maybe half an hour from the time of connecting until I manually reset the connection. I could fix it by disabling that feature on the server, but then Conversations would always start a new connection to the server every time it needed to do something. That kind of inefficiency is bad for the phone's battery life, as it's working too hard on something it shouldn't have to be doing.

In the mean time, some of the connectivy problems manifested as message delivery errors, where Prosody would tell my client that messages had failed to deliver because of timeouts, but the other person actually was getting them. This is also a known issue with mobile configurations that a certain module can address, allowing Prosody to ignore apparent delivery failtures.

As it stood, my server wasn't cutting it, and after talking to the nice Prosody guys, the eventual conclusion that we were able to come to was that my modules were outdated, and I was encountering a bug that had already been fixed. The frustrating part there was that when I installed Prosody in the first place I made sure to check its version, as the whole point was to use the latest tech. My Prosody version was shown as the last minor release, so the package was fairly recent.

So in the end, I could not use my distro's Prosody packages if I wanted it to work, and I didn't really feel like manually installing things outside of my package manager, possibly experimenting with nightly builds or something like that. In the mean time I had heard a curious thing, which was that actually ejabberd was not a dead project, but in fact had lept ahead and was one of the most advanced servers out there.

I was a little skeptical, still clinging to the idea that ejabberd was outdated or at best inefficient, as Prosody claims to be faster or lighter on resources. However, after some discussion with others, I also learned that the Conversations project openly prefers and recommends ejabberd. But why?

Well, at this point I had to try it. It seems like a scary program that's difficult to set up, but at least I could tell my package manager to install it, so at worst I might waste a couple hours attempting to run it, let alone configure it. In a single afternoon I had Prosody fully replaced with a working ejabberd install, with virtually all features working out of the box.

You see, ejabberd is a very sophisticated piece of software. What it does is actually quite amazing (thanks in no small part to features built into Erlang), and the effectiveness of its design has not diminished with age. All the advanced features that a client like Conversations needs are built into the server and available out of the box. They're still modular by design, but they are included in the base package, and the integration is tight. Its cohesive design saves you a lot of pain.

Was it as easy to set up as Prosody? Not exactly, but I'd say it's only marginally more difficult. After installing the ejabberd package on my system, I had to resolve a slight misconfiguration in the server's config file that wasn't obvious at first. (It was a bind problem that may have been an oversight by the package maintainer.) The log output was helpful to that end, and once the server was able to load and run, adding user accounts was simple.

Over time, what I learned to appreciate about ejabberd is how easy it is to work with. There might be a bit of a learning curve at first, and its many features and endlessly configurable behavior is truly daunting, but it mainly just works as-is and needs only a light touch to fit your needs perfectly.

Contrary to what I was led to believe, ejabberd is definitely fast and efficient. It is also stable and reliable, and seemingly handles whatever gets thrown at it. It can do some things that no other server can, and it's flexible and straightforward. My personal opinion is that it's the opposite of Prosody in the sense that Prosody starts out easy but gets harder when you need to tweak it, but ejabberd is a little harder to start out with but makes your life much easier down the line.

ejabberd can also do incredible things like hot-reload the server's configuration while the server is running, and there's no break in service. You can literally reconfigure almost all of the server's essential functionality with no downtime. (Want to reconfigure ports? Change modules? No problem!) Less impressive but greatly appreciated is the server's web interface, which makes user management and status monitoring as simple as possible.

On top of all this, my version of ejabberd was not even the latest one at the time I installed it. (It has since been updated.) Some major XMPP servers are using an even older version of it and still do everything Conversations needs. I also have since customized the server to provide the exact functionality I want, and I'm completely satisfied. There's maybe only one or two features left that I could enable, and I technically don't need them. (For example, XMPP over HTTP if I wanted to offer a web client.)

Any downside? Well, my little server has severely limited storage, and ejabberd likes to use storage space. For one thing, message history never expires, so that'll grow indefinitely unless you do something about it. A simple command to the server in a cron job handles that nicely. The other thing is that the server by default logs basically all network activity, which will get out of hand even with normal activity levels. Knocking the log level down a notch solves this easily.

Is Prosody bad? Not at all. Just make sure you're using the latest version possible, and keep it up to date as well. ejabberd and Prosody are probably the two best XMPP servers out there, though to be fair I have not tried the others to see how they truly compare. However, if you're seriously thinking of running an XMPP server of your own, just use ejabberd. I really can't recommend it highly enough, and I'm no stranger to running network servers. It's really not every day that you get a chance to discover software as great as this.

Posted by admin | Permanent link | Translate | File under: english

Sat Oct 12 10:45:41 IRST 2019

Duolingo Incubator

I've been using Duolingo off and on for the past several years, and over that time I've ended up sometimes waiting a long time for a course to come out. I probably started some time back in 2014, and at that time there were only a handful of language courses available to choose from. To be quite frank, most of them didn't even interest me all that much, but I remember casually messing around with Irish and some Germanic languages.

As it happened, really interesting courses were coming up in the incubator, with some of them (such as Polish) having already been there for such a long time. (Years, I suppose.) The only thing I could really do was wait, but fortunately after a year or so interesting languages started going into beta. That is actually how I learned Esperanto, though I hadn't been waiting for it.

After all these years, many courses have been introduced to the platform—some quickly, some slowly. I used to check the incubator very often just to see what new language I could look forward to trying in the near-ish future (say, in the following months). Now I've grown used to not checking it, but today I decided to give a look because I remembered how fun it was.

Well, a few things were to be expected. Still no end in sight for the Yiddish course, but I was pleased to see that Scottish Gaelic is now upcoming, and Finnish is coming along. I have been particularly wanting to try Finnish, so I'll be sure to check that out. Additionally, I happened to notice that the Hungarian course, which came out years ago, is still in beta. Taking a look at their page, it appears that the reason is they are now expanding the course into a second, extended version, as many courses have done.

Most of the other languages in beta (Latin, Navajo, Klingon) I find interesting but have not really made the time to do anything more with them than a few lessons here and there. When the Navajo course came out it was particularly bad, but maybe they've managed to improve it since then. (Hopefully they've added audio.) The Klingon course is surprisingly good if you like bizarre alien languages. (Of course, if you like that then try Hungarian as well.)

Also of note is that many of the courses in incubation now are for speakers of languages other than English, a trend that has been increasing and is sure to continue doing so now that there are so many courses for English speakers. Courses like "Arabic for Spanish speakers" sound nice.

Since lately I've been getting into Nordic langauges again, a course I'd like to see would be Icelandic or Old Norse, and maybe even a Nynorsk version of Norwegian, though the Bokmål course is already fantastic. (It is, in fact, one of the longest and best-quality courses on Duolingo.)

I could write more about how great it is for English speakers to study Norwegian, but I can save that for another time. As for "X for Y" language combos on Duolingo, it seems quite impossible for them to ever cross-connect all languages, but they've already laid some foundational connections by having most languages available through English and, conversely, English available through most languages. It's my suggestion, however, that they do this with Esperanto instead. That is, they should make Esperanto available to speakers of all languages, and then make all languages available to speakers of Esperanto. The simple reason is that people learn Esperanto an order of magnitude faster and more effectively than English, so making knowledge of English a condition for accessing other knowledge is at worst a grave injustice and foolish at best.

I would love to respond to responses to my posts, so I encourage anyone reading this to send me an e-mail with their own thoughts or questions. And, of course, if there's languages that you'd like to see on Duolingo, you should let Duolingo know! (And wait five years!)

Posted by admin | Permanent link | Translate | File under: english

Sat Oct 12 00:49:10 IRST 2019

Image Test

Posted by admin | Permanent link | Translate | File under: english

Fri Oct 11 22:39:40 IRST 2019

La Blogo Funkcias

Jen la unua afiŝo en Esperanto.

Posted by admin | Permanent link | Translate | File under: esperanto

Fri Oct 11 21:27:13 IRST 2019

Blog Up and Running

Everything appears to be working.

Posted by admin | Permanent link | Translate | File under: english