Open Forum > What's New

ScriptBasic 2.2 Beta - Feedback

(1/3) > >>

Support:
Most if not all of these issues are due to missing dependencies. I attached a Text File that listed the packages that needed to be installed. You also need to install IUP. (runtime files are all that is needed)

My mistake. The wc.sb word count program is using the sort option for Windows not Linux. Change them to -o instead and it will work fine. I'll fix that in the next build.

Make sure you are using the hash.so that came with 2.2 as the 2.1 version had issues.
Make sure your scriba|basic.conf is pointing to the right modules directory. (scriba -D)

testhash.sb

--- Code: ---IMPORT hash.bas

h = hash::New()
hash::SetValue(h,"1234567890A",1)
hash::SetValue(h,"12345678901234567890B",2)
hash::SetValue(h,"123456789012345678901234567890C",3)
hash::Start(h)

FOR x = 1 to 3
  PRINT hash::ThisKey(h), " - "
  PRINT hash::ThisValue(h),"\n"
  hash::Next(h)
NEXT x

hash::Release(h)

--- End code ---

jrs@U32VB:~/sb22/test$ scriba testhash.sb
1234567890A - 1
12345678901234567890B - 2
123456789012345678901234567890C - 3
jrs@U32VB:~/sb22/test$


Thanks again for your testing and feedback.


Support:
Ron,

There has been a change in how ScriptBasic was installed in the past. (< 2.2)  With this release ScriptBasic allows you to unzip the archive to where ever you like (a sub directory within your user account for example) and no need to regenerate a scriba.conf pointing to your SB module and include directories. The paths to these directories are relative to where the scriba.conf is located which is bin. This makes ScriptBasic more flexible with where it lives.


--- Code: ---jrs@laptop:~/sb/sb22/bin$ scriba -D
dll ".so"
module "../modules/"
include "../include/"
maxinclude 100
preproc (
  internal (
    sdbg "../modules/sdbg.so"
   )
 )
maxstep 0
maxlocalstep 0
maxlevel 3000
maxmem 0

--- End code ---

I created a . script to setup my environment variables for ScriptBasic.


--- Code: ---export PATH=/home/jrs/sb22/bin:$PATH
export SCRIBACONF=/home/jrs/sb22/bin/scriba.conf

--- End code ---

You can find IUP on SourceForge which has 32/64 bit Linux versions with the choice of Gtk2 or Gtk3. Just download the archive somewhere and run the install script with sudo.

The cURL example assumes you have Apache running local on your system. If not point the URL in the script somewhere else.

The MySql example assumes you have MySQL server and the libmysql client installed. If you don't have MySQL installed then you need to point the host argument to where you have access to one.

If you are going to use the ODBC extension module then you will need to download the unixODBC drivers for MySQL and SQLite.

Load the wc.sb script in your text editor and change the following.

ok = EXECUTE("sort wc.raw /O wc.srt", -1, PID)

TO

ok = EXECUTE("sort wc.raw -o wc.srt", -1, PID)


Support:

--- Quote ---I removed the ' and made the change as you suggested.
--- End quote ---

The second (near the end) sort that was remarked out is an extra step to output a word list by rank. The one I posted is the only change needed if you don't want the rank list.


--- Quote ---My main use of SB has been mostly sbhttpd, cgi and curl, which are working fine.
--- End quote ---

SBHTTPD is a rock solid multi-threaded web server that is easy to program.

FYI If you are using MT for session (cookie) tracking and use the function to return expired sessions in an array, make sure you undef that session array or overtime memory usage gets huge. I thought SBHTTPD had a memory leak until Peter Verhas commented on how I was removing expired sessions.

Support:
Ron,

Works fine on my Ubuntu 12.04 LTS 32 bit system. (VirtualBox)

Do you have a libiup.so in your /usr/lib directory? (put there by the IUP install script)

What version of Gtk are you using? (2 or 3)

John

Support:
What is the error you are getting?

Navigation

[0] Message Index

[#] Next page

Go to full version