Pages

Showing posts with label and. Show all posts
Showing posts with label and. Show all posts

Thursday, April 10, 2014

Modules and Run Liberty BASIC

People have been asking for a way to create code libraries in Liberty BASIC for some time. I have thinking about how to do this using an in-memory model. Over the weekend Scott and I worked on adding some modularity to the Run/Liberty BASIC language. Heres how it works so far. We are open to suggestions.

The RUN statement has a new form. If I want to use mymodule.bas as a module in a program I am writing I would code it like this:

run "mymodule.bas", #myModule

This causes mymodule.bas to be compiled into memory. It will execute code up to the first wait statement. This is how values will be initialized. The program then becomes an object assigned to the #myModule handle.

Then you can call any function on that program from within the calling program, like so:

#myModule myFunction(myParameter)

or even use the invokation in a more complex expression:

print "digits: "; len(#myModule myFunction(myParameter))

You may recognize this syntax as being the same as for controlling widgets. It relies on the same underlying mechanisms to do its work.

When were done with this, modular programs loaded this way will be cached in memory and will only recompile when the source file changes.
Read More..

Friday, April 4, 2014

Artificial Intelligence and BASIC

When I was 13 or so years old I bought a book at You-Do-It Electronics titled Experiments in Artificial Intelligence for Small Computers, authored by John Krutch. This book influenced me in important ways. It teaches the essentials of AI so anyone could understand it. Examples are presented in the BASIC programming language. One of the examples presented is of the classic Eliza sort of conversational system. Not cutting edge research, but as a starter it gets the job done.

I was able to use the techniques in the book to create demos for the computers at NEECO. A person visiting the store would ask the computer about itself, and the computer would try and respond appropriately with a demonstration of features.

The book can still be purchased used on Amazon.
Read More..

Tuesday, March 25, 2014

King Kong and my Gaming Mood Board

You have to go see King Kong. I went to see it on Saturday and it is the kind of Movie where it wont be nearly as good at home unless you have a home cinema system. You wont get the branches cracking behind you as you are running through this forrest or the deafing roar echo all around you. Aside from the experince the film is AWESOME. When Kong grabs those planes. Just go see it. I recomend it.

Also, for my Textiles we had to make a mood board. I did it on gaming. So here you go. It is a supplment of CONSOLE WARS.


Read More..