Author Topic: Notes on Script BASIC  (Read 29965 times)

B+

  • Guest
Notes on Script BASIC
« on: September 20, 2018, 06:02:20 PM »
Tried it once, because you know who goes on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on .... in everyone else thread except his own.

I got yelled at for not reading manual when I asked a question.

Sorry no manual was ever made available.

Who thinks I should try it again?


B+

  • Guest
Re: Notes on Script BASIC
« Reply #1 on: September 20, 2018, 06:15:48 PM »
From comments I read from other Beginners with Script BASIC, I get the impression it is NOT Beginner friendly.

I know one promoter of Script BASIC who is not friendly to Beginners but that is another story...

Maybe it should be called Script ASIC ;D

B+

  • Guest
Re: Notes on Script BASIC
« Reply #2 on: September 20, 2018, 06:50:53 PM »
Well look here,
 http://info.bannerengineering.com/cs/groups/public/documents/literature/191745.pdf
instead of yelling at people for not reading a manual, someone actually goes ahead and writes one!

Now that is watching out for Beginners.

ScriptBasic

  • Guest
Re: Notes on Script BASIC
« Reply #3 on: September 20, 2018, 06:57:21 PM »
Script BASIC is probably one of the best documented non-commercial open source projects out there. Not only is there a Users Guide, the developer embedded and extension API documentation let's you morph the scripting engine into whatever you need.

If there were more project managers like me, there wouldn't be over 100 abandoned BASIC languages with efforts like yours adding new plots to the BASIC graveyard.

@B+ - You are beginning to turn into a bitter whiner and losing my respect with each new post.
« Last Edit: September 20, 2018, 07:05:50 PM by John »

B+

  • Guest
Re: Notes on Script BASIC
« Reply #4 on: September 20, 2018, 07:14:53 PM »
Quote
B+,

Tomaaz said he didn't like Script BASIC because there was no install program for Linux and was confused how to include the SB executable path or create the configuration file. I  would have been happy to help him get going if he would have asked.

What don't you like about Script BASIC?
« Last Edit: Today at 08:07:55 by John »

Asked and answered.

ScriptBasic

  • Guest
Re: Notes on Script BASIC
« Reply #5 on: September 20, 2018, 07:50:09 PM »
Here is another (commercial) resource for Script BASIC to feed your bitter sweet spot.

Control Solutions MN. They have been using Script BASIC embedded in their BACNet controllers since 2003.

Tomaaz

  • Guest
Re: Notes on Script BASIC
« Reply #6 on: September 20, 2018, 10:43:03 PM »
So, I'm an idiot who would love to use ScriptBasic, but is to stupid to start with it. Good to know.  ;D ;D ;D

John, belive me - if I really wanted to use ScriptBasic, I would manage to install and configure it. I just can't see anything what could justify using my free time do do it. For me, a serious scipting language* should out of the box come with features like proper associative arrays, sorting, filtering, applying functions to each element of an array and getting unique elements without writing FOR/NEXT loop for it. I want to have function for reading an entire text file into a string, ability to use regular expressions, recurively walking  through directories, having easy acces to a file info (basename, extension, realpath, type of the file, permissions etc.). Generic FOR loop makes things a lot cleaner and easier. Basic Internet functionality (like downloading a file) should be there. Also, support for unicode and large numbers. If I want to use Perl or JavaScript, I'm gonna use Perl or JavaScript and not ScriptBasic with Perl and JavaScript modules. Just have a look at Perl's, Python's or Ruby's standard library. Then have a look and PyPI, CPAN and Ruby Gems. Then look at ScriptBasic. Can't you see a difference?  I don't know - maybe ScriptBasic is not a bad choice for embedding, but I'm not planning to build a device that will need an embedded language to be used with it, so I don't care.

Script BASIC is probably one of the best documented non-commercial open source projects out there.

 ;D ;D ;D Comparing to what? Those 100 abandoned BASIC languages? Seriously, do you want me to die from laughing?  ;D ;D ;D

OK. Have a look at documentation pages on:

https://nim-lang.org/
https://crystal-lang.org
https://dlang.org
https://www.ruby-lang.org/en/

* Of course, languages created for fun or for specific tasks are a completely different story.
« Last Edit: September 20, 2018, 11:10:56 PM by Tomaaz »

B+

  • Guest
Re: Notes on Script BASIC
« Reply #7 on: September 20, 2018, 11:47:57 PM »
You know this package looks like a decent User Manual, why not include it with SourceForge download of Script Basic?
But what is i.CanDoIt Device to practice using ScriptBasic on?

Oh it is a server $1500 to $2000 "remote monitoring solution". Just what every beginner needs.
« Last Edit: September 21, 2018, 12:08:05 AM by B+ »

B+

  • Guest
Re: Notes on Script BASIC
« Reply #8 on: September 21, 2018, 02:00:29 AM »
Oh I see the big ugly secret, not a screen function to be found!

No Locate, no Input, no Cls, its all a text scroller.

Finally, I get Hello World! to work:
Code: [Select]
Print "Hello World!"
sleep 100
drag and drop onto sb64.exe

So again I say, Script ASIC is a bad BASIC for Beginners, get back to your side of the pool.

https://www.youtube.com/watch?v=oEzXvP7RMaw
« Last Edit: September 21, 2018, 02:26:56 AM by B+ »

Tomaaz

  • Guest
Re: Notes on Script BASIC
« Reply #9 on: September 21, 2018, 08:27:18 AM »
Here is a list sequence bunch* of numbers - [120, 135, 345, 345, 1890, 12, 120, 12, 135, 712, 78, 120]. The task is to print three biggest unique elements sorted from biggest to smalllest.

Python:
Code: [Select]
x = [120, 135, 345, 345, 1890, 12, 120, 12, 135, 712, 78, 120]
print(sorted(list(set(x)), reverse=True)[0:3])

Can I see ScriptBasic solution, with its "powerfull" and "flexible" arrays?

EDIT Yes, Python lists can be nested and can hold values of different types (just in case you ask this question again).

* To make Aurel happy, I've changed it once more. ;)
« Last Edit: September 21, 2018, 05:00:02 PM by Tomaaz »

jj2007

  • Guest
Re: Notes on Script BASIC
« Reply #10 on: September 21, 2018, 12:19:11 PM »
Nice that Python can handle that, but this ultra-short syntax is not necessarily good for readability. I am more comfortable with more explicit syntax:
Code: [Select]
  Dim x(11) As DWORD
  ArraySet x()=120, 135, 345, 345, 1890, 12, 120, 12, 135, 712, 78, 120
  ArraySort x(-) ; sort descending
  For_ ct=0 To x(?)-1
Print Str$(x(ct)), " "
  Next

Tomaaz

  • Guest
Re: Notes on Script BASIC
« Reply #11 on: September 21, 2018, 01:03:47 PM »
And where is the part that removes all duplicates from the array and leaves only unique elements?

Aurel

  • Guest
Re: Notes on Script BASIC
« Reply #12 on: September 21, 2018, 01:20:30 PM »
What you see as list is not a list than array of pointers because python don't have native built in
linked  list  :o
you probably need to use lib written in C/C++ to do that in python
I once tried ScriptBasic and never again and i have some exeperience in Basic but
this thing is not for me and i doubt that is for any begginer at all 

Aurel

  • Guest
Re: Notes on Script BASIC
« Reply #13 on: September 21, 2018, 01:23:51 PM »
WOW ...WOW ...
John is really quick he delete account here
geee

Tomaaz

  • Guest
Re: Notes on Script BASIC
« Reply #14 on: September 21, 2018, 02:09:46 PM »
Aurel, I've changed "list" to "sequence". Happy?  ;D You can also call it "a group", or "a bunch". I don't care, because it's clear what the task is and internal representation and handling of data in different languages has nothing to do with it.