Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Support

Pages: 1 ... 19 20 [21] 22 23 ... 59
301
Download / ScriptBasic 2.2 pre-release runtime downloads (Windows/Linux)
« on: September 23, 2013, 11:46:01 AM »
There seems to be some confusion where to get the latest ScriptBasic 2.2 pre-release candidates for Windows and Linux so I created this sticky in the downloads section and will keep it updated as we come closer to an official release. (which will include source and documentation) Most of the work done for the 2.2 release is in the form of extension modules contributed by Armando I. Rivera (AIR) and updating 3rd party libraries to current levels. Another goal with the 2.2 release is to create both 32 and 64 bit versions of ScriptBasic for both Windows and Linux. (popular distributions) As a bonus I hope to have something for Android Linux with a SDL & JNI option. (stay tuned for announcements)

I'm confident that ScriptBasic core continues to be rock solid. The goal with this pre-release is to shake out any issues with the extensions modules and their updated library interfaces. I'm working hard on wrapping up the IUP extension module and working with Charles on DLLC.

Note: The www.scriptbasic.com site is not the open source project site and is Peter Verhas's (author) static snapshot of where he left of with the project. Using code from that site is ancient and more than likely not going to work on current versions of the OS. The Windows 2.00b version may still work.

302
Download / Re: Geany IDE for ScriptBasic
« on: September 23, 2013, 01:15:20 AM »
Congrats! (and thanks Tomaaz for creating the syntax file for SB)


303
What's New / Re: ScriptBasic 2.2 Beta Release
« on: September 23, 2013, 01:11:47 AM »
Quote from: John - O2 forum
One thing I should mention and will be changed in the next SB 2.2 beta release is the SB include path in the configuration file doesn't work like the module path as relative to where scriba is started from. The include path is relative to where you are not where scriba lives. Once you decide where you are going to install ScriptBasic, edit the SB configuration file and use full paths for the module and include paths.  

Here is my SB startup script I run after opening a terminal window.

Code: [Select]
export PATH=/home/jrs/sb/sb22/bin:$PATH
export SCRIBACONF=/home/jrs/sb/sb22/bin/basic.conf
export UBUNTU_MENUPROXY=0

Note the last entry is because I use the classic shell and not Unity. This prevents a client area size display issue with IUP.

To rebuild your basic.conf file to its binary form, follow these steps.

You can dump the current SB configuration to the screen or file (scriba -D > basic.conf.txt) and edit it in gedit. To convert the text file version of the basic.conf to its binary form, scriba -k basic.conf.txt will create a binary form where ever SCRIBACONF path points to. Just type scriba at the command line for a list of switches.

By default scriba will try and save it's basic.conf file in the /etc/scriba/basic.conf which as a standard user you don't have rights to. This is know as a system wide install of ScriptBasic. If you get the start-up file exports going first, scriba will save the basic.conf in your user directory. The environment variable SCRIABCONF points to where the basic.conf file lives. In the SB bin directory there should be a text version of basic.conf and if not create one with the scriba -D > basic.conf.txt.


304
GD / Re: gd::Tiled
« on: September 19, 2013, 10:42:04 AM »
Great stuff Ron!

I haven't played with the GD extension module much and I'm glad to see someone take advantage of it.




305
What's New / Re: ScriptBasic4Android
« on: August 04, 2013, 11:22:17 PM »
ScriptBasic extension modules seem to compile fine native and half the size as the NDK counterpart.

Code: [Select]
declare sub MD5 alias "md5fun" lib "t"

m = MD5("JRS")

for x = 1 to len(m)
  print right("0" & hex(asc(mid(m,x,1))),2)
next
printnl

shell@android:/sdcard/scriptbasic $ scriba t_md5.sb
95B75AF8A9A72665C52E361994020219

shell@android:/sdcard/scriptbasic $ ls -l /data/data/org.connectbot/bin/ScriptBasic/lib
-rwxr-xr-x u0_a119  u0_a119      7736 2013-08-04 22:10 t.so
-rwxr-xr-x u0_a119  u0_a119     14161 2013-08-01 18:49 t_ndk.so
shell@android:/sdcard/scriptbasic $

This is a SB MD5 example running on Android compared to the Linux C version. The SB version has to do the following.

  • Load scriba
  • Parse/tokenize script
  • Load extension module and declare external functions
  • Load 4.3 MB string from a file into a SB string variable
  • Call the extension module MD5 function passing the loaded text of the bible.
  • Format binary results to a HEX string
  • Cleanup memory, unload extension module and exit scriba

Compare that to a compile C program that is a standard Linux utility and there is 3 tenths of a second difference.  8)

Code: [Select]
declare sub MD5 alias "md5fun" lib "t"
declare sub LoadString alias "loadstring" lib "t"

s = LoadString("Bible.txt")

m = MD5(s)

for x = 1 to len(m)
  print right("0" & hex(asc(mid(m,x,1))),2)
next
printnl

shell@android:/sdcard/scriptbasic $ time scriba md5cc.sb
17CE80BA9F6A0F74093C575205C9CB17
    0m0.12s real     0m0.06s user     0m0.04s system
shell@android:/sdcard/scriptbasic $ time md5 Bible.txt
17ce80ba9f6a0f74093c575205c9cb17  Bible.txt
    0m0.09s real     0m0.05s user     0m0.02s system
shell@android:/sdcard/scriptbasic $

shell@android:/sdcard/scriptbasic $ ls -l Bible.txt
-rw-rw-r-- root     sdcard_rw  4397206 2012-07-01 00:45 Bible.txt
shell@android:/sdcard/scriptbasic $


306
What's New / Re: ScriptBasic4Android
« on: August 04, 2013, 06:40:52 PM »
I pleased to announce that compiling native on Android does have an advantage over cross compiling with the NDK.

Code: [Select]
FOR x = 65 TO 90
  a = a & CHR(x)
NEXT x
FOR x = 1 TO 1000
  FOR y = 26 TO 1 STEP -1
    b = b & MID(a, y, 1)
  NEXT y
  b = b & a
NEXT x
PRINT LEN(b),"\n"

shell@android:/sdcard/scriptbasic $ time scriba_ndk strbench.sb
52000
    0m13.07s real     0m13.01s user     0m0.01s system
shell@android:/sdcard/scriptbasic $ time scriba strbench.sb                                                                                                    
52000
    0m4.03s real     0m4.00s user     0m0.02s system
shell@android:/sdcard/scriptbasic $

Here is the BaCon  numbers for the same test on Android. (BASIC to C translator - compiled)

shell@android:/data/local/BaCon $ time ./strbench
52000

    0m3.83s real     0m3.80s user     0m0.00s system
shell@android:/data/local/BaCon $


307
What's New / Re: ScriptBasic4Android
« on: August 04, 2013, 01:58:13 PM »
I have finished my clean-up. (optimization, strip, makefile tweaks) I'm happy with the results.

Code: [Select]
shell@android:/data/data/org.connectbot/bin/ScriptBasic/src/bin/exe $ ls -l
-rwxr-xr-x u0_a119  u0_a119    363888 2013-08-04 13:47 scriba
shell@android:/data/data/org.connectbot/bin/ScriptBasic/src/bin/exe $ ls -l ../lib
-rw-rw-rw- u0_a119  u0_a119    370768 2013-08-04 13:50 libscriba.a
-rwxr-xr-x u0_a119  u0_a119    417100 2013-08-04 13:49 libscriba.so
-rw-rw-rw- u0_a119  u0_a119    369500 2013-08-04 13:50 lscriba.a
shell@android:/data/data/org.connectbot/bin/ScriptBasic/src/bin/exe $

308
What's New / ScriptBasic4Android
« on: August 04, 2013, 01:24:56 AM »
I was able to compile ScriptBasic native on Android Linux along with the runtime libraries. (static and dynamic) This was done on my stock Samsung Galaxy Tab 2 10.1 tablet. (non-rooted)


309
What's New / Re: ScriptBasic JIT
« on: July 25, 2013, 02:06:01 PM »
I was able to compile ScriptBasic in my chrooted copy of Ubuntu ARM on Android.

Let me know if you have any interest of trying ScriptBasic on one of these boards.



310
What's New / ScriptBasic 2.2 Beta - Downloads
« on: July 22, 2013, 10:24:18 PM »
The attached zips contain a runtime version of ScriptBasic 2.2 with a few test scripts to get you going. The following is the setup --install script interaction that builds the install.sh script you would run as root. I put the text version of the configuration file generated in the etc folder in the zip you can edit and compile with scriba -k basic.conf.txt. I'm only posting this as an installation guide if you were to install ScriptBasic on a global basis. (you need the source directory build to run the install script) If you prefer installing ScriptBasic under a user account, that works as well. just make sure your configuration module and include directories reflect their location. (or extension modules won't be found) By default ScriptBasic under Linux looks in /etc/scriba/ for it's global configuration file. You can override this with exporting SCRIBACONF to point to your configuration file full path. If your not putting scriba in the /usr/bin directory, you need to add its location to the search PATH. Feedback and example code welcome!

Note: Scriba will run without a configuration file. Nothing in the configuration file is required. The more you define the easier it is to use ScriptBasic.

Code: [Select]
jrs@U32VB:~/sb/source$ ./setup --install

This is unix cwd=/home/jrs/sb/source/
--install-docu=directory

Use this option where ScriptBasic modules should install their
documentation files when they are compiled from source and
are installed calling their 'install.sb' program file.

The default value is
/usr/share/scriba/source
please specify the value:--install-etc=directory


Use this option to specify where installation should put the
Eszter SB Application Engine start/stop script. The default
location is

/etc/init.d
please specify the value:
--install-configdir=directory

Use this option to specify the configuration directory where
the compiled configuration file is saved.

The default value is

/etc/scriba
please specify the value:
--install-include=directory

Use this option to define where the ScriptBasic module
header files are to be stored. The default value is

/usr/share/scriba/include
please specify the value:
--install-lib=directory

Use this option to specify where ScriptBasic installation should put
the ScriptBasic run-time library files. This is needed only when you
want to compile BASIC to executable via C code or compile
your own variation. The default location is

/usr/local/lib
please specify the value:
--install-bin=directory

Use this option to specify where ScriptBasic installation should
put the binary executable of the interpreter. The default value
is

/usr/bin

Install ScriptBasic into a different directory in exceptional
cases only, because most of the BASIC code will start referring
to '#! /usr/bin/scriba'

please specify the value:
--install-log=directory

Use this option to specify where ScriptBasic Eszter SB Application
Engine variation (the web server version) has to write the log files.
The default value is

/var/log/scriba
please specify the value:
--install-module=directory

Use this option to specify where ScriptBasic should store the
module shared object files. The default value is

/usr/local/lib/scriba
please specify the value:
--install-hebtemp=directory

Use this option to specify where ScriptBasic external preprocessor
HEB should store the temporary BASIC files that it generates. The
default location is


/var/cache/scriba/hebtemp
please specify the value:
--install-cache=directory

Use this option to specify where ScriptBasic has to store the
compilation cache files. The default value is

/var/cache/scriba/cache
please specify the value:
--install-source=directory

Use this option to specify where ScriptBasic should store the
sample and preprocessor source files. The default value is

/usr/share/scriba/source
please specify the value:
Now I will try to determine the largest safe value for maxlevel.
This may take a while, stay tuned...
Maxlevel is 40291
ScriptBasic was not actually installed, but I created the file
'./install.sh' that you can run as root to install ScriptBasic
with the configured installation option.

I also created the text configuration file 'scriba.conf.lsp'
that reflects the installation locations and contains a
'maxlevel' value that I measured to be safe on this machine.
'install.sh' compiles this configuration for ScriptBasic and
also tries to install all modules that were compiled successfully.
jrs@U32VB:~/sb/source$

       

FYI: I tried to build a OpenSUSE 12.2 64 bit instance on EC2. It refused to allow me to login. (timeout) The current 12.3 version has dropped image support for EC2. Sounds to me like this distribution is providing it's own funeral services as it's offering rather than trying to get along with others. Novell sold out to Attachmate and is trying to create a Red Hat like distribution model. To worsen matters, openSUSE doesn't release current changes to the open source version until months after their released. There are people still running SCO Unix, AIX, believe it or not.






311
What's New / ScriptBasic 2.2 Beta Release
« on: July 22, 2013, 10:51:36 AM »
I hope to have a ScriptBasic 2.2 source beta release with runtime versions for the following platforms posted soon.

  • Windows 32 - make for VC10 and MinGW-gcc
  • Ubuntu 64 - make gcc (12.04 LTS)
  • Debian 64 - make gcc (7.1)
  • CentOS 64 - make gcc (6.4)


The above binary runtime versions are available as attachments to various posts on this forum. My goal today is to make the above set available as an attachment to this post. I'm confident that core ScriptBasic in it's 2.2 form continues to be production stable and bug free. (over 10 years of diverse use in various applications on multiple platforms)

312
Download / Re: ScriptBasic 64 Bit Linux
« on: July 21, 2013, 08:50:18 PM »


I created a CentOS 6.4 64 bit version of ScriptBasic which will be included as one of the 2.2 release candidates.

[root@ip-10-188-28-135 sb22]# scriba -v
ScriptBasic v2.2
Variation >>CentOS64<< build 1
Magic value 859010866
Node size is 24
Extension interface version is 11
Compilation: Jul 22 2013 03:15:57
[root@ip-10-188-28-135 sb22]# cat /etc/*release
CentOS release 6.4 (Final)


Attached is a CentOS 6.4 64 bit SciptBasic runtime set of files for beta testing. Feedback appreciated!

313
Download / Re: ScriptBasic 64 Bit Linux
« on: July 20, 2013, 10:23:17 PM »
I just tested the MySQL extension module under Debian 7 64 bit.

Code: [Select]
' MySQL Test Program

INCLUDE mysql.bas

dbh = mysql::RealConnect("localhost","root","******","sbtest")

mysql::query(dbh,"SELECT * FROM products WHERE productLine = 'Planes'")

WHILE mysql::FetchHash(dbh,column)
  PRINT column{"productCode"}," - ",column{"productName"},"\n"
WEND

PRINTNL
PRINT "The database handle is: ",dbh,"\n"
PRINT "Affected rows by SELECT: ",mysql::AffectedRows(dbh),"\n"
PRINT "Character set name is: ",mysql::CharacterSetName(dbh),"\n"
PRINT "Last error is: ",mysql::ErrorMessage(dbh),"\n"
PRINT "Client info is: ",mysql::GetClientInfo(),"\n"
PRINT "Host info is: ",mysql::GetHostInfo(dbh),"\n"
PRINT "Proto info is: ",mysql::GetProtoInfo(dbh),"\n"
PRINT "Server info is: ",mysql::GetServerInfo(dbh),"\n"
PRINT "PING result: ",mysql::Ping(dbh),"\n"
PRINT "Thread ID: ",mysql::ThreadId(dbh),"\n"
PRINT "Status is: ",mysql::Stat(dbh),"\n"

mysql::Close(dbh)


admin@ip-10-191-131-54:~/sb22/test$ scriba testmysql.sb
S18_1662 - 1980s Black Hawk Helicopter
S18_2581 - P-51-D Mustang
S24_1785 - 1928 British Royal Navy Airplane
S24_2841 - 1900s Vintage Bi-Plane
S24_3949 - Corsair F4U ( Bird Cage)
S24_4278 - 1900s Vintage Tri-Plane
S700_1691 - American Airlines: B767-300
S700_2466 - America West Airlines B757-200
S700_2834 - ATA: B757-300
S700_3167 - F/A 18 Hornet 1/72
S700_4002 - American Airlines: MD-11S
S72_1253 - Boeing X-32A JSF

The database handle is: 1
Affected rows by SELECT: 12
Character set name is: latin1
Last error is:
Client info is: 5.5.31
Host info is: Localhost via UNIX socket
Proto info is: 10
Server info is: 5.5.31-0+wheezy1
PING result: -1
Thread ID: 0
Status is: Uptime: 22639  Threads: 1  Questions: 624  Slow queries: 0  Opens: 432  Flush tables: 2  Open tables: 42  Queries per second avg: 0.027
admin@ip-10-191-131-54:~/sb22/test$

314
Download / Re: ScriptBasic 64 Bit Linux
« on: July 20, 2013, 08:01:37 PM »
Quote
Are these files supposed to go somewhere? libscriba.a libscribaso lscrib.a
Or is this just the output from the build, not needed to use sb system?

The lib directory files are only needed if you compile your scripts to C.

Glad everything is working out for you!

315
Download / Re: ScriptBasic 64 Bit Linux
« on: July 20, 2013, 06:39:48 PM »
Ron,

Here is a Debian 7 64 bit build of ScriptBasic 2.2 binary files. If you can test it on your system and let me know how it goes, that would be great.

Code: [Select]
scriba executable OK  
sbhttpd executable OK  
libscriba library OK  
MODULE sqlite:   dll OK   lib OK   bas OK  
MODULE mt:       dll OK   lib OK   bas OK  
MODULE sdbg:     dll OK   lib OK   bas OK  
MODULE hash:     dll OK   lib OK   bas OK  
MODULE dbg:      dll OK   lib OK   bas OK  
MODULE gd:       dll OK   lib OK   bas OK  
MODULE odbc:     dll OK   lib OK   bas OK  
MODULE zlib:     dll OK   lib OK   bas OK  
MODULE trial:    dll OK   lib OK   bas OK  
MODULE mysql:    dll OK   lib OK   bas OK  
MODULE mxml:     dll FAIL lib FAIL bas OK  
MODULE cgi:      dll OK   lib OK   bas OK  
MODULE curl:     dll OK   lib OK   bas OK  
MODULE ux:       dll OK   lib OK   bas OK  
MODULE re:       dll OK   lib OK   bas OK  
MODULE curses:   dll OK   lib OK   bas OK  
MODULE t:        dll OK   lib OK   bas OK  
admin@ip-10-191-131-54:~/sb22/source$ cd bin/exe
admin@ip-10-191-131-54:~/sb22/source/bin/exe$ ./scriba -v
ScriptBasic v2.2
Variation >>Debian64<< build 1
Magic value 859010865
Node size is 24
Extension interface version is 11
Compilation: Jul 21 2013 01:22:45
admin@ip-10-191-131-54:~/sb22/source/bin/exe$


admin@ip-10-191-131-54:~/sb22$ ls -l bin
total 1468
-rwxr-xr-x 1 admin admin 765544 Jul 21 01:26 sbhttpd
-rwxr-xr-x 1 admin admin 735791 Jul 21 01:26 scriba
admin@ip-10-191-131-54:~/sb22$ ls -l lib
total 2948
-rw-r--r-- 1 admin admin 1086770 Jul 21 01:30 libscriba.a
-rwxr-xr-x 1 admin admin  840056 Jul 21 01:30 libscriba.so
-rw-r--r-- 1 admin admin 1082582 Jul 21 01:30 lscriba.a
admin@ip-10-191-131-54:~/sb22$ ls -l modules
total 1156
-rwxr-xr-x 1 admin admin  56630 Jul 21 01:28 cgi.so
-rwxr-xr-x 1 admin admin  57111 Jul 21 01:28 curl.so
-rwxr-xr-x 1 admin admin  22222 Jul 21 01:28 curses.so
-rwxr-xr-x 1 admin admin  20411 Jul 21 01:28 dbg.so
-rwxr-xr-x 1 admin admin  31232 Jul 21 01:28 gd.so
-rwxr-xr-x 1 admin admin  13776 Jul 21 01:28 hash.so
-rwxr-xr-x 1 admin admin  29147 Jul 21 01:28 mt.so
-rwxr-xr-x 1 admin admin  27824 Jul 21 01:28 mysql.so
-rwxr-xr-x 1 admin admin  15688 Jul 21 01:28 odbc.so
-rwxr-xr-x 1 admin admin  62226 Jul 21 01:28 re.so
-rwxr-xr-x 1 admin admin  22663 Jul 21 01:28 sdbg.so
-rwxr-xr-x 1 admin admin 757133 Jul 21 01:28 sqlite.so
-rwxr-xr-x 1 admin admin   8669 Jul 21 01:28 trial.so
-rwxr-xr-x 1 admin admin  13218 Jul 21 01:28 t.so
-rwxr-xr-x 1 admin admin   3912 Jul 21 01:28 ux.so
-rwxr-xr-x 1 admin admin  13597 Jul 21 01:28 zlib.so
admin@ip-10-191-131-54:~/sb22$

Update

I tried the following and the test programs ran fine.

  • cURL
  • GD
  • SQLite3
  • SB-Hash
  • SB-New internal math functions

I'm assuming MySQL, ODBC and SBHTTPD will run fine.



Pages: 1 ... 19 20 [21] 22 23 ... 59