Author Topic: ScriptBasic 2.2 Beta - Feedback  (Read 3197 times)

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« on: February 21, 2013, 11:01:33 AM »
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: [Select]
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)

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


Thanks again for your testing and feedback.


« Last Edit: February 21, 2013, 04:19:44 PM by support »
Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #1 on: February 21, 2013, 07:08:14 PM »
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: [Select]
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

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

Code: [Select]
export PATH=/home/jrs/sb22/bin:$PATH
export SCRIBACONF=/home/jrs/sb22/bin/scriba.conf

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)


« Last Edit: February 21, 2013, 07:22:16 PM by support »
Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #2 on: February 21, 2013, 11:06:03 PM »
Quote
I removed the ' and made the change as you suggested.

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.

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.

« Last Edit: February 22, 2013, 12:25:57 PM by support »
Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #3 on: February 22, 2013, 10:34:17 AM »
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
Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #4 on: February 22, 2013, 05:12:18 PM »
What is the error you are getting?
Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #5 on: February 22, 2013, 07:50:11 PM »
Quote
scriba sbiupdict.sb
The requested module can not be loaded.

Just tested this again with no issues.  ???

Quote
scriba testmysql.sb
The requested module can not be loaded.

Try a scriba -d testmysql.sb and see if it gives you anymore info why the module isn't loading.

Quote
scriba testodbc.sb
Extension specific error.

Have you done your odbcinst -c to create your user/system DSN? Did you download the ODBC driver for the DB you're trying to access?

Quote
I have installed the dependencies. The other test programs are working.

Does this mean the other IUP examples work? (SBx_bunttons & SBx_dict.sb)

Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #6 on: February 23, 2013, 12:25:45 AM »
Looks like the MySQL client can't find a MySQL server to connect to. Do you have MySQL server installed or can you change the script to point to one?

Are you sure you have the SB iup.so (extension module) with the others and the iup.bas with the other SB includes?

Having two shared objects with the same name caused problems under Windows so that is why the DLL is named pui.dll. I haven't had the same issue with Linux. (yet)

« Last Edit: February 23, 2013, 01:01:39 AM by support »
Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #7 on: February 23, 2013, 10:43:27 AM »
ScriptBasic 2.2 runs on Ubuntu 12.04 LTS 32  and 64 bit versions with 3rd party extension modules updated to current levels. That said, lets find out why your version of Linux is having issues with the current SB Ubuntu version. I would like to get the MySQL problem solved first then we can move on to IUP.

Q. Does the SB 2.1 version of the MySQL interface work on your box?

Q. What version of MySQL server are you running?

Q. What is your Linux kernel version?

Q. Does the console version of the MySQL client work?



« Last Edit: February 23, 2013, 10:45:23 AM by support »
Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #8 on: February 23, 2013, 12:12:45 PM »
Quote
Ver 14.14 Distrib 5.1.66, for debian-linux-gnu (i486) using readline 6.1

Info returned from running the testmysql.sb example.

Client info is: 6.0.0
Server info is: 5.5.28

I would say that the SB 2.2 current driver interface isn't happy with your older version of MySQL server. If the 2.1 version of the SB mysql.so works for you and it's less painful than upgrading your server, nothing other than updating the library to the latest version was done to the extension module for 2.2.

Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #9 on: February 23, 2013, 06:23:34 PM »
Quote
Did you ever make a iup package for Linux32bit? Everything here iup looks to be for Linux64bit.

ALL posted ScriptBasic 2.2 releases include the IUP extension module.

Based on the message returned with the scriba -d trying to load IUP, your Gtk2 is out of date. (guess) I sent Antonio (IUP author) an e-mail asking about Gtk2 version requirements.

Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #10 on: February 23, 2013, 08:18:43 PM »
Quote
scriba -d sbiupdict.sb
dlopen failed
dlerror message=/usr/lib/libiup.so: undefined symbol:gdk_drag_context_getselcted_action
(0): error &H10:The requested module can not be loaded.

Looks like a typo to me either way.

I'm running Gtk3 on Ubuntu 12.04 LTS 32 bit. I would guess this was fixed in the Gtk3 version and still looms with Gtk2. We should be able to get this resolved for you shortly.

Quote
The sqlite3 works fine, it will fill in for awhile until Debian updates their sql packages.

There is no reason not to use the 2.1 version of the mysql.so extension module with scriba 2.2. The 2.2 release is more of an updating libraries, adding in the new math functions and offering 64 bit.
« Last Edit: February 23, 2013, 08:30:03 PM by support »
Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #11 on: February 23, 2013, 09:30:20 PM »
From the IUP docs.

Quote
GTK System Driver (since 3.0)

This driver was designed for the GTK+ version 2 and 3. It can be compiled in Windows or UNIX.

Although GTK has layout elements they are not used. IUP fill, vbox, hbox and zbox containers are implemented independent from the native system.

The oldest GTK version that can be used is 2.4, oldest versions will not compile. But using versions older than 2.12 several features will not work. Critical features need at least version 2.8.
Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #12 on: February 24, 2013, 10:40:31 AM »
Reply from Antonio (IUP author)

Quote
It seems to be. I use that function in IUP, but I use the correct spell: gdk_drag_context_get_selected_action. I just searched the IUP code and all references were right.

Also searched on Google and there was no results for the wrong spell. It should be something in his system.

Best,

Scuri

My advice, upgrade your system to a Linux distribution that tries to stay relevant.
« Last Edit: February 24, 2013, 03:44:50 PM by support »
Script BASIC Project Manager

support

  • Administrator
  • *****
  • Posts: 843
    • Script BASIC Open Source Project
ScriptBasic 2.2 Beta - Feedback
« Reply #13 on: February 27, 2013, 11:11:49 PM »
Are you not able to get the current SB 2.2 iup.so and iup.bas extension module that came with the 2.2 beta release working? The builds you are using were early tests and I have no idea what state those are in.

I'm finishing the callbacks for all the IUP controls before moving on to the CD (Canvas Draw) API. Look at the IUP.BAS for what IUP functions I have wrapped (somewhat tested)  in the extension module.
« Last Edit: February 28, 2013, 12:34:04 AM by support »
Script BASIC Project Manager