[fpc-pascal] cgi-bin/PSP

L505 fpc505 at z505.com
Mon Nov 21 21:21:42 CET 2005




>
> You have to be careful here, because there are two "competing" projects

To reduce the confusion, let's call Nemesis the "Nemesis PSP project", and let's call
the other one the "PSP CGI project" for now.

They are not exactly competing. The two projects are open source, and they could
actually help each other instead of competing (I don't see any need to compete).
Nemesis is a scripting language, but last time I looked there were no functions
available. The way I understand it is you write your own functions and do all the
work yourself with Nemesis.

What needs to be done for Nemesis is someone needs to write functions that are useful
for web programming, and ship them with the project. If you have made updates to the
Nemesis project, like you say, I think you should upload your work for other's to
use.. have you joined the nemesis project on sourceforge and released a new version
of it with the new functions? It really needs some functions in order to be useful
for serious web programming... Just like how PHP has all those useful functions, you
know?

In fact, there is nothing stopping PSP CGI project from turning itself into a
scripting language. Or, there is nothing stopping Nemesis from using the functions in
the PSP CGI project (either by linking to it via a DLL, or by using the source code
directly). You know how mod_php works? All PSP CGI would need to do is turn itself
into a DLL just like mod_PHP and mod_perl. And that is the plan for PSP CGI 2.0
anyway.

It's not so much the scripting language or the compiled language you use that is
important.. it's the functions available, that is important. For example, freepascal
would be useless without the RTL. Delphi would be useless without the VCL. PHP would
be useless without PHP functions. It's the functions, that make the base of a
project.. and this is where nemesis needs to improve (and instead of competing with
PSP CGI project, the two projects can combine forces)

In PSP CGI version 2.0, Trustmaster and myself plan to release PSP as a DLL/DSO that
people dynamically link into their programs.  In PSP 2.0, you could even invent a
scripting language that talked to PSP 2.0 DLL just like how PHP works. Nemesis needs
useful functions for web programming, so the projects could even borrow from each
other if they really wanted.

In PSP CGI 2.0, a exe/elf should only be about 20-60kb in size since all the major
functions exist in the PSP DLL/DSO and are dynamically linked. So compiling a PSP CGI
2.0 web application will not be a chore to upload to the FTP Server. However, for
those people who really think that compilation is a waste of time.. there is once
again nothing stopping the nemesis and PSP CGI projects from combining forces, and
borrowing from each other. Simply upload the psp cgi 2.0 DLL to the server, and have
nemesis scripts talk to the psp cgi dll. Or, Trustmaster and myself also plan to make
available a mod_psp dll that can be directly installed on the apache server like how
mod_perl and mod_php works.

> called PSP. One is by a Spanish guy (who wrote the Nemesis Pascal
> interpreter too) and uses an Object Pascal interpreter to pretty much do the
> same kind of thing as PHP, and the other is by an Eastern European guy and

I don't see what the nationality or location of the authors has to do with the
success
of the project. The CGI PSP is being worked on from a number of locations in the
world. Canada, Russia, Europe, and maybe more in the future. As for it being the same
as php? Well once again I remind you of useful functions for web programming. In my
opinion PHP is not useful because it is a scripting language - PHP is useful because
of all the useful functions for web programming. PHP is essentially a CGI wrapper.
And so there is nothing stopping someone from taking the PSP CGI project and turning
it into a scripting language with the Nemesis framework.

> it seemed to me (when looking) was just a way to write CGI in Pascal.

PHP is just a fancy way to write web programs in C. It's not the language that makes
programming on the web easy, it's the plethora of functions available put together in
a certain organized manner. After you have the functions ready, then you worry about
your wrapper. PHP is a wrapper built on top of functions. Nemesis is a wrapper built
on top of no functions. There lies the need for Nemesis and PSP CGI to merge forces,
rather than compete (we never competed in the first place.. only you stated so ;-) )

>
> I personally use PSP, but I use the former - which has been greatly extended
> by me to support more webservers and also to load plug-ins rather than

Can you put it online for other's to access? Because out of the box, nemesis looked
bare to me. It looked like I could do a "for" loop and that was it. What about
functions for web programming?

> staticly linking everything. I'm not clear if this is what *you* are using,

Statically linking right now. But our base of functions can easily be dynamically
linked when we turn it into a DLL/DSO. In my opinion, build a strong set of functions
first.. then worry about the wrapper later.

> but this is what I immediately thought of. IMO the former is far superiour
> as I can change a page in a plain text editor - I only need to recompile if

Why not follow the same superior tactic with desktop applications? In order to change
your desktop application, all that would be needed is a change in the source file.
i.e. smalltalk, java, etc.

Another problem comes when you want to distribute and sell your applications. i.e. do
you want to try and make a successful business out of web programming, or do you want
your customers to steal your source code from you when you ship it to them?  Another
problem comes with security. Large corporations will prefer compiled programs that a
hacker cannot see passwords and source code from. Smaller websites will prefer
uploading their scripts via a text editor. Again, nothing stopping Nemesis and PSP
CGI from combing forces so we get the best of both worlds. I find your message
competitive in tone.. I'd rather combine forces instead ;-)





More information about the fpc-pascal mailing list