• Welcome to Theos PowerBasic Museum 2017.

News:

Attachments are only available to registered users.
Please register using your full, real name.

Main Menu

ScriptBasic 32/64

Started by John Spikowski, April 02, 2013, 09:24:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

John Spikowski

Thanks Theo for this board.

I just wanted to mention that ScriptBasic runs on Windows, Linux and the OSX in 32/64 bit. (32 bit on Android Linux)

ScriptBasic is an embeddable scripting language API based on OOP but written in ANSI/ISO C for portability. The language has been production stable for over 10 years. (LGPL)

Here is the Link:
Scriptbasic

(Theo: I have added the Link, John)

Theo Gottwald

Johne, i have checked that thing. It seems to be something like the BASIC Interpreter from EROS.
I do not see where it really is a compiler and also why it could be used to make x64 DLL's.
But that is the topic here.

Explain me please where or what it has to do with x64.
Is there any Scriptbasic x64 ?

Note: I have also programmed a scripting engine myself, but until now it was not linked here in this forum.
Because its not x64 ...

John Spikowski

#2
Theo,

QuoteI do not see where it really is a compiler and also why it could be used to make x64 DLL's.
But that is the topic here.

My mistake. I thought x64 Board meant Basic languages that run in 64 bit. Feel free to delete my thread if it's not appropriate here.

ScriptBasic runs 64 or 32 bit on Windows, Linux and OSX. It was designed and built from the ground up to be an embeddable BASIC LIKE  (hints of cross breading with Perl and Python concepts are prevalent) scripting engine. The scriba (shell) command line interpreter is an example of it's use just as the multi-threaded web server running as a service demonstrates its thread safe, and shared memory  features.

Here is an example of PowerBASIC replacing the role of scriba. (SB embedded in a PBCC program) It's a bare bones shell but all the core ScriptBasic language features are available.

PBI.bas

' PowerBASIC Command Line Interpreter

#DIM ALL

#INCLUDE ONCE "oleauto.inc"
#INCLUDE ONCE "scriba.inc"

FUNCTION newmem CDECL (BYVAL le AS LONG) AS LONG
  FUNCTION=SysAllocStringByteLen (BYVAL 0,BYVAL le)
END FUNCTION

SUB freemem CDECL (BYVAL p AS LONG)
  SysFreeString BYVAL p
END SUB

FUNCTION PBMAIN () AS LONG

DIM pProgram AS LONG
DIM iError AS LONG

pProgram = scriba_new(CODEPTR(newmem),CODEPTR(freemem))
scriba_SetFileName(pProgram,COMMAND$(1))
scriba_LoadSourceProgram(pProgram)
iError = scriba_Run(pProgram,COMMAND$(2))
scriba_destroy(pProgram)

END FUNCTION


E01.sb

cmd = command()

PRINT "Command Line Argument(s): ", cmd, "\n\n"

PRINT "PowerBASIC Embedded Scripting Example\n\n"

FOR x = 1 TO 5
  PRINT x, "\n"
NEXT x


C:\PBCC\Samples\ScriptBasic>pbi e01.sb sample_argument
Command Line Argument(s): sample_argument

PowerBASIC Embedded Scripting Example

1
2
3
4
5

C:\PBCC\Samples\ScriptBasic>

Directory of C:\PBCC\Samples\ScriptBasic

04/03/2013  05:30 PM               164 E01.sb
08/29/2009  02:08 AM           524,288 libscriba.dll
04/03/2013  05:31 PM               596 PBI.bas
04/03/2013  05:31 PM            26,112 PBI.exe
04/03/2013  05:24 PM            61,369 scriba.inc


ScriptBasic can also be translated to C as a 64/32 bit executable. It's not a compiler so creating DLL's or SO's is outside the scope of design.

John

Theo Gottwald

Its too specific, John. You can find some Video in Youtube under my name.
I guees that Scriptbasic is more the Category like "ThinBasic" from Eros.

Please check that this subforum is now accessible for anybody.
There were some missmanaged rights before,

John Spikowski

I would appreciate if you would let Charles handle the thread. Moving the thread to THIS board would be best.

You edited my first post and pointed the link to the wrong site. Are you still mad at me for something or just haven't had your coffee yet?

Theo Gottwald

John, no currently i am not mad at you.
If that happens i just delete the source of anger :-)

In fact you remembered me that some boards hat invalid right settings and i have changed these,
that anybody could now access your post.

If Charles want the post, let him take it, he can move it to where he wants.
He's Admin. I am not the one to drop stones in his garden.

I do not know whats wrong with your post, i have added only the download links, because without these the post would not have made much sense.

John Spikowski

QuoteI do not know whats wrong with your post, i have added only the download links, because without these the post would not have made much sense.

Your added a link that pointed to Peter Verhas's old www.scriptbasic.com site. The open source project site for ScriptBasic is www.scriptbasic.org which I'm the project manager for. I would like to promote the use of ScriptBasic with PowerBASIC as an easy to use embedded Basic scripting solution. Charles has invested extensive amounts of time and energy integrating and enhancing ScriptBasic with O2 wizardry. I don't feel you have the same commitment to scripting as Charles does so hence the request to move the thread to Charles's direction here on the JRS forum. If you read this Charles, can you setup a new child board for Basic compiler scripting engine solutions and move this thread there?


Theo Gottwald

#7
Sorry John, i had no idea that this is not all the same!

Ok, I'll change it.
Aah ok, i see you changed it already.

You see slowly we get anything like you want it,
But do not always assume that people do not like you or do intentionally bad things to you.

Life is just like that. We all do wehat we can, sometime we may make a mistake - be a bit tolerant.
You will see that life will be easier for you then.

John Spikowski

It doesn't take much to get my plate wobbling.

Thanks for your efforts and if you have time, give ScriptBasic a try, your feedback would be welcome.


Theo Gottwald

#9
When i was a child, i liked to play with all sorts of things and i loved computer.
Actually i use computer languages according to my bussiness needs.
Now about Scripting languages - i have no need currently for any Scripting languages.
Therefore its not a question if the Scripting languages i good or bad if you just can not use it for your purpose.
I have taken a look in your forum, and my impression was that there were not sooo overhelming many users currently.
IS it all new or do people generally prefer real compiler languages?
Because ... why should i use a scriptiing tool if i can use a real compiler?
I have PowerBasic, PureBasic and ADW Modula  and we have the compiler from Charles... for me i am Ok so far. Not really looking for new tools that do not compile to maximum efficient code.
Possibly its intersting for schools? Or universities?


John Spikowski

Quote... why should i use a scriptiing tool if i can use a real compiler?

You must have forgot to read the prior posts in this thread.  :(

ScriptBasic is an embeddable scripting engine that compilers use to extend their feature set under user control. I even showed an example of this in the prior post you didn't read.

This is another reason I'm requesting this thread be moved to Charles's board. He already understands the value in ScriptBasic's design.


Charles Pegge

That's fine by me. I don't have child board creation rights, so if Theo could create a child board for ScriptBasic , under mine and transfer this topic to it.

John Spikowski


Theo Gottwald