Hi
Any news about Charles Pegge? I have not seen any new postings from him
at both the OxygenBasic forum and here since 2 months ago.
Thanks for any info.
As far as I know, yes, but if I remember well he needed his time to care of his old mother.
I hope he is fine. The automated log off feature kicked me out of his forums and the password recovery system is not woring (i dont receive the email it claims to have sent), so i cant post anymore there.
I think that this place is best for future posting about Oxygen Basic.
Oh Yes Zlatko
This is indeed the best place to post Oxygen Basic! Now I see that you too
is banned at the OxygenBasic forum, thanks to John H1N1 ;D
ahh yeah
nothing special.
by the way i am moving ;D
I think I'm okay. A bit short of sleep and wondering whether Caffeine is beneficial, or indeed essential to further programming activity :)
Hallo Charles I wish you a happy new year!
When can we get a OXYGEN Version that can eat PB-Code and compile it to x64? :-)?
Quote from: Charles Pegge on August 22, 2020, 04:25:11 PM
I think I'm okay. A bit short of sleep and wondering whether Caffeine is beneficial, or indeed essential to further programming activity :)
hello Charles, health first, other things can wait.
may this new year be proper and full of health, happiness and opportunities
Happy NewYear!
Theo, I doubt there is sufficient demand for PB 64, but I defer to Brian Alvarez and the Pluribasic enterprise. The OxygenBasic compiler is complete, apart from a few minor adjustments.
Hello Charles
Luv to hear that O2 compiler is now complete. Does it means that it already passed its Beta testing phase?
Thanxx a lot Charles
Hi Chris,
There is a lot of documentation and packaging to do, supporting the compiler. I don't know whether I can do it all on my own in a timely manner.
Hello Charles
One question
in the o2 forum at https://www.oxygenbasic.org/forum/index.php?PHPSESSID=4ei5llitqgs6r6pe3bf0tqkqj7&topic=2046.msg22127;topicseen#msg22127
you stated that string2: replaced bywtring
do you mean ?
string2: replaced by wstring
Sorry, typo. Dodgy keyboard on my laptop.
These are wide (unicode) string types
Hallo Charles, I can digitally sign files for you in case you want that. Just send me the files, can be Dropbox like in the past.
Hello Theo
Digitally signed files -- do you mean that you can use digital certificate to sign off Charles's Oxygen executables?
that would be great as many antivirus software always flag out these executables as malware or false positive.
Thanks, Theo. At least we have less trouble from Windows security over the last 18 months.
Hallo Charles, just send me the files.
Can be in a Dropbox like last time.
Then i can digitally sign the files for you any time, also if there are changes.
Its a fact that the people from Microsoft want that the Source of each executable is well known.
They will - more and more - inhibit the execution of files that are not digitally signed.
We may like it or not but this is the flow of things.
Therefore i recommend you to have your executables signed.
Depending on Windows-Policies Companies may even be unable to even download and start your files if they are not digitally signed.
Best is, if these files are all signed and also the setup-program is signed.
If you do not have a good Setup Maker, i can recommend you
Centurion Setup (https://secure.2checkout.com/order/product.php?PRODS=4532935&QTY=1&AFFILIATE=140120).
It will automatically create your Setup, and if you give him your digital Certificate, he will automatically Sign all Executables and DLL's during the process.
Its by far the easiest and best Setup-Maker I know. It also make all the registering of the File-Types.
Of course there are other ways to get around false Virus warnings, but it will require you to fight with Anti-Virus Companies
again and again with each new Release.
Once your executables are digitally signed, and they know your Sign, the problem is gone.
Here is some help on how to report false positives. (https://www.techsupportalert.com/content/how-report-malware-or-false-positives-multiple-antivirus-vendors.htm#Easily_Submit_Malware_To_All_Vendors)
or maybe there is a way to create MZ header that looks exactly like
exe is created with MS C++ or something well known
just asking ..
If so the code will get VERY BLOATED and then you can use these tools possibly :-).
Why not just go the right way and make the digital signature?
Its just a drag and drop here ...
Besides that, it does not really help.
ANY Executable that "has no verified source certificate" will be a potential virus thread in the near future.
Its not only YOU need a Vaxination passport, your executables will also need one.
This is part of the new World Order.
Next they will also try to forbid usage of anonymous Bitcoin Transactions.
Its just that they want get FULL CONTROL.
Can you get it around?
If you stay in public it will be difficult.
So from what i hear, Oxygen Basic is somehow ready?
Then why not digitally sign it?
Ok Theo
i don't know i just asking
so can you digitaly sign gxo2.exe and then we can make test ?
Send me an e-mail, then i send you an Dropbox Link where you can place the files.
Then we can do that.
hi Theo
i was send you a email with link
Hello Charles
anything new with o2 maybe ?
Hi Aurel,
I've just posted version 040 :)
https://github.com/Charles-Pegge/OxygenBasic/tree/master
(https://github.com/Charles-Pegge/OxygenBasic/blob/master/torus.jpg)
hello Charles Pegge
good to hear from you :)
am also happy for the updated o2
keep well :)
Hi Charles
That is fine ,i very rare visit o2 github ..but i visit sourceForge o2
ok i will download and try.
all best !
Aurel
hi Charles
I just compiled my two big programs
AurelEdit_04 and microA_06 with Oxygen SC040
all works excellent !
this time i use your OxIDE :)
Hi Charles
I have a question about sourceForge OxgyenBasic ...
why is still stated as ALPHA ?
can you change this?
thanks
There is no obvious way to edit the SourceForge page. It is all dumbed down.
Charles
I have sourceForge page but there is no any software status
see here :
https://sourceforge.net/projects/micro-a-interpreter
i really don't have a clue why is that on Oxygen sF page ???
Thanks Johan :)
Roland and me are working on RosettaCode tasks. Many of the 1000+ tasks listed are computationally significant:
https://rosettacode.org/wiki/Category:OxygenBasic
Hi Charles,
I am very happy to see this further update. Thanks for your kind work.
What are the things that you have changed or completed? What are the differences compared to the previous version?
Many greetings. :)
Hi Nicola,
Mostly internal changes and fixes, which are recorded in inc/OXSC/Oxylog.txt
but some additions:
Pseudo commands similar to PowerBasic
chr(s,i)= character
wchr(s,i)= wide character
asc(s,i)= byte
unic(s,i)= word
and secondary keywords in the metalanguage:
#if
leftmatch symbol, string
#if
rightmatch symbol, string
#if
anymatch sybol string
Many thanks for your manual work. The o2 manual is automatically generated from i
nf/o2keyw.dat and various html pages.
A typical entry looks like this:
Quote
key: "redim 18"
action: create or resize a dynamic array, preserving contents within range
use: extend or reduce an array size at run-time
example: redim string s(n)
remarks: to flush an array's contents, redim it with 0 elements first. But avoid
doing this with arrays of strings; the orphaned strings are not garbage-collected
until the end of the program, and will accumulate on each iteration where the redim
reduces the number of elements.
related: dim, new
group: system macro
updated: 10/03/2017
.
I would be delighted to incorporate any modifications or additions you would like to see, along with additional html pages.
That is interesting Charles
I am not sure that i need this additions (power basic like )
but can be useful for sure
thanks
Great work and Thanxx alot Charles and Roland
to place O2 in Rossetta code
We are ok with Power Basic like syntax to help us to convert PB programs into O2
We would also like Roland to join us in this forum to make it a much better forum than that stupeed scrip basic forum
Your work is a good test for the reliability of the product, Zlatko.
I like the idea to make it a bit more Powerbasic-like.
Because there are still some people out there who look around "where to go about x64 from PB".
Theoretically even an Editor that you can load PB-Code into,
and that internally converts the Oxygen Syntax to PB-like Syntax would be enough
to compile many PB-Programms to X64.
PowerBasic to o2 code translator already exists but i cannot remember
the name of author and i don't know what is the status ..maybe eduardo
or something similar.
I think it would need an dedicated Editor Program, where it is integrated.
Just a converter?
That would need to be really compatible if it has to be used from PB-IDE.
That converter is called Pluribasic by Brian Alvarez
www.pluribasic.com
not sure how good it is as it seems to have no progress since Jul 2021?
on this Theo's forum it is called Brian's Board
http://www.jose.it-berater.org/smfforum/index.php?board=440.0
I followed Brian's endeavor with interest, but he seems to have vanished and his domain has expired
Quotepluribasic.com has expired
He had financial problems, I think.
He really thought to get a living with programming in a niche market.
Which is pure phantasie.
I have told him that its very unlikely to earn a living in a niche Market like PB.
Especially as a single developer.
I know that he tried several things to get money ... but as we all know even Powerbasic itself
was never a good business and always "In dept" to some degree.
Such niche markets like PB you can only do for fun.
This is something you need to know when you make these programs.
Working with Brian was very stimulating though I can see where we got into a few problems. I hope we hear from him again soon.
So I've been thinking about ways to improve language support. One way is to enable direct integration of language-extensions into the compiler dll source.
With full access to all the compiler functions and state variables, this would make it much easier to derive new self-compiling languages from oxygen.dll.
I'll make it the focus of release 0.5.0 :)
Hallo Charles,
how is the current state, can the compiler make 64 and 32 bit executables as well as dll's?
Using PB i currently often run into its limitation, especially about Macro expansion ("Too complex") Error Message.
If the code is designed like that - lets say i have 20 Subprograms that use this Macro, it can not simply be changed.
Hi Theo,
Oxygen can produce both exes and dlls in 32 and 64 bit versions. JIT mode and self-compiling are currently limited to 32bit but this is not a significant impediment. JIT mode is like using an interpreter with full machine-code performance.
Re: recursive macro expansion, we have a few traps to avoid memory overflow during compilation, but I can still break through them, so I'll plug those leaks.
Recursive UDT Types are also prone to expansion when they have direct members of the same type, or include another type which includes this type.
For my current usage, JIT-Mode does not look so important.
What components like Linker and Assembler, do you currently use that are from other sources?
Oxygen uses its own assembler and linker.
The only external sources I can think of is Gorc.exe for compiling rc resources to res. The compiler can embed res files into the binary.
Thats really good, possibly i could give you PB-Source code for the resources stuff if you want do it on your own.
In such case send me an Mail then i can look for it.
Its better to have full control over the code.
I must find time and test my wrapper aiwnh in 64bit mode
Thanks Theo,
There is useful information in those files. In particular RESFMT.txt.
I'll start with menus which are quite well explained, and microsoft provide good examples:
https://docs.microsoft.com/en-us/windows/win32/menurc/using-menus.
By placing the resource compiler inside o2, we will have access to all the equates and other definitions setup in the main app.
If this part is also inside, you have a really complete package.
Next we should discuss "removing the Macro Limitations",
and automatic variables like these from Stan Durham.
These are Variables of the next generation.
I attach these for you and others, including Source code in PB.
HLib 304
QuoteBy placing the resource compiler inside o2, we will have access to all the equates and other definitions setup in the main app.
That would be big plus Charles , IonicWind basic and some others have that long time ago.
all best...
Hello Charles,
Best that Roland can join this forum too as his contributions at the previous forum are immense, we
have learn a lot of stuff from him.
Could you please convey this message to him?
Thanxx
Hi Theo,
We have 5 different kinds of macro in the toolbox, as well as metalanguage. About half of Oxygen's core functions are implemented through macros. In the hierarchy of constructs, macros sit above the rest of the language.
Some are very simple like right
macro right(s,i) {mid(s,-(i))}
Others are complex and adaptive for different types and classes. Here is the latest for redim
def redim
=========
#ifndef %2
static %1 * %2
@%2=getmemory 0
#endif
scope
indexbase 1
bstring _buf_
strptr(_buf_)=@%2
int _qb_ = %3
int _le_ = len _buf_
int _qn_ = _le_ / sizeof(%1)
int _i_
#if match "%4","clear"
for _i_=1 to _qn_
#if typecodeof(%2)>=0x200
#ifdef %1.destructor
%2[_i_].destructor
#endif
#ifdef %1.constructor
%2[_i_].constructor
#endif
#elseif typecodeof(%2)>=0xa0
%2[_i_]=""
#else
%2[_i_]=0
#endif
next
#endif
if _qb_ > _qn_
_buf_ += nuls( sizeof(%1) * (_qb_ - _qn_))
@%2=strptr _buf_
for _i_=_qn_ +1 to _qb_
#if typecodeof(%2)>=0x200
#ifdef %1.constructor
%2[_i_].constructor
#endif
#elseif typecodeof(%2)>=0xa0
%2[_i_]=""
#else
'%2[_i_]=0
#endif
next
elseif _qb_ < _qn_
for _i_=_qb_ +1 to _qn_
#if typecodeof(%2)>=0x200
#ifdef %1.destructor
%2[_i_].destructor
#endif
#elseif typecodeof(%2)>=0xa0
%2[_i_]=""
#else
'%2[_i_]=0
#endif
next
_buf_ = left( _buf_, sizeof(%1) * _qb_ )
@%2=strptr _buf_
endif
end scope
end def
Hi Aurel,
It might be useful to make some Basic syntax available in the rc file, like equates and multi-line strings. Another idea is to put the resource script directly into the Basic source code:
resource
...
end resource
Hi Chris,
I have asked Roland whether he would like to join us. But like many of us, life is not easy for him at present.
Charles, we have currently a lot of Scammers who want join the Forum.
Because of this i do not accept any new applications from people that i do not know.
So, if you see that your friends join the forum, can you accept their application or tell me to do so?
About the Macros.
To be really good, Macros should be able to react on a variable number of Parameters.
Therefore i must be able to get "the number of given Parameters" and must be able to "conditional compile" depending on the number of Parameters.
Because a Macro with 4 Parameters may need to be compiled to other code then a Macro with just 2 Parameters.
Also you need "Macro local Labels", otherwise you can not really make Macros with labels,
because these Labels could become duplicates if a Macro is called multiple times.
In the same way, you need Macro-Local variables.
These features are most important.
Then it would be nice, to have a way to react on the "Recursion level" which is the number of times that a Macro calls itself.
Then the Macro can expand itself "in a Loop" until a certain Number is reached, which can the n be used to "break the recursion".
These are the most important Macro features, do you have them all ready?
Yes Theo,
the macros and metaprogramming can do all of those things. I have not thought about recursion counting before but it works :)
Local symbols are all defined alongside the parameters in the top line. These symbols are made unique for each call of the macro. All macros are late binding so they behave quite similarly to run-time code.
'08:45 25/04/2022
'macro local labels
'macro recursion breaking
macro M(ct,pa,pb,pc,pd, lb1,lb2,lb3)
======================================
'RECURSION
%= counter = ct-1 '%=' EARLY CALCULATION OF EQUATE
#print counter
'
#if counter>0
m(counter,100,200)
#endif
'CHECKING PRESENCE OF PARAMETERS
#ifndef pc
goto lb3
#endif
'
#ifndef pd
...
#endif
'LOCAL LABELS
lb1:
...
lb2:
...
lb3:
end macro
M(3,10,20,30) 'omitting 5th param
Hallo Charles
do your Macros have a maximum nesting or Recusion depth?
Do they have a maximum size limit like in Powerbasic?
I PB i always run into these limits.
"Macro to complex" and like that.
I've put in a few limits to prevent runaway expansion. You know something is wrong when your memory usage goes over 500megabytes!
The nesting depth for expressions is currently 100 but there is no restriction on macro nesting depth.
So in Expressions you can open 100 (..) brackets?
Thats ok, for now.
So lets see whats your next step, before i ask you for Optimizations for Deep Learning :-).
I should clarify that the general nesting stack is limited to a depth of 100, but floating point math is limited to a stack depth of 7. This is because it uses the 8 FPU stacking registers. In practice, this is plenty.
When humans are doing the Basic, a block nesting depth of 20 might be considered extreme, but who knows what structures AI might produce :)
Hi Charles,
could you please give me information regarding these commands and others if there are any?
I would like to put them in the Help file.
Pseudo commands similar to PowerBasic
chr(s,i)= character
wchr(s,i)= wide character
asc(s,i)= byte
unic(s,i)= word
and secondary keywords in the metalanguage:
#if leftmatch symbol, string
#if rightmatch symbol, string
#if anymatch sybol string
My initial manual entries:
from inf/o2keyw.dat
key: "asc 16"
action: returns ascii encoding of a character in a string
use: AsciiCode=asc(String,CharacterPosition)
example:
'as function:
a=asc("ABCDEF",2) 'a=66 'B'
'as pseudo-command:
asc(s,2)=98 's="AbCDEF"
related: unic, chr, mid, val, len, str
group: string functions
updated: 16/06/2022
.
key: "unic 16"
action: returns encoding of a character in a wide string
use: uni=unic(String,CharacterPosition)
example: a=unic(L"ABCDEF",2)
result: a=0x0042 'character='B'
related: asc, wchr, chr, val, mid, len, str
remarks: Can also be used as a pseudo-command like asc()
group: string functions
updated: 16/06/2022
.
key: "chr 16"
action: returns string of 1 character of ascii encoding (0..255)
use: string=chr(AsciiValue)
example:
'as function:
s=chr(65) 's="A"
'as pseudo-command:
string s="abcdef"
chr(s,2)="B" 's="aBcdef"
related: wchr, asc, unic, mid string
group: string functions
updated: 16/06/2022
.
key: "wchr 16"
action: returns wide string of a 2 byte character (encoding 0..65535 / 0xffff)
use: widestring=wchr(WideCharValue)
example: wstring ws=wchr(65)
result: ws contains unicode character 0x0041
remarks: Can also be used as a pseudo-command like chr()
related: unic, asc, mid, string
group: string functions
updated: 16/06/2022
.
key: "defined 57"
key: "undefined 57"
key: "match 57"
key: "leftmatch 57"
key: "rightmatch 57"
key: "anymatch 57"
title: meta keywords
action: match teting of symbol names
use: to allow blocks of code to be included or omitted at compile time
example:
#if leftmatch X, "vector"
#include "mathutil.inc"
#endif
related: #if, #elseif, #else, #endif, typeof, typecodeof, def, macro
remarks: generally for use inside macros
groupref: metakeywords
group: meta control
updated: 17/06/2022
.
Well Charles!
... even if, given my ignorance also of the English language, I like to have more explanations and more examples ...
Even the ".inc" files have few explanatory notes ... and it is difficult to understand how the implemented functions work ... and it is not easy to distinguish between internal functions and external, ie final, functions to be used in your programs.
Ciao