[ai_group] Re: Newsreader Project

  • From: John Jacques <johnj_01201@xxxxxxxxx>
  • To: ai_group@xxxxxxxxxxxxx
  • Date: Fri, 26 Apr 2002 21:07:26 -0700 (PDT)

The PrepCode program  just cleans up the .bas file into a standard
format no matter who typed it in. Like that program you have on your
web site for BCX indentation, except it gets rid of all the indents,
extra spaces, and stuff like that. The same principle could be used on
any language, even BCX to get it in a specific standard format.

Then the LB2BCX program reads the clean, simple .bas file and converts
it 1 step at a time to BCX. When I started I had a rule to only use
commands in the coding of LB2BCX and PrepCode that the LB2BCX program
could convert to BCX. So I started off with PRINT, LEFT$,RIGHT$, and a
few simple commands that were the same in both languages. 

Then as I added the code to convert new commands, I had more tools to
work with. So, a month later I went from a few commands that I could
program with to a whole bunch, but I was still sticking to my rule of
not using commands to code with if the converter didn't know how to
convert it to BCX yet. 

So that was a very bad idea - it turns out.

I'm giving both program to the Public Domain and dropping it. I can
start all over again and make it much smaller and simpler.

I guess the whole thing was a learning experience on what I need to do
to have my AI do programming.

I'm thinking of a better method to convert one language to another. I'm
working on a new command that will do "smart" search & replacing. For
example search for "John" and replace with "Johnny" is stuck to
removing the string to find, and inserting the the replacement at the
spot in the line.

I want a smarter search and replace that is not limited to a single
sequence of text, but to be able to think a bit for itself and know how
to replace things like:

Array(1,2,3)
with
Something[9]

It's going to be a short & simple little programming language that does
the search\replace. By language I mean there will be a set of control
characters that will the the search\replace routine what to do and how
to do it. 

That's it! Just 1 new type of search and replace SUB (doing it in BCX)
to make the conversion from one language (computer or natural) to
another.

I've seen it sort of done in one of the language web sites I visited
when looking at WordNet. They did it way to complex and overly complex.

I'm thinking that the program should have some AI to lift the burden
off the program - sort of.

I may have it running in a week or so.

Thanks

*AND YES THIS IS A BLAST! I'm learning more BCX too!
John


--- David Garner <dgarner@xxxxxxxxxxx> wrote:
> 
> John,
> 
> > programming this way. I now plan on converting my LB2BCX and
> PREPCODE
> > programs this way in the near future.
> 
> I've been meaning to ask you about LB2BCX.  I'm not familiar with LB.
> How similar is it to QB?  How useful would your conversion program be
> on
> QB or PB source code?
> 
> Glad you're having fun.
> 
> David Garner
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

Other related posts: