Subj : mail_send
To   : PistolGrip
From : Amcleod
Date : Thu Jul 27 2000 10:55 pm

RE: mail_send
BY: PistolGrip to Amcleod on Thu Jul 27 2000 10:36 pm

> Umm.. sure, but what you were talking about was writing programs *for*
> Synchronet.  Sure, PERL is a great language, but what does it have to do wit
> SBBS at this point?  Nothing.  What you were asking was for file read/write
> looping functions which can be done farily easily in BAJA, it's not the most
> efficient but it works quite well.  If you want somethign more than you'll n
> to go with another Language.  I don't think at this point it's worth Rob tak
> time off from coding the *important* stuff to make a few BAJA additions whic
> can already be done very easily with the XSDK.  So, you'd rather see Rob reh
> some BAJA then continue working on the Linux version? <grin>

I think you have things backwards.  I am saying that you DON'T NEED to add the
familiar WHILE, FOR and DO loops to BAJA because they can be simulated using a
combination of IF/GOTO instructions.

But I was also saying that NO SYSTEM implements WHILE, FOR and DO loops
directly.  They leave it up to the COMPILER to implement these structures in a
High-Level language which produces assembly language that implements these
structures with test (IF) and branch (GOTO) instructions.  Then the assembler
reads this and produces the object code.  Perhaps the compiler produces object
code directly, but it is all the same in theory.

You can't write SBBS Command Shells and Modules in (say) BASIC because there
there is no compiler available that reads in BASIC and produces .BIN files for
SBBS.  Nor a compiler that reads in BASIC and produces BAJA source that can
then be BAJA'd into .BIN files.  But if you wanted to, you could _write_ such a
BASIC-to-BAJA compiler, which would allow you to develop Command Shells and
Modules in BASIC.  Or if you prefer, you could produce a FORTRAN-to-BAJA
compiler (shudder) or a PASCAL-to-BAJA compiler or whatever you wanted to.  The
you could develop Shells and Modules in PASCAL or FORTRAN too.  In fact, you
could start by designing a NEW language all together.  Something sort of like
BAJA but souped up to include WHILE/FOR/DO as well as subroutines with
arguments, expression evaluation (SET MyInt = 3 * REClen + FieldOffset) or
whatever you wanted.  Then, once you had designed such a SuperBAJA language on
paper, you could then write a SuperBAJA-to-BAJA compiler.  Then you could use
the SuperBAJA language to write a Shell, store it in an *.SBJ file, call the
SuperBAJA program (that you wrote using C/C++/Pascal/Perl/Snobol/Bliss/etc) to
convert the *.SBJ file to a *.SRC file, run BAJA.EXE to convert the *.SRC file
into a *.BIN file, and there you are!

I know this works because i) My studies of computer languages and compiler
technology tell me that it does, and ii) I've ALREADY DONE IT in a very limited
way, just to try it out.  My program is called BAJAPP which is a play on words,
because it is a BAJA Pre-Processor but jokingly, Baja Plus-Plus ;)  The program
was written in perl, reads *.BPP files and produces a temporary file called a
*.PPI file which contains "pure" BAJA.  The program then automatically calls
BAJA.EXE on the *.PPI files, producing *.BIN files and finally deletes the
*.PPI files.  The upshot of which is that the *.BPP files become working *.BIN
files without Rob having to stop work on the Linux version, to add WHILE/DO/FOR
loops, etc.

Of course, nobody is interested in programming Command Shells, Modules, etc in
the SuperBAJA language (or whatever it's name is) with WHILE/DO/FOR loops,
subroutine calls, arrays, records, structures, etc, etc.  So I don't actually
work on the BAJAPP program very much.  Because after all, I am no longer a
SysOp myself, so there is no real motivation for me to do so.

---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net