Author Topic: PowerBASIC has been sold! (PowerBasic IS ALIVE !)  (Read 16497 times)

0 Members and 1 Guest are viewing this topic.

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 960
    • it-berater
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #30 on: February 24, 2018, 09:19:36 AM »
Atthis time i am quite confident that there will be some sort of PB x64 Sort of Compiler, wether from PB or from Brian Alvarez.

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1998
    • www.zapsolution.com
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #31 on: February 24, 2018, 09:37:34 AM »
The best solution is to use C++ under the hood to create a 64-bit PB compiler.  8)

and the other solution is to learn how to program in C++ directly  ;D
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 665
    • Charles Pegge
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #32 on: February 26, 2018, 07:16:46 PM »
We were having quite an interesting discussion about PB over here:

http://www.oxygenbasic.org/forum/index.php?topic=1542.0

Offline Brian Alvarez

  • Full Member
  • ***
  • Posts: 133
    • PluriBASIC
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #33 on: February 28, 2018, 09:06:55 PM »
The best solution is to use C++ under the hood to create a 64-bit PB compiler.  8)

and the other solution is to learn how to program in C++ directly  ;D

It's done. Check this out:

http://www.jose.it-berater.org/smfforum/index.php?topic=5242.0

Offline Mike Lobanovsky

  • Jr. Member
  • **
  • Posts: 94
Mike
(3.6GHz Intel Core i5 w/ 16GB RAM, 2 x GTX 650Ti w/ 2GB VRAM, Windows 7 Ultimate Sp1)

Offline Brian Alvarez

  • Full Member
  • ***
  • Posts: 133
    • PluriBASIC
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #35 on: March 04, 2018, 07:16:03 AM »
It's done.

Is it really?

 It is. Im still adding little details for my own use, but it exists.

Offline Brian Alvarez

  • Full Member
  • ***
  • Posts: 133
    • PluriBASIC
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #36 on: March 15, 2018, 11:40:26 AM »
Hello Chris,

 Right now i am working on the PHP features of the engine, since those are what i use the most.

 I went ahead and added an option switch to use BSTRS or STRINGS on the C++ engine to make it easier for 32 bit apps on the C++ engine. It is working pretty good. I figured that since Official PowerBASIC compiler cannot create 64 bit DLL's, it is (for now) not worth it to make it compatible with BSTR's, since i dont know of a way to have a 64bit application to use 32bit dlls. However the bases are set and its just a matter of a simple option to switch from generating BSTR or STRING source code.

 Basically everything works, but there are lots of stock functions to do. I am creating those, but there will be needed another set of functions for the BSTR versions.

 However, as much as i want to, i dont know if i should share. As i was pointed out, there might be problems if i do, so... I dont know.

 Maybe i will share a video of it working to show how easy it is to use. Basically all you need to do to chage the target (once the compier paths are set) is set the headers like this:

Code: [Select]
' Compile an exe with PBWIN (32Bit).
#COMPILER PBWIN
#COMPILE EXE

Code: [Select]
' Compile an exe with PBCC (32Bit).
#COMPILER PBCC
#COMPILE EXE

Code: [Select]
' Compile an exe with the configured C++ compiler (32 or 64 Bit depending on the compiler and its settings).
#COMPILER CPP
#COMPILE EXE

Code: [Select]
' Compile a CGI with PBWIN.
#COMPILER PBWIN
#COMPILE CGI

Code: [Select]
' Compile a LIB CPP.
#COMPILER CPP
#COMPILE LIB

Code: [Select]
' Compile a PHP script.
#COMPILER PLURIBASIC
#COMPILE PHP

Et cetera.

 Its pretty fun to work with it. However since i still need to work on a regular bill-paying job, i don't have as much time to work on it as a would like. Since i want to see it shine, and i need to have a regular job, and can't focus much on it, I am considering selling a "share" of it to someone who can develop it along with me. This would free me to work more on it and speedup things by having some aid. The code is pretty modularized and easy to understand, very carefully made since the beggining, so, it will not be a problem to mantain it.

 Believe it or not, It is currently being developed in Itself. it can generate code to compile itself as a 32bit compiler (using PowrBASIC) and also generates its own source code for C++. However, since some stock functions for C++ are missing (the ARRAY statements like ARRAY SORT, ARRAY SCAN etc...) it cannot yet compile itself in 64 bit mode. Once those are created, there is nothing else preventing it from compiling itself as a 64bit compiler that can compile 64bit applications.

 The bones for DDT are set. Meaning it will be able to compile DDT source code with no issues as a 64Bit apps once the stock functions are created. Cant wait to have time to create those!!!

 There. Thats an update. :)


 

« Last Edit: March 15, 2018, 11:42:12 AM by Brian Alvarez »

Offline Raymond Leech

  • Newbie
  • *
  • Posts: 3
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #37 on: March 15, 2018, 04:03:18 PM »
However, as much as i want to, i don't know if i should share. As i was pointed out, there might be problems if i do, so... I don't know.

Brian, This is going far back in my memory, so apologies if I don't have all the facts at my fingertips. If you're interested in researching the ins/outs, I think you might want to talk to Eros at ThinBasic.  I seem to remember discussions on someone's forum about what he could and couldn't do to produce a non-infringing product.  I think it was about simply wrapping PBs commands and exposing them w/o a PB license.  The one example that sticks in my head is you couldn't write a language that had xPrint commands that simply called the PB xPrint functions, you had to write your OWN xPrint layer.

Since you're emitting 64bit code, seems pretty unlikely you're 'thunking' down to the PB 32bit runtime library. Just my $0.02.

Offline Brian Alvarez

  • Full Member
  • ***
  • Posts: 133
    • PluriBASIC
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #38 on: March 15, 2018, 06:28:47 PM »

 Hello Raymond,

 You are right. 32 Bit stock functions cannot be embedded into a true 64 bit application. That is exactly what i repeatedly repost as missing, those stock functions that are not supposed to be wrapped. :)

 One needs to write their own.

 I once talked with Bob Zale about this i think. He said (and i think he also posted this on the forums) one is not allowed to wrap them in a function, using another name and claim as own. Thats all. For example, one could even use other functions like MID$ and INSTR to create a custom TRIM function, but directly wrapping TRIM$,would not be allowed. Doing a custom trim, using TRIM$ as part of it, would be allowed, as long as it was not a direct wrap. for example, it is OK to do this:

Code: [Select]
FUNCTION MYCUSTOMTRIM(BYCAL Src AS STRING) AS STRING
     FUNCTION = TRIM$(Src, ANY "&s**!")
END FUNCTION

 But its not OK to do this:

Code: [Select]
FUNCTION MYTRIM(Src as String, OPT UseAny as Long, OPT Chars as String) as string

IF ISFALSE VARPTR(Chars) THEN
   FUNCTION = TRIM$(Src)
ELSEIF UseAny then
   FUNCTION = TRIM$(Src, ANY Chars)
ELSE
   FUNCTION = TRIM$(Src, Chars)
END IF

END FUNCTION



Offline Frederick J. Harris

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 938
    • Frederick J. Harris
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #39 on: March 16, 2018, 04:18:23 PM »
You are using a C++ compiler to generate 64 bit exes Brian?  If so, which one?  Could MSVC be used?  I'm wondering because I link against my TCLib to produce really small x64 exes.  But I only use MSVC.  I have not used GCC for some time for various reasons.  I'm wondering if your work would integrate into mine.  One of the issues that is depressing to me is that if a 64 bit PowerBASIC compiler would come along, would it be able to produce tight exes like PowerBASIC's 32 bit native compiler?  Generally speaking, C++ compilers that make use of anything from the C++ Standard Library generate large code.  In my work I have avoided that, and have been able to use all the features of C++ without generating large code.  I'm just wondering about these things.  I can manage without PowerBASIC, but I miss it bad. 

Offline Brian Alvarez

  • Full Member
  • ***
  • Posts: 133
    • PluriBASIC
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #40 on: March 16, 2018, 09:44:45 PM »
Hello Frederick,

 Yes. I am compiling 64bit EXEs with a C++ compiler.  I have used various compilers, but i havent tested with MSVC.

 The engine i use generates requires a compiler that supports C++ 11 or newer. If you send me a copy of MSVC or a download link that installs offline, i can try it (and make tweaks to make it work). I preferably would like to suggest a compiler that doesnt require the .Net framework to be installed.

 When i switch from #COMPILER PBWIN to #COMPILER CPP, the resulting sizes are dramatically different. For PBWIN i get (from my tests 5 minutes ago) an exe of size 28kb, when i use the CPP one, i get an exe of 1.8MB. Not exactly light. Of course, first one is 32 bit and second is 64 bit... but stilll....

 Which one do you suggest to generate small executables?

 Also integrate with what work? i mean, what do you do?

 Brian. :)

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1998
    • www.zapsolution.com
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #41 on: March 16, 2018, 11:41:49 PM »
We have posted already several examples showing that C++ 64-bit could be also very small in size.

VS 2017 Community is free and you can just install the C++ compiler if you want, no need to install the .NET version, you can also use it to produce Android applications...

Here is an example of a standalone 30 Kb 64-bit application that is a transposition of the PowerBASIC address example.
http://www.jose.it-berater.org/smfforum/index.php?topic=5185.0
« Last Edit: March 16, 2018, 11:44:31 PM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Brian Alvarez

  • Full Member
  • ***
  • Posts: 133
    • PluriBASIC
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #42 on: March 17, 2018, 02:20:47 AM »
 I am lost in the options Patrice. Could you point me to the compiler only? Every time i want to download it it either wants me to download the whole thing or update the whole visual studio i have already installed.

 Its funny that only the list of files that is downloaded while installing visual studio, is 67 MB.... that is like 120 times bigger than the compiler i am writing... and it is only the list of files to download!!!

 Very bloated stuff! In the time it takes my computer to open Visual studio 2017, i could open AND close Pluribasic like 70 times... WHILE Visual studio opens (i mean, at  the same time that visual studio is using lots of resources)!

 Thanks. :)

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1998
    • www.zapsolution.com
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #43 on: March 17, 2018, 10:06:46 AM »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Brian Alvarez

  • Full Member
  • ***
  • Posts: 133
    • PluriBASIC
Re: PowerBASIC has been sold! (PowerBasic IS ALIVE !)
« Reply #44 on: March 17, 2018, 09:35:13 PM »
 Ohhh that was it! I was googling for "download".  ;D

 Jk.