Oxygen Basic

Information => Development => Topic started by: JRS on May 21, 2018, 06:24:46 AM

Title: Where is O2?
Post by: JRS on May 21, 2018, 06:24:46 AM
Charles,

Can you give us your official status on the state of Oxygen Basic at this time?

Would you recommend O2 being used in a mission critical project?

What type of BASIC user/developer could assist with the project best and help move it along?

Do you feel catering to newbie BASIC users provides a benefit or distraction in your efforts to obtain a production stable compiler?




Title: Re: Where is O2?
Post by: Charles Pegge on May 22, 2018, 01:07:43 AM
Hi John,

Well, the high end of alpha maybe. Testing 1200 examples exposed 6 minor bugs, and induced 1 minor mod. The core function set has been stable for a few years now, and most of the recent development has been in macros. I'm currently working on the first generation self-compiled o2 which can now produce small binaries, and JIT. Producing a second-generation o2 would definitely mark the end of the alpha phase.

This project is a full-time job. Not many hours to spare for side-tracking. So everything I do assists the project in some way, including newbie support.

Does anyone here like writing manuals? :)
Title: Re: Where is O2?
Post by: JRS on May 22, 2018, 06:14:33 AM
Quote
Does anyone here like writing manuals?

There is only one person I know of that is qualified and would do O2 documentation justice and that is José Roca.

I would vote for Mike to write the O2 developer docs.
Title: Re: Where is O2?
Post by: Patrice Terrier on May 22, 2018, 11:52:19 PM
Just my personnal opinion...

I think that without a real business structure and a dedicated team, the chance for a late coming compiler to surface from the underground is equal to null.

ZALE, was just one exception, but time of a single man working in his garage is over since the 80's.

Ask yourself, what is the company that would invest time on a vapor ware nowdays ?

The only target is the hobby one, but nobody can do a living from it.

However advanced programming could be seen as a real artwork, and if you were living in Japan then you would have a chance to be paid to transmit your knowledge under the status of "Living National Treasure" to teach a handfull of {talented} disciples, and then be able to perpetuate your knowledge for the young generation.

Title: Re: Where is O2?
Post by: edcronos on May 23, 2018, 01:16:54 AM
I sort of agree with the Patrice Terrier.
but I find the basic language easier and more logical, and it only had no market because it was compared to something just for the basics.
perhaps it has some future point if it is directed at segments that have somehow become orphans at some point.
or if it attracts the attention of newcomers in an intuitive way in the creation of applications where the ease in logic generates ease of learning and productivity, it would certainly attract the attention of large companies

and yes, as a complete amateur in programming I miss a manual
without speaking that with the freest syntax, also brought a certain complexity
Title: Re: Where is O2?
Post by: JRS on May 23, 2018, 07:16:42 AM
Patrice is correct if you're writing a commercial application like his set of graphic tools. Where BASIC comes in handy is for those one off projects done specifically for a client that you end up supporting and enhancing.

That is still a huge market VB6 once owned.
Title: Re: Where is O2?
Post by: Aurel on May 24, 2018, 10:41:46 AM
I think that no one of you can feel the energy of o2.
everything else are pure speculations...
Title: Re: Where is O2?
Post by: Mike Lobanovsky on May 24, 2018, 01:15:17 PM
Then probably some one of you two -- Aurel or Zlatko -- can feel the burning heat of O2 and will be able to give us a hand with help manuals, include files, or developer docs without any further speculations? :)
Title: Re: Where is O2?
Post by: edcronos on May 24, 2018, 03:59:05 PM
something I miss is about the structure to be programmed
has, macro, sub, modulo, as it is the Scope of them and of the Variables, the calls
has a lot of examples, but the varied syntax ends up confusing, and the majority is complex for those who are starting
it took me a while to declare an array with size indicated by a variable

I can set up small functions, but I can not get something more structured even though I have only basic commands
Title: Re: Where is O2?
Post by: Aurel on May 26, 2018, 03:12:20 AM
Quote
able to give us a hand with help manuals, include files, or developer docs without any further speculations?

Yo Mike  :)
Yes i can but currently I have no time for that .
By the way i have some docs about awinh but not general thing in o2
but i will see..
Title: Where is O2?
Post by: Arnold on May 26, 2018, 06:12:07 AM
The contribution of Laurent led me to this link:
http://users.freebasic-portal.de/ (http://users.freebasic-portal.de/)

I do not know how this will work, but it looks very interesting.

There are some more interesting links:
http://www.rapideuphoria.com/ (http://www.rapideuphoria.com/)
http://www.rapideuphoria.com/archive.htm (http://www.rapideuphoria.com/archive.htm)
(Search does not work at the moment but calling the categories does work).

There is also this link about CGI(Web) Applications:
http://www.rapideuphoria.com/cgi.htm (http://www.rapideuphoria.com/cgi.htm)

I also found these links:
https://smallbasic.github.io/ (https://smallbasic.github.io/)
https://smallbasic.github.io/pages/samples.html (https://smallbasic.github.io/pages/samples.html)

If something like above is possible for user contributions to Oxygenbasic, I think it would make sense to donate for web hosting services. But I cannot imagine that Charles would have survived the last years if he had been dependant only on the development of Oxygenbasic.

Roland
Title: Re: Where is O2?
Post by: JRS on May 26, 2018, 09:45:52 AM
The use of the cgi-bin directory to create dynamic web content is older than dirt and rarely used anymore. Most browsers today discourage its use or refuse to support it altogether.

I like SmallBasic's documentation direction on github. We should expand on Charles's existing github O2 repository adding a similar documentation format until the compiler is more defined and stable.
Title: Re: Where is O2?
Post by: edcronos on May 28, 2018, 01:13:41 AM
Thank you Charles,
I had tried but gave error on the line, and thought I did not have the Redim
  I also did not see in the examples I encountered with arrays, and since I was focused on the vba array operation I did not focus much on it
is what I miss in O2 a more comprehensive explanation of the basics, ALSO I see in the examples FUNCTIONS not exposed in the manual,


even those who turn to you with doubts usually do not put the resolution of the case, leaving the newbies with even more doubts

about the long and the int, it's because my excel is 32bit, the int of O2 seems to me to be sufficient in that case
I believe I can use Vba LongPtr,

then I analyze the forms of communication between vba and O2

and I ask the freedom to open a topic for my adventures with O2 in the VBA, as I am a novice, maybe expose in my attempts, answers to other novices,
Title: Re: Where is O2?
Post by: Mike Lobanovsky on May 28, 2018, 08:23:06 AM
... I ask the freedom to open a topic for my adventures with O2 in the VBA ...

By all means, you're welcome to do so here on this Problems & Solutions board.
Title: Re: Where is O2?
Post by: JRS on May 28, 2018, 03:41:06 PM
Quote from:    José Roca
Millions of programmers have been spoiled by Visual Basic.

Those VB programmers didn't write commercial solutions with VB for the most part. Most applications were specific to a company that hired the programmer to write it.
Title: Re: Where is O2?
Post by: edcronos on May 29, 2018, 06:52:48 AM
what spoils is that there is no "Basic"
there is only (visual) basic, (O2) basic, (free) basic, (power) basic, among many other variants that are not compatible at all,

basic still exists only for its exciting ease of use and its logic closer to the routine of the day to day to automate small ideas quickly even for those who have just started

any one understands a For To next loop after a single explanation, unlike C for (int i = 0; i <10; i ++) it still has to be counted the "}" to know where the loop ends, outside the logic operations, okay after a time of use assimilates the syllabic, but in basic this is almost instant because it is already rooted in this
Title: Re: Where is O2?
Post by: edcronos on May 29, 2018, 11:27:32 AM
... I ask the freedom to open a topic for my adventures with O2 in the VBA ...

By all means, you're welcome to do so here on this Problems & Solutions board.
I'm kind of messed up in ideas, but I'll try to be a little clearer,
It's hard for anyone to come from excel, but it can be something of a parameter for possible interest.
Title: Re: Where is O2?
Post by: jalih on May 29, 2018, 11:56:00 AM
...there is only (visual) basic, (O2) basic, (free) basic, (power) basic, among many other variants that are not compatible at all,

basic still exists only for its exciting ease of use and its logic closer to the routine of the day to day to automate small ideas quickly even for those who have just started

any one understands a For To next loop after a single explanation, unlike C for (int i = 0; i <10; i ++) it still has to be counted the "}" to know where the loop ends, outside the logic operations, okay after a time of use assimilates the syllabic, but in basic this is almost instant because it is already rooted in this

I see no problem with incompatible syntax between Basic variants. If you master one programming language, another programming language can be learned real fast. I personally would like to see Basic evolve from C style arrays ( please, give me slicing or cross section of arrays ) and poor pointer implementation with excessive need for casting ( PL/I had it right ).

What comes to looping: you really only need DO loop.  ;)
Title: Re: Where is O2?
Post by: edcronos on May 29, 2018, 12:03:05 PM
Quote
I see no problem with incompatible syntax between Basic variants

the problem in incompatible syntax is not with the creation of projects, but in reuse of code and portability of projects
also has the fact of lack of support of one or another developer, use of tools, and does not work well that of who knows one knows all, only has the basis of atability

nor does the basic concept of Basic keep from one to the other,
an example is the use of array in O2
I for example use Goto to skip blocks of loops and if nested
in the thin basic does not even have the primitive function like goto, I would have to set a new mode of operation for what I already do normally
Title: Re: Where is O2?
Post by: JRS on May 29, 2018, 07:25:03 PM
I think what you're looking for is a language like Script BASIC (http://www.allbasic.info/forum/index.php?topic=468.msg5083#msg5083) which has a COM/OLE automation  CallByName  interface. PHP is also a good choice which has a slick COM/OLE automation API and even can access .NET assembles.

Charles has a beginning of a COM interface working that is demonstrated with a SAPI example.

Here is the Script BASIC SAPI example.using DLLC.

Code: Script BASIC
  1. 'SAPI - COM SPEECH
  2.  
  3. DECLARE SUB DLLC_FILE ALIAS "dllfile" LIB "DLLC"
  4. DECLARE SUB DLLC_PROC ALIAS "dllproc" LIB "DLLC"
  5. DECLARE SUB DLLC_GUID ALIAS "dllguid" LIB "DLLC"
  6. DECLARE SUB DLLC_METH ALIAS "dllmeth" LIB "DLLC"
  7. DECLARE SUB DLLC_RECO ALIAS "dllreco" LIB "DLLC"
  8. DECLARE SUB DLLC_WSTR ALIAS "dllwstr" LIB "DLLC"
  9. DECLARE SUB DLLC_CALL ALIAS "dllcall" LIB "DLLC"
  10. DECLARE SUB DLLC_ASTR ALIAS "dllastr" LIB "DLLC"
  11. DECLARE SUB DLLC_COBJ ALIAS "dllcobj" LIB "DLLC"
  12.  
  13. ole32 = DLLC_FILE("ole32.dll")
  14.  
  15. CoInitialize     = DLLC_PROC(ole32, "CoInitialize (i)")
  16. CoUninitialize   = DLLC_PROC(ole32, "CoUninitialize (i)")
  17. CoCreateInstance = DLLC_PROC(ole32, "CoCreateInstance i=(t*ObjGuid ,i pUnkOuter,i context, t*IspGuid, i*Iface)" )
  18.  
  19. VoiceObjGuid = DLLC_GUID("96749377-3391-11D2-9EE3-00C04F797396")
  20. ISpVoiceGuid = DLLC_GUID("6C44DF74-72B9-4992-A1EC-EF996E0422D4")
  21. Context      = 7
  22. pUnkOuter    = 0
  23. Voice        = 0
  24. Release      = DLLC_METH( 2, "Release i=()")
  25. Speak        = DLLC_METH(20, "Speak i=(z*pwcs,i flags,i pulstreamno)")
  26. WaitUntilDone= DLLC_METH(32, "WaitUntilDone i=(i)")
  27. PRINT DLLC_RECO(speak)
  28. Text         = DLLC_WSTR("Hello World\0")
  29. hr = 0
  30. DLLC_CALL(CoInitialize, 0)
  31. hr = DLLC_CALL(CoCreateInstance, VoiceObjGuid, pUnkouter, Context, ISpVoiceGuid, Voice)
  32. IF (hr = 0) THEN
  33.   PRINT "connected to voice\n\n"
  34.   PRINT DLLC_ASTR(Text) & "\n\n"
  35.   DLLC_COBJ(Voice, Speak, Text, 0, 0)
  36.   DLLC_COBJ(Voice, WaitUntilDone, 0xFFFFFFFF)
  37.   DLLC_COBJ(Voice, Release)
  38. ELSE
  39.   PRINT "SAPI Error " & FORMAT("%x", hr) & "\n\n"
  40. END IF
  41. DLLC_CALL(CoUninitialize)
  42.  
  43. DLLC_FILE
  44.  

I have been thinking of creating a version of Script BASIC that focuses on O2 embedded  aspects of DLLC and call it ScriptO2.  This would allow full use of SB (using its COM ext.) as a core language with both O2 JIT (with a dynamic FFI) and easy to use C based extension API.
Title: Re: Where is O2?
Post by: edcronos on June 01, 2018, 01:14:15 PM
Arnold

the right thing is to wait for the BETA version to be ready to define a documentation strategy
There is a lot to be done.
for example a listing of functions and commands
and from there go putting explanations and examples of functioning
a clear explanation of O2 programming structure
types of variables, sizes, uses and scope
Title: Re: Where is O2?
Post by: edcronos on June 02, 2018, 01:28:07 AM
is there a list of O2 functions and commands?
it is not necessary to have examples and explanations
Title: Re: Where is O2?
Post by: Mike Lobanovsky on June 02, 2018, 01:41:12 AM
FYI: The "O2 Multidimensional Arrays" spin-off has been split into a separate topic here (http://www.oxygenbasic.org/forum/index.php?topic=1709.msg18338#msg18338).
Title: Re: Where is O2?
Post by: JRS on June 21, 2018, 05:48:57 PM
I think Charles made a good point when he said O2 will be what he wants it to be, nothing more or less.

I don't think O2 should try to be another PowerBASIC or any other past BASIC flavor. You best know the Windows API if you plan to use it in it's current form.

How do others feel about O2 offering compatibility with macros?