tag:blogger.com,1999:blog-82450773781071931532024-02-21T01:36:07.792+01:00Gegos personal blägRANT RANT RANT RANT --> SAGE SAGE SAGE SAGEGegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.comBlogger43125tag:blogger.com,1999:blog-8245077378107193153.post-66732551587787717612099-01-01T13:37:00.007+01:002014-04-20T13:09:02.508+02:00Curriculum VitaeI have made a CV so yee guys can get a better view of who I am...<br />
<pre class="brush:bash">bzr branch lp:~gustav-hartvigsson/+junk/CV
</pre>English version<a href="http://bazaar.launchpad.net/~gustav-hartvigsson/+junk/CV/download/head:/cv.eng.pdf-20110629181958-j73ylm6175yl1oiy-1/CV.eng.pdf"> here </a> (Updated 2014 04 20) <br />
or Swedish version <a href="http://bazaar.launchpad.net/~gustav-hartvigsson/+junk/CV/download/head:/cv.pdf-20110301211213-yrx020qyu3mij3bu-1/CV.pdf">here</a> (Updated 2014 04 20)Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-44718169560429706082018-01-23T14:24:00.000+01:002018-01-23T14:26:35.303+01:00The Paper Crane and the Drunk Pirate<p><i>
"When life gives you lemons, don’t make lemonade. Make life take the lemons back!"
</i><br/>
-- Cave Johnson (Late CEO of Aperture Science)
</p>
<h1>"Would you hire yourself"?</h1>
<p>
Has anyone been asked this question? What is the correct answer to it?
</p><p>
This is a question I have pondered many a days, and I have come to the answer <i>"no, I would not hire myself"</i>.
</p><p>
I'm rude, I hate most things, I hate you in particular (for no reason), I am not very productive at best of times (I rather not do something than do it), I am not very smart (even if I fake being smart pretty well), and I have dought my own abilities.
</p>
<h2>
Past things
</h2>
<p>
When I was younger I tried my hands on drawing (a short lived dream about doing comics), but that only fucking my right hand up (writers hand).
</p><p>
My father always told me to become a politician, but if it weren't for my absolute disdain for almost all political parties's policies/programs, I almost considered it.
</p><p>
I was told to get a degree (decided on Computer Science), but that only led to a big student loan and no degree.
</p><p>
I was told to work in a restaurant, seemed fun, was in reality the worst fucking job ever.
</p><p>
I tried to do graft (working at a company that does fibre installations), got the boot.
</p><p>
Took a course in Java EE/Web Programming, I hated every minute of it. I just don't understand how anyone would like such a job.
</p><p>
I tried my hand at writing (done so for some time, and still do) but I know it is all a pile of shit; every character speaks with the same voice, the dramatic curve has gone out the window, the tempo is all wrong, the disposition is all wrong.
</p><p>
<b>I feel done.</b>
</p><p>
"FML" is probably the best description of my life.
</p>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-12261549414058026022015-11-19T21:57:00.002+01:002015-11-19T21:57:22.676+01:00Papperstranan och det Atlantiska Havet<p><em>
"Mamma, kolla ett spöke."<br />
-- Femåringen som såg en kvinna i heltäckande slöja.
</em></p>
<br />
<p>
Fan vad osammanhängande jag kan skriva... Hänger inte ens med själv. ^_^
</p>
<h1> Europa Överger Sina Ideal </h1>
<p>
Sverige har endast ansvar för att hjälpa svenska medborgare och de med uppehållstillstånd.
</p>
<p>
Är de inte medborgare i något EU land så har de inte något att göra här.
</p>
<p>
Visst vi har en extraordinär situation I Europa och Mellanöstern men det är <em>inte vår skyldighet</em> att hjälpa, men det är nog det mest humana att göra.
</p>
<p>
Men begår de något brott skall de kastas ut ur EU och bli målade med genetiska markörer så att de inte kan återvånda.
</p>
<p>
Vi har exempel på våldtäkter på barn på asylboendes som inte rapporteras till polisen utan mörkas av personalen[1]. Sådana här saker måste uppmärksammas.
</p>
<p>
Och om vi tar en avstickare från Flykting frågan så måste vi nog ta tag i problemen som det multikulturella samhället har skapat. Där vi tillåter de som kommer hit att välja att inte assimileras, där vi ser mellan fingrarna när det gäller den icke acceptabla människosynen som vissa individer har.
</p>
<p>
Antingen står vi upp för den västliga civilisationen eller så låter vi oss bli överkörda av de som inte delar våra värderingar när det gäller synen på människa liv eller vad som utgör ett samhälle.
</p>
<p>
Att luta sig tillbaka och tycka bra om oss själva bara för att vi hjälper de som kommer hit och inte hjälpa dem med att komma ur sin egna kulturella bubbla hjälper ingen. Och skapar bara problem framöver.
</p>
<p>
Vill vi ha ett segregerat samhälle eller ett samhälle som är byggt på rättssäkerhet? Vill vi att den generationen som efterträder oss inte vågar ta tag i problem för att inte de skall råka såra någons känslor. Nej, det tror jag inte. Vi måste stå upp för våra demokratiska ideal till vilket pris som helst. Vi skall inte tro att vi kan vara tillmötesgående till alla, vi måste stå upp för de sekulära idealen som det västerländska civilisationen bygger på! Vi skall inte bry oss om hudfärg, kön, religion, bara om individens välstånd i samhället, trotts vad den regressiva vänstern tycker.
</p>
<p>
Så... Var var jag? Err... Vad fan? Detta får duga.
</p>
<p>
Källor:
</p>
<p>
[1] <a href="http://sverigesradio.se/sida/artikel.aspx?programid=106&artikel=6283519">http://sverigesradio.se/sida/artikel.aspx?programid=106&artikel=6283519</a>
</p>
Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-40048756425618267612015-11-14T20:20:00.000+01:002015-11-14T20:22:26.370+01:00The Papercrane and the void pointer to nothing<em>
"..."
</em>
<h1>
Giving up SSTS (for now? for ever?)
</h1>
<p>
So I have been working on this project that I called "SSTS" or Super Simple Type System. It is neither a "Type System" or "Simple".
</p>
<p>
I have been working on this on and off for two-three years. I started it on a whim, I wanted to learn what makes GLib and GObject tick,
so I set out with the simple goal of implementing something like GObject but without all the nasty type-tracking and what not.
It started out well, with a base object type that I could use to implement other stuff and call methods using the base object's interface.
</p>
<p>
"This is easy!" I thought to my self, it was easy, cus' it was nothing special. Then I wanted to add something like the GObject's
notify system. But for that I needed some sort of map structure... But to implement a Map structure I needed a Dynamic Array and a
Linked List...
</p>
<p>
It is now almost two years since I started faffing about with this, and get lots of help from the guys over at the
C Programmers community on G+, and now I had hit a road block. I got double frees... And I just could not figure out
what was wrong.
</p>
<p>
I posted a query to the community page, but got told I needed more tests. At this point I just give up. I am sick
of this. Not of the people trying to help, but at my self, I have spent two years on some code that no one will ever
care about. And I just do not care enough to write test cases, the code is not written in a "test friendly" way.
</p>
<p>
Sure, I have learned a lot by the experience but I just see no end in sight for the project. If I were to implement
the object notify system I would start with the next thing (Streams), which would require something else(an Event Loop).
</p>
<p>
At this point I see nothing but an other two years till I would be finished, and I just do not want to care about it
any more.
</p>
<h2>Design and good intentions</h2>
<p>
I like how I have focused on making the function calls not feel to "C"-y. I wrote wrappers for string functions
to return strings, so if feels like something like Java or something. And this philosophy is everywhere. <em>"Make it
not feel too much like C."</em>
</p>
<p>
I did not want any of the internals leaking out like some kind of horror show. I did not want the user to have to
deal with checking if a function returns a positive or negative value. That is scuff that the user can be without.
</p>
<p>
This good intentions makes for code that is harder to test than "normal" C code where you get some error value from
a function when it fails. It can not just check "is this negative" over and over again and see it go through. No
to test these things I have to go through and write complex tests for edge cases that I never thought of when
writing it.
</p>
<p>
I just no not want to deal with that.
</p>
<p>
I give up... I have had enough of my ineptitude.
</p>
Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-73285993123052347392015-09-13T19:42:00.003+02:002015-09-13T20:51:37.203+02:00The Paper Crane and the Endless Struggles of a Man in a System of Endless Struggle.<em>
"So what you are saying is that the sky will not fall?"
</em>
<h1>ForEach in C</h1>
<p>
In C we do not have iterators in any sane fashion (C++'s iterators are not sane either, btw 😜 )
nor do we have a standard array_for_each (how would that even work?). So when implementing a
C data structure that may need for_each capabilities it is best to do it. Relying on for loops
<em>can</em> be problematic if you are not careful.
</p><p>
In these example I will use a DynamicArray as the data structure. With functions
to get items at an index and the length of the array. When it comes to LinkedLists
you must use linked_list_next, linked_list_prev and linked_list_get_current,
but that is outside this discussion.
</p>
<h2>First things firts: typedef:ing a standard ForEach function pointer</h2>
<p>
The signature for a good for each function in any implementation is as follows:
</p>
<pre class="brush: c">
typedef void (ForEachFunc *)(void * self, void * item, void * user_data);
</pre>
<p>
The <code>self</code> here should be a pointer to the data structure you are doing the for
each on. No operations <b>should</b> de done on this structure.
</p><p>
The <code>item</code> is the current item, the item that the for each function should operate.
</p><p>
The <code>user_data</code> is any user data you can think of. It may be used as a out value
or as some other data that is used inside the for each function.
</p>
<h2>
Implementing dynamic_array_for_each
</h2>
<p>
In this example I will not rely on any internals of the data structure, instead I will use
<code>dynamic_array_get()</code> and <code>dynamic_array_len()</code>
this means that you can implement this even if you do not have accesses to the underlying structure.
</p><p>
To begin with you must understand that this relies on a for loop, so it is <em>not more efficient</em>
that just writing a for loop your self. It just provides a little bit safer way of coding, where
you do not have to keep track of variables to much.
</p><p>
The signature of the function is as follows:
</p>
<pre class="brush: c">
void
dynamic_array_for_each (DynamicArray * self, ForEachFunc func, void * user_data) {}
</pre>
<p>
The <code>self</code> here is the dynamic array to perform the for-each function on.
</p><p>
The <code>func</code> here is the function that we are to execute on each iteration.
</p><p>
The <code>user_data</code> is the data to passed to the function. This may be used as an "output" of sorts.
</p>
<pre class="brush:c">
void
dynamic_array_for_each (DynamicArray * self, ForEachFunc func, void * user_data) {
// First me get the length of the array, This should be the last item in the array.
size_t len = dynamic_array_len (self);
for (size_t i = 0; i <= len; i++) {
// Check if the item is there.
void * item = dynamic_array_get (self, i);
if (item) {
func (self, item, user_data);
}
}
}
</pre>
<p>
And that is it, folks!
</p>
<h2>
Using it
</h2>
<p>
So now it is now time to use the this for-each thingy. So lets define a function to use in the for-each.
</p>
<pre class="brush: c">
void
for_each_print (SDynamicArray * self, int item, int * itt) {
fprintf (stdout, "The number is: %d on iteration: %d\n", item, (*itt));
(*itt)++;
}
</pre>
<p>
This function prints the number stored in the array and prints it out. as user data it takes a pointer to an int,
this is that is incremented each time the function is called.
</p><p>
Lets now put this into a context:
</p>
<pre class="brush: c">
int
main (int argc, char ** argv, char ** argp) {
/* create the array */
DynamicArray * arr = dynamic_array ();
/* ... Code to fill the array with numbers. */
int itt = 0;
dynamic_array_for_each (arr, (ForEachFunc)for_each_print, &itt);
fprintf (stdout, "The last itt number is: %d", itt);
/* ... Code to free the array and what not ... */
}
</pre>
<p>
As you can see it is not too much work to implement or use.
</p>
<h2>Conclusion, or something.</h2>
<p>
So as we have seen it is not magic, it is actually easy to use, and it promotes code-re-use. One downside of this is that
it does a lot of calls, and thus uses the call stack, this might be problematic if you you already are hitting the maximum
call stack size.
</p><p>
But I firmly believe that this is the best way of doing things like this.
</p>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com2tag:blogger.com,1999:blog-8245077378107193153.post-73725258768062137402014-02-22T13:14:00.002+01:002014-02-22T13:23:40.405+01:00The paper crane and the pile of video tape<p><em> "I am sorry, future self." </em><br />
-- A comment in some code
</p>
<h1> Help Pitivi! </h1>
<iframe width="640" height="390" src="http://fundraiser.pitivi.org/videos/campaign-launching" frameborder="0" allowfullscreen style="margin-left:-35px"></iframe>
<p>
<a href="http://fundraiser.pitivi.org/">Click here to get to the fundraiser.</a>
</p>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-89625082412727568812013-10-21T16:42:00.000+02:002013-10-21T16:42:51.074+02:00The Paper Crane and the Fragile Crystals<p>
<em>"What is love? baby don't hurt me, don't hurt me, no more"</em><br />
-- Haddaway
</p>
<h1> On love and the low birthrates </h1>
<p>
Reference to this post: <a href ="https://plus.google.com/u/0/100647702320088380533/posts/4f1DuFuVfoz">https://plus.google.com/u/0/100647702320088380533/posts/4f1DuFuVfoz</a>
</p>
<p>
After reading that I the article above I started to think about what the people in the article above
actually thought about long term relationships. This is my POW on love and sex.
</p>
<p>
If you ask me, I would rather have a long-term relationship than a one-sight-stand with some stranger.
I do like to feel that I am loved rather than something shallow, untrue (as a one-night-stand is).
</p>
<p>
I do not want children though (for reasons that I am not going to discuss here).
</p>
<h2>
Back to the article!
</h2>
<p>
They say that long-term relationships are <em> "Too troublesome" </em>, but I think that this
is just an excuse. They rely do want a relationship, it is just that they are afraid of loosing
what they have.
</p>
<br />
<p>
It might be by Gaijin-white mindset but the statement that Kishino made seems weird: <em> "I don't earn a huge salary to go on dates and I
don't want the responsibility of a woman hoping it might lead to marriage." </em>
</p>
<p>
I do not think that I have ever heard of anyone here engaging in a relationship because
they think they will marry there partner. That is not to say that they will not get married, though.
</p>
<p>
And this might be due to my cheap-asrsery but if you are in a relationship with someone who
loves you, why does the male have to present dough as a token of offering to the female?
</p>
<p>
Cheeses! I thought that you loved each other! NO! It seems that you are her sugar-daddy now!
</p>
<p>
Of course I would present gifts to my girl, but I hope that she would not expect me to do so. After all,
is she after love or my coin? I want to live in a equal relationship, where we see each other as equals who
loves each other, not as a master/slave or provider/user relationship.
</p>
<p>
It might just be that I have a strange world-view, and that the ideal girl does not exist. Perhaps
girl only like dough, and that one-night-stands is what girl rely looking for... What do I know?
I am single, have not had a relationship with a girl for many years.
</p>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-63705925794631621072013-09-06T21:26:00.000+02:002013-09-06T21:26:57.311+02:00The Paper Crane and The Heavy Objects That Fell<p>
<em>"It is just like inventing the wheel, it has already been done!"</em></br>
-- Someone...
</p>
<h1> Introducing SSTS -- The (Super) Simple Type System </h1>
<p>
So a few days ago I started thinking about GLib and GObject and wondered
how easy -- or hard -- it would be to create my own base object system.
So the first thing that every good hacker does when faced with such a question
is to do it, from scratch, without looking at others code.
</p>
<p>
So after a few hours I had written my base object type with every function that
I would ever need. Than the next day I wrote the first object derived from this
base object. (Still not even compiled the code). On the third day I started writing
tests and ironed out some compile errors, and than I wrote more tests (this time with
the derived object type) and tested everything with <code>valgrind</code> and ironed
out every memory leak I could find.
</p>
<p>
Than, I decided to write a new type, a Map... This is where I found out that all the plane
sailing that I have had took an abrupt end, and I was faced with a non-trivial problem:
</p>
<p>
How do I discern a object that is of the type system from an object that is not? I need to be
be able to call the objects destructor if it is, and ordinary free () if it was not.
</p>
<p>
This lead me -- after some non-help from G+ -- to dig though GLib/GObject C code only to find out
that the problem is non-trivial. In GLib/GObject it seems that they use a lookup table to find out
if an object is or is not of the type GObject.
</p>
<h2> Action plan: </h2>
<p>
There is two ways I could do this:
</p>
<ul>
<li> The sane and hard way -- basically reimplementing what GLib/GObject does. </li>
<li> The easy but mad way -- just ask the user for a destruction method/function as a parameter. </li>
</ul>
<p>
The first way would be the hardest to implement, and probably course trouble if I were to use GObjects somewhere. But if I
do it that way the user of the library would have less work to do.
</p>
<p>
If I do it the second way it would mean less work, but the end user would probably not be so pleased to have to specify the
destruction method for each map. I may even have to have the user specify it for every item in the map.
</p>
<p>
</p>
<p>
If I go with Plan A (The Sane, but hard way) it also solves other inheritance related issues: How to know, in large object
hierarchies, what object is what type.
</p>
<p>
The lookup table would contain pointers to every object that is registered with the system (at run-time),
during the registration of the object the object must tell the system what types it is (what objects it has inherited from).
</p>
<p>
The look-up list would have to have two fields per item: a key (the pointer to the object) and a value that is a list of object-types
that the object is.
</p>
<p>
Any way: for those that are interested in this (Super) Simple Type System it can be found on <a href="https://code.launchpad.net/simpletypesystem">launchpad</a>.
</p>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-443302425916338222013-05-25T21:04:00.001+02:002013-09-06T21:42:24.371+02:00The Paper Crane and the Nested Algorithms<em> "It is so wrong in all the right ways" </em><br />
-- someone
<h1> One of my favourite Vala things </h1>
<p>
So, I have been trying out different stuff in Vala lately, one of which is the GObject to JSON stuff
(more on that in an other post). Today I thought that I would show you some dirty, dirty, dirty things
to do with Vala.
</p>
<h2> Nested lambda functions </h2>
<p>
So the topic of today is -- as the heading suggests -- nested lambda functions (or closures, if you are so
inclined).
</p>
<pre class="brush: csharp; highlight: [49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66]">
using GLib;
using Gtk;
public class MyApp : Gtk.Application {
static int main (string args[]) {
MyApp app = new MyApp ();
return app.run ();
}
Gtk.Label label;
Gtk.Window window;
MyApp () {
Object(application_id: "testing.my.application", flags: ApplicationFlags.FLAGS_NONE);
}
protected override void activate () {
/* Creating a window */
window = new Gtk.ApplicationWindow (this);
this.build_menues ();
window.set_default_size (400,400);
this.label = new Gtk.Label ("Hello GTK!");
window.add (label);
window.title = "Hello GTK!";
window.show_all ();
}
private void build_menues () {
/* Creating the application menu */
GLib.Menu app_menu = new GLib.Menu ();
app_menu.append ("Message", "app.message");
app_menu.append ("About", "app.about");
app_menu.append ("Quit", "app.quit");
this.set_app_menu (app_menu);
GLib.SimpleAction quit_action = new GLib.SimpleAction ("quit", null);
quit_action.activate.connect (() => {
this.quit();
});
this.add_action (quit_action);
GLib.SimpleAction about_action = new GLib.SimpleAction ("about", null);
about_action.activate.connect (() => {
Gtk.AboutDialog dialog = new Gtk.AboutDialog();
dialog.set_destroy_with_parent (true);
dialog.set_transient_for(this.window);
dialog.set_modal (true);
dialog.response.connect((response_id) => {
if (response_id == Gtk.ResponseType.CANCEL ||
response_id == Gtk.ResponseType.DELETE_EVENT) {
//dialog.hide_on_delete ();
dialog.destroy ();
}
});
dialog.authors = {"Gustav Hartvigsson", "Some One Else"};
dialog.program_name = "Hello GTK!";
dialog.present();
});
this.add_action (about_action);
GLib.SimpleAction message_action = new GLib.SimpleAction ("message", null);
message_action.activate.connect (() => {
label.set_text ("I have been clicked!");
});
this.add_action (message_action);
}
}
</pre>
<p>
If you look at the highlighted code (line 49-66) you will see nested lambda functions.
This is awesome, and something you would expect from a modern, high abstraction level,
object oriented language.
</p>
<h2> Dissection the C code </h2>
<p>
The C code that this produces (using <code> valac-0.20 main.vala --pkg gtk+-3.0 --pkg gio-2.0 -C </code> )
looks like this:
</p>
<pre class="brush: c; highlight: [245, 263, 228, 192, 187, 166, 211]">
/* main.c generated by valac 0.20.1, the Vala compiler
* generated from main.vala, do not modify */
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#define TYPE_MY_APP (my_app_get_type ())
#define MY_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MY_APP, MyApp))
#define MY_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MY_APP, MyAppClass))
#define IS_MY_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MY_APP))
#define IS_MY_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MY_APP))
#define MY_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MY_APP, MyAppClass))
typedef struct _MyApp MyApp;
typedef struct _MyAppClass MyAppClass;
typedef struct _MyAppPrivate MyAppPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block1Data Block1Data;
struct _MyApp {
GtkApplication parent_instance;
MyAppPrivate * priv;
};
struct _MyAppClass {
GtkApplicationClass parent_class;
};
struct _MyAppPrivate {
GtkLabel* label;
GtkWindow* window;
};
struct _Block1Data {
int _ref_count_;
MyApp * self;
GtkAboutDialog* dialog;
};
static gpointer my_app_parent_class = NULL;
GType my_app_get_type (void) G_GNUC_CONST;
#define MY_APP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MY_APP, MyAppPrivate))
enum {
MY_APP_DUMMY_PROPERTY
};
static gint my_app_main (const gchar* args, int args_length1);
static MyApp* my_app_new (void);
static MyApp* my_app_construct (GType object_type);
static void my_app_real_activate (GApplication* base);
static void my_app_build_menues (MyApp* self);
static void __lambda2_ (MyApp* self);
static void ___lambda2__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self);
static void __lambda3_ (MyApp* self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void __lambda4_ (Block1Data* _data1_, gint response_id);
static void ___lambda4__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
static void ___lambda3__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self);
static void __lambda5_ (MyApp* self);
static void ___lambda5__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self);
static void my_app_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint my_app_main (const gchar* args, int args_length1) {
gint result = 0;
MyApp* _tmp0_;
MyApp* app;
gint _tmp1_ = 0;
_tmp0_ = my_app_new ();
app = _tmp0_;
_tmp1_ = g_application_run ((GApplication*) app, 0, NULL);
result = _tmp1_;
_g_object_unref0 (app);
return result;
}
int main (int argc, char ** argv) {
g_type_init ();
return my_app_main (argv, argc);
}
static MyApp* my_app_construct (GType object_type) {
MyApp * self = NULL;
self = (MyApp*) g_object_new (object_type, "application-id", "testing.my.application", "flags", G_APPLICATION_FLAGS_NONE, NULL);
return self;
}
static MyApp* my_app_new (void) {
return my_app_construct (TYPE_MY_APP);
}
static void my_app_real_activate (GApplication* base) {
MyApp * self;
GtkApplicationWindow* _tmp0_;
GtkWindow* _tmp1_;
GtkLabel* _tmp2_;
GtkWindow* _tmp3_;
GtkLabel* _tmp4_;
GtkWindow* _tmp5_;
GtkWindow* _tmp6_;
self = (MyApp*) base;
_tmp0_ = (GtkApplicationWindow*) gtk_application_window_new ((GtkApplication*) self);
g_object_ref_sink (_tmp0_);
_g_object_unref0 (self->priv->window);
self->priv->window = (GtkWindow*) _tmp0_;
my_app_build_menues (self);
_tmp1_ = self->priv->window;
gtk_window_set_default_size (_tmp1_, 400, 400);
_tmp2_ = (GtkLabel*) gtk_label_new ("Hello GTK!");
g_object_ref_sink (_tmp2_);
_g_object_unref0 (self->priv->label);
self->priv->label = _tmp2_;
_tmp3_ = self->priv->window;
_tmp4_ = self->priv->label;
gtk_container_add ((GtkContainer*) _tmp3_, (GtkWidget*) _tmp4_);
_tmp5_ = self->priv->window;
gtk_window_set_title (_tmp5_, "Hello GTK!");
_tmp6_ = self->priv->window;
gtk_widget_show_all ((GtkWidget*) _tmp6_);
}
static void __lambda2_ (MyApp* self) {
g_application_quit ((GApplication*) self);
}
static void ___lambda2__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self) {
__lambda2_ (self);
}
static Block1Data* block1_data_ref (Block1Data* _data1_) {
g_atomic_int_inc (&_data1_->_ref_count_);
return _data1_;
}
static void block1_data_unref (void * _userdata_) {
Block1Data* _data1_;
_data1_ = (Block1Data*) _userdata_;
if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
MyApp * self;
self = _data1_->self;
_g_object_unref0 (_data1_->dialog);
_g_object_unref0 (self);
g_slice_free (Block1Data, _data1_);
}
}
static void __lambda4_ (Block1Data* _data1_, gint response_id) {
MyApp * self;
gboolean _tmp0_ = FALSE;
gint _tmp1_;
gboolean _tmp3_;
self = _data1_->self;
_tmp1_ = response_id;
if (_tmp1_ == ((gint) GTK_RESPONSE_CANCEL)) {
_tmp0_ = TRUE;
} else {
gint _tmp2_;
_tmp2_ = response_id;
_tmp0_ = _tmp2_ == ((gint) GTK_RESPONSE_DELETE_EVENT);
}
_tmp3_ = _tmp0_;
if (_tmp3_) {
gtk_widget_destroy ((GtkWidget*) _data1_->dialog);
}
}
static void ___lambda4__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
__lambda4_ (self, response_id);
}
static void __lambda3_ (MyApp* self) {
Block1Data* _data1_;
GtkAboutDialog* _tmp0_;
GtkWindow* _tmp1_;
gchar* _tmp2_;
gchar* _tmp3_;
gchar** _tmp4_ = NULL;
gchar** _tmp5_;
gint _tmp5__length1;
_data1_ = g_slice_new0 (Block1Data);
_data1_->_ref_count_ = 1;
_data1_->self = g_object_ref (self);
_tmp0_ = (GtkAboutDialog*) gtk_about_dialog_new ();
g_object_ref_sink (_tmp0_);
_data1_->dialog = _tmp0_;
gtk_window_set_destroy_with_parent ((GtkWindow*) _data1_->dialog, TRUE);
_tmp1_ = self->priv->window;
gtk_window_set_transient_for ((GtkWindow*) _data1_->dialog, _tmp1_);
gtk_window_set_modal ((GtkWindow*) _data1_->dialog, TRUE);
g_signal_connect_data ((GtkDialog*) _data1_->dialog, "response", (GCallback) ___lambda4__gtk_dialog_response, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
_tmp2_ = g_strdup ("Gustav Hartvigsson");
_tmp3_ = g_strdup ("Some One Else");
_tmp4_ = g_new0 (gchar*, 2 + 1);
_tmp4_[0] = _tmp2_;
_tmp4_[1] = _tmp3_;
_tmp5_ = _tmp4_;
_tmp5__length1 = 2;
gtk_about_dialog_set_authors (_data1_->dialog, _tmp5_);
_tmp5_ = (_vala_array_free (_tmp5_, _tmp5__length1, (GDestroyNotify) g_free), NULL);
gtk_about_dialog_set_program_name (_data1_->dialog, "Hello GTK!");
gtk_window_present ((GtkWindow*) _data1_->dialog);
block1_data_unref (_data1_);
_data1_ = NULL;
}
static void ___lambda3__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self) {
__lambda3_ (self);
}
static void __lambda5_ (MyApp* self) {
GtkLabel* _tmp0_;
_tmp0_ = self->priv->label;
gtk_label_set_text (_tmp0_, "I have been clicked!");
}
static void ___lambda5__g_simple_action_activate (GSimpleAction* _sender, GVariant* parameter, gpointer self) {
__lambda5_ (self);
}
static void my_app_build_menues (MyApp* self) {
GMenu* _tmp0_;
GMenu* app_menu;
GSimpleAction* _tmp1_;
GSimpleAction* quit_action;
GSimpleAction* _tmp2_;
GSimpleAction* about_action;
GSimpleAction* _tmp3_;
GSimpleAction* message_action;
g_return_if_fail (self != NULL);
_tmp0_ = g_menu_new ();
app_menu = _tmp0_;
g_menu_append (app_menu, "Message", "app.message");
g_menu_append (app_menu, "About", "app.about");
g_menu_append (app_menu, "Quit", "app.quit");
gtk_application_set_app_menu ((GtkApplication*) self, (GMenuModel*) app_menu);
_tmp1_ = g_simple_action_new ("quit", NULL);
quit_action = _tmp1_;
g_signal_connect_object (quit_action, "activate", (GCallback) ___lambda2__g_simple_action_activate, self, 0);
g_action_map_add_action ((GActionMap*) self, (GAction*) quit_action);
_tmp2_ = g_simple_action_new ("about", NULL);
about_action = _tmp2_;
g_signal_connect_object (about_action, "activate", (GCallback) ___lambda3__g_simple_action_activate, self, 0);
g_action_map_add_action ((GActionMap*) self, (GAction*) about_action);
_tmp3_ = g_simple_action_new ("message", NULL);
message_action = _tmp3_;
g_signal_connect_object (message_action, "activate", (GCallback) ___lambda5__g_simple_action_activate, self, 0);
g_action_map_add_action ((GActionMap*) self, (GAction*) message_action);
_g_object_unref0 (message_action);
_g_object_unref0 (about_action);
_g_object_unref0 (quit_action);
_g_object_unref0 (app_menu);
}
static void my_app_class_init (MyAppClass * klass) {
my_app_parent_class = g_type_class_peek_parent (klass);
g_type_class_add_private (klass, sizeof (MyAppPrivate));
G_APPLICATION_CLASS (klass)->activate = my_app_real_activate;
G_OBJECT_CLASS (klass)->finalize = my_app_finalize;
}
static void my_app_instance_init (MyApp * self) {
self->priv = MY_APP_GET_PRIVATE (self);
}
static void my_app_finalize (GObject* obj) {
MyApp * self;
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MY_APP, MyApp);
_g_object_unref0 (self->priv->label);
_g_object_unref0 (self->priv->window);
G_OBJECT_CLASS (my_app_parent_class)->finalize (obj);
}
GType my_app_get_type (void) {
static volatile gsize my_app_type_id__volatile = 0;
if (g_once_init_enter (&my_app_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (MyAppClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) my_app_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MyApp), 0, (GInstanceInitFunc) my_app_instance_init, NULL };
GType my_app_type_id;
my_app_type_id = g_type_register_static (GTK_TYPE_APPLICATION, "MyApp", &g_define_type_info, 0);
g_once_init_leave (&my_app_type_id__volatile, my_app_type_id);
}
return my_app_type_id__volatile;
}
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
if ((array != NULL) && (destroy_func != NULL)) {
int i;
for (i = 0; i < array_length; i = i + 1) {
if (((gpointer*) array)[i] != NULL) {
destroy_func (((gpointer*) array)[i]);
}
}
}
}
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
_vala_array_destroy (array, array_length, destroy_func);
g_free (array);
}
</pre>
<p>
If we look at the function <code>my_app_build_menues</code> (line 245) you will see that
on line 264 the action is added to the <code> self </code> object (equivilant to <code>this</code>
in the vala code). The action adding just passes a function pointer to the function
<code>___lambda3__g_simple_action_activate</code>, and if we follow the path we will see that that function
on line 228 calls an other function on line 193.
</p>
<p>
In the function prior mentioned (<code> __lambda3 () </code>) we can see that on line 211 there is another
string-up to the function <code>___lambda4__gtk_dialog_response ()</code> on line 187 that runs the function
on line 166.
</p>
<p>
This is what nested lambdas in Vala look like. it is scary and beautiful at the same time. I have no idea if
lambdas are slower than just creating a function and using them as parameters to the action/callback/delegates,
I just wanted to show of some of the sexy and dirty internals of Vala.
<p/>
Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-82130544827405331192013-04-21T20:38:00.000+02:002013-04-21T20:38:27.039+02:00The paper crane and the abyss of terror.<p>
<em>"I Have a dark secret" </em><br />
-- Someone
</p>
<h1> On the bombing in Boston. </h1>
<p>
I have not been watching or listening to the news these last few days, I must admit. But I have been on G+ and watched others react: some were horrified some were concerned, not only for those that lost limb and life and the possibility of it happening again, but also of the apparent overreaction of the authorities.
</p>
<p>
This last point is where I will start.
</p>
<h2> If I were the bomber </h2>
<p>
What was strange with this bombing was that no one claimed responsibility when it happened, so it was not rely an act of terrorism in that sense. That made me think that this was a lone crazy person (or a few).
</p>
<p>
It turned out that this was the work of an Islamist, young and disillusioned. more on this from ThunderF00t: <a href="http://youtu.be/YaryxQbqFMg" alt="YouTube link"> here </a>.
</p>
<p>
Any way... If I were the bomber, and I was a lone, crazy person, I would have been trilled to see the reaction of the authorities. A few dead and hurt is one thing, but having the whole city turned into a war-zone like place would have made me exalted because I would have caused fear and a living hell for the people in the city. Not only that but the loss to the economy would be great too. I would have won.
</p>
<p>
That is the point: the bomber won and the authorities lost, big.
</p>
<p>
The fact that he was arrested is of little importance here, the bomber won.
</p>
<h2> Why bombs? </h2>
<p>
The reason why bombs are so widely used by terrorists and other nutters is twofold: 1) confusion and 2) chock and awe.
</p>
<p>
<b>The confusion</b> caused by a bomb is a bit thrilling for the bomber, it makes it hard for authoresses to gather a comprehensive picture of what happened. And a clever bomber would have placed bombs in such a way that when paramedics arrive they are taken out causing more confusion.
</p>
<p>
<b>Shock and Awe</b> is something that is at the root of some acts of terror, it is the act of trying to make the target (be it a city, a state or a person) come around to your point of view. This is why Islamist terrorists are use bombs, they see it as a good way to chock (and awe) people into submission.
</p>
<h2> Aft word </h2>
<p>
I think I should make it clear that I think that bombing people is an act of cowardice. I do not condone the killing of others, at all for the matter (well perhaps a few).
</p>
<p>
So, what is my dark secret? I can put myself in the shoes of a mad man with his mind set on destruction. The colour red for anger, green for envy and black for murder is all they can see.
</p>
<p>
That is my secret.
</p>
<p>
Also: The latest <em>Doctor Who</em> was awesome.
</p>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-71348150040924541352012-09-07T23:59:00.001+02:002012-09-20T12:01:52.105+02:00The Paper Crane and The Living Image<p><em> "There is always a better way"</em> <br/>
-- Someone </p>
<h1>
I made some nice Vala tutorials
</h1>
<p>
Short story long: I was on Youtube to look if anyone had made any tutorials on Vala, I saw none so I decided to make a few.
</p>
<p>
That is fine and dandy, but I have a problem: <em>no one comments with questions</em>. So here I am asking who ever is reading this to give me a subject to work with, and if anyone wants to collaborate on a set of videos.
</p>
<p>
The play list so fas can be found <a href="https://www.youtube.com/playlist?list=PLFB4CDFB03ADF9FDF">here</a>.
</p>
<p>
And as (not) always, Comments are welcome!
</p>
<p>
//Gego
</p>
<p>
Ps. MathJax still work?
\[
A_{1} \cup A_{2} \cup A_{3} \cup \ldots \cup A_{n} \Leftrightarrow
\displaystyle\bigcup_{i=1}^{n} A i
\]
</p>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-5762908345839339992012-04-08T11:35:00.000+02:002012-04-08T11:35:31.807+02:00The Paper Crane and the Grim Reaper<em>"Life is short"</em> -- someone<br />
<br />
<h1>The deadpool of vala</h1><p>Here are a few of deadpool vala-projects that I think should have been saved and continued:</p><ul><li>Valum</li> valum was an attempt at creating a webframework for Vala. Valum could have made vala a realy useful lanuage on the web.
<li>Dova</li> Dova was an attempt at creating a new type-system for vala that did not depend on GObject. The problem with GObject is that it is so "stuck" in the C world, whilst Dova was written in Vala and was not uncombed as much with the C world.
</ul><p>There are probobly some other projects that need to be revived, and if so past a comment bellow with the project name and what it was suppose to do.</p><p><b> On the subject of vala projects,</b> I have been working on a reimplimentation of javas <a href="http://processing.org/">processing</a> library in vala, I call my project <a href="https://launchpad.net/vprocessing">vProcessing</a> (vala Processing). It is written in vala and utilises SDL (Simple Direct Media Layer) for rendering, but my goal is to have the code as backend specific as possible, so it that at a later date there could be a change of backends if needed.</p><p>Well I need some help with vProcessing in that I have a general idea but no idea as to what the class structure should look or what is needed.</p>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-61911025301958741002012-03-14T16:01:00.001+01:002012-03-14T16:02:41.570+01:00The Paper Crane and the Cake<em>"[...] Pi is still wrong! [...]"</em><br />
-- Vi Hart<br />
<br />
<h1>Happy half tau day!<br />
</h1><br />
<p>So today is the infamous Half Tau Day... and as is compulsatory on this day you have to see Vi Harts "Pi is still wrong" video.<br />
</p><iframe width="100%" height="390" src="http://www.youtube.com/embed/jG7vhMMXagQ" frameborder="0" allowfullscreen></iframe>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-44823818603896294652012-03-01T14:10:00.002+01:002012-03-01T16:16:57.156+01:00The Paper Crane and the Vast Ocean of Space<em>The sky calls to us</em> -- Carl Sagan<br />
<br />
<h1>What saddens me </h1><p>It just truck me, that there are not that many people left in the world that can move us to tears over the beauty of nature, that can make us humble to the unimportance of the human species in the grand schema of thing. We are just an eye blink to the universe, not even that.<br />
</p><p>Carl Sagan has been dead for some time now, he died 1996 CE. Christopher Hitchens died 2011 12 15.<br />
</p><p>Those who do remain are old, they are, perhaps the last great philosophers of science, The last debaters of reason, the last to give science the place it deserves in popular media. This saddens me.<br />
</p><p>The rise of extremism and anti science policy around the world is frightening, it is in times like these when we need to stand on the barricades and speak... but what if no one is able to speak in a way that makes people think? -- This is why we NEED these people who can speak, who can move our non-existent soles to what this world is.<br />
</p><p>I would like the world to listen to the last philosophers of science, debaters and scientists of the era, to give it a thought and do what is right. Not to do what you are told by some desert scribblings.<br />
</p><p>There are new philosophers of this era, but they are drowning in a sea of the mass media, they drown in the noise of social media. They are drowning, we are drowning in stupidity of the religious.<br />
</p><p><b> One last thing:</b> Be good for goodness sake, not out of ph34r.<br />
</p><br />
<p>Look what I found: it is Neil deGrasse Tyson on the subject:<br />
<iframe width="420" height="315" src="http://www.youtube.com/embed/-_2xGIwQfik?rel=0" frameborder="0" allowfullscreen></iframe><br />
</p>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-48288551216275046612012-01-23T22:14:00.000+01:002012-01-23T23:10:59.433+01:00The Paper crane and the bottle<em>"well shit.."</em>
<h1> Shit is not a swear word! </h1>
<p>
I come from the word "shit" is not considers a swear word.
</p>
<p>
I was on IRC today, on #ubuntu-offtopic on Freenode to be precise, and I said "shit", Well guess what, some person was like "Watch your language".
I am so pissed when people say that SHIT is a swear ward that I always blow a fuse. b/c "shitting" is some thing we do!
And why the fuck should they care? <em>"It is in the rules"</em>, well, Why? <em>"cus it is.."</em>.... WHY?!?!? any normal human
above the age of five knows this word! How the fuck are you "protecting"? There are no 4 year olds an fucking IRC! How could there be?
</p>
<p>
Gawd damn it, English world, You have to make my life so fucking hard. I mean come on, "Shit" is something that is so low on my list of swear words that it is not one.
</p>
<p>
"Fuck" is a swear word, "shit" is not. Get your facts straight fucking moralist.
</p>
<p>
Something thot may, or may not help my case:
<iframe width="480" height="360" src="http://www.youtube.com/embed/80LHkWTSxHI" frameborder="0" allowfullscreen></iframe>
</p>
<p>
More on "correctness":
<iframe width="480" height="360" src="http://www.youtube.com/embed/q4ns7u2P4D0" frameborder="0" allowfullscreen></iframe>
</p>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-11418347963223214982012-01-12T23:16:00.003+01:002012-01-12T23:16:32.970+01:00Test of MathJax\[ E_q=\frac{(\frac{x}{y})}{x} \]
source: </br>
http://www.mathjax.org/demos/use-in-web-platforms/Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com1tag:blogger.com,1999:blog-8245077378107193153.post-63914943672734987562012-01-05T23:59:00.000+01:002012-01-05T23:59:14.769+01:00The paper crane and T͓̮̄ͭͫ͜h̬͊͞e̷̩̠̹͚͕͇̝͋̏͒́͆͆͟ ̵̢͇̥̯̦̖ͩ͌̒́̆͜N͉ͬͣ̽ͥͣͩ͝͞ë͍̭͚́̌̈́̅́͝z̞͔̮̳̰̭̜͙̍ͨͥ̿͐̋ͯ̿p͚ͧͣ͠ͅe͕̞͆̀͒ͥ̔ͤͫ͑̕ŗͤ̾͗̔͟͏̖d͛̋͒ͭ͊̐҉̠̭͕͖͕͈̕͝i̟͇͍͓̘̒ͩa̖̖͍̾ͫͩ̉́̈́ͬ̑̕͢ņ̡̬͓̭̥͉̻̻ͩ̾͗͟ ͚̩͓̞̫ͮͫ̔ͦ̎ͤḩ̹̲ͯ̌͗̊î̶̷͇͗ͭ͑̂v̷̨ͯ̓̏͏̺͔ë́̽̏ͥ̌̀͝҉̱̼̱̞-̵̘̘̦͇̖̋̌ͧͫͬ̈̑ͯ̾m̻̻̟̘̦̱ͫͫͭ̀̌̚͘i͍͕̩̣̞͎̓͆n̷͍͈̘̝͈̼̟̓̋̉̒͡d̲͚͔͓͙͕͍̉͌́ͩ̔ͩ͘ ̓͡͏͙̺͚͔ó̶͎͊̃̋ͤ͘f̡̳̖͎͔̣̬͆ͫͯ ̛̝̣̥̬͈̔̈ċ̡̺̬̣̽̃h̷͔̬͎͍̩ͩͨ͜ạ͉͎̋o͕͖̫͚̣͕̹̽ͬ̆ͦ̔ͭͪś̯̬̭̤̗͍̙͔̓̏͋ͫͮ͛̇̚͠.̨͚̙͉ͨ̀͡<em>"This shit is stupid.."</em> -- me
<h1> On "less then" </h1>
<p>
I am so fucking sick of peopel saying "A is X times less then Y"...
</p>
<p>
If you want to say <em>"Y is X times {more, bigger ,longer} then A"</em> I woulh not have any complaints, but the <em>"A is X times less then Y"</em> has and will always bug me!
</p>
<p>
It is so extreme that I physically twitch when I hear it.
</p>
<p>
Now then, That was the last rant on this subject...
</p>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-56217549423778549942012-01-01T14:56:00.001+01:002012-01-01T20:11:41.785+01:00The paper crane and the looking glas<em> "There is one thing I realy hate and that is ...."</em> -- your Mom
<h1> My rewive of G+: Why it will phail. </h1>
<p>
So, I have never been a liker of FaceBook, so I tryed this G+ thing... And I must say "I am not impressed".<br/>
G+ has a few flaws:
<br/>
<lu>
<li> It is not User Friendly, is what I see when peopel use FaceBook too... </li>
<li> There is no StatusNet (or Dispora) integratien/connection, This is a BIG flaw.. </li>
<li> But what will make G+ die?: It is not Federated... That is THE problem with G+ </li>
</lu>
</p>
<h2> Why is Federation so Imprtant? </h2>
<p>
This has to do with the user freedom, and the non-vonrability of the system. Take for example StatusNet, When Identi.ca went down for 3 days, the rest of StatusNet did bearly notice it, exept that there were less posts in the stream, But there instance of it was up and running, and they could make posts to other nodes in the network.
</p>
<p>
User control of data is an other big thing, when it is Federated you can pull all your posts and push it to a diffrent provider that runs the same software, and you would not notice (much), all your subscriptiions are all ther, all your posts (but not your subscribers). And you would have Control over that data. Hey there is an <a href="https://gitorious.org/samatjain/statusnet-backup" title="<3 samatjain"> application </a> for pulling the ActivityStream from your Identi.ca... but back to topic...
</p>
<p>
And one of the things that make StatusNet better then G+ or any other site: Groups, This is not present on Twitter or G+. Not to talk about that there is no diffrent between Subscriptions and Friennds. And the name "Follow"? am I a facking stalker? No, I want to subscribe to a person, not "follow" them.
</p>
<h2> Why not just use Facebook?</h2>
<p>
Awnser:
<lu>
<li> It is not federated, I have no control over any part of the data, all your data that you put on FB is not your data, not your pictures, not your ideas... They belong to Mark Zuckerberg. He has 100% right to copy, edit, and refoctor any port of the data you put on there, it is his content, not yours. </li>
<li> Your mom is on there.... I do not like her.... </li>
</lu>
</p>
<b> that is all.... </b>Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-41298789180426600272011-12-31T14:12:00.002+01:002011-12-31T18:34:09.709+01:00The Paper Crane and the public static int main(string[] args)<em>"all languages suck"</em><br />
-- some one<br />
<br />
<h1>Why We Still use C: a case for Vala </h1>So I have been lookingn at the Vala pagraming lanuage, and I must say I am inpressed... But why does it compile C code? Why does it not just compile straight to machine code?<br />
<br />
The awnser is simple:<br />
<br />
If it were to compile to machine code it would be hard, if not impossible, to reuse the librarys you make in Vala in other programs. This is the same problem that we have with CXX, CXX code is, virtualy, only reusable in CXX. While C code can, and is exposed to, vitualy, all other lanuages (Exept mabye Assembler and LISP).<br />
<br />
An other poblem with CXX is the there is no single "true" STL, the standard does not explisetly define the functions, only interfaces, expected behaviour and expected output. Not the functions themselfs. This makes code/library reuse ard if not imposible.<br />
<br />
In C there is one set of base librarys, only one, they have the some behaviour as all the rest of the implimentations of them. Take look at rand() function for example, is is well defined it K&R. and it looks, vitrualy, the same in all implimentations of the C Standard Library(ies).<br />
<br />
But the again, C standard library on Windows has itoa() which is not (atleast i can not make it work) in GCC / the GNU implimentation.<br />
<br />
This is why, when you make a <b> library </b> think about portability, reuse and other lanuages then your favorit. Use C (or Vala) for the love you have for your hacker brothers, sisters and undifined.<br />
<br />
Here is a good video on C, Vala, Python and GObjects that sums up why we still use C:<br />
<iframe width="420" height="315" src="http://www.youtube.com/embed/6QrGmA_RR4E?rel=0" frameborder="0" allowfullscreen></iframe><br />
<br />
Oh and BTW: I am going to write a game in Vala, and maby create a library for colliton detection for SDL_Rects.....<br />
<br />
<h2>EDIT </h2>ehm.. peopel, if anyone has would like to have Mono runtime/jit bindings in Vala, and would like to mentor me in the magic of .vapi files and the Mono class structure, I could do some work on that...Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-62635427170200400622011-11-21T17:54:00.000+01:002011-11-21T17:54:41.287+01:00The paper crane and the void.<em>"I feel so dumb"</em> -- you.<br />
<br />
<h1>Tell we what to write about </H1><br />
<br />
So I have not posted here in a while, well I have University to attend and such, so I do not get so much free time/spare biological prepossessing power to think about random shit I find.<br />
<br />
<br />
So I give you a challenge:<br />
<b>Tell me what to write about.</b><br />
<br />
If that does not work then here is today topic:<br />
<br />
<h1>The fall of youtube </h1>You see that quote at the top?<br />
<p>Well that is how I feel when I now go to youtube, there is no longer any debates or flame wars on youtube, this is like what I thought youtube was never going to be, large corporate channels and dumb entertainment.<br />
</p><p>I mean, I basicly now only go to youtube to watch the yogscast play MineCraft. Where are all the heroes of old? Where is edible napalm and the gang now? where is the debate? Has the trolls in us gone to sleep? Tell me.<br />
</p><p>I loved the old youtube, without all the crap, now the top and featured videos are not by Edward Current or CapnOAwesome (We miss you Kevin <3, and the world needs you).. no now music videos are at the top.
</p><p>This is saddening to me, it was like when I thought that the Tribes Universe was dead, But now I see hope in Tribes: Ascend and Tribes Universe, but there is no Linux Client as it seems now. (back on track!).<br />
</p><p>I think that the debate started to die when CapnOAwesome left[1]. The steam went out of the balloon so to say. When two peopel on the same side start to fight, it became uncomfortable.<br />
</p><p>Then youtube made a redesign, making small channels hard to see, and that is concreted though newer versions of youtube.<br />
</p><p>So for the love of all that is good, Google fix youtube, have a now system where small channels get pushed to the top in a "new channel" section or have a "Debated videos" section.<br />
</p><p>Just sayin.<br />
</p><p>And to round of this post, here is ThunderF00ts take on this:<br />
<iframe width="500" height="315" src="http://www.youtube-nocookie.com/embed/Tl8l3rrYGb0" frameborder="0" allowfullscreen></iframe><br />
<!--- Why do we still need iframes Google? KILL IT WITH FIRE! ---><br />
</p><br />
[1] I reject you reality and substitute my own.Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-73561508947892709752011-08-21T14:48:00.000+02:002011-08-21T14:48:40.484+02:00We dont need you<em>"Science is the shit" -- someone. </em><br />
<br />
<h1>On Science </h1><br />
I was watching a rerun (I think) about Science Journalism, and one of the people speaking (a reporter from The Guardian) talked about the necessity of science and and why we need to make it interesting to people in the larger world, and tell them "You can not live without science!". He also talked about the partnership between them and Ten Alps on a project called <a href="http://www.newton.tv/"> Newton.tv </a> (but that is another story).<br />
<br />
Back to topic!<br />
<br />
I have heard people say shit like: "Why should we spend this huge about of money on Science when there are people starving?" My answer is rely not that politicly correct: "you look to short sighted on the problem, <b> we need science </b> to solve the problems at hand, <b> we need </b> to educate people in what is wrong with the way they do things and to give them the mental tools to make there own future and to help the spices as a howl to evolve" (not maybe this well formulated or this long, but the gizt of it).<br />
<br />
And I sometimes chock myself with thoughts like: <em>"Why should we help them? They are enpoveraged and can not see the things they do wrong, why give live to 10 kids when you can barley feed yourself?" </em><br />
<br />
But then I remind myself that theese are humans too... They are just less educated and are religious, which makes them more vulnerable to irrational beliefs which leads to lower education.... and so the wheel of enpoveragment spins.<br />
<br />
No the only whay to "save the world" is to (let me borrow a quote from the Qatar fond (I think)) "Help people help them self" using science as the path we all must walk, even if we trample on some tows on the way.<br />
<br />
<br />
Love Gego XARENGegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-48165779166342842152011-07-28T18:39:00.000+02:002011-07-28T18:39:05.607+02:00Re:SelfI think I should clarify what I saied in the last blag post...<br />
<br />
<h1>Re:Days </h1><br />
<code><br />
<br />
>"I do not consider my self a racist" -- me<br />
<br />
This is true<br />
<br />
>*Tow days after the event in Norway*<br />
<br />
>I was listening to what the panel on TV (Watching NRK via SVT) had to say after the event in Norway yesterday, and I was chocked at what they had to say about the assailant. He seemed to have had some of the same thoughts as I had once and that made me think.<br />
<br />
>Could That guy, the assailant, have been me? someone who is outspoken against terror and Islam (not Muslims in general)?<br />
<br />
I am also against Christianity, Judaism, Hinduism, Buddhism etc etc.<br />
This is due to what I think of religion. Religion is a way of controlling people, but have we not advanced from the savage ways of religion?<br />
<br />
>It could have... but I am against needless killings, so no.<br />
<br />
>I do not think that there is anything wrong with the basic idea of multiculturalism, but I am against the phear that people have of offending others, that is what I am against.<br />
<br />
Nothing to add here.<br />
<br />
>I mean I love my dömer kebab with chips, and I think that some of the Middle Eastern, Asian, or African girls can be quite cute.<br />
<br />
mmmmmm kebab... And females of the species Homo Sapient are good too.<br />
<br />
>What I am against is what I have always been against: fear of offending, fear of telling people how things are and how stupid they are for believing the shit they do.<br />
<br />
I wish that I was brave eghnuff.... sigh why con you not spell enough as it sounds?<br />
<br />
>And I am against indoctrination, this is the worst of em all, kids are led to believe that there is a cosmic dictatorship that will punish them if they disobey, it is terrorism of children, and I call it child abuse, I even want to put it at level with sexual abuse of someone in a position of dependence.<br />
<br />
>And btw, the assailant was Christian, I am not. <br />
<br />
Atheist... if you do not get the gist of what I am tellin ya.<br />
<br />
</code><br />
<br />
<h2>Side note </h2><br />
I relay need an apartment in and/or around Skövde...Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-66215179776105452332011-07-24T14:49:00.000+02:002011-07-24T14:49:38.616+02:00Days<em>"I do not consider my self a racist" -- me </em><br />
<br />
<h1>Tow days after the event in Norway </h1><br />
I was listening to what the panel on TV (Watching NRK via SVT) had to say after the event in Norway yesterday, and I was chocked at what they had to say about the assailant. He seemed to have had some of the same thoughts as I had once and that made me think.<br />
<br />
Could That guy, the assailant, have been me? some one who is outspoken against terror and Islam (not Muslims in general)?<br />
<br />
It could have... but I am against needless killings, so no.<br />
<br />
I do not think that there is anything wrong with the basic idea of multiculturalism, but I am against the phear that people have of offending others, that is what I am against.<br />
<br />
I mean I love my dömer kebab with chips, and I think that some of the Middle Eastern, Asian, or African girls can be quite cute.<br />
<br />
What I am against is what I have always been against: fear of offending, fear of telling people how things are and how stupid they are for believing the shit they do.<br />
<br />
And I am against indoctrination, this is the worst of em all, kids are led to believe that there is a cosmic dictatorship that will punish them if they disobey, it is terrorism of children, and I call it child abuse, I even want to put it at level with sexual abuse of someone in a position of dependence.<br />
<br />
And btw, the assailant was Christian, I am not.Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-84316081228421372862011-07-14T21:32:00.000+02:002011-07-14T21:32:48.899+02:00Anti-Shit hits the Shit.<em>“Life is the shit that happens while you're waiting for moments that never come.”</em><br />
~ Lester Freamon on Life<br />
<br />
<h1>I got accepted to Högskolan I Skövde, computer science.....</h1><br />
so to celebrate I decided to make a blag pasta.<br />
<br />
and insert a youtube video of cats.<br />
<br />
<object width="480" height="390"><param name="movie" value="http://www.youtube-nocookie.com/v/QH2-TGUlwu4?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/QH2-TGUlwu4?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="480" height="390" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<br />
But the sad thing is.... I nood now to get an apartment in schoewdeh... ehm.. skövde, but I am an thet too.<br />
<br />
soo wish me luck then..<br />
<object width="480" height="390"><param name="movie" value="http://www.youtube-nocookie.com/v/Q9QXlwOtwx0?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/Q9QXlwOtwx0?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="480" height="390" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<br />
I think I should stop posting random semi cat related videos on my blog... so I will... This was a one off.Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0tag:blogger.com,1999:blog-8245077378107193153.post-79187343785271162902011-06-29T20:43:00.000+02:002011-06-29T20:43:22.931+02:00I have now translated my CV to English...see post post posted 2099-01-01 13:37...Gegohttp://www.blogger.com/profile/10464390588376829204noreply@blogger.com0