Αθήνα: countdown to crash?

Βαρκελώνη, χθες βράδυ. Περπατάω από ένα μπαρ προς τη στάση του λεωφορείου.

- "Σερβέσα-μπίαρ! Σερβέσα-μπίαρ αμίγκο!"

Καθώς πάσχουμε από έλλειψη περιπτέρων και 24ωρων ψιλικατζήδικων της γειτονιάς, είναι ιδιαίτερα συνηθισμένο φαινόμενο εδώ, μετανάστες να πουλούν μπύρες στο δρόμο. Σε κάθε στενάκι του κέντρου, Πακιστανοί, Ινδοί, Άραβες και άλλοι διάφοροι μετανάστες, στέκονται με μια εξάδα "εστρέλλα" στο χέρι και φωνάζουν στους περαστικούς.

Πλησιάζω με τη συγκάτοικό μου η οποία προσπαθεί να κάνει παζάρι και να πάρει δύο κουτάκια στην τιμή του ενός. Η διεθνής λέξη "μαλάκα" ξεφεύγει από το στόμα μου και τα μάτια του πλανόδιου αστράφτουν.

- "Είστε Έλληνες;", ρωτάει σε σπαστά ελληνικά και χαμογελάει.

Πιάνουμε αμέσως κουβέντα σε μια περίεργη ελληνο-ισπανο-αγγλική διάλεκτο. Ζούσε και δούλευε Ελλάδα παλιά μου λέει. Πριν από δύο χρόνια. Μιλάει αρκετά καλά ελληνικά και φαίνεται ιδιαίτερα χαρούμενος που συζητά μαζί μου. Τον ρωτάω γιατί έφυγε και αν του φαίνεται καλύτερη η ζωή στην Ισπανία.

- "Ελλάδα πολύ ωραία. Ισπάνία shit.", μου λέει κατά λέξη και τον κοιτάζω κατάπληκτη. Πού ακριβώς ζούσε αυτός ο άνθρωπος; Σίγουρα μιλάει για Ελλάδα;

Αφού μιλήσαμε λίγο ακόμα, κατάλαβα γιατί το είπε. Ζούσε και δούλευε σε κάποιο χωριό στη Λακωνία. Όμως εγώ, για κάποιον (ανόητο;) λόγο υπέθεσα ότι με το Ελλάδα εννόησε Αθήνα. Και όχι άδικα ίσως, αφού ο μισός και παραπάνω πληθυσμός της χώρας έχει μαζευτεί σ'αυτή την πόλη.

- ~ -

Και πάλι σήμερα διαβάζω νέα, βλέπω τα βίντεο με τους ξυλοδαρμούς και τα επεισόδια και φρικάρω. Ένας φόνος προχθές και μετά το χάος.

Σύγχυση, θυμός και αηδία. 

Ο φάυλος κύκλος μίσους μεταξύ διαδηλωτών και αστυνομίας.

Ο φαύλος κύκλος μίσους ακροδεξιών και μεταναστών.

Εικόνες παραπάνω από οικείες πια. Εικόνες που είχαν γίνει καθημερηνότητά μου όταν ζούσα Αθήνα αλλά εδώ και λίγο καιρό είχα ξεχάσει.

Δεν ξέρω αν πρέπει να ντραπώ, να στεναχωρηθώ ή να φωνάξω.

Προσπαθώ να σκεφτώ τι μπορεί να γίνει. Πώς μπορεί να γίνει. Και για άλλη μια φορά καταλήγω στο ίδιο (ακραίο;) συμπέρασμα: 

(Συγχωρείστε μου την παρακάτω συσχέτιση, αλλά δεν μπορούσα παρά να το σκεφτώ έτσι)

 

Η ζωή στην Αθήνα είναι σαν παλιό λογισμικό γραμμένο σε Fortran.

 

Του κάναμε ένα μικρό "συμμάζεμα-update" το 2004 για τους Ολυμπιακούς και από τότε το έχουμε αφήσει στη μοίρα του.

Κανείς δεν καταλαβαίνει απόλυτα πώς λειτουργεί και κανείς δεν μπορεί να το ελέγξει πια.

Είναι γεμάτο "bugs" τα οποία προσπαθούμε να καλύπτουμε πρόχειρα και τσαπατσούλικα. 

Με κώδικα τόσο δυσνόητο που φοβάσαι να τον πειράξεις μήπως και σταματήσει να λειτουργεί.

Κι όσοι θαρραλέοι επιχείρησαν να βελτιώσουν κάτι, συνήθως κατέστρεψαν κάτι άλλο.

Αυτοί που το έστησαν έχουν φύγει πια και έχουν αφήσει πίσω κάτι χωρίς δομή και χωρίς συνοχή.

Κώδικα που χτίστηκε αυξητικά με το μοντέλο του καταρράκτη.

Ένα σύστημα που έχει φτάσει σε κορεσμό. Σύστημα που δεν κάνει scale. 

Κι αυτό σημαίνει ότι δεν μπορέι να εξυπηρετήσει άλλα requests.

Κι όταν το σύστημα δεν είναι scalable, δύο είναι οι επιλογές:

Είτε θα αλλάξουμε πλατφόρμα και θα το ξαναχτίσουμε με άλλη λογική, είτε οι δυσαρεστημένοι "πελάτες" μας θα μας εγκαταλείψουν.

Dsc_0870
*φωτό από: http://athens.indymedia.org/front.php3?lang=el&article_id=942298

 

Όπως και να έχει, υπάρχει ένα τίμημα. 

Είναι ακριβό, αλλά κάποτε και κάπως θα πρέπει να το πληρώσουμε.

B.
Tagged Opinions

wxErlang: Gathering the pieces

It's been quite some time that I started rewriting some Erlang GS gui modules to use wxErlang, since the intention is that wxErlang shall replace GS soon, maybe in the next major release (R15).

Since it was not something urgent, I've been working on it every now and then, making new discoveries every time. So, I decided to write this post to gather all sources of information I came across, tutorials and existing examples and share my experiences and difficulties I found.

 

What is wxErlang?

wxErlang is an Erlang binding to the C++ GUI library wxWidgetswhich provides support for cross platform GUI applications. This report can give you an insight of how it can be used, as well as how the library itself has been implemented. The report is quite old (2005) and several things have changed since it was written, but it's worth reading. It explains the basics in a fairly simple way and gives an interesting example on how etop (an Erlang version of the unix command top) would be re-implemented using wxErlang. However, be sure not to copy-paste the code provided and always advise the documentation because some things have changed since the report and won't work!

For example, wx:start() is used in the report instead of wx:new(), context instead of environment, etc.

 

Tutorials and References

I have to admit that when I fisrt started messing up with wxErlang, I was desperate. I could find almost nothing helpful online except from the reference manual, which is actually a collection of the available modules and functions with "See external documentation" links to the wxWidgets documentation.

But then this great tutorial organized a bit the things in my mind. It's fairly simple and complete and has step-by-step examples. As far as I have searched online, it is the only one available (please let me know if there are more I'm not aware of).

In a section of the same tutorial, wxFormBuilder is introduced. wxFormBuilder is a tool which allows the user to design the gui in a drag-and-drop way and generates C++ and Python code automatically. Since no IDE or other kind of framework is available for building a gui in Erlang in an easier way, I thought I'd use it. The truth is it's great but I came to find out that "translating" C++ or Python to Erlang was a bit more tricky than it sounded. I guess if someone is familiar with all three languages, ti might be very helpful.

Links

 

Some things to note

Now to conclude this post, there are some hints I want to mention. Things that might not be obvious or in my opinion deserve your special attention:

 

1. Don't forget to destroy your object

Even if when using wxErlang we're writing Erlang, we're indirectly writing in C++ and we have to be aware of that. Especially when it comes to memory management. With wxErlang we need to care about destroying the objects we created and there are destroy/1 functions in every widget to do so.

 

2. Always read the external documentation

I know it's annoying but since the reference manual is not very enlightening and especially if you haven't worked with wxWidgets before, you might find yourself in situations where you get errors (in the usual Erlang-non-self-explanatory way) and you have no idea what is wrong.

To give you an example, here is a function I wrote: 

 

make_window() ->

    Server = wx:new(),

    Frame = wxFrame:new(Server, -1, "My Window", [{size,{300, 200}}]),

    Panel  = wxPanel:new(Frame),

    Box = wxStaticBox:new(Panel, -1, "A Static Box"),

    MyText = wxStaticText:new(Box, -1, "This is static text"),

    wxFrame:show(Frame),

    ok.

 

When executing this function, the Erlang shell crashes with "Segmantation fault", no additional information, no line provided. The problem with this code is that wxStaticBox is used as the parent object for the wxStaticText. However, you will not find the reason in the wxErlang documentation, but it's pretty clear in the external one:

"Please note that a static box should not be used as the parent for the controls it contains, instead they should be siblings of each other. Although using a static box as a parent might work in some versions of wxWidgets, it results in a crash under, for example, wxGTK."


3. Concurrency

Of course what we all love in Erlang is concurrency. Why even bother making a gui in Erlang if you can't have the different components acting as independent processes that communicate with each other and the failure of one of them doesn't affect the rest of your gui?

However, there is a small detail that requires our attention when dealing with wxErlang. wxWidgets uses a process specific environment, which is created by wx:new/0. So, each process is defined within an environment. In order for other processes to be able to communicate with it, they have to share the same environment. To be able to use the environment from other processes, we can call get_env/0 to retrieve the environment and set_env/1 to assign the environment in the other process.

 

Looking forward to a tool that will make our life easier,

V.

Tagged Erlang wxErlang

Athens Metro Punctuality

I've always liked Athens Metro. It's new (more or less 10 years old), it's clean, it's fast. People like it, use it and respect it. Another thing I like is that the archaeological artefacts dicovered during the excavations are exhibited in many stations for the public to see, thus turning stations like Monastiraki and Panepistimio into small museums (more info and some pictures are available here).

I won't comment on the recent ticket price increase. I will just state the fact that when I first moved in Athens in 2004, the ticket cost 0,80€ (0,40€ for students) and today it costs 1,40€. And that since 2004 until today 3 or 4 new stations have been added.

Anyway, last week I used the metro after several months. And there I am, Saturday night in the crowded station of Syntagma. As I was a bit late (influenced by the Spanish sense of time or maybe this is just the excuse I used later :p), I rushed down the stairs to check the sign on the platform: 1 min for the metro to come. Just perfect!

I pressed Suffle on my iPod and smiled as "Pluvius Aestivus" started playing. I waited enjoying the song and watching more and more people filling the platform.

After the song finished, the metro hadn't come yet. I was sure the song lasted more than a minute. I raised my eyes to the 1 min sign. It said 30 seconds. People kept coming and coming... Long story short, the metro came somewhere in the middle of Russian Circles' "Enter". But it was so full I couldn't "enter". I finally managed to board in the next train, just as "Post Blue" by Placebo started playing.

So, here it is, tonight's playlist provided by Athens Metro.

Enjoy:


 

 

I should have walked...

V.

 

 

Tagged Misc

Όπου φύγει-φύγει...

8 μήνες μετά

Πάνε 8 μήνες που έχω φύγει από Ελλάδα και ζω στη Βαρκελώνη. Γύρισα χθες λοιπόν για Πάσχα. Είχα ξαναέρθει τα Χριστούγεννα. Όμως αυτή τη φορά είναι αλλιώς. Βλέπω ήδη τη διαφορά. Είμαι εδώ μια μέρα και με έχει πιάσει ένας κόμπος στο στομάχι, μια κατάθλιψη, γίνεται ένα πάρτυ από σκέψεις μέσα στο μυαλό μου.

Κάποιος πυροβόλησε ελεγκτή, φοιτητές επιτίθενται στον Watson. Τρελές ειδήσεις σκάνε η μία μετά την αλλη και δεν ξέρω πώς να τις επεξεργαστώ. 

Και τελικά το αποφάσισα:

Δεν πάει άλλο. Σήμερα πρέπει να αρχίσω να γράφω.

Από τη μία νιώθω τυχερή που δεν ζω εδώ. Τυχερή που βρήκα τρόπο να την κάνω γρήγορα, ανώδυνα και με ελαφρά. Από την άλλη νιώθω ένοχη που βλέπω και συνειδητοποιώ τι γίνεται και διάλεξα να αποδράσω. Ναι, αρνούμαι να ζήσω σ'αυτή τη χώρα έτσι όπως είναι και το ξέρω πώς αυτό είναι εγωιστικό. Με πληγώνει αλλά το λέω και θα συνεχίσω να το λέω: Αν μπορείτε, φύγετε. Για οπουδήποτε. Για οσοδήποτε.

 

Final Stage: Acceptance

Νομίζω πώς η Ελλάδα έχει περάσει ήδη στο στάδιο της αποδοχής. Έχουμε κρίση. Το ξέρουμε. Το αποδεχόμαστε. Είναι πλέον δεδομένο. Βέβαια και πριν φύγω, πάλι κρίση είχαμε. Αλλά δεν θέλαμε να το πιστέψουμε. Ήμασταν στο πρώτο στάδιο, αυτό του Denial:

- "Κρίση; Τι κρίση; Όλο γκρίνια είμαστε οι Έλληνες πια, την καταστροφή φέρνουμε. Μια χαρά θα πάνε όλα, δεν χρειαζόμαστε βοήθεια."

- "Τι; Θα μεταφέρεις τα χρήματά σου στο εξωτερικό; Μα γιατί; Μην είσαι χαζή, δεν υπάρχει περίπτωση πτώχευσης."

Ίσως μερικοί ακόμα δεν θέλουν να το πιστέψουν. Αλλά όλο και λιγοστεύουν. Και το ότι είμαστε πλέον στο στάδιο της αποδοχής είναι ιδιαίτερα εμφανές στη στάση της οικογένειας και των φίλων όσων από εμάς φύγαμε.

Στην αρχή ήταν:

- "Ναι παππού. Θα πάει το παιδί να σπουδάσει έξω. Και σε δύο χρόνια θα γυρίσει πίσω να πιάσει δουλειά εδώ." 

Μετά την πρώτη επίσκεψη ήταν:

- "Ναι παππού. Καλά περνάει το παιδί εκεί, είναι καλύτερα από εδώ. Πότε θα γυρίσει; Εεε, θα δούμε. Σύντομα."

Τώρα το ξέρουν, ότι δεν θα ξαναγυρίσουμε. Τουλάχιστον όχι στο άμεσο μελλον:

- "Ναι παππού. Καλά είναι το παιδί. Πότε θα γυρίσει; Και τι να κάνει να γυρίσει στην Ελλάδα παππού;"

Img_0252

Επίλογος

Μερικές φορές όταν συζητάω με φίλους, ίσως φαίνομαι κατενθουσιασμένη με την Ισπανία και δεν βλέπω τα στραβά τους κι εκεί. Ίσως υπερεκτιμώ κάποια πράγματα ή υποτιμώ τα πράγματα εδώ. Δεν διαφωνώ. Μπορεί να είναι αλήθεια. Άλλωστε δεν μπορώ να μην παρατηρήσω την αναλογία των πραγμάτων. 

Το όπου φύγει-φύγει δεν είναι φαινόμενο Ελληνικό.

Και οι Ισπανοί ψάχνουν διεξόδους και οι υπόλοιποι Ευρωπαίοι φοιτητές. Λονδίνο, Σουηδία, Η.Π.Α... (Έχουν ιδιαίτερη αγάπη στις Η.Π.Α. και στα πανεπιστήμιά τους. Οι ευρωπαίοι φοιτητές φεύγουν για Αμερική και η Ευρώπη ψάχνει φοιτητές στην Ασία... Αλλά αυτό είναι άλλη συζήτηση που απαιτεί από μόνη της ένα post.)

Σκοπός μου δεν είναι να σας πείσω πόσο πιο ωραία είναι έξω, ούτε να σας πω για ακόμα μια φορά πόσο σκατά είναι τα πράγματα εδώ. Αυτό το ξέρετε καλύτερα από εμένα όσοι μένετε εδώ. Σκοπός μου είναι να πω όσα θέλω να φωνάξω, όσα θέλω να ακούσουν όσοι κοιμούνται εκεί έξω.

Και θα κλείσω το πρώτο μου post, παραθέτοντας μια ατάκα που μου είπε ένας φίλος Βαρκελωνέζος πριν μερικές μέρες και τη θυμήθηκα διαβάζοντας τις σημερινές ειδήσεις:

"Ευτυχώς που δεν πέρασε και η άλλη Ελληνική ομάδα (ο Ολυμπιακός) στο final 4 της Βαρκελώνης. Δε θέλουμε να μας καταστρέψετε την πόλη."

Τα σχόλια δικά σας...

Β.

Tagged Opinions