Gopal's Hidef, contants for real!
Posted by Pierre in
Uncategorized
Monday, February 26. 2007
Gopal just published Hidef through PECL. This extension lets you define your constants in a ini-like file, PHP will then parse this file and defines the constants during the php startup which happens only when you start your web server. It simply drops all performance impacts introduced by the constants definition. If you are a performance freak, this extension is for you ![]()
See his blog’s post for benchmarks and a little doc.
Which Zip for which PHP and a bug fixes release (1.8.6)
Posted by Pierre in
Uncategorized
Monday, February 26. 2007
About once a day, a user asks me which Zip version they should use: the bundled version (PHP 4 or in 5.2+) or always rely on PECL. There are different cases, and all of them are good except one.
I strongly recommend to not use the bundled Zip extension in PHP 4.x (which is the PECL version 1.0). The later versions (1.1.0 or later in PECL, and bundled in PHP from 5.2.0 and later) is 100% backward compatible. For example, the version 1.8.7 fixes a leak in the old API.
PHP 5.2.0 includes Zip, and all the fixes available in PECL. The only difference between PECL’s Zip and the bundled version is the release cadences. I try to release to PECL on a monthly basis, either a development version (new features, improvements) or a bug fixes, or even both when there are enough supporters
. The PHP security policy may hide a problem or two in various changelogs, but be sure that both the PECL releases, and the PHP releases, will have the latest issues fixed.
Summary:
- 5.2.x, bug fixes only or minor improvements
- PECL Zip 1.8.x, bug fixes only or minor improvements
- PECL Zip 1.9.x, development branch, the current improvements include good stuff like pattern based additions or extractions and iterators. The improvements will be available in a PHP only after the first stable PECL release
And a new bug fixes release has been released today, see the complete changelog here.
Documentation generators for C/C++ library or application
Posted by Pierre in
Uncategorized
Monday, February 26. 2007
One of the priority for GD 2.1.0 is to improve the documentation. Not only for the readers but for the developers as well as the editors (there is one for now, Jeffrey Drake
.
There is many documentation generators out there but only a few seems to be still maintained and to fit requirements:
- Simple syntax, a documentation comment should not make the code less readable. It should obviously be readable by a human being (without parsing it)
- At least two exports format, Latex and html are the dream team, but I can live with only HTML
Both of my nominees are well known. I never heard about "Natural Docs" before and I really like its syntax:
Let me try to summarize my feelings about each of them here. This is a non objective comparison, feel free to correct me if I say something stupid
. If you know other tools or how I can customize any of these three to get the "perfect" documentation generation tools, please let me know.
I have to say that I did not ask the respective project authors, I only run some tests and read their respective documentations.
- Robodoc:
Pros:
- Output formats: HTML, XML DocBook, TROFF, ASCII, LaTeX or RTF format. You can virtually have whatever you want using of the default formats.
- Powerful configuration (check the manuals, it is really impressive)
Cons:
- The comment syntax is not very nice and concise, and it is really what keeps me away from Robodoc:
<br /> /****f* Analyser/Is_Pipe_Marker * <span class="caps">NAME</span> * Is_Pipe_Marker * <span class="caps">FUNCTION</span> * Check for “pipe” markers e.g. “|html “. * <span class="caps">SYNOPSIS</span> */<br /> static char *Is_Pipe_Marker( char *cur_char, int *pipe_mode )<br /> /* * <span class="caps">RESULT</span> * Pointer to the data to be piped to document or in case no pointers * are found. * <span class="caps">SEE</span> <span class="caps">ALSO</span> * RB_Check_Pipe * <span class="caps">SOURCE</span> */<br /> {<br /> ...<br />
- Doxygen:
Pros:
- Widely used (that’s a good point when support is required)
- Syntax relatively simple and readable (many syntax are available)
Cons:
- I do not like its html output, list of files/classes/etc. do not speak to me or do not work well for C.
(there is other syntax available):
/*! \brief Brief description.
Brief description continued.
Detailed description starts here.
\param a an integer argument.
\param s a constant character pointer.
\return The test results
\sa Test(), ~Test(), testMeToo() and publicVar()
*/
- Natural Docs:
Pros
- I like its syntax, I cannot image a simpler one as there is none, it is like I would write it
"Cons"
- only html as output and I do not have the time to hack something in perl to improve it
<br />
/*
Function: Multiply</p>
Multiplies two integers.
Parameters:
x – The first integer.
y – The second integer.
Returns:
The two integers multiplied together.
See Also:
<Divide>
*/
And the winner is, for now: Natural Docs. But still, having only html is somehow limited. I would like other outputs like manpages or latex.
Constitution, president, election, are we in France?
Posted by Pierre in
Uncategorized
Monday, February 26. 2007
No, that’s PEAR latest news. Things never change, that’s bad.



