Hello, I am new to this list and I don't know about older discussions.
So I ask you: is it interesting for you, to change Wikipedia from PHP to a C-written engine?
I just in development (most is ready) of a high-performance, high-security tool, usable for Wikis, CMS or forums. It is Open-Source (GPL). The sources are not available at the moment, because I make changes every day. But it need only some weeks... I created two libraries to make a forum-platform-application: libstd3000c and libcpcgic. The application can use fastCGI and communicate with Apache as an daemon (FastCGIExternalServer).
I'm writing C-Code since 1987, C++ since 1990 and PHP since many years too. I switch back to C with modern methods, using objects, encapsulated data, multithreading and internationalization. Sophisticated string methods avoid buffer overflows and consequently use of C-classes make memory management easy. And, and, and...
Manfred
So I ask you: is it interesting for you, to change Wikipedia from PHP to a C-written engine?
A beautiful idea; in fact, I just rewrote WikiTeX in C so as to be able to extend the Zend engine (or write an Apache module).
Both Zend and Apache have native memory management, alleviating our main concern.
-- Peter Danenberg . wikisophia.org ..:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Manfred Rebentisch schrieb: | Hello, | I am new to this list and I don't know about older discussions. | | So I ask you: is it interesting for you, to change Wikipedia from PHP to a | C-written engine?
Doing C/C++ myself, I have considered that for some time. But, any replacement would have to do *exactly* what the current software does. While this is certainly possible, it will be a lot of work, and getting developers on it might not be easy until it is basically ready, which turns out to be a circular problem :-(
| I just in development (most is ready) of a high-performance, high-security | tool, usable for Wikis, CMS or forums. It is Open-Source (GPL). The sources | are not available at the moment, because I make changes every day. But it | need only some weeks... I created two libraries to make a | forum-platform-application: libstd3000c and libcpcgic. The application can | use fastCGI and communicate with Apache as an daemon (FastCGIExternalServer).
You might be interested in the "waikiki" module of MediaWiki CVS, which contains simple but working C++ code for rendering pages from the MediaWiki wiki-style flavour.
Also, we are trying to get a Bison-based wiki-to-XML parser in C working (we could use some help there!). That would enable us to keep the existing PHP framework while "outsourcing" the runtime-critical parsing to C.
Magnus
Am Donnerstag, 3. Februar 2005 15:00 schrieb Magnus Manske:
Doing C/C++ myself, I have considered that for some time. But, any replacement would have to do *exactly* what the current software does. While this is certainly possible, it will be a lot of work, and getting developers on it might not be easy until it is basically ready, which turns out to be a circular problem :-(
I like to have a look to this. I accept the challenge to migrate PHP-projects to my Engine - but today I don't know, how much time it need.
You might be interested in the "waikiki" module of MediaWiki CVS, which contains simple but working C++ code for rendering pages from the MediaWiki wiki-style flavour.
I do read ...
Also, we are trying to get a Bison-based wiki-to-XML parser in C working (we could use some help there!). That would enable us to keep the existing PHP framework while "outsourcing" the runtime-critical parsing to C.
There are mostly many ways to find a solution for a given problem.
I have an simple XML/HTML-Parser C-object, so I have a look to the wiki-to-XML parser (where is the actual source?).
Manfred
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Manfred Rebentisch schrieb: | Am Donnerstag, 3. Februar 2005 15:00 schrieb Magnus Manske: | |>Doing C/C++ myself, I have considered that for some time. But, any |>replacement would have to do *exactly* what the current software does. |>While this is certainly possible, it will be a lot of work, and getting |>developers on it might not be easy until it is basically ready, which |>turns out to be a circular problem :-( | | | I like to have a look to this. I accept the challenge to migrate PHP-projects | to my Engine - but today I don't know, how much time it need.
The "big stuff" is surprisingly easy - it's the "little" things that will take time. We have so many functions beyond "edit-parse-render" - the long list of special pages alone. Did you think of how to move and manage the 100+ translations? The interaction with our squid servers? Template dependencies? (I could go on here...)
| I have an simple XML/HTML-Parser C-object, so I have a look to the wiki-to-XML | parser (where is the actual source?).
CVS HEAD, module "flexbisonparse". It is a "real" parser, in difference to a "mere" converter. Be aware, however, that looking at Bison files may cause eye bleeding ;-)
Magnus
| I have an simple XML/HTML-Parser C-object, so I have a look to the wiki-to-XML | parser (where is the actual source?).
CVS HEAD, module "flexbisonparse". It is a "real" parser, in difference to a "mere" converter. Be aware, however, that looking at Bison files may cause eye bleeding ;-)
well, my two cents - at least you could debug the damn thing properly i f it was written in C/C++. You might want to consider C# as well.. although I don't know how mature the mono compiler is...
Ed
mono is not the issue, mono is stable.
- Urs
Edward Peschko wrote:
| I have an simple XML/HTML-Parser C-object, so I have a look to the wiki-to-XML | parser (where is the actual source?).
CVS HEAD, module "flexbisonparse". It is a "real" parser, in difference to a "mere" converter. Be aware, however, that looking at Bison files may cause eye bleeding ;-)
well, my two cents - at least you could debug the damn thing properly i f it was written in C/C++. You might want to consider C# as well.. although I don't know how mature the mono compiler is...
Ed _______________________________________________ Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Urs C Muff schrieb:
mono is not the issue, mono is stable.
Yes, but we'll lose an order of magnitude in terms of speed, compared to C/C++. Don't get me wrong, I like C#, and would like to try it for some large application one day. But if we switch to another implementation at all, we should primarily aim for speed.
Magnus
Am Donnerstag, 3. Februar 2005 22:32 schrieb Magnus Manske:
The "big stuff" is surprisingly easy - it's the "little" things that will take time. We have so many functions beyond "edit-parse-render" - the long list of special pages alone. Did you think of how to move and manage the 100+ translations? The interaction with our squid servers? Template dependencies? (I could go on here...)
I did not know all details of the actual wikipedia code. But I have know-how about such projects.
I implement a simple method for translations ( think, you mean more than 100 language translations?), and this method is flexible too. I use a database for all text. All text is read to memory, shared by all threads. On a request there is no need for read the database. If database is changed, a method can be called to refresh the internal buffers while mutex'es avoid conflicts. HTML-Templates can be written like this:
<h2 cpForms:textid="1127" cpForms:textgroup="TIT" cpForms:textnote="Titel Benutzerregistrierung">Benutzerregistrierung</h2>
The Template-Parser delete the extra-tags but look for the textid together with the actual language from Browser / user. The text "Benutzerregistrierung" is used as a default for german in this case.
There were hard discussions about the method of using an identifier for the text (here 'textid=1127'). But it is a effizient method.
A code snippet using translations in C-Code:
PTLangTrans lgTrans; ... /* Language "de", "deu", "de_DE" */ lgTrans = st_cdo->textmap(st_cdo, user->getMainLanguage(user) ); text = lgTrans->findIns(lgTrans, 801, "Admin-Login", "LBL", "Admin-Anmeldung, Administrator oder Forums-Maintainer etc."); composer->assign(composer, "VAL-USRLOGINSUBMIT", text);
With this, the parser get a variable to exchange "{VAL-USRLOGINSUBMIT}" in a HTML-Template. With method findIns() the text will be inserted to the database, if a text is not found.
Manfred
wikitech-l@lists.wikimedia.org