web developer & system programmer

coder . cl

ramblings and thoughts on programming...


mozilla extensions with xpcom

published: 31-07-2010 / updated: 31-07-2010
posted in: c, c++, programming, projects, tips
by Daniel Molina Wegener

The XPCOM API can allow you to create low level extensions — I mean written in C++, with support for C and assembler through C++ — and plug ins for Mozilla products. For example, you can create an extension to browse IMAP folders from Mozilla Firefox. This API is analogous to the COM+ API on Micro$oft Windows. One of my most recent projects, is a Firefox extension to handle SNMP protocol requests from JavaScript, so my extension is applied from the JavaScript within the HTML in the browser, allowing Firefox to act as an SNMP client. The extension is working fine, without memory leaks and allows you to do get and walk request. Possibly it will be expanded to more requests on the future.

[ANN] pyxser-1.4.4r was released

published: 20-06-2010 / updated: 20-06-2010
posted in: c, programming, projects, python, pyxser
by Daniel Molina Wegener

Hello, today I’ve released pyxser-1.4.4r, the publishing message is as follows:


Hello Python Community.

I’m pleased to announce pyxser-1.4.4r, a python extension which contains functions to serialize and deserialize Python Objects into XML. It is a model based serializer. Here is the ChangeLog entry for this release:

my contribution to free/open source software

published: 01-04-2010 / updated: 01-04-2010
posted in: c, caffeine, development, programming, projects, python, pyxser
by Daniel Molina Wegener

I’ve worked on FOSS for years. Currently I have two active projects pyxser and caffeine. Both of them requires a great effort to being completed. Take an overview on their development:

source code optimization in c

published: 31-12-2009 / updated: 31-12-2009
posted in: algorithms, c, development, programming, tips
by Daniel Molina Wegener

"…premature optimization is the root of all evil".
— Donald Knuth

I agree with the fact that we must do our source code level optimizations when we have finshed the construction stage or it is almost complete. I was searching articles and papers about optimizing C source code to be applied on my programs and libraries. I’ve collected some of those optimizations. But you must not confuse algorithm optimization, source code optimization and compiler optimization, since the first one refers to algorithm design and the second one just refers to the algorithm implementation, and both are sharing just few common approaches to formal reductions.

java mutexes

published: 14-12-2009 / updated: 14-12-2009
posted in: algorithms, c, development, java, programming, tips
by Daniel Molina Wegener

Java synchronization is usually made through the synchronized keyword. Synchronized allow users to create a mutex around certain variable, class or method, where a mutex allows concurrent access to it. By concurrent access we should understand access from multiple threads. If an operation is atomic, there one and only one process or thread executing it. Then, mutex based operations are atomic.

[ann] pyxser-1.3r-p1 [updated]

published: 01-12-2009 / updated: 01-12-2009
posted in: c, programming, projects, python, pyxser
by Daniel Molina Wegener

Dear pyxser users, I’m pleased to announce that I’ve released pyxser-1.3r. The current ChangeLog for this release is as follows (Update: There was bug in the pyxser-1.3r release, it is patched and working in pyxser-1.3r-p1):

caffeine ipc messaging facility

published: 26-09-2009 / updated: 26-09-2009
posted in: c, caffeine, programming, projects
by Daniel Molina Wegener

I’ve recently designed the IPC Messaging facility for caffeine. I’ve integrated the data packer module with the state machine module, plus the core IPC Messaging routines. The process itself is quite simple, you load a state machine, or build one on runtime, to process IPC messages, and you just define an IPC messaging service, which hold the proper information to allow your applications to work within those facilities. I’m thinking to use a similar approach to build networking support for caffeine. Since the IPC Messaging Facility is thinked to work on top of the Process Pool facility, you need to define statically the proper service structure on your applications, and instead of random IPC keys, you must use a static one for each Messaging service.