Saturday, 22 October 2016

Honor to the Harkis

France is an amazing country. I can say this out and loud without risking to be considered a chovinist or something of the sort, as I have not been born here, I have no French nationality and I have a crappy level of French. I've just lived some time here and it has been enough to develop a certain feeling of belonging to it (which is pretty interesting for someone that never got any sort of identification with the coutry in his passport, just with a small "region" hidden between the sea, the clouds and the mountains). For sure this is not a perfect country, there are tons of problems: Islamofascism, la racaille, huge taxes spent in feeding people that don't want to be part of this community... but anyway it's a fascinating country.

The French Revolution, Laicite, an incredible culture, a last stage of the colonization "with a human face", the most amazing architecture in the world, an open, mixed and multicultural society... OK, OK, this post was not supposed to be an exaltation of the French nation, on the contrary it's to talk about a not so known disgraceful episode in its history.

If you are Spanish maybe you'll be thinking about the horrible treatment given to many Republicans seeking refuge when the fascist scum won the Spanish Civil War. I'll talk about an even more shameful episode (as it affected people that had fought for France), the Harkis. I prefer to use the term to refer to any Algerian Muslims fighting/supporting the French side in the Algerian independence war, regardless of whether it was officially integrated in the auxiliar units under that name.

You should read the wikipedia article, as I'm not plannig to resume it. I'll just say that to me what de Gaulle did, abandoning Harkis to death/torture in Algeria (see paragraph below) or interning in concentration camps the few that somehow (many times thansk to the aid of French soldiers disobeying de Gaulle commands) managed to reach France, is absolutely inhuman, an act of pure treason, that along with his decision to get out of Algeria rather than turning it into an overseas territory, places him, regardless whatever he did in the WWII, on the side of the monsters of history.

Hundreds died when put to work clearing the minefields along the Morice Line, or were shot out of hand. Others were tortured atrociously; army veterans were made to dig their own tombs, then swallow their decorations before being killed; they were burned alive, or castrated, or dragged behind trucks, or cut to pieces and their flesh fed to dogs. Many were put to death with their entire families, including young children.

What I find even more shocking of all this is that after the Algerian War the French government would be accepting an enormous amount of Non-Harkis Algerians. So France would open its doors to Algerians that had turned against France and supported the Algerian independence (but now were abandoning their beloved Algerian nation and moving to the "hated colonial empire" for a better future), while those ones that had spilled their blood to remain as a part of France were neglected or treated like beasts ...

In the last decades the French Government has recognized its responsibility in the Harkis tragedy, establishing a Day of National Recognition. I think it's particularly interesting the attitude of the FN, with its support and recognition for the Harkis, directly calling them "compatriots". This is quite interesting, cause while the FN strongly adheres to the disgusting idea of Jus Sanguinis (notice that for me the right to nationality should not be based on Jus Soli either, but in a proof of assimilation and loyalty), they accept a different (and quite beautiful really) condition to deserve the nationality, the blood risked or spilled (Français par le sang risqué et par le sang versé,). Anyone that (like the Harkis) has risked or spilled its blood to defend the French nation, is a French citizen. I really like this concept, and while I would consider it tragic and catastrophic if the FN ever reached power, it comes to show that it's not easy to consider them a real Far-Right party anymore. If they support that you can become a French citizan by your loyalty and your services to the French community, regardless of your DNA... it's quite difficoult to continue to consider them racists.

Friday, 21 October 2016

AsyncEnumerable

This is a topic that has got me confused a few times, and now that I have seen a reference to something similar for a future ES version, I thought of writing a short reference here.

Let's start by a necessary clarification. When we talk about enumerating/iterating/looping in an asynchronous way, there are 2 quite different things:

  • Obtaining the item is not time costly and asynchronous, what is asynchronous is treating the item. This used to be the most common case for me [1] 2. It's what I've usually called async-loops. You would have a list of items and an asynchronous function to run on each of them, and you will pass as callback a function to continue with the iteration. I've written about it a few times. With the advent of async the code is now pretty simple, as the compiler takes care of all the heavy lifting. We now can write code like this (in C#):
    foreach (var item in myEnumerable)
    {
    await treatItemAsynchronously(item);
    }
    
  • The other case is when obtaining the iteration item is time costly and hence implemented asynchronously. Thinking in terms of C# and IEnumerable/IEnumerator, that would mean having a sort of async MoveNext. Then, the treatment of the item could also be asynchronous, so we would have case 1 and case 2 together.

This post is focusing on the second case. It would be nice to be able to write something like this (which is just "fiction syntax":

foreach await (var item in myAsyncEnumerable){}

I've read somewhere of awaiting for a method returning a Task<IEnumerable<T>>. That makes no sense. What we could do is to return an IEnumerable<Task<T>> and use it this way:


class FilesRetriever
{
public IEnumerable<Task<String>>> GetFiles(){...}
...
}

var filesRetriever = new FilesRetriever(new List<string>(){"file1", "file2"});
			foreach (Task<string> fileTask in filesRetriever.GetFiles())
			{
				var fil = await fileTask;
				Console.WriteLine(fil);
			}

That is not so bad, but there is a problem. It works fine for cases where the the stop condition of the Enumerator (MoveNext returning false) is known beforehand, for example:

		private string GetFile(string path)
		{
			Thread.Sleep(1000);
			return "[[[" + path.ToUpper() + "]]]";
		}
		
		
		public IEnumerable<Task<String>> GetFiles()
		{
			foreach (var path in this.paths)
			{
				yield return Task.Run(() => {
				                      	return this.GetFile(path);
				                      });
			}
		}

But if that stop condition is only known depending on the iteration item (stop when the last retrieved file is empty for example), this approach would not be valid.

We could think then of some interface like this:

	public interface IAsyncEnumerable
	{
		async Task<bool> MoveNext();
		
		async Task<T> GetCurrent();
	}

that could be combined with a new foreach async loop construct. The loop would get suspended and the execution flow of the current thread would continue outside this function. Then once the Task.Result of that MoveNext is available another thread would continue (the sort of ContinueWith continuation) with GetCurrent, its treatment and the next iteration of the loop. This feature should come with the possibility of doing yield return await.... I assume combining the compiler magic used for yield and await will not be easy.

I've read that there are some requests for something similar

, and one guy implemented a pretty smart alternative back 5 years in time

In ES land, they got the async/await a bit later, but they are striding to get this async iterators thing in the short term. You can read about the proposal here

Sunday, 16 October 2016

Rotterdam

I had heard on some occasion about how interesting Rotterdam is from a Modern Architecture perspective, but I have to admit that having visited Paris-La Defense, London-Canary Dwarf, Frankfort (Mainzhattan) or Warsaw, I thought that I had already seen the best on offer for that in Europe (of course Istambul is not Europe, and as for Moscow... well, Rusia has little to do with my interpretation of what Europe means) and didn't expect Rotterdam to impress me. Well, I finally made it there a few days ago, and Rotterdam not just impressed me, it hypnotised me.

Of course Modern Architecture is not just high rise buildings, but for sure it's an essential part for me. Rotterdam is quite far from the highest heights in the E.U. (if you look here it does not show up until position 62! but it has such an amount of high rises (for me that means buildings above 80 meters) and scattered all over the city, not just in a specific business area, that I would say it's the most vertical city in Europe.

Most of these high rises are done with really good taste, some of the most impressive overlook on both sides that huge water extension that is the Nieuwe Maas, gifting you with an amazing skyline. Such an amount of high rises means that many of them are not offices, but residential buildings. That's great, because the idea of living in the 30th floor of a beautiful building (with a balcony as many of them have!) overlooking the river and with a view of this middle size metropolis is more than exciting.

For residential buildings, I loved these not so tall ones right next to the impressive new Central Train Station:

and also this 30-something stories dark twins:

Of course I really enjoyed the view of "De Rotterdam", "New Orleans" and "Montevideo":

that is even better when enriched by a "floating high rise" in the passangers terminal of the port:

I've always loved buildings with an upper part standing out of the base of the building. This is an amazing example

And as for the good taste of these constructions, these ones with dark brick facade and those green, steep roofs, along with their proximity to the Maastoren, just verge on perfection.

Not all the city is a continuation of modern buildings. There are many "very Dutch" areas, with 3 of 4 stories buildings in dark brick. Some of them are recent, but others seem to have a certain history behind (you should also note that while the Nazis raided by air the whole city center, other areas of the city were not affected). Furthermore, if you go to Delfshaven you'll find a good, and complementary, dose of traditional Dutch architecture and charm.

Thursday, 29 September 2016

Funny French Situation

I'm not much into talking about personal things in a permanent support, but this is pretty funny and I think it deserves to be published here.

First, I'm deeply ashamed for my lack of French spoken skills. I like this country a lot and I always talk about how immigrants must assimilate, but I'm very bad with languages (you can notice my crappy English just by reading this blog) and French is particularly difficult. Indeed for me it's almost like 2 languages, as the way you pronounce has nothing to do with what you write. Its written form is pretty complex (even more than Spanish), but the spoken form is just like quantum physics to me (its phonetics is so rich, and much more when your native reference is a language with such simple phonetics as Spanish).

The thing is that SNCF (the railways company) owes me 40 euros since 6 months ago, when their payment passarelle crashed just in the middle of purchasing some tickets. I first went to their offices, they asked me to call some number, then I was redirected to a mail address. After 6 months of waiting, and a last angry email, the guy told me that he could not do anything else, that he had created an incident months ago and if I had not received my money I should call another number.

So I called that number (expecting to ask one colleage to translate for me when they answered). It was the typical mess of "press 1 if... press 2 if..." I suddenly heard a nice "press X for English Service", great!

I was welcomed by a female voice (FV), and the conversation went like this:
FV: Bonjour, qu'est ce que je peux faire pour vous? (Hello, what can I do for you?).
Me: Bonjour, eh, do you speak English?
FV: A bit
Me: Ah, OK, mais, c'est le English Speaking Service?
FV: Oui, mais c'est la France!
From that point on the conversation continued in a mix of English and French, but the girl seemed not particularly willing to help.

So the thing is pretty funny and bizzarre. As I've said I'm deeply ashamed for my pitiful French skills and I would accept that after all this time being here some French people were angry with me for this. Indeed I think I really deserve a kick in my lazy ass for it... but well, if I call to the "English Speaking Service" of a huge company I expect to talk to someone that speaks English!!! This reminds me that months ago, when calling the first number that they had given me at that time, I ended up in the "English Speaking Service" talking to a girl that seemed to speak Italian!!!

This said, when I go to buy tickets directly to the station, the guys/girls there are always pretty helpful and nice. They'll smile to my clumsy attempts to speak French and we will end up speaking "Franglais" :-)

I think there are certain misconceptions (at least I had them) regarding the French people and foreign languages. There are more people that can speak English (mainly among younger generations) than I expected (and in Southern France many people can speak some, or even quite good, Spanish) and there is not a general rejection to speaking a foreign language, people will try depending on their knowledge (but yes, unfortunately many people just can't cause they never learnt). I guess the reason for this "never learnt" is a mix of several factors. In the past (as in Spain) the level at school was very minimum, so you should learn on your own (paying an academy, self-learning...). As it used to happen in Spain, if you didn't need it at work, you coud just get by without it. French (like Spanish) has a big enough community of speakers that most films or books you can be interested on will have been translated, and in the past people did not travel abroad so much. I guess for some people the idea of the lost of importance of French before English also caused a certain and reasonable rejection.

The interesting thing is that with the Brexit on one side and my lack of appreciation for the USA, I'm starting to question this idea of "English as the universal language". Unfortunately, I think there is no easy solution to this. What other "lingua franca" should we use in the EU? French, Spanish, German, Italian? So far I'd never seen much sense in using an "artificial language" like Esperanto, but well, maybe this could be the solution for future generations in order to talk a common language that is not "the language of 'the others'".

Wednesday, 28 September 2016

Cyclic Programming Trends

The other day I was taking a look into React.js (shit, I think I like it even less that Angular, I will ever be a "home made MVC + jQuery" nostalgic), and I came across something that seemed somehow familiar:

var App = (
  
);

This thing of mixing javascript with markup, I'd seen it before, way before, it was some sort of Mozilla extension to JavaScript (those times when Mozilla was adding to their JavaScript version some advanced features that still have not made it into ES6, like https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions. At that time (2005) XML was still all the rage, so it seemed natural to add support for XML into the language (the ES4 version). The "experiment" was called E4X, and yes refreshing a bit my memories, it was basically the same that JSX is now with html, with the difference that while that was fully integrated in the language, this is a sort of preprocessing stuff added to Babel.

I guess one reason for the abandon of E4X was that XML soon lost its relevance, but a second reason was that many people did not fill right to incorporate something so specific as XML into a general purpose language. I agree with this vision. Don't try to compare it to the support for Linq syntax in .Net languages, cause Linq applies to anything that can be queried, and that can be something as generic as a Collection. With JSX the approach of not having it as an integrated part of the language, but as a sort of preprocessing, seems reasonable.

This reminds me again how things in Programming and IT seem to come and go, and how when they return someone will brand them as a revolutionary breakthrough when it's just some varnish on top of an old (maybe good) idea that just did not get enough attention at the time. I can think of some clear cases:

  • Document Stores. Lotus Notes was a horrible technology to work with for different reasons, but it all revolved around a Document Database, something so praised in the last years.
  • HTML+JavaScript+CS applications. We've had that in Windows since a very long time ago, in the shape of HTA. One colleage in the office did a rather elaborated DataBase comparer with HTA rather than Windows Forms (that would have been the normal choice at the time) and it was a really neat tool, the UI was pretty much better looking that in most Windows Forms applications of the time.
  • Using JavaScript for your "shell scripts" via node is now a pretty good option. I've always liked its syntax more than Perl, Python or Ruby, and being prototype based since birth it's always been as powerful as a language (if not more). Using jScript in Windows seemed always a quite reasonable option to me, I could never understand why most Windows Admins would use VBScript (at least before the arrival of PowerShell)

Sunday, 18 September 2016

Liberte Pour Ebru

In the last months I've decided not too follow too closely the events in Kurdistan, cause it infuriates me, depresses me and feeds me with pure hatred to see how the Turkish Islamo-fascist state continues to massacre the Kurdish people, and now not only inside the (fake) Turkish borders, but also in Rojava. But yesterday, the breaking news were just in the Regional newspaper. A French-Kurdish girl from Toulouse has been detained by Erdogan fascist troops under the suspicion of preparing a suicide attack in Istambul. No need to say that this is just bullshit.

I'm not going to translate the articles in the French news, just will give you a summary. A 25 years old Toulousain girl of Kurdish descent, Ebru, decided to quit Toulouse (where she had been a former medicine student) to go to Rojava (Northern Syria) to fight against Daech (Isis). One of the reasons prompting her to take such a corageous decision was seeing how some shitheads of her neighbourhood had gone to Syria to fight in the ranks of the Islamist beasts. This girl is from Bellefontaine, one of the infamous "Quartiers Sensibles" of Toulouse, so this is one more proof that whatever certain media (British media in particular), the idiotic left, the communitarits or just the criminals (that complement their "income" with French social welfare, of course) tell you, you can grow up in a bad neighbourhood and succeed in having a normal life, finish high school, go to University and feeling concerned about the future of Humanity, as this heroic girl did. Because France (at least the France that I know) continues to be an open society, where most people don't care about your origins, skin color or system of beliefs (unless those beliefs go against our civilization).

Last week she intended to take a flight to Toulouse to try to return to a normal life. Indeed she had an interview in Pole Emploi (the employment office) the next day, ah, yes, she wanted to find a job, rather than just asking for social welfare as all those "victims of French society" in her neighbourhood tend to do...) But it seems like the Turkish Islamo-Fascist state received some information about her planning a suicide attack... pure bullshit

Hopefully she is a French citizen, and you can imagine that after all the terror acts on our soil the normal French society is quite sensitive regarding Daech. So, contrary to what happened in Spain, where some volunteers that had gone to Rojava to fight against Daech were received by the Spanish state (and media) with charges of terrorism...
hopefully here the city government (Les Republicains) and the regional government (PS) are joining forces to demand her immediate liberation and return to France.

Ebru showed up in French media last January in a documentary about French citizns fighting against the Islamist beasts in Kurdistan. When she was asked how she had moved from studying medicine to holding a weapon agains Daech, she said "sometimes you save lives in one way, other times it's a diffeent way, you have to take lives to save others". This reminds me of an excellent French/German documentary about the Kurdish female Freedom Fighters. By the way, I've come across this page of a Toulousain collective of support to te Kurdish People.

Friday, 9 September 2016

Asturian Epic Moments

In the last years my understanding of the world, identity and politics has evolved quite a lot, but I still have a certain feeling of being Asturian. So when talking to people here in France I will often talk about Asturies, for the good and for the bad, for the funny and for the depressive... On some occasions I have told them that though we have a cross in our flag and you'll see this cross everywhere, Asturies happens to be one of the less catholic areas of Spain. I explained that celtic pagan traditions had persisted quite longer than in other places, and that this cross is the symbol of the victory of the Astures against Muslims, and that not having been ruled by the Arabs (well, except some villages for a few years) was one of the basis of our identity (unruly, crazy and rebelious Asturians...). A non religious person explaining this to 2 really nice (and devote) Muslims is a quite funny situation.

The other day I wondered what impression would someone get from Asturies if out of curiosity searched on wikipedia for some info about that misterious/exotic place that the freak in the office talks about (once someone at work said to my amused ears "hey, that Asturies thing sounds like pretty exotic, those people you talk about must be almost like aliens"). So, reading some English entries you get quite an epic vision!

From the Battle of Covadonga:

The battle was followed by the creation of an independent Christian principality in the mountains of the northwestern region of the Iberian peninsula that grew into the Kingdom of Asturias and became a bastion of Christian resistance to the expansion of Muslim rule.
...
and soon founded the Kingdom of Asturias, which became a Christian stronghold against further Muslim expansion.

From the Kingdom of Asturies:

The Kingdom of Asturias was, in its infancy, an indigenous reaction of Astures and Cantabri to a foreign invasion. These people had already fought the Romans in the Cantabrian Wars, and initially resisted Romanisation. Although they preserved many characteristics of their pre-Roman culture, their Celtic languages were later lost in favor of Latin.
This kingdom is the birthplace of an influential European medieval architectural style: Asturian pre-Romanesque.

From the Cantabrian and Asturian Wars:

Moreover, there was a tradition among the Cantabri of preferring suicide to slavery. They did this by sword, by fire, or, primarily, by poisoning themselves with potions made for the purpose. According to Silius Italicus they used a concoction made from the seeds of the yew tree, a plant with mythic significance for the Celts. Strabo said that they belittled death and pain, to the point of singing hymns of victory while being crucified.

Note: It talks about the Cantabri, but that applies also to Astures (in the end that difference of Cantabri vs Asturies is rather meaningless

From the Astures:

The Astures were subdued by the Romans but were never fully conquered, and their tribal way of life changed very little.

Those are pretty nice parts. You combine that history with the beautiful landscapes and for sure you get an interesting place. Shame is that when you add to it other facts: one of the most aged societies in the world, the lack of decent public transport, high rate of drugs consumption, the isolation from the rest of the world, the permanent economical crisis having created a totally depressed population (I had to be out for a good while to fully realize that the permanent state of complain, sadness, distrust and self-destructive criticism of good part of the population, me among them when living there, is not at all normal)... the overall picture changes too much...

By the way, it's pretty interesting for someone that calls both places home too read about the possible relation between the battle of Toulouse (quite unknown when compared to Poitiers, but for some historians almost so important) and that of Covadonga.

On July 9, 721, a Muslim force that had crossed the Pyrenees and invaded the Kingdom of the Franks was defeated by them in the Battle of Toulouse, in present-day France. This was the first serious setback in the Muslim campaign in southwestern Europe. Reluctant to return to Cordoba with such unalloyed bad news, the Ummayad wāli, Anbasa ibn Suhaym Al-Kalbi, decided that putting down the rebellion in Asturias on his way home would afford his troops an easy victory and raise their flagging morale.