Alexey Zakhlestin's Blog

Programming for Mac and Web

PDO Gets Official Support From MySQL AB

Permalink

Lukas Kahwe Smith just posted the following to php.internals mailing list:

Ok, it seems that MySQL AB is finally committing to fix up PDO_MySQL and to generally accept the fact that PDO is the future. Of course mysqli will also be actively maintained. But they will also make mysqlnd play nicely with PDO etc.

They have a budget allocated for PDO development. They will soon assign a developer on this I am told. As part of this effort it is expected that the entire PDO test suite will also benefit.

Furthermore they have allocated someone from the doc team to check over the ext/mysql and ext/mysqli docs. I will poke the relevant people at regular intervals, that any MySQL specific features in PDO will make it into the docs.

I was waiting 2 years (at least) for this to happen. Thanks for the good news, Lukas :)

Some Things Which Happened While I Wasn’t Blogging

Permalink

Haiku OS reported on their Google Summer of Code results

Makes me think, that I should really-really get some old mac-mini and install Haiku on it. At least, I can program some fancy Jukebox out of it :)

ohloh.net: The World’s Oldest Source Code Repositories

Hey! I was only 1 year old, when they started to use version control! :-o

DSource: LLVM D Compiler

I love D language, I love LLVM — they make such a beautiful couple. Project is not complete, yet, but it already works for simple cases. Author needs any man-power he can get: spread the word, please.

Sam Ruby noticed CouchDB: Ascetic Database Architectures

It brought some more attention to CouchDB, which is really-really deserved. CouchDB is a document-oriented non-relational database written by Damien Katz and Jan Lehnardt in erlang, which has JSON, PHP and Ruby APIs (the number of APIs grows each day).

Opera released 3 public alpha-versions of their 9.5 series

Finally, Opera looks like a native application on mac. It is lightning fast with a new javascript-engine and heavily optimized UI code. I already use 9.5 on daily basis without problems, but your mileage may differ — it is an alpha-version, after all. Get it here

PHP 5.3 will have Late Static Binding

LSB will allow static methods to know about inheritance (to know, on which of the descendant-classes the method was actually called). Which means, that it will be possible to make a good-looking ActiveRecord implementation, after all these years.

www.milkfarmsoft.com Up and Running

Permalink

Web site of my company (Milk Farm Sotware, ltd.) is kinda “alive” again. The design is brand-new, the content is partially updated.

The texts and downloads are there — everything should be working fine. I didn’t do any software updates this time — just republished old archives (they still work) to the redesigned site.

So, in case you were missing my software, you can grab it again, now :)

Plans:

  • release ”Ping-Pong” — the new piece of software by us

  • release universal binary of Separator

  • check if open-source stuff needs to be updated

p.s. the plans will probably be realized in mid-september, as I am going to take a vacation in a week

Unicode vs. Programming Languages

Permalink

I really-really want to see a programming language, which allows using proper unicode symbols for operators.

I mean:

  • × instead of *****

  • → instead of ->

  • ← instead if <-

  • ≠ instrad of !=

  • ≤ and ≥ instead of <= and >=

This list can be continued more and more…

I perfectly understand the roots of current situation and I don’t ask to use ONLY unicode-symbols, but I ask language-manufacturers to allow this.

DateTime vs Numeric Timezone

Permalink

Is it possible to create DateTime object if I have some date string, and a numeric timezone value?

Something like: ` $timestamp = ‘2007-07-07 07:07:07’; $timezone = ‘+0300’;

$obj = new DateTime($timestamp, new DateTimeZone(????)); `

I need this, to add proper support for YAML-timestamps in my syck extension.

In YAML, timestamps have several representations:

  • canonical: 2001-12-15T02:59:43.1Z

  • valid iso8601: 2001-12-14t21:59:43.10-05:00

  • space separated: 2001-12-14 21:59:43.10 -5

  • no time zone (Z): 2001-12-15 2:59:43.10

  • date (00:00:00Z): 2002-12-14

As you can see, in each case timezone is represented by numeric, while PHP expects me to specify timezone as a toponym…

Syck for PHP Goes Beta (in PECL)

Permalink

Here it is: new and shiny PECL package of Syck

This is an extension for reading and writing YAML-files.

YAMLâ„¢ (rhymes with “camel”) is a straightforward machine parsable data serialization format designed for human readability and interaction with scripting languages. YAML is optimized for data serialization, configuration settings, log files, Internet messaging and filtering.

YAML is extensively used by Symfony Framework and there is also a component for Zend Framework in development. But it’s use is not limited by something big — YAML is a perfect solution for configuration-files (way more comfortable than Ini or XML).

Some time ago, I posted installation instructions. Here is the updated version:

  • Install Syck-library using your favorite package-manager (stable 0.55 version will do) [debian, freebsd, etc.]

  • pecl install syck-beta

  • restart Apache of Fast-CGI process (if needed)

Tell me how it works for you :)

Go PHP5!

Permalink

Support GoPHP5.org

5 July 2007 — A consortium of PHP developers has announced today that several leading Open Source PHP projects will be dropping support for older versions of PHP in upcoming releases of their software as of February 5, 2008 as part of a joint effort to move the PHP developer community fully onto PHP version 5.

The Symfony, Typo3, phpMyAdmin, Drupal, Propel, and Doctrine projects have all announced that their next release after February 5, 2008 will require PHP version 5.2 as part of a coordinated effort at GoPHP5.org, and have issued an open invitation to any other PHP projects and applications, both open source and proprietary, that want to participate in the effort.

Full press-release is here