Monthly Archives: August 2011

Quercus PHP on GAE: pining for file handles

Quercus really is great stuff; it allows nitwits like me to develop crappy PHP-applications and to deploy them on Google’s App Engine. But when you combine the limitations of Quercus’ PHP implementation with those of GAE, you’re going to have to code around some problems you wouldn’t be facing when developing a “normal” PHP webapp.

One example based on my limited experience (while writing a scanner service to detect “foreign” objects in websites for my future wp-privacy plugin): I had a CSV-file that had to be downloaded & parsed. Normally you would fopen the remote file and than use fgetcsv retrieve all data line per line. Or, if you’d prefer, you could fetch the file with mighty CURL and parse it using str_getcsv. But those approaches don’t work when in Quercus on GAE; fopening remote files doesn’t work (blame GAE)  and while you can Curl the CSV into a variable, there’s no str_getcsv in Quercus (yet).

So I did what any self-respecting non-developer would do; I cried for help on StackOverflow. Some of the advice I got there involved obscure tricks like using data-uri’s, fopening php://memory or using SplTempFileObject, but none of those solutions produced anything but errors. So no built-in CSV-parsing for me, but (simple) “manual” parsing of the CSV in a string. Not a huge problem by any measure, but I’m sure there’s a whole lot more limitations, if only for all those functions that rely on file handles. But at least we’re having fun, no? ;-)

As found on the web (August 24th)

generic (feed #49)
generic (feed #49)
generic (feed #49)
blog (feed #46)
youtube (feed #51)
generic (feed #49)
frank posted Aurora 8 is here.
generic (feed #49)
youtube (feed #51)
generic (feed #50)
generic (feed #49)
generic (feed #49)
frank posted Depth Perception.
generic (feed #49)
frank posted Introducing WebAPI.
blog (feed #46)
frank published Wie is haar ei kwijt?.

Wie is haar ei kwijt?

Ge maakt wat mee als ge kippen op den erf hebt lopen; de ene dag komt  een egel uw kiekens aanvallen, een tijdje later ligt er een vreemd ei in de nest:

Nu is de vraag: welke vogel dacht hier koekoek te zijn? Een echt koekoeksei is het waarschijnlijk niet; als ik Wikipedia mag geloven leggen die begin juni hun ei bij zowat alles behalve kippen. Op Facebook opperden vriendjes dat het een merel- (maar die hebben blauwe eikes) of kievitsei (maar die zijn donkerder, met grotere vlekken) kon zijn, maar we zijn er dus nog niet uit. Wie helpt deze vondeling uit z’n slepende identiteitscrisis?

Firefox 6 on Ubuntu Linux swapping like crazy

Firefox 6 got pushed on my Ubuntu 11.04 netbook as an update a couple of days ago and things were badly broken; memory usage was skyrocketing, the kswapd was eating almost all CPU and the system was pretty much in a continuous wait-state.

After some cursing and a lot of Scroogling, I finally stumbled across this blogpost which described the exact same problem and advised to set  “layers.acceleration.force-enabled” (which tries to force hardware acceleration, which isn’t supported on Linux by default) back to “false” in about:config. And indeed this small rollback solved my memory-woes. Guess I shouldn’t have dismissed that silly about:config warning message after all.

And while we’re on the subject; Firefox 7 should see substantial improvements in memory usage, yay!

WP YouTu.be Lyte: a minor release & some meandering thoughts

Yesterday I pushed WP YouTube Lyte 0.7.3 out the gates. The main trigger for that new release was a bug report about the plugin not behaving as expected when using the youtu.be-links that you get when clicking the “share”-button on YouTube.  Being from that TLD mysself I could not but fix this; the new version recognizes and parses both httpv://youtube.com/watch?v=videoid and httpv://youtu.be/videoid links in posts, pages and widgets. Other features: Slovenian translation (thanks Mitja Mihelič @arnes.si) and a small change to the donottrack-inclusion to make it work over https (hat tip; Chris @ campino2k.de).

Speaking of donottrack: I’ve finally started rewriting that privacy-enhancing plugin. It might … No, it WILL take some time, but expect a whitelist-based approach where you’ll be able to get a report of all inclusions of external content (images, css, javascript, …) in your site and where you can just tick a checkbox per domain you want to allow. All other current and future domains that rogue plugins try to smuggle in after you configured, will be stopped. Next to document.write’s I hope to be able to catch innerHTML and DOM methods like insertBefore and appendChild. If you’re a javascript DOM magician, I could sure use your help on those!

Not sure where I’ll be going with WP YouTube Lyte, it feels pretty complete to me. Stuff that might be added at a later stage;

Do comment below or contact me if you have other feature requests though! And thanks for all the downloads (36.000 and counting)!!

And as is traditional of WP YouTube Lyte announcements, here’s a small video to celebrate the new release; Intergalactic Lovers, a Belgian band, playing “Delay” live.

Intergalactic Lovers – Delay – 23-05-2011

Watch this video on YouTube.

As found on the web (August 3rd)

generic (feed #49)
youtube (feed #51)
blog (feed #46)
generic (feed #49)
generic (feed #49)
generic (feed #49)
youtube (feed #51)