ntech
Junior Member
Posts: 99
|
Post by ntech on Apr 5, 2019 18:22:53 GMT
jbfilesarchive.com/phpBB3/viewtopic.php?f=29&t=2147Gem --What is Gem? Gem is a scripting language, written in JustBasic. Yet it is powerful enough to help add dynamic content to JB apps, without editing the JustBasic itself. --What is Gem For? I developed Gem in preparation for an experiment in artificial intelligence. The AI shall be able to dynamically alter its behavior via the execution of Gem scripts. Yet Gem can be applied to far more scenarios than just AI. Gem could be used for app-extensibility (for example, scripts to apply effects to an image), and, perhaps, multi-threaded execution (a JB file executes a TKN which runs Gem scripts simultaneously).
|
|
|
Post by Rod on Apr 6, 2019 21:22:24 GMT
Time is tight. But, "is this a red ball or a banana? might be first steps in AI demos. Is this what the language is directed at?
|
|
|
Post by B+ on Apr 7, 2019 12:47:55 GMT
As I understand scripting languages, it is for programmers who want to automate their routine work and get more productivity from their days efforts.
I have skimmed through Gem code and it looks like very rudimentary interpreter, basic add, subtract, mult, divide of 2 variables (did div check for 0? no) input, output =write, gotoo, let for assigning variables and "if" that checks equality only:
case kWord$ = "if"
var1$ = word$(line$, 3) var2$ = word$(line$, 5) go$ = word$(line$, 7)
if var1$ = "" or var2$ = "" then call errorHandle$ 8
go = val(go$)
if go = 0 then call errorHandle$ 9
if left$(var1$, 1) <> "%" then var1$ = var1$ if left$(var2$, 1) <> "%" then var2$ = var2$ if left$(var1$, 1) = "%" then var1$ = VAR$(val(right$(var1$, len(var1$) - 1))) if left$(var2$, 1) = "%" then var2$ = VAR$(val(right$(var2$, len(var2$) - 1)))
if var2$ = "NULL" then var2$ = ""
if var1$ = var2$ then PROC.INDEX = GoToo(go) notice go end if
Gem is very basic but this is the kind of thinking and exercise that good programmers would practice to become better.
I would expect a scripting language to do more stuff with files like BATch files use to do, now Powershell or Bash is it?
ntech, you might provide a cheat sheet for syntax and description for your keywords. Not only will it help others to get up to speed with your language but it might help organize your thoughts and priorities.
I am not getting how this connects to AI, if you want explain further?
|
|
ntech
Junior Member
Posts: 99
|
Post by ntech on Apr 9, 2019 15:35:22 GMT
Gem scripts shall be generated by the AI, written in JB, and the Gem scripts shall handle memory, analysis, pattern recognition, and provide a means for the AI to re-code itself. Soon I'll add a system to allow a Gem script to clone itself, with a few modifications, including File IO. Once that's done, all that's left is making the AI.
|
|