Author Topic: JadeLib  (Read 25444 times)

Offline AIR

  • Moderator
  • Posts: 932
  • Coder
JadeLib
« on: January 07, 2019, 09:35:46 PM »
Link to the repository is in the sticky'd post.

Major change is that it now creates libjade, which speeds up compilation etc.

I've also updated the Makefile to support MinGW.

AIR.

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: JadeLib
« Reply #1 on: January 07, 2019, 11:17:59 PM »
Quote
I've also updated the Makefile to support MinGW.

Very kind. Thank You!

I can see a makeover of the C BASIC include file based on your direction but for ANSI C.

I would like to come up with a module maker like to author did for the the JAPI extension module but using C BASIC as well.
« Last Edit: January 07, 2019, 11:54:19 PM by John »

Offline jack

  • Contributor
  • Posts: 15
Re: JadeLib
« Reply #2 on: January 08, 2019, 03:29:15 AM »
hello AIR
thank you for JadeLib and for the very permissive license
just a couple of notes, I had to comment out the Windows specific equates in the makefile to build the lib using msys2
in the example demo.cc, INSTR(mystring,"is") gives 2 as the answer, where mystring = "This is a string."
FreeBasic and QB64 give 3 as the answer.

Offline AIR

  • Moderator
  • Posts: 932
  • Coder
Re: JadeLib
« Reply #3 on: January 08, 2019, 09:55:41 AM »
in the example demo.cc, INSTR(mystring,"is") gives 2 as the answer, where mystring = "This is a string."
FreeBasic and QB64 give 3 as the answer.

It appears that FreeBasic and QB64 are using an index that starts at "1" for their instr command (and other string commands), where as Jade is using a "0" based index.

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: JadeLib
« Reply #4 on: January 08, 2019, 10:25:25 AM »
I can accept zero for a starting array index because SB supports negative indexing. C / C++ shouldn't call an arrary of characters a string.

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: JadeLib
« Reply #5 on: January 08, 2019, 10:42:59 AM »
FYI

Quote
  Hi Johann,

  We eventually build a MacOS binary using GTK. But the experience is bellow normal. GTK works best on Linux, other platforms, including Windows, are not comparable with native applications.

  I'm having some issues with our Mac used to build it, but I hope to have some binaries soon.

  For the future we expect to have a native MacOS driver functional. It is a contribution from Eric Wing, but there is no time frame for a stable release. He needs help by the way.

Best,
Scuri

Offline AIR

  • Moderator
  • Posts: 932
  • Coder
Re: JadeLib
« Reply #6 on: January 08, 2019, 10:47:40 AM »
FYI

Quote
  Hi Johann,

  We eventually build a MacOS binary using GTK. But the experience is bellow normal. GTK works best on Linux, other platforms, including Windows, are not comparable with native applications.

  I'm having some issues with our Mac used to build it, but I hope to have some binaries soon.

  For the future we expect to have a native MacOS driver functional. It is a contribution from Eric Wing, but there is no time frame for a stable release. He needs help by the way.

Best,
Scuri

What does this have to do with Jade?  IUP is not in my plans, although you're welcome to contribute something that would work with Jade...

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: JadeLib
« Reply #7 on: January 08, 2019, 11:05:59 AM »
IUP is the only GUI toolkit that is attempting to touch all the bases in a native format using a common API. The reference to needing help must have eluded you.

Offline AIR

  • Moderator
  • Posts: 932
  • Coder
Re: JadeLib
« Reply #8 on: January 08, 2019, 11:19:25 AM »
The reference to needing help must have eluded you.

Actually, it didn't.  I didn't want to reiterate the reasons why I don't think this is worth my time.

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: JadeLib
« Reply #9 on: January 08, 2019, 11:28:09 AM »
If I would have ever owned a Apple product I may be more interested in pursuing a usable solution. My hope is what you have shown us with your direction doen't lose interest.

I view IUP and the VB6 OCX forms direction as plugin GUIs I don't have to marry. Independance has its virtue.
« Last Edit: January 08, 2019, 11:37:07 AM by John »

Offline AIR

  • Moderator
  • Posts: 932
  • Coder
Re: JadeLib
« Reply #10 on: January 08, 2019, 11:46:26 AM »
Cool, but let's keep THIS thread on topic, please....

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: JadeLib
« Reply #11 on: January 08, 2019, 11:49:39 AM »
Sorry!

I had to make one last effort to try and seed your non-IUP interests.  :-X

Mike Lobanovsky

  • Guest
Re: JadeLib
« Reply #12 on: January 08, 2019, 03:51:43 PM »
It appears that FreeBasic and QB64 are using an index that starts at "1" for their instr command (and other string commands), where as Jade is using a "0" based index.

Actually, it appears that every BASIC I am aware of uses 1 as a starting index in its string evaluation functions like Left, Right, Mid, Instr, InstrRev, Tally, etc. with 0 being reserved to indicate the absence of target value in the string being evaluated. Sorry but I would regard a zero based target position in a string a weird abnormality and an unjustifiable deviation from the traditional BASIC syntax in a particular dialect.

Offline AIR

  • Moderator
  • Posts: 932
  • Coder
Re: JadeLib
« Reply #13 on: January 08, 2019, 04:15:37 PM »
It appears that FreeBasic and QB64 are using an index that starts at "1" for their instr command (and other string commands), where as Jade is using a "0" based index.

Actually, it appears that every BASIC I am aware of uses 1 as a starting index in its string evaluation functions like Left, Right, Mid, Instr, InstrRev, Tally, etc. with 0 being reserved to indicate the absence of target value in the string being evaluated. Sorry but I would regard a zero based target position in a string a weird abnormality and an unjustifiable deviation from the traditional BASIC syntax in a particular dialect.

Jade isn't BASIC.  ;D

Offline John

  • Forum Support / SB Dev
  • Posts: 3597
    • ScriptBasic Open Source Project
Re: JadeLib
« Reply #14 on: January 08, 2019, 04:33:06 PM »
Quote from: AIR@repo
This is a proof of concept using a BASIC-like syntax to program C++.

There is nothing BASIC like with strings starting at zero.