General YPN >> Some ideas
Posted by ComWizz on 15:12:00 04-07-2002
Hi all,

I got two ideas, (1) A Perl compiler, (2) A UNIX shell script compiler

I mentioned the first idea before, for the second idea, you could easily use the source code to the GNU UNIX tools.
Though the first idea is a little better.

nash 0.3.1 is complete, to be uploaded.

Thanks...
Posted by ComWizz on 15:17:00 04-07-2002
If anyone knows Bison and Flex, lemme know.
Also C/C++ programmers may also be needed.
Posted by fsvara on 15:41:00 04-07-2002
compiling shell scripts might proove hard, considering that compiled shellscripts are, well, not shellscripts. shellscripts dont do anything by themselves, they use a lot of different programs and combine them. a "shell script compiler" really makes no sense imo.. perhaps explain to me what you actually mean by it, because it's a paradoxon

Posted by crion on 08:35:00 04-08-2002
nash??? that windows shit? =)
Posted by KaGez on 10:58:00 04-08-2002
about that shell script compiler:
same as svara... I think it will be very hard to do such a thing... and, you have to think if it is of use these days, because these days you don't differences between pre-compiled scripts and interpreted scripts anymore (at least speed doesn't differ much)

perl compiler:
same as above, and btw, isn't there one already? not that I want to stop you, but I think I've heard of a perl compiler before :/
[addsig]
Posted by ComWizz on 17:48:00 04-10-2002
crion: haha! Funny joke

fsvara: Well, I was thinking of two ways of achieving a UNIX shell script compiler,
(1) The compiler runs the commands of the original UNIX shell script, eg:

#!/bin/ksh

echo "Hi"

This would become a binary which runs all commands in the script.

(2) Lets say the script consists of the command "ls", the compiler would create a binary which does the exact same thing as /bin/ls.
Or, eg:

#!/bin/ksh

clear
echo "Hi again"

The compiler creates a binary which consists of clear + echo put togheter

The above explanation, hopefully is not vague.

KaGez: As far as I can see, there are no good perl compilers.
I saw this project on SF, it is a perl compiler but they have released notthing.
Posted by robost86 on 17:53:00 04-10-2002
Hehe, those programs would get like 10 MB each
Posted by Yjo on 22:43:00 04-10-2002
it would probably be faster to just keep the damned shell script then call them all with system() or something. The whole point is that people use the script because they want the source to be easily found and modified later on. I've never had a bad case of 'script lag' due to its interpreted nature before
Posted by Yjo on 22:49:00 04-10-2002
Something I think would make a *useful* project tho.. you make a kind-of file format; which consists of appending certain data to executables. Basically, it lets you keep a whole c++ project in one file. When you open it with the program we'll create, you get the project in a simple (or someone else's) IDE, and when you compile, the compilation is done to a temporary file, and all of the project files are compressed in some way and appended to the executble in non-loaded segments in a way that it in no way impairs the running of the file. When the project is complete and needs to be broken into just the basic binary for release, the program will happily churn up the binary and separate source files.
It wouldnt actually be too big a project; any real code would be minimal. You could probably do it in a shell script even if you wanted.
Compressing source code is usually better than other doc types; you just need a symbol table and an abbreviated document.