Author Topic: ScriptBasic 64 Bit Linux  (Read 49685 times)

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
ScriptBasic 64 Bit Linux
« on: April 08, 2011, 09:09:13 PM »
Armando and I were able to build a version of ScriptBasic for Ubuntu 10.10 64 bit.

This version of ScriptBasic includes the additional math functions Tom contributed.

This package will install ScriptBasic's dependencies if they are not present.

sudo gdebi scriba-v2.1.1_amd64.deb  -  Install

sudo apt-get remove scriba  -  Remove

Here is the ScriptBasic source directory I used to build the runtime and install .deb file.

scriba-v2.1.1-src_amd64.tar.z

ScriptBasic Online Documentation


ScriptBasic 64 is a powerful scripting language/API that is easy to use and takes less code to get the job done.

Large Numbers

Code: [Select]
a = 9000000000000000000 / 2
PRINT a,"\n"

$ scriba biglong.sb
4500000000000000000

New Math Functions

Code: [Select]
The following 8 functions accept radians as their argument, so we use the
new RAD() function to convert 34 degrees to 5.934119e-01 (0.593412) radians.

Tangent Cotangent Secant Cosecant
TAN()   COTAN()   SECANT()     COSECANT()
6.745085e-01 1.482561e+00 1.206218e+00 1.788292e+00
0.674509 1.482561 1.206218 1.788292

Arctangent Arccotangent Arcsecant Arccosecant
ATAN()     ACTAN()   ASECANT() ACOSECANT()
5.934119e-01 5.934119e-01 5.934119e-01 5.934119e-01
0.593412 0.593412 0.593412 0.593412

There are 6 Hyperbolic functions. They also accept radian arguments.

H-Sine H-Cosine H-Tangent
HSIN() HCOS()   HTAN()
6.288574e-01 1.181297e+00 5.323451e-01
0.628857 1.181297 0.532345

H-Secant H-Cosecant H-Cotangent
HSECANT() HCOSECANT() HCTAN()
8.465274e-01 1.590186e+00 1.878481e+00
0.846527 1.590186 1.878481


Large Strings

Code: [Select]
a = string(100000000," ") & "John" & string(100000000," ")
PRINT INSTR(a,"John"),"\n"

$ scriba biginstr.sb
100000001

Easy Database Access

sbdb:test


Code: [Select]
' MySQL Test Program

INCLUDE mysql.bas

dbh = mysql::RealConnect("localhost","USER","PSWD","sbdb")

mysql::query(dbh,"SELECT * FROM test")

WHILE mysql::FetchHash(dbh,column)

PRINTNL
PRINT column{"ID"},"\n"
PRINT column{"NAME"},"\n"
PRINTNL

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)

END

$ scriba testmysql.sb
1
John Spikowski

The database handle is: 1
Affected rows by SELECT: 1
Character set name is: latin1
Last error is:
Client info is: 5.1.49
Host info is: Localhost via UNIX socket
Proto info is: 10
Server info is: 5.1.49-1ubuntu8.1
PING result: -1
Thread ID: 0
Status is: Uptime: 194893  Threads: 1  Questions: 2043  Slow queries: 0  Opens: 200  Flush tables: 1  Open tables: 64  Queries per second avg: 0.10

Network/Internet Access

This cURL extension module example downloads the ScriptBasic logo from it's project site.

Code: [Select]
IMPORT curl.bas

ch = curl::init()
curl::option(ch,"URL","http://scriptbasic.org/logo.png")
curl::option(ch,"FILE","sb_logo.png")
curl::perform(ch)
curl::finish(ch)

If programming for the web is your thing, ScriptBasic includes a multi-threaded application proxy server to run your GCI scripts with in memory session support with enhanced security safeguards. (files located outside of web root, .htaccess authorization caching, connection pooling with ODBC, real {binary format} programs and not embedded parsed HTML text scripts like php)

Feedback appreciated!



« Last Edit: April 08, 2011, 10:42:52 PM by support »

meljr

  • Guest
Re: ScriptBasic 64 Bit Linux
« Reply #1 on: April 09, 2011, 08:18:49 AM »
I just wanted to express my appreciation for your efforts.  Having a ready to go Ubuntu 64 bit version will be really useful.

Thanks,

-meljr

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 64 Bit Linux
« Reply #2 on: April 09, 2011, 11:24:46 AM »
Thanks for your reply and support!

This was really a group effort by Armando, Tom and myself getting this put together.

Armando and I are working on a 32 bit .deb for Ubuntu 10.10 and should be posted shortly.


Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 64 Bit Linux
« Reply #3 on: April 09, 2011, 08:45:21 PM »
I created a 64 bit RPM for ScriptBasic 64 using alien to convert the .deb install file.

I included a tar file that can be used to install ScriptBasic if this method is preferred.

sudo tar xzvpf -C / scriba-v2.1.1_amd64.tgz


RONB

  • Guest
Re: ScriptBasic 64 Bit Linux
« Reply #4 on: July 18, 2013, 12:43:22 PM »
John, The scriba-v2.1.1_amd64.deb would not install, error Maintainer line blank. Debian 7 Linux 64bit.

I downloaded and ran the install for scriba-v2.1.1-src_amd64.tar.z.  The install ran through ok and scriba runs ok. The modules do not work though. The install did make the .so files. I use mostly curl.so and cgi.so so need to get those working.
« Last Edit: July 18, 2013, 03:01:47 PM by RONB »

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 64 Bit Linux
« Reply #5 on: July 18, 2013, 10:46:49 PM »
I highly recommend that you install ScriptBasic 2.2 beta for Ubuntu 64 bit. It has the new core math functions and extension modules updated. (along with a couple new ones)

« Last Edit: July 18, 2013, 11:37:01 PM by support »

RONB

  • Guest
Re: ScriptBasic 64 Bit Linux
« Reply #6 on: July 19, 2013, 10:31:28 AM »
Thanks John, I found that version and will give it a try. In the ScriptBasic 2.2 beta for Ubuntu 64 bit package I do not see the sbhttpd server. Will sbhttpd from another linux 64bit package work? I tried scriba-v2.1.1_amd64.tgz and scriba worked but sbhttpd gave a segmentation fault.

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 64 Bit Linux
« Reply #7 on: July 19, 2013, 01:24:26 PM »
I didn't test the SB 2.2 version of sbhttpd in its normal configuration (as root in /usr/bin) and was trying to make it work under a local user account with it's own configuration file. It looks like sbhttpd has to run as a root process due to it being run as a service.

Attached is my Ubuntu 12.04 LTS 64 bit version of sbhttpd.

RONB

  • Guest
Re: ScriptBasic 64 Bit Linux
« Reply #8 on: July 19, 2013, 05:46:50 PM »
Thanks, The ScriptBasic 2.2 beta for Ubuntu 64 worked straight away. I will give your sbhttpd a try also.
Note, I have still not been able to get any of the .so modules to work? I get the error, module can not be loaded. If I change to a bad path for the modules I get, the module can not be found, so the modules are being found but not working for some reason.

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 64 Bit Linux
« Reply #9 on: July 19, 2013, 06:40:39 PM »
Use full paths for your include and module references. I was experimenting with relative paths to where scriba starts but it isn't working for the include reference.

scriba -D will dump your current configuration to the screen. Redirect it to a file, edit it and scriba -k the configuration text file back to its binary form.

scriba -d your_script will put scriba in extension module load debug mode to help you determine why the module load is complaining.


RONB

  • Guest
Re: ScriptBasic 64 Bit Linux
« Reply #10 on: July 19, 2013, 10:28:59 PM »
Thanks for the tips. testcurl.sb using the -d says GLIBC_2.14 not found.

Your sbhttpd works fine. So far only the hash.so and cgi.so are working ok.
« Last Edit: July 20, 2013, 01:06:18 AM by RONB »

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 64 Bit Linux
« Reply #11 on: July 19, 2013, 10:57:07 PM »
This seems to be a Ubuntu 12.04 LTS and Debian 7 issue.

How do I fix a “version `GLIBC_2.14' not found” error?

If you feel comfortable doing so, I could send you a zip of the SB 2.2 source to compile on your Debian box. I'm not posting the SB 2.2 source until the official ScriptBasic 2.2 release. (too many half baked copies floating around as it is)


RONB

  • Guest
Re: ScriptBasic 64 Bit Linux
« Reply #12 on: July 20, 2013, 01:09:18 AM »
'If you feel comfortable doing so, I could send you a zip of the SB 2.2 source to compile on your Debian box. '

Sure I would really like to give it a try. Thanks

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: ScriptBasic 64 Bit Linux
« Reply #13 on: July 20, 2013, 09:19:30 AM »
Ron,

While I build a 2.2 source distribution, can you try compiling the 2.1 source first. That will make sure you have everything installed that is needed. Updating to 2.2 will will only take a few minutes if you have a working SB build directory in place.

John

P.S.

I was unable to find a Debian 7.1 64 bit ISO to install in a VirtualBox. The Debian files site also seemed down yesterday.


RONB

  • Guest
Re: ScriptBasic 64 Bit Linux
« Reply #14 on: July 20, 2013, 02:40:19 PM »
I tried clean installs on these two. Machine Intel64 Debian7

SB_2.1_RC1_Linux.tar.gz

scriba was not made, sbhttpd ok, cgi ok, curl not working
------
scriba-v2.1.1-src_amd64.tar.z

scriba ok, sbhttpd ok, cgi ok, curl not working