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 ... 32 33 [34] 35 36 ... 59
496
General Discussions / Re: sbhttpd error message
« on: May 06, 2012, 12:48:54 PM »
You can intermix standard HTML and SB CGI files within your project. Only files referenced in the virtual directory structure (basic.conf) are processed by the sbhttpd proxy application server.


497
What's New / Re: ScriptBasic for Android
« on: May 03, 2012, 01:33:31 PM »
The phone I have been waiting for.

   

Samsung Galaxy S III

quad core 1.4 GHz Exynos CPU

Detailed Review

498
What's New / Re: ScriptBasic for Android
« on: April 07, 2012, 08:01:12 PM »
Quote from: AIR
If you're using the Android Terminal app,  I think you should be able to create a directory via adb called /data/local/bin on a non-rooted device.  Then use adb to copy scriba there, and when you launch the Terminal app, scriba will be in the path that the app sets up.

I've managed to embed scriba within the Term.apk file itself, but it needs to be extracted from the apk so that the shell can find it, which I haven't worked out yet (building Win7 systems for a client this weekend.  Yuck.  sysprep to the rescue.)

A.

Updated Instructions

Code: [Select]
adb shell
mkdir /data/local/bin
exit
adb push scriba /data/local/bin/
adb push hello4.bas /sdcard

adb shell
cd /data/local/bin
ls -l (check permissions)

if needed, chmod 755 scriba

Then in Term app: scriba /sdcard/hello4.bas

499
What's New / ScriptBasic for Android
« on: April 07, 2012, 03:13:39 PM »
Armando Rivera and our new ScriptBasic developer Steve Dover were able to get scriba (ScriptBasic command line interpreter) working on Google Android Linux.



If you would like to run scriba on a unrooted device, you need to install it in the /data/data/jackpal.androidterm directory (or the directory your terminal app uses) to make it executable and read/write files.

Quote
It would be nice if you could put native binaries directly onto the SD card (either external or built-in) but you can't. Well, you can — but you won't be able to set execute permissions on them, which means they won't run. The SD card is mounted in such a way as to prohibit setting 'x' permissions. You can set execute permissions in the app storage area — that part of the filesystem that is rooted at /data/data. On an unrooted device you won't be able to create files just anywhere in this directory, because each app has its own security credentials — effectively each app runs as a different user. Only one directory under /data/data will be writeable by a specific app. Once you've found that directory, you can copy a binary into it, and run it at the terminal emulator prompt.

Quote
The results show that native C applications can be up to 30 times as fast as an identical algorithm running in Dalvik VM. Java applications can become a speed-up of up to 10 times if utilizing JNI.

500
Source / Re: patch for build error with gcc-4.4.3 on linux
« on: March 19, 2012, 10:20:54 PM »
Thanks for the patch and welcome to the ScriptBasic project.


501
IUP / Re: IUP Linux and Windows
« on: February 21, 2012, 07:50:38 AM »
Sorry Ron for the delay with BUILD 11. No snags with IUP/CD, only with real life commitments.

I will try to have something up this week.


502
Download / OSX Snow Leopard - ScriptBasic Installer
« on: February 20, 2012, 07:49:56 PM »
Quote from: Armando I. Rivera (AIR)
I wanted to see if SB would work under OSX Lion, and ran into a bunch of issues getting it to compile.  I wasn't able to work those out fully, so instead I compiled it under Snow Leopard.  Note that for maximum compatibility, I compiled it for 32bit.

One of the things that's always bugged me about SB's "installer" is the fact that by default the System bin and lib folders are used.  For any add-on, /usr/local should be used.  So I reconfigured SB to do just that.

One thing you will find is that without a proper installer, most Mac users won't bother trying it out.  Since I had to test a new package installer program for work, I decided to create a proper Mac installer for SB.  I placed the installer within a DMG file, which is like an ISO under other OS's, which Macs can mount directly with a double-click.

The installed folder structure looks like this:
Code: [Select]
/usr/local
   --bin
     --scriba
     --sbhttpd
  --lib
    --scriba
  --share
    --scriba
      --examples
      --include
      --source
      --Script Basic User Guide.pdf

/etc
  --scriba
    --basic.conf

Screen Shots











DOWNLOAD

503
IUP / Re: IUP Linux and Windows
« on: January 29, 2012, 09:07:13 AM »
The graphics will be available in build 11. The build 10 release just enabled additional controls. (matrix, dial, color select, ...)

It won't be long. The CD API is pretty extensive and wrapping / testing it takes time.

To find out what IUP functions are enabled in the SB IUP extension module, look at the iup.bas include file.

I hope to get a SB version of the IUP docs on the SB wiki when I finish the interface code.

504
IUP / Re: IUP Linux and Windows
« on: January 27, 2012, 10:45:57 AM »
I hope to get BUILD 11 out this weekend for Linux (32/64) and Windows 32.

You could create a VirtualBox on your Windows PC and run Ubuntu 32 in it for testing and experimentation. Ubuntu has a dual boot option that uses a portion of your NTFS Windows file system so you don't need to partition your disk. If your PC is new enough and can boot off a USB drive, that is another great way to run Linux as a secondary OS.


505
IUP / Re: IUP Linux and Windows
« on: January 26, 2012, 10:19:38 PM »
ScriptBasic does graphics! Here is a quick test of the CD (Canvas Draw) API in action.

Code: [Select]
IMPORT iup.bas

Iup::Open()

ican = Iup::Canvas()
Iup::SetAttribute(ican, "RASTERSIZE", "800x600")
Iup::SetAttribute(ican, "BORDER", "NO")

dlg = Iup::Dialog(Iup::Vbox(ican))
Iup::SetAttribute(dlg, "TITLE", "Mandelbrot Set")

Iup::Map(dlg)

ccan = CD::CreateCanvas(CD::ContextIup(), ican)

Iup::Show(dlg)

przelx = 3 / 800
przely = 2 / 600

FOR x = 1 TO 800
  FOR y = 1 TO 600
    a = 0
    b = 0
    c = 0
    x2 = (przelx * x) - 2
    y2 = (przely * y) - 1
    petla:
    a2 = a * a - b * b
    b2 = 2 * a * b
    a = a2 + x2
    b = b2 + y2
    z = a * a + b * b
    IF z < 4 AND c < 255 THEN
      c = c + 1
      GOTO petla
    END IF
    IF c = 255 THEN
      pixclr = CD::EncodeColor(0, 0, 0)
    ELSE
      g = 255 - c
      pixclr = CD::EncodeColor(g, g, g)
      ' Color version
      ' pixclr = (g+64) * g * (g+16)
    END IF
    CD::CanvasPixel(ccan, x, y, pixclr)
  NEXT y
NEXT x

Iup::MainLoop()
Iup::Close()
END


506
Installation / Re: Lots of failures running setup on CentOS 4.8
« on: January 24, 2012, 05:52:29 PM »
Make sure you copy the libscriba.a and libscriba.so to your /usr/lib directory. That is were -lscriba is pointing to. This is your runtime library for your C wrapped script.

Quote
warning: no newline at end of file

This is only a compiler warning and doesn't need to be fixed to compile the program.

Advice

If your only creating one standalone SB executable script, it's faster to use the following method. (no compiling needed)

/usr/bin/scriba -Eo updater updater.sb

This appends the compiled (PCODE) to the end of scriba giving it the name your chose. Scriba always checks first if there is a script attached before processing any command line options.

The -C option is a better choice if you have a bunch of scripts that make up your application and using a common runtime shared object makes more sense. Scripts compiled to C normally have 12K of interface overhead and the rest is C wrapped PCODE. This option also allows you to link static to external libraries rather then having to distribute shared objects.

507
Installation / Re: Lots of failures running setup on CentOS 4.8
« on: January 24, 2012, 04:52:19 PM »
Setup will build ScriptBasic from scratch. It means you must have all the dependencies installed and understand how the build process works.

If you need a CentOS runtime version for 64 bit, you can get it HERE.

The server that this site is running on has a 32 bit version of CentOS I could make a runtime for you if needed.

What is your long term goal using ScriptBasic?

BTW: The current version of ScriptBasic is 2.1. The 2.00b version is pre-2005 vintage and for reference only.

508
General Discussions / Re: Print to ttyS0
« on: January 22, 2012, 06:25:58 PM »
Please post the relevant code you are using to communicate with the serial port.

I haven't tried using SB with a serial port before but I see no reason it shouldn't work.

This works even though it isn't a tty serial port in the true sense.

Code: [Select]
OPEN "/dev/tty" FOR OUTPUT AS 1

PRINT #1,"Test\n"
LINE INPUT #1, i
PRINT i

jrs@laptop:~/sb/test$ scriba ttytest.sb
Test
jrs@laptop:~/sb/test$


509
General Discussions / Re: Print to ttyS0
« on: January 22, 2012, 06:14:42 PM »
ScriptBasic assumes that the tty port is setup correctly at the Linux level.

When you say it isn't working, are you seeing anything or just not doing line termination correctly?

If your device is only looking for a CHR(13) (RETURN) for a line terminator then just use \r only.

510
General Discussions / Re: Print to ttyS0
« on: January 22, 2012, 05:33:50 PM »
Try "1*21999\r\n"

\r = RETURN
\n = LINEFEED

Pages: 1 ... 32 33 [34] 35 36 ... 59