Moving to a new server
I’m currently moving my blog and everything on experimentalworks to a new server. The new server is running latest OpenSolaris with all the fancy stuff in it. Enjoy.
I’m currently moving my blog and everything on experimentalworks to a new server. The new server is running latest OpenSolaris with all the fancy stuff in it. Enjoy.
I bought a G1 dev phone six month ago. Not because I seriously wanted to write applications for the android platform, but because it was the only way to get an Android based phone in Europe. Nevertheless, the complete Android platform is really appealing to me, mainly because it’s more open than an iPhone, there are much more nerdy apps for it and – yeah I know what you think – it’s based on Java.
Warning this is a potential boring blog entry. Apprx writting time was about 5min
I once tried writing applications for the iPhone and started to like the concept of Obj-C while still I hate the syntax and I don’t like the API that much. Android makes things simple for me, and I guess for most people knowing a little bit java. It implements big parts of the Java standard (although it doesn’t claim to be standard compatible) which makes it easy to start writing apps if you know the libraries a little bit. Android also includes the powerful HTTP libraries of the Apache project as well as Json and XML parsers.
Having said this, the most important factor why I started to love my phone and the Android system: I can easily deploy apps on my phone, I debug it on my phone, I have nearly the complete power of the java framework and I totaly enjoy seeing my first app starting on the actual phone after 1 hour of coding. The app itself is fairly simple. It’s a basic search interface phpMyFAQs upcoming Rest API.
So you can search an existing phpMyFAQ installation for a search term and display the result. Although the app needs phpMyFAQ 2.6.0-alpha it’s already available in the Android Market. So feel free to check it out. You can test it with the URL: http://faq.phpmyfaq.de/. The source can be found at http://github.com/thorsten/pmfMobileKit. Expect more updates to the app soon.
Ich bin mir gar nicht mehr sicher, wann ich das Chaosradio entdeckt habe. Es wird so ca. vor zwei Jahren gewesen sein, als der Begriff Podcast geschaffen wurde und die ersten deutsprachigen Podcasts das Licht der Welt erblickt haben. Als technologieverliebter Nerd stößt man so unweigerlich früher oder später auf das Chaosradio. Während ich anfangs eher das dreistündige Chaosradio, das auch auf Fritz ausgestrahlt wird, anhörte, bin ich doch relativ schnell dazu übergegangen Pritloves Express-Variante zu abonnieren. Denn sind wir mal ehrlich, zwar sind die Anrufer bei Chaosradio manchmal ganz amüsant, doch zum Großteil eher nervend. Die kompakten und meistens inhaltlich guten Folgende des CREs machen da deutlich mehr Spaß.
Inhaltlich ist das CRE eher technisch aufgestellt und befasst sich mit allem was den Nerd erfreut, sozusagen die Cub-Mate des audiophilen Tekki. CRE ist also gut für die Geek-Gesundheit, liefert einen Blick über den Tellerrand und, hepp, befasst sich sogar mit Soziologie und Politik. Und manchmal werden sogar langjährige Wünsche erfüllt.
Absolute Highlights sind natürlich Folgen wie die Bayrische Hackerpost, Internet Memes und der Mifare-Hack. So ist es kaum verwunderlich, dass man nach späterstens zwei Wochen CRE freie Zeit anfängt unruhig den CRE Blog anzusurfen und den Podcast Feed zu abonnieren. Leider fehlt immer noch was zum Thema PHP, aber das ist ja per se uncool, deswegen wird das wohl auch nichts mehr. Schade eigentlich, vielleicht gibts ja nochmal was dediziertes zum Thema Flamewars, da kann man PHP dann immer gerne einstreuen. Überhaupt gibt CRE immer Anlass zur Diskussion, meistens weil ein Detail in irgendeinem Nebensatz nicht stimmte oder allgemein der Gast inkompetent war, aber eh klar: man selbst ist immer der bessere Experte (vorallem wenn es um DVCS geht, wo’s vielleicht sogar stimmen würde *rant*). Aber auch “ranten” gehört zur Informatikerausbildung. Also immer brav CRE hören.
Was man am CRE verbessern kann?:
Ich finde die Idee mit einem Photo pro Podcast eigentlich ganz gut. Mehr fällt mir auch nicht ein.
Und jetzt weiter in der von Tim initiierten Blogkette:
Zurück zu Nummer 12 in der Blogkette.
Weiter zu Nummer 14 in der Blogkette.
und jetzt weitermachen!
For those of you, who didn’t notice so far, in the last 6 month we worked on a more userfriendly and accessible page than the current mercurial website. Three weeks ago we launched hg-scm.org which is quite similar to git-scm.org. I hope you enjoy it
We like to invite you to the PHP 5.3 release party which is an event to
celebrate the 5.3 release, happening Friday, the 17th of July in Munich.
The release party offers a chance to come together with other php
enthusiasts and enjoy that php is alive and kicking. And of course people
in favour of a decent barbecue, together with some beer and other drinks
are invited.
The happening will take place at Waldwirtschaft (http://www.waldwirtschaft.de)
beer garden, at any weather. We will meet at 19:00 o’clock – open end.
Catering will be provided and as a special delicacy you may enjoy a suckling pig!…hopefully vegetarian food. If you like to join the event please register at PHPUG-Munich Wiki (http://phpugmunich.org/dokuwiki/php_release_party) and follow it for updates. Alternatively you may register at Facebook
(http://www.facebook.com/event.php?eid=115203467104) as well and follow
this for updates.
For any questions please visit IRC channel: #phprp on irc.uni-erlangen.de.
The PHP 5.3. BBQ release party is sponsored by:
– Microsoft
– Mayflower GmbH
– Swoodoo AG
– Zend Technologies GmbH
Supporters for the PHP 5.3 BBQ release party are:
– Sun Microsystems
- PHPUG.de
I think most of the people using PHP wonder from time to time about particular behavior of the language. That’s pretty much the same case with every language. Pythoneers have their wtf moments, Ruby programmers have their wtf moments and C programmers tend to live in a whole wtf universe. But lately I stumbled over a nice one. It looked like a bug in PHP, but turns out to be an interesting, curious, part of the C-language. Imagine the following PHP code sample and note that $a and $b are not defined (yeah I know, it’s bad coding style..blabla..):
<?php
var_dump($a + $b);
?>
What is the expected result with error_reporting set to E_ALL?
.
PHP Notice: Undefined variable: b in /var/foo/bla on line 1
PHP Notice: Undefined variable: a in /var/foo/bla on line 1
Are you sure? I’m not. On x86 hardware b is fetched before a is fetched and therefore the executor detects that b is not set first. But wait. Let’s test this on a SPARC machine:
.
PHP Notice: Undefined variable: a in /var/foo/bla on line 1
PHP Notice: Undefined variable: b in /var/foo/bla on line 1
What? It evaluates it in the reversed oder? What is happening? So I spend a few minutes with my lovely debugger and it turns out that this is what happens in the engine (I use pseudo code here):
result ZEND_ADD_OPCODE()
{
return add_function(get_op1(), get_op2());
}
Voila, that’s the problem. On SPARC get_op1() is executed before get_op2(), while it’s the other way round on x86. As get_opX() detects if a variable exists, the error messages appear in reversed oder. I did a little bit research (thank you SunCC Team for your answer!) and it turned out, that C99 doesn’t define the way function calls in parameter lists are executed. Therefore, every system and compiler is free to use it’s own ordering mechanism. My current plan: Write a compiler that does this by random(). The fix is trivial:
result ZEND_ADD_OPCODE()
{
op2 = get_op2();
return add_function(get_op1(), op2);
}
. It’s a lovely curiosity.
Interacting between git and subversion is quite common. The git command git-svn can be used to import existing subversion repositories into git and commit synchronize commits between two repositories. While importing a subversion repository into git is common, importing an git repository into subversion is quite unusual. There are various tools to do so, but most of them require direct access to the svn repository. In fact it is possible to use git-svn to get that job done. Frankly it requires some git voodoo and knowledge of the graft-feature. We’ll do a sample import using grafts, but before we start, we’ll explain the theory behind the import.
Read the rest of this entry »
The PHP BBQ Tour organized by Ulf Wendel and various PHP Usergroups in Germany will stop in Karlsruhe. For those of you living near Karlsruhe, it’s definatly worth to join us. There will be food, drinks and I’m sure it’ll be a great evening. Information can be found here
There were some rumors recently about Gopals ext/scream. This extension disables the @ operators and therefore makes all errors visible. If you want to use the extension you have to build the extension and restart your PHP modules so that the extension is loaded.
But there is a more elegant to get the same behavior. Using DTrace and recent OpenSolaris 2009.06 we are able to use the php:::error probe to get all error messages. Unlike the PHP extension we do not need to restart our PHP. We are also able to just temporarily look into the errors of all running PHP processes. Here is the DTrace script:
#!/usr/sbin/dtrace -s
php*:::error {
printf("Error \"%s\" in file %s line %d\n", copyinstr(arg0), copyinstr(arg1), arg2);
}
This will display all errors that occur. There is also a php:::exception-thrown probe which can provide nearly the same data for exceptions instead of errors.