ScriptBasic
May 22, 2012, 02:13:08 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: The ScriptBasic User, Developer and extension module guides are available at the WIKI.
 
   Home   Wiki Help Search Login Register  
Pages: [1]
  Print  
Author Topic: ScriptBasic 64 Bit Linux  (Read 1159 times)
support
Administrator
*****
Posts: 409


« 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:
a = 9000000000000000000 / 2
PRINT a,"\n"

$ scriba biglong.sb
4500000000000000000

New Math Functions

Code:
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:
a = string(100000000," ") & "John" & string(100000000," ")
PRINT INSTR(a,"John"),"\n"

$ scriba biginstr.sb
100000001

Easy Database Access

sbdb:test


Code:
' 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:
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!




* scriba-v2.1.1_amd64.deb (978.89 KB - downloaded 66 times.)
« Last Edit: April 08, 2011, 10:42:52 PM by support » Logged
meljr
Newbie
*
Posts: 1


« 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
Logged
support
Administrator
*****
Posts: 409


« 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.

Logged
support
Administrator
*****
Posts: 409


« 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


* scriba-v2.1.1_amd64.rpm (986.17 KB - downloaded 51 times.)
* scriba-v2.1.1_amd64.tgz (988.25 KB - downloaded 55 times.)
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!